/* ══════════════════════════════════════════════════════════════════
   4AM Global Media — one stylesheet for every page.

   Palette (owner):  #EBE9DF bone · #A9B887 sage · #2E3D28 forest
     forest on bone 9.3:1 · bone on forest 9.3:1 · forest on sage 5.3:1
   Text is only ever forest (on light) or bone/sage (on forest). The
   sketch colours (tomato, gold, sky) are decoration only, never text.

   Home: a fixed canvas scrubs a 3D film of an interface plant growing
   (frames from the Scrollhaus "Kelpware" direction) behind three story
   beats, then solid bone sections take over.
══════════════════════════════════════════════════════════════════ */

/* Self-hosted variable fonts (latin subset, SIL Open Font License). */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-display: swap; src: url(/fonts/bricolage-grotesque.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/figtree.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500 600; font-display: swap; src: url(/fonts/jetbrains-mono.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/caveat-600.woff2) format("woff2"); unicode-range: U+20-21, U+23, U+25-29, U+2B-3B, U+3F-5A, U+61-7A, U+2013-2014, U+2019, U+2190, U+2192-2193, U+2197; }  /* one weight, only the glyphs the notes use: 42 KB */

/* Local stand-ins scaled to the web fonts' width, so text barely moves when
   they swap in (Arial covers Windows/macOS/iOS, Roboto covers Android). */
@font-face { font-family: "Bricolage Fallback"; font-weight: 100 649; size-adjust: 85%; src: local("Arial"), local("ArialMT"), local("Arimo"), local("Liberation Sans"); }
@font-face { font-family: "Bricolage Fallback"; font-weight: 650 900; size-adjust: 85%; src: local("Arial Bold"), local("Arial-BoldMT"), local("Arimo Bold"), local("Liberation Sans Bold"); }
@font-face { font-family: "Bricolage Fallback Roboto"; font-weight: 100 649; size-adjust: 89%; src: local("Roboto"), local("Roboto-Regular"); }
@font-face { font-family: "Bricolage Fallback Roboto"; font-weight: 650 900; size-adjust: 89%; src: local("Roboto Bold"), local("Roboto-Bold"); }
@font-face { font-family: "Figtree Fallback"; font-weight: 100 649; size-adjust: 101%; src: local("Arial"), local("ArialMT"), local("Arimo"), local("Liberation Sans"); }
@font-face { font-family: "Figtree Fallback"; font-weight: 650 900; size-adjust: 96%; src: local("Arial Bold"), local("Arial-BoldMT"), local("Arimo Bold"), local("Liberation Sans Bold"); }

:root {
  /* night palette, matched to the hero video and the launch scene. Roles kept
     from the old light theme: --bone = page, --forest = text (and the few
     inverse chips), --sage = accent. */
  --bone: #061826;            /* page: the launch scene's night */
  --bone-2: #0C2233;          /* raised surfaces */
  --sage: #9FD0FF;            /* accent: the moon's glow (9.9:1 on the page) */
  --sage-soft: #12304A;       /* accent washed into night: chips, fills */
  --forest: #E8F0F8;          /* text (16.4:1 on the page) */
  --forest-2: #FFFFFF;
  --line: rgba(232,240,248,.12);
  --line-2: rgba(232,240,248,.26);
  --dline: rgba(232,240,248,.16);   /* hairline on raised night surfaces */
  --night-deep: #030F19;      /* footer */
  --muted: rgba(232,240,248,.72);
  --glass: linear-gradient(160deg, #13395C, #0B2338);  /* featured blocks */
  /* sketch inks — decoration only */
  --tomato: #E8604C; --gold: #E2A93B; --sky: #5BA7D9; --coral: #FF9A8B;
  --grad: linear-gradient(90deg, var(--sage), #F5BD4F, var(--coral), var(--sage));  /* night blue into sunrise gold */
  --grad-ink: var(--grad);
  --shadow: 0 24px 50px -30px rgba(0,0,0,.8);
  --display: "Bricolage Grotesque", "Bricolage Fallback", "Bricolage Fallback Roboto", system-ui, sans-serif;
  --body: "Figtree", "Figtree Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
  --pad: max(clamp(18px, 4vw, 64px), env(safe-area-inset-left, 0px));
  --ease: cubic-bezier(.2,.8,.2,1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: dark;
  background: var(--bone);
  scroll-padding-top: 88px;
  overflow-x: clip;
}
@media (prefers-reduced-motion: no-preference) { :root { scroll-behavior: smooth; } }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bone); color: var(--forest); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; -webkit-tap-highlight-color: transparent; overflow-x: clip; }
img, svg, canvas { display: block; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
p { margin: 0 0 1em; }
a { color: inherit; }
::selection { background: var(--forest); color: var(--bone); }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; border-radius: 8px; }
.dark :focus-visible, .scene :focus-visible, .foot :focus-visible, .cta-band :focus-visible { outline-color: var(--sage); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--forest); color: var(--bone); padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: calc(12px + env(safe-area-inset-top,0px)); }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--display); margin: 0; color: inherit; }
h1, h2 { text-wrap: balance; }
h1 { font-size: clamp(44px, 5.8vw, 98px); font-weight: 800; line-height: .92; letter-spacing: -.045em; }
h2 { font-size: clamp(38px, 5.2vw, 84px); font-weight: 800; line-height: .95; letter-spacing: -.04em; }
h3 { font-weight: 700; letter-spacing: -.02em; line-height: 1.12; }
.grad { background: var(--grad); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.solid .grad, .sp-hero h1 em { background-image: var(--grad-ink); }
@media (prefers-reduced-motion: no-preference) { .grad { animation: flow 6s linear infinite; } }
@keyframes flow { to { background-position: 300% 0; } }
.k { display: inline-flex; align-items: center; gap: 10px; margin: 0; font: 600 12px/1.2 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.k::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(159,208,255,.22); }
@media (prefers-reduced-motion: no-preference) { .k::before { animation: pulse 1.8s ease-in-out infinite; } }
@keyframes pulse { 50% { opacity: .35; transform: scale(.7); } }
.hand { font-family: var(--hand); font-weight: 600; }
.lede { font-size: clamp(17px, 1.35vw, 20px); line-height: 1.55; max-width: 34em; }

/* ---------- buttons ---------- */
.pill { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 6px 0 20px; border-radius: 999px; background: var(--forest); color: var(--bone); font: 700 15px/1 var(--body); text-decoration: none; border: 0; cursor: pointer; touch-action: manipulation; transition: transform .2s var(--ease), background-color .2s; }
.pill i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--sage); color: var(--forest); font-style: normal; font-weight: 800; transition: transform .3s var(--ease); }
.pill:active { transform: scale(.97); }
.pill.light { background: var(--bone); color: var(--forest); }
.pill.light i { background: var(--forest); color: var(--bone); }
.ghost { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 999px; font: 700 15px/1 var(--body); text-decoration: none; box-shadow: inset 0 0 0 1.5px var(--line-2); transition: box-shadow .2s, background-color .2s; touch-action: manipulation; }
.ghost.on-dark { box-shadow: inset 0 0 0 1.5px var(--dline); color: var(--bone); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- header ---------- */
.top { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(14px + env(safe-area-inset-top,0px)) var(--pad) 14px; pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; padding: 6px 14px; border-radius: 999px; background: rgba(235,233,223,.9); box-shadow: 0 8px 24px -14px rgba(0,0,0,.5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); text-decoration: none; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: rgba(235,233,223,.78); box-shadow: inset 0 0 0 1px var(--line), 0 8px 24px -14px rgba(0,0,0,.45); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
.nav a { padding: 10px 16px; border-radius: 999px; font: 600 14px/1 var(--body); text-decoration: none; transition: background-color .2s; }
.nav a[aria-current="true"] { background: var(--forest); color: var(--bone); }
.menu-btn { display: none; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: rgba(235,233,223,.9); font: 700 15px/1 var(--body); box-shadow: 0 8px 24px -14px rgba(0,0,0,.5); cursor: pointer; }

/* ---------- film stage (home) ---------- */

/* ---------- solid sections ---------- */
.solid { position: relative; z-index: 3; background: var(--bone); border-top: 1px solid var(--line); }
.sec { padding: clamp(80px, 10vw, 140px) var(--pad); max-width: 1440px; margin: 0 auto; }
.sec > h2, .sec .h2 { margin: 18px 0 44px; max-width: 15ch; }
/* Sections skip layout until they come near the screen (big saving in text
   shaping on phones, and their lazy images and fonts wait too). The card rows
   measure themselves only once they are on screen, so this is safe for them. */
.solid > .sec { content-visibility: auto; contain-intrinsic-size: auto 760px; }
#numbers { contain-intrinsic-size: auto 260px; }
.rv { transition: opacity 1s var(--ease), transform 1s var(--ease); }
.anim .rv:not(.on) { opacity: 0; transform: translateY(40px); }

/* sketch doodles: strokes draw themselves when revealed */
.sk { overflow: visible; pointer-events: none; }
.sk path, .sk circle, .sk ellipse, .sk line, .sk polyline, .sk rect { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
/* Strokes carry pathLength="1", so a dash of 1 is the whole line. Matched by
   their ink class, not [pathLength]: Chrome lowercases that selector and then
   misses SVG restyles when .on lands on the <svg> itself. */
.anim .sk.draw :is(.s-t, .s-g, .s-s, .s-a, .s-f) { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease) .15s; }
.anim .on .sk.draw :is(.s-t, .s-g, .s-s, .s-a, .s-f), .anim .sk.draw.on :is(.s-t, .s-g, .s-s, .s-a, .s-f) { stroke-dashoffset: 0; }
.s-t { stroke: var(--tomato); } .s-g { stroke: var(--gold); } .s-s { stroke: var(--sky); } .s-a { stroke: var(--sage); } .s-f { stroke: var(--forest); }
.f-t { fill: var(--tomato); } .f-g { fill: var(--gold); } .f-s { fill: var(--sky); } .f-a { fill: var(--sage); } .f-c { fill: var(--coral); } .f-f { fill: var(--forest); }
@media (prefers-reduced-motion: no-preference) { .breathe { transform-origin: 60px 40px; animation: breathe 2.4s ease-in-out infinite; } }
@keyframes breathe { 50% { transform: scale(1.12); } }
.mark { position: relative; white-space: nowrap; }
.mark .sk { position: absolute; left: -6%; width: 112%; height: auto; }
.mark .sk.under { top: 88%; }
.mark .sk.ring { top: -22%; height: 150%; }
.note { position: absolute; font: 600 24px/1.1 var(--hand); color: var(--forest); transform: rotate(-4deg); }

/* marquee */
.marquee { overflow: hidden; border-bottom: 1px solid var(--line); padding: 26px 0; content-visibility: auto; contain-intrinsic-size: auto 150px; }  /* skipped until near: its display font waits too */
.marquee .row { display: flex; gap: .5em; width: max-content; font: 800 clamp(40px, 6vw, 96px)/1 var(--display); letter-spacing: -.04em; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) { .marquee .row { animation: slide 32s linear infinite; } }
@keyframes slide { to { transform: translateX(-50%); } }
.marquee .row span:nth-child(3n+2) { color: var(--sage); }
.marquee .row span:nth-child(3n) { color: transparent; -webkit-text-stroke: 1.5px var(--forest); }
.marquee .row svg { width: .55em; height: .55em; align-self: center; }

/* services + work: compact cards in one row that drifts slowly right-to-left
   in a seamless loop. Hover, keyboard focus or the Pause button stops it; you
   can drag or swipe it and it carries your flick, then drifts on from there.
   The page scroll is never taken over. Reduced motion / no JS: a plain
   swipeable row. */
.row-sec { padding-block: clamp(64px, 8vw, 112px); }
#numbers + .row-sec { padding-top: clamp(40px, 5vw, 64px); }  /* the numbers band already separates them */
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; }
.sec-head h2 { margin: 14px 0 0; max-width: 16ch; font-size: clamp(34px, 4.4vw, 68px); }
.row-ctl { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px 12px; }
.loop-tip { font-size: 21px; }
.loop-btn { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 16px 0 14px; border-radius: 999px; border: 0; background: var(--bone-2); box-shadow: inset 0 0 0 1px var(--line-2); font: 700 14px/1 var(--body); cursor: pointer; touch-action: manipulation; }
.loop-btn::before { content: ""; width: 10px; height: 12px; border-inline: 3px solid currentColor; box-sizing: border-box; }
.loop-btn[aria-pressed="true"]::before { width: 0; height: 0; border-inline: 0; border-left: 10px solid currentColor; border-block: 6px solid transparent; }
html:not(.loops) .loop-btn, html:not(.loops) .loop-tip { display: none; }
.loop { position: relative; width: 100vw; margin-left: calc(50% - 50vw); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.loop-track { display: flex; gap: 14px; width: max-content; list-style: none; margin: 0; padding: 8px 14px 18px 0; }  /* right padding = gap, so the two halves of the loop are equal */
.loop-track > li { flex: none; display: flex; }
.loop-track > li > * { flex: 1; }
#services .loop-track > li { width: 264px; }
#work .loop-track > li { width: 296px; }
.loops .loop { touch-action: pan-y; cursor: grab; -webkit-user-select: none; user-select: none; }
.loops .loop.dragging { cursor: grabbing; }
.loops .loop-track { will-change: transform; }
.loops .loop img { -webkit-user-drag: none; }
html:not(.loops) .loop { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-mask-image: none; mask-image: none; }
html:not(.loops) .loop-track { padding-left: var(--pad); }
html:not(.loops) .loop-track > li { scroll-snap-align: start; }

/* compact service card: photo, sketch badge, title, two lines, link */
.scard { position: relative; display: flex; flex-direction: column; border-radius: 20px; background: var(--bone-2); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; overflow: hidden; transition: box-shadow .25s, transform .25s var(--ease); }
.scard .ph { position: relative; display: block; aspect-ratio: 3 / 2; background: var(--sage-soft); }
.scard .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.scard .badge { position: absolute; left: 12px; bottom: -20px; z-index: 2; display: grid; place-items: center; width: 54px; height: 42px; border-radius: 14px; background: var(--bone); box-shadow: 0 8px 18px -10px rgba(0,0,0,.6), inset 0 0 0 1px var(--line); }
.scard .badge svg { width: 44px; height: 30px; }
.scard .sbody { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 30px 16px 16px; }
.scard h3 { font-size: 19px; }
.scard p { font-size: 14px; line-height: 1.45; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scard .n { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.scard .n b { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.scard.feature { background: var(--forest); color: var(--bone); box-shadow: none; }
.scard.feature .s-f { stroke: var(--forest); } .scard.feature .f-f { fill: var(--forest); }
.loop .card .body { padding: 14px 16px 16px; }
.loop .card h3 { font-size: 18px; }
.loop .card .metric { font-size: 24px; margin-top: 2px; }
.loop .card .k2 { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.loop .card .new { font-size: 10px; padding: 5px 8px; }
.loop .card .soon { padding-top: 10px; font-size: 13px; }
.all-work { margin-top: 28px; }
form.brief .pill.light { background: var(--bone); color: var(--forest); }

/* marketplaces */
.market { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 56px; align-items: start; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 28px 0 0; }
.chips li { font: 600 14px/1 var(--body); padding: 11px 15px; border-radius: 999px; background: var(--bone-2); box-shadow: inset 0 0 0 1px var(--line); }
.caps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.caps li { display: flex; gap: 14px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.caps li span { font: 600 12px/1 var(--mono); }

/* numbers */
#numbers { padding-block: 8px clamp(24px, 4vw, 48px); }
.nums { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border-block: 1px solid var(--line); }
.nums div { padding: 34px 20px 30px; display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 10px; }  /* numbers line up even when labels wrap differently */
.nums div + div { border-left: 1px solid var(--line); }
.nums dt { font: 600 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.nums dd { margin: 0; font: 800 clamp(44px, 5.4vw, 86px)/1 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.nums dd small { font-size: .45em; letter-spacing: -.02em; margin-left: .08em; }

/* work */
.card { position: relative; display: flex; flex-direction: column; border-radius: 22px; background: var(--bone-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; transform: rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)); transition: transform .5s var(--ease), box-shadow .3s; }
.shot { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--sage-soft); }
.shot .chrome { position: absolute; inset: 0 0 auto; z-index: 1; height: 26px; display: flex; align-items: center; gap: 5px; padding-left: 12px; background: rgba(12,34,51,.94); box-shadow: 0 1px 0 var(--line); }
.shot .chrome b { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.shot .chrome b:nth-child(1) { background: var(--tomato); } .shot .chrome b:nth-child(2) { background: var(--gold); } .shot .chrome b:nth-child(3) { background: var(--sage); }
.shot .chrome span { margin-left: 10px; font: 500 11px/1 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 10px; }
.shot img { position: absolute; inset: 26px 0 0; width: 100%; height: calc(100% - 26px); object-fit: cover; object-position: top center; transition: transform .8s var(--ease); }
.shot .mono { position: absolute; inset: 26px 0 0; display: grid; place-items: center; font: 800 56px/1 var(--display); letter-spacing: -.05em; background: linear-gradient(135deg, var(--sage-soft), var(--sage)); }
.shot .ind { position: absolute; right: 10px; bottom: 10px; z-index: 1; font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 7px 9px; border-radius: 999px; background: var(--forest); color: var(--bone); }
.card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card h3 { font-size: 22px; }
.card p { margin: 0; }
.card .metric { font: 800 30px/1.05 var(--display); letter-spacing: -.03em; margin-top: 6px; }
.card .k2 { font-size: 15px; }
.card .new { align-self: flex-start; margin-bottom: 6px; font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 6px 9px; border-radius: 6px; background: var(--forest); color: var(--bone); }
/* the whole card is the link: the title's link stretches over it (one short link name for screen readers) */
.card .cover { color: inherit; text-decoration: none; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.card .cover::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: 22px; }
.card .cover:focus-visible { outline: none; }
.card .cover:focus-visible::after { outline: 2px solid var(--forest); outline-offset: -3px; }
.card .soon { margin-top: auto; padding-top: 12px; font: 700 14px/1 var(--body); }
.all-work { margin-top: 24px; }
.all-work details { border-radius: 22px; background: var(--bone-2); box-shadow: inset 0 0 0 1px var(--line); }
.all-work summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding: 0 24px; font: 700 clamp(18px,1.6vw,22px)/1.2 var(--display); }
.all-work summary::-webkit-details-marker { display: none; }
.all-work summary small { display: block; font: 600 12px/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.all-work summary i { font: 600 26px/1 var(--body); font-style: normal; transition: transform .3s var(--ease); }
.all-work details[open] summary i { transform: rotate(45deg); }
.grid-work { list-style: none; margin: 0; padding: 4px 24px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.grid-work li { border-radius: 14px; overflow: hidden; background: var(--bone); box-shadow: inset 0 0 0 1px var(--line); }
.grid-work a, .grid-work li > div { display: block; text-decoration: none; }
.grid-work .shot .chrome { height: 18px; }
.grid-work .shot .chrome span { display: none; }
.grid-work .shot img, .grid-work .shot .mono { inset: 18px 0 0; height: calc(100% - 18px); }
.grid-work .shot .mono { font-size: 36px; }
.grid-work .cap { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px 12px; font-size: 14px; font-weight: 600; line-height: 1.3; }

/* process */
.steps-rows { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.steps-rows li { display: grid; grid-template-columns: 90px minmax(0,1fr) minmax(0,1.1fr); gap: 24px; align-items: baseline; padding: 30px 0; border-bottom: 1px solid var(--line); transition: padding-left .4s var(--ease), background-color .4s; }
.steps-rows .num { font: 600 13px/1 var(--mono); }
.steps-rows h3 { font-size: clamp(26px, 2.8vw, 42px); }
.steps-rows p { margin: 0; }
.steps-rows .out { display: block; margin-top: 8px; font: 600 20px/1.2 var(--hand); }

/* team */
.team { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; perspective: 1200px; }
.person { border-radius: 24px; background: var(--bone-2); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; overflow: hidden; transform: rotateX(var(--tx,0deg)) rotateY(var(--ty,0deg)); transition: transform .5s var(--ease), box-shadow .3s; }
.person .photo { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--sage-soft); }
.person .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.person .info { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.person .role { font: 600 12px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; margin: 0; }
.person h3 { font-size: 26px; margin-top: 8px; }
.person p { font-size: 15px; margin: 10px 0 0; }
.person .chips { margin-top: auto; padding-top: 18px; }
.person .chips li { font-size: 13px; padding: 8px 11px; background: var(--bone); }
.press { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.press > span { font: 600 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; margin-right: 6px; }
.press a { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 14px 0 8px; border-radius: 999px; background: var(--bone-2); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; font: 600 14px/1 var(--body); transition: box-shadow .2s; }
.press img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: #fff; }
.quote { position: relative; margin: 20px 0 0; padding: 34px 36px; border-radius: 26px; background: var(--forest); color: var(--bone); }
.quote p { margin: 0; font: 700 clamp(22px,2.4vw,32px)/1.25 var(--display); letter-spacing: -.02em; max-width: 34em; }
.quote footer { margin-top: 14px; font: 600 12px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--sage); }

/* contact */
.start { text-align: center; }
.start h2 { margin: 18px auto 20px; max-width: 16ch; }
.start .lede { margin: 0 auto; }
.contact { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 40px; align-items: start; margin-top: 56px; text-align: left; }
.reach-us { display: grid; gap: 12px; margin: 0; }
.reach-us div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 16px 18px; border-radius: 18px; background: var(--bone-2); box-shadow: inset 0 0 0 1px var(--line); }
.reach-us dt { width: 100%; font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.reach-us dd { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0; font: 700 18px/1.3 var(--body); }
.reach-us dd a { text-decoration: none; overflow-wrap: anywhere; }
.copy-btn { margin-left: auto; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--bone); box-shadow: inset 0 0 0 1px var(--line-2); font: 700 13px/1 var(--body); cursor: pointer; touch-action: manipulation; }
form.brief { padding: 28px; border-radius: 26px; background: var(--forest); color: var(--bone); }
.grid2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field.full { grid-column: 1/-1; }
label { font: 700 14px/1.2 var(--body); }
input, select, textarea { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px; border: 0; background: var(--bone); color: var(--forest); font: 400 16px/1.4 var(--body); box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .2s; }
input::placeholder, textarea::placeholder { color: rgba(232,240,248,.5); }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: inset 0 0 0 3px var(--sage); }
.field.bad input, .field.bad select, .field.bad textarea { box-shadow: inset 0 0 0 3px #FF9A8B; }
.err { font-size: 13px; font-weight: 700; color: #FFC2B8; }
.err:empty { display: none; }
.form-end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.form-end small { font-size: 13px; flex-basis: 100%; color: var(--bone); }
.status { margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: rgba(235,233,223,.1); box-shadow: inset 0 0 0 1px var(--dline); font-size: 15px; }
.status a { color: var(--sage); font-weight: 700; }
.status[hidden] { display: none; }

/* footer */
.foot { content-visibility: auto; contain-intrinsic-size: auto 560px; position: relative; z-index: 3; background: var(--forest); color: var(--bone); padding: 64px var(--pad) calc(32px + env(safe-area-inset-bottom,0px)); }
.foot-grid { display: grid; grid-template-columns: minmax(0,1.4fr) repeat(3,minmax(0,1fr)); gap: 32px; max-width: 1440px; margin: 0 auto; }
.foot .brand { display: inline-flex; padding: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.foot .brand img { height: 56px; }
.foot h2 { margin: 0 0 14px; font: 600 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sage); }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 15px; }
.foot a { text-decoration: none; }
.foot .tag { max-width: 22em; margin: 16px 0 0; font-size: 15px; }
.foot span { overflow-wrap: anywhere; }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; max-width: 1440px; margin: 48px auto 0; padding-top: 22px; border-top: 1px solid var(--dline); font: 500 12px/1.4 var(--mono); letter-spacing: .06em; }

/* ══════════ service pages ══════════ */
.sp main { padding-top: 96px; }
.wrap { max-width: 1440px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.crumbs { font: 600 13px/1.4 var(--mono); letter-spacing: .04em; }
.crumbs ol { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0; white-space: nowrap; }
.crumbs li { flex: none; }
.crumbs li:last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.crumbs li + li::before { content: "/"; margin-right: 8px; }
.crumbs a { text-underline-offset: 3px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font: 600 12px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 4px rgba(159,208,255,.22); }
.sp-hero { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); gap: 56px; align-items: center; padding-block: 28px 80px; }
.sp-hero h1 { font-size: clamp(44px,6vw,94px); line-height: .94; }
.sp-hero h1 em { font-style: normal; background: var(--grad-ink); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (prefers-reduced-motion: no-preference) { .sp-hero h1 em { animation: flow 6s linear infinite; } }
.sp-hero .lede { margin-top: 22px; }
.sp-hero .actions .btn-primary, .cta-band .btn-primary { background: var(--forest); color: var(--bone); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px; border-radius: 999px; font: 700 15px/1 var(--body); text-decoration: none; touch-action: manipulation; transition: transform .2s var(--ease), background-color .2s, box-shadow .2s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--forest); color: var(--bone); }
.btn-ghost { box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-wa { background: var(--sage); color: var(--forest); }
.sp-hero .facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 28px 0 0; }
.sp-hero .facts li { font: 700 13px/1 var(--body); padding: 10px 13px; border-radius: 999px; background: var(--sage-soft); }
.sp-photo { position: relative; perspective: 1200px; }
.sp-photo .frame { border-radius: 28px; overflow: hidden; background: var(--sage-soft); box-shadow: 0 40px 80px -36px rgba(0,0,0,.6); transform: rotateY(var(--ty,-8deg)) rotateX(var(--tx,4deg)); transition: transform .6s var(--ease); }
.sp-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.sp-photo .tag { position: absolute; left: -14px; bottom: 26px; margin: 0; padding: 14px 16px; border-radius: 18px; background: var(--forest); color: var(--bone); font: 600 14px/1.35 var(--body); box-shadow: var(--shadow); max-width: 240px; }
.sp-photo .tag b { display: block; font: 800 26px/1 var(--display); letter-spacing: -.03em; margin-bottom: 4px; color: var(--sage); }
.sp-photo .doodle { position: absolute; right: -10px; top: -26px; width: 120px; height: 90px; }
.sp-sec { padding-block: 80px; border-top: 1px solid var(--line); content-visibility: auto; contain-intrinsic-size: auto 800px; }
.sp-sec h2, .sp-sec .sec-h { font-size: clamp(32px,4vw,58px); max-width: 18em; }
.prose p { font-size: 18px; margin: 18px 0 0; max-width: 46em; }
.two { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 48px; align-items: start; }
.feat { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.feat li { padding: 22px; border-radius: 20px; background: var(--bone-2); box-shadow: inset 0 0 0 1px var(--line); transition: transform .3s var(--ease), box-shadow .3s; }
.feat li::before { content: attr(data-n); display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px; border-radius: 50%; background: var(--sage); font: 700 12px/1 var(--mono); }
.feat li b { display: block; font: 700 19px/1.2 var(--display); letter-spacing: -.01em; }
.feat li span { display: block; margin-top: 8px; font-size: 15px; line-height: 1.5; }
.steps { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; counter-reset: s; }
.steps li { position: relative; padding: 24px 22px 26px; border-radius: 20px; background: var(--forest); color: var(--bone); counter-increment: s; }
.steps li::before { content: counter(s, decimal-leading-zero); display: block; font: 600 30px/1 var(--hand); color: var(--sage); margin-bottom: 14px; }
.steps b { display: block; font: 700 21px/1.15 var(--display); }
.steps span { display: block; margin-top: 8px; font-size: 15px; line-height: 1.5; }
.outcomes { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.outcomes li { padding: 24px 22px; border-radius: 20px; background: var(--sage-soft); font: 700 19px/1.25 var(--display); }
.outcomes li::before { content: "✓"; display: grid; place-items: center; margin-bottom: 12px; width: 30px; height: 30px; border-radius: 50%; background: var(--forest); color: var(--bone); font: 700 15px/1 var(--body); }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 8px; border-left: 2.5px solid var(--forest); border-bottom: 2.5px solid var(--forest); transform: rotate(-45deg); }
.sp-work { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.faq { margin-top: 32px; display: grid; gap: 10px; max-width: 900px; }
.faq details { border-radius: 18px; background: var(--bone-2); box-shadow: inset 0 0 0 1px var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; font: 700 18px/1.3 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--sage); font: 700 20px/1 var(--body); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 22px 22px; max-width: 44em; }
.others { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.others a { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 18px; background: var(--bone-2); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; transition: box-shadow .2s; }
.others img { width: 76px; height: 57px; border-radius: 12px; object-fit: cover; flex: none; }
.others b { display: block; font: 700 17px/1.2 var(--display); }
.others span { display: block; font-size: 13px; margin-top: 3px; line-height: 1.4; }
.cta-band { margin-block: 24px 80px; padding: clamp(28px,5vw,56px); border-radius: 30px; background: var(--forest); color: var(--bone); display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,.7fr); gap: 32px; align-items: center; }
.cta-band h2 { font-size: clamp(32px,4vw,54px); }
.cta-band p { margin: 14px 0 0; font-size: 18px; max-width: 34em; }
.cta-band .actions { margin: 0; justify-content: flex-end; }
.cta-band .btn-primary { background: var(--sage); color: var(--forest); }
.cta-band .btn-ghost { color: var(--bone); box-shadow: inset 0 0 0 1.5px var(--dline); }

/* 404 */
.nf { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 120px var(--pad) 80px; }
.nf h1 { font-size: clamp(64px,12vw,160px); }
.nf .actions { justify-content: center; }

/* ---------- hover: real pointers only (touch would stick) ---------- */
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { background: rgba(232,240,248,.1); }
  .nav a[aria-current="true"]:hover { background: var(--forest-2); }
  .pill:hover { transform: translateY(-2px); }
  .pill:hover i { transform: rotate(-45deg); }
  .ghost:hover { box-shadow: inset 0 0 0 2px var(--forest); }
  .ghost.on-dark:hover { box-shadow: inset 0 0 0 2px var(--sage); }
  .scard:hover { box-shadow: inset 0 0 0 1.5px var(--sage); }
  .scard:hover::before { opacity: 1; }
  .card:hover { box-shadow: inset 0 0 0 1.5px var(--forest), var(--shadow); }
  .card:hover .shot img { transform: scale(1.04); }
  .card:hover .cover { text-decoration: underline; }
  .steps-rows li:hover { padding-left: 14px; }
  .press a:hover, .others a:hover, .grid-work li:hover, .feat li:hover { box-shadow: inset 0 0 0 1.5px var(--forest); }
  .copy-btn:hover { box-shadow: inset 0 0 0 2px var(--forest); }
  .foot a:hover { text-decoration: underline; text-underline-offset: 4px; }
  .btn-primary:hover { background: var(--forest-2); }
  .btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--forest); }
  .cta-band .btn-primary:hover { background: var(--bone); }
}
@media (pointer: coarse) { .copy-btn { min-height: 44px; } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .nums { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .nums div:nth-child(3) { border-left: 0; }
  .nums div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .sp-work, .others { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .steps, .outcomes { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 860px) {
  .sec-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .row-ctl { justify-content: flex-start; }
  #services .loop-track > li { width: 236px; }
  #work .loop-track > li { width: 256px; }
  .nav { position: fixed; left: var(--pad); right: var(--pad); top: calc(76px + env(safe-area-inset-top,0px)); flex-direction: column; gap: 2px; padding: 8px; border-radius: 22px; background: rgba(9,28,44,.97); box-shadow: inset 0 0 0 1px var(--line), 0 24px 60px -20px rgba(0,0,0,.7); }
  .nav:not(.open) { display: none; }
  .nav a { padding: 15px 14px; font-size: 18px; border-radius: 14px; }
  .menu-btn { display: inline-flex; align-items: center; margin-left: auto; }
  .top > .pill { display: none; }
  .brand img { height: 34px; }
  .market, .contact, .sp-hero, .two, .cta-band { grid-template-columns: minmax(0,1fr); gap: 32px; }
  .team { grid-template-columns: minmax(0,1fr); }
  .person .photo { aspect-ratio: 4 / 3; }
  .steps-rows li { grid-template-columns: minmax(0,1fr); gap: 6px; }
  .foot-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grid2 { grid-template-columns: minmax(0,1fr); }
  form.brief { padding: 20px; }
  .cta-band .actions { justify-content: flex-start; }
  .sp-photo { order: -1; }
  .sp-photo .tag { left: 12px; }
  .grid-work { padding: 4px 14px 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .foot .brand img { height: 48px; }
}
@media (max-width: 600px) {
  .sp-work, .others, .steps, .outcomes { grid-template-columns: minmax(0,1fr); }
  .foot-grid { grid-template-columns: minmax(0,1fr); }
  .note { display: none; }
}

/* ---------- accessibility preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .scard, .card, .person, .sp-photo .frame { transform: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav, .brand, .launch__badge, .dash::before { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav { background: var(--bone); }
  .launch__badge { background: rgba(0,0,0,.65); }
  .dash::before { background: #0b1b28; }
}

/* ══════════ home hero: fullscreen night video, glass chrome, cinematic type ══════════
   Night palette (hero only): bg hsl(201 100% 13%), fg white, muted hsl(240 4% 66%)
   — muted on the night sky ≈ 6:1. Copy sits in the upper two-thirds, over the sky. */
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 500; font-display: swap; src: url(/fonts/inter.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
.vhero { --vh-bg: hsl(201 100% 13%); --vh-fg: #fff; --vh-muted: hsl(240 4% 66%);
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif; --font-body: "Inter", "Figtree Fallback", system-ui, sans-serif;
  position: relative; z-index: 4; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 110px 24px clamp(110px, 20vh, 220px);
  background: var(--vh-bg); color: var(--vh-fg); font-family: var(--font-body); }
.vhero picture img, .vhero video { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }
.vhero video { opacity: 0; transition: opacity .8s ease; }   /* the still underneath shows until the film is really playing */
.vhero video.on { opacity: 1; }
.vhero h1 { max-width: 80rem; margin: 0; font: 400 48px/.95 var(--font-display); letter-spacing: -2.46px; color: var(--vh-fg); text-wrap: balance; }
.vhero h1 em { font-style: normal; color: var(--vh-muted); }
.vhero .vsub { max-width: 42rem; margin: 32px 0 0; color: var(--vh-muted); font-size: 16px; line-height: 1.625; }
.vhero .vbtn { display: inline-block; margin-top: 48px; padding: 20px 56px; border-radius: 999px; color: var(--vh-fg); font: 400 16px/1 var(--font-body); text-decoration: none; cursor: pointer; touch-action: manipulation; transition: transform .2s var(--ease); }
.vhero .vbtn:active { transform: scale(.97); }
.vhero :focus-visible { outline-color: #fff; }
@media (min-width: 640px) { .vhero h1 { font-size: 72px; } .vhero .vsub { font-size: 18px; } }
@media (min-width: 768px) { .vhero h1 { font-size: 96px; } }
@media (max-aspect-ratio: 4/5) { .vhero { justify-content: flex-start; padding-top: max(130px, 17vh); } }  /* phones: keep the copy over the sky */
.vpause { position: absolute; right: var(--pad); bottom: calc(22px + env(safe-area-inset-bottom,0px)); width: 44px; height: 44px; padding: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 0; cursor: pointer; }
.vpause::after { content: ""; width: 10px; height: 12px; border-inline: 3px solid currentColor; box-sizing: border-box; }
.vpause[aria-pressed="true"]::after { width: 0; height: 0; border-inline: 0; border-left: 10px solid currentColor; border-block: 6px solid transparent; margin-left: 3px; }
.vpause[hidden] { display: none; }

/* liquid glass */
.liquid-glass { background: rgba(255,255,255,.01); background-blend-mode: luminosity; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); border: none; box-shadow: inset 0 1px 1px rgba(255,255,255,.1); position: relative; overflow: hidden; }
.liquid-glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.4px;
  background: linear-gradient(180deg, rgba(255,255,255,.45) 0%, rgba(255,255,255,.15) 20%, rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%, rgba(255,255,255,.15) 80%, rgba(255,255,255,.45) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }

@keyframes fade-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rise { from { transform: translateY(24px); } }
@media (prefers-reduced-motion: no-preference) {
  /* the headline only rises: it is the LCP element, and text that starts at
     opacity 0 is not counted until much later */
  .fade-rise { animation: rise .8s ease-out both; }
  .fade-rise-1 { animation: fade-rise .8s ease-out .2s both; }
  .fade-rise-2 { animation: fade-rise .8s ease-out .4s both; }
}

/* the header wears the hero's chrome while the hero is on screen (html.at-hero) */
.top .brand .on-dark { display: none; }
.top .brand, .top .nav, .top .nav a, .top .pill, .top .menu-btn { transition: background-color .35s, color .25s, box-shadow .35s, transform .2s var(--ease); }
.at-hero .top .brand { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding-left: 0; }
.at-hero .top .brand .on-light { display: none; }
.at-hero .top .brand .on-dark { display: block; }
.at-hero .top .menu-btn { background: rgba(255,255,255,.06); color: #fff; box-shadow: inset 0 1px 1px rgba(255,255,255,.12), inset 0 0 0 1px rgba(255,255,255,.18); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@media (min-width: 861px) {
  .at-hero .top .nav { background: rgba(3,12,20,.42); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }  /* dark glass: the links stay readable over the bright moon too */
  .at-hero .top .nav a { color: rgba(255,255,255,.82); font: 400 14px/1 "Inter", system-ui, sans-serif; }
  .at-hero .top .nav a[aria-current="true"] { background: none; color: #fff; }
  .at-hero .top .pill { position: relative; overflow: hidden; padding: 0 24px; min-height: 42px; background: rgba(255,255,255,.01); color: #fff; font: 400 14px/1 "Inter", system-ui, sans-serif; box-shadow: inset 0 1px 1px rgba(255,255,255,.1); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
  .at-hero .top .pill::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.4px; background: linear-gradient(180deg, rgba(255,255,255,.45) 0%, rgba(255,255,255,.15) 20%, rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%, rgba(255,255,255,.15) 80%, rgba(255,255,255,.45) 100%); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
  .at-hero .top .pill i { display: none; }
}
@media (hover: hover) and (pointer: fine) {
  .vhero .vbtn:hover, .at-hero .top .pill:hover { transform: scale(1.03); }
  .at-hero .top .nav a:hover { color: #fff; background: none; }
  .loop-btn:hover { box-shadow: inset 0 0 0 2px var(--forest); }
  .scard:hover { box-shadow: inset 0 0 0 1.5px var(--forest), var(--shadow); transform: translateY(-3px); }
  .scard:hover .ph img { transform: scale(1.05); }
}
@media (prefers-reduced-motion: reduce) { .vhero .vbtn:hover, .at-hero .top .pill:hover, .scard:hover { transform: none; } }
.vhero .vpause { position: absolute; }   /* .liquid-glass sets position: relative */

/* ---------- launch scene (after the Scrollhaus "Zenith" direction) ----------
   One photograph, two framings: the launch under the hills, then the moon where
   the results window arrives. Scroll drives one camera pan + push-in across it;
   JS writes the --cam-* and timeline properties on .scene. Sizes are in design
   units (1 unit = 1px at a 1644px-wide window). */
.scene {
  --u-ui: clamp(.93px, calc(100vw / 1644), 1.15px);
  --u-hero: clamp(.74px, calc(100vw / 1644), 1.3px);
  --s: clamp(.62px, min(calc(100vw / 1644), calc(100svh / 1033)), 1.45px);
  --travel: 260svh; --night: #061826;
  position: relative; height: calc(100vh + var(--travel)); height: calc(100svh + var(--travel));
  background: var(--night); color: #fff; font-family: "Inter", "Figtree Fallback", system-ui, sans-serif;
}
.scene::before { content: ""; position: absolute; inset: 0 0 auto; z-index: 1; height: 22vh; background: linear-gradient(var(--night), transparent); pointer-events: none; }  /* softens the seam under the hero video */
.scene__viewport { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 0 var(--pad) calc(64 * var(--u-hero)); }
.scene__backdrop { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.scene__camera { position: absolute; inset: 0; transform: scale(var(--cam-z, 1)); }
.scene__photo { position: absolute; left: 50%; top: 50%; width: max(108.699%, 172.95svh); height: auto; max-width: none; transform: translate(var(--cam-x, -47.957%), var(--cam-y, -80.097%)); }
@media (max-aspect-ratio: 4/5) {  /* portrait screens only ever see the middle of the photo: they get that 56% slice (x .22–.78) at full density */
  .scene__photo { width: 96.852vh; width: 96.852svh; transform: translate(calc(-46.352% - 3.648% * var(--cam-q, 0)), var(--cam-y, -80.097%)); }
}
.scene__glow { position: absolute; inset: 0; opacity: var(--glow-o, 1); background: radial-gradient(109.987% 112.486% at 50% 0%, rgba(110,180,255,0) 66.43%, rgba(110,180,255,.38) 84.06%, rgba(40,120,235,.85) 100%); }
.scene.is-moving :is(.scene__camera, .scene__photo, .launch, .results__pill, .results__title, .dash) { will-change: transform; }

/* first framing: the launch */
.launch { display: flex; flex-direction: column; align-items: center; gap: calc(30 * var(--u-hero)); width: calc(763 * var(--u-hero)); max-width: 100%; text-align: center; transform: translateY(calc(var(--hero-out, 0) * -163 * var(--u-hero))); }
.scene.is-gone .launch { visibility: hidden; }
.launch > * { margin: 0; opacity: var(--hero-o, 1); }
.scene.is-blurring .launch > * { filter: blur(calc(var(--hero-blur, 0) * var(--u-hero))); }  /* never at rest: no filter at either end */
.launch__badge { display: flex; align-items: center; gap: calc(8.18 * var(--u-ui)); padding: calc(9.86 * var(--u-ui)) calc(14 * var(--u-ui)); border-radius: calc(5 * var(--u-ui)); background: rgba(0,0,0,.3); -webkit-backdrop-filter: blur(calc(14.6 * var(--u-ui))); backdrop-filter: blur(calc(14.6 * var(--u-ui))); font-size: calc(14 * var(--u-ui)); line-height: 1.6; letter-spacing: -.01em; }
.scene.is-moving .launch__badge { -webkit-backdrop-filter: none; backdrop-filter: none; }
.launch__label { color: rgba(255,255,255,.8); }
.launch__value { font-weight: 500; font-size: calc(14.5 * var(--u-ui)); }
.launch__value i { font-style: normal; color: #9fd0ff; }
.launch__title { width: 100%; font: 400 calc(90 * var(--u-hero))/.9444 "Instrument Serif", Georgia, serif; letter-spacing: -.03em; text-wrap: balance; }
.line { display: block; clip-path: inset(-.35em -.6em -.05em -.6em); }  /* open above for ascenders, closed under the baseline */
.line__in { display: inline-block; }
.launch__sub { width: calc(423 * var(--u-hero)); max-width: 100%; font-size: calc(20 * var(--u-hero)); line-height: 1.25; letter-spacing: -.02em; color: rgba(255,255,255,.8); }
.scene.is-open .line { clip-path: none; }
@keyframes line-reveal { 0% { transform: translateY(100%); opacity: 0; } 25% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes scene-fade { from { opacity: 0; } }
.anim .scene:not(.is-open) .line__in { transform: translateY(100%); opacity: 0; }
.anim .scene.in:not(.is-open) .line__in { animation: line-reveal .9s cubic-bezier(.16,1,.3,1) .08s both; }
.anim .scene.in:not(.is-open) .line:nth-child(2) .line__in { animation-delay: .21s; }
.anim .scene.in:not(.is-open) .line:nth-child(3) .line__in { animation-delay: .34s; }
.anim .scene:not(.is-open) :is(.launch__badge, .launch__sub) { opacity: 0; }
.anim .scene.in:not(.is-open) :is(.launch__badge, .launch__sub) { animation: scene-fade .4s linear .45s both; }  /* sooner than on a page-top hero: here people arrive by scrolling */

/* second framing: the results window inside the moon */
.results { position: absolute; left: 50%; top: 20.813%; width: calc(901 * var(--s)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; text-align: center; opacity: var(--plat-o, 0); pointer-events: none; }
.results__pill, .results__title { transform: translateX(calc(-8.25 * var(--s))) translateY(calc((1 - var(--plat-text, 0)) * 638 * var(--s))); }  /* text and window travel at different rates: that difference is the depth */
.results__pill { display: inline-flex; align-items: center; justify-content: center; gap: calc(10 * var(--s)); min-width: calc(138 * var(--s)); margin: 0; padding: calc(12 * var(--s)) calc(16 * var(--s)); border-radius: calc(6 * var(--s)); background: rgba(3,14,24,.35); font-size: max(12px, calc(12 * var(--s))); }
.results__pill i { width: calc(4 * var(--s)); height: calc(4 * var(--s)); min-width: 4px; min-height: 4px; border-radius: 50%; background: #A6FB89; }
.results__title { width: calc(469 * var(--s)); max-width: 100%; margin: calc(39 * var(--s)) 0 0; font: 400 calc(48 * var(--s))/.9583 "Instrument Serif", Georgia, serif; letter-spacing: -.03em; }
.dash { position: relative; flex: none; width: calc(901 * var(--s)); height: calc(680 * var(--s)); margin-top: calc(50 * var(--s)); transform: translateY(calc((1 - var(--plat-shot, 0)) * 555 * var(--s))); visibility: hidden; text-align: left; font-size: calc(10 * var(--s)); line-height: 1.2; letter-spacing: -.02em; }
.scene.plat-on .dash { visibility: visible; }
.dash::before { content: ""; position: absolute; inset: 0; width: calc(900 * var(--s)); border-radius: calc(7 * var(--s)); background: rgba(6,16,26,.42); }  /* no backdrop blur: over the smooth moon it looked the same and cost a re-render every scroll frame */
.dash > * { position: absolute; }
.dash p { margin: 0; }
.dash__bar { left: 0; top: 0; width: calc(899.24 * var(--s)); height: calc(37.23 * var(--s)); border-radius: calc(7.025 * var(--s)) calc(7.025 * var(--s)) 0 0; background: #191C1F; }
.dash__bar i { position: absolute; top: calc(14.05 * var(--s)); left: calc(14.75 * var(--s)); width: calc(8.43 * var(--s)); height: calc(8.43 * var(--s)); border-radius: 50%; background: #EE6A5F; }
.dash__bar i:nth-child(2) { left: calc(28.8 * var(--s)); background: #F5BD4F; }
.dash__bar i:nth-child(3) { left: calc(42.85 * var(--s)); background: #61C454; }
.dash__url { position: absolute; left: calc(268.37 * var(--s)); top: calc(8.43 * var(--s)); width: calc(362.99 * var(--s)); height: calc(19.67 * var(--s)); display: flex; align-items: center; justify-content: center; gap: calc(5 * var(--s)); border-radius: calc(4.215 * var(--s)); background: #0C0F12; font-size: calc(9.13 * var(--s)); color: rgba(255,255,255,.7); }
.dash__url svg { width: calc(5.5 * var(--s)); height: calc(8 * var(--s)); fill: none; stroke: currentColor; stroke-width: 1; }
.dash__nav { left: 0; top: calc(48 * var(--s)); width: calc(901 * var(--s)); height: calc(29 * var(--s)); display: flex; align-items: flex-start; gap: calc(30 * var(--s)); padding: 0 calc(22 * var(--s)); background: linear-gradient(to right, #fff calc(102 * var(--s)), transparent 0) bottom left / 100% 1px no-repeat, linear-gradient(rgba(255,255,255,.2), rgba(255,255,255,.2)) bottom left / 100% 1px no-repeat; }
.dash__nav span { opacity: .5; }
.dash__nav .on, .dash__nav .dash__user { opacity: 1; }
.dash__user { margin-left: auto; display: flex; align-items: center; gap: calc(6 * var(--s)); }
.dash__user b { width: calc(18.69 * var(--s)); height: calc(18.69 * var(--s)); margin-top: calc(-4 * var(--s)); border-radius: 50%; background: linear-gradient(135deg, #9fd0ff, #2c6fb3); }
.dash__tabs { left: calc(22 * var(--s)); top: calc(104 * var(--s)); display: flex; gap: calc(30 * var(--s)); font-size: calc(40 * var(--s)); letter-spacing: -.03em; }
.dash__tabs span { opacity: .4; }
.dash__tabs .on { opacity: 1; }
.dc { top: calc(177 * var(--s)); width: calc(282 * var(--s)); height: calc(247 * var(--s)); padding: calc(21 * var(--s)) calc(20 * var(--s)); border-radius: calc(23 * var(--s)); background: rgba(6,16,26,.38); }
.dc.c1 { left: calc(20 * var(--s)); } .dc.c2 { left: calc(310 * var(--s)); } .dc.c3 { left: calc(600 * var(--s)); }
.dc.c4, .dc.c5 { top: calc(433 * var(--s)); width: calc(426 * var(--s)); }
.dc.c4 { left: calc(21 * var(--s)); } .dc.c5 { left: calc(456 * var(--s)); }
.dc .ct { font-size: calc(14 * var(--s)); }
.dc .fig { margin-top: calc(20 * var(--s)); font-size: calc(32 * var(--s)); letter-spacing: -.04em; }
.dc .delta { display: flex; align-items: center; gap: calc(6 * var(--s)); margin-top: calc(12 * var(--s)); color: rgba(255,255,255,.56); }
.dc .delta b { padding: calc(3 * var(--s)) calc(6 * var(--s)); border-radius: calc(4 * var(--s)); background: rgba(255,255,255,.2); font-weight: 450; color: #fff; }
.dc .area { position: absolute; left: calc(19 * var(--s)); top: calc(148 * var(--s)); width: calc(245.5 * var(--s)); height: calc(69.5 * var(--s)); overflow: visible; }
.dc .area .grid { stroke: rgba(255,255,255,.1); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dc .area .ln { fill: none; stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.dc .pair { display: flex; gap: calc(26 * var(--s)); margin-top: calc(16 * var(--s)); }
.dc :is(.pair, .trio) p { display: grid; gap: calc(5 * var(--s)); }
.dc :is(.pair, .trio) span { color: rgba(255,255,255,.45); }
.dc .pair b { font-weight: 450; font-size: calc(20 * var(--s)); letter-spacing: -.03em; }
.dc .dots { position: absolute; left: calc(21 * var(--s)); top: calc(120 * var(--s)); width: calc(238 * var(--s)); height: calc(109 * var(--s)); background: radial-gradient(circle, #fff calc(3.5 * var(--s)), transparent calc(3.5 * var(--s) + .6px)) 0 0 / calc(21 * var(--s)) calc(17 * var(--s)); -webkit-mask: radial-gradient(70% 80% at 62% 28%, #000, rgba(0,0,0,.1)); mask: radial-gradient(70% 80% at 62% 28%, #000, rgba(0,0,0,.1)); }
.dc .bars { position: absolute; left: calc(17 * var(--s)); top: calc(110 * var(--s)); width: calc(246 * var(--s)); height: calc(120 * var(--s)); display: flex; align-items: flex-end; gap: calc(7 * var(--s)); border-top: 1px solid rgba(255,255,255,.1); }
.dc .bars i { width: calc(35 * var(--s)); height: calc(var(--h) * var(--s)); background: rgba(217,217,217,.1); border-top: 2px solid #fff; }
.dc .log { display: grid; gap: calc(7 * var(--s)); width: calc(386 * var(--s)); margin: calc(16 * var(--s)) 0 0; padding: 0; list-style: none; }
.dc .log li { display: flex; align-items: center; gap: calc(8 * var(--s)); min-height: calc(20 * var(--s)); }
.dc .log em { padding: calc(3 * var(--s)) calc(6 * var(--s)); border-radius: calc(4 * var(--s)); background: rgba(255,255,255,.07); font-style: normal; color: rgba(255,255,255,.45); }
.dc .log b { margin-left: auto; font-weight: 450; color: #A6FB89; }
.dc .trio { display: flex; gap: calc(44 * var(--s)); margin-top: calc(22 * var(--s)); }
.dc .trio b { font-weight: 450; font-size: calc(30 * var(--s)); letter-spacing: -.03em; }

@media (max-width: 900px) {
  .scene { --u-ui: 1px; --s: calc(min(100vw - 2 * var(--pad), (100svh - 330px) * 1.325) / 901); }
  .launch { width: 100%; gap: clamp(20px, 3svh, 26px); }
  .launch__title { font-size: clamp(38px, 10.2vw, 68px); }
  .launch__sub { width: auto; max-width: 423px; font-size: clamp(15px, 4.2vw, 20px); }
  .results { top: 50%; width: calc(100% - 2 * var(--pad)); transform: translate(-50%, -44%); }  /* centred: the window is small on phones */
  .results__pill, .results__title { transform: translateY(calc((1 - var(--plat-text, 0)) * 638 * var(--s))); }
  .results__title { width: min(500px, 100%); margin-top: clamp(22px, 3svh, 30px); font-size: clamp(31px, 5.2vw, 42px); }
  .dash { margin-top: clamp(28px, 4svh, 42px); }
  .scene__viewport { padding-bottom: clamp(32px, 6.5svh, 64px); }
}
@media (prefers-reduced-motion: reduce) { .scene { --travel: 120svh; } }

/* row controls: step the card rows left and right */
.loop-arrows { display: inline-flex; gap: 8px; }
.loop-nav { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--bone-2); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--forest); cursor: pointer; touch-action: manipulation; transition: box-shadow .2s var(--ease), transform .12s var(--ease); }
.loop-nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.loop-nav:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .loop-nav:hover { box-shadow: inset 0 0 0 2px var(--forest); } }

/* ══════════ phones: tighter rhythm, one-line row controls, a readable results card ══════════ */
@media (max-width: 640px) {
  .sec { padding-block: 60px; }
  .row-sec { padding-block: 52px; }
  #numbers + .row-sec { padding-top: 36px; }
  .loop-btn { width: 44px; padding: 0; justify-content: center; gap: 0; font-size: 0; }  /* icon only; "Pause"/"Play" stays its accessible name */
  .foot-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 32px 20px; }
  .foot-grid > :first-child, .foot-grid > :last-child { grid-column: 1 / -1; }

  /* launch scene: less sky to scroll through, and the results window reflows
     into big, legible figures instead of a miniature of the desktop window */
  .scene { --travel: 200svh; }
  .dash { width: 100%; height: auto; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; padding: 34px 8px 8px; font-size: 12px; }
  .dash::before { width: auto; border-radius: 14px; }
  .dash > * { position: relative; }
  .dash__bar { position: absolute; inset: 0 0 auto; width: auto; height: 26px; border-radius: 14px 14px 0 0; }
  .dash__bar i { top: 10px; left: 12px; width: 7px; height: 7px; }
  .dash__bar i:nth-child(2) { left: 23px; } .dash__bar i:nth-child(3) { left: 34px; }
  .dash__url { left: 50%; top: 5px; width: 60%; height: 16px; transform: translateX(-50%); border-radius: 4px; font-size: 9px; gap: 4px; }
  .dash__url svg { width: 5px; height: 7px; }
  .dash__nav, .dash__tabs, .dc.c4, .dc .dots, .dc .bars { display: none; }
  .dc { top: auto !important; left: auto !important; width: auto !important; height: auto; padding: 14px; border-radius: 14px; }
  .dc.c1, .dc.c5 { grid-column: 1 / -1; }
  .dc .ct { font-size: 13px; color: rgba(255,255,255,.8); }
  .dc .fig { margin-top: 6px; font-size: 32px; }
  .dc .delta { margin-top: 6px; gap: 6px; font-size: 11px; }
  .dc .delta b { padding: 2px 6px; border-radius: 4px; }
  .dc .area { position: relative; left: auto; top: auto; display: block; width: 100%; height: 52px; margin-top: 12px; }
  .dc .pair { flex-direction: column; gap: 10px; margin-top: 10px; }
  .dc :is(.pair, .trio) p { gap: 2px; }
  .dc :is(.pair, .trio) span { font-size: 11px; }
  .dc .pair b { font-size: 24px; }
  .dc .trio { justify-content: space-between; gap: 8px; margin-top: 10px; }
  .dc .trio b { font-size: 26px; }
}
@media (max-width: 640px) and (max-height: 700px) { .dc .area { display: none; } .results__title { margin-top: 14px; } .dash { margin-top: 16px; } }

/* hero props: the night video has two tall book stacks at its edges; floating
   glass windows (code editor, deploy terminal) stand in their place. .vprops
   is laid out like the video's own object-fit: cover box (1920×1074, centred),
   so the windows stay on the stacks at any screen shape. Portrait phones get
   the portrait video, which doesn't show the stacks, so they're hidden there. */
.vprops { position: absolute; left: 50%; top: 50%; z-index: -1; width: max(100vw, 178.77vh); width: max(100vw, 178.77svh); aspect-ratio: 1920 / 1074; transform: translate(-50%, -50%); container-type: inline-size; perspective: 1400px; pointer-events: none; }
@media (max-aspect-ratio: 4/5) { .vprops { display: none; } }
.vwin { position: absolute; overflow: hidden; text-align: left; border-radius: 1cqw; background: linear-gradient(160deg, rgba(10,24,38,.93), rgba(3,11,19,.95)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 2cqw 5cqw rgba(0,0,0,.45); color: rgba(255,255,255,.88); }
.vwin--code { left: -2.6%; top: 26%; width: 20%; height: 80%; transform: rotateY(14deg); transform-origin: 0 50%; }
.vwin--code .vwin__code, .vwin--code .vwin__bar { padding-left: calc(max(0px, (100cqw - 100vw) / 2) + 2.6cqw + 1.2cqw); }  /* the window bleeds off the left edge: start its text inside the screen */
.vwin--term { left: 82.4%; top: 47%; width: 20.6%; height: 62%; transform: rotateY(-14deg); transform-origin: 100% 50%; }
.vwin__bar { display: flex; align-items: center; gap: .45cqw; height: 2.3cqw; padding: 0 1cqw; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04); font: 500 .72cqw/1 "Inter", system-ui, sans-serif; color: rgba(255,255,255,.6); }
.vwin__bar i { width: .6cqw; height: .6cqw; border-radius: 50%; background: #EE6A5F; }
.vwin__bar i:nth-child(2) { background: #F5BD4F; } .vwin__bar i:nth-child(3) { background: #61C454; }
.vwin__bar span { margin-left: .5cqw; white-space: nowrap; }
.vwin__code { margin: 0; padding: 1.2cqw 1.2cqw; font: 400 .78cqw/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; }
.vwin__code .ln { display: block; }
.vwin .kw { color: #9fd0ff; } .vwin .st { color: #C9D6AB; } .vwin .nu { color: #F5BD4F; } .vwin .cm { color: rgba(255,255,255,.45); }
.vwin .ok { color: #A6FB89; } .vwin .pr { color: #9fd0ff; }
.vwin .cur { display: inline-block; width: .55em; height: 1.15em; vertical-align: -.22em; background: #A6FB89; }
@keyframes vblink { 50% { opacity: 0; } }
@keyframes vline { from { opacity: 0; transform: translateY(.4em); } }
@media (prefers-reduced-motion: no-preference) {
  .vwin .cur { animation: vblink 1.1s steps(1) infinite; }
  .vwin--term .ln { animation: vline .35s var(--ease) both; }  /* the deploy prints itself once */
  .vwin--term .ln:nth-child(2) { animation-delay: .7s; } .vwin--term .ln:nth-child(3) { animation-delay: 1.1s; }
  .vwin--term .ln:nth-child(4) { animation-delay: 1.5s; } .vwin--term .ln:nth-child(5) { animation-delay: 1.9s; }
  .vwin--term .ln:nth-child(6) { animation-delay: 2.3s; }
}
@media (prefers-reduced-transparency: reduce) { .vwin { background: #06121d; } }  /* no backdrop blur on .vwin: it would re-blur every video frame */

/* the two small stacks by the laptops: a phone running an app, and a growth card */
.vwin--phone { left: 17.9%; top: 66.6%; width: 6.1%; height: 17.4%; border-radius: .9cqw; padding: .55cqw .45cqw; display: flex; flex-direction: column; gap: .32cqw; transform: rotate(-4deg); }
.vwin--phone i { display: block; flex: none; border-radius: .25cqw; background: rgba(255,255,255,.14); }
.vwin--phone .vph__notch { align-self: center; width: 30%; height: .32cqw; border-radius: 1cqw; background: rgba(255,255,255,.28); }
.vwin--phone .vph__head { width: 60%; height: .42cqw; background: rgba(255,255,255,.55); }
.vwin--phone .vph__card { height: 2.2cqw; border-radius: .4cqw; background: linear-gradient(135deg, #9fd0ff, #2c6fb3); }
.vwin--phone .vph__row { height: .5cqw; }
.vwin--phone .vph__row:nth-of-type(5) { width: 80%; } .vwin--phone .vph__row:nth-of-type(6) { width: 65%; }
.vwin--phone .vph__tab { margin-top: auto; height: .6cqw; border-radius: 1cqw; background: rgba(166,251,137,.55); }
.vwin--chart { left: 62.4%; top: 70.4%; width: 9.4%; height: 16.6%; padding: .75cqw .8cqw; display: flex; flex-direction: column; transform: rotate(3deg); font-family: "Inter", system-ui, sans-serif; }
.vch__t { margin: 0; font-size: .62cqw; color: rgba(255,255,255,.6); }
.vch__n { margin: .15cqw 0 0; font-size: 1.15cqw; font-weight: 500; letter-spacing: -.03em; color: #fff; }
.vch__bars { flex: 1; display: flex; align-items: flex-end; gap: .3cqw; margin-top: .4cqw; }
.vch__bars i { flex: 1; height: calc(var(--h) * 1%); border-radius: .15cqw .15cqw 0 0; background: linear-gradient(#A6FB89, rgba(166,251,137,.25)); }

/* ══════════ night surfaces: blocks that were dark forest on cream ══════════ */
::selection { background: var(--sage); color: var(--bone); }
.skip { background: var(--sage); color: var(--bone); }
.pill, .btn-primary, .sp-hero .actions .btn-primary, .cta-band .btn-primary { background: var(--sage); color: var(--bone); }  /* primary: the moon's glow, navy text 9.9:1 */
.pill i { background: var(--bone); color: var(--sage); }
.pill.light { background: var(--bone-2); color: var(--forest); box-shadow: inset 0 0 0 1px var(--line-2); }
.pill.light i { background: var(--sage); color: var(--bone); }
@media (hover: hover) and (pointer: fine) { .pill:hover, .btn-primary:hover { background: #C4E3FF; } .pill.light:hover { background: var(--sage-soft); } }
.scard.feature, .quote, .cta-band { background: var(--glass); color: var(--forest); box-shadow: inset 0 0 0 1px rgba(159,208,255,.18); }
.scard.feature .s-f { stroke: var(--sage); } .scard.feature .f-f { fill: var(--sage); }
form.brief, .steps li { background: var(--bone-2); color: var(--forest); box-shadow: inset 0 0 0 1px var(--line); }
.sp-photo .tag { background: rgba(6,24,38,.9); color: var(--forest); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); }
.outcomes li::before { background: var(--sage); color: var(--bone); }
.foot { background: var(--night-deep); color: var(--forest); }
.form-end small { color: var(--muted); }  /* 9:1 on the form card */
.cta-band .btn-ghost { color: var(--forest); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.nav a[aria-current="true"] { background: var(--sage-soft); color: var(--forest); }
.ghost.on-dark { color: var(--forest); box-shadow: inset 0 0 0 1.5px var(--line-2); }

/* ══════════ day theme ══════════
   html[data-theme="day"] (set in <head> before first paint, switched by the
   header button). Same token roles as night; colours taken from the day hero
   (sunrise above the clouds) and the day launch scene (blue sky, pale moon). */
:root[data-theme="day"] {
  --bone: #F4F8FC;            /* page: sky white */
  --bone-2: #FFFFFF;          /* raised surfaces */
  --sage: #1D5FA8;            /* accent: deep sky blue (6.0:1 on the page, white text on it 6.4:1) */
  --sage-soft: #DCEAF7;
  --forest: #0B2338;          /* text (15.6:1) */
  --forest-2: #071A2B;
  --line: rgba(11,35,56,.12);
  --line-2: rgba(11,35,56,.26);
  --dline: rgba(11,35,56,.14);
  --night-deep: #E7EFF7;      /* footer */
  --glass: linear-gradient(160deg, #E4F0FC, #CDE2F6);
  --muted: rgba(11,35,56,.72);
  --grad: linear-gradient(90deg, #1D5FA8, #B4531F, #9E3B2E, #1D5FA8);  /* sky blue into sunrise, ≥4.5:1 on the page */
  --shadow: 0 24px 50px -30px rgba(20,50,80,.35);
  color-scheme: light;
}
.th-day { display: none !important; }
:root[data-theme="day"] .th-day { display: revert !important; }
:root[data-theme="day"] .th-night { display: none !important; }
:root[data-theme="day"] picture.th-day, :root[data-theme="day"] .vhero picture.th-day { display: block !important; }

/* the few colours that were hard-coded for night */
@media (hover: hover) and (pointer: fine) { :root[data-theme="day"] :is(.pill, .btn-primary):hover { background: #174E8B; } }
:root[data-theme="day"] :is(.scard.feature, .quote, .cta-band) { box-shadow: inset 0 0 0 1px rgba(29,95,168,.16); }
:root[data-theme="day"] .sp-photo .tag { background: rgba(255,255,255,.94); }
:root[data-theme="day"] .shot .chrome { background: rgba(255,255,255,.94); }
:root[data-theme="day"] :is(input, textarea)::placeholder { color: rgba(11,35,56,.5); }
@media (hover: hover) and (pointer: fine) { :root[data-theme="day"] .nav a:hover { background: rgba(11,35,56,.06); } }

/* header in day: white glass pills (night keeps the dark glass of html.at-hero) */
:root[data-theme="day"] .top .brand { background: rgba(255,255,255,.78); box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), 0 8px 24px -14px rgba(20,50,80,.45); }
:root[data-theme="day"] .top .nav { background: rgba(255,255,255,.72); box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), 0 8px 24px -14px rgba(20,50,80,.4); }
:root[data-theme="day"] .top .menu-btn { background: rgba(255,255,255,.85); color: var(--forest); box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), 0 8px 24px -14px rgba(20,50,80,.45); }
@media (max-width: 860px) { :root[data-theme="day"] .top .nav { background: rgba(255,255,255,.97); box-shadow: inset 0 0 0 1px var(--line), 0 24px 60px -20px rgba(20,50,80,.4); } }

/* the switch: a round glass button beside "Start a project" (beside Menu on phones) */
.top .nav { margin-left: auto; }   /* nav sits centred between the logo and the right-hand buttons */
.theme-btn { margin-left: auto; flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer; touch-action: manipulation;
  background: rgba(255,255,255,.85); color: var(--forest); box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), 0 8px 24px -14px rgba(20,50,80,.45);
  transition: background-color .35s, color .25s, box-shadow .35s, transform .15s var(--ease-out); }
.theme-btn:active { transform: scale(.92); }
.theme-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.at-hero .theme-btn { background: rgba(255,255,255,.06); color: #fff; box-shadow: inset 0 1px 1px rgba(255,255,255,.12), inset 0 0 0 1px rgba(255,255,255,.18); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
:root[data-theme="night"] .theme-btn .i-moon, :root[data-theme="day"] .theme-btn .i-sun { display: none; }   /* the icon shows where the button takes you */
@media (hover: hover) and (pointer: fine) { .theme-btn:hover { box-shadow: inset 0 0 0 2px currentColor; } }
.theme-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (max-width: 860px) { .top .menu-btn { margin-left: 0; } }

/* switching crossfades the whole page (View Transitions); reduced motion switches instantly */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .5s; animation-timing-function: cubic-bezier(.4, 0, .2, 1); }

/* hero in day: the sunrise film; white type keeps a soft shadow for contrast over the bright sky */
:root[data-theme="day"] .vhero { --vh-bg: #5A8FC4; --vh-muted: rgba(255,255,255,.94); }
:root[data-theme="day"] .vhero :is(h1, .vsub) { text-shadow: 0 2px 28px rgba(8,28,52,.55), 0 1px 3px rgba(8,28,52,.45); }
:root[data-theme="day"] .vhero h1 em { color: #FFE4BF; }

/* launch scene in day: daylight photo, dark title over the pale moon; the results window stays a dark product screen */
:root[data-theme="day"] .scene { --night: #5B96CC; }
:root[data-theme="day"] .results__title { color: #0B2338; }
:root[data-theme="day"] .results__pill { background: rgba(255,255,255,.62); color: #0B2338; }
:root[data-theme="day"] .dash::before { background: rgba(6,20,34,.8); }

/* ══════════ glass cards: services and projects ══════════
   Glass needs something behind it to bend: each row carries soft colour glows
   (moon blue, sunrise gold, dusk violet) and the cards are frosted panes over
   them, so a card's tint shifts as it drifts across. The glows are painted on
   .loop itself: its edge mask makes it the backdrop root, so anything outside
   it would never reach the cards' blur. */
:root { --glow-a: rgba(70,140,255,.42); --glow-b: rgba(245,189,79,.30); --glow-c: rgba(150,110,255,.32);
  --glass-fill: linear-gradient(150deg, rgba(255,255,255,.11), rgba(255,255,255,.035));
  --glass-edge: rgba(255,255,255,.13); --glass-hi: rgba(255,255,255,.28); --glass-shadow: 0 22px 44px -26px rgba(0,0,0,.8); }
:root[data-theme="day"] { --glow-a: rgba(80,150,220,.55); --glow-b: rgba(246,175,120,.55); --glow-c: rgba(160,130,250,.42);
  --glass-fill: linear-gradient(150deg, rgba(255,255,255,.68), rgba(255,255,255,.42));
  --glass-edge: rgba(255,255,255,.9); --glass-hi: #fff; --glass-shadow: 0 22px 44px -26px rgba(20,60,110,.45); }
.loop, .sp-work, .others { background:
  radial-gradient(30% 60% at 10% 58%, var(--glow-a), transparent 72%),
  radial-gradient(26% 55% at 36% 38%, var(--glow-b), transparent 72%),
  radial-gradient(30% 60% at 62% 62%, var(--glow-c), transparent 72%),
  radial-gradient(26% 55% at 88% 40%, var(--glow-a), transparent 72%); }
:is(.loop .scard, .loop .card, .sp-work .card, .others a) {
  background: var(--glass-fill);
  box-shadow: inset 0 0 0 1px var(--glass-edge), inset 0 1px 0 var(--glass-hi), var(--glass-shadow);
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); }
.loop .scard.feature { background: linear-gradient(150deg, rgba(159,208,255,.24), rgba(159,208,255,.08)); }
:root[data-theme="day"] .loop .scard.feature { background: linear-gradient(150deg, rgba(29,95,168,.16), rgba(255,255,255,.5)); }
@media (max-width: 640px) { :is(.loop .scard, .loop .card, .sp-work .card, .others a) { -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :is(.loop .scard, .loop .card, .sp-work .card, .others a) { background: var(--bone-2); }
}
@media (prefers-reduced-transparency: reduce) {
  :is(.loop .scard, .loop .card, .sp-work .card, .others a) { background: var(--bone-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .theme-btn, :root[data-theme="day"] .top :is(.brand, .nav, .menu-btn) { background: var(--bone-2); }
}

:root[data-theme="day"] .vhero .vbtn { background: rgba(8,28,52,.34); text-shadow: 0 1px 3px rgba(8,28,52,.5); }  /* legible over bright clouds */
/* day legibility scrims: white type over bright sky needs a darker ground (night needs none) */
.vhero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
:root[data-theme="day"] .vhero::after { background: radial-gradient(ellipse 52% 34% at 50% 46%, rgba(6,22,42,.66), rgba(6,22,42,.5) 50%, rgba(6,22,42,0) 100%); }
@media (max-aspect-ratio: 4/5) { :root[data-theme="day"] .vhero::after { background: linear-gradient(rgba(6,22,42,.5), rgba(6,22,42,.62) 30%, rgba(6,22,42,.5) 52%, rgba(6,22,42,0) 72%); } }
:root[data-theme="day"] .scene__glow { background: linear-gradient(to top, rgba(6,22,42,.74), rgba(6,22,42,.6) 40%, rgba(6,22,42,.42) 64%, rgba(6,22,42,0) 88%); }
/* Drifting rows: no live backdrop blur. Their backdrop is only the soft glow, so the
   blur pass changed nothing but saturation, while re-blurring every moving card on
   every frame (measured: most of the scroll jank on phones). The glow is painted
   pre-saturated instead; the frosted fill, edge light and shadow stay. Stationary
   glass (service pages, the reduced-motion rows) keeps the real blur. */
.loops .loop :is(.scard, .card) { -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-theme="night"] .loops .loop { --glow-a: rgba(50,120,255,.8); --glow-b: rgba(255,178,40,.56); --glow-c: rgba(145,75,255,.72); }
:root[data-theme="day"] .loops .loop { --glow-a: rgba(70,145,225,.62); --glow-b: rgba(250,165,105,.62); --glow-c: rgba(150,115,250,.50); }
/* screenshot tags and "latest project" chips: one dark-glass chip in both themes
   (they sit over bright site screenshots, so they never flip) */
.shot .ind, .card .new { background: rgba(6,24,38,.88); color: #E8F0F8; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
