/* ============================================================
   PORTFOLIO — design system
   Light-first (paper), dark mode via .dark on <html>.
   Ink #12110d / paper #fdfdfc, orbit homepage, hairline tables.
   ============================================================ */

:root {
  --bg: #fdfdfc;
  --fg: #12110d;
  --fg-muted: rgba(18, 17, 13, 0.60);      /* 4.9:1 on paper — AA for 13.5px+ */
  --fg-faint: rgba(18, 17, 13, 0.35);      /* decorative only (numbers, aria-hidden) */
  --label: #565656;                        /* 16px section labels — 7.4:1 */
  --accent: #b06f00;                       /* amber: stats + emphasis — 3.9:1, large text only */
  --border: rgba(0, 0, 0, 0.10);
  --border-strong: rgba(0, 0, 0, 0.28);
  --surface: rgba(0, 0, 0, 0.035);
  --surface-hover: rgba(0, 0, 0, 0.06);
  --card: #ffffff;
  --pill-bg: #12110d;
  --pill-fg: #edecec;

  --radius-xs: 0.125rem;
  --radius-sm: 0.25rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;

  --font-sans: "Instrument Sans", "Helvetica Neue", Helvetica, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --spring: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-spring: 0.7s;      /* reveals + settles */
  --dur-fast: 0.3s;
  --dur-hover: 0.15s;      /* colour hovers: seen tens of times a visit */
  --dur-press: 0.1s;       /* :active goes down fast … */
  --dur-release: 0.2s;     /* … and comes back a little slower */
  --dur-hero: 1.2s;        /* hero image settle, once per page */
  --dur-line: 0.8s;        /* hairlines drawing in */

  /* spacing — reference frame 1440 wide, 64 margins; exact at ≥1440, scales below */
  --page-x:   clamp(1.25rem, 4.444vw, 4rem);      /* 64  */
  --gap-col:  clamp(2rem,    4.444vw, 4rem);      /* 64  two-column gap   */
  --sec-top:  clamp(2rem,    3.333vw, 3rem);      /* 48  section padding  */
  --sec-56:   clamp(2.5rem,  3.889vw, 3.5rem);    /* 56  */
  --sec-72:   clamp(3rem,    5vw,     4.5rem);    /* 72  */
  --lab-gap:  1.25rem;                            /* 20  label → content  */
  --img-gap:  clamp(0.6rem,  1.111vw, 1rem);      /* 16  between images   */
  --copy-gap: clamp(1.5rem,  3.056vw, 2.75rem);   /* 44  image ↔ copy     */

  /* type — fixed sizes, no viewport scaling */
  --t-label:   1rem;        /* 16   section labels, details rows, footer   */
  --t-body:    1rem;        /* 16   running copy                            */
  --t-small:   0.9375rem;   /* 15   secondary copy                          */
  --t-caption: 0.84375rem;  /* 13.5 stat labels, list numbers               */
  --t-copy:    1.5rem;      /* 24   Medium copy: intro, leads, row titles   */
  --t-title:   2.75rem;     /* 44   next-project title (32 below 640)       */
  --t-stat:    2.75rem;     /* 44   stat numbers                            */

  --ph-tint: rgba(255, 170, 30, 0.10);
  --ph-line: rgba(214, 138, 0, 0.45);
}

html.dark {
  --bg: #12110d;
  --fg: #edecec;
  --fg-muted: rgba(237, 236, 236, 0.60);
  --fg-faint: rgba(237, 236, 236, 0.32);
  --label: rgba(237, 236, 236, 0.72);
  --accent: #e0a23a;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.28);
  --surface: rgba(255, 255, 255, 0.045);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --card: #1c1b16;
  --pill-bg: #edecec;
  --pill-fg: #12110d;
  --ph-tint: rgba(255, 196, 61, 0.09);
  --ph-line: rgba(255, 196, 61, 0.35);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overscroll-behavior: none; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  transition: background 0.5s ease, color 0.5s ease;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }   /* pressables give their own :active feedback */
ul, ol { list-style: none; }
::selection { background: var(--fg); color: var(--bg); }

/* ---------- type ---------- */
.display {
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 1.0;
  font-weight: 500;
  letter-spacing: -0.04em;
}
.h2 { font-size: var(--t-title); line-height: 1.22; font-weight: 500; letter-spacing: -0.03em; }
@media (max-width: 640px) { .h2 { font-size: 2rem; } }
.h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.2; font-weight: 500; letter-spacing: -0.02em; }
.intro-copy {
  font-size: var(--t-copy);
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -0.025em;
  max-width: none;
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.45; color: var(--fg-muted); letter-spacing: -0.015em; max-width: 34em; }
.body-copy { font-size: var(--t-body); line-height: 1.5; color: var(--fg-muted); max-width: 38em; }
.body-copy strong { color: var(--fg); font-weight: 500; }
.mono-label {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: var(--fg-muted);
}
.eyebrow, .sec-label { font-size: var(--t-label); font-weight: 400; line-height: 1.25; letter-spacing: -0.01em; color: var(--label); }
.sec-label.muted, .eyebrow.muted { color: var(--fg-muted); }

/* ---------- layout ---------- */
.container { padding-inline: var(--page-x); max-width: 100rem; margin-inline: auto; }
.section { padding-block: clamp(3.5rem, 9vw, 7rem); }

/* ---------- fixed chrome (all pages) ---------- */
/* Futura Medium wordmark (macOS system Futura; Jost = free fallback) */
.site-logo {
  position: fixed; top: 1.4rem; left: var(--page-x); z-index: 55;
  display: flex; align-items: baseline; gap: 0.9rem;
  line-height: 1;
}
.logo-name {
  font-family: Futura, "Jost", var(--font-sans);
  font-weight: 500;
  font-size: 1.875rem;      /* Figma: Futura Medium 30px */
  letter-spacing: -0.05em;  /* Figma: -1.5px on 30px */
}
.logo-role {
  font-family: var(--font-sans);
  font-size: 1.0625rem;     /* Figma: Instrument Sans 17px */
  color: var(--fg-muted);
  letter-spacing: normal;
}
@media (max-width: 720px) { .logo-role { display: none; } }

/* simple top-right text links (replaces menu card + theme dot) */
.top-links {
  position: fixed; top: 1.7rem; right: var(--page-x); z-index: 55;
  display: flex; gap: 1.75rem;
}
.top-links a {
  font-size: 1.0625rem;     /* Figma: Instrument Sans 17px */
  letter-spacing: normal;
  transition: color var(--dur-hover) ease, opacity var(--dur-release) ease;
}
/* the page you're on reads at full ink; the other link steps back */
.top-links a:not([aria-current="page"]) { color: var(--fg-muted); }
@media (hover: hover) and (pointer: fine) {
  .top-links a:not([aria-current="page"]):hover { color: var(--fg); }
}
.top-links a:active { opacity: 0.55; transition-duration: var(--dur-hover), 0s; }   /* text links dim on press */

/* ---------- preloader (demo 4) ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: #12110d; color: #fdfdfc;
  display: grid; place-content: center; justify-items: start;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader .pl-num {
  font-family: Futura, "Jost", var(--font-sans);
  font-weight: 500;
  font-size: 4.5rem;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.preloader .pl-bar {
  width: 220px; height: 1px;
  background: rgba(253, 253, 252, 0.25);
  margin-top: 14px; position: relative;
}
.preloader .pl-bar i { position: absolute; inset: 0; background: #fdfdfc; transform: scaleX(0); transform-origin: left; }




/* cursor follower dot */
.cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 90;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--fg);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s ease;
  opacity: 0;
}
@media (hover: none) { .cursor-dot { display: none; } }

/* ============================================================
   HOME — the sphere ring (offmenu.design mechanics, 1:1)
   · 1000vh page; the stage is fixed
   · the ring is a great circle of radius R = max(400px, 80% of
     min(400vw, 100vh)), tilted in 3D by two springs while idle
   · zoom (time tween, 1.5s) scales the ring ×2 and slides it right
     by exactly R, so the front card lands in the viewport centre
   · names: a masked reel at the bottom, exclusion-blended
   · arrows at the side edges, a ring of dots bottom-right
   ============================================================ */
.orbit-page { height: 1000vh; }
.orbit-stage { position: fixed; inset: 0; overflow: hidden; }
.orbit-center {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center; max-width: 21em; z-index: 5; pointer-events: none;
}
.orbit-center .project-name {
  position: absolute; inset: 0;
  display: grid; place-content: center; gap: 0.3rem;
  opacity: 0; transform: translateY(6px);
  transition: opacity var(--dur-fast) ease, transform var(--dur-fast) var(--spring);
}
.orbit-center .project-name .name { font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; }
.orbit-stage.peeking .project-name { opacity: 1; transform: none; }
body.phase-2 .orbit-center { display: none; }

.orbit-ring {
  position: absolute; top: 50%; left: 50%;
  width: 0; height: 0;
  opacity: 0; transition: opacity 1.5s cubic-bezier(0.33, 1, 0.68, 1);
  will-change: transform;
}
.orbit-ring.on { opacity: 1; }
.orbit-item {
  position: absolute; top: 0; left: 0;
  display: block;
  will-change: transform; backface-visibility: hidden;
  cursor: pointer;
}
/* the visible rectangle — HER TWEAK: rectangular (16:10), not offmenu's circle */
.orbit-item .thumb {
  position: relative; aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.10);
  background: var(--surface, #eee);
  transition: scale var(--dur-release) var(--spring);
}
/* `scale` composes with the inline transform the ring writes every frame */
.orbit-item:active .thumb { scale: 0.97; transition-duration: var(--dur-press); }
.orbit-item .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.orbit-item .thumb .ph-img { position: absolute; inset: 0; height: 100%; border-radius: 0; }

/* names reel — bottom centre, one name at a time, exclusion-blended so it
   reads black on paper and inverted over the image */
.stage-names {
  position: fixed; inset: 0; z-index: 45; pointer-events: none;
  color: var(--bg); mix-blend-mode: exclusion;
  opacity: 0; transition: opacity 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}
.stage-names.on { opacity: 1; }
.stage-names .names {
  position: absolute; left: 2rem; right: 2rem; bottom: 1rem;
  padding-block: 0.75rem;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 80%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 80%, transparent 100%);
}
.stage-names .track { position: relative; width: 100%; height: 2.5rem; }
.stage-names .track > div { position: absolute; top: 0; left: 0; width: 100%; display: flex; justify-content: center; }
.stage-names h2 {
  display: inline-block; margin: 0;
  font-family: var(--font-sans); font-size: 2.25rem; line-height: 2.5rem; font-weight: 500;
  letter-spacing: -0.02em; text-align: center; white-space: nowrap;
  transform: translateY(110%); opacity: 0;
}
.stage-names h2.in  { transform: none; opacity: 1; transition: transform 0.5s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.5s cubic-bezier(0.33, 1, 0.68, 1); }
.stage-names h2.out { transition: transform 0.3s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.3s cubic-bezier(0.33, 1, 0.68, 1); }
@media (max-width: 767px) {
  .stage-names .names { bottom: auto; top: 50%; transform: translateY(-50%); left: 1rem; right: 1rem; }
}

/* prev / next arrows — 48px, at the side edges, vertically centred */
.stage-arrow {
  position: fixed; top: 50%; z-index: 46;
  width: 3rem; height: 3rem;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg); color: var(--fg);
  display: grid; place-items: center;
  font-size: 1rem;
  opacity: 0; pointer-events: none;
  transform: translateY(-50%);
  will-change: transform;
  transition: opacity 0.6s cubic-bezier(0.33, 1, 0.68, 1), transform 0.3s ease-out, background var(--dur-hover) ease, scale var(--dur-release) var(--spring);
}
.stage-arrow.prev { left: 1rem; }
.stage-arrow.next { right: 1rem; }
body.phase-2 .stage-arrow { opacity: 1; pointer-events: auto; }
@media (hover: hover) and (pointer: fine) { .stage-arrow:hover { background: var(--surface-hover); } }
/* `scale`, not transform: the magnetic pull owns the inline transform */
.stage-arrow:active { scale: 0.94; transition-duration: 0.6s, 0.3s, var(--dur-hover), var(--dur-press); }
@media (max-width: 639px) { .stage-arrow { width: 2.5rem; height: 2.5rem; } }

/* ring of dots, bottom-right: one per project, rotating with the sphere */
.stage-dots { position: fixed; bottom: 1.5rem; right: 1.5rem; width: 45px; height: 45px; z-index: 46; pointer-events: none; color: var(--fg); }
.stage-dots i {
  position: absolute; top: 50%; left: 50%; display: block;
  width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%;
  border: 1px solid currentColor; opacity: 0.4; background: transparent;
}
.stage-dots i.active { background: currentColor; border: none; opacity: 1; }

/* ---------- image placeholder frames ---------- */
.ph-img {
  position: relative;
  width: 100%;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, var(--surface) 14px 15px),
    var(--surface);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ph-img::before {
  content: attr(data-label);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  text-align: center;
  max-width: 88%;
}
.ph-img.quiet::before { content: none; }
.r-21x9 { aspect-ratio: 21 / 9; }
.r-16x9 { aspect-ratio: 16 / 9; }
.r-16x10 { aspect-ratio: 16 / 10; }
.r-4x3  { aspect-ratio: 4 / 3; }
.r-1x1  { aspect-ratio: 1 / 1; }
.r-3x4  { aspect-ratio: 3 / 4; }

/* ---------- text placeholders ---------- */
.ph {
  background: var(--ph-tint);
  box-shadow: inset 0 -1px 0 var(--ph-line);
  border-radius: var(--radius-xs);
  padding-inline: 0.15em;
}
body.ph-hidden .ph { background: transparent; box-shadow: none; }
body.ph-hidden .ph-img { border-style: solid; border-color: var(--border); }

/* ============================================================
   CASE PAGES
   ============================================================ */
main h1, main h2, main h3, main p, main figure, main figcaption, main blockquote, main ol, main dl { margin: 0; padding: 0; }

/* hero: 64 header + 60 = 124 to the image, 40 below */
.case-hero { padding-top: clamp(5.5rem, 8.611vw, 7.75rem); padding-bottom: clamp(1.75rem, 2.778vw, 2.5rem); }
.case-hero-img, .hero-img { border-radius: var(--radius-xl); overflow: hidden; }
.hero-img img { width: 100%; height: auto; aspect-ratio: 1312 / 562; object-fit: cover; }

/* intro 788 · gap 64 · details 460 · pt 56 pb 72 */
.case-intro-grid {
  display: grid; gap: var(--gap-col);
  grid-template-columns: minmax(0, 1fr) clamp(16rem, 31.944vw, 28.75rem);
  align-items: start;
  padding-block: var(--sec-56) var(--sec-72);
}
@media (max-width: 900px) { .case-intro-grid { grid-template-columns: 1fr; gap: 2.5rem; } }
.labeled { display: grid; gap: var(--lab-gap); align-content: start; }
.labeled.tight { gap: 0; }
.sec { padding-block: var(--sec-top); display: grid; gap: var(--lab-gap); }
.details-note { font-size: var(--t-caption); line-height: 1.45; color: var(--fg-muted); margin-top: 1rem; }

/* details table — label left, value right, hairline rows (16px, 48px rows) */
.details-table { display: grid; }
.details-table > div {
  display: flex; justify-content: space-between; align-items: start; gap: 1rem;
  padding-block: 0.875rem;
  font-size: var(--t-label); line-height: 1.2;
  position: relative;
}
.details-table dt { color: var(--fg-muted); }
.details-table dd { text-align: right; color: var(--fg); }
.details-table dd a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
@media (max-width: 640px) { .details-table > div { flex-direction: column; gap: 0.2rem; } .details-table dd { text-align: left; } }

/* scope list — 24px regular titles, 19px faint numbers, 63px rows */
.scope-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding-block: 1.0625rem;
  position: relative;
}
.scope-list .t { font-size: var(--t-copy); font-weight: 400; letter-spacing: -0.015em; line-height: 1.15; }
.scope-list .n { font-size: 1.1875rem; color: var(--fg-faint); line-height: 1.15; }

/* hairlines are pseudo-elements so they can draw in */
.details-table > div::before, .scope-list li::before,
.details-table > div:last-child::after, .scope-list li:last-child::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--border);
}
.details-table > div::before, .scope-list li::before { top: -1px; }
.details-table > div:last-child::after, .scope-list li:last-child::after { bottom: -1px; }

/* section label styled h2 lives above; lead copy = Medium 24 */
.lead { font-size: var(--t-copy); line-height: 1.35; font-weight: 500; letter-spacing: -0.02em; max-width: 46.5em; }

/* feature row: 900 image · 44 · 368 copy */
.feature { display: grid; grid-template-columns: minmax(0, 900fr) minmax(0, 368fr); gap: var(--copy-gap); align-items: center; }
.feature.flip { grid-template-columns: minmax(0, 368fr) minmax(0, 900fr); }
.feature.flip .feature-copy { order: -1; }
.feature img { width: 100%; height: auto; border-radius: var(--radius-xl); }
.feature-copy { display: grid; gap: 0.75rem; }
.feature-copy h3 { font-size: var(--t-copy); font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; }
.feature-copy p { font-size: var(--t-body); line-height: 1.5; color: var(--fg-muted); }
@media (max-width: 900px) {
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 1.5rem; }
  .feature.flip .feature-copy { order: 0; }
  .feature-copy { max-width: 36em; }
}
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--img-gap); }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--img-gap); }
.pair img, .trio img { width: 100%; height: auto; border-radius: var(--radius-xl); }
@media (max-width: 720px) { .pair, .trio { grid-template-columns: 1fr; } }

/* quote: Medium 24, byline 16 */
.quote { font-size: var(--t-copy); line-height: 1.3; font-weight: 500; letter-spacing: -0.025em; max-width: 37.5em; }
.quote-by { font-size: var(--t-label); line-height: 1.25; color: var(--fg-muted); }

.case-section { padding-block: var(--sec-top); }

.gallery-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
@media (max-width: 800px) { .gallery-3 { grid-template-columns: 1fr; } }
.img-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
@media (max-width: 720px) { .img-pair { grid-template-columns: 1fr; } }
.img-stack { display: grid; gap: 0.6rem; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--img-gap); }
@media (max-width: 720px) { .stats { grid-template-columns: 1fr; } }
.stat {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  display: grid; gap: 0.5rem;
  background: var(--surface);
}
.stat .value { font-size: var(--t-stat); font-weight: 500; letter-spacing: -0.04em; line-height: 1.2; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat .label { font-size: var(--t-caption); line-height: 1.45; color: var(--fg-muted); }

.feature-row {
  display: grid; grid-template-columns: 1fr 1.7fr; gap: 2.2rem;
  align-items: center;
  padding-block: 1.8rem;
}
.feature-row:nth-child(even) { grid-template-columns: 1.7fr 1fr; }
.feature-row:nth-child(even) .feature-copy { order: 2; }
@media (max-width: 900px) {
  .feature-row, .feature-row:nth-child(even) { grid-template-columns: 1fr; }
  .feature-row:nth-child(even) .feature-copy { order: 0; }
}
.feature-copy { display: grid; gap: 0.7rem; max-width: 26em; }

.pull-quote {
  font-size: var(--t-copy);
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.025em;
  max-width: 37.5em;
}
.pull-quote footer { margin-top: 1.2rem; }

.next-project {
  display: grid; gap: 0.625rem;
  border-top: 1px solid var(--border);
  padding-block: var(--sec-56) var(--sec-72);
}
.next-project .h2, .next-title { font-size: var(--t-title); font-weight: 500; line-height: 1.22; letter-spacing: -0.03em; display: flex; align-items: center; gap: 0.35em; flex-wrap: wrap; }
@media (max-width: 640px) { .next-project .h2, .next-title { font-size: 2rem; } }
.next-project .arrow { transition: transform var(--dur-spring) var(--spring); display: inline-block; }
@media (hover: hover) and (pointer: fine) {
  .next-project:hover .arrow { transform: translateX(0.35em); }
  .next-project:hover .next-row img, .next-project:hover .next-row .ph-img { transform: translateY(-4px); }
}
.next-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--img-gap); }
.next-row img, .next-row .ph-img { width: 100%; height: auto; aspect-ratio: 648 / 461; object-fit: cover; border-radius: var(--radius-xl); transition: transform var(--dur-spring) var(--spring); }
@media (max-width: 720px) { .next-row { grid-template-columns: 1fr; } }

.page-footer {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-block: 1.6rem 5rem;
  border-top: 1px solid var(--border);
}
.page-footer a:hover { color: var(--fg); }

/* ---------- about page ---------- */
.about-grid {
  display: grid; gap: 3rem;
  grid-template-columns: 14rem minmax(0, 1fr);   /* a small portrait, the copy takes the room */
  align-items: start;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.about-grid .portrait { display: block; width: 100%; max-width: 14rem; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-xl); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 2rem; } .about-grid .portrait { max-width: 11rem; } }

/* ---------- "Want to see more?" — the next two projects (offmenu.design pattern):
   two equal cards in a 70vh row; the hovered one grows to twice the width over
   0.7s on a heavy ease, the other yields; name in small medium type below ---------- */
.more { padding-block: var(--sec-72) var(--sec-56); border-top: 1px solid var(--border); }
.more .more-title { font-size: 1.5rem; font-weight: 500; line-height: 1.22; letter-spacing: -0.03em; margin: 0 0 clamp(1.5rem, 3vw, 2.5rem); }
.more .more-row { display: flex; flex-direction: column; gap: 1rem; }
.more .more-item { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; color: inherit; text-decoration: none; transition: flex-grow 0.45s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.5s var(--spring) calc(var(--i, 0) * 70ms), transform var(--dur-spring) var(--spring) calc(var(--i, 0) * 70ms); }
.more .more-media { position: relative; flex: 1; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 1rem; background: var(--surface, #eee); transition: scale var(--dur-release) var(--spring); }
.more .more-item:active .more-media { scale: 0.985; transition-duration: var(--dur-press); }   /* big card → smaller press */
.more .more-media img, .more .more-media .ph-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform 0.45s cubic-bezier(0.77, 0, 0.175, 1); }
.more .more-name { font-size: 1.0625rem; font-weight: 500; line-height: 1.4; color: var(--fg); margin: 0.875rem 0 0; display: flex; align-items: baseline; gap: 0.5rem; }
.more .more-arrow { display: inline-block; transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1); }
.more .more-item:focus-visible .more-arrow { transform: translateX(4px); }
@media (hover: hover) and (pointer: fine) { .more .more-item:hover .more-arrow { transform: translateX(4px); } }
@media (min-width: 768px) {
  .more .more-row { flex-direction: row; height: 70vh; }
  .more .more-media { aspect-ratio: auto; }
}
@media (min-width: 768px) and (hover: hover) and (prefers-reduced-motion: no-preference) {
  .more .more-item:hover { flex-grow: 2; }
}
@media (max-width: 640px) { .more .more-title { font-size: 1.5rem; } }

/* ============================================================
   MOTION — one language on every page
   · settle: .reveal rises 28px and fades in over 0.6s (spring)
   · stagger: .reveal.stagger keeps the wrapper visible; children
     rise 14px, 70ms apart (--i from nth-child, up to 8)
   · hairlines draw left → right on the same stagger
   · hero settles from scale(1.04); scroll-linked drift where
     view() timelines exist; reading-progress hairline at the top
   · everything inside prefers-reduced-motion: no-preference
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s var(--spring), transform var(--dur-spring) var(--spring); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal.stagger { opacity: 1; transform: none; }
.stagger > * {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.5s var(--spring) calc(var(--i, 0) * 70ms), transform var(--dur-spring) var(--spring) calc(var(--i, 0) * 70ms);
}
.stagger > img, .stagger > figure { transform: translateY(14px) scale(1.02); }
.stagger.in-view > * { opacity: 1; transform: none; }
.stagger > :nth-child(1) { --i: 0; } .stagger > :nth-child(2) { --i: 1; }
.stagger > :nth-child(3) { --i: 2; } .stagger > :nth-child(4) { --i: 3; }
.stagger > :nth-child(5) { --i: 4; } .stagger > :nth-child(6) { --i: 5; }
.stagger > :nth-child(7) { --i: 6; } .stagger > :nth-child(8) { --i: 7; }
.stagger > *::before, .stagger > *::after { transform: scaleX(0); transform-origin: left; transition: transform var(--dur-line) var(--spring) calc(var(--i, 0) * 70ms + 120ms); }
.stagger.in-view > *::before, .stagger.in-view > *::after { transform: scaleX(1); }
.case-hero-img img, .hero-img img { transform: scale(1.04); transition: transform var(--dur-hero) var(--spring); }
.case-hero.in-view .case-hero-img img, .case-hero.in-view .hero-img img { transform: none; }
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 56; background: var(--fg); transform-origin: left; transform: scaleX(var(--p, 0)); pointer-events: none; }
@supports (animation-timeline: view()) {
  .case-hero-img, .hero-img, .hero-comp { animation: hero-drift linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
  @keyframes hero-drift { to { transform: translateY(-8%); } }
  .drift, .pair img, .trio img, .gallery-3 > *, .feature img, .stat { animation: tile-drift linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
  .pair > :nth-child(2), .trio > :nth-child(2), .gallery-3 > :nth-child(2), .stat:nth-child(2) { --drift: 48px; }
  .trio > :nth-child(3), .gallery-3 > :nth-child(3), .stat:nth-child(3) { --drift: 72px; }
  @keyframes tile-drift { from { translate: 0 var(--drift, 24px); } to { translate: 0 0; } }
}

/* ============================================================
   ACCESSIBILITY — on every page
   ============================================================ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link {
  position: fixed; top: 0.75rem; left: 50%; transform: translate(-50%, -200%); z-index: 100;
  padding: 0.6rem 1rem; border-radius: 999px; background: var(--pill-bg); color: var(--pill-fg); font-size: 0.9rem;
}   /* no transition: it's reached by Tab, and keyboard actions shouldn't wait on motion */
.skip-link:focus-visible { transform: translate(-50%, 0); }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; border-radius: 2px; }
.nav-bg { position: fixed; inset: 0 0 auto 0; height: 4rem; z-index: 54; background: var(--bg); transition: background 0.5s ease; }

/* ============================================================
   AI WORKFLOW PAGE
   ============================================================ */
.process-hero { padding-top: clamp(7rem, 14vw, 10rem); }
.process-hero .display .muted { color: var(--fg-faint); }
.process-hero .lede { margin-top: 1.6rem; }

.process-list { margin-top: clamp(2.5rem, 6vw, 4rem); }
.process-row {
  display: grid;
  grid-template-columns: 9rem 1fr 1.15fr;
  gap: 2rem;
  align-items: baseline;
  padding-block: clamp(1.6rem, 3.5vw, 2.4rem);
  border-top: 1px solid var(--border);
}
.process-row:last-child { border-bottom: 1px solid var(--border); }
.process-row .idx {
  display: flex; align-items: baseline; gap: 1rem;
  font-size: 0.78rem; color: var(--fg-muted);
}
.process-row .idx .n { color: var(--fg-faint); font-variant-numeric: tabular-nums; }
.process-row .t { font-size: clamp(1.3rem, 2.4vw, 1.8rem); font-weight: 500; letter-spacing: -0.025em; line-height: 1.15; }
.process-row .d { color: var(--fg-muted); max-width: 30em; }
@media (max-width: 860px) {
  .process-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .process-row .d { max-width: 38em; }
}

/* ============================================================
   FIGMA PAGE EMBEDS — full page designs, rendered from Figma
   ============================================================ */
.figma-note {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap;
  padding-block: 0.9rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.figma-note a:hover { color: var(--fg); }
.figma-page { border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--border); }
.figma-page img { width: 100%; height: auto; display: block; }


/* ============================================================
   NO JAVASCRIPT — everything readable at rest
   The <head> of every page adds .js to <html> first thing. Without
   it (script blocked, failed or not run), nothing waits for main.js:
   reveals show at rest, the preloader is skipped and the home ring
   becomes a plain grid of the five project cards.
   ============================================================ */
html:not(.js) .reveal, html:not(.js) .stagger > *, html:not(.js) .stagger > img, html:not(.js) .stagger > figure,
html:not(.js) .case-hero-img img, html:not(.js) .hero-img img { opacity: 1; transform: none; }
html:not(.js) .stagger > *::before, html:not(.js) .stagger > *::after { transform: none; }
html:not(.js) .preloader, html:not(.js) .cursor-dot, html:not(.js) .stage-arrow, html:not(.js) .stage-names, html:not(.js) .orbit-center { display: none; }
html:not(.js) .orbit-page { height: auto; }
html:not(.js) .orbit-stage { position: static; padding: 7rem var(--page-x) 4rem; overflow: visible; }
html:not(.js) .orbit-ring { position: static; width: auto; height: auto; opacity: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--img-gap) var(--gap-col); }
html:not(.js) .orbit-item { position: static; width: auto; }
html:not(.js) .orbit-item::after { content: attr(data-name); display: block; margin-top: 0.6rem; font-size: var(--t-small); font-weight: 500; }


@media (prefers-reduced-motion: reduce) {
  .reveal, .stagger > *, .stagger > img, .stagger > figure, .more .more-item { transform: none; transition: opacity 0.3s ease; }
  .stagger > *::before, .stagger > *::after { transform: none; transition: none; }
  .case-hero-img img, .hero-img img, .case-hero-img, .hero-img, .hero-comp, .drift, .pair img, .trio img, .gallery-3 > *, .feature img, .stat { transform: none; animation: none; }
  .orbit-ring { transition: none; opacity: 1; }
  .cursor-dot { display: none; }
  .more .more-arrow { transition: none; }
}
