:root {
  /* fixed brand colours: the same in both themes */
  --paper: #F6F5F2;
  --ink: #0A0A0B;
  --navy: #0B1E5B;
  --blue: #1F6FFF;
  --ink-2: #141416;
  --line-dark: rgba(246, 245, 242, 0.10);
  --muted-dark: rgba(246, 245, 242, 0.62);
  --font: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: 16px;
  --header-h: 60px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --light-blue: #8DB6FF;
  --sky: #E6EEFF;
  /* Accent (Josh, palette option A, 10 Nov 2026; audit D18, 11 Nov): coral about 1 part in 100 of a
     screen, a little more red. It marks what AI named and where the reader is: the named business,
     the First choice badge, the step in play, a level's number, the after, Results 01. Never body
     text or main buttons; blue stays the main colour. tests/theme.spec.mjs measures the share.
     Warning and "Missing" states use --alert, a deeper red, so coral never reads as an error. */
  --coral: #F2503A;
  --apricot: #FF9F7F;
  --coral-ink: #A92F1D;
  --alert: #9E1B14;
}

/* Site theme (Josh, 10 Nov 2026): light for everyone, no switch. The dark tokens below are kept for
   later but nothing sets html[data-scheme="dark"], and the system setting is ignored.
   Palette: light blue and dark blue, white and black. Sections paint with these tokens, never with
   fixed ink or paper, so both themes come out of one stylesheet. --fg-rgb is a space separated
   triplet for rgb(var(--fg-rgb) / .5). The mini sites keep their own branding and ignore these.
     --bg / --bg-2      page ground / a raised band with a hint of blue
     --fg / --fg-2 / --fg-3   text / muted text / faint text
     --line / --line-2  hairlines / stronger hairlines
     --accent-ink       blue for small text, thin lines and icons on this ground
     --wash / --glow    light blue fill behind an active item / the soft pool of light
     --stage            the dark blue (or light blue) stage that holds a deliverable
     --lift             the shadow under a card lifted off the ground */
:root[data-scheme="dark"] {
  color-scheme: dark;
  --bg: #0A0A0B; --bg-rgb: 10 10 11;
  --bg-2: #0E121C;
  --fg: #F6F7F9; --fg-rgb: 246 247 249;
  --fg-2: rgb(246 247 249 / .64);
  --fg-3: rgb(246 247 249 / .38);
  --line: rgb(246 247 249 / .10);
  --line-2: rgb(246 247 249 / .22);
  --accent-ink: #8DB6FF;
  --wash: rgb(31 111 255 / .16);
  --glow: rgb(31 111 255 / .20);
  --stage: linear-gradient(165deg, #121A2E 0%, #0B0F19 55%, #0A0A0B 100%);
  --lift: 0 40px 80px -34px rgb(0 0 0 / .8), 0 0 0 1px rgb(255 255 255 / .06);
}
:root, :root[data-scheme="light"] {
  color-scheme: light;
  --bg: #FFFFFF; --bg-rgb: 255 255 255;
  --bg-2: #F2F6FE;
  --fg: #0A0A0B; --fg-rgb: 10 10 11;
  --fg-2: rgb(10 10 11 / .64);
  --fg-3: rgb(10 10 11 / .42);
  --line: rgb(11 30 91 / .11);
  --line-2: rgb(11 30 91 / .22);
  --accent-ink: #1550C7;
  --wash: rgb(31 111 255 / .10);
  --glow: rgb(31 111 255 / .13);
  --stage: linear-gradient(165deg, #E4EDFF 0%, #EFF4FF 55%, #F8FAFF 100%);
  --lift: 0 34px 70px -34px rgb(11 30 91 / .34), 0 0 0 1px rgb(11 30 91 / .08);
}
@media (min-width: 820px) { :root { --gutter: 40px; --header-h: 72px; } }

/* Never scroll-behavior: smooth. Horizontal clip lives on html, not body. */
/* No browser scroll anchoring (audit D22): when the levels scene grows above the reader, js/levels.js
   replan() moves the page by the growth itself. Chrome's anchoring would move it a second time, and
   Safari has none, so one owner keeps both browsers the same. */
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; overflow-anchor: none; }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.skip {
  position: fixed; left: var(--gutter); top: 8px; z-index: 50;
  padding: 8px 14px; border-radius: 999px; background: var(--paper); color: var(--ink);
  transform: translateY(-160%); text-decoration: none; font-size: .875rem;
}
.skip:focus-visible { transform: none; }

/* Header: light text over the dark opening, ink text once the paper sections take over. */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 var(--gutter);
  color: var(--paper);
  transition: color .3s var(--ease), background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header[data-scrolled="true"][data-theme="dark"] {
  background: rgba(10, 10, 11, .78);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(246, 245, 242, .06);
}
.site-header[data-theme="light"] {
  color: var(--ink);
  background: rgb(255 255 255 / .86);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(10, 10, 11, .08);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 600; letter-spacing: -0.015em; font-size: 1.0625rem; justify-self: start; }
.brand-mark { width: 26px; height: auto; }
.brand-mark--light { display: none; }
.site-header[data-theme="light"] .brand-mark--dark { display: none; }
.site-header[data-theme="light"] .brand-mark--light { display: block; }
.site-nav { display: flex; gap: 6px; padding: 5px; border-radius: 999px; border: 1px solid var(--line-dark); background: rgba(246, 245, 242, .03); }
.site-header[data-theme="light"] .site-nav { border-color: rgba(10, 10, 11, .1); background: rgba(10, 10, 11, .02); }
.site-nav a { font-size: .875rem; text-decoration: none; padding: 7px 14px; border-radius: 999px; opacity: .78; transition: opacity .2s, background-color .2s; }
.site-nav a:hover { opacity: 1; background: rgba(246, 245, 242, .08); }
.site-header[data-theme="light"] .site-nav a:hover { background: rgba(10, 10, 11, .06); }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 18px; }
.header-contact { font-size: .875rem; text-decoration: none; opacity: .78; transition: opacity .3s var(--ease), visibility .3s; }
.header-contact:hover { opacity: 1; }
/* the header's WhatsApp and Email us stand in for the floating pair while it is away, so both are
   always one tap away and never on screen twice (js/main.js sets data-pills) */
:root[data-pills="false"] .header-contact { opacity: 0; visibility: hidden; pointer-events: none; }

/* Buttons. The primary one is magnetic (js/magnetic.js) on fine pointers. */
.btn {
  --bg: var(--paper); --fg: var(--ink);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0;
  background: var(--bg); color: var(--fg); text-decoration: none; cursor: pointer;
  font-weight: 600; font-size: .9375rem; letter-spacing: -0.005em; white-space: nowrap;
  overflow: hidden; isolation: isolate;
  transition: transform .5s var(--ease), box-shadow .3s var(--ease);
}
/* origin aware fill: a blue disc grows from where the pointer entered */
.btn--primary::before {
  content: ''; position: absolute; z-index: -1; left: var(--fx, 50%); top: var(--fy, 50%);
  width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--blue);
  transform: scale(0); transition: transform .55s var(--ease);
}
.btn--primary:hover::before, .btn--primary:focus-visible::before { transform: scale(60); }
.btn--primary:hover, .btn--primary:focus-visible { color: #fff; }
.btn--primary { transition: transform .5s var(--ease), color .3s var(--ease); }
.btn--primary svg { transition: transform .35s var(--ease); }
.btn--primary:hover svg { transform: translateX(3px); }
.btn--ghost { --bg: transparent; --fg: currentColor; box-shadow: inset 0 0 0 1px rgb(var(--fg-rgb) / .22); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px rgb(var(--fg-rgb) / .5); }
/* light theme: the primary button is ink on the white ground (sections may still set their own) */
:where(:root[data-scheme="light"]) .btn--primary { --bg: var(--ink); --fg: #fff; }
.btn--sm { min-height: 38px; padding: 0 16px; font-size: .8125rem; }
.site-header[data-theme="light"] .btn--primary { --bg: var(--ink); --fg: var(--paper); }

/* Contact pair: WhatsApp beside Email us, fixed bottom right on every screen. One light tray holds
   both, in the family of the mini sites' WhatsApp and Call bar: the main route filled, the other plain. */
.contact-pills {
  position: fixed; right: var(--gutter); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 30;
  display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px;
  background: rgb(255 255 255 / .86); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 0 0 1px rgb(11 30 91 / .10), 0 18px 40px -18px rgb(11 30 91 / .42), 0 2px 6px -2px rgb(11 30 91 / .14);
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.contact-pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 14px;
  border-radius: 999px; color: #0A0A0B; text-decoration: none; white-space: nowrap;
  font-size: .875rem; font-weight: 600; letter-spacing: -0.005em;
  transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.contact-pill[hidden] { display: none; }
.contact-pill svg { flex: none; width: 18px; height: 18px; }
.contact-pill--wa { background: #0A0A0B; color: #fff; box-shadow: inset 0 1px 0 rgb(255 255 255 / .14); }
.contact-pill--wa:hover, .contact-pill--wa:focus-visible { background: var(--blue); }
.contact-pill--mail:hover, .contact-pill--mail:focus-visible { background: rgb(31 111 255 / .10); color: #1550C7; }
.contact-pill:active { transform: scale(.97); }
/* The close shows WhatsApp and email itself, so the pair slides away there instead of covering the footer. */
.contact-pills[data-tucked="true"] { transform: translateY(calc(100% + 40px)); }
@media (max-width: 819.98px) {
  .contact-pills { bottom: calc(12px + env(safe-area-inset-bottom)); }
}

#orbit-dot {
  position: fixed; left: 0; top: 0; z-index: 25; pointer-events: none;
  width: 14px; height: 14px; margin: -7px 0 0 -7px; overflow: visible;
  will-change: transform; transition: opacity .16s var(--ease);
}
#orbit-dot circle { fill: var(--paper); stroke: var(--blue); stroke-width: 3; }

main > section { min-height: 100svh; }
#meaning, #journey { min-height: 120svh; background: var(--paper); }

@media (max-width: 819.98px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-nav, .header-contact { display: none; }
  .brand { font-size: .9375rem; gap: 9px; white-space: nowrap; }
  .header-actions { gap: 8px; }
  .header-actions .btn--sm { padding: 0 13px; }

  /* Phones (Josh, 11 Nov 2026): a tab row under the logo and the button, always there: Websites
     (the levels menu, the same link the levels code binds) and Our work. The header is taller by
     the row (--header-h), so every section starts under it and nothing is covered. */
  :root { --header-h: 104px; }
  :root .site-header { grid-template-rows: 60px 44px; row-gap: 0; align-items: center; }
  .site-header .site-nav {
    grid-column: 1 / -1; grid-row: 2; display: flex; align-self: stretch; justify-content: center; gap: 4px;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); border: 0; border-radius: 0; background: none;
    border-top: 1px solid rgb(10 10 11 / .07); background: rgb(255 255 255 / .9);
  }
  .site-header .site-nav a[href], .site-header .site-nav a.nav-websites[href] {
    display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 0; height: 44px; width: auto;
    padding: 0 12px; border: 0; border-radius: 0; font-size: .9375rem; font-weight: 500; opacity: .72;
  }
  .site-header .site-nav a.nav-websites[href] { order: -1; font-weight: 600; opacity: 1; }
  .site-header .site-nav a[href="#journey"][href] { display: none; }
  .site-header .site-nav .nav-websites-ico { display: none; }
  .site-header .site-nav .nav-websites-t { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .site-header .site-nav a:hover { background: none; opacity: 1; }
  .site-header .site-nav a[aria-expanded="true"] { color: var(--blue); }
}
/* short phones: the logo row a little lower, so the opening still fits its first screen */
@media (max-width: 819.98px) and (max-height: 720px) {
  :root { --header-h: 96px; }
  :root .site-header { grid-template-rows: 52px 44px; }
}
