/*
Theme Name: Monkeylab
Theme URI: https://monkeylab.ca
Author: Monkeylab Technologies Inc.
Description: One-page block theme for Monkeylab Technologies. Software, automation and advice for BC businesses.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: Proprietary
Text Domain: monkeylab
*/

:root {
  --ink: #14181d; --paper: #f3efe8; --card: #fbf9f5; --accent: #ff6a13; --steel: #cfd8df;
  --muted: #4f5a65; --line: #cfc8bb;
  --d: 'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --b: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --m: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --gutter: max(24px, calc((100% - 1160px) / 2));
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 12px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--b); font-size: 18px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
.wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }

/* ---------- header ---------- */
.mk-header { background: var(--paper); border-bottom: 2px solid var(--ink); }
.mk-header__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px var(--gutter); }
.mk-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.mk-brand__mark { flex: none; width: 56px; height: 27px; background: var(--ink); -webkit-mask: url(assets/img/logo-mark.png) center / contain no-repeat; mask: url(assets/img/logo-mark.png) center / contain no-repeat; }
.mk-brand__text { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.mk-brand__name { font-family: var(--d); font-weight: 700; font-size: 26px; letter-spacing: .02em; text-transform: lowercase; line-height: 1; }
.mk-brand__sub { font-family: var(--m); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.mk-nav { display: flex; align-items: center; gap: 24px; flex: none; }
.mk-nav > a { text-decoration: none; font-weight: 500; font-size: 15px; white-space: nowrap; }
.mk-nav > a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* buttons */
.mk-btn, .wp-block-button__link {
  display: inline-block; background: var(--accent); color: var(--ink); border: 2px solid var(--ink); border-radius: 0;
  font-family: var(--d); font-weight: 700; font-size: 20px; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; line-height: 1.1;
  padding: 13px 22px; box-shadow: 4px 4px 0 var(--ink); transition: transform .12s ease, box-shadow .12s ease; cursor: pointer;
}
.mk-btn:hover, .wp-block-button__link:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); color: var(--ink); }
.is-style-outline > .wp-block-button__link { background: transparent; box-shadow: none; color: var(--ink); border: 2px solid var(--ink); }
.is-style-outline > .wp-block-button__link:hover { background: var(--card); transform: none; box-shadow: none; }
.mk-btn--sm { font-size: 16px; padding: 9px 14px; box-shadow: 3px 3px 0 var(--ink); white-space: nowrap; }

/* email chooser */
.mk-mail { position: relative; }
.mk-mail summary { list-style: none; user-select: none; }
.mk-mail summary::-webkit-details-marker { display: none; }
.mk-mail[open] summary { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.mk-mail__menu { position: absolute; right: 0; top: calc(100% + 12px); z-index: 30; min-width: 230px; background: var(--card); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.mk-mail__addr { display: block; padding: 10px 14px; font-family: var(--m); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.mk-mail__menu a, .mk-mail__menu button { display: block; width: 100%; text-align: left; font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); background: none; border: 0; border-bottom: 1px solid var(--line); padding: 12px 14px; cursor: pointer; text-decoration: none; }
.mk-mail__menu > :last-child { border-bottom: 0; }
.mk-mail__menu a:hover, .mk-mail__menu button:hover, .mk-mail__menu a:focus-visible, .mk-mail__menu button:focus-visible { background: var(--accent); outline: none; }

/* ---------- bands ---------- */
.mk-band { padding: 96px var(--gutter); }
.mk-dark { background: var(--ink); color: var(--paper); }
.mk-dark a { color: var(--paper); }
.mk-steel { background: var(--steel); }
.mk-tag { font-family: var(--m); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.mk-dark .mk-tag { color: var(--paper); opacity: .7; }
.mk-card .mk-tag { color: var(--accent); margin: 0 0 6px; }
h1, h2, h3 { font-family: var(--d); font-weight: 700; margin: 0; }
h1 { font-size: clamp(38px, 6vw, 80px); line-height: 1.02; letter-spacing: -.02em; max-width: 16ch; margin-bottom: 24px; }
h2 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.08; letter-spacing: -.015em; margin-bottom: 40px; }
h3 { font-size: 24px; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 8px; }

/* hero */
.mk-hero { padding-top: 72px; padding-bottom: 88px; }
.mk-eyebrow { font-family: var(--m); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 12px; margin: 0 0 20px; }
.mk-eyebrow::before { content: ""; width: 14px; height: 14px; background: var(--accent); border: 2px solid var(--ink); flex: none; }
.mk-lede { font-size: clamp(19px, 2vw, 24px); max-width: 34em; margin: 0 0 32px; }
.mk-cta { gap: 16px; margin: 0 0 64px; }
.mk-hero-art { margin: 0 12px 12px 0; }
.mk-hero-art img { display: block; width: 100%; border: 3px solid var(--ink); box-shadow: 12px 12px 0 var(--ink); }

/* strip */
.mk-strip { background: var(--accent); border-block: 2px solid var(--ink); padding-block: 22px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 28px; }
.mk-strip .mk-tag { color: var(--ink); margin: 0; }
.mk-chips { font-family: var(--d); font-weight: 700; font-size: 22px; letter-spacing: .06em; text-transform: uppercase; margin: 0; }

/* about */
.mk-big { font-family: var(--d); font-weight: 600; font-size: clamp(28px, 3.8vw, 46px); line-height: 1.12; max-width: 22ch; margin: 0 0 36px; }
.mk-dark p:not(.mk-tag):not(.mk-big) { max-width: 44em; opacity: .9; margin: 0 0 18px; }

/* grids and cards */
.mk-grid { display: grid; gap: 40px; align-items: stretch; }
.mk-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mk-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.mk-grid > * { margin: 0; }
.mk-card { display: flex; flex-direction: column; background: var(--card); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); margin: 0 8px 8px 0; }
.mk-card .wp-block-image { margin: 0; }
.mk-card .wp-block-image img { display: block; width: 100%; border-bottom: 3px solid var(--ink); }
.mk-card > :not(.wp-block-image) { padding-inline: 24px; margin-block: 0; }
.mk-card > .mk-tag { padding-top: 22px; }
.mk-card > p:last-child { padding-bottom: 28px; margin: 0; max-width: 32em; }
.mk-card h3 { margin: 0 0 8px; }
.mk-step { border-top: 3px solid var(--ink); padding-top: 20px; }
.mk-num { font-family: var(--d); font-weight: 800; font-size: clamp(72px, 9vw, 120px); line-height: .9; color: var(--accent); -webkit-text-stroke: 3px var(--ink); margin: 0 0 12px; }
.mk-step p:last-child { margin: 0; }
.mk-note { font-family: var(--m); font-size: 13px; color: var(--muted); letter-spacing: .04em; margin: 40px 0 0; }

/* contact */
.mk-contact h2 { max-width: 16ch; margin-bottom: 20px; }
.mk-contact p:not(.mk-tag) { margin: 0 0 8px; }
.mk-reach { margin-top: 32px; display: grid; gap: 10px; justify-items: start; }
.mk-email { font-family: var(--d); font-weight: 600; font-size: clamp(28px, 5vw, 52px); letter-spacing: -.01em; color: var(--accent) !important; text-decoration: none; overflow-wrap: anywhere; line-height: 1.05; }
.mk-email:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.mk-alt { font-size: 15px; }
.mk-alt a, .mk-alt button { color: var(--paper); text-underline-offset: 3px; }
.mk-alt button { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.mk-alt a:hover, .mk-alt button:hover { background: var(--accent); color: var(--ink); }
.mk-based { font-family: var(--m); font-size: 13px; opacity: .7; margin-top: 12px; }

/* faq */
.mk-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 56px; align-items: start; }
.mk-split > * { margin: 0; }
.mk-faq-head h2 { margin-bottom: 0; max-width: 8ch; }
.wp-block-details { border-top: 3px solid var(--ink); margin: 0; }
.wp-block-details:last-child { border-bottom: 3px solid var(--ink); }
.wp-block-details summary { position: relative; cursor: pointer; list-style: none; padding: 22px 52px 22px 0; font-family: var(--d); font-weight: 700; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.1; letter-spacing: .03em; text-transform: uppercase; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; font-size: 30px; line-height: 1; background: var(--accent); border: 2px solid var(--ink); }
.wp-block-details[open] summary::after { content: "\2212"; }
.wp-block-details summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wp-block-details > p { margin: 0 0 24px; max-width: 40em; }

/* footer + plain pages */
.mk-footer { padding: 24px var(--gutter) 40px; border-top: 2px solid var(--ink); }
.mk-legal { font-family: var(--m); font-size: 12px; letter-spacing: .04em; color: var(--muted); margin: 0; }
.mk-page { padding: 64px var(--gutter); }


/* fifth offering card spans the row on wide screens */
@media (min-width: 901px) {
  .mk-grid-2 > .mk-card:last-child:nth-child(odd) { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 1fr auto auto auto 1fr; }
  .mk-grid-2 > .mk-card:last-child:nth-child(odd) > .wp-block-image { grid-column: 1; grid-row: 1 / -1; }
  .mk-grid-2 > .mk-card:last-child:nth-child(odd) > .wp-block-image img { height: 100%; object-fit: cover; border-bottom: 0; border-right: 3px solid var(--ink); }
  .mk-grid-2 > .mk-card:last-child:nth-child(odd) > :not(.wp-block-image) { grid-column: 2; }
  .mk-grid-2 > .mk-card:last-child:nth-child(odd) > .mk-tag { grid-row: 2; }
  .mk-grid-2 > .mk-card:last-child:nth-child(odd) > h3 { grid-row: 3; }
  .mk-grid-2 > .mk-card:last-child:nth-child(odd) > p:last-child { grid-row: 4; }
  .mk-grid-2 > .mk-card:last-child:nth-child(odd) > p:last-child { padding-bottom: 0; }
}


/* mobile / tablet menu */
.mk-menu { display: none; position: relative; }
.mk-menu summary { list-style: none; cursor: pointer; user-select: none; font-weight: 600; font-size: 15px; background: var(--card); border: 2px solid var(--ink); padding: 8px 12px; line-height: 1.1; }
.mk-menu summary::-webkit-details-marker { display: none; }
.mk-menu[open] summary { background: var(--ink); color: var(--paper); }
.mk-menu__list { position: absolute; right: 0; top: calc(100% + 12px); z-index: 30; min-width: 210px; background: var(--card); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.mk-menu__list a { display: block; padding: 13px 16px; font-weight: 500; font-size: 16px; text-decoration: none; border-bottom: 1px solid var(--line); }
.mk-menu__list a:last-child { border-bottom: 0; }
.mk-menu__list a:hover, .mk-menu__list a:focus-visible { background: var(--accent); outline: none; }
@media (max-width: 1180px) { .mk-brand__sub { display: none; } }


/* review round: calmer strip, bigger touch targets, readable measure */
:root { --accent-ink: #b34700; }
.mk-strip { background: var(--steel); }
.mk-strip .mk-tag { color: var(--muted); }
.mk-strip__line { flex-basis: 100%; margin: 0; font-size: 16px; color: var(--muted); }
.mk-card .mk-tag { color: var(--accent-ink); }
.mk-dark p:not(.mk-tag):not(.mk-big) { max-width: 34em; }
.wp-block-details summary { text-transform: none; font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -.005em; }
.mk-btn--sm { display: inline-flex; align-items: center; min-height: 44px; }
.mk-menu summary { display: inline-flex; align-items: center; min-height: 44px; }
.mk-alt { display: flex; flex-wrap: wrap; gap: 12px; font-size: 16px; margin-top: 4px; }
.mk-alt a, .mk-alt button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 2px solid var(--paper); background: transparent; color: var(--paper); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.mk-alt a:hover, .mk-alt button:hover, .mk-alt a:focus-visible, .mk-alt button:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--ink); outline: none; }
@media (max-width: 900px) { .mk-card .wp-block-image img { aspect-ratio: 16 / 10; object-fit: cover; } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) { .mk-nav > a { display: none; } .mk-menu { display: block; } }
@media (max-width: 900px) {
  .mk-band { padding-block: 64px; }
  .mk-grid-2, .mk-grid-3, .mk-split { grid-template-columns: minmax(0, 1fr); }
  .mk-split { gap: 32px; }
  .mk-faq-head h2 { max-width: none; }
  .mk-hero { padding-top: 48px; }
  .mk-band.mk-strip { padding-block: 24px; }
}
@media (max-width: 520px) {
  .mk-header__in { gap: 8px; padding-left: 16px; padding-right: 16px; }
  .mk-menu summary { font-size: 13px; padding: 8px 9px; }
  .mk-nav { gap: 8px; }
  .mk-brand { gap: 8px; }
  .mk-brand__sub { display: none; }
  .mk-brand__mark { width: 40px; height: 19px; }
  .mk-brand__name { font-size: 20px; letter-spacing: .02em; }
  .mk-btn--sm { font-size: 13px; padding: 8px 10px; }
  .mk-cta .wp-block-button__link { font-size: 18px; }
  .mk-card, .mk-hero-art { margin-right: 6px; }
  .mk-hero-art img { box-shadow: 6px 6px 0 var(--ink); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .mk-btn, .wp-block-button__link { transition: none; } }
