/* ─────────────────────────────────────────────
   NinjaSource base styles: tokens, type scale, layout, header,
   footer and the components shared by every page.
   Identity from the brandbook draft (Oct 2026): Onest for everything,
   no italics, violet as the hero colour, black and white backgrounds,
   blue, mint and grey as complements.
   ───────────────────────────────────────────── */

/* ── Fonts ────────────────────────────────────────
   Self-hosted woff2, latin subset (SIL Open Font License).
   Onest is variable (100 to 900) and preloaded in src/layout.html.
   The metric-matched Arial fallback keeps text close to its final
   size while Onest swaps in. JetBrains Mono is only for code samples.
   Material Symbols is declared per page by BaseLayout (@ns/web-ui), with
   a subset of that page's icons (pnpm icons, scripts/update-icon-font.mjs). */
@font-face {
  font-family: 'Onest'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/onest-latin-wght.woff2) format('woff2');
}
@font-face {
  font-family: 'Onest Fallback';
  src: local('Arial'), local('ArialMT'), local('Arimo');
  size-adjust: 103%; ascent-override: 97%; descent-override: 25%; line-gap-override: 0%;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-latin.woff2) format('woff2');
}

:root {
  /* Colours (--paper, --purple, --text, --muted, --faint, --wp/--hs/--care and their
     soft tints...) come from @ns/brand-tokens (brands/ninjasource.cjs, `web`), written
     on :root by the layout before this file. Contrast notes live there. */
  --line: rgba(0, 0, 0, .1);
  --line-2: rgba(0, 0, 0, .22);

  --on-dark: rgba(255, 255, 255, .94);
  --on-dark-muted: rgba(255, 255, 255, .72);
  --on-dark-line: rgba(255, 255, 255, .16);

  /* Type scale */
  --fs-h1: clamp(2.4rem, 4.4vw, 3.75rem);
  --fs-h2: clamp(1.8rem, 3vw, 2.6rem);
  --fs-h3: 1.2rem;
  --fs-lead: 1.15rem;
  --fs-body: 1rem;
  --fs-small: .9rem;

  --r: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: 'Onest', 'Onest Fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: var(--font);
  --dw: 650;       /* display weight */
  --dt: -.03em;    /* display tracking */

  /* Small UI labels (step numbers, tags) use Onest too; only code samples are monospaced */
  --mono: var(--font);
  --code: 'JetBrains Mono', ui-monospace, monospace;
}

/* ── Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; font-size: 17px; }
body { margin: 0; overflow-x: hidden; font: 400 var(--fs-body)/1.6 var(--font); color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; }
/* No italics anywhere in the identity */
em, i, cite, dfn, var, address { font-style: normal; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
main:focus { outline: none; }

h1, h2 { font-family: var(--display); font-weight: var(--dw); letter-spacing: var(--dt); line-height: 1.04; text-wrap: balance; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); line-height: 1.08; }
h3 { font-size: var(--fs-h3); font-weight: 650; letter-spacing: -.01em; line-height: 1.3; }
p { text-wrap: pretty; }

.label { font-weight: 700; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.label-purple { color: var(--purple); }
.label-lav { color: var(--lav); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.ms {
  font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal;
  font-size: 1.2em; line-height: 1; letter-spacing: normal; text-transform: none;
  display: inline-block; width: 1em; white-space: nowrap; direction: ltr; flex: none; /* fixed box: no shift while the icon font loads */
  -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; user-select: none;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-wp { background: var(--wp); }
.dot-hs { background: var(--hs); }
.dot-care { background: var(--care); }
/* Webflow has no colour of its own in the palette: black dot, grey surface. */
.dot-wf { background: var(--ink); }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 700px) { .wrap { padding: 0 16px; } }

.skip-link { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 12px 18px; background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 4px; }
.sec-ink :focus-visible, .final :focus-visible, .foot :focus-visible, .overlay :focus-visible, .plan-pop :focus-visible, .lane-run :focus-visible { outline-color: var(--lav); }
/* Ink pills that can sit over dark or light surfaces: a light ring hugging the pill keeps 3:1 against it either way */
.skip-link:focus-visible, .float-cta:focus-visible { outline-color: var(--lav); outline-offset: 0; }

/* ── Buttons ──────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border: 1.5px solid var(--ink); border-radius: 999px;
  font: 600 .98rem/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn .ms { font-size: 19px; transition: transform .25s var(--ease); }
.btn:hover .ms { transform: translateX(3px); }
.btn:active { transform: scale(.98); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: .93rem; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--purple); border-color: var(--purple); }
.btn-purple { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn-purple:hover { background: var(--purple-600); border-color: var(--purple-600); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-line:hover { border-color: var(--ink); }
.btn-paper { background: #fff; color: #000; border-color: #fff; }
.btn-paper:hover { background: var(--lav); border-color: var(--lav); }

/* ── Header ───────────────────────────────────── */
.head { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.head-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; text-decoration: none; color: var(--ink); }
/* Text wordmark only, until the logo is final */
.brand-word { font-weight: 700; font-size: 1.15rem; letter-spacing: -.035em; }
.menu { display: flex; gap: 2px; }
.menu a { position: relative; padding: 8px 14px; font-weight: 500; font-size: .95rem; color: var(--muted); text-decoration: none; transition: color .2s; }
.menu a:hover, .menu a.is-current { color: var(--ink); }
.menu a.is-current::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--purple); }
.head-cta { justify-self: end; }

.menu-btn { display: none; justify-self: end; align-items: center; gap: 12px; height: 44px; padding: 0 4px; border: 0; background: none; cursor: pointer; color: var(--ink); font: 600 .95rem var(--font); }
.menu-btn-lines { position: relative; width: 22px; height: 12px; }
.menu-btn-lines i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease); }
.menu-btn-lines i:first-child { top: 1px; }
.menu-btn-lines i:last-child { top: 9px; }
.menu-btn[aria-expanded="true"] .menu-btn-lines i:first-child { top: 5px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn-lines i:last-child { top: 5px; transform: rotate(-45deg); }
@media (max-width: 900px) {
  .head-in { grid-template-columns: 1fr auto; height: 64px; }
  .menu, .head-cta { display: none; }
  .menu-btn { display: inline-flex; }
}

.overlay { position: fixed; inset: 64px 0 0; z-index: 49; display: flex; flex-direction: column; justify-content: space-between; padding: 16px 16px 32px; background: var(--ink); color: #fff; overflow-y: auto; }
.overlay[hidden] { display: none; }
.overlay.is-open { animation: fade .3s var(--ease); }
.overlay-nav a { display: block; padding: 16px 0; border-bottom: 1px solid var(--on-dark-line); font-weight: 650; font-size: 1.9rem; letter-spacing: -.03em; color: #fff; text-decoration: none; }
.overlay-foot { display: flex; flex-direction: column; gap: 18px; margin-top: 40px; }
.overlay-mail { color: var(--on-dark-muted); text-underline-offset: 4px; }
@keyframes fade { from { opacity: 0; transform: translateY(-6px); } }

/* ── Hero ─────────────────────────────────────── */
.hero { padding: 72px 0 88px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 12fr); gap: 56px; align-items: center; }
.hero h1 { margin-top: 18px; }
.lead { max-width: 44ch; margin-top: 22px; font-size: var(--fs-lead); line-height: 1.55; color: var(--muted); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.platforms { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--muted); }
.platforms li { display: inline-flex; align-items: center; gap: 8px; }

/* Showcase */
.show-frame { border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: var(--card); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .35); }
.show-bar { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.show-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.show-url { margin: 0 auto; padding: 3px 12px; border-radius: 6px; background: var(--paper); font: 400 .72rem var(--mono); color: var(--faint); transform: translateX(-18px); }
.show-stage { position: relative; aspect-ratio: 16 / 10.8; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s var(--ease), visibility .7s; }
.slide.is-on { opacity: 1; visibility: visible; }
.slide img { width: 100%; height: calc(100% - 52px); object-fit: cover; object-position: top; }
.slide figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; height: 52px; padding: 0 16px; border-top: 1px solid var(--line); font-size: var(--fs-small); }
.slide figcaption span { color: var(--faint); text-align: right; }
.show-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.show-dots { display: flex; gap: 6px; }
.show-dots button { width: 28px; height: 20px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.show-dots button::before { content: ''; position: absolute; left: 0; right: 0; top: 9px; height: 2px; border-radius: 2px; background: var(--line-2); transition: background .3s; }
.show-dots button[aria-current="true"]::before { background: var(--ink); }
.show-pause { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 50%; background: none; cursor: pointer; color: var(--ink); }
.show-pause .ms { font-size: 18px; }
@media (max-width: 960px) {
  .hero { padding: 48px 0 72px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
}
@media (max-width: 520px) {
  .hero-ctas .btn { flex: 1 1 100%; }
  .slide figcaption span { display: none; }
  .show-url { transform: none; }
}

/* ── Numbers ──────────────────────────────────── */
.numbers { border-block: 1px solid var(--line); background: var(--card); }
.numbers-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.numbers-row p { display: flex; align-items: baseline; gap: 12px; padding: 26px 24px 26px 0; }
.numbers-row p + p { padding-left: 24px; border-left: 1px solid var(--line); }
.numbers-row strong { font-weight: 700; font-size: 1.9rem; letter-spacing: -.03em; line-height: 1; }
.numbers-row span { font-size: var(--fs-small); color: var(--faint); line-height: 1.35; }
@media (max-width: 860px) {
  .numbers-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .numbers-row p:nth-child(3) { padding-left: 0; border-left: 0; }
  .numbers-row p:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 480px) { .numbers-row p { flex-direction: column; gap: 6px; } }

/* ── Sections ─────────────────────────────────── */
.sec { padding: 112px 0; }
.sec-alt { background: var(--paper-2); }
.sec-head { max-width: 720px; margin-bottom: 56px; }
.sec-head h2 { margin-top: 14px; }
.sec-head > p:not(.label) { max-width: 56ch; margin-top: 18px; font-size: var(--fs-lead); color: var(--muted); }
.sec-head-row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: end; max-width: none; }
.sec-head-row > p { margin-top: 0 !important; font-size: var(--fs-body) !important; }
@media (max-width: 860px) { .sec-head-row { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
@media (max-width: 700px) { .sec { padding: 80px 0; } .sec-head { margin-bottom: 40px; } }

/* Services lanes */
.lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; background: var(--card); }
.lane { display: flex; flex-direction: column; padding: 32px 30px 28px; }
.lane + .lane { border-left: 1px solid var(--line); }
.lane-run { background: var(--ink); color: #fff; }
.lane-tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.lane-run .lane-tag { color: var(--on-dark-muted); }
.lane h3 { margin-top: 18px; font-weight: 650; font-size: 1.6rem; letter-spacing: -.03em; }
.lane-head p { margin-top: 8px; color: var(--muted); }
.lane-run .lane-head p { color: var(--on-dark-muted); }
.lane-list { margin: 26px 0 30px; border-top: 1px solid var(--line); }
.lane-run .lane-list { border-color: var(--on-dark-line); }
.lane-list li { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .96rem; }
.lane-run .lane-list li { border-color: var(--on-dark-line); color: var(--on-dark); }
.lane-link { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font-weight: 600; font-size: .95rem; color: var(--purple); text-decoration: none; }
.lane-run .lane-link { color: var(--lav); }
.lane-link .ms { font-size: 18px; transition: transform .25s var(--ease); }
.lane-link:hover .ms { transform: translateX(4px); }
@media (max-width: 960px) {
  .lanes { grid-template-columns: minmax(0, 1fr); }
  .lane + .lane { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 480px) { .lane { padding: 26px 20px 24px; } }

/* Why agencies switch */
.why { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; }
.why-head h2 { margin-top: 14px; }
.why-head p:not(.label) { margin-top: 18px; color: var(--muted); max-width: 40ch; }
.why-list { border-top: 1px solid var(--line-2); }
.why-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.why-row dt { font-weight: 650; }
.why-row dd { color: var(--muted); }
.why-row:not(.why-us) dt { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--line-2); text-decoration-thickness: 1.5px; }
.why-us { margin-top: 18px; padding: 24px; border: 0; border-radius: 12px; background: var(--purple); color: #fff; }
.why-us dd { color: #fff; }
@media (max-width: 900px) { .why { grid-template-columns: minmax(0, 1fr); gap: 36px; } }
@media (max-width: 520px) { .why-row { grid-template-columns: minmax(0, 1fr); gap: 6px; } }

/* Work index */
.work { position: relative; }
.work-list { border-top: 1px solid var(--line-2); counter-reset: w; }
.work-list a, .work-row {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) minmax(0, 5fr) minmax(0, 2fr); gap: 24px; align-items: center;
  padding: 26px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text);
  transition: padding .35s var(--ease), color .2s;
}
.work-list a:hover, .work-row:hover { padding-left: 14px; }
.w-name { font-weight: 650; font-size: 1.5rem; letter-spacing: -.03em; line-height: 1.1; }
.w-sector { font-size: var(--fs-small); color: var(--faint); }
.w-note { color: var(--muted); }
.w-plat { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: var(--fs-small); font-weight: 600; }
.more-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 28px; font-weight: 600; color: var(--purple); text-decoration: none; }
.more-link .ms { font-size: 18px; transition: transform .25s var(--ease); }
.more-link:hover .ms { transform: translateX(4px); }
@media (max-width: 860px) {
  .work-list a, .work-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; }
  .w-name { grid-column: 1; }
  .w-plat { grid-column: 2; grid-row: 1; }
  .w-sector { display: none; }
  .w-note { grid-column: 1 / -1; font-size: .95rem; }
  .work-peek { display: none; }
}

/* Principles on ink */
.sec-ink { position: relative; overflow: hidden; isolation: isolate; background: var(--ink); color: #fff; }
.sec-ink::before {
  content: ''; position: absolute; z-index: -1; width: 640px; height: 640px; left: -220px; top: -260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 74, 255, .45) 0%, rgba(109, 74, 255, 0) 70%);
}
.principles { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 80px; align-items: start; }
.quote p { font-weight: 600; font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -.025em; line-height: 1.2; }
.quote footer { margin-top: 22px; font-weight: 650; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--lav); }
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 40px; }
.rules li { padding-top: 18px; border-top: 1px solid var(--on-dark-line); }
.rules h3 { font-size: 1.05rem; }
.rules p { margin-top: 8px; font-size: .95rem; color: var(--on-dark-muted); }
@media (max-width: 900px) { .principles { grid-template-columns: minmax(0, 1fr); gap: 56px; } }
@media (max-width: 520px) { .rules { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

/* Ways to work together */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 30px 28px 28px; border: 1px solid var(--line-2); border-radius: 24px; background: var(--card); }
.plan-pop { background: var(--ink); border-color: var(--ink); color: #fff; }
.plan-kind { display: inline-flex; align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--paper-2); font-weight: 650; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.plan-pop .plan-kind { background: var(--lav); color: #000; }
.plan h3 { margin-top: 20px; font-size: 1.3rem; }
.plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.plan-price strong { font-weight: 650; font-size: 2.3rem; letter-spacing: -.035em; line-height: 1; }
.plan-price > span { font-size: var(--fs-small); color: var(--faint); }
.plan-pop .plan-price > span { color: var(--on-dark-muted); }
.plan-for { margin-top: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .96rem; }
.plan-pop .plan-for { color: var(--on-dark-muted); border-color: var(--on-dark-line); }
.ticks { display: grid; gap: 10px; margin: 20px 0 28px; font-size: .95rem; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .ms { font-size: 18px; margin-top: 2px; color: var(--purple); font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 20; }
.plan-pop .ticks .ms { color: var(--lav); }
.plan .btn { margin-top: auto; }
.plan-pop .btn-paper:hover { background: var(--lav); border-color: var(--lav); }
.plans-note { margin-top: 28px; color: var(--faint); font-size: var(--fs-small); }
.plans-note a { color: var(--purple); font-weight: 600; text-underline-offset: 3px; }
@media (max-width: 960px) { .plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; } }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.steps li { padding: 26px 24px 28px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.step-n { font: 500 .8rem var(--mono); color: var(--purple); }
.steps h3 { margin: 30px 0 8px; font-size: 1.3rem; letter-spacing: -.02em; }
.steps p { font-size: .95rem; color: var(--muted); }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: minmax(0, 1fr); } .steps h3 { margin-top: 14px; } }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; }
.faq-grid h2 { margin-top: 14px; }
.faq-aside { margin-top: 18px; color: var(--muted); }
.faq-aside a { color: var(--purple); font-weight: 600; text-underline-offset: 3px; }
.faq { border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; cursor: pointer; list-style: none; font-weight: 600; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ms { font-size: 22px; color: var(--purple); transition: transform .3s var(--ease); }
.faq details[open] summary .ms { transform: rotate(45deg); }
.faq details p { max-width: 60ch; padding: 0 40px 24px 0; color: var(--muted); }
.faq details[open] p { animation: fade .3s var(--ease); }
@media (max-width: 900px) { .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

/* Final CTA */
.final { position: relative; overflow: hidden; isolation: isolate; padding: 96px 0; background: #000; color: #fff; }
/* Brandbook gradient from the lower left, and one mint pill as the geometric accent.
   The gradient stays below the text block, so the mint label sits on black. */
.final::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(70% 120% at 0% 100%, rgba(109, 74, 255, .9) 0%, rgba(109, 74, 255, 0) 70%),
    radial-gradient(50% 90% at 45% 120%, rgba(20, 47, 247, .7) 0%, rgba(20, 47, 247, 0) 70%);
}
.final::after {
  content: ''; position: absolute; z-index: -1; right: 6%; top: -90px; width: 180px; height: 360px; border-radius: 999px;
  background: var(--lav); transform: rotate(-45deg);
}
.final .label-lav { color: var(--lav); }
@media (max-width: 720px) { .final::after { width: 110px; height: 220px; top: -70px; right: -10px; } }
.final-in { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 56px; align-items: end; }
.final h2 { margin-top: 16px; max-width: 24ch; font-size: clamp(1.7rem, 3vw, 2.5rem); }
.final-ctas { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.final-mail { color: #fff; text-underline-offset: 4px; }
@media (max-width: 860px) { .final-in { grid-template-columns: minmax(0, 1fr); gap: 32px; } .final { padding: 72px 0; } }

/* Footer */
.foot { padding: 64px 0 28px; background: var(--ink); color: var(--on-dark-muted); font-size: .93rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); gap: 40px; }
@media (max-width: 1100px) { .foot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .foot-grid > div:first-child { grid-column: 1 / -1; } }
.brand-light { color: #fff; }
.foot-tag { margin-top: 16px; max-width: 28ch; }
.foot-h { margin-bottom: 12px; font-weight: 650; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--lav); }
.foot-col a { display: block; padding: 4px 0; color: var(--on-dark-muted); text-decoration: none; }
.foot-col a:hover { color: #fff; }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--on-dark-line); font-size: .85rem; }
.foot-bottom a { margin-left: 18px; color: inherit; }
.foot-bottom a:first-child { margin-left: 0; }
/* The trademark note gets the room for two balanced lines on desktop (its width is in pages.css) */
.foot-bottom > div { flex: 1 1 30rem; min-width: 0; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-grid > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 420px) { .foot-col:last-child { grid-column: 1 / -1; } }

/* ── Interactions ported from v5 ─────────────── */

/* Rotating verb under the hero heading */
.rot-line { margin-top: 14px; font-weight: 600; font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: -.025em; line-height: 1.2; color: var(--faint); }
.rot {
  position: relative; display: inline-block; vertical-align: bottom; height: 1.35em; margin-right: .1em; padding: 0 .3em;
  border-radius: 8px; background: var(--purple); color: #fff; overflow: hidden; transition: width .6s var(--ease);
}
.rot-word { display: block; white-space: nowrap; line-height: 1.35; }
.js .rot-word { position: absolute; left: .3em; top: 0; transform: translateY(105%); opacity: 0; transition: transform .7s var(--ease), opacity .5s; }
.js .rot-word.is-on { transform: none; opacity: 1; }
.js .rot-word.is-out { transform: translateY(-105%); opacity: 0; }

/* Cards lift on hover */
.lane, .plan, .steps li { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.plan:hover, .steps li:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -24px rgba(0, 0, 0, .35); }
.lane:hover { box-shadow: inset 0 3px 0 var(--purple); }
.lane-run:hover { box-shadow: inset 0 3px 0 var(--lav); }

/* White label scroll story */
.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 88px; align-items: start; }
.story-stage { position: sticky; top: max(104px, calc(50vh - 280px)); }
.stage { position: relative; max-width: 500px; }
.stage-cap { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 30px; padding: 6px 16px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid var(--on-dark-line); font-size: .9rem; font-weight: 600; }
.stage-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--lav); color: var(--ink); font: 500 .72rem var(--mono); }
.hl { transition: transform .45s var(--ease), box-shadow .45s var(--ease), outline-color .3s, background .3s, color .3s; outline: 2px solid transparent; outline-offset: 4px; }
.doc {
  position: absolute; z-index: 3; right: -16px; top: 56px; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: #fff; color: var(--ink); border-radius: 12px; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .5);
  font-size: .82rem; line-height: 1.3; transform: rotate(3deg);
}
.doc > .ms:first-child { font-size: 22px; color: var(--purple); }
.doc strong { display: block; font-weight: 600; }
.doc em { display: block; font-style: normal; color: var(--faint); font-size: .76rem; }
.doc-ok { font-size: 20px; color: var(--care); font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20; }
.chat { display: grid; gap: 28px; padding-top: 14px; }
.msg { position: relative; width: 86%; padding: 18px 20px; background: #fff; color: var(--ink); border-radius: 16px; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6); }
.msg-you { margin-left: auto; }
.msg-us { margin-left: 5%; }
.msg-top { display: flex; align-items: center; gap: 11px; }
.msg-top strong { display: block; font-size: .95rem; line-height: 1.25; }
.msg-top p span { display: block; font-size: .76rem; color: var(--faint); }
.av { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-weight: 750; font-size: .82rem; flex: none; }
.av-c { background: var(--lav); color: var(--ink); }
.av-y { background: var(--ink); color: #fff; }
.av-u { background: var(--purple); color: #fff; }
.msg-b { margin-top: 12px; font-size: .97rem; line-height: 1.45; }
.msg-foot { display: flex; justify-content: space-between; gap: 10px; margin: 16px -8px -6px; padding: 9px 8px; border-top: 1px dashed var(--line-2); border-radius: 8px; font: 400 .74rem var(--mono); color: var(--faint); }
.tag { position: absolute; top: -14px; left: -10px; z-index: 2; padding: 4px 10px 5px; border-radius: 7px; font-weight: 700; font-size: .76rem; transform: rotate(-6deg); }
.tag-client { background: var(--lav); color: var(--ink); }
.tag-you { left: auto; right: -10px; background: var(--paper); color: var(--ink); transform: rotate(5deg); }
.tag-us { background: var(--purple); color: #fff; transform: rotate(-4deg); }
.story[data-step="0"] .hl-0 { transform: rotate(0deg) scale(1.05); outline-color: var(--lav); }
.story[data-step="1"] .hl-1, .story[data-step="2"] .hl-2 { transform: translateY(-6px); outline-color: var(--lav); }
.story[data-step="3"] .hl-3 { background: var(--lav); color: var(--ink); }
.sstep { display: flex; flex-direction: column; justify-content: center; min-height: 0; padding: 26px 0; border-top: 1px solid var(--on-dark-line); }
.sstep:last-child { border-bottom: 1px solid var(--on-dark-line); }
.sstep-i { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--on-dark-line); color: var(--on-dark-muted); transition: background .35s, color .35s, border-color .35s; }
.sstep-i .ms { font-size: 22px; }
.sstep h3 { margin-top: 20px; font-size: clamp(1.25rem, 2vw, 1.55rem); letter-spacing: -.025em; color: var(--on-dark-muted); transition: color .4s; }
.sstep p { margin-top: 10px; max-width: 42ch; color: rgba(255, 255, 255, .6); transition: color .4s; }
.sstep.is-active .sstep-i { background: var(--lav); border-color: var(--lav); color: var(--ink); }
.sstep.is-active h3 { color: #fff; }
.sstep.is-active p { color: rgba(255, 255, 255, .85); }
@media (max-width: 980px) {
  .story { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .story-stage { position: static; }
  .sstep { min-height: 0; padding: 28px 0; }
  .sstep h3 { color: #fff; }
  .sstep p { color: var(--on-dark-muted); }
}
@media (max-width: 480px) { .doc { right: -4px; } .msg { width: 94%; } .msg-us { margin-left: 0; } }

/* Principles move to purple so two dark sections don't touch */
.sec-purple { position: relative; overflow: hidden; isolation: isolate; background: var(--purple); color: #fff; }
/* A blue circle sinking into the corner; text on violet stays solid white (5.2:1) */
.sec-purple::after {
  content: ''; position: absolute; z-index: -1; right: -200px; bottom: -280px; width: 440px; height: 440px; border-radius: 50%;
  background: var(--blue);
}
.sec-purple .rules li { border-color: rgba(255, 255, 255, .4); }
.sec-purple .rules p { color: #fff; }
.sec-purple .quote footer, .sec-purple .label { color: #fff; }
.sec-purple :focus-visible { outline-color: #fff; }

/* Floating Book a call pill */
.float-cta {
  position: fixed; right: 22px; bottom: 22px; z-index: 40; display: inline-flex; align-items: center; gap: 9px;
  min-height: 52px; padding: 0 22px 0 18px; border-radius: 999px; background: var(--ink); color: #fff;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .12) inset;
  font-weight: 600; font-size: .92rem; text-decoration: none;
  opacity: 0; visibility: hidden; transform: translateY(20px);
  transition: opacity .3s, transform .45s var(--ease), visibility 0s linear .45s, background .2s;
}
.float-cta .ms { font-size: 20px; color: var(--lav); font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20; }
.float-cta.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .45s var(--ease), visibility 0s, background .2s; animation: nudge 6s ease-in-out 1.5s 2; }
.float-cta:hover { background: var(--purple); }
@keyframes nudge { 0%, 88%, 100% { transform: none; } 92% { transform: translateY(-5px); } 96% { transform: translateY(0); } }
@media (max-width: 600px) { .float-cta { right: 12px; bottom: 12px; min-height: 46px; padding: 0 16px 0 13px; font-size: .85rem; } }

/* Analytics consent banner (only output when analytics is on, see src/site.json).
   A small card at the bottom, not a modal: the page stays usable behind it. */
.consent {
  position: fixed; left: 22px; bottom: 22px; z-index: 45; width: min(420px, calc(100% - 44px));
  padding: 18px 20px; border-radius: var(--r); background: var(--ink); color: var(--on-dark);
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .5), 0 0 0 1px var(--on-dark-line) inset;
  font-size: var(--fs-small); line-height: 1.5;
  animation: consent-in .35s var(--ease);
}
.consent[hidden] { display: none; }
.consent a { color: var(--on-dark); text-underline-offset: 3px; }
.consent a:hover { color: #fff; }
.consent :focus-visible { outline-color: var(--lav); }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
/* Accept and Decline share one style so neither is pushed */
.consent-btn { flex: 1 1 0; min-width: 0; background: transparent; color: var(--on-dark); border-color: var(--on-dark-muted); }
.consent-btn:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.consent-btn[hidden] { display: none; }
html.consent-open { scroll-padding-bottom: var(--consent-h, 0px); }
@keyframes consent-in { from { opacity: 0; transform: translateY(12px); } }
@media (max-width: 600px) {
  .consent { left: 12px; bottom: 12px; width: calc(100% - 24px); padding: 16px; }
  /* The banner takes the bottom edge; the floating CTA comes back once a choice is made */
  .consent-open .float-cta { visibility: hidden; }
}

/* "Cookie settings" reopens the banner: a button that looks like the links around it */
.foot-link, .link-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: inherit; cursor: pointer; }
.foot-link { margin-left: 18px; }
.foot-link:hover { color: #fff; }
.prose .link-btn { color: var(--purple); text-underline-offset: 3px; }

/* ── Colour layer ─────────────────────────────── */

/* Highlighter marks on key words */
.mark { position: relative; white-space: nowrap; z-index: 0; }
.mark::after {
  content: ''; position: absolute; z-index: -1; left: -.06em; right: -.06em; bottom: .06em; height: .36em;
  border-radius: 3px; background: #DDD4FF; transform-origin: left; transform: scaleX(0);
  transition: transform .9s var(--ease) .3s;
}
.mark-green::after { background: var(--care); }
.mark-orange::after { background: #D6DCFF; }
.js .is-in .mark::after, .hero .mark::after, .no-js .mark::after { transform: scaleX(1); }

/* Lanes: each platform gets its own tint */
.lanes { border: 0; background: none; gap: 16px; overflow: visible; }
.lane { border-radius: 24px; }
.lane + .lane { border-left: 0; }
.lane-wp { background: var(--wp-soft); }
.lane-hs { background: var(--hs-soft); }
.lane-wp .lane-list, .lane-wp .lane-list li { border-color: rgba(109, 74, 255, .2); }
.lane-hs .lane-list, .lane-hs .lane-list li { border-color: rgba(20, 47, 247, .18); }
.lane-wp .lane-link { color: var(--purple-600); }
.lane-hs .lane-link { color: var(--hs-ink); }
.lane-hs .lane-tag, .lane-wp .lane-tag { color: var(--text); }
.lane-run { background: var(--ink); }
.lane-run .lane-link { color: var(--lav); }
.lane-wp:hover { box-shadow: inset 0 4px 0 var(--wp); }
.lane-hs:hover { box-shadow: inset 0 4px 0 var(--hs); }
.lane-run:hover { box-shadow: inset 0 4px 0 var(--care); }
.lanes { display: grid; }
@media (max-width: 960px) { .lane + .lane { border-top: 0; } }

/* Platform pills in the work index */
.w-plat { padding: 5px 10px; border-radius: 999px; justify-self: end; }
.w-plat:has(.dot-wp) { background: var(--wp-soft); color: var(--purple-600); }
.w-plat:has(.dot-hs) { background: var(--hs-soft); color: var(--hs-ink); }
.work-list a:hover .w-name, .work-row:hover .w-name { color: var(--purple); }

/* Process numbers in colour */
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-weight: 600; }
.steps li:nth-child(1) .step-n { background: var(--wp-soft); color: var(--purple-600); }
.steps li:nth-child(2) .step-n { background: var(--hs-soft); color: var(--hs-ink); }
.steps li:nth-child(3) .step-n { background: var(--care); color: #000; }
.steps li:nth-child(4) .step-n { background: var(--ink); color: #fff; }
.steps li:nth-child(5) .step-n { background: var(--purple); color: #fff; }

/* Plans: coloured kind chips */
.plan:nth-child(1) .plan-kind { background: var(--hs-soft); color: var(--hs-ink); }
.plan:nth-child(3) .plan-kind { background: var(--care-soft); color: var(--care-ink); }

/* Facts inside the purple principles section */
.facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 24px; padding-top: 32px; border-top: 1px solid rgba(255, 255, 255, .25); }
.facts div + div { padding-left: 24px; border-left: 1px solid rgba(255, 255, 255, .2); }
.facts dt { font-weight: var(--dw); font-size: clamp(2rem, 3.6vw, 3rem); letter-spacing: var(--dt); line-height: 1; }
.facts dd { margin-top: 8px; color: rgba(255, 255, 255, .8); font-size: var(--fs-small); text-wrap: balance; }
@media (max-width: 760px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .facts div:nth-child(3) { padding-left: 0; border-left: 0; }
}

/* FAQ plus icon in a soft chip */
.faq summary .ms { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--wp-soft); font-size: 20px; }
.faq details[open] summary .ms { background: var(--purple); color: #fff; }

/* Why section: rows get a coloured marker */
.why-row:not(.why-us) dt { text-decoration-color: var(--hs); }

/* Placeholder notes left for the team before launch */
.placeholder-note { justify-self: end; padding: 8px 12px; border: 1.5px dashed var(--hs); border-radius: 8px; color: var(--hs-ink) !important; font-size: var(--fs-small) !important; font-weight: 600; }

/* Remote team */
.remote { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; }
.remote-copy h2 { margin-top: 14px; }
.remote-copy > p:not(.label) { margin-top: 18px; color: var(--muted); font-size: var(--fs-lead); max-width: 46ch; }
.clock { display: flex; align-items: center; gap: 14px; margin-top: 28px; padding: 14px 18px; border-radius: 14px; background: var(--ink); color: #fff; }
.clock-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: #3BD08A; box-shadow: 0 0 0 0 rgba(59, 208, 138, .6); animation: ping 2.2s 2; }
.clock.is-off .clock-dot { background: #F2B94B; animation: none; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(59, 208, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 208, 138, 0); } }
.clock-time { font-weight: 650; font-size: 1.15rem; letter-spacing: -.01em; }
.clock-state { font-size: .88rem; color: var(--on-dark-muted); }
.habits { display: grid; gap: 18px; margin-top: 30px; }
.habits li { display: flex; gap: 14px; align-items: flex-start; }
.habits .ms { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; font-size: 22px; }
.habits li:nth-child(1) .ms { background: var(--wp-soft); color: var(--purple); }
.habits li:nth-child(2) .ms { background: var(--hs-soft); color: var(--hs-ink); }
.habits li:nth-child(3) .ms { background: var(--care-soft); color: var(--care-ink); }
.habits strong { display: block; font-weight: 650; }
.habits span { color: var(--muted); font-size: .95rem; }

.mosaic { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: 150px 150px 150px 150px; gap: 14px; }
.mosaic figure { position: relative; overflow: hidden; border-radius: 18px; }
figure > picture { display: contents; } /* responsive <picture> wrappers keep the img sizing rules */
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.mosaic figure:hover img { transform: scale(1.05); }
.m1 { grid-column: 1 / 5; grid-row: 1 / 3; }
.m2 { grid-column: 5 / 7; grid-row: 1 / 3; }
.m3 { grid-column: 1 / 3; grid-row: 3 / 5; }
.m4 { grid-column: 3 / 5; grid-row: 3 / 5; }
.m5 { grid-column: 5 / 7; grid-row: 3 / 5; }
.m2 img { object-position: 40% center; }
.chip-float {
  position: absolute; left: 12px; bottom: 12px; right: 12px; display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100% - 24px);
  padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--ink);
  font-size: .78rem; font-weight: 600; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .4); animation: bob 5s ease-in-out 1;
}
.chip-float-b { animation-delay: -2.5s; }
@keyframes bob { 50% { transform: translateY(-4px); } }
@media (max-width: 960px) { .remote { grid-template-columns: minmax(0, 1fr); gap: 44px; } }
@media (max-width: 560px) {
  .mosaic { grid-template-rows: 120px 120px 120px; gap: 10px; }
  .m1 { grid-column: 1 / 7; grid-row: 1 / 3; }
  .m2 { grid-column: 1 / 4; grid-row: 3; }
  .m3 { display: none; }
  .m4 { grid-column: 4 / 7; grid-row: 3; }
  .m5 { display: none; }
  .m2 .chip-float { display: none; }
}

/* ── Motion ───────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Section intro on dark surfaces */
.sec-ink .sec-head > p:not(.label) { color: var(--on-dark-muted); }
@media (max-width: 600px) { .stage-cap { display: none; } .doc { top: 0; right: 0; } .chat { padding-top: 76px; } }
