/* ============================================================
   Preston Thoman · "Golden Hour in the Coachella Valley"
   Every value here comes from DESIGN.md. Component rules never
   set font-size directly: text uses the .t-* token classes.
   ============================================================ */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-var.woff2") format("woff2");
  font-weight: 200 800; font-display: swap;
}

:root {
  /* the palette (DESIGN.md §1, js/palette.js, video/src/palette.ts) */
  --petrol: #0A3440;          /* main base, about 60% */
  --cerulean: #127C8A;        /* second field color, about 30% */
  --cerulean-field: color-mix(in srgb, var(--cerulean) 92%, var(--deep));  /* #117582: Mist text passes AA (4.89:1) */
  --tangerine: #FF7A1A;       /* the rare accent */
  --mist: #EEF5F6;            /* text on dark, light panels */
  --deep: #062129;            /* darkest shade, text on light panels */
  --glow: #FFB070;            /* light effects only */

  /* live values, tweened by js/app.js between Petrol, Cerulean and Deep */
  --field: #0A3440;
  --fg: #EEF5F6;

  /* type scale, 390px → 1440px */
  --t-hero: clamp(72px, calc(24.46px + 12.19vw), 200px);
  --t-display: clamp(56px, calc(32.23px + 6.095vw), 120px);
  --t-h2: clamp(38px, calc(28.34px + 2.476vw), 64px);
  --t-h3: clamp(24px, calc(21.03px + 0.762vw), 32px);
  --t-lead: clamp(20px, calc(18.51px + 0.381vw), 24px);
  --t-body: clamp(17px, calc(16.63px + 0.095vw), 18px);
  --t-label: clamp(13px, calc(12.63px + 0.095vw), 14px);

  /* spacing scale: the only lengths for margin, padding and gap */
  --s-1: 8px; --s-2: 16px; --s-3: 24px; --s-4: 40px;
  --s-5: 64px; --s-6: 96px; --s-7: 160px; --s-8: 240px;
  --section-pad: clamp(96px, calc(72.23px + 6.095vw), 160px);
  --side: clamp(20px, 5vw, 80px);
  --gutter: 24px;

  --ease-wipe: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);

  --archivo: "Archivo", "Arial Narrow", sans-serif;
  --newsreader: "Newsreader", Georgia, serif;
}

/* ---------- type tokens ---------- */
.t-hero    { font: 900 var(--t-hero)/0.85 var(--archivo); font-stretch: 125%; letter-spacing: -0.04em; text-transform: uppercase; }
.t-display { font: 800 var(--t-display)/0.9 var(--archivo); font-stretch: 125%; letter-spacing: -0.03em; }
.t-h2      { font: 800 var(--t-h2)/1 var(--archivo); font-stretch: 112%; letter-spacing: -0.02em; }
.t-h3      { font: 700 var(--t-h3)/1.15 var(--archivo); font-stretch: 100%; }
.t-lead    { font: 400 var(--t-lead)/1.4 var(--newsreader); }
.t-body    { font: 400 var(--t-body)/1.6 var(--newsreader); max-width: 62ch; }
.t-label   { font: 600 var(--t-label)/1.35 var(--archivo); font-stretch: 100%; letter-spacing: 0.01em; }
/* the one documented exception: the hero name keeps 72px on phones but narrows its width axis */
@media (max-width: 599px) { .t-hero, .t-display { font-stretch: 100%; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; color: var(--fg); background: var(--field);
  font: 400 var(--t-body)/1.6 var(--newsreader);
  font-variant-numeric: lining-nums tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, canvas, video, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--tangerine); outline-offset: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: var(--s-2); top: -64px; z-index: 200; background: var(--deep); color: var(--mist); padding: var(--s-1) var(--s-2); }
.skip:focus { top: var(--s-2); }

.wrap { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--side); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }

/* the evening itself: one fixed layer behind the page */
.daylight { position: fixed; inset: 0; z-index: -1; background: var(--field); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: var(--s-1); min-height: 48px; padding: 0 var(--s-3); transition: background-color .5s var(--ease-reveal), color .5s var(--ease-reveal); }
.btn--solid { background: var(--tangerine); color: var(--petrol); }
.btn--solid:hover { background: var(--mist); color: var(--petrol); }
.btn--line { padding: 0; border-bottom: 3px solid currentColor; min-height: 40px; }
.btn--line:hover { border-color: var(--tangerine); }
.btn__arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .4s var(--ease-reveal); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* every section opens the same way: a small label, the title, then the lead */
.section__kicker, .chapter__kicker, .caps__kicker { grid-column: 1 / -1; margin-bottom: var(--s-2); opacity: 0.85; }

/* ============================================================
   PRELOADER
   ============================================================ */
.preloader {
  position: fixed; inset: 0; z-index: 300; background: var(--petrol); color: var(--mist);
  display: grid; place-items: center;
}
.no-preload .preloader { display: none; }
.preloader__mark { width: min(320px, 70vw); }
.preloader__mark svg { width: 100%; height: auto; overflow: visible; }
.preloader__ridge { fill: none; stroke: var(--mist); stroke-width: 2; stroke-linejoin: round; }
.preloader__sun { fill: var(--tangerine); }
.preloader__count { margin-top: var(--s-3); display: flex; justify-content: space-between; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-3) var(--side); color: var(--nav-fg, var(--fg));
  transition: transform .7s var(--ease-wipe), color .4s;
}
.nav.is-hidden { transform: translateY(-110%); }
/* past the hero the bar gets the section's own field behind it, so it never sits on text */
.nav.is-solid { background: var(--field); color: var(--fg); transition: transform .7s var(--ease-wipe), color .4s, background-color .4s; }
.nav__mark { margin-right: auto; font-weight: 900; font-stretch: 125%; letter-spacing: -0.02em; text-transform: uppercase; white-space: nowrap; }
.nav__links { display: flex; gap: var(--s-3); }
.nav__links a { padding: var(--s-1) 0; border-bottom: 2px solid transparent; transition: border-color .3s; }
.nav__links a:hover, .nav__links a[aria-current] { border-color: var(--tangerine); }
.nav__resume { padding: var(--s-1) var(--s-2); border: 2px solid currentColor; }
.nav__resume:hover { background: var(--tangerine); color: var(--petrol); border-color: var(--tangerine); }
.nav__toggle { display: none; }
@media (max-width: 860px) {
  .nav { gap: var(--s-2); padding-block: var(--s-2); }
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; gap: var(--s-2);
    padding: var(--s-6) var(--side); background: var(--deep); color: var(--mist);
    clip-path: inset(0 0 100% 0); transition: clip-path .8s var(--ease-wipe);
  }
  .nav__links.is-open { clip-path: inset(0 0 0 0); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; }
.hero__stage { position: absolute; inset: 0; overflow: hidden; background: var(--cerulean) url("../img/hero/still.webp") 50% 50% / cover no-repeat; }
/* until the scene's first frame is drawn and the name placed (js/app.js), the still above stands in for them */
.hero__back, .hero__front, .hero__names { transition: opacity .6s var(--ease-reveal); }
.hero-wait .hero__back, .hero-wait .hero__front, .hero-wait .hero__names { opacity: 0; transition: none; }
/* a reload holds its field color until it is back in place */
.restoring body { visibility: hidden; }
/* lab: last visit's sky was dark, so the stand-in is too */
.sky-night .hero__stage { background: var(--deep); }
.sky-night .hero__ui { color: var(--mist); }
.hero__back, .hero__front, .hero__still { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__still { object-fit: cover; }
.js .hero__still { display: none; }
.hero__back { z-index: 1; }
.hero__front { z-index: 3; pointer-events: none; }
.hero__names { position: absolute; z-index: 2; left: var(--side); right: var(--side); top: 44%; }
.hero__name { color: var(--deep); }
.hero__name--night { position: absolute; inset: 0; color: var(--mist); opacity: 0; }
.hero__line { display: block; }

.hero__ui { position: absolute; z-index: 4; inset: 0; pointer-events: none; color: var(--deep); }
.hero__ui a, .hero__ui button { pointer-events: auto; }
/* two quiet facts, label over value, set off by a hairline; the role cycles in place */
.hero__top { position: absolute; top: calc(var(--s-6) + var(--s-2)); left: var(--side); margin: 0; display: flex; gap: var(--s-4); }
.hero__meta { display: flex; flex-direction: column; gap: 4px; padding-left: var(--s-2); border-left: 2px solid color-mix(in srgb, currentColor 35%, transparent); }
.hero__meta dt { opacity: 0.75; }
.hero__meta dd { margin: 0; }
.hero__roles { list-style: none; padding: 0; margin: 0; position: relative; height: 1.4em; width: 11em; overflow: hidden; }
.hero__roles li { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; transform: translateY(100%); transition: transform .7s var(--ease-reveal), opacity .7s var(--ease-reveal); }
.hero__roles li.is-on { opacity: 1; transform: none; }
.hero__roles li.is-out { opacity: 0; transform: translateY(-100%); }
.hero__roles:not(.is-cycling) li:first-child { opacity: 1; transform: none; }
.hero__bottom {
  position: absolute; left: var(--side); right: var(--side); bottom: var(--s-4);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end;
}
.hero__lead { grid-column: 1 / span 6; }
/* the actions sit right under the sentence they act on */
.hero__cta { grid-column: 1 / span 6; grid-row: 2; margin-top: var(--s-3); display: flex; gap: var(--s-3); justify-content: flex-start; align-items: center; flex-wrap: wrap; }
.hero__cue { position: absolute; right: var(--side); top: calc(var(--s-6) + var(--s-2) + var(--s-1)); display: flex; align-items: center; gap: var(--s-1); }
.hero__cue::after { content: ""; width: 1px; height: var(--s-4); background: currentColor; transform-origin: top; animation: cue 2.4s var(--ease-wipe) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }
.hero__flood { position: absolute; inset: 0; z-index: 5; background: var(--petrol); clip-path: circle(0 at 50% 50%); visibility: hidden; pointer-events: none; }

@media (max-width: 860px) {
  .hero__bottom { grid-template-columns: 1fr; row-gap: 0; bottom: var(--s-3); }
  .hero__lead, .hero__cta { grid-column: 1; }
  .hero__top { top: calc(var(--s-6) - var(--s-1)); flex-direction: column; gap: var(--s-2); }
  .hero__cue { display: none; }
}

/* ============================================================
   SECTION INTRO LIGHT
   ============================================================ */
.chapter__light { position: absolute; inset: 0; pointer-events: none; }
.work__intro .chapter__kicker { grid-column: 1 / -1; }

.chapter__title { grid-column: 1 / -1; }
.chapter__lead { grid-column: 1 / span 7; margin-top: var(--s-4); }

/* light, never decoration: low sun from the left, glow from below, a spotlight */
.light--rake   { background: radial-gradient(120% 90% at -10% 40%, color-mix(in srgb, var(--mist) 10%, transparent), transparent 60%); }
.light--below  { background: radial-gradient(90% 60% at 50% 120%, color-mix(in srgb, var(--cerulean) 55%, transparent), transparent 70%); }
.light--shade  { background: linear-gradient(90deg, transparent 0 38%, color-mix(in srgb, var(--petrol) 55%, transparent) 70%); }

@media (max-width: 860px) {
  .light--shade { background: linear-gradient(180deg, transparent 0 10%, color-mix(in srgb, var(--petrol) 55%, transparent) 40%); }
}

.footer { display: flex; justify-content: space-between; gap: var(--s-3); padding-block: var(--s-4); flex-wrap: wrap; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}

/* small structural rules referenced by home.html */
.chapter__kicker { grid-column: 1 / -1; }
.footer { grid-column: 1 / -1; margin-top: var(--s-5); }

/* capture mode (scripts/hero-frames.mjs): the scene alone */
.capture .nav, .capture .hero__ui, .capture .skip, .capture .preloader, .capture main > section:not(.hero) { display: none; }
.capture:not(.og) .hero__names { visibility: hidden; }
.capture body { overflow: hidden; }

/* ============================================================
   SELECTED WORK: four pinned chapters on golden-hour fields
   ============================================================ */
.work__intro { position: relative; padding-block: var(--section-pad) var(--s-6); }
.work__intro .wrap { position: relative; }
.chap { position: relative; min-height: 100vh; background: var(--chap-bg); color: var(--chap-fg); overflow: hidden; transform-origin: 50% 0; }
.chap[data-field="cerulean"] { --chap-bg: var(--cerulean-field); --chap-fg: var(--mist); }
.chap[data-field="petrol"] { --chap-bg: var(--petrol); --chap-fg: var(--mist); }
.chap__light { position: absolute; inset: 0; pointer-events: none; }
.chap__shade { position: absolute; inset: 0; z-index: 5; background: var(--deep); opacity: 0; pointer-events: none; }
.chap__inner {
  position: relative; min-height: 100vh; align-content: center; row-gap: var(--s-3);
  padding-top: calc(var(--s-6) + var(--s-2)); padding-bottom: var(--s-5);
}
.chap__kicker { grid-column: 1 / -1; display: flex; gap: var(--s-2); }
.chap__title { grid-column: 1 / -1; }
.chap__text { grid-column: 1 / span 5; align-self: start; }
.chap__spec { margin: var(--s-4) 0 0; }
.chap__spec div { display: grid; grid-template-columns: 7.5em 1fr; gap: var(--s-2); padding-block: var(--s-1); border-top: 1px solid color-mix(in oklab, currentColor 35%, transparent); }
.chap__spec dt { padding-top: 3px; }
.chap__spec dd { margin: 0; }
.chap__media { grid-column: 6 / -1; position: relative; display: block; align-self: start; }
.chap__media video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--deep) 50% 50% / cover no-repeat; }   /* js/work.js sets a blurred stand-in as the background */
.chap__media canvas { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 16 / 9; pointer-events: none; }
.chap__veil { position: absolute; left: 0; top: 0; z-index: 1; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; pointer-events: none; transition: opacity .8s var(--ease-reveal); }
/* the trailer reads as a button: a chip on its corner */
.chap__cta { position: absolute; left: var(--s-2); bottom: var(--s-2); z-index: 2; display: inline-flex; align-items: center; gap: var(--s-1); background: var(--deep); color: var(--mist); padding: var(--s-1) var(--s-2); transition: background-color .4s var(--ease-reveal), color .4s var(--ease-reveal); }
.chap__cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .4s var(--ease-reveal); }
.chap__media:hover .chap__cta, .chap__media:focus-visible .chap__cta { background: var(--mist); color: var(--deep); }
.chap__media:hover .chap__cta svg { transform: translateX(4px); }
.chap__btn { margin-top: var(--s-3); }
.chap--flip .chap__text { grid-column: 8 / -1; grid-row: 3; }
.chap--flip .chap__media { grid-column: 1 / span 7; grid-row: 3; }
.chap--flip .chap__title, .chap--flip .chap__kicker { grid-column: 6 / -1; text-align: right; justify-content: flex-end; }
.chap--flip .chap__title { grid-column: 1 / -1; }   /* right-aligned, so a long name can borrow the empty left side */
.chap--flip .chap__light.light--shade { background: linear-gradient(90deg, transparent 0 40%, color-mix(in srgb, var(--petrol) 55%, transparent) 72%); }
@media (max-width: 960px) {
  .chap__inner { row-gap: var(--s-3); padding-top: var(--s-6); }
  .chap__text, .chap__media, .chap--flip .chap__text, .chap--flip .chap__media, .chap--flip .chap__title, .chap--flip .chap__kicker { grid-column: 1 / -1; grid-row: auto; }
  .chap--flip .chap__title, .chap--flip .chap__kicker { text-align: left; justify-content: flex-start; }
  .chap__media { order: 3; }
  .chap__text { order: 4; }
  .chap__media video, .chap__media canvas, .chap__veil { aspect-ratio: 4 / 5; }
  .chap--flip .chap__light.light--shade { background: linear-gradient(180deg, transparent 0 20%, color-mix(in srgb, var(--petrol) 55%, transparent) 50%); }
}

/* ============================================================
   SELECTED WORK AS A WORLD (js/dim/world.js)
   One sticky canvas behind the section; the camera flies island to
   island. Each chapter is two screens tall: its text holds still
   (sticky) while the island's sequence plays, then hands over.
   Without WebGL the chapters above are the layout.
   ============================================================ */
.world { display: none; }
.has-world .world {
  display: block; position: sticky; top: 0; z-index: 0; height: 100vh; height: 100lvh; margin-bottom: -100vh; margin-bottom: -100lvh;
  pointer-events: none; contain: strict;
}
.world__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* the scrim keeps the words crisp: the field color under the text column, clear over the scene */
.world::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--field) 88%, transparent) 0%, color-mix(in srgb, var(--field) 55%, transparent) 30%, transparent 52%);
  transition: opacity .6s var(--ease-reveal);
}
.world.is-flip::after { background: linear-gradient(270deg, color-mix(in srgb, var(--field) 88%, transparent) 0%, color-mix(in srgb, var(--field) 55%, transparent) 30%, transparent 52%); }
.has-world .work__desert { display: none; }
.has-world .work__intro { position: relative; z-index: 1; min-height: 170vh; padding-bottom: 0; }
.has-world .work__intro > .wrap { position: sticky; top: 0; min-height: 100vh; align-content: center; padding-block: var(--s-6) var(--s-5); }
.has-world .work__intro .chapter__lead { grid-column: 1 / span 5; }
.has-world .work__intro .chapter__light { display: none; }
.has-world .chap { background: transparent; overflow: visible; min-height: 210vh; z-index: 1; }
.has-world .chap__light, .has-world .chap__shade { display: none; }
.has-world .chap__inner { position: sticky; top: 0; min-height: 100vh; align-content: center; padding-block: var(--s-6) var(--s-4); }
.has-world .chap__title { grid-column: 1 / span 7; }
.has-world .chap--flip .chap__title { grid-column: 1 / -1; }
.has-world .chap__spec { font-size: 0.94em; }
/* the screen in the scene is the link: a transparent box that follows it */
.has-world .chap__media {
  position: fixed; left: 0; top: 0; z-index: 4; width: 0; height: 0; visibility: hidden;
  outline-offset: 6px; cursor: pointer; will-change: transform;
}
.has-world .chap__media.is-live { visibility: visible; }
.has-world .chap__media video { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.01; aspect-ratio: auto; background: none !important; }
.has-world .chap__veil { display: none; }
.has-world .chap__cta { opacity: 0; transform: translateY(6px); transition: opacity .35s var(--ease-reveal), transform .35s var(--ease-reveal), background-color .4s var(--ease-reveal), color .4s var(--ease-reveal); }
.has-world .chap__media:hover .chap__cta, .has-world .chap__media:focus-visible .chap__cta { opacity: 1; transform: none; }
.has-world .chap__media:focus-visible { outline: 2px solid var(--tangerine); }
@media (max-width: 860px) {
  /* phones: the island fills the top of the screen, the words rise over it on a field panel */
  .world::after, .world.is-flip::after { background: linear-gradient(0deg, color-mix(in srgb, var(--field) 92%, transparent) 0%, color-mix(in srgb, var(--field) 70%, transparent) 38%, transparent 62%); }
  .has-world .work__intro { min-height: 0; }
  .has-world .work__intro > .wrap { position: relative; min-height: 0; padding-top: 58vh; padding-bottom: 30vh; }
  .has-world .chap { min-height: 0; }
  .has-world .chap__inner { position: relative; min-height: 0; padding-top: 62vh; padding-bottom: 34vh; }
  .has-world .chap__title, .has-world .chap--flip .chap__title, .has-world .chap--flip .chap__kicker { grid-column: 1 / -1; }
  .has-world .chap__text { order: 4; }
}

/* ============================================================
   CASE STUDY (overlay on home, standalone on project.html)
   ============================================================ */
.case { position: fixed; inset: 0; z-index: 150; background: var(--case-field, var(--petrol)); color: var(--case-fg, var(--mist)); }
.case[hidden] { display: none; }
.case__scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; }
.case__close { position: absolute; z-index: 2; top: var(--s-3); right: var(--side); background: var(--deep); color: var(--mist); padding: var(--s-1) var(--s-2); min-height: 44px; }
.case__close:hover { background: var(--cerulean-field); }
/* the case study pages themselves live in css/case.css */


picture { display: contents; }
source { display: none; }

/* ============================================================
   CASE STUDY: Snap Specs inside Proximity Pulse, scrubbed by scroll
   ============================================================ */
.cs-specs { position: relative; height: 230vh; margin: var(--s-6) 0 0; }
.cs-specs__stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background: radial-gradient(46% 60% at 64% 54%, color-mix(in srgb, var(--cerulean) 70%, transparent), transparent 72%), radial-gradient(30% 22% at 64% 74%, color-mix(in srgb, var(--glow) 22%, transparent), transparent 70%);
}
.cs-specs__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cs-specs__copy { position: relative; padding: calc(var(--s-6) + var(--s-2)) var(--side) 0; max-width: 40em; }
.cs-specs__copy h2 { margin-top: var(--s-2); }
.cs-specs__beats { list-style: none; margin: 0; padding: 0; position: absolute; left: var(--side); bottom: var(--s-6); width: min(26em, calc(100% - 2 * var(--side))); }
.cs-specs__beat { position: absolute; left: 0; bottom: 0; width: 100%; opacity: 0; transform: translateY(var(--s-3)); transition: opacity .25s ease-out, transform .25s ease-out; }
.cs-specs__beat.is-on { opacity: 1; transform: none; transition: opacity .6s var(--ease-reveal) .22s, transform .6s var(--ease-reveal) .22s; }
.cs-specs.is-static { height: auto; }
.cs-specs.is-static .cs-specs__stage { position: relative; height: auto; min-height: 80vh; padding-bottom: var(--s-5); }
.cs-specs.is-static .cs-specs__canvas { position: relative; height: 60vh; }
.cs-specs.is-static .cs-specs__beats { position: static; margin: 0 var(--side); }
.cs-specs.is-static .cs-specs__beat { position: static; opacity: 1; transform: none; margin-top: var(--s-2); }
@media (max-width: 860px) { .cs-specs__beats { bottom: var(--s-5); } }

/* ============================================================
   MORE WORK: a strip of film you can drag
   ============================================================ */
.more { position: relative; padding-block: var(--section-pad); overflow: hidden; }
.more__light { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 70%, color-mix(in srgb, var(--petrol) 45%, transparent) 100%); pointer-events: none; }
.more__head { position: relative; row-gap: var(--s-3); align-items: end; }
.more__title { grid-column: 1 / span 7; }
.more__lead { grid-column: 9 / -1; }
.shelf__bar { position: relative; display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-5); }
/* filters look like what they are: buttons, one of them on */
.shelf__filters { display: flex; gap: var(--s-1); flex-wrap: wrap; }
.shelf__filters button { min-height: 40px; padding: 0 var(--s-2); border: 2px solid color-mix(in srgb, var(--mist) 40%, transparent); transition: border-color .3s, background-color .3s, color .3s; }
.shelf__filters button:hover { border-color: var(--mist); }
.shelf__filters button[aria-pressed="true"] { background: var(--tangerine); color: var(--petrol); border-color: var(--tangerine); }
.shelf__nav { display: flex; align-items: center; gap: var(--s-1); }
.shelf__count { margin-right: var(--s-2); }
.sq { width: 48px; height: 48px; display: grid; place-items: center; background: var(--deep); color: var(--mist); }
.sq:hover { background: var(--petrol); }
.sq:disabled { opacity: 0.35; cursor: default; }
.sq svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.shelf { position: relative; margin-top: var(--s-4); padding-block: var(--s-4); overflow-x: auto; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.shelf { cursor: grab; overscroll-behavior-x: contain; }
.shelf.is-dragging { cursor: grabbing; user-select: none; }
.shelf.is-dragging .card__link { pointer-events: none; }
.shelf__track { position: relative; z-index: 1; list-style: none; margin: 0; display: flex; gap: var(--gutter); padding: 0 var(--side); width: max-content; }
.card { width: clamp(280px, 26vw, 400px); flex: none; }
.card.is-hidden { display: none; }
.card__link { display: block; }
.card__media { margin: 0 0 var(--s-2); aspect-ratio: 4 / 3; overflow: hidden; background: var(--petrol); }
.card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-reveal); }
.card__img--top { object-position: 50% 0; }
/* a wordmark shown whole, on its own light gray so the frame reads as one image */
.card__media--logo { background: var(--logo-bg, #e7e7e7); }
.card__media--logo .card__img { object-fit: contain; padding: var(--logo-pad, 6%); }
.card__media--pixel .card__img { object-fit: contain; padding: 14%; image-rendering: pixelated; }
.card__link:hover .card__img { transform: scale(1.04); }
.card__meta { display: flex; justify-content: space-between; gap: var(--s-2); border-top: 1px solid currentColor; padding-top: var(--s-1); }
.card__title { margin-top: var(--s-2); }
.card__role { margin-top: var(--s-1); opacity: 0.8; }
.card__desc { margin-top: var(--s-2); }
.card__stack { margin-top: var(--s-2); }
.card__link:hover .card__title { text-decoration: underline; text-decoration-color: var(--tangerine); text-decoration-thickness: 2px; text-underline-offset: 4px; }
@media (max-width: 860px) {
  .more__title, .more__lead { grid-column: 1 / -1; }
  .card { width: 78vw; }
}

/* ============================================================
   PATH: a road through the desert at dusk
   ============================================================ */
.path { position: relative; overflow: hidden; }
/* the whole section pins as exactly one screen: heading, road and stops in the upper part,
   the dark ridges filling the bottom */
.path__pin { position: relative; height: 100vh; height: 100svh; padding-top: max(88px, 11vh); display: flex; flex-direction: column; overflow: hidden; }
.path__land { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 40vh; }
.path__head { position: relative; row-gap: var(--s-3); align-items: end; }
.path__title { grid-column: 1 / span 7; }
.road { position: relative; flex: 1; }
.road__line { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.road__line path { fill: none; stroke: var(--mist); stroke-width: 3; stroke-linecap: round; }
.road__track { position: relative; list-style: none; margin: 0; display: flex; gap: var(--s-6); padding: 0 var(--side) var(--s-5); width: max-content; }
.stop { width: clamp(460px, 42vw, 640px); flex: none; display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gutter); align-content: start; }
.stop__year { grid-column: 1 / -1; position: relative; justify-self: start; margin: 0 0 var(--s-3); font: 900 var(--t-display)/0.85 var(--archivo); font-stretch: 125%; letter-spacing: -0.04em; font-variant-numeric: lining-nums tabular-nums; }
.stop__outline { color: transparent; -webkit-text-stroke: 2px var(--mist); }
.stop__fill { position: absolute; left: 0; top: 0; color: var(--mist); clip-path: inset(0 0 0 0); text-shadow: 0 0 1px var(--deep); }
.path.is-scrub .stop__fill { clip-path: inset(0 100% 0 0); }
.stop__title { grid-column: 1; }
.stop__desc { grid-column: 1; margin-top: var(--s-2); }
.stop__img { grid-column: 2; grid-row: 2 / span 2; margin: 0; }
.stop__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.stop--pixel .stop__img { background: var(--deep); padding: var(--s-4) var(--s-3); }
.stop--pixel .stop__img img { aspect-ratio: auto; object-fit: contain; image-rendering: pixelated; }
@media (max-width: 860px), (prefers-reduced-motion: reduce) {
  .path__title { grid-column: 1 / -1; }
  .road__line { display: none; }
  .road__track { flex-direction: column; width: auto; gap: var(--s-6); padding-left: calc(var(--side) + var(--s-4)); border-left: 3px solid var(--mist); margin-left: var(--side); padding-right: var(--side); }
  .stop { width: auto; display: block; }
  .stop__year { font-size: var(--t-display); margin-bottom: var(--s-2); }
  .stop__img { margin-top: var(--s-3); }
  .path__land { height: 20vh; }
  .path__pin { height: auto; overflow: visible; padding-top: var(--section-pad); padding-bottom: 22vh; }
  .path__head { margin-bottom: var(--s-5); }
}

/* ============================================================
   ABOUT: Preston's studio
   ============================================================ */
.about { position: relative; padding-block: var(--section-pad); }
.about__hint { margin-top: var(--s-2); }
.room { position: relative; margin-top: var(--s-3); aspect-ratio: 2 / 1; }
.room__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.room__tip { position: absolute; left: 0; top: 0; background: var(--mist); color: var(--deep); padding: var(--s-1) var(--s-2); pointer-events: none; opacity: 0; transform: translate(-50%, calc(-100% - 8px)); transition: opacity .25s; white-space: nowrap; }
.room__tip.is-on { opacity: 1; }
.room__canvas { transition: filter .9s var(--ease-reveal); }
.room.is-focus .room__tip { opacity: 0; }

/* the panel: a Mist sheet beside the focused object, its projects as cards */
.room__panel {
  position: absolute; top: var(--s-3); bottom: var(--s-3); right: var(--s-3); width: min(420px, 40%);
  display: flex; flex-direction: column; overflow: auto; overscroll-behavior: contain;
  background: var(--mist); color: var(--deep); border-left: 3px solid var(--tangerine);
  padding: var(--s-3);
  opacity: 0; transform: translateX(24px); pointer-events: none;
  transition: opacity .45s var(--ease-reveal), transform .7s var(--ease-reveal);
}
.room.is-focus .room__panel { opacity: 1; transform: none; pointer-events: auto; transition-delay: .15s; }
.room__phead { display: flex; justify-content: space-between; align-items: center; }
.room__pkind { opacity: .65; }
.room__x { width: 40px; height: 40px; display: grid; place-items: center; margin: -8px -8px 0 0; background: none; border: 0; color: var(--deep); cursor: pointer; transition: background-color .3s; }
.room__x:hover { background: color-mix(in srgb, var(--deep) 8%, transparent); }
.room__x svg, .room__pnav svg, .room__go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.room__ptitle { margin-top: var(--s-1); outline: none; }
.room__pcount { margin-top: var(--s-1); opacity: .7; }
.room__cards { list-style: none; padding: 0; margin: var(--s-2) 0 0; flex: 1; }
.room__card { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid color-mix(in srgb, var(--deep) 18%, transparent); position: relative; }
.room__cards li:last-child .room__card { border-bottom: 1px solid color-mix(in srgb, var(--deep) 18%, transparent); }
.room__card::before { content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 100%; background: var(--tangerine); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease-wipe); }
.room__card:hover::before, .room__card:focus-visible::before { transform: scaleX(1); }
.room__ck { opacity: .65; }
.room__cs { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.room__ct { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); }
.room__go { display: inline-flex; }
.room__cards.is-many .room__cs { -webkit-line-clamp: 1; }
.room__card:hover .room__ct, .room__card:focus-visible .room__ct { text-decoration: underline; text-decoration-color: var(--tangerine); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.room__go svg { transition: transform .4s var(--ease-reveal); }
.room__card:hover .room__go svg, .room__card:focus-visible .room__go svg { transform: translateX(5px); }
.room__card:focus-visible { outline: 2px solid var(--tangerine); outline-offset: 4px; }
.room__pnav { display: flex; justify-content: space-between; gap: var(--s-2); margin-top: var(--s-3); }
.room__pnav button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; background: none; border: 0; color: var(--deep); cursor: pointer; padding: 0; }
.room__pnav button:hover { text-decoration: underline; text-decoration-color: var(--tangerine); text-underline-offset: 4px; }
@media (max-width: 700px) {
  .room { transition: margin-bottom .6s var(--ease-reveal); }
  .room__panel { top: 100%; left: 0; right: 0; bottom: auto; width: auto; overflow: visible; border-left: 0; border-top: 3px solid var(--tangerine); padding: var(--s-2); transform: translateY(-12px); }
  .room__cards { margin-top: var(--s-2); }
}

/* the key to the room: each object over the projects it holds */
.room__legend { list-style: none; padding: 0; margin: var(--s-4) 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3) var(--gutter); }
.room__item { border-top: 1px solid color-mix(in oklab, currentColor 30%, transparent); padding-top: var(--s-2); transition: border-color .3s; }
.room__item.is-hot, .room__item.is-focus { border-top-color: var(--tangerine); }
.room__head { display: flex; gap: var(--s-1); align-items: baseline; margin: 0; }
.room__obj { opacity: 0.7; }
.room__projs { list-style: none; padding: 0; margin: var(--s-1) 0 0; display: grid; gap: 2px; }
.room__projs a { display: inline-block; padding-block: 4px; }
.room__projs a:hover, .room__projs a:focus-visible { text-decoration: underline; text-decoration-color: var(--tangerine); text-underline-offset: 3px; }
@media (max-width: 1100px) { .room__legend { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .room__legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.about__grid { margin-top: var(--s-6); row-gap: var(--s-5); }
.about__portrait { grid-column: 1 / span 5; margin: 0; background: var(--cerulean-field); display: flex; align-items: flex-end; justify-content: center; padding-top: var(--s-5); align-self: start; }
@media (min-width: 861px) { .about__portrait { position: sticky; top: var(--s-6); } }
.about__portrait img { width: 88%; }
.about__text { grid-column: 7 / -1; }
.about__text > * + * { margin-top: var(--s-3); }
.about__aka { margin-top: var(--s-1); }
.stats { display: grid; grid-template-columns: 1fr 1fr; margin: var(--s-4) 0 0; border-top: 1px solid color-mix(in oklab, currentColor 35%, transparent); }
.stats div { padding: var(--s-2) var(--s-2) var(--s-2) 0; border-bottom: 1px solid color-mix(in oklab, currentColor 35%, transparent); }
.stats dd { margin: var(--s-1) 0 0; color: var(--tangerine); }
.about__how { margin-top: var(--s-5); }
.how { list-style: none; padding: 0; margin: var(--s-2) 0 var(--s-4); border-top: 1px solid color-mix(in oklab, currentColor 35%, transparent); }
.how li { display: grid; grid-template-columns: 9rem 1fr auto; gap: var(--s-2); align-items: baseline; padding-block: var(--s-2); border-bottom: 1px solid color-mix(in oklab, currentColor 35%, transparent); }
.how a { border-bottom: 2px solid currentColor; white-space: nowrap; }
@media (max-width: 860px) {
  .room { aspect-ratio: 4 / 5; }
  .about__portrait, .about__text { grid-column: 1 / -1; }
  .how li { grid-template-columns: 1fr; gap: var(--s-1); }
  .how a { justify-self: start; }
}

/* ============================================================
   CAPABILITIES + CERTIFICATIONS: night falls
   ============================================================ */
.caps { position: relative; padding-block: var(--section-pad); }
.caps__lead { margin-top: var(--s-4); max-width: 34em; }
.caps__hint { margin-top: var(--s-2); opacity: 0.85; }
.caps__list { list-style: none; padding: 0; margin: var(--s-5) 0 0; }
.cap { position: relative; border-top: 1px solid color-mix(in srgb, var(--mist) 30%, transparent); transition: color .4s; }
.cap:last-child { border-bottom: 1px solid color-mix(in srgb, var(--mist) 30%, transparent); }
.cap::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--cerulean-field) 0%, color-mix(in srgb, var(--cerulean-field) 55%, var(--petrol)) 100%); transform: scaleX(0); transform-origin: 0 50%; transition: transform .8s var(--ease-reveal); }
.cap > * { position: relative; }
/* a scannable list: name and tools on one line, details open on click */
.cap__head { width: 100%; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; text-align: left; padding: var(--s-3) 0; }
.cap__name { grid-column: 1 / span 6; }
.cap__tools { grid-column: 7 / span 4; opacity: 0.85; }
.cap__icon { grid-column: 12; justify-self: end; position: relative; width: 20px; height: 20px; }
.cap__icon::before, .cap__icon::after { content: ""; position: absolute; left: 0; top: 9px; width: 20px; height: 2px; background: currentColor; transition: transform .5s var(--ease-reveal); }
.cap__icon::after { transform: rotate(90deg); }
.cap.is-open .cap__icon::after { transform: rotate(0deg); }
.cap__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease-reveal); }
.cap.is-open .cap__panel { grid-template-rows: 1fr; }
.cap__body { min-height: 0; overflow: hidden; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); visibility: hidden; transition: visibility 0s .6s; }
.cap.is-open .cap__body { visibility: visible; transition: none; }
.cap__body > * { grid-column: 7 / span 4; }
.cap__body > :last-child { margin: var(--s-1) 0 var(--s-3); }
.cap__panel a { border-bottom: 2px solid currentColor; }
.cap__preview { position: absolute; right: var(--s-6); top: 50%; width: 180px; aspect-ratio: 3 / 2; transform: translateY(-50%); clip-path: inset(0 0 0 100%); transition: clip-path .7s var(--ease-wipe); overflow: hidden; background: var(--deep); }
.cap__preview img, .cap__preview video { width: 100%; height: 100%; object-fit: cover; }
.cap:hover, .cap:focus-within, .cap.is-open { color: var(--mist); }
.cap:hover::before, .cap:focus-within::before, .cap.is-open::before { transform: scaleX(1); }
.cap:hover .cap__preview, .cap:focus-within .cap__preview, .cap.is-open .cap__preview { clip-path: inset(0 0 0 0); }
@media (max-width: 860px) {
  .cap__head { grid-template-columns: 1fr auto; row-gap: var(--s-1); }
  .cap__body { grid-template-columns: 1fr; }
  .cap__name, .cap__body > * { grid-column: 1; }
  .cap__tools { grid-column: 1; grid-row: 2; }
  .cap__icon { grid-column: 2; grid-row: 1; }
  .cap__preview { display: none; }
}
.certs__title { margin-top: var(--s-7); }
.certs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5) var(--gutter); margin-top: var(--s-4); }
.cert > * + * { margin-top: var(--s-2); }
.cert__img { display: block; background: var(--mist); padding: var(--s-2); margin-bottom: var(--s-3); }
.cert__id { color: var(--tangerine); }
@media (max-width: 860px) { .certs { grid-template-columns: 1fr; } }

/* ============================================================
   CONTACT: night over the valley, the sun on its way back
   ============================================================ */
.contact { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.contact__sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.contact__inner { position: relative; padding-block: var(--s-7) var(--s-7); }
.contact__line { margin-top: var(--s-3); }
.mail { display: inline-flex; flex-direction: column; align-items: flex-start; gap: var(--s-1); margin-top: var(--s-5); text-align: left; }
.mail__addr { border-bottom: 4px solid var(--mist); padding-bottom: var(--s-1); overflow-wrap: anywhere; transition: border-color .3s; }
.mail:hover .mail__addr { border-color: var(--tangerine); }
.mail__hint.is-copied { color: var(--tangerine); }
.contact__links { list-style: none; padding: 0; margin: var(--s-4) 0 0; display: flex; flex-wrap: wrap; gap: var(--s-3); }
.contact__links a { border-bottom: 2px solid currentColor; padding-bottom: 2px; }
.contact__links a:hover { border-color: var(--tangerine); }
.contact .footer { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding-block: var(--s-3); max-width: none; background: var(--deep); }

/* link hovers: Tangerine underline */
.chap__cta:hover, .how a:hover, .cap__panel a:hover, .row__used a:hover, .room__projs a:focus-visible { border-color: var(--tangerine); }

/* phones: keep the links clear of the valley lights along the bottom */
@media (max-width: 860px) { .contact { justify-content: flex-start; } .contact__inner { padding-block: var(--s-6) var(--s-8); } }

/* ---------- phones: one column, every label above its value ---------- */
@media (max-width: 860px) {
  .chapter__lead { grid-column: 1 / -1; }
  .chap__spec div, .cs-spec div { grid-template-columns: 1fr; gap: 2px; padding-block: var(--s-2); }
  .chap__spec dt, .cs-spec dt { padding-top: 0; opacity: 0.75; }
  .more__head, .path__head { row-gap: var(--s-2); }
  .shelf__bar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .shelf__filters, .shelf__nav { min-width: 0; }
  .shelf__filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--side)); padding-inline: var(--side); }
  .shelf__filters::-webkit-scrollbar { display: none; }
  .shelf__filters button { flex: none; }
  .shelf__nav { justify-content: space-between; }
  .shelf__count { margin-right: auto; }
  .about__grid { margin-top: var(--s-5); }
  .stats div { padding-right: var(--s-1); }
  .how li { padding-block: var(--s-2); }
  .certs__title { margin-top: var(--s-6); }
  .footer { flex-direction: column; gap: var(--s-1); }
}

/* Selected work intro: the Joshua tree sits beside the lead */
.work__desert { grid-column: 8 / -1; grid-row: 3; align-self: start; width: 100%; aspect-ratio: 5 / 4; margin-top: calc(-1 * var(--s-4)); }
@media (max-width: 860px) { .work__desert { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 4 / 3; max-height: 320px; margin-top: var(--s-3); } }

/* Path: the car on the road (desktop scrub only), with room under each year for it to drive */
.road__car { position: absolute; left: 0; top: 0; z-index: 2; width: 136px; height: 85px; pointer-events: none; transform-origin: 62% 76%; }
.path.is-scrub .stop__year { margin-bottom: var(--s-5); }
.path:not(.is-scrub) .road__car { display: none; }

/* ============================================================
   TANGERINE ACCENTS
   More of the accent, under two rules: Tangerine text only on Petrol or
   Deep (it is 2.1:1 on Cerulean), and text on Tangerine is Petrol.
   Everywhere else it arrives as lines, markers, fills and states.
   ============================================================ */
::selection { background: var(--tangerine); color: var(--petrol); }

/* reading progress: a thin line across the top of the window */
.progress { position: fixed; left: 0; top: 0; z-index: 120; width: 100%; height: 3px; background: var(--tangerine); transform-origin: 0 50%; transform: scaleX(var(--read, 0)); pointer-events: none; }

/* section labels lead with a short Tangerine rule */
.section__kicker, .chapter__kicker, .caps__kicker, .cs-kicker { display: flex; align-items: center; gap: 10px; opacity: 1; }
.section__kicker::before, .chapter__kicker::before, .caps__kicker::before, .cs-kicker::before { content: ""; flex: none; width: 24px; height: 2px; background: var(--tangerine); }
/* the chapter number is a small Tangerine tab */
.chap__kicker { align-items: center; }
.chap__kicker .num { background: var(--tangerine); color: var(--petrol); padding: 2px var(--s-1); }
/* a Tangerine full stop where a title has one */
.accent { color: var(--tangerine); }

/* hero: the facts and the scroll cue are drawn in Tangerine */
.hero__meta { border-left-color: var(--tangerine); }
.hero__cue::after { width: 2px; background: var(--tangerine); }

/* nav: the resume is the one filled button up there */
.nav__resume { background: var(--tangerine); color: var(--petrol); border-color: var(--tangerine); }
.nav__resume:hover { background: var(--mist); color: var(--petrol); border-color: var(--mist); }

/* every underlined link and line button underlines in Tangerine; hover turns it Mist */
.btn--line, .how a, .cap__panel a, .contact__links a, .cs-hero figcaption a { border-bottom-color: var(--tangerine); }
.btn--line:hover, .how a:hover, .cap__panel a:hover, .contact__links a:hover { border-bottom-color: var(--mist); }
.mail__addr { border-bottom-color: var(--tangerine); }
.mail:hover .mail__addr { border-bottom-color: var(--mist); }

/* work chapters: the trailer chip lights Tangerine on hover; on Petrol chapters the spec labels are Tangerine */
.chap__media:hover .chap__cta, .chap__media:focus-visible .chap__cta { background: var(--tangerine); color: var(--petrol); }
.chap[data-field="petrol"] .chap__spec dt { color: var(--tangerine); }

/* more work: a Tangerine rule over each card, Tangerine arrows on hover */
.card__meta { border-top: 2px solid var(--tangerine); }
.sq:hover:not(:disabled) { background: var(--tangerine); color: var(--petrol); }

/* path: the years fill in Tangerine as the road reaches them */
.stop__fill { color: var(--tangerine); text-shadow: none; }

/* studio: the tooltip carries a Tangerine edge */
.room__tip { border-left: 3px solid var(--tangerine); }

/* capabilities: a Tangerine plus, and an open row is marked down its left edge */
.cap__icon::before, .cap__icon::after { background: var(--tangerine); }
.cap.is-open { box-shadow: inset 3px 0 0 var(--tangerine); }

/* certifications: the issuer line in Tangerine (on Deep) */
.cert > .t-label:first-of-type { color: var(--tangerine); }

/* preloader and footer */
.preloader__count #preCount { color: var(--tangerine); }
.footer > span:last-child:not(:first-child) { display: inline-flex; align-items: center; gap: var(--s-1); }
.footer > span:last-child:not(:first-child)::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tangerine); }

/* capabilities: rows wipe to Tangerine with Petrol text when hovered or open */
.cap::before { background: var(--tangerine); inset: 0 calc(-1 * var(--s-2)); }   /* the fill reaches past the text, so nothing shifts */
.cap:hover, .cap:focus-within, .cap.is-open { color: var(--petrol); }
.cap:hover .cap__icon::before, .cap:hover .cap__icon::after, .cap:focus-within .cap__icon::before, .cap:focus-within .cap__icon::after,
.cap.is-open .cap__icon::before, .cap.is-open .cap__icon::after { background: var(--petrol); }
.cap:hover .cap__panel a, .cap:focus-within .cap__panel a, .cap.is-open .cap__panel a { border-bottom-color: var(--petrol); }
.cap.is-open { box-shadow: none; }

/* contact: the last headline is the sun coming back */
.contact .t-display { color: var(--tangerine); }

/* about: the portrait stands on a Tangerine panel */
.about__portrait { background: var(--tangerine); }

/* Path on desktop: everything is sized from the screen height so the heading, the road,
   the stops and a band of mountains always fit in one pinned screen. The title and the
   years are the one place a size is capped by height (documented exception to the type scale). */
@media (min-width: 861px) {
  .path__head { margin-bottom: 6vh; }
  .path__title { grid-column: 1 / -1; font-size: min(var(--t-display), 8.5vh); }
  .path .stop__year { font-size: min(var(--t-display), 8.5vh); }
  .path.is-scrub .stop__year { margin-bottom: max(var(--s-5), 7.5vh); }
  .path .stop__img img { aspect-ratio: 3 / 2; }
}

/* certifications: both certificates sit in identical frames, and each card's rows
   (image, issuer, title, description, credential, button) line up across the pair */
.cert__img { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.cert__img img { width: 100%; height: 100%; object-fit: contain; }
@media (min-width: 861px) {
  .certs { grid-template-rows: repeat(6, auto); row-gap: 0; }
  .cert { display: grid; grid-row: span 6; grid-template-rows: subgrid; align-items: start; }
  .cert > * + * { margin-top: var(--s-2); }
  .cert > .btn { justify-self: start; align-self: start; }
}
/* short laptop screens: flatter photos in the Path so the mountains keep a real band at the bottom */
@media (min-width: 861px) and (max-height: 780px) {
  .path .stop__img img { aspect-ratio: 2 / 1; }
  .path .stop__desc { margin-top: var(--s-1); }
}

/* hero: "Say hello" sits over the 3D valley, so it gets its own solid Deep background
   (Mist text, Tangerine on hover) and stays readable over rocks, sky or night */
.hero__cta .btn--line { min-height: 48px; padding: 0 var(--s-3); background: var(--deep); color: var(--mist); border-bottom: 3px solid var(--tangerine); }
.hero__cta .btn--line:hover { background: var(--tangerine); color: var(--petrol); border-bottom-color: var(--tangerine); }

/* the quick cut for long in-page jumps (js/app.js goTo): under the nav, over everything else */
.jump { position: fixed; inset: 0; z-index: 90; opacity: 0; pointer-events: none; }

/* ============================================================
   3D LAB (home.html?lab only)
   ============================================================ */
.lab-tag { position: fixed; right: var(--s-2); bottom: var(--s-2); z-index: 400; margin: 0; padding: 6px 10px; background: var(--deep); color: var(--mist);
  font: 600 var(--t-label)/1 var(--archivo); border-left: 3px solid var(--tangerine); pointer-events: none; }
/* 1 · dawn bookend: the hero valley behind Contact */
.lab-dawn { position: absolute; inset: 0; }
.lab-dawn canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lab-dawn__front { pointer-events: none; }
.is-lab .contact .footer { z-index: 2; }
/* 3 · the Path drive: a strip of desert along the foot of the pin; the car's canvas widens ahead for its beams */
.lab-roadside { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 30vh; pointer-events: none; }
.is-lab .road__car { width: 210px; transform-origin: 84px 76%; }
/* 4 · one unbroken evening: the live sky behind the see-through sections (js/lab/evening.js) */
.lab-evening { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

/* photos further down the page fade in as they arrive instead of popping (js/app.js marks the ones still loading) */
.img-wait { opacity: 0; }
.img-in { transition: opacity .7s var(--ease-reveal); }

/* the opening (js/app.js): hidden until it plays; the foothills canvas hides the lines as they rise */
.intro .hero__line { transform: translateY(125%); visibility: hidden; }
.intro .hero__top, .intro .hero__cue, .intro .hero__bottom { opacity: 0; visibility: hidden; }
/* the still has the name baked in and the opening starts elsewhere: hold the plain sky instead */
.intro-bg .hero__stage { background-image: none; }

/* the world's sticky stage must not hang past the end of Selected work (clip keeps sticky working) */
.has-world .work { overflow: clip; }
@media (max-width: 860px) {
  .has-world .work__intro .chapter__lead { grid-column: 1 / -1; }
  /* the words rise over the island on their own field, fading in from above */
  .has-world .chap__inner::before, .has-world .work__intro > .wrap::before {
    content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 50vh; bottom: 0; pointer-events: none;
    background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--field) 92%, transparent) 14vh);
  }
}

/* More work as a curved wall (js/sections.js curve()) */
.shelf.is-curved .shelf__track { perspective: 1300px; }
.shelf.is-curved .card { transform-style: preserve-3d; }
.shelf.is-curved .card__media { position: relative; transform-origin: 50% 50%; will-change: transform; backface-visibility: hidden; }
.card__shade { position: absolute; inset: 0; background: var(--deep); opacity: 0; pointer-events: none; }
.shelf.is-curved .card__link:hover .card__media { outline: 2px solid var(--tangerine); outline-offset: 4px; }

/* the valley floor under the page (js/dim/terrain-bg.js) */
.terrain-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.has-world .world__canvas { opacity: 0; transition: opacity 1.2s var(--ease-reveal); }
.has-world .world.is-ready .world__canvas { opacity: 1; }
/* the last island hands straight over to More work: no empty field after it */
.has-world .chap:last-child { min-height: 150vh; }
@media (max-width: 860px) { .has-world .chap:last-child { min-height: 0; } .has-world .chap:last-child .chap__inner { padding-bottom: var(--s-6); } }
/* the intro arrives with the section (not half a screen later), so the hand-over from the sun flood is never an empty field */
@media (min-width: 861px) { .has-world .work__intro > .wrap { align-content: start; padding-top: 22vh; } .has-world .work__intro { min-height: 150vh; } }

/* THE CURTAIN: Selected work starts under the hero's last (flooded) screen, so as the hero lifts away
   the world is already there beneath it; the hero stays on top while it leaves */
.has-curtain .hero { position: relative; z-index: 3; }
.has-curtain .work { margin-top: -100vh; margin-top: -100lvh; }
@media (min-width: 861px) { .has-curtain .work__intro { min-height: 250vh; } }
@media (max-width: 860px) { .has-curtain .work__intro > .wrap { padding-top: calc(100lvh + 22vh); } }
