/* Landing v4 (stethoscope hero) and v5 (handover hero).
   Every size, spacing and dark colour is read from the Paper file "Nexus · Landing mockup",
   artboards "Landing v4 · Stethoscope hero (dark)" and "Landing v5 · Handover hero (dark)".
   The two artboards are identical except that the hero photo and the photo behind the
   portal window trade places; the html class (v4 / v5) picks them.
   The white view is not drawn in Paper: its values come from base.css's light tokens and
   landing.css's light rules. Colours live in the two token blocks below; rules only use them. */

:root {
  --gutter: 96px;
  --edge: 72px;
  --c-sub: #9A9CA0;
  --c-dim: #8E9094;
  --c-label: #B4B6BA;
  --c-hair: #FFFFFF24;
  --c-field: #17181A;
  --c-card: #0F1011;
  --c-line: #FFFFFF14;
  --c-line-2: #FFFFFF1A;
  --c-line-dash: #FFFFFF29;
  --c-trace: #FFFFFF38;
  --c-outline: #FFFFFF73;
  --c-outline-66: #FFFFFF66;
  --c-outline-80: #FFFFFF80;
  --c-glass: #FFFFFF38;
  --c-glass-hover: #FFFFFF4D;
  --c-glass-line: #FFFFFF8C;
  --c-glass-shine: #FFFFFF59;
  --c-round: #0B0B0C59;
  --c-round-line: #FFFFFF59;
  --c-chip: #1F2023;
  --c-chip-ink: #D5D7DA;
  --c-eyebrow: #FFFFFFD1;
  --c-hero-sub: #FFFFFFEB;
  --c-play-line: #FFFFFFBF;
  --c-play-hover: #FFFFFF24;
  --c-browse-line: #FFFFFF38;
  --c-rail: #3A3B3E;
  --c-dash: #3A3B3E;
  --c-preview: #17181A;
  --c-ws: #1C1D1FF0;
  --c-ws-row: #2A2B2E;
  --c-ws-note: #C9CBCF;
  --c-window: #17181A;
  --c-window-line: #2A2B2E;
  --c-patch: #0F1011;
  --c-calc: #17181A;
  --c-calc-field: #1F2023;
  --c-calc-focus: #FFFFFF66;
  --c-founder: #1C1D1F;
  --c-founder-a: #2E3033;
  --c-founder-b: #1E1F22;
  --c-founder-kind: #FFFFFFC7;
  --c-founder-p: #FFFFFFDB;
  --c-cta: #0B0B0C;
  --c-ruler-mark: #6FA3A8;
  --ghost-img: url("assets/logo-white.png");
  --ghost-opacity: 0.4;
  /* Photo fades: each one runs into the surface the photo sits on */
  --g-hero-left: linear-gradient(90deg, #0B0B0C 0%, #0B0B0C00 100%);
  --g-hero-left-narrow: linear-gradient(90deg, #0B0B0CE6 0%, #0B0B0C80 100%);
  --g-hero-bottom: linear-gradient(180deg, #0B0B0C00 0%, #0B0B0C 100%);
  --g-hero-top: linear-gradient(180deg, #0B0B0CEB 0%, #0B0B0CB3 45%, #0B0B0C00 100%);
  --g-hero-right: linear-gradient(90deg, #0B0B0C00 0%, #0B0B0C 100%);
  --g-coat: linear-gradient(90deg, #0B0B0C00 0%, #0B0B0C00 48%, #0B0B0C8C 76%, #0B0B0C 100%);
  --g-preview: linear-gradient(90deg, #0B0B0C 0%, #0B0B0C8C 14%, #0B0B0C00 40%, #0B0B0C00 100%);
  --g-stage: linear-gradient(180deg, #0B0B0C 0%, #0B0B0C59 100%);
  --g-founder: linear-gradient(180deg, #14151700 0%, #141517D1 62%, #141517F0 100%);
  --g-cta: linear-gradient(90deg, #0B0B0C 0%, #0B0B0C 8%, #0B0B0CB3 30%, #0B0B0C1F 62%, #0B0B0C00 100%);
  --g-cta-narrow: var(--g-cta);
  /* White view only: the two framed photos also fade out themselves, so their rounded edge leaves no dark fringe */
  --m-hero: none;
  --clip-hero: none;
  --m-coat: none;
  --m-preview: none;
  --g-footer: linear-gradient(180deg, #0B0B0C 0%, #0B0B0CDB 30%, #0B0B0C99 70%, #0B0B0C73 100%);
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
}
:root[data-theme="light"] {
  --c-sub: #55575B;
  --c-dim: #63656A;
  --c-label: #55575B;
  --c-hair: #1C1D1F24;
  --c-field: #F1F1EC;
  --c-card: #FFFFFF;
  --c-line: #1C1D1F1A;
  --c-line-2: #1C1D1F1A;
  --c-line-dash: #1C1D1F33;
  --c-trace: #1C1D1F33;
  --c-outline: #1C1D1F66;
  --c-outline-66: #1C1D1F66;
  --c-outline-80: #1C1D1F80;
  --c-glass: rgba(17, 18, 19, 0.1);
  --c-glass-hover: rgba(17, 18, 19, 0.16);
  --c-glass-line: rgba(17, 18, 19, 0.35);
  --c-glass-shine: #FFFFFF99;
  --c-round: #FFFFFF99;
  --c-round-line: #1C1D1F4D;
  --c-chip: #F1F1EC;
  --c-chip-ink: #3D3F43;
  --c-eyebrow: #1C1D1FCC;
  --c-hero-sub: #2A2C2F;
  --c-play-line: #1C1D1FBF;
  --c-play-hover: #1C1D1F14;
  --c-browse-line: #1C1D1F40;
  --c-rail: #CFCFC8;
  --c-dash: #C4C4BD;
  --c-preview: #FAFAF7;
  --c-ws: #FFFFFFF2;
  --c-ws-row: #F1F1EC;
  --c-ws-note: #55575B;
  --c-window: #FFFFFF;
  --c-window-line: #D4D4CE;
  --c-patch: #FAFAF7;
  --c-calc: #FFFFFF;
  --c-calc-field: #F1F1EC;
  --c-calc-focus: #1C1D1F66;
  --c-founder: #E9E9E3;
  --c-founder-a: #F1F1EC;
  --c-founder-b: #E9E9E3;
  --c-founder-kind: #55575B;
  --c-founder-p: #3D3F43;
  --c-cta: #FFFFFF;
  --c-ruler-mark: #2F5E5B;
  --ghost-img: url("assets/logo-color.png");
  --ghost-opacity: 0.12;
  --g-hero-left: linear-gradient(90deg, #FAFAF7 0%, #FAFAF7 36%, #FAFAF7E0 50%, #FAFAF7A6 64%, #FAFAF74D 82%, #FAFAF700 100%);
  --g-hero-left-narrow: linear-gradient(90deg, #FAFAF7F2 0%, #FAFAF7B8 100%);
  --g-hero-bottom: linear-gradient(180deg, #FAFAF700 0%, #FAFAF7 100%);
  --g-hero-top: linear-gradient(180deg, #FAFAF7F5 0%, #FAFAF7B3 45%, #FAFAF700 100%);
  --g-hero-right: linear-gradient(90deg, #FAFAF700 0%, #FAFAF7 100%);
  --g-coat: linear-gradient(90deg, #FAFAF700 0%, #FAFAF700 48%, #FAFAF78C 74%, #FAFAF7 96%, #FAFAF7 100%);
  --g-preview: linear-gradient(90deg, #FAFAF7 0%, #FAFAF7 3%, #FAFAF78C 15%, #FAFAF700 40%, #FAFAF700 100%);
  --g-stage: linear-gradient(180deg, #FAFAF7 0%, #FAFAF740 100%);
  --g-founder: linear-gradient(180deg, #E9E9E300 0%, #E9E9E3D1 62%, #E9E9E3F0 100%);
  --g-cta: linear-gradient(90deg, #FFFFFF 0%, #FFFFFF 8%, #FFFFFFB3 30%, #FFFFFF1F 62%, #FFFFFF00 100%);
  --g-cta-narrow: linear-gradient(90deg, #FFFFFFF2 0%, #FFFFFFD9 55%, #FFFFFFB3 100%);
  --m-coat: linear-gradient(90deg, #000 0%, #000 70%, transparent 97%);
  --m-preview: linear-gradient(90deg, transparent 0%, transparent 1.5%, #000 14%);
  --g-footer: linear-gradient(180deg, #FAFAF7 0%, #FAFAF7EB 30%, #FAFAF7CC 70%, #FAFAF7B8 100%);
}
/* White view on the desktop layout: the hero photo fades out itself (same curves as the overlays above, written
   as a mask) instead of sitting under page-coloured overlays, so the page beside it stays one flat colour.
   The bottom fade ends 44px early because the photo drifts down by up to 43px on scroll. */
@media (min-width: 1001px) {
  :root[data-theme="light"] {
    --g-hero-left: none; --g-hero-bottom: none; --g-hero-top: none; --g-hero-right: none;
    /* The first 144px of the photo are fully masked out; clipping 12px of that keeps a masked edge from showing as a hairline */
    --clip-hero: inset(0 0 0 12px);
    --m-hero: linear-gradient(90deg, transparent 0%, transparent 15.65%, rgba(0, 0, 0, 0.12) 21.74%, rgba(0, 0, 0, 0.35) 27.83%, rgba(0, 0, 0, 0.7) 35.65%, #000 43.48%),
      linear-gradient(180deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.04) 3.26%, rgba(0, 0, 0, 0.3) 14%, #000 27.2%, #000 72%, transparent 92%);
  }
}
@media (min-width: 1441px) {
  :root[data-theme="light"] {
    --clip-hero: inset(0 12px);
    --m-hero: linear-gradient(90deg, transparent 0%, transparent 15.65%, rgba(0, 0, 0, 0.12) 21.74%, rgba(0, 0, 0, 0.35) 27.83%, rgba(0, 0, 0, 0.7) 35.65%, #000 43.48%, #000 calc(100% - 172px), transparent calc(100% - 12px)),
      linear-gradient(180deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.04) 3.26%, rgba(0, 0, 0, 0.3) 14%, #000 27.2%, #000 72%, transparent 92%);
  }
}
.v4 { --hero-img: url("assets/stethoscope.jpg"); --backdrop-img: url("assets/handover-keys.jpg"); }
.v5 { --hero-img: url("assets/handover-keys.jpg"); --backdrop-img: url("assets/stethoscope.jpg"); }

body { font-size: 12px; line-height: 16px; overflow-x: clip; }
h2 { font-size: 38px; line-height: 46px; font-weight: 300; letter-spacing: -0.02em; text-wrap: wrap; }
h2.h-44 { font-size: 44px; line-height: 48px; letter-spacing: -0.03em; }
h3 { font-weight: 400; }
section[id] { scroll-margin-top: 48px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pill { letter-spacing: 0; }

/* ───────── Buttons: base.css gives the pill shape; Paper's paddings set the sizes ───────── */
.btn { position: relative; min-height: 0; padding: 11px 20px; gap: 10px; font-size: 14px; line-height: 18px; color: var(--ink); }
.btn:active { scale: 0.97; }
.btn svg { flex-shrink: 0; }
/* Paper's buttons are 36–46px tall; the hit area is always at least 44px */
.btn::after, .browse-chip::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
.btn-arrow { padding: 11px 16px 11px 20px; }
.btn-talk { padding: 10px 18px; }
.btn-46 { height: 46px; padding: 0 24px; font-size: 15px; }
.btn-44 { height: 44px; padding: 0 20px; }
.btn-sm { padding: 9px 14px 9px 16px; gap: 8px; font-size: 13px; line-height: 16px; }
.btn-search { height: 48px; padding: 0 20px 0 24px; flex-shrink: 0; }
.btn-outline { border: 1px solid var(--c-outline); }
.btn-outline-66 { border: 1px solid var(--c-outline-66); }
.btn-outline-80 { border: 1px solid var(--c-outline-80); }
.btn-glass { background: var(--c-glass); border: 1px solid var(--c-glass-line); box-shadow: inset 0 1px 0 var(--c-glass-shine); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.btn-glass.is-flat { box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .btn-outline-66:hover, .btn-outline-80:hover { border-color: var(--ink); }
  .btn-glass:hover { background: var(--c-glass-hover); }
}

.chips { display: flex; gap: 8px; }
.chip { height: 24px; padding: 0 9px; background: var(--c-chip); color: var(--c-chip-ink); }
.chip-blue { background: #2C4F6E; color: #DCEBF6; }
.chip-define { color: var(--ink); }
.chip-black { background: #0B0B0C; color: #FFFFFF; }
.eyebrow-l { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.14em; color: var(--c-sub); }

/* ───────── Nav (sits on the hero in Paper; fixed here, frosted after 24px of scroll) ───────── */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 30; color: var(--ink); }
/* base.css keeps the white logo over a photo hero in the white view; here the nav sits on the light page fade */
:root[data-theme="light"] .nav:not(.is-stuck) .logo { background-image: url("assets/logo-color.png"); }
.nav::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 68px; background: color-mix(in srgb, var(--page) 82%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); opacity: 0; transition: opacity 250ms ease; pointer-events: none; }
.nav.is-stuck::before { opacity: 1; }
.nav-in { position: relative; max-width: 1440px; margin-inline: auto; padding: 40px var(--edge) 0; display: flex; align-items: center; justify-content: space-between; transition: transform 300ms var(--ease-out); }
.nav.is-stuck .nav-in { transform: translateY(-28px); }
.nav-side { display: flex; flex-shrink: 0; width: 300px; }
.nav-right { align-items: center; justify-content: flex-end; gap: 20px; }
/* Signed-in state (session.js): the "Client portal" link becomes the person's avatar and a small menu */
.nav-account { position: relative; display: flex; }
.nav-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font-size: 13px; line-height: 16px; font-weight: 700; letter-spacing: 0.02em; transition: scale 150ms ease-out; }
.nav-avatar:active { scale: 0.96; }
.nav-avatar:focus-visible, .account-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.account-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 5; min-width: 224px; display: flex; flex-direction: column; padding: 8px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); transform-origin: 100% 0; animation: account-in 160ms var(--ease-out); }
.account-menu[hidden] { display: none; }
.account-who { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.account-who b { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.account-who span { font-size: 12px; line-height: 16px; color: var(--muted); }
.account-item { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; font-size: 14px; line-height: 18px; font-weight: 500; color: var(--ink); text-align: left; }
@media (hover: hover) and (pointer: fine) { .account-item:hover { background: var(--row); } }
@keyframes account-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .account-menu { animation: none; } .nav-avatar { transition: none; } }
.nav-links { display: flex; align-items: center; gap: 40px; }
.nav-links a, .nav-portal { position: relative; font-size: 14px; line-height: 18px; font-weight: 500; }
.nav-links a::before, .nav-portal::before { content: ""; position: absolute; inset: -13px -8px; }
.nav-links a::after, .nav-portal::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 250ms var(--ease-out); }
.nav-round { position: relative; display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 999px; background: var(--c-round); border: 1px solid var(--c-round-line); transition: scale 150ms ease-out, border-color 150ms ease; }
.nav-round:active { scale: 0.97; }
.nav-menu { display: none; align-content: center; justify-items: center; gap: 5px; }
.nav-menu i { display: block; width: 16px; height: 1.5px; background: currentColor; }
.menu { position: absolute; top: 64px; left: 12px; right: 12px; display: grid; padding: 8px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-2); }
.menu a, .menu button { display: flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 16px; line-height: 20px; font-weight: 500; text-align: left; }
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover::after, .nav-portal:hover::after { transform: scaleX(1); }
  .nav-round:hover { border-color: var(--ink); }
}

/* ───────── Hero ───────── */
.hero { position: relative; height: 860px; overflow: clip; background: var(--page); color: var(--ink); }
.hero-stage { position: absolute; inset: 0; max-width: 1440px; margin-inline: auto; }
/* Paper: photo 920×920 at left 520 / top −30 of the 1440 artboard, fades over its left, bottom and top */
.hero-photo { position: absolute; left: 36.111%; right: 0; top: -30px; height: 920px; overflow: clip; transform: translate3d(0, var(--drift, 0px), 0); -webkit-mask-image: var(--m-hero); mask-image: var(--m-hero); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-composite: source-in; mask-composite: intersect; clip-path: var(--clip-hero); }
.hero-photo-img { position: absolute; inset: 0; background: var(--hero-img) 50% / cover no-repeat; animation: hero-settle 1600ms var(--ease-out) both; }
.hero-fade { position: absolute; left: 36.111%; }
.hero-fade.is-left { top: 0; width: 27.778%; height: 860px; background: var(--g-hero-left); }
.hero-fade.is-bottom { right: 0; top: 660px; height: 200px; background: var(--g-hero-bottom); }
.hero-fade.is-top { right: 0; top: 0; height: 220px; background: var(--g-hero-top); }
/* Where a fade ends in solid page colour on the photo's own edge, a 4px strip of page colour straddles that edge,
   so no sliver of the photo shows beside it at fractional zoom. Invisible in dark; needed in the white view,
   where the photo is darker than the page. */
.hero-fade.is-left::after, .hero-fade.is-bottom::after, .hero-fade.is-right::after { content: ""; position: absolute; background: var(--page); }
.hero-fade.is-left::after { left: -2px; top: 0; bottom: 0; width: 4px; }
.hero-fade.is-bottom::after { left: -2px; right: 0; bottom: -2px; height: 4px; }
.hero-fade.is-right::after { right: -2px; top: 0; bottom: 0; width: 4px; }
/* Wider than the artboard: the photo would end in a hard edge, so it fades into the page there */
.hero-fade.is-right { display: none; left: auto; right: 0; top: 0; width: 160px; height: 860px; background: var(--g-hero-right); }
@media (min-width: 1441px) { .hero-fade.is-right { display: block; } }
/* Hairline grid removed at the designer's request; kept in markup, hidden here */
.grid-v, .grid-h, .foot-v, .foot-h { display: none !important; }
.grid-v, .grid-h { position: absolute; background: var(--c-hair); }
.grid-v { top: 0; width: 1px; height: 860px; transform-origin: 50% 0; animation: draw-v 1100ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + 150ms); }
.grid-h { left: 0; right: 0; height: 1px; transform-origin: 0 50%; animation: draw-h 1300ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 120ms + 250ms); }
.gv1 { left: var(--edge); } .gv2 { left: 50%; } .gv3 { left: 72.5%; } .gv4 { right: calc(var(--edge) - 1px); }
.gh1 { top: 116px; } .gh2 { top: 620px; }
.hero-in { position: relative; max-width: 1440px; margin-inline: auto; }
/* Paper: nav row 84px, then the copy block with 128px above and 104px to its left */
.hero-copy { width: 820px; max-width: 100%; padding: 212px 0 0 104px; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.hero-eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.14em; color: var(--c-eyebrow); }
.hero-eyebrow::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 999px; background: #6FA3A8; }
.hero h1 { font-size: 84px; line-height: 88px; font-weight: 300; letter-spacing: -0.045em; text-wrap: wrap; }
.hero-sub { width: 500px; max-width: 100%; font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 32px; color: var(--c-hero-sub); }
.hero-buttons { display: flex; align-items: center; gap: 12px; padding-top: 8px; }
.hero-play-wrap { display: flex; padding-left: 12px; }
.hero-play { position: relative; display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--c-play-line); color: var(--ink); transition: scale 150ms ease-out, background-color 150ms ease; }
.hero-play::after { content: ""; position: absolute; inset: -6px; }
.hero-play:active { scale: 0.97; }
@media (hover: hover) and (pointer: fine) { .hero-play:hover { background: var(--c-play-hover); } }
/* First load: each line rises 14px and fades, 70ms apart; the photo settles from 106%; the hairlines draw in */
.rise { animation: rise 700ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms + 150ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes hero-settle { from { transform: scale(1.06); } }
@keyframes draw-v { from { transform: scaleY(0); } }
@keyframes draw-h { from { transform: scaleX(0); } }

/* ───────── Heartbeat line: a faint trace with a bright pulse running along it ───────── */
.pulse { max-width: 1440px; height: 72px; margin-inline: auto; padding-inline: var(--edge); display: flex; align-items: center; justify-content: center; }
.pulse svg { display: block; width: 100%; height: 56px; overflow: visible; }
.pulse path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pulse .pulse-trace { stroke: var(--c-trace); stroke-width: 1; }
.pulse .pulse-still, .pulse .pulse-beat { stroke: #6FA3A8; stroke-width: 1.75; }
/* Paper draws the pulse at rest over the middle beat; with motion on, it runs instead */
.pulse .pulse-beat { stroke-dasharray: 90 910; stroke-dashoffset: 90; opacity: 0; }
.js-motion .pulse .pulse-still { opacity: 0; }
.js-motion .pulse .pulse-beat { opacity: 1; animation: pulse-run 5.5s linear infinite; }
@keyframes pulse-run { to { stroke-dashoffset: -910; } }

/* ───────── Partner strip: logo slots until Nexus supplies real logos. No invented names. ───────── */
.strip { max-width: 1440px; margin-inline: auto; padding: 8px 120px 48px; display: flex; flex-direction: column; gap: 20px; background: var(--page); }
.strip-cap { text-align: center; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-dim); }
.strip-track { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo-slot { flex: none; display: grid; place-items: center; width: 168px; height: 56px; border: 1px dashed var(--c-line-dash); border-radius: 8px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--c-dim); white-space: nowrap; }
/* Looping: the six slots start exactly where Paper puts them (120px in, 38.4px apart) and travel left.
   One period is 6 × (168 + 38.4) = 1238.4px; the track holds five copies and moves by one. */
.strip.is-loop { max-width: none; padding-inline: 0; overflow: clip; -webkit-mask-image: linear-gradient(90deg, transparent, #000 120px, #000 calc(100% - 120px), transparent); mask-image: linear-gradient(90deg, transparent, #000 120px, #000 calc(100% - 120px), transparent); }
.strip.is-loop .strip-track { justify-content: flex-start; gap: 38.4px; width: max-content; margin-left: max(120px, calc(50% - 600px)); padding-right: 38.4px; animation: strip-loop 42s linear infinite; }
@keyframes strip-loop { from { transform: translateX(-1238.4px); } to { transform: translateX(-2476.8px); } }
@media (hover: hover) and (pointer: fine) { .strip.is-loop:hover .strip-track { animation-play-state: paused; } }

/* ───────── Sections ───────── */
.sec { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); display: flex; flex-direction: column; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.head-main { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.head-fixed { flex: 0 1 620px; }
.head-note { flex: 0 1 520px; padding-bottom: 6px; font-size: 15px; line-height: 24px; color: var(--c-sub); }
.head-note-s { flex-basis: 420px; }

/* Scroll reveal: one rise per block, once. Only armed when clinical.js has started. */
.js-motion .reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }
.js-motion .reveal.is-in { opacity: 1; transform: none; }

/* ───────── Marketplace preview ───────── */
.market { padding-top: 56px; padding-bottom: 24px; gap: 32px; }
.search { display: flex; flex-direction: column; gap: 16px; padding: 20px 24px 22px; border-radius: 12px; background: var(--c-card); border: 1px solid var(--c-line-2); }
.search-top { display: flex; align-items: center; justify-content: space-between; }
.shortlist { font-size: 13px; line-height: 16px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.fields { display: flex; align-items: flex-end; gap: 12px; }
.field { flex: 1 1 0%; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.field-wide { flex-grow: 1.4; }
.field-label { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--c-label); }
.select { position: relative; display: block; }
.select svg { position: absolute; right: 16px; top: 17px; color: var(--c-label); pointer-events: none; }
.select select, .field input { display: block; width: 100%; height: 48px; margin: 0; border: 0; border-radius: 8px; background: var(--c-field); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 18px; font-weight: 500; padding: 0 16px; -webkit-appearance: none; appearance: none; }
.select select { padding-right: 40px; cursor: pointer; }
.field input::placeholder { color: var(--c-dim); font-weight: 400; opacity: 1; }
.select select:focus-visible, .field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.browse { display: flex; align-items: center; gap: 10px; }
.browse-label { padding-right: 6px; }
.browse-chip { position: relative; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--c-browse-line); font-size: 13px; line-height: 16px; font-weight: 500; color: var(--ink); transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, scale 150ms ease-out; }
.browse-chip:active { scale: 0.97; }
.browse-chip[aria-pressed="true"] { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
@media (hover: hover) and (pointer: fine) { .browse-chip:hover { border-color: var(--ink); } }

.cards { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; min-width: 0; overflow: clip; border-radius: 12px; background: var(--c-card); border: 1px solid var(--c-line); }
.card-photo { position: relative; flex-shrink: 0; height: 250px; overflow: clip; }
.card-photo-link { display: block; height: 100%; }
.card-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.photo-chip { position: absolute; left: 14px; bottom: 14px; padding: 5px 9px; border-radius: 4px; background: #0B0B0CC7; color: #FFFFFF; font-size: 12px; line-height: 16px; font-weight: 500; }
.card-body { flex: 1 1 0%; display: flex; flex-direction: column; gap: 20px; padding: 24px; }
.card-head { display: flex; flex-direction: column; gap: 10px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-kind { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.1em; color: var(--ink); }
.card-id { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.04em; color: var(--c-dim); white-space: nowrap; }
.card h3 { font-size: 22px; line-height: 28px; letter-spacing: -0.01em; color: var(--ink); }
.card-price { display: flex; flex-direction: column; gap: 6px; }
.price-label { font-size: 13px; line-height: 16px; color: var(--c-dim); }
.price-value { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--c-label); }
.card-price .chips { padding-top: 6px; flex-wrap: wrap; }
.facts { display: flex; gap: 10px; }
.fact { flex: 1 1 0%; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 8px; background: var(--c-field); }
.fact span { font-size: 12px; line-height: 16px; color: var(--c-sub); }
.fact b { font-size: 16px; line-height: 20px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.fact b.is-locked { color: var(--c-sub); }
.card-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--c-line); }
.card-actions { display: flex; align-items: center; gap: 18px; }
.save { display: flex; align-items: center; gap: 6px; height: 44px; font-size: 13px; line-height: 16px; font-weight: 500; color: var(--c-label); transition: color 150ms ease; }
.save svg { fill: none; }
.save[aria-pressed="true"] { color: var(--ink); }
.save[aria-pressed="true"] svg { fill: currentColor; animation: pop 320ms var(--ease-out); }
@keyframes pop { 40% { transform: scale(1.3); } }
.compare { font-size: 13px; line-height: 44px; font-weight: 500; color: var(--c-label); transition: color 150ms ease; }
.empty { padding: 48px; border: 1px dashed var(--line-2); border-radius: 12px; text-align: center; font-size: 14px; line-height: 20px; color: var(--c-sub); }
.register { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 20px 18px 24px; border-radius: 12px; background: var(--c-card); border: 1px solid var(--c-line); }
.register-text { display: flex; align-items: center; gap: 14px; font-size: 14px; line-height: 18px; font-weight: 500; color: var(--ink); }
.register-text svg { flex-shrink: 0; }
.register-actions { display: flex; align-items: center; flex-shrink: 0; gap: 20px; }
.open-compare { position: relative; font-size: 14px; line-height: 18px; font-weight: 500; color: var(--c-label); text-decoration: underline 1px; text-underline-position: from-font; transition: color 150ms ease; }
.open-compare::after { content: ""; position: absolute; inset: -13px -6px; }
@media (hover: hover) and (pointer: fine) {
  .card:hover .card-photo img { transform: scale(1.04); }
  .save:hover, .compare:hover, .open-compare:hover { color: var(--ink); }
}

/* ───────── For practice owners ───────── */
.owners { flex-direction: row; align-items: center; justify-content: space-between; gap: 80px; padding-top: 72px; padding-bottom: 64px; }
.coat { position: relative; flex: 0 1 688px; min-width: 0; height: 460px; overflow: clip; border-radius: 12px; filter: grayscale(1); }
.coat-wipe, .coat-img { position: absolute; inset: 0; }
.coat-wipe { overflow: clip; }
.coat-img { background: url("assets/coat.jpg") 50% 24% / cover no-repeat; -webkit-mask-image: var(--m-coat); mask-image: var(--m-coat); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.coat-img::after { content: ""; position: absolute; inset: 0; background: var(--g-coat); }
.owners-copy { flex: 0 1 480px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.owners-copy p, .portal-side p, .cta-copy p { font-size: 16px; line-height: 26px; color: var(--c-sub); }
/* The photo opens from the left as it enters: the frame and the picture slide against each other,
   so only the visible edge moves (transform and opacity only). */
.js-motion .wipe { opacity: 0; transition: opacity 500ms ease; }
.js-motion .wipe .coat-wipe, .js-motion .wipe .coat-img { transition: transform 900ms var(--ease-out); }
.js-motion .wipe .coat-wipe { transform: translateX(-24%); }
.js-motion .wipe .coat-img { transform: translateX(24%); }
.js-motion .wipe.is-in { opacity: 1; }
.js-motion .wipe.is-in .coat-wipe, .js-motion .wipe.is-in .coat-img { transform: none; }

/* ───────── How it works ───────── */
.how { padding-top: 48px; padding-bottom: 96px; gap: 56px; }
.how-row { display: flex; justify-content: space-between; gap: 80px; }
.how-left { flex: 0 1 480px; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.steps { position: relative; display: flex; flex-direction: column; }
.steps-rail { position: absolute; left: 8px; top: 14px; bottom: 24px; width: 1px; background: var(--c-rail); transform-origin: top; }
.step { position: relative; display: flex; align-items: flex-start; gap: 16px; padding-bottom: 28px; }
.step:last-child { padding-bottom: 0; }
.step-mark { flex-shrink: 0; width: 17px; height: 17px; border-radius: 2px; background: var(--btn); }
.step-text { flex-grow: 1; display: flex; flex-direction: column; gap: 10px; padding-bottom: 28px; border-bottom: 1px dashed var(--c-dash); }
.step:last-child .step-text { padding-bottom: 0; border-bottom: 0; }
.step h3 { font-size: 16px; line-height: 18px; font-weight: 500; color: var(--ink); }
.step p { width: 300px; max-width: 100%; font-size: 14px; line-height: 22px; color: var(--c-sub); }
.how-left > .btn { align-self: flex-start; }
/* The rail draws in and each step brightens as the list scrolls past; the end state is Paper's */
.js-motion .steps-rail { transform: scaleY(var(--p, 0)); }
.js-motion .step { opacity: 0.4; transition: opacity 300ms ease; }
.js-motion .step.is-on { opacity: 1; }
.js-motion .step-mark { transition: transform 300ms var(--ease-out); }
.js-motion .step:not(.is-on) .step-mark { transform: scale(0.82); }
.preview { position: relative; flex: 0 1 688px; min-width: 0; height: 460px; overflow: clip; border-radius: 12px; background: var(--c-preview); }
.preview-img { position: absolute; inset: 0; background: url("assets/courtyard.jpg") 50% / cover no-repeat; filter: grayscale(1); -webkit-mask-image: var(--m-preview); mask-image: var(--m-preview); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.preview-img::after { content: ""; position: absolute; inset: 0; background: var(--g-preview); }
/* Video beside the five stages (Paper: Landing v6, How it works). The photo keeps its fade into the page. */
.preview-video { height: auto; min-height: 622px; align-self: stretch; --vsl-shade: rgba(11,11,12,0.78); --vsl-ink: #FFFFFF; --vsl-sub: #D5D7DA; }
:root[data-theme="light"] .preview-video { --vsl-shade: rgba(250,250,247,0.9); --vsl-ink: var(--ink); --vsl-sub: var(--muted); }
.vsl-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 220px; background: linear-gradient(180deg, transparent 0%, var(--vsl-shade) 100%); pointer-events: none; }
.vsl-play { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; display: flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--glass); color: var(--glass-ink); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-shine); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: scale 150ms ease-out, background-color 150ms ease; }
.vsl-play:active { scale: 0.96; }
.vsl-play:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .vsl-play:hover { background: var(--glass-hover); scale: 1.04; } }
.vsl-caption { position: absolute; left: 28px; right: 28px; bottom: 28px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.vsl-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vsl-text b { font-size: 20px; line-height: 24px; font-weight: 500; color: var(--vsl-ink); }
.vsl-text span { font-size: 13px; line-height: 20px; color: var(--vsl-sub); }
.vsl-tag { flex-shrink: 0; padding: 5px 9px; border-radius: 4px; background: #0B0B0CC7; color: #FFFFFF; font-size: 12px; line-height: 16px; font-weight: 500; }
.how:has(.preview-video) .step { padding-bottom: 22px; }
.how:has(.preview-video) .step:last-child { padding-bottom: 0; }
.how:has(.preview-video) .step-text { padding-bottom: 22px; }
.how:has(.preview-video) .step:last-child .step-text { padding-bottom: 0; }
.how:has(.preview-video) .step p { width: 400px; }
.how:has(.preview-video) .step-text { min-width: 0; } /* lets the 400px line shrink on phones instead of widening the page */
/* NEXUS method: each marker carries its letter; the phase name is followed by a quieter description */
.step-mark[data-l] { display: flex; align-items: center; justify-content: center; color: var(--btn-ink); font-size: 11px; line-height: 12px; font-weight: 800; }
.step-mark[data-l]::before { content: attr(data-l); }
.step h3 em { font-style: normal; font-weight: 400; color: var(--c-sub); }
@media (max-width: 1000px) { .preview-video { min-height: 420px; } }
@media (prefers-reduced-motion: reduce) { .vsl-play { transition: none; } }
.ws { position: absolute; left: 190px; top: 88px; width: 540px; height: 420px; display: flex; flex-direction: column; gap: 22px; padding: 26px 28px; border-radius: 12px; background: var(--c-ws); border: 1px solid var(--c-line-2); color: var(--ink); }
.ws-top { display: flex; align-items: center; gap: 10px; padding-bottom: 20px; border-bottom: 1px solid var(--c-line); font-size: 16px; line-height: 20px; font-weight: 600; }
.ws-dot { flex-shrink: 0; width: 18px; height: 18px; border-radius: 999px; background: #6FA3A8; }
.ws-next { display: flex; flex-direction: column; gap: 8px; }
.ws-next b { font-size: 20px; line-height: 24px; font-weight: 500; }
.ws-next > span { font-size: 13px; line-height: 20px; color: var(--c-sub); }
.ws-next .chips { padding-top: 4px; }
.ws-label { font-size: 13px; line-height: 16px; font-weight: 600; }
.ws-rows { display: flex; flex-direction: column; gap: 10px; width: 440px; max-width: 100%; }
.ws-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 8px; background: var(--c-ws-row); font-size: 14px; line-height: 18px; font-weight: 500; }
.ws-row em { font-style: normal; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--c-ws-note); }
/* The card follows the step being read */
.ws-next b, .ws-next > span, .ws-next .chip-black { transition: opacity 180ms ease, transform 220ms var(--ease-out); }
.ws-next.is-swapping b, .ws-next.is-swapping > span, .ws-next.is-swapping .chip-black { opacity: 0; transform: translateY(6px); }

/* ───────── Client portal ───────── */
.portal-band { border-top: 1px solid var(--c-line); }
.portal { padding-top: 96px; padding-bottom: 112px; gap: 48px; }
.portal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; }
.portal-main { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; min-width: 0; }
.portal-side { flex: 0 1 480px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.stage { position: relative; height: 520px; display: flex; justify-content: center; padding-top: 44px; overflow: clip; }
.stage-photo { position: absolute; inset: 180px 0 0 0; background: var(--backdrop-img) 50% / cover no-repeat; }
.stage-fade { position: absolute; inset: 180px 0 0 0; background: var(--g-stage); box-shadow: 0 -1px 0 var(--page); }
.window { position: relative; flex-shrink: 0; width: 1140px; max-width: calc(100% - 40px); height: 520px; overflow: clip; background: var(--c-window); border: 6px solid var(--c-window-line); border-bottom: 0; border-radius: 12px 12px 0 0; }
.shot { display: block; width: 100%; height: auto; }
/* One capture per view, as on the first landing */
.shot-light, :root[data-theme="light"] .shot-dark { display: none; }
:root[data-theme="light"] .shot-light { display: block; }
/* The window rises a little further than the other blocks as it enters */
.js-motion .window.reveal { transform: translateY(40px); transition-duration: 600ms, 900ms; }
.js-motion .window.reveal.is-in { transform: none; }
.sample-note { font-size: 12px; line-height: 18px; color: var(--c-dim); }
/* Live folders sit exactly over the ones in the capture (drawn at 1440 wide, scaled to the window) */
.live { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; transform-origin: 0 0; transform: scale(var(--s, 0.7833)); pointer-events: none; }
.live:not(.is-on) { display: none; }
.live-patch { position: absolute; left: 300px; top: 338px; width: 1112px; height: 222px; background: var(--c-patch); }
.live-folders { position: absolute; left: 308px; top: 346px; pointer-events: auto; }

/* ───────── Resources ───────── */
.resources { padding-top: 96px; padding-bottom: 24px; gap: 48px; }
.calcs { display: flex; gap: 20px; }
.calc { position: relative; flex: 1 1 0%; min-width: 0; display: flex; flex-direction: column; gap: 28px; padding: 28px; border-radius: 12px; background: var(--c-calc); border: 1px solid var(--c-line); }
.calc-text { display: flex; flex-direction: column; gap: 12px; }
.calc-eyebrow { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.1em; color: var(--c-sub); }
.calc h3 { font-size: 24px; line-height: 30px; letter-spacing: -0.01em; color: var(--ink); }
.calc p { font-size: 14px; line-height: 22px; color: var(--c-sub); }
.calc .btn { position: static; align-self: flex-start; }
/* Resources: working calculators inside the cards, as on the first demo page */
.calc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calc-form .field-full { grid-column: 1 / -1; }
.calc-form .field input { background: var(--c-calc-field); border: 1px solid var(--c-line); font-variant-numeric: tabular-nums; transition: border-color 150ms ease; }
.calc-form .field input:focus { border-color: var(--c-calc-focus); }
.calc-result { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--c-line); }
.calc-result span { font-size: 13px; line-height: 18px; color: var(--c-sub); }
.calc-result b { font-size: 34px; line-height: 38px; font-weight: 300; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.calc p.calc-note { grid-column: 1 / -1; font-size: 12px; line-height: 18px; }
.calc-text p { min-height: 44px; }
@media (max-width: 700px) {
  .calc-form { grid-template-columns: 1fr; }
  .calc-result { flex-direction: column; align-items: flex-start; gap: 4px; }
}
/* The whole card opens the calculator, so the whole card answers the pointer */
.calc .btn::after { inset: 0; height: auto; transform: none; border-radius: 12px; }
.calc, .founder { transition: translate 250ms var(--ease-out), border-color 200ms ease; }
.js-motion .calc.reveal, .js-motion .founder.reveal { transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out), translate 250ms var(--ease-out), border-color 200ms ease; transition-delay: calc(var(--i, 0) * 60ms), calc(var(--i, 0) * 60ms), 0s, 0s; }
@media (hover: hover) and (pointer: fine) {
  .founder:hover { translate: 0 -4px; }
  .calc:hover .btn { border-color: var(--ink); }
  .calc:hover .btn svg { translate: 3px 0; }
}

/* ───────── Founders ───────── */
.founders { padding-top: 120px; padding-bottom: 96px; gap: 56px; }
.founders-head { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.founders-head .pill { position: absolute; left: 0; top: -36px; }
.founders-head h2 { flex: 0 1 560px; }
.founders-head p { flex: 0 1 480px; padding-top: 6px; font-size: 15px; line-height: 26px; color: var(--c-sub); }
.founder-cards { display: flex; gap: 20px; }
.founder { position: relative; flex: 1 1 0%; min-width: 0; height: 660px; display: flex; flex-direction: column; justify-content: flex-end; overflow: clip; border-radius: 12px; background: var(--c-founder); }
.founder-photo { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding-bottom: 120px; background: linear-gradient(180deg, var(--c-founder-a) 0%, var(--c-founder-b) 100%); background: linear-gradient(in oklab 180deg, var(--c-founder-a) 0%, var(--c-founder-b) 100%); color: var(--c-dim); font-size: 13px; line-height: 16px; font-weight: 500; }
.founder-fade { position: absolute; inset: auto 0 0 0; height: 340px; background: var(--g-founder); }
/* The whole card is the button; the round plus is its visible mark */
.founder-open { position: absolute; inset: 0; z-index: 1; border-radius: 12px; }
.founder-open:focus-visible { outline-offset: -2px; border-radius: 12px; }
.founder-plus { position: absolute; top: 20px; right: 20px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; background: #111213; transition: scale 150ms ease-out, background-color 150ms ease; }
.founder-open:active .founder-plus { scale: 0.97; }
.founder-text { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 0 22px 26px; }
.founder-text span { font-size: 13px; line-height: 16px; font-weight: 500; color: var(--c-founder-kind); }
.founder-text h3 { font-size: 19px; line-height: 24px; font-weight: 600; color: var(--ink); }
.founder-text p { height: 44px; font-size: 14px; line-height: 22px; color: var(--c-founder-p); }
@media (hover: hover) and (pointer: fine) { .founder:hover .founder-plus { background: #2A2B2E; } }

/* ───────── CTA ───────── */
.cta { display: flex; align-items: center; justify-content: center; padding: 48px 0 96px; background: var(--page); }
.cta-card { position: relative; flex-shrink: 0; width: min(1248px, calc(100% - 2 * var(--gutter))); height: 480px; display: flex; flex-direction: column; justify-content: center; padding-inline: 72px; overflow: clip; border-radius: 12px; background: var(--c-cta); border: 1px solid var(--c-line); color: var(--ink); }
/* The photo is 56px wider than its window on the right and hidden under the fade on the left,
   so it can drift sideways with scroll without showing an edge. At rest it is where Paper puts it. */
.cta-img { position: absolute; top: 0; right: -56px; width: 816px; height: 480px; background: url("assets/cta-chairs.jpg") 50% / cover no-repeat; transform: translate3d(var(--dx, 0px), 0, 0); }
/* 1px taller than Paper's 480 on each side (outside the clip) so no photo row can show past it at fractional zoom */
.cta-fade { position: absolute; top: -1px; right: 0; width: 780px; height: 482px; background: var(--g-cta); }
.cta-tag { position: absolute; top: 40px; right: 40px; display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 4px; background: #0B0B0CA8; color: #B4B6BA; font-family: var(--mono); font-size: 12px; line-height: 16px; letter-spacing: 0.08em; }
.cta-tag .dash { flex-shrink: 0; width: 72px; height: 1px; border-top: 1px dashed #6FA3A8; }
.cta-tag .dot { flex-shrink: 0; width: 6px; height: 6px; border-radius: 999px; background: #6FA3A8; }
.cta-copy { position: relative; width: 520px; max-width: 100%; display: flex; flex-direction: column; gap: 20px; }
.cta-copy p { width: 440px; max-width: 100%; }
.cta-buttons { display: flex; gap: 12px; padding-top: 8px; }
.cta-buttons .btn { padding-inline: 22px; line-height: 20px; }

/* ───────── Footer ───────── */
.footer { position: relative; height: 660px; overflow: clip; background: var(--page); }
.footer-img { position: absolute; inset: 220px 0 0 0; background: url("assets/footer-corridor.jpg") 50% / cover no-repeat; opacity: 0.8; }
.footer-shade { position: absolute; inset: 220px 0 0 0; background: var(--g-footer); }
/* Same 4px page-colour strip as the hero fades, over the photo's top edge */
.footer-shade::before, .stage-fade::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 4px; background: var(--page); }
.footer-in { position: absolute; inset: 0; max-width: 1440px; margin-inline: auto; }
/* Large logo over the photo (Paper: 1240×289 at 40%); drifts up 48px as the footer scrolls in */
.footer-ghost { position: absolute; left: 100px; right: 100px; bottom: 19px; aspect-ratio: 1240 / 289; background: var(--ghost-img) 50% / contain no-repeat; opacity: var(--ghost-opacity); transform: translateY(calc((1 - var(--p, 1)) * 48px)); }
.footer-top { position: relative; padding: 8px 120px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.footer-about { flex: 0 1 520px; font-size: 15px; line-height: 24px; color: var(--c-sub); }
.footer-cols { display: flex; gap: 88px; }
.footer-cols div { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 18px; color: var(--c-sub); }
.footer-cols b { padding-bottom: 6px; font-weight: 600; color: var(--ink); }
.footer-cols a { position: relative; transition: color 150ms ease; }
.footer-cols a::before { content: ""; position: absolute; inset: -6px -8px; }
@media (hover: hover) and (pointer: fine) { .footer-cols a:hover { color: var(--ink); } }
.foot-v, .foot-h { position: absolute; background: var(--c-line-2); }
.foot-v { top: 0; bottom: 0; width: 1px; }
.fv1 { left: var(--edge); } .fv2 { right: calc(var(--edge) - 1px); }
.foot-h { left: 0; right: 0; top: 220px; height: 1px; }
.footer-ruler { position: absolute; left: var(--edge); right: var(--edge); bottom: 0; height: 40px; display: flex; align-items: center; justify-content: space-between; padding-inline: 8px; border-top: 1px solid var(--c-hair); font-family: var(--mono); font-size: 10px; line-height: 12px; letter-spacing: 0.12em; color: var(--c-dim); white-space: nowrap; }
.footer-ruler span:first-child { color: var(--c-ruler-mark); }

/* ───────── Below the 1440 artboard's range (not drawn in Paper): a plain stack ───────── */
@media (max-width: 1199px) {
  :root { --gutter: 48px; --edge: 32px; }
  .nav-side { width: auto; }
  .hero-copy { padding-left: 64px; }
  .hero h1 { font-size: 68px; line-height: 74px; }
  .strip { padding-inline: 48px; }
  .strip-track { flex-wrap: wrap; justify-content: center; gap: 16px; }
  .strip.is-loop .strip-track { flex-wrap: nowrap; margin-left: 48px; }
  .head-fixed, .head-note, .head-note-s { flex-basis: 0; flex-grow: 1; }
  .footer-top { padding-inline: 48px; }
  .footer-ghost { left: 48px; right: 48px; }
}
@media (max-width: 1000px) {
  .nav-links, .nav-portal { display: none; }
  .nav-menu { display: grid; }
  .hero-photo, .hero-fade { left: 0; }
  .hero-fade.is-left { width: 100%; background: var(--g-hero-left-narrow); }
  .gv2, .gv3 { display: none; }
  .fields { flex-wrap: wrap; }
  .field { flex-basis: 40%; }
  .field-wide { flex-basis: 50%; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .register { flex-direction: column; align-items: flex-start; }
  .owners, .how-row, .portal-head { flex-direction: column; align-items: stretch; gap: 40px; }
  .coat, .owners-copy, .how-left, .preview, .portal-side { flex: none; }
  .founder-cards { flex-direction: column; }
  .founder { flex: none; height: 520px; }
  .cta-img { right: -56px; width: 100%; opacity: 0.5; }
  .cta-fade { width: 100%; background: var(--g-cta-narrow); }
  .cta-tag { display: none; }
  .footer { height: auto; min-height: 660px; padding-bottom: 320px; }
  /* In flow, so the footer grows with its links; the big logo and the ruler stay pinned to the footer's own bottom edge. */
  .footer-in { position: static; }
  .footer-img, .footer-shade { top: auto; height: 440px; }
  .foot-h { display: none; }
  .footer-ruler span:nth-child(3) { display: none; }
}
@media (max-width: 700px) {
  :root { --gutter: 20px; --edge: 20px; }
  h2, h2.h-44 { font-size: 30px; line-height: 38px; }
  .nav-in { padding: 12px 16px 0 20px; }
  .nav.is-stuck .nav-in { transform: none; }
  .nav .logo { width: 129px; height: 30px; }
  .nav-right { gap: 8px; }
  .nav .btn-talk { display: none; }
  .hero { height: auto; padding-bottom: 56px; }
  .hero-copy { width: auto; padding: 120px 20px 0; gap: 20px; }
  .hero h1 { font-size: 42px; line-height: 48px; letter-spacing: -0.03em; }
  .hero h1 br { display: none; }
  .hero-sub { width: auto; font-size: 18px; line-height: 26px; }
  .hero-buttons { flex-wrap: wrap; }
  .hero-fade.is-bottom { top: auto; bottom: 0; }
  .grid-v, .grid-h { display: none; }
  .pulse svg { height: 44px; }
  .strip { padding-inline: 20px; }
  .logo-slot { width: calc(50% - 8px); }
  .head, .founders-head { flex-direction: column; align-items: flex-start; }
  .head-fixed, .head-note, .head-note-s, .founders-head h2, .founders-head p { flex: none; }
  .fields { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
  .field { flex: none; }
  .select select, .field input { font-size: 16px; line-height: 20px; }
  .browse { flex-wrap: wrap; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card-foot { flex-wrap: wrap; gap: 8px; }
  .register-actions { flex-wrap: wrap; }
  .coat { height: 320px; }
  .ws { left: 20px; top: 60px; }
  .stage { height: auto; padding-top: 24px; }
  .stage-photo, .stage-fade { top: 40%; }
  .window { height: auto; max-width: calc(100% - 24px); border-width: 4px; border-bottom: 0; }
  .calcs { flex-direction: column; }
  .founders { padding-top: 96px; padding-bottom: 72px; }
  .cta { padding: 24px 0 72px; }
  .cta-card { height: auto; padding: 56px 24px; }
  .cta-img, .cta-fade { height: 100%; }
  .cta-buttons { flex-direction: column; align-items: stretch; }
  .footer-top { flex-direction: column; gap: 40px; padding-inline: 20px; }
  .footer-about { flex: none; }
  .footer-cols { gap: 56px; }
  .footer-ghost { left: 20px; right: 20px; bottom: 52px; }
  .toasts { right: 12px; left: 12px; bottom: 12px; }
}

/* White view: the pale accent ring is too faint on a light page, so focus uses the deep teal token */
:root[data-theme="light"] :focus-visible { outline-color: var(--teal); }

@media (prefers-reduced-motion: reduce) {
  .hero-photo, .cta-img, .footer-ghost { transform: none; }
}

/* ───────── Logo intro (index only): played by intro.js on arrival from outside the site ───────── */
.intro { display: none; }
.intro-on .intro { display: block; position: fixed; inset: 0; z-index: 100; animation: intro-failsafe 0.3s 7s forwards; }
.intro-bg { position: absolute; inset: 0; background: var(--page); }
.intro-pulse { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-pulse path { fill: none; stroke: #6FA3A8; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.intro-logo { position: absolute; left: 50%; top: 50%; width: min(440px, 72vw); aspect-ratio: 1800 / 420; translate: -50% -50%; transform-origin: 0 0; will-change: transform; }
.intro-logo i { position: absolute; inset: 0; background: url("assets/logo-white.png") center / contain no-repeat; }
/* Each layer shows one part of the logo; intro.js opens them in turn. */
.intro-mark { clip-path: inset(0 96.6% 0 0); opacity: 0; }
.intro-word { clip-path: inset(0 75.3% 27.3% 27%); }
.intro-tag { clip-path: inset(72.7% 0 0 27%); opacity: 0; }
/* The header logo waits until the intro logo lands on it. If the script never runs, both clear themselves. */
.intro-on .nav .logo { opacity: 0; animation: intro-reveal 0.01s 7s forwards; }
@keyframes intro-failsafe { to { opacity: 0; visibility: hidden; } }
@keyframes intro-reveal { to { opacity: 1; } }

/* ───────── Wide screens: the page fills the window instead of stopping at 1440px ───────── */
.nav-portal, .nav-links a { white-space: nowrap; }
@media (min-width: 1441px) {
  .nav-in, .hero-stage, .hero-in, .pulse, .footer-in { max-width: none; }
  .sec, .strip { max-width: 2200px; }
  .cta-card { width: min(2008px, calc(100% - 2 * var(--gutter))); }
  /* The hero takes the whole first screen and its photo runs to the right edge. */
  .hero { height: max(860px, 100svh); }
  .hero-photo { height: calc(100% + 60px); }
  .hero-fade.is-left { height: 100%; }
  .hero-fade.is-bottom { top: auto; bottom: 0; }
  .hero-fade.is-right { display: none; }
  .hero-in { height: 100%; display: flex; align-items: center; }
  .hero-copy { width: min(60vw, 1100px); padding-top: 72px; }
  .hero h1 { font-size: clamp(84px, 5.6vw, 124px); line-height: 1.05; }
  .hero-sub { width: min(36vw, 640px); font-size: clamp(22px, 1.45vw, 28px); line-height: 1.45; }
}

/* Hero buttons take the heartbeat line's blue on hover */
@media (hover: hover) and (pointer: fine) {
  .hero-buttons .btn { transition: scale 150ms ease-out, background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
  .hero-buttons .btn-glass:hover, .hero-buttons .btn-outline-80:hover { background: #6FA3A8; border-color: #6FA3A8; color: #0B0B0C; }
}

/* ───────── Home listings: the second row fades out under a blur, with View all on top ───────── */
.cards-fade { position: absolute; left: -8px; right: -8px; bottom: -2px; z-index: 1; height: 250px; display: flex; flex-direction: column; pointer-events: none; }
.cards-fade i { display: block; flex: none; }
.cards-fade i:nth-child(1) { height: 70px; -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px); background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--page) 20%, transparent)); }
.cards-fade i:nth-child(2) { height: 80px; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); background: linear-gradient(180deg, color-mix(in srgb, var(--page) 20%, transparent), color-mix(in srgb, var(--page) 55%, transparent)); }
.cards-fade i:nth-child(3) { height: 100px; -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); background: linear-gradient(180deg, color-mix(in srgb, var(--page) 55%, transparent), color-mix(in srgb, var(--page) 95%, transparent) 70%, var(--page)); }
.view-all { position: absolute; left: 0; right: 0; bottom: 28px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.view-all span { font-size: 14px; line-height: 18px; font-weight: 500; color: var(--c-sub); }
.market { padding-bottom: 72px; }

/* ───────── Opportunities page: second row of filters and the closing block ───────── */
.more-filters .clear-all { flex: none; align-self: center; height: 48px; padding-inline: 12px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.field-locked { display: flex; align-items: center; gap: 10px; height: 48px; padding-inline: 16px; border-radius: 8px; border: 1px dashed var(--c-line-dash); font-size: 15px; line-height: 18px; color: var(--c-sub); transition: border-color 150ms ease, color 150ms ease; }
.field-locked svg { flex: none; }
@media (hover: hover) and (pointer: fine) { .field-locked:hover { border-color: var(--ink); color: var(--ink); } }
.fit { display: flex; align-items: center; justify-content: space-between; gap: 48px; padding-top: 44px; border-top: 1px solid var(--c-line); }
.fit-text { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.fit h2 { font-size: 28px; line-height: 36px; font-weight: 400; letter-spacing: -0.02em; text-wrap: balance; }
.fit p { font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 28px; color: var(--c-sub); }
.fit-actions { flex: none; display: flex; align-items: center; gap: 20px; }
@media (max-width: 1000px) {
  .more-filters { flex-wrap: wrap; }
  .fit { flex-direction: column; align-items: flex-start; gap: 24px; }
}

/* ───────── Saved opportunities: a heart with a count, in place of the old text link ───────── */
.saved-link { display: inline-flex; align-items: center; gap: 6px; height: 36px; min-width: 36px; justify-content: center; padding-inline: 9px; margin-block: -10px; border-radius: 999px; font-size: 13px; font-weight: 600; transition: background-color 150ms ease, scale 150ms ease-out; }
.saved-link svg { flex: none; }
.saved-link:has(#shortlist-count:not(:empty)) path { fill: currentColor; }
.saved-link:active { scale: 0.97; }
@media (hover: hover) and (pointer: fine) { .saved-link:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); } }

/* ───────── News in the header: the middle of the top row (filled by news.js) ───────── */
.nav-news { flex: 1 1 0; min-width: 0; gap: 16px; margin-inline: 36px; font-size: 12px; line-height: 16px; color: var(--ink); opacity: 0; transition: opacity 300ms ease; }
.nav-news.is-ready { opacity: 1; }
.nav-in:has(.nav-news) .nav-side { width: auto; }
.nav-in:has(.nav-news) .nav-right { min-width: 300px; }
@media (max-width: 1000px) { .nav-in:has(.nav-news) .nav-right { min-width: 0; } }
.newsbar-label { flex: none; display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0.14em; color: var(--c-eyebrow); }
.newsbar-label::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: #6FA3A8; }
.newsbar-track { flex: 1 1 0; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.newsbar-run { display: flex; width: max-content; animation: news-run var(--news-time, 180s) linear infinite; }
.nav-news.is-paused .newsbar-run, .newsbar-track:focus-within .newsbar-run { animation-play-state: paused; }
.newsbar-list { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.newsbar-list li { display: flex; align-items: baseline; gap: 8px; padding-right: 22px; white-space: nowrap; }
.newsbar-list li::after { content: "+"; padding-left: 14px; color: #6FA3A8; font-weight: 600; }
.nav-news .newsbar-list a { font-size: 12px; line-height: 16px; font-weight: 500; }
.nav-news .newsbar-list a::before, .nav-news .newsbar-list a::after { content: none; }
.newsbar-list small { font-size: 11px; color: var(--c-sub); }
.newsbar-pause { flex: none; position: relative; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; color: var(--ink); }
.newsbar-pause::after { content: ""; position: absolute; inset: -10px; }
.newsbar-pause .tri, .newsbar-pause[aria-pressed="true"] .bars { display: none; }
.newsbar-pause[aria-pressed="true"] .tri { display: inline; }
@keyframes news-run { to { transform: translateX(-50%); } }
@media (hover: hover) and (pointer: fine) { .nav-news .newsbar-list a:hover { text-decoration: underline 1px; text-underline-offset: 3px; } }
@media (max-width: 1300px) { .nav-news { margin-inline: 24px; } .nav-news .newsbar-label { font-size: 0; gap: 0; } }
@media (prefers-reduced-motion: reduce) {
  .newsbar-run { animation: none; }
  .newsbar-track { overflow-x: auto; }
}

/* ───────── Footer: brand and links, a line of small print, then the drawing ───────── */
.foot2 { --ring-a: #A6E3E9; --ring-b: #6FA3A8; --ring-c: #3D6B93; position: relative; overflow: clip; background: var(--page); color: var(--ink); }
:root[data-theme="light"] .foot2 { --ring-a: #3E8A93; --ring-b: #6FA3A8; --ring-c: #2C4F6E; }
.foot2-in { position: relative; z-index: 1; max-width: 1440px; margin-inline: auto; padding: 88px 120px 48px; }
.foot2-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 48px; }
.foot2-brand { display: flex; flex-direction: column; gap: 20px; max-width: 360px; }
.foot2-brand .logo { width: 137px; height: 32px; }
.foot2-brand p { font-size: 15px; line-height: 24px; color: var(--c-sub); text-wrap: pretty; }
.foot2-cols { display: flex; gap: 72px; }
.foot2-cols div { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 18px; color: var(--c-sub); }
.foot2-cols b { padding-bottom: 6px; font-weight: 600; color: var(--ink); }
.foot2-cols a { position: relative; transition: color 150ms ease; }
.foot2-cols a::before { content: ""; position: absolute; inset: -6px -8px; }
@media (hover: hover) and (pointer: fine) { .foot2-cols a:hover { color: var(--ink); } }
.foot2-meta { display: flex; justify-content: space-between; gap: 24px; padding-top: 64px; font-size: 12px; line-height: 16px; color: var(--c-sub); }

@media (min-width: 1441px) { .foot2-in { max-width: 2200px; padding-inline: var(--gutter); } }
@media (max-width: 1199px) { .foot2-in { padding-inline: 48px; } }
@media (max-width: 1000px) {
  .foot2-in { padding: 64px 20px 32px; }
  .foot2-top { flex-direction: column; gap: 40px; }
  .foot2-cols { flex-wrap: wrap; gap: 32px 48px; }
  .foot2-meta { flex-direction: column; gap: 6px; padding-top: 48px; }
}

/* Footer on phones: everything centred, and one short row of links instead of three columns. */
@media (max-width: 700px) {
  .foot2-in { padding: 56px 20px 32px; }
  .foot2-top { align-items: center; gap: 28px; }
  .foot2-brand { align-items: center; text-align: center; gap: 16px; }
  .foot2-cols { justify-content: center; gap: 14px 22px; }
  .foot2-cols div { display: contents; }
  .foot2-cols b { display: none; }
  /* Kept: Opportunities, How it works, Privacy, Terms, Client portal. */
  .foot2-cols div:nth-child(1) a:nth-of-type(-n + 3), .foot2-cols div:nth-child(2) a:nth-of-type(n + 2) { display: none; }
  .foot2-cols a { font-size: 14px; line-height: 20px; }
  .foot2-meta { align-items: center; text-align: center; padding-top: 32px; }
}

/* ───────── Phones: one centred column, with less on screen ───────── */
@media (max-width: 700px) {
  /* Header: logo and menu only. Language and theme live in the menu. */
  .nav .nav-in .theme-toggle { display: none; }
  /* Hero: everything on the middle axis; the film button waits for wider screens. */
  .hero-copy { align-items: center; text-align: center; }
  .hero-eyebrow { justify-content: center; }
  .hero-buttons { justify-content: center; }
  .hero-play-wrap { display: none; }
  /* Section openings. */
  .head { flex-direction: column; align-items: center; gap: 20px; text-align: center; }
  .head-main, .owners-copy, .portal-head, .portal-main, .founders-head, .cta-copy { align-items: center; text-align: center; }
  .owners-copy p, .portal-head p, .founders-head p, .cta-copy p, .head p { margin-inline: auto; }
  .cta-copy .btn, .owners-copy .btn, .portal-head .btn { align-self: center; }
  /* Listings: three on the home page; the rest are one tap away on Opportunities. */
  .market .search { display: none; }
  .market .cards .card:nth-child(n + 4) { display: none; }
  .view-all span { display: none; }
  .founder { height: 360px; }
}

/* Hero: "Explore opportunities" is the heartbeat blue from the start; it lightens a step under the pointer. */
.hero-buttons .btn.btn-glass { background: #6FA3A8; border-color: #6FA3A8; color: #0B0B0C; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (hover: hover) and (pointer: fine) {
  .hero-buttons .btn.btn-glass:not(:disabled):hover { background: #8FBDC2; border-color: #8FBDC2; color: #0B0B0C; }
}

/* Client portal: less empty space before Resources, and the window grows as it scrolls into view. */
.portal { padding-bottom: 40px; }
.resources { padding-top: 64px; }
.js-motion .window { scale: calc(0.6 + 0.4 * var(--grow, 1)); transform-origin: 50% 100%; }
@media (max-width: 700px) {
  .portal { padding-bottom: 20px; }
  .resources { padding-top: 44px; }
  .js-motion .window { scale: calc(0.55 + 0.45 * var(--grow, 1)); }
}
@media (prefers-reduced-motion: reduce) { .js-motion .window { scale: none; } }

/* Closing card on narrow screens: the photo fills the whole card (a little wider than it, so its
   slow drift never uncovers an edge) instead of sitting off to the right. */
@media (max-width: 1199px) {
  .cta-img { left: -20px; right: -20px; width: auto; }
}
/* On phones the text is centred, so the shade over the photo is even rather than darker on the left. */
@media (max-width: 700px) {
  .cta-img { opacity: 1; background-position: 62% 50%; }
  .cta-fade { inset: -1px; width: auto; height: auto; background: color-mix(in srgb, var(--page) 72%, transparent); }
}

/* Closing card on desktop: the whole photo shows, edge to edge of its own frame, flush with the
   card's right side. Nothing is cropped, so it holds still instead of drifting. */
@media (min-width: 1200px) {
  .cta-img { right: 0; width: auto; height: 100%; aspect-ratio: 1264 / 848; background-size: 100% 100%; transform: none; }
  /* The shade is solid over the photo's left edge, so no line shows where the photo begins. */
  .cta-fade { width: 760px; }
}

/* Closing card: no gradient. On desktop the photo is a clean panel beside the text; on narrower
   screens, where the text sits on the photo, the shade over it is one even tone. */
@media (min-width: 1200px) {
  .cta-fade { display: none; }
  /* The photo never runs under the text: on smaller desktops it narrows (trimming its sides a little) to leave the text its room. */
  .cta-img { width: min(712px, calc(100% - 620px)); aspect-ratio: auto; background-size: cover; background-position: 62% 50%; }
}
@media (max-width: 1199px) {
  .cta-img { opacity: 1; }
  .cta-fade { inset: -1px; width: auto; height: auto; background: color-mix(in srgb, var(--page) 72%, transparent); }
}

/* ───────── Menu (phones and tablets): a full, quiet screen instead of a small dropdown ───────── */
@media (max-width: 1000px) {
  .nav-in { z-index: 1; }
  .menu { position: fixed; inset: 0; z-index: 0; display: flex; flex-wrap: wrap; align-content: flex-start; column-gap: 10px; padding: 104px 24px max(28px, env(safe-area-inset-bottom)); border: 0; border-radius: 0; background: var(--page); overflow-y: auto; overscroll-behavior: contain; counter-reset: item; }
  .menu[hidden] { display: none; }
  /* The main destinations: large light type, a hairline between each, a small number in front. */
  .menu > a:not([lang]) { flex: 0 0 100%; display: flex; align-items: baseline; gap: 18px; min-height: 0; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 32px; line-height: 40px; font-weight: 300; letter-spacing: -0.03em; counter-increment: item; }
  .menu > a:not([lang])::before { content: counter(item, decimal-leading-zero); flex: none; width: 22px; font-family: var(--mono); font-size: 11px; line-height: 16px; font-weight: 400; letter-spacing: 0.06em; color: #6FA3A8; translate: 0 -8px; }
  .menu > a:not([lang])::after { content: ""; flex: none; align-self: center; width: 9px; height: 9px; margin: 0 5px 0 auto; border-top: 1.5px solid var(--muted); border-right: 1.5px solid var(--muted); rotate: 45deg; }
  /* Language and theme: two small matching buttons under the list. */
  .menu > a[lang], .menu > .menu-theme { flex: 1 1 0; justify-content: center; min-height: 48px; margin-top: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; line-height: 18px; font-weight: 500; text-align: center; color: var(--chip-ink); }
  .menu > a:active, .menu > .menu-theme:active { opacity: 0.6; }
  /* The page behind does not scroll while the menu is open, and the header sits on the menu's own colour. */
  html:has(.menu:not([hidden])) { overflow: hidden; }
  .nav:has(.menu:not([hidden]))::before { opacity: 0; }
  .nav:has(.menu:not([hidden])) .nav-news { visibility: hidden; }
  :root[data-theme="light"] .nav:has(.menu:not([hidden])) .logo { background-image: url("assets/logo-color.png"); }
  /* The two bars cross into an X while the menu is open. */
  .nav-menu i { transition: translate 250ms var(--ease-out), rotate 250ms var(--ease-out); }
  .nav-menu[aria-expanded="true"] i:first-child { translate: 0 3.25px; rotate: 45deg; }
  .nav-menu[aria-expanded="true"] i:last-child { translate: 0 -3.25px; rotate: -45deg; }
  /* Opening: the screen fades in and the lines rise one after another. */
  .menu:not([hidden]) { animation: menu-in 220ms ease both; }
  .menu:not([hidden]) > * { animation: menu-rise 480ms var(--ease-out) both; animation-delay: calc(60ms + var(--n, 0) * 55ms); }
  .menu > :nth-child(2) { --n: 1; } .menu > :nth-child(3) { --n: 2; } .menu > :nth-child(4) { --n: 3; } .menu > :nth-child(5) { --n: 4; } .menu > :nth-child(6) { --n: 5; } .menu > :nth-child(n + 7) { --n: 6; }
}
@keyframes menu-in { from { opacity: 0; } }
@keyframes menu-rise { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
  .menu:not([hidden]), .menu:not([hidden]) > * { animation: none; }
  .nav-menu i { transition: none; }
}

/* ───────── News on phones: its own slim line under the header ───────── */
@media (max-width: 700px) {
  .nav-news { display: flex; position: absolute; top: 68px; left: 0; right: 0; height: 36px; margin: 0; padding: 0 12px 0 20px; gap: 10px; background: color-mix(in srgb, var(--page) 82%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .nav-news:not(.is-ready) { display: none; }
  .nav-news .newsbar-track { -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); }
  /* The hero text starts a little lower so the news line never sits on it. */
  .nav:has(.nav-news.is-ready) ~ main .hero-copy { padding-top: 148px; }
}
