/* ==========================================================================
   benharris.kiwi - global.css
   ONE stylesheet for the whole site.
   ========================================================================== */

/* 0. DESIGN TOKENS ========================================================= */
:root {
  /* --- Plum Pop palette -------------------------------------------------- */
  --paper:      #F6F4FA;   /* base (lilac white)                            */
  --paper-2:    #FCFBFE;   /* raised surface                               */
  --paper-3:    #EBE5F7;   /* recessed / alt fill                          */
  --ink:        #191622;   /* near-black plum                              */
  --ink-2:      #5B5470;   /* softer ink                                   */
  --sand:       #D8CFEE;   /* grid lines / borders (light violet-grey)     */
  /* NOTE: --lime is kept as the variable name for "the accent" so every
     existing rule keeps working; the value is now Plum Pop violet.        */
  --lime:       #6C3BF5;   /* PRIMARY accent - violet (fills use white text)*/
  --lime-deep:  #5A2FD0;   /* violet dark enough for accent TEXT on light   */
  --grape:      #FF7AAE;   /* SECONDARY accent - pink                       */
  --on-accent:  #FFFFFF;   /* text on a violet fill                         */
  --accent-tint:#E7DEFB;   /* light violet for highlights / soft fills      */
  --accent-light:#B9A3FF;  /* lighter violet for accents on dark bands      */

  --bg: var(--paper);
  --fg: var(--ink);
  --muted: var(--ink-2);
  --line: var(--sand);

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-label:   "Space Grotesk", ui-sans-serif, system-ui, sans-serif;

  --fs-mega:  clamp(3rem, 9.5vw, 9.5rem);
  --fs-h1:    clamp(2.6rem, 7vw, 6rem);
  --fs-h2:    clamp(1.9rem, 4.2vw, 3.4rem);
  --fs-h3:    clamp(1.25rem, 2vw, 1.7rem);
  --fs-lead:  clamp(1.1rem, 1.55vw, 1.4rem);
  --fs-body:  clamp(1rem, 1.05vw, 1.08rem);
  --fs-sm:    0.9rem;
  --fs-xs:    0.78rem;

  --cols: 12;
  --gutter: clamp(0.9rem, 1.6vw, 1.6rem);
  --margin: clamp(1.1rem, 4vw, 4.5rem);
  --maxw: 1600px;
  --unit: clamp(3rem, 5.5vw, 5.2rem);
  --cell: clamp(2.6rem, 4.2vw, 3.9rem);   /* background grid module        */

  --r: 4px;
  --r-lg: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.7s;
}

/* 1. RESET & BASE ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--unit) * 1.3);
  background: var(--paper);
}
body {
  background: transparent;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* full-bleed background grid: both axes, covers edges and margins */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--sand) 38%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--sand) 38%, transparent) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  background-position: 0 0;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--grape); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--lime); color: var(--on-accent); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 0.7em 1.2em; border-radius: 0 0 var(--r) 0;
}
.skip-link:focus { left: 0; }

/* 2. LAYOUT ================================================================ */
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: var(--gutter); }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--margin); }
.section { padding-block: calc(var(--unit) * 1.1); position: relative; }

/* dark bands keep the grid visible too, in a lighter line */
.section--band, .site-footer { background: var(--ink); color: var(--paper); position: relative; z-index: 0; }
.section--band::before, .site-footer::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--paper) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--paper) 6%, transparent) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
}
.section--band > *, .site-footer > * { position: relative; z-index: 1; }
.section--band ::selection { background: var(--lime); color: var(--on-accent); }

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-12 { grid-column: 1 / -1; }
.pos-7 { grid-column: 7 / -1; }
.pos-8 { grid-column: 8 / -1; }
.pos-9 { grid-column: 9 / -1; }

.rail {
  font-family: var(--font-label); font-weight: 500; font-size: var(--fs-sm);
  letter-spacing: 0.01em; color: var(--lime-deep);
}
.section--band .rail { color: var(--accent-light); }

/* 3. TYPOGRAPHY ============================================================ */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; }
p { max-width: 66ch; }
.lead { font-size: var(--fs-lead); line-height: 1.45; color: var(--fg); max-width: 58ch; }
.muted { color: var(--muted); }
strong, b { font-weight: 700; }
em { font-style: italic; }
.underline-lime {
  background-image: linear-gradient(var(--accent-tint), var(--accent-tint));
  background-repeat: no-repeat; background-position: 0 88%; background-size: 100% 0.16em;
  transition: background-size 0.3s var(--ease);
}
.underline-lime:hover { background-size: 100% 100%; }

/* 4. REUSABLE BITS ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.9em 1.5em; border: 1.5px solid var(--ink); border-radius: 100px;
  font-family: var(--font-label); font-weight: 500; font-size: var(--fs-sm);
  background: var(--ink); color: var(--paper);
  transition: transform 0.35s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
  will-change: transform;
}
.btn:hover { background: var(--lime); color: var(--on-accent); border-color: var(--lime); }
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ctw-card--primary .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.ctw-card--primary .btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ctw-card--primary .tag { border-color: var(--on-accent); color: var(--on-accent); }
.ctw-card--primary .ctw-metric span { color: var(--on-accent); opacity: 0.82; }
.section--band .btn { background: var(--lime); color: var(--on-accent); border-color: var(--lime); }
.section--band .btn:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.section--band .btn--ghost { background: transparent; color: var(--paper); border-color: var(--paper); }
.section--band .btn--ghost:hover { background: var(--lime); color: var(--on-accent); border-color: var(--lime); }

.tag {
  display: inline-block; font-family: var(--font-label); font-weight: 500; font-size: var(--fs-sm);
  padding: 0.4em 0.9em; border: 1.5px solid var(--ink); border-radius: 100px; color: var(--ink); background: transparent;
}
.section--band .tag { border-color: color-mix(in srgb, var(--paper) 40%, transparent); color: var(--paper); }
.hairline { height: 1px; background: var(--line); border: 0; width: 100%; }

/* expandable "read more" */
details.more { margin-top: 1.1em; border-top: 1.5px solid var(--ink); }
.section--band details.more { border-top-color: color-mix(in srgb, var(--paper) 26%, transparent); }
details.more > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-label); font-weight: 500; font-size: var(--fs-sm); padding-top: 0.8em; color: var(--ink);
}
.section--band details.more > summary { color: var(--paper); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .plus {
  display: inline-block; position: relative; width: 1.5em; height: 1.5em; border-radius: 50%;
  border: 1.5px solid var(--plus-c, currentColor); font-size: 0.9em; line-height: 1;
  color: transparent; /* the glyph is hidden; the bars below are drawn dead-centre */
  flex: none; vertical-align: middle;
  transition: transform 0.3s var(--ease), background 0.3s, border-color 0.3s;
}
details.more[open] > summary .plus { transform: rotate(45deg); background: var(--lime); border-color: var(--lime); --plus-c: var(--on-accent); }
details.more .more-body { padding-top: 0.9em; }
details.more .more-body p + p { margin-top: 0.8em; }
details.more .more-body p { max-width: 68ch; }

/* 5. SITE CHROME =========================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(0.7rem, 1.4vw, 1.1rem) var(--margin);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck { background: color-mix(in srgb, var(--paper) 84%, transparent); backdrop-filter: blur(10px) saturate(1.1); border-bottom-color: var(--line); }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 0.5em; }
.brand .dot { width: 0.62em; height: 0.62em; border-radius: 50%; background: var(--lime); display: inline-block; }
.main-nav { display: flex; gap: clamp(1rem, 2vw, 2.2rem); align-items: center; }
.main-nav a { font-family: var(--font-label); font-weight: 500; font-size: var(--fs-sm); position: relative; padding: 0.3em 0; }
.main-nav a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--lime); transition: width 0.35s var(--ease); }
.main-nav a:hover::after, .main-nav a[aria-current="true"]::after { width: 100%; }
.header-tag { font-family: var(--font-label); font-weight: 500; font-size: var(--fs-sm); color: var(--muted); }

/* two-part cursor: a small solid dot + a lagging outline ring */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none; border-radius: 50%; opacity: 0; transition: opacity 0.3s; }
.cursor-dot {
  width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; background: var(--lime);
  transform: translate3d(-100px, -100px, 0); box-shadow: 0 0 0 1.5px var(--ink);
}
.cursor-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1.5px solid var(--ink);
  mix-blend-mode: multiply; transform: translate3d(-100px, -100px, 0);
  transition: width 0.28s var(--ease), height 0.28s var(--ease), margin 0.28s var(--ease), background 0.28s, border-color 0.28s, opacity 0.3s;
}
body.cursor-ready .cursor-dot, body.cursor-ready .cursor-ring { opacity: 1; }
.cursor-ring.is-hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; background: color-mix(in srgb, var(--lime) 30%, transparent); border-color: var(--lime); mix-blend-mode: normal; }
.cursor-dot.is-hover { background: var(--ink); box-shadow: 0 0 0 1.5px var(--lime); }
body.max-waffle .cursor-dot { background: var(--grape); }

.site-footer { padding-block: calc(var(--unit) * 0.9); }
.site-footer a:hover { color: var(--accent-light); }
.footer-big { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-mega); line-height: 0.9; letter-spacing: -0.03em; }
.footer-label { font-family: var(--font-label); font-weight: 500; font-size: var(--fs-sm); color: color-mix(in srgb, var(--paper) 60%, transparent); }
.footer-meta { font-family: var(--font-label); font-size: var(--fs-xs); color: color-mix(in srgb, var(--paper) 55%, transparent); }

/* 6. HOMEPAGE SECTIONS ===================================================== */

/* --- Hero (tighter, wider title) --------------------------------------- */
.hero { padding-top: calc(var(--unit) * 1.6); padding-bottom: calc(var(--unit) * 0.9); }
.hero .wrap { width: 100%; }
.hero-head { margin-bottom: clamp(1.4rem, 3vw, 2.6rem); }
.hero-kicker { font-family: var(--font-label); font-weight: 500; font-size: var(--fs-lead); color: var(--muted); }
.hero-title { font-size: var(--fs-mega); font-weight: 600; letter-spacing: -0.04em; margin-top: 0.18em; line-height: 0.98; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.1em; }
.hero-title .line > span { display: block; }
.hero-title em { font-style: normal; color: var(--lime-deep); }
.hero-lead { max-width: 52ch; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 0.55em; margin-top: 1.5em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8em; margin-top: 1.8em; }

/* animated hero pills: each swaps between a tiny animation and its word */
.hpill {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  height: 2.6em; min-width: 8.4em; padding: 0 1.1em;
  border: 1.5px solid var(--ink); border-radius: 100px; background: transparent; overflow: hidden;
}
.hpill__word, .hpill__anim {
  display: inline-flex; align-items: center; justify-content: center;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.hpill__word { font-family: var(--font-label); font-weight: 500; font-size: var(--fs-sm); color: var(--ink); }
.hpill__anim { position: absolute; inset: 0; opacity: 0; }
.hpill__anim svg { height: 1.5em; width: auto; overflow: visible; }
.hpill.playing .hpill__word { opacity: 0; transform: translateY(-30%); }
.hpill.playing .hpill__anim { opacity: 1; }
/* draw + pop primitives, run only while .playing */
.hp-stroke { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len, 60); stroke-dashoffset: var(--len, 60); }
.hpill.playing .hp-stroke { animation: hpDraw 1.1s var(--ease) forwards; }
.hp-lime { fill: var(--lime-deep); opacity: 0; transform-box: fill-box; transform-origin: center; }
.hpill.playing .hp-lime { animation: hpPop 0.5s var(--ease) 0.9s forwards; }
.hp-blink { animation: hpBlink 0.7s steps(1) infinite; }
@keyframes hpDraw { to { stroke-dashoffset: 0; } }
@keyframes hpPop { 0% { opacity: 0; transform: scale(0.2) rotate(-30deg); } 60% { opacity: 1; transform: scale(1.15); } 100% { opacity: 1; transform: scale(1); } }
@keyframes hpBlink { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }
@keyframes hpSweep { to { transform: rotate(320deg); } }
.hpill.playing .hp-hand { transform-box: fill-box; transform-origin: bottom center; animation: hpSweep 1.1s var(--ease) forwards; }
.hero-aside { display: flex; flex-direction: column; gap: 1em; }
.spec { border-top: 1.5px solid var(--ink); padding-top: 0.55em; }
.spec dt { font-family: var(--font-label); font-weight: 500; font-size: var(--fs-xs); color: var(--muted); }
.spec dd { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; }

/* --- Skills (with icons) ----------------------------------------------- */
.skills-grid { margin-top: 2.2em; row-gap: 0; }
.skill { grid-column: span 4; border-top: 1.5px solid var(--ink); padding: 1.1em 0 1.8em; }
.skill-icon { display: block; width: 2.5rem; height: 2.5rem; margin-bottom: 0.7em; color: var(--ink); }
.skill-icon svg { width: 100%; height: 100%; }
.skill .num { font-family: var(--font-label); font-weight: 500; font-size: var(--fs-sm); color: var(--lime-deep); }
.skill h3 { margin-top: 0.25em; font-size: var(--fs-h3); }
.skill p { font-size: var(--fs-body); color: var(--muted); margin-top: 0.55em; max-width: 40ch; }

.tools { margin-top: 2.4em; border-top: 1.5px solid var(--ink); padding-top: 1.6em; }
.tools h3 { font-size: var(--fs-h3); margin-bottom: 0.9em; }
.tools-row { display: flex; flex-wrap: wrap; gap: 0.6em; }
.pill {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-label); font-weight: 600; font-size: var(--fs-body);
  padding: 0.5em 1.05em; border: 2px solid var(--ink); border-radius: 100px;
  background: var(--paper-2); color: var(--ink);
  transition: background 0.25s, transform 0.25s var(--ease);
}
.pill img { width: 1.3em; height: 1.3em; filter: grayscale(1); opacity: 0.65; transition: filter 0.3s, opacity 0.3s; }
.pill:hover { background: var(--lime); color: var(--on-accent); transform: translateY(-3px); }
.pill:hover img { filter: none; opacity: 1; }

/* --- Work (images, greyscale to colour, per-card grid) ----------------- */
.work-grid { margin-top: 2.2em; row-gap: calc(var(--gutter) * 1.8); }
.work-card { display: flex; flex-direction: column; position: relative; }
.w-3 { grid-column: span 3; }
.w-4 { grid-column: span 4; }
.w-5 { grid-column: span 5; }
.w-6 { grid-column: span 6; }
.w-7 { grid-column: span 7; }
.w-8 { grid-column: span 8; }
.w-12 { grid-column: 1 / -1; }
.work-thumb {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  border: 1.5px solid var(--ink); background: var(--paper-3);
  transition: transform 0.5s var(--ease); aspect-ratio: 16 / 10;
}
.work-thumb--tall { aspect-ratio: 4 / 3; }
.work-thumb--wide { aspect-ratio: 24 / 7; }
.work-card:hover .work-thumb { transform: translateY(-6px); }
.work-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; filter: grayscale(1) contrast(1.03); transition: filter 0.55s var(--ease), transform 0.6s var(--ease); }
.work-card:hover .work-thumb img { filter: none; transform: scale(1.03); }
/* subtle grid overlay on every card */
.work-thumb::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--ink) 12%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--ink) 12%, transparent) 1px, transparent 1px);
  background-size: calc(var(--cell) * 0.8) calc(var(--cell) * 0.8);
  mix-blend-mode: multiply; opacity: 0.5;
}
.work-thumb--ink::after, .work-thumb--grape::after, .work-thumb--ctw::after {
  background-image:
    linear-gradient(to right, color-mix(in srgb, #fff 14%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, #fff 14%, transparent) 1px, transparent 1px);
  mix-blend-mode: screen;
}
.work-thumb__label { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 2.1vw, 2rem); color: var(--ink); opacity: 0.2; letter-spacing: -0.02em; padding: 0.4em; text-align: center; }
.work-thumb--lime { background: var(--lime); }
.work-thumb--ink { background: var(--ink); }
.work-thumb--ink .work-thumb__label { color: var(--paper); opacity: 0.24; }
.work-thumb--grape { background: var(--grape); }
.work-thumb--grape .work-thumb__label { color: #fff; opacity: 0.32; }
.work-badge { position: absolute; top: 0.8em; left: 0.8em; z-index: 3; font-family: var(--font-label); font-weight: 500; font-size: var(--fs-xs); background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); padding: 0.35em 0.7em; border-radius: 100px; }
.work-badge--new { background: var(--lime); color: var(--on-accent); border-color: var(--lime); }
.work-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 1em; margin-top: 0.9em; }
.work-meta h3 { font-size: var(--fs-h3); }
.work-cat { font-family: var(--font-label); font-weight: 500; font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; }
.work-stat { font-size: var(--fs-body); color: var(--muted); margin-top: 0.4em; max-width: 48ch; }
.work-arrow { display: inline-block; transition: transform 0.35s var(--ease); }
.work-card:hover .work-arrow { transform: translate(3px, -3px); }

/* --- Now / Cut the Waffle ---------------------------------------------- */
.ctw { align-items: stretch; row-gap: 1.6em; }
.ctw-card { grid-column: span 6; border-radius: var(--r-lg); border: 1.5px solid var(--ink); padding: clamp(1.5rem, 3vw, 2.8rem); display: flex; flex-direction: column; gap: 1em; }
.ctw-card--primary { background: var(--lime); color: var(--on-accent); }
.ctw-card--ext { background: var(--paper-2); }
.ctw-logo { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h2); letter-spacing: -0.03em; line-height: 0.95; }
.ctw-card p { max-width: 48ch; }
.ctw-quote { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-h3); letter-spacing: -0.01em; }
.ctw-metrics { display: flex; gap: 1.6em; flex-wrap: wrap; margin-top: auto; padding-top: 0.6em; }
.ctw-metric strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem,3vw,2.6rem); line-height: 1; letter-spacing: -0.02em; }
.ctw-metric span { font-size: var(--fs-sm); color: var(--ink); opacity: 0.75; }
.ext-score { display: inline-flex; align-items: center; gap: 0.7em; font-family: var(--font-label); font-size: var(--fs-sm); }
.ext-score .ring { width: 3em; height: 3em; border-radius: 50%; background: conic-gradient(var(--grape) calc(var(--v, 0) * 1%), var(--paper-3) 0); display: grid; place-items: center; }
.ext-score .ring b { width: 2.3em; height: 2.3em; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; font-family: var(--font-display); font-size: var(--fs-sm); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.7em; margin-top: 0.4em; }

/* --- Timeline ---------------------------------------------------------- */
.timeline { margin-top: 2.2em; }
.tl-item { border-top: 1.5px solid color-mix(in srgb, var(--paper) 24%, transparent); padding-block: 1.3em; }
.tl-head { display: grid; grid-template-columns: 6rem 1fr auto; gap: var(--gutter); align-items: baseline; }
.tl-year { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h3); color: var(--accent-light); }
.tl-role { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; }
.tl-where { font-family: var(--font-label); font-size: var(--fs-sm); color: color-mix(in srgb, var(--paper) 62%, transparent); text-align: right; white-space: nowrap; }
.tl-note { color: color-mix(in srgb, var(--paper) 78%, transparent); margin-top: 0.5em; max-width: 70ch; grid-column: 2 / -1; }
.tl-item details.more .more-body p { color: color-mix(in srgb, var(--paper) 74%, transparent); }

/* --- Stats band -------------------------------------------------------- */
.stats { row-gap: var(--gutter); }
.stat {
  grid-column: span 3; border: 1.5px solid color-mix(in srgb, var(--paper) 22%, transparent);
  background: color-mix(in srgb, var(--paper) 5%, transparent);
  border-radius: var(--r-lg); padding: clamp(1.2rem, 2vw, 1.8rem);
  display: flex; flex-direction: column; gap: 0.5em; transition: border-color 0.3s, transform 0.4s var(--ease), background 0.3s;
}
.stat:hover { border-color: var(--lime); transform: translateY(-4px); background: color-mix(in srgb, var(--lime) 8%, transparent); }
.stat__num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 5.4vw, 4.6rem); letter-spacing: -0.03em; line-height: 0.9; color: var(--accent-light); }
.stat__label { font-size: var(--fs-sm); max-width: 28ch; color: color-mix(in srgb, var(--paper) 74%, transparent); }

/* --- Story contact form ------------------------------------------------ */
.story { align-items: start; row-gap: 2em; }
.story-form { grid-column: span 7; }
.story-sentence { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 3.2vw, 2.7rem); line-height: 1.3; letter-spacing: -0.02em; }
.story-sentence .field-inline { display: inline-block; border: 0; border-bottom: 3px solid var(--lime); background: transparent; font: inherit; color: var(--ink); min-width: 6ch; padding: 0 0.15em; text-align: center; }
.story-sentence .field-inline::placeholder { color: var(--muted); opacity: 0.65; }
.chips { display: flex; flex-wrap: wrap; gap: 0.55em; margin-top: 1.6em; }
.chip { font-family: var(--font-label); font-weight: 500; font-size: var(--fs-body); padding: 0.55em 1.1em; border: 1.5px solid var(--ink); border-radius: 100px; background: var(--paper-2); transition: background 0.25s, transform 0.25s var(--ease); }
.chip[aria-pressed="true"] { background: var(--lime); color: var(--on-accent); }
.chip:hover { transform: translateY(-2px); }
.story-textarea { width: 100%; margin-top: 1.4em; min-height: 6em; resize: vertical; border: 1.5px solid var(--ink); border-radius: var(--r-lg); background: var(--paper-2); padding: 1em 1.1em; font-size: var(--fs-body); }
.story-side { grid-column: 9 / -1; }
.story-actions { display: flex; align-items: center; gap: 1.2em; margin-top: 1.6em; flex-wrap: wrap; }
.form-note { font-family: var(--font-label); font-size: var(--fs-sm); color: var(--muted); }
.form-status[data-state="ok"] { color: var(--lime-deep); }
.form-status[data-state="sending"] { color: var(--muted); }
.form-status[data-state="err"] { color: var(--grape); }

/* --- Waffle-o-meter (expandable log) ----------------------------------- */
.waffle-widget { max-width: 26rem; }
.waffle { display: flex; align-items: center; gap: 0.6em; font-family: var(--font-label); font-size: var(--fs-sm); color: color-mix(in srgb, var(--paper) 72%, transparent); }
.waffle__bar { flex: 1; height: 0.55em; border-radius: 100px; background: color-mix(in srgb, var(--paper) 16%, transparent); overflow: hidden; }
.waffle__fill { display: block; height: 100%; width: 4%; background: var(--accent-light); border-radius: 100px; transition: width 1.2s var(--ease); }
details.waffle-log { margin-top: 0.9em; }
details.waffle-log > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.5em; font-family: var(--font-label); font-size: var(--fs-sm); color: var(--paper); }
details.waffle-log > summary::-webkit-details-marker { display: none; }
details.waffle-log > summary .plus { display: inline-block; position: relative; width: 1.4em; height: 1.4em; border-radius: 50%; border: 1.5px solid var(--plus-c, currentColor); font-size: 0.85em; color: transparent; flex: none; vertical-align: middle; transition: transform 0.3s var(--ease), background 0.3s, border-color 0.3s; }
details.waffle-log[open] > summary .plus { transform: rotate(45deg); background: var(--lime); border-color: var(--lime); --plus-c: var(--on-accent); }
.waffle-log ul { list-style: none; margin-top: 0.9em; display: flex; flex-direction: column; gap: 0.55em; }
.waffle-log li { display: flex; justify-content: space-between; gap: 1em; font-size: var(--fs-sm); color: color-mix(in srgb, var(--paper) 74%, transparent); border-bottom: 1px dashed color-mix(in srgb, var(--paper) 20%, transparent); padding-bottom: 0.55em; }
.waffle-log li b { color: var(--accent-light); font-family: var(--font-display); white-space: nowrap; }

/* 7. MOTION / REVEAL ======================================================= */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal-stagger] > * { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-reveal-stagger].in > * { opacity: 1; transform: none; }
.hero-title .line > span { transform: translateY(105%); transition: transform 0.9s var(--ease); }
.hero.in .hero-title .line > span { transform: none; }
.hero .hero-kicker, .hero .hero-lead, .hero .hero-facts, .hero .hero-cta, .hero .hero-aside {
  opacity: 0; transform: translateY(16px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.hero.in .hero-kicker { opacity: 1; transform: none; transition-delay: 0.1s; }
.hero.in .hero-lead   { opacity: 1; transform: none; transition-delay: 0.45s; }
.hero.in .hero-facts  { opacity: 1; transform: none; transition-delay: 0.57s; }
.hero.in .hero-cta    { opacity: 1; transform: none; transition-delay: 0.69s; }
.hero.in .hero-aside  { opacity: 1; transform: none; transition-delay: 0.5s; }

.grid-intro { position: fixed; inset: 0; z-index: 400; background: var(--paper); pointer-events: none; }
.grid-intro__cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, 1fr); }
.grid-intro__cols span { border-right: 1px solid var(--sand); transform-origin: top; transform: scaleY(1); transition: transform 0.9s var(--ease); }
.grid-intro.done { opacity: 0; transition: opacity 0.5s 0.2s; }
.grid-intro.done .grid-intro__cols span { transform: scaleY(0); }

/* 8. RESPONSIVE ============================================================ */
@media (max-width: 1024px) {
  .w-3, .w-4, .w-5, .w-6, .w-7, .w-8 { grid-column: span 6; }
  .w-12 { grid-column: 1 / -1; }
  .ctw-card { grid-column: span 12; }
  .story-form, .story-side { grid-column: 1 / -1; }
  .stat { grid-column: span 6; }
  .skill { grid-column: span 6; }
  .pos-7, .pos-8, .pos-9 { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  :root { --cols: 6; }
  .main-nav, .header-tag { display: none; }
  .nav-toggle { display: inline-flex; }
  .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10 { grid-column: 1 / -1; }
  .pos-7, .pos-8, .pos-9 { grid-column: 1 / -1; }
  .hero-aside { flex-direction: row; flex-wrap: wrap; gap: 1em; }
  .spec { flex: 1 1 40%; }
  .w-4, .w-5, .w-6, .w-7, .w-8, .w-12 { grid-column: 1 / -1; }
  .w-3 { grid-column: span 3; }
  .skill { grid-column: 1 / -1; }
  .stat { grid-column: span 3; }
  .story-form, .story-side { grid-column: 1 / -1; text-align: left; }
  .tl-head { grid-template-columns: 4rem 1fr; }
  .tl-where { display: none; }
  .tl-note, .tl-item details.more { grid-column: 1 / -1; }
  .cursor-dot, .cursor-ring { display: none; }
  .work-thumb--wide { aspect-ratio: 16 / 9; }
  .lab-canvas { height: 780px; }
}

/* --- AI context-model canvas (the party trick) ------------------------- */
.lab-intro { margin-bottom: 1.4em; }
.lab-controls { display: flex; flex-wrap: wrap; gap: 0.7em; align-items: center; margin-top: 1.2em; }
.lab-hint { font-family: var(--font-label); font-size: var(--fs-sm); color: var(--muted); }
.lab-canvas {
  position: relative; margin-top: 1.6em; border: 1.5px solid var(--ink); border-radius: var(--r-lg);
  background:
    linear-gradient(to right, color-mix(in srgb, var(--sand) 34%, transparent) 1px, transparent 1px) 0 0 / var(--cell) var(--cell),
    linear-gradient(to bottom, color-mix(in srgb, var(--sand) 34%, transparent) 1px, transparent 1px) 0 0 / var(--cell) var(--cell),
    var(--paper-2);
  height: 660px; overflow: hidden; touch-action: none;
  transition: height 0.6s var(--ease);
}
.lab-note {
  position: absolute; top: 0; left: 0; z-index: 2;
  font-family: var(--font-label); font-weight: 500; font-size: var(--fs-sm);
  background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink);
  padding: 0.55em 0.85em; border-radius: 8px; cursor: grab; user-select: none;
  box-shadow: 3px 3px 0 rgba(22,21,15,0.14); white-space: nowrap;
  transition: transform 0.65s var(--ease), background 0.4s, box-shadow 0.3s, border-color 0.4s;
  will-change: transform;
}
.lab-note:active { cursor: grabbing; }
.lab-note .dotc { display: inline-block; width: 0.6em; height: 0.6em; border-radius: 50%; margin-right: 0.5em; vertical-align: middle; background: var(--muted); transition: background 0.4s; }
.lab-canvas.structured .lab-note { box-shadow: none; white-space: normal; }
.lab-canvas.structured .lab-note[data-cat="brand"] { border-color: var(--lime-deep); }
.lab-canvas.structured .lab-note[data-cat="brand"] .dotc { background: var(--lime-deep); }
.lab-canvas.structured .lab-note[data-cat="voice"] { border-color: var(--grape); }
.lab-canvas.structured .lab-note[data-cat="voice"] .dotc { background: var(--grape); }
.lab-canvas.structured .lab-note[data-cat="product"] .dotc { background: var(--ink); }
.lab-canvas.structured .lab-note[data-cat="audience"] { border-color: #C77A2B; }
.lab-canvas.structured .lab-note[data-cat="audience"] .dotc { background: #C77A2B; }
.lab-canvas.structured .lab-note[data-cat="messaging"] .dotc { background: var(--lime-deep); }
.lab-cat {
  position: absolute; top: 0; left: 0; z-index: 1; opacity: 0; pointer-events: none;
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h3); letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 0.4em; transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
.lab-cat::before { content: ""; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--lime); }
.lab-cat[data-cat="voice"]::before { background: var(--grape); }
.lab-cat[data-cat="audience"]::before { background: #C77A2B; }
.lab-canvas.structured .lab-cat { opacity: 1; }

/* Konami / max-waffle */
.waffle-banner {
  position: fixed; inset: auto 0 1.4rem 0; z-index: 350; margin-inline: auto; width: max-content; max-width: 92vw;
  background: var(--grape); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  padding: 0.7em 1.4em; border-radius: 100px; box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  transform: translateY(160%); transition: transform 0.5s var(--ease); pointer-events: none;
}
body.max-waffle .waffle-banner { transform: translateY(0); }
body.max-waffle { letter-spacing: 0.01em; }

/* live waffle detector in the form */
.waffle-meter { margin-top: 1em; max-width: 30rem; }
.waffle-meter__row { display: flex; align-items: center; gap: 0.7em; }
.waffle-meter__bar { flex: 1; height: 0.55em; border-radius: 100px; background: var(--paper-3); overflow: hidden; border: 1px solid var(--ink); }
.waffle-meter__fill { display: block; height: 100%; width: 6%; border-radius: 100px; background: var(--lime); transition: width 0.35s var(--ease), background 0.35s; }
.waffle-meter__label { font-family: var(--font-label); font-size: var(--fs-sm); color: var(--muted); margin-top: 0.5em; }

/* --- BH monogram (brand mark) ------------------------------------------ */
.bh-mark { height: 1.7em; width: auto; display: block; }

/* --- CTW cards: link to the live logo SVG ------------------------------ */
.work-thumb--ctw { background: #0A0A0A; }
.work-thumb--ctw .ctw-live-logo {
  position: absolute; inset: 0; z-index: 1; margin: auto; width: 62%; max-width: 300px; height: auto;
  transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
}
.work-card:hover .work-thumb--ctw .ctw-live-logo { transform: scale(1.05); }
.wp-card-ctw .ctw-live-logo { width: 74%; max-width: 240px; height: auto; }
.wp-shot { margin-top: 2.4em; border: 1.5px solid var(--ink); border-radius: var(--r-lg); overflow: hidden; background: var(--paper-3); box-shadow: 8px 8px 0 rgba(22,21,15,0.10); }
.wp-shot img { width: 100%; height: auto; display: block; }

/* --- Lab: context bar + chat ------------------------------------------- */
.lab-context {
  position: absolute; top: calc(12px + var(--lab-ctrl-h, 0px)); left: 16px; right: 16px; z-index: 3;
  display: flex; flex-wrap: wrap; gap: 0.4em; align-items: center;
  opacity: 0; transform: translateY(-6px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  pointer-events: none; font-family: var(--font-label); font-size: var(--fs-xs);
}
.lab-canvas.structured .lab-context { opacity: 1; transform: none; }
.lc-node { border: 1px solid var(--ink); border-radius: 100px; padding: 0.28em 0.65em; background: var(--paper); }
.lc-node.lc-root { background: var(--ink); color: var(--paper); }
.lc-sep { opacity: 0.45; }
.lab-chat {
  position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 4;
  border: 1.5px solid var(--ink); border-radius: var(--r-lg);
  background: var(--paper-2); padding: clamp(0.9rem, 1.7vw, 1.3rem);
  box-shadow: 0 8px 30px rgba(22,21,15,0.12);
}
.lab-chat__row { display: flex; gap: 0.7em; align-items: flex-start; }
.lab-chat__row + .lab-chat__row { margin-top: 0.7em; }
.lab-chat__refs { margin-top: 0.7em; font-family: var(--font-label); font-size: var(--fs-xs); color: var(--muted); opacity: 0; height: 0; overflow: hidden; transition: opacity 0.4s var(--ease); }
.lab-chat__refs b { color: var(--lime-deep); font-weight: 600; }
.lab-chat.good .lab-chat__refs { opacity: 1; height: auto; }
.lab-chat__badge { font-family: var(--font-label); font-weight: 600; font-size: var(--fs-xs); border-radius: 6px; padding: 0.3em 0.55em; white-space: nowrap; }
.lab-chat__badge--you { background: var(--ink); color: var(--paper); }
.lab-chat__badge--ai { background: var(--paper-3); color: var(--ink); border: 1px solid var(--ink); transition: background 0.4s; }
.lab-chat__text { font-size: var(--fs-body); transition: color 0.4s; }
.lab-chat__a .lab-chat__text { color: var(--muted); min-height: 5.4em; }
/* glow once the model has real context to work with */
.lab-chat.good {
  border-color: var(--lime);
  box-shadow: 0 0 0 1px var(--lime), 0 0 26px color-mix(in srgb, var(--lime) 45%, transparent), 0 8px 30px rgba(22,21,15,0.12);
  animation: chat-glow 3.4s var(--ease) infinite;
}
@keyframes chat-glow {
  0%, 100% { box-shadow: 0 0 0 1px var(--lime), 0 0 20px color-mix(in srgb, var(--lime) 34%, transparent), 0 8px 30px rgba(22,21,15,0.12); }
  50% { box-shadow: 0 0 0 1px var(--lime), 0 0 30px color-mix(in srgb, var(--lime) 55%, transparent), 0 8px 30px rgba(22,21,15,0.12); }
}
/* blinking keyboard caret used while typing */
.type-caret { display: inline-block; width: 0.6em; height: 1.05em; margin-left: 1px; vertical-align: text-bottom; background: var(--lime-deep); animation: caret-blink 1s steps(1) infinite; }
.lab-chat__q .type-caret { background: var(--ink); }
@keyframes caret-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.lab-chat__think { color: var(--muted); font-style: italic; }
@media (prefers-reduced-motion: reduce) {
  .lab-chat.good { animation: none; }
  .type-caret { animation: none; opacity: 0; }
}

/* --- Sales/marketing bridge band --------------------------------------- */
.bridge__title { max-width: 20ch; }
.bridge .lead strong { color: var(--lime-deep); font-weight: 600; }

/* --- "Build my AI engine" CTA (after the canvas) ----------------------- */
.ai-cta__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 2em; flex-wrap: wrap;
  margin-top: 1.8em; padding: clamp(1.6rem, 3vw, 2.6rem);
  border: 1.5px solid var(--ink); border-radius: var(--r-lg);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--lime) 16%, transparent), transparent 60%),
    var(--paper-2);
}
.ai-cta__title { margin-top: 0.35em; max-width: 18ch; }
.ai-cta__lead { color: var(--muted); max-width: 52ch; margin-top: 0.7em; }
.ai-cta__inner > div { flex: 1 1 22rem; }
@media (max-width: 680px) { .ai-cta__inner { flex-direction: column; align-items: flex-start; } }
.lab-chat.good .lab-chat__badge--ai { background: var(--lime); color: var(--on-accent); }
.lab-chat.good .lab-chat__a .lab-chat__text { color: var(--ink); }

/* --- Fun mobile menu --------------------------------------------------- */
.nav-toggle { display: none; align-items: center; gap: 0.5em; font-family: var(--font-label); font-weight: 500; font-size: var(--fs-sm); }
.nav-toggle .bars { position: relative; width: 22px; height: 12px; }
.nav-toggle .bars span { position: absolute; left: 0; width: 100%; height: 2px; background: var(--ink); transition: transform 0.3s var(--ease), top 0.3s var(--ease), opacity 0.3s; }
.nav-toggle .bars span:nth-child(1) { top: 0; }
.nav-toggle .bars span:nth-child(2) { top: 5px; }
.nav-toggle .bars span:nth-child(3) { top: 10px; }
body.menu-open .nav-toggle .bars span:nth-child(1) { top: 5px; transform: rotate(45deg); }
body.menu-open .nav-toggle .bars span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle .bars span:nth-child(3) { top: 5px; transform: rotate(-45deg); }
@media (max-width: 680px) { .nav-toggle { display: inline-flex; } }
.mobile-menu {
  position: fixed; inset: 0; z-index: 150; background: var(--lime); color: var(--on-accent);
  display: flex; flex-direction: column; justify-content: center; gap: 0.1em; padding: var(--margin);
  transform: translateY(-101%); transition: transform 0.55s var(--ease); overflow: hidden;
}
.mobile-menu.open { transform: none; }
.mobile-menu a { color: var(--on-accent);
  font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 13vw, 4.2rem);
  letter-spacing: -0.03em; line-height: 1.02; color: var(--ink); position: relative; width: max-content;
  transform: translateX(-8%); opacity: 0; transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
}
.mobile-menu.open a { transform: none; opacity: 1; }
.mobile-menu a:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu a:nth-child(2) { transition-delay: 0.17s; }
.mobile-menu a:nth-child(3) { transition-delay: 0.24s; }
.mobile-menu a:nth-child(4) { transition-delay: 0.31s; }
.mobile-menu a:nth-child(5) { transition-delay: 0.38s; }
.mobile-menu a:active, .mobile-menu a:hover { font-style: italic; }
.mobile-menu a::after { content: " ↗"; font-size: 0.5em; vertical-align: super; }
.mobile-menu__foot { margin-top: 1.4em; font-family: var(--font-label); font-weight: 500; font-size: var(--fs-sm); opacity: 0; transition: opacity 0.5s 0.45s; }
.mobile-menu.open .mobile-menu__foot { opacity: 1; }

/* --- Konami banner (persistent, with off switch) ----------------------- */
.waffle-banner {
  position: fixed; inset: auto 0 1.4rem 0; z-index: 350; margin-inline: auto; width: max-content; max-width: 92vw;
  background: var(--grape); color: #fff; border-radius: 16px; box-shadow: 0 12px 34px rgba(0,0,0,0.28);
  padding: 0.9em 1.3em; display: flex; flex-direction: column; align-items: center; gap: 0.35em; text-align: center;
  transform: translateY(180%); transition: transform 0.5s var(--ease); pointer-events: none;
}
body.max-waffle .waffle-banner { transform: translateY(0); pointer-events: auto; }
.waffle-banner__title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.waffle-banner__line { font-family: var(--font-label); font-size: var(--fs-sm); opacity: 0.92; max-width: 32ch; }
.waffle-banner__off { margin-top: 0.3em; background: #fff; color: var(--grape); border-radius: 100px; padding: 0.5em 1.1em; font-family: var(--font-label); font-weight: 600; font-size: var(--fs-sm); }
.waffle-banner__off:hover { background: var(--lime); color: var(--on-accent); }
body.max-waffle { letter-spacing: 0.005em; }

/* discoverable Waffle-mode toggle, bottom-left corner */
.waffle-switch {
  position: fixed; left: 1.1rem; bottom: 1.1rem; z-index: 120;
  display: inline-flex; align-items: center; gap: 0; overflow: hidden;
  height: 2.6rem; max-width: 2.6rem; padding: 0 0.55rem;
  border: 1.5px solid var(--ink); border-radius: 100px; background: var(--paper);
  box-shadow: 3px 3px 0 rgba(22,21,15,0.14); cursor: pointer;
  transition: max-width 0.4s var(--ease), background 0.3s, gap 0.4s var(--ease), padding 0.4s var(--ease);
}
.waffle-switch__icon { font-size: 1.15rem; line-height: 1; flex: none; }
.waffle-switch__label { font-family: var(--font-label); font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; opacity: 0; transition: opacity 0.3s; }
.waffle-switch__track { position: relative; width: 2.2em; height: 1.2em; border-radius: 100px; background: var(--paper-3); border: 1.5px solid var(--ink); flex: none; opacity: 0; transition: opacity 0.3s, background 0.3s; }
.waffle-switch__knob { position: absolute; top: 50%; left: 2px; width: 0.85em; height: 0.85em; border-radius: 50%; background: var(--ink); transform: translateY(-50%); transition: left 0.3s var(--ease), background 0.3s; }
.waffle-switch:hover, .waffle-switch:focus-visible, .waffle-switch.on {
  max-width: 15rem; gap: 0.6rem; padding: 0 0.7rem 0 0.7rem; background: var(--paper-2);
}
.waffle-switch:hover .waffle-switch__label, .waffle-switch:focus-visible .waffle-switch__label, .waffle-switch.on .waffle-switch__label,
.waffle-switch:hover .waffle-switch__track, .waffle-switch:focus-visible .waffle-switch__track, .waffle-switch.on .waffle-switch__track { opacity: 1; }
.waffle-switch.on { background: var(--grape); border-color: var(--grape); color: #fff; }
.waffle-switch.on .waffle-switch__track { background: rgba(255,255,255,0.35); border-color: #fff; }
.waffle-switch.on .waffle-switch__knob { left: calc(100% - 0.85em - 2px); background: #fff; }
@media (max-width: 680px) { .waffle-switch { display: none; } }

/* clearer live waffle meter bar */
.waffle-meter__bar { height: 0.7em; }

/* --- WORK PAGE (case study) -------------------------------------------- */
.wp-back { font-family: var(--font-label); font-weight: 500; font-size: var(--fs-sm); }
.wp-back:hover { color: var(--lime-deep); }
.wp-hero { padding-top: calc(var(--unit) * 1.9); }
.wp-crumb { font-family: var(--font-label); font-weight: 500; font-size: var(--fs-sm); color: var(--muted); }
.wp-crumb a:hover { color: var(--lime-deep); }
.wp-crumb span { opacity: 0.5; margin: 0 0.3em; }
.wp-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-mega); line-height: 0.88; letter-spacing: -0.04em; margin-top: 0.3em; }
.wp-title em { font-style: normal; color: var(--lime-deep); }
.wp-card-ctw { background: #0A0A0A; border-radius: var(--r-lg); aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 1.4em; border: 1.5px solid var(--ink); }
.wp-card-ctw .ctw-word { position: static; display: block; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 0.9; letter-spacing: -0.03em; color: var(--paper); }
.wp-meta { margin-top: 1.4em; display: flex; flex-direction: column; gap: 0; }
.wp-meta > div { display: flex; justify-content: space-between; gap: 1em; border-top: 1.5px solid var(--ink); padding: 0.7em 0; }
.wp-meta dt { font-family: var(--font-label); font-weight: 500; font-size: var(--fs-xs); color: var(--muted); }
.wp-meta dd { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm); text-align: right; }

.wp-services { margin-top: 2.2em; row-gap: var(--gutter); }
.service-card { grid-column: span 4; border: 1.5px solid var(--ink); border-radius: var(--r-lg); background: var(--paper-2); padding: clamp(1.2rem, 2vw, 1.7rem); display: flex; flex-direction: column; gap: 0.5em; transition: transform 0.4s var(--ease), background 0.3s; }
.service-card:hover { transform: translateY(-5px); background: var(--paper); }
.service-card .num { font-family: var(--font-label); font-weight: 500; font-size: var(--fs-sm); color: var(--lime-deep); }
.service-card h3 { font-size: var(--fs-h3); }
.service-card__d { font-size: var(--fs-body); color: var(--fg); }
.service-card__note { font-size: var(--fs-sm); color: var(--muted); font-style: italic; border-top: 1px solid var(--line); padding-top: 0.7em; margin-top: 0.3em; }

.cliff { border: 1.5px solid color-mix(in srgb, var(--paper) 26%, transparent); border-radius: var(--r-lg); padding: 1.1em; background: color-mix(in srgb, var(--paper) 4%, transparent); }
.cliff svg { width: 100%; height: auto; display: block; }
.cliff-axis { stroke: color-mix(in srgb, var(--paper) 30%, transparent); stroke-width: 1.5; }
.cliff-line { fill: none; stroke: var(--accent-light); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 900; stroke-dashoffset: 900; }
.cliff.in .cliff-line, [data-reveal].in .cliff-line { animation: cliffDraw 2s var(--ease) 0.2s forwards; }
@keyframes cliffDraw { to { stroke-dashoffset: 0; } }
.cliff-dot { fill: var(--grape); stroke: #fff; stroke-width: 2; }
.cliff-labels text { fill: color-mix(in srgb, var(--paper) 66%, transparent); font-family: var(--font-label); font-size: 15px; text-anchor: middle; }
.cliff-tag { fill: var(--accent-light); font-family: var(--font-label); font-weight: 600; font-size: 15px; text-anchor: middle; }
.wp-timeline { margin-top: 1.6em; display: grid; gap: 0; }
.wp-tl-item { display: grid; grid-template-columns: 7rem 9rem 1fr; gap: 1em; align-items: baseline; border-top: 1px solid color-mix(in srgb, var(--paper) 20%, transparent); padding: 0.9em 0; }
.wp-tl-m { font-family: var(--font-display); font-weight: 600; color: var(--accent-light); }
.wp-tl-t { font-family: var(--font-display); font-weight: 600; }
.wp-tl-d { font-size: var(--fs-sm); color: color-mix(in srgb, var(--paper) 74%, transparent); }

.ext-mock { border: 1.5px solid var(--ink); border-radius: var(--r-lg); overflow: hidden; background: var(--paper-2); box-shadow: 8px 8px 0 rgba(22,21,15,0.12); }
.ext-mock__bar { background: var(--ink); color: var(--paper); font-family: var(--font-label); font-size: var(--fs-sm); padding: 0.7em 1em; display: flex; align-items: center; gap: 0.4em; }
.ext-mock__bar span { width: 0.7em; height: 0.7em; border-radius: 50%; background: color-mix(in srgb, var(--paper) 40%, transparent); }
.ext-mock__bar span:first-child { background: #FF5F57; } .ext-mock__bar span:nth-child(2) { background: #FEBC2E; } .ext-mock__bar span:nth-child(3) { background: var(--lime); margin-right: 0.6em; }
.ext-mock__body { padding: 1.3em; }
.ext-mock__score { display: flex; align-items: center; gap: 1em; }
.ext-mock__score .ring { width: 3.4em; height: 3.4em; border-radius: 50%; background: conic-gradient(var(--grape) calc(var(--v,0)*1%), var(--paper-3) 0); display: grid; place-items: center; flex: none; }
.ext-mock__score .ring b { width: 2.6em; height: 2.6em; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; font-family: var(--font-display); }
.ext-mock__score strong { font-family: var(--font-display); font-size: var(--fs-h3); display: block; }
.ext-mock__score span { font-size: var(--fs-sm); color: var(--muted); }
.ext-mock__list { list-style: none; margin-top: 1.1em; display: flex; flex-direction: column; gap: 0.6em; }
.ext-mock__list li { display: flex; align-items: center; gap: 0.6em; font-size: var(--fs-sm); }
.ext-mock__list i { width: 1em; height: 1em; border-radius: 50%; flex: none; }
.ext-mock__list i.ok { background: var(--lime); box-shadow: inset 0 0 0 1.5px var(--ink); }
.ext-mock__list i.warn { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }

.wp-steps { margin-top: 2.2em; row-gap: var(--gutter); counter-reset: step; }
.step { grid-column: span 4; border-top: 2px solid var(--ink); padding-top: 1em; }
.step__n { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 5vw, 4rem); color: var(--lime-deep); line-height: 0.9; letter-spacing: -0.03em; }
.step h3 { font-size: var(--fs-h3); margin-top: 0.2em; }
.step p { font-size: var(--fs-body); color: var(--muted); margin-top: 0.5em; }

.wp-cta { text-align: left; }
.wp-cta__title { font-size: var(--fs-h1); max-width: 16ch; }

@media (max-width: 1024px) {
  .service-card { grid-column: span 6; }
  .step { grid-column: span 6; }
}
@media (max-width: 680px) {
  .wp-back { display: none; }
  .service-card, .step { grid-column: 1 / -1; }
  .wp-tl-item { grid-template-columns: 1fr; gap: 0.2em; }
}

/* --- Carousel (work galleries) ----------------------------------------- */
.carousel { margin-top: 2.2em; }
.carousel__track {
  display: flex; gap: var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding-bottom: 0.4em; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; cursor: grab;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.carousel__track.is-dragging img { pointer-events: none; }
.carousel__slide { scroll-snap-align: center; flex: 0 0 82%; max-width: 82%; }
@media (min-width: 700px) { .carousel__slide { flex-basis: 58%; max-width: 58%; } }
@media (min-width: 1100px) { .carousel__slide { flex-basis: 46%; max-width: 46%; } }
.carousel__slide figure { margin: 0; }
.carousel__slide img, .carousel__slide video {
  width: 100%; height: auto; display: block; border: 1.5px solid var(--ink);
  border-radius: var(--r-lg); background: var(--paper-3); box-shadow: 6px 6px 0 rgba(22,21,15,0.10);
}
.carousel__cap { display: flex; align-items: baseline; gap: 0.6em; margin-top: 0.9em; font-family: var(--font-label); font-size: var(--fs-sm); color: var(--muted); }
.carousel__cap b { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.carousel__cap .tagm { margin-left: auto; color: var(--lime-deep); white-space: nowrap; }
.section--band .carousel__cap { color: color-mix(in srgb, var(--paper) 66%, transparent); }
.section--band .carousel__cap b { color: var(--paper); }
.carousel__controls { display: flex; align-items: center; gap: 1em; margin-top: 1.3em; }
.carousel__btn {
  width: 3rem; height: 3rem; border-radius: 50%; border: 1.5px solid var(--ink);
  display: grid; place-items: center; background: var(--paper); font-size: 1.15rem;
  transition: background 0.25s, transform 0.25s var(--ease), opacity 0.25s;
}
.carousel__btn:hover { background: var(--lime); color: var(--on-accent); transform: translateY(-2px); }
.carousel__btn:disabled { opacity: 0.3; cursor: default; transform: none; background: var(--paper); }
.section--band .carousel__btn { background: transparent; color: var(--paper); border-color: color-mix(in srgb, var(--paper) 45%, transparent); }
.section--band .carousel__btn:hover { background: var(--lime); color: var(--on-accent); border-color: var(--lime); }
.carousel__count { font-family: var(--font-label); font-size: var(--fs-sm); color: var(--muted); }
.carousel__count b { font-family: var(--font-display); color: var(--ink); }
.section--band .carousel__count, .section--band .carousel__count b { color: var(--paper); }

/* 9. REDUCED MOTION & PRINT ================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  [data-reveal], [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; }
  .hero-title .line > span { transform: none !important; }
  .grid-intro { display: none; }
  .cursor-dot, .cursor-ring { display: none; }
}
@media print { .site-header, .cursor-dot, .grid-intro { display: none; } body::before { display: none; } body { background: #fff; color: #000; } }

/* 14. PROOF STRIP (logos + testimonial) ==================================== */
.proof { padding-block: calc(var(--unit) * 0.8); }
.proof__note { margin-top: 1em; max-width: 52ch; }

.proof-logos {
  list-style: none; padding: 0; margin: 2.2em 0 0;
  display: flex; flex-wrap: wrap; gap: 1.6em 2.4em;
}
.proof-logo { display: grid; grid-template-columns: auto 1fr; column-gap: 0.85em; align-items: center; }
.proof-logo img {
  grid-row: 1 / 3; width: 56px; height: 56px; border-radius: 12px;
  filter: grayscale(1); opacity: 0.62;
  transition: filter 0.4s var(--ease), opacity 0.4s var(--ease);
}
.proof-logo:hover img { filter: none; opacity: 1; }
.proof-logo__name {
  font-family: var(--font-label); font-weight: 600; font-size: var(--fs-sm);
  align-self: end; line-height: 1.2;
}
.proof-logo__role { font-size: var(--fs-xs); color: var(--muted); align-self: start; line-height: 1.35; }

.proof-quote {
  margin: 0; align-self: start; position: relative;
  background: var(--paper-2); border: 1.5px solid var(--line); border-radius: var(--r-lg);
  padding: 1.6em 1.5em 1.4em;
}
.proof-quote__mark {
  position: absolute; top: -0.22em; left: 0.42em;
  font-family: var(--font-display); font-size: 4.2rem; line-height: 1; color: var(--lime); opacity: 0.28;
}
.proof-quote__body { margin: 0; position: relative; }
.proof-quote__body p { font-size: var(--fs-lead); line-height: 1.5; }
.proof-quote__who { display: flex; flex-direction: column; margin-top: 1.2em; padding-top: 1em; border-top: 1.5px solid var(--line); }
.proof-quote__name { font-family: var(--font-label); font-weight: 600; }
.proof-quote__role { font-size: var(--fs-sm); color: var(--muted); }

/* 15. FAQ ================================================================== */
.faq-list { margin-top: 0.4em; border-top: 1.5px solid var(--line); }
.faq-item { border-bottom: 1.5px solid var(--line); }
.faq-item > summary { padding-block: 1.05em; font-size: var(--fs-h3); font-family: var(--font-display); }
.faq-item .more-body { padding-bottom: 1.2em; max-width: 68ch; }

/* 16. HEADSHOT + contact-side CTW route ==================================== */
.ben-shot {
  width: 132px; height: 132px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--lime); margin-bottom: 1.4em;
}
.story-side__ctw {
  margin-top: 1.4em; padding-top: 1.2em; border-top: 1.5px solid var(--line);
  font-size: var(--fs-sm); color: var(--muted);
}

/* 17. Waffle-mode exit ramp ================================================ */
/* secondary to the "turn it off" button on purpose: a nudge, not a competing pill */
.waffle-banner__cta {
  display: inline-block; margin-top: 0.15em; font-family: var(--font-label);
  font-size: var(--fs-xs); font-weight: 600; color: #fff; opacity: 0.9;
  text-decoration: underline; text-underline-offset: 3px;
}
.waffle-banner__cta:hover { opacity: 1; }

/* 18. 404 ================================================================== */
.nf { min-height: 62vh; display: flex; align-items: center; }
.nf__code {
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-mega);
  line-height: 0.9; letter-spacing: -0.03em;
}
.nf__code em { font-style: normal; color: var(--lime-deep); }

@media (max-width: 900px) {
  .proof-quote { margin-top: 2em; }
  .ben-shot { width: 104px; height: 104px; }
}

/* 19. FIVE-UP STATS ROW (SEO & GEO page) =================================== */
/* .stat is span-3 of a 12-col grid, so a 5th tile would wrap and sit alone.
   This overrides the track count instead of the span. */
.stats--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stats--5 .stat { grid-column: auto; }
@media (max-width: 1024px) { .stats--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 20. PLUS ICON: bars drawn from pseudo-elements ============================ */
/* The literal "+" glyph sits on the font's math axis, not the optical centre of
   the circle, so it always looked a touch high. These two bars are exact. */
.plus::before, .plus::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  background: var(--plus-c, currentColor); border-radius: 1px;
}
.plus::before { width: 0.62em; height: 1.6px; transform: translate(-50%, -50%); }
.plus::after  { width: 1.6px; height: 0.62em; transform: translate(-50%, -50%); }
.section--band .plus { --plus-c: var(--paper); }
details.waffle-log .plus { --plus-c: var(--paper); }

/* 21. SECTION RAILS: pills that light up as they scroll in ================= */
/* Sits above its heading as it always did. At rest it is an outlined chip in the
   accent colour; main.js adds .is-lit when it scrolls into view, and the fill
   wipes across from the left while the text flips to reversed-out white.
   The heading's margin-top was stripped, so spacing lives on the rail instead. */
.rail--head {
  display: inline-block; margin-bottom: 0.9em;
  padding: 0.36em 0.9em; border-radius: 100px;
  border: 1.5px solid currentColor;
  text-transform: uppercase; letter-spacing: 0.1em; font-size: var(--fs-xs);
  background-image: linear-gradient(var(--lime), var(--lime));
  background-repeat: no-repeat; background-size: 0% 100%;
  transition: background-size 0.55s var(--ease), color 0.4s var(--ease) 0.1s,
              border-color 0.45s var(--ease);
}
.rail--head.is-lit { background-size: 100% 100%; color: var(--on-accent); border-color: var(--lime); }

/* on the dark bands the fill is the light accent, so the text reverses to ink */
.section--band .rail--head { background-image: linear-gradient(var(--accent-light), var(--accent-light)); }
.section--band .rail--head.is-lit { color: var(--ink); border-color: var(--accent-light); }

@media (prefers-reduced-motion: reduce) { .rail--head { transition: none; } }

/* 22. AI MODEL CANVAS: controls live inside the canvas ===================== */
.lab-canvas .lab-controls {
  position: absolute; z-index: 9; top: 16px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.6em;
  margin: 0; max-width: calc(100% - 24px);
}
.lab-controls__row {
  display: flex; flex-wrap: wrap; gap: 0.6em; justify-content: center;
  background: color-mix(in srgb, var(--paper-2) 94%, transparent);
  border: 1.5px solid var(--ink); border-radius: 100px;
  padding: 0.45em; box-shadow: 0 10px 26px rgba(25, 22, 34, 0.16);
}
.lab-canvas .lab-hint {
  background: color-mix(in srgb, var(--paper-2) 92%, transparent);
  border-radius: 100px; padding: 0.3em 0.9em; text-align: center;
}
/* make it unmissable that this is the button to press */
.lab-cta { position: relative; }
.lab-cta::after {
  content: ""; position: absolute; inset: -5px; border-radius: 100px;
  border: 2px solid var(--lime); pointer-events: none;
  animation: labPulse 2.4s var(--ease) infinite;
}
.lab-canvas.structured .lab-cta::after { display: none; }
@keyframes labPulse {
  0%   { transform: scale(1);    opacity: 0.7; }
  70%  { transform: scale(1.16); opacity: 0; }
  100% { transform: scale(1.16); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .lab-cta::after { animation: none; opacity: 0.7; } }
