/* Design tokens + primitives shared by the one-pager and the project detail page.
   Palette comes from wireframe 3a: night-map ground, cream ink, amber accent. */

:root {
  --bg: #101a16;
  --ground: #16241d;
  --panel: #0b120f;
  --header-bg: rgba(11, 18, 15, .9);

  --fg: #f6f1e4;
  --fg-dim: rgba(246, 241, 228, .62);
  --fg-faint: rgba(246, 241, 228, .45);

  --line: rgba(246, 241, 228, .22);
  --line-soft: rgba(246, 241, 228, .12);
  --fill: rgba(255, 255, 255, .06);
  --fill-strong: rgba(255, 255, 255, .1);

  --grid: rgba(246, 241, 228, .07);
  --road: rgba(246, 241, 228, .1);
  --road-thin: rgba(246, 241, 228, .07);

  --accent: #ffb74d;
  --accent-ink: #102019;
  --accent-text: #ffb74d;
  --accent-wash: rgba(255, 183, 77, .16);

  /* Colour tokens the branded project layer (brand.css) draws with. */
  --brand-accent-rgb: 255 183 77;
  --brand-accent-2: #ff8a50;
  --brand-accent-2-rgb: 255 138 80;
  --brand-grad-a: #ffb74d;
  --brand-grad-b: #ff8a50;
  --brand-surface: #0b120f;
  --brand-surface-alt: #16241d;
  --brand-shadow: rgb(0 0 0 / .7);
  --brand-sheen: rgb(246 241 228 / .04);

  --btn-lift: 0 14px 30px -20px rgba(0, 0, 0, .8);

  --shell: 1440px;
  --gut: 28px;

  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f6f1e4;
  --ground: #ece4d2;
  --panel: #fffdf7;
  --header-bg: rgba(246, 241, 228, .9);

  --fg: #101a16;
  --fg-dim: rgba(16, 26, 22, .68);
  --fg-faint: rgba(16, 26, 22, .5);

  --line: rgba(16, 26, 22, .2);
  --line-soft: rgba(16, 26, 22, .1);
  --fill: rgba(16, 26, 22, .05);
  --fill-strong: rgba(16, 26, 22, .08);

  --grid: rgba(16, 26, 22, .06);
  --road: rgba(16, 26, 22, .09);
  --road-thin: rgba(16, 26, 22, .06);

  --accent: #ffb74d;
  --accent-ink: #241300;
  --accent-text: #8a4b00;
  --accent-wash: rgba(255, 183, 77, .28);

  --brand-accent-rgb: 255 183 77;
  --brand-accent-2: #ff8a50;
  --brand-accent-2-rgb: 255 138 80;
  --brand-grad-a: #b86a00;
  --brand-grad-b: #c2410c;
  --brand-surface: #fffdf7;
  --brand-surface-alt: #ece4d2;
  --brand-shadow: rgb(70 50 20 / .2);
  --brand-sheen: rgb(255 255 255 / .6);

  --btn-lift: 0 14px 28px -20px rgba(74, 52, 16, .38);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.55 Archivo, system-ui, -apple-system, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Soft accent wash for selected text, the same everywhere (branded projects included). */
::selection { background: rgb(var(--brand-accent-rgb) / .28); color: var(--fg); }

img, video, svg { max-width: 100%; display: block; }
a { color: inherit; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gut); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; font: 700 12px Archivo, sans-serif; letter-spacing: .12em;
}
.skip:focus { left: 12px; top: 12px; }

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

/* ---------- type ---------- */

.eyebrow {
  font: 800 10px Archivo, sans-serif;
  letter-spacing: .22em;
  color: var(--accent-text);
  text-transform: uppercase;
  margin: 0;
}

.h-sec {
  font: 800 clamp(20px, 3.4vw, 34px)/1 Archivo, sans-serif;
  letter-spacing: -.02em;
  margin: 0;
}

.h-sub {
  font: 700 11px Archivo, sans-serif;
  letter-spacing: .2em;
  color: var(--accent-text);
  text-transform: uppercase;
  margin: 0;
}

.lede { color: var(--fg-dim); margin: 0; }
.note { font-size: 13px; color: var(--fg-faint); margin: 0; }

/* ---------- primitives ---------- */

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 11px Archivo, sans-serif;
  letter-spacing: .04em;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 11px;
  white-space: nowrap;
}
.pill__icon {
  width: 12px; height: 12px;
  flex: none;
  fill: currentColor;
  margin-left: -1px;
}

.pill--accent { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-text); }
.pill--solid { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 12px Archivo, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 11px 16px;
  min-height: 44px;
  cursor: pointer;
  position: relative;
  transition:
    background-color .18s ease, border-color .18s ease, color .18s ease,
    transform .22s cubic-bezier(.2, .8, .3, 1), box-shadow .22s ease;
}
.btn:hover { border-color: var(--accent); color: var(--accent-text); transform: translateY(-2px); box-shadow: var(--btn-lift); }
.btn:active { transform: translateY(0); box-shadow: none; }

.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent); color: var(--accent-ink); filter: brightness(1.08); }

/* Light sweep across primary actions - clipped on these only, so icon buttons
   elsewhere can still show their tooltips. */
.btn--primary { overflow: hidden; }
.btn--primary::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .34) 50%, transparent 68%);
  transform: translateX(-130%);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .btn--primary:hover::after { transition: transform .75s ease; transform: translateX(130%); }
}

.btn--ghost { border-color: var(--accent); color: var(--accent-text); }

.btn--icon {
  width: 44px; height: 44px; padding: 0; min-height: 0;
  background: var(--fill-strong);
  border-color: var(--line);
}
.btn--icon svg { width: 18px; height: 18px; fill: currentColor; }

.stack-tags { display: flex; flex-wrap: wrap; gap: 7px; padding: 0; margin: 0; list-style: none; }

/* Media that failed to load, and frames left empty by it. */
.is-missing { background: var(--fill); border-color: var(--line); font-size: 0; }
[data-frame].is-empty { background: var(--fill); }

/* Crossfading screenshots - brand.js cycles .is-active. */
[data-slides] { position: relative; overflow: hidden; }
[data-slides] .bslides__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  opacity: 0;
  transition: opacity .6s ease;
}
[data-slides] .bslides__img.is-active { opacity: 1; }

/* ---------- map ground ---------- */

.ground {
  position: relative;
  background-color: var(--ground);
  background-image:
    repeating-linear-gradient(0deg, var(--grid) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 34px);
  overflow: hidden;
}
.ground > * { position: relative; }

/* Road overlay - the pinned-map read from the wireframe. */
.ground__roads { position: absolute; inset: 0; pointer-events: none; }
.ground__roads i { position: absolute; background: var(--road); display: block; }
.ground__roads i:nth-child(1) { left: 0; right: 0; top: 42%; height: 16px; }
.ground__roads i:nth-child(2) { top: 0; bottom: 0; left: 23%; width: 16px; }
.ground__roads i:nth-child(3) { top: 0; bottom: 0; right: 15%; width: 10px; background: var(--road-thin); }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow .4s ease, border-color .4s ease;
}
/* ui.js adds .is-scrolled once content slides under the header. */
.site-header.is-scrolled {
  border-bottom-color: transparent;
  box-shadow: 0 1px 0 var(--line-soft), 0 16px 32px -26px rgb(0 0 0 / .8);
}
[data-theme="light"] .site-header.is-scrolled { box-shadow: 0 1px 0 var(--line-soft), 0 16px 32px -24px rgb(70 50 20 / .35); }

/* Page progress along the header's bottom edge - ui.js adds it on pages with in-page nav. */
.site-header__progress {
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--brand-accent-2));
  box-shadow: 0 0 10px rgb(var(--brand-accent-rgb) / .5);
  transform: scaleX(var(--p, 0)); transform-origin: 0 50%;
  pointer-events: none;
}

.site-header__in {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 58px;
  padding-block: 10px;
}

.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font: 800 15px Archivo, sans-serif; letter-spacing: .1em;
  text-decoration: none; color: var(--fg);
  text-transform: uppercase;
}
.brand__star {
  display: inline-block;
  color: var(--accent-text);
  transition: transform .7s cubic-bezier(.34, 1.56, .64, 1), text-shadow .4s ease;
}
.brand:hover .brand__star, .brand:focus-visible .brand__star {
  transform: rotate(216deg) scale(1.3);
  text-shadow: 0 0 14px rgb(var(--brand-accent-rgb) / .75);
}
/* ui.js splits the name into letters so they can ripple on hover. */
.brand__word { display: inline-flex; }
.brand__word span { display: inline-block; white-space: pre; }

.nav { position: relative; display: flex; align-items: center; gap: 10px; }
.nav[hidden] { display: none; }
.nav__link {
  position: relative; z-index: 1;
  font: 600 11px Archivo, sans-serif; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; color: var(--fg);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 8px 13px;
  transition: border-color .25s ease, color .25s ease, transform .25s ease;
}
.nav__link:hover, .nav__link[aria-current="page"] { border-color: var(--accent); color: var(--accent-text); }
.nav__link[aria-current="true"] { border-color: rgb(var(--brand-accent-rgb) / .55); color: var(--accent-text); }
.nav__link:active { transform: scale(.95); }
.nav__sep { width: 1px; height: 18px; background: var(--line); }

/* Amber pill ui.js glides under the hovered link, resting on the section in view. */
.nav__pill {
  position: absolute; top: 0; left: 0; z-index: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, #ffc978, var(--accent) 45%, var(--brand-accent-2));
  box-shadow: 0 8px 20px -10px rgb(var(--brand-accent-rgb) / .9), inset 0 1px 0 rgb(255 255 255 / .4);
  opacity: 0;
  pointer-events: none;
  transition:
    transform .5s cubic-bezier(.34, 1.3, .64, 1),
    width .5s cubic-bezier(.34, 1.3, .64, 1),
    opacity .25s ease;
}
.nav__pill.is-on { opacity: 1; }
.nav .nav__link.is-lit { border-color: transparent; color: var(--accent-ink); }

@keyframes hdr-drop { from { opacity: 0; transform: translateY(-12px); } }
@keyframes menu-in { from { opacity: 0; transform: translateX(-16px); } }
@keyframes brand-wave { 40% { transform: translateY(-4px); color: var(--accent-text); } }
@keyframes star-twinkle { 0%, 92%, 100% { transform: none; } 96% { transform: rotate(72deg) scale(1.35); } }

@media (prefers-reduced-motion: no-preference) {
  .site-header__in > :not(.nav),
  .nav__link { animation: hdr-drop .7s cubic-bezier(.22, 1, .36, 1) backwards; }
  .nav__link { animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
  .header__tools { animation-delay: .4s; }

  .brand__star { animation: star-twinkle 8s ease-in-out 3s infinite; }
  .brand:hover .brand__star { animation: none; }
  .brand:hover .brand__word span { animation: brand-wave .6s cubic-bezier(.34, 1.56, .64, 1) calc(var(--i) * 35ms); }
}

@media (max-width: 860px) {
  .nav__pill { display: none; }
  .nav__link { animation-name: menu-in; animation-delay: calc(var(--i, 0) * 55ms); }
  .nav__link[aria-current="true"] { border-bottom-color: var(--line-soft); box-shadow: inset 3px 0 0 var(--accent); padding-left: 14px; }
}

/* Theme switch: rays flung from the knob, and a circular reveal of the new palette. */
.theme-toggle__burst { position: absolute; top: 50%; width: 0; height: 0; z-index: 2; pointer-events: none; }
.theme-toggle__burst i {
  position: absolute; left: -1px; top: -3px;
  width: 2px; height: 6px; border-radius: 2px;
  background: var(--accent);
  opacity: 0;
  animation: toggle-ray .6s cubic-bezier(.22, 1, .36, 1);
}
@keyframes toggle-ray {
  0% { opacity: 1; transform: rotate(var(--a)) translateY(-12px) scaleY(.4); }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(-26px) scaleY(1.3); }
}
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

.header__tools { display: flex; align-items: center; gap: 10px; }

/* Sliding sun/moon switch - the knob sits over the active mode (moon = dark, the default). */
.theme-toggle {
  position: relative;
  display: inline-grid; grid-template-columns: 26px 26px; align-items: center;
  width: 60px; height: 34px; padding: 3px;
  background: var(--fill-strong);
  border: 1px solid var(--line); border-radius: 999px;
  box-shadow: inset 0 1px 3px rgb(0 0 0 / .35);
  color: var(--fg-faint);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .2s ease, background .2s ease;
}
[data-theme="light"] .theme-toggle { box-shadow: inset 0 1px 3px rgb(70 50 20 / .14); }
.theme-toggle:hover { border-color: var(--accent); }

.theme-toggle__thumb {
  position: absolute; top: 3px; left: 3px;
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(145deg, #ffc978, var(--accent) 45%, var(--brand-accent-2));
  box-shadow:
    0 2px 6px rgb(0 0 0 / .35),
    0 0 14px rgb(var(--brand-accent-rgb) / .45),
    inset 0 1px 0 rgb(255 255 255 / .45);
  transform: translateX(26px);
  transition: transform .45s cubic-bezier(.34, 1.4, .64, 1);
}
.theme-toggle[aria-pressed="true"] .theme-toggle__thumb { transform: translateX(0); }
.theme-toggle:active .theme-toggle__thumb { width: 30px; }
.theme-toggle[aria-pressed="false"]:active .theme-toggle__thumb { left: -1px; }

.theme-toggle__icon {
  position: relative; z-index: 1;
  width: 14px; height: 14px; margin: auto;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: color .3s ease, transform .5s cubic-bezier(.34, 1.4, .64, 1), opacity .3s ease;
  opacity: .7;
}
.theme-toggle__icon--moon { fill: currentColor; stroke: none; }

/* Active icon rides the knob in dark ink; the idle one tucks away slightly. */
.theme-toggle[aria-pressed="false"] .theme-toggle__icon--moon,
.theme-toggle[aria-pressed="true"] .theme-toggle__icon--sun { color: var(--accent-ink); opacity: 1; transform: none; }
.theme-toggle[aria-pressed="false"] .theme-toggle__icon--sun { transform: rotate(-90deg) scale(.8); }
.theme-toggle[aria-pressed="true"] .theme-toggle__icon--moon { transform: rotate(40deg) scale(.8); }
.theme-toggle:hover .theme-toggle__icon { opacity: 1; }

/* EN / FR switch - same sliding knob as the theme toggle, so the header reads as
   one control strip. The knob sits over the language currently on screen. */
.lang-toggle {
  position: relative;
  display: inline-grid; grid-template-columns: 26px 26px; align-items: center;
  width: 60px; height: 34px; padding: 3px;
  background: var(--fill-strong);
  border: 1px solid var(--line); border-radius: 999px;
  box-shadow: inset 0 1px 3px rgb(0 0 0 / .35);
  color: var(--fg-faint);
  font: 800 10px/1 Archivo, sans-serif; letter-spacing: .06em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .2s ease, background .2s ease;
}
[data-theme="light"] .lang-toggle { box-shadow: inset 0 1px 3px rgb(70 50 20 / .14); }
.lang-toggle:hover { border-color: var(--accent); }

.lang-toggle__thumb {
  position: absolute; top: 3px; left: 3px;
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(145deg, #ffc978, var(--accent) 45%, var(--brand-accent-2));
  box-shadow:
    0 2px 6px rgb(0 0 0 / .35),
    0 0 14px rgb(var(--brand-accent-rgb) / .45),
    inset 0 1px 0 rgb(255 255 255 / .45);
  transform: translateX(0);
  transition: transform .45s cubic-bezier(.34, 1.4, .64, 1);
}
.lang-toggle[aria-pressed="true"] .lang-toggle__thumb { transform: translateX(26px); }
.lang-toggle:active .lang-toggle__thumb { width: 30px; }
.lang-toggle[aria-pressed="true"]:active .lang-toggle__thumb { left: -1px; }

.lang-toggle__face {
  position: relative; z-index: 1;
  margin: auto;
  opacity: .7;
  transition: color .3s ease, opacity .3s ease, transform .5s cubic-bezier(.34, 1.4, .64, 1);
}
.lang-toggle[aria-pressed="false"] .lang-toggle__face--en,
.lang-toggle[aria-pressed="true"] .lang-toggle__face--fr { color: var(--accent-ink); opacity: 1; }
.lang-toggle[aria-pressed="false"] .lang-toggle__face--fr,
.lang-toggle[aria-pressed="true"] .lang-toggle__face--en { transform: scale(.85); }
.lang-toggle:hover .lang-toggle__face { opacity: 1; }

/* First switch on a cold cache: the knob pulses while the strings come back. */
.lang-toggle[data-state="busy"] .lang-toggle__thumb { animation: lang-pulse 1s ease-in-out infinite; }
.lang-toggle[data-state="error"] { border-color: #e2574c; }
.lang-toggle[data-state="error"] .lang-toggle__thumb { background: #e2574c; }
@keyframes lang-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) {
  .lang-toggle__thumb, .lang-toggle__face { transition: none; }
  .lang-toggle[data-state="busy"] .lang-toggle__thumb { animation-duration: 2.4s; }
}

.burger {
  display: none;
  width: 44px; height: 44px; padding: 0;
  background: transparent; border: 0; cursor: pointer;
  align-items: center; justify-content: center;
  flex-direction: column;
}
.burger span { display: block; width: 20px; height: 2px; background: var(--fg); margin: 3px auto; transition: transform .2s ease, opacity .2s ease; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 860px) {
  :root { --gut: 16px; }
  .burger { display: flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gut) 16px;
    z-index: 61;
  }
  .nav__link { border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; padding: 16px 2px; font-size: 13px; }
  .nav__sep { display: none; }
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  padding-block: 22px 28px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--fg-faint);
}

/* ═══════════════════════════════════════════════════════════════
   hero ground - shared by the one-pager hero and the project hero
   The section paints its own ground: a masked blueprint grid, a
   fixed ambient wash, a pointer-tracked spot, a grain pass and a
   veil that dissolves into the page below. hero.js drives the spot
   and the entrance stagger.
   ═══════════════════════════════════════════════════════════════ */

:is(.hero, .phero) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background-color: var(--ground);

  --hero-aura: rgba(255, 183, 77, .13);
  --hero-spot: rgba(255, 183, 77, .1);
  --hero-grid: rgba(246, 241, 228, .05);
  --hero-rule: rgba(246, 241, 228, .1);
  --hero-surface: rgba(255, 255, 255, .028);
  --hero-raised: rgba(255, 255, 255, .05);
  --hero-fade: #14211b;
  --hero-pop: #1d2b24;
  --hero-shadow: 0 20px 44px -32px rgba(0, 0, 0, .95);
  --hero-lift: 0 14px 30px -20px rgba(0, 0, 0, .8);
  --grain-opacity: .16;
}

[data-theme="light"] :is(.hero, .phero) {
  --hero-aura: rgba(217, 130, 12, .16);
  --hero-spot: rgba(217, 130, 12, .12);
  --hero-grid: rgba(16, 26, 22, .05);
  --hero-rule: rgba(16, 26, 22, .09);
  --hero-surface: rgba(255, 253, 247, .66);
  --hero-raised: rgba(255, 253, 247, .95);
  --hero-fade: #f5efe1;
  --hero-pop: #fffdf7;
  --hero-shadow: 0 20px 44px -34px rgba(74, 52, 16, .5);
  --hero-lift: 0 14px 28px -20px rgba(74, 52, 16, .38);
  --grain-opacity: .05;
}

/* ---------- background stack ---------- */

.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.hero__bg > * { position: absolute; inset: 0; display: block; }

/* Blueprint grid, faded out toward the edges so it reads as depth
   rather than as graph paper laid over the whole band. */
.hero__grid {
  background-image:
    linear-gradient(to right, var(--hero-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--hero-grid) 1px, transparent 1px);
  background-size: 76px 76px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(115% 92% at 50% 6%, #000 30%, rgba(0, 0, 0, .35) 62%, transparent 88%);
  mask-image: radial-gradient(115% 92% at 50% 6%, #000 30%, rgba(0, 0, 0, .35) 62%, transparent 88%);
}

/* Static warmth behind the identity block. */
.hero__aura {
  background:
    radial-gradient(560px 420px at 14% 8%, var(--hero-aura), transparent 68%),
    radial-gradient(680px 460px at 88% 96%, var(--hero-aura), transparent 72%);
}

/* Pointer-tracked light. Sized once, moved with a transform, so the
   only thing that changes per frame is the compositor matrix. */
.hero__spot {
  inset: auto auto auto 0;
  top: 0;
  width: 620px; height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, var(--hero-spot), transparent 100%);
  opacity: 0;
  transition: opacity .55s ease;
  will-change: transform;
}
:is(.hero, .phero).is-tracking .hero__spot { opacity: 1; }

.hero__grain {
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* Dissolve into whatever follows, so the band has a floor. */
.hero__veil { background: linear-gradient(to bottom, transparent 52%, var(--bg) 100%); }

/* Hairline highlight under the sticky header. */
:is(.hero, .phero)::before {
  content: "";
  position: absolute; inset-inline: 0; top: 0; height: 1px; z-index: 1;
  background: linear-gradient(90deg, transparent, var(--hero-rule) 22%, var(--hero-rule) 78%, transparent);
  pointer-events: none;
}

/* ---------- entrance ---------- */

@media (prefers-reduced-motion: no-preference) {
  :is(.hero, .phero).can-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
  }
  :is(.hero, .phero).is-ready [data-reveal] {
    opacity: 1;
    transform: none;
    transition:
      opacity .72s cubic-bezier(.22, .61, .36, 1) var(--d, 0s),
      transform .72s cubic-bezier(.22, .61, .36, 1) var(--d, 0s);
  }
}
