/* =========================================================
   Faris Hattab, 2026. Shared system for the inner pages.
   Same language as the homepage: ink, bone, a living color
   field, Archivo (variable width) for display, Geist for text.
   ========================================================= */
:root {
  --ink: #09090B;
  --ink-2: #111115;
  --ink-3: #18181D;
  --bone: #ECEDE9;
  --bone-2: rgba(236, 237, 233, 0.8);
  --bone-3: rgba(236, 237, 233, 0.78);
  --line: rgba(236, 237, 233, 0.14);
  --on-bone: #0B0B0E;
  --on-bone-2: rgba(11, 11, 14, 0.72);
  --line-dark: rgba(11, 11, 14, 0.14);

  --display: 'Archivo', 'Geist', system-ui, sans-serif;
  --text: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --fs-label: 13px;
  --fs-small: 15px;
  --fs-body: 17px;
  --fs-lead: clamp(1.25rem, 0.95rem + 1.1vw, 2rem);

  --gutter: clamp(20px, 3.4vw, 56px);
  --section: clamp(96px, 11vw, 184px);
  --block: clamp(64px, 6.5vw, 104px);
  --col-gap: clamp(16px, 2vw, 32px);
  --s1: 8px; --s2: 12px; --s3: 16px; --s4: 24px; --s5: 32px; --s6: 48px; --s7: 64px; --s8: 96px;
  --radius: 20px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
}
@media (max-width: 860px) { :root { --fs-body: 16px; --section: 104px; --radius: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: rgba(236,237,233,0.35) var(--ink); overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--ink); color: var(--bone);
  font-family: var(--text); font-size: var(--fs-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip; -webkit-tap-highlight-color: transparent;
}
::selection { background: var(--bone); color: var(--ink); }
::-webkit-scrollbar { width: 10px; background: var(--ink); }
::-webkit-scrollbar-thumb { background: rgba(236,237,233,0.3); border: 3px solid var(--ink); border-radius: 10px; }
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
strong, b { font-weight: 650; color: var(--bone); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.is-missing { visibility: hidden; }

.eyebrow { font-family: var(--text); font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; font-variant-numeric: tabular-nums; color: var(--bone-3); }
.wrap { width: 100%; max-width: 1680px; margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }

/* ---------- Field, grain, progress ---------- */
#field {
  position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 20% 30%, rgba(42, 53, 184, 0.35), transparent 70%),
    radial-gradient(50% 45% at 80% 70%, rgba(232, 32, 58, 0.18), transparent 70%),
    var(--ink);
}
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
main { position: relative; z-index: 1; }
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 55; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--bone); transform-origin: left; transform: scaleX(0); }

/* Page entry: a curtain lifts */
.curtain { position: fixed; inset: 0; z-index: 85; background: #000; pointer-events: none; clip-path: inset(0 0 0 0); }
.curtain.is-up { clip-path: inset(0 0 100% 0); transition: clip-path 900ms var(--ease-io); }
.curtain.is-gone { display: none; }
.xfer { position: fixed; inset: 0; z-index: 90; pointer-events: none; display: none; opacity: 0; background: var(--ink); }
.xfer img { display: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; mix-blend-mode: difference; color: #fff;
  display: flex; align-items: center; gap: 28px; padding: 22px var(--gutter);
}
.nav__name { margin-inline-end: auto; font-family: var(--display); font-weight: 700; font-stretch: 112%; font-size: 17px; letter-spacing: -0.01em; }
.nav__link { font-size: 14px; font-weight: 500; position: relative; }
.nav__link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 380ms var(--ease-out);
}
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .nav__link:hover::after { transform: scaleX(1); transform-origin: left; } }
.nav__talk { font-size: 14px; font-weight: 500; padding: 9px 16px; border: 1px solid currentColor; border-radius: 999px; transition: background-color 200ms ease, color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .nav__talk:hover { background: #fff; color: #000; } }
/* At the contact section the page already says it: the nav pill steps aside */
.nav__talk { transition: background-color 200ms ease, color 200ms ease, opacity 300ms ease, visibility 300ms; }
.at-contact .nav__talk { opacity: 0; visibility: hidden; }
.nav__menu { display: none; }
.sheet {
  position: fixed; inset: 0; z-index: 48; background: var(--ink);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(88px + env(safe-area-inset-top)) var(--gutter) calc(28px + env(safe-area-inset-bottom));
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path 620ms var(--ease-io), visibility 0s linear 620ms;
}
.sheet.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 620ms var(--ease-io), visibility 0s; }
.sheet__nav { display: grid; }
.sheet__nav a {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--display); font-weight: 800; font-stretch: 88%; font-size: clamp(2.6rem, 12vw, 4rem); line-height: 1; letter-spacing: -0.035em;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(24px); transition: opacity 300ms ease, transform 500ms var(--ease-out);
}
.sheet__nav a span { font-family: var(--text); font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.08em; color: var(--bone-3); font-stretch: 100%; }
.sheet.is-open .sheet__nav a { opacity: 1; transform: none; }
.sheet.is-open .sheet__nav a:nth-child(1) { transition-delay: 180ms; }
.sheet.is-open .sheet__nav a:nth-child(2) { transition-delay: 230ms; }
.sheet.is-open .sheet__nav a:nth-child(3) { transition-delay: 280ms; }
.sheet.is-open .sheet__nav a:nth-child(4) { transition-delay: 330ms; }
.sheet__foot { display: grid; gap: var(--s1); font-size: var(--fs-small); color: var(--bone-2); }
.sheet__foot a { min-height: 44px; display: flex; align-items: center; }

/* ---------- Buttons ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px;
  background: var(--bone); color: var(--ink); font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: transform 160ms var(--ease-out);
}
.pill:active { transform: scale(0.97); }
.pill svg, .link-arrow svg { width: 16px; height: 16px; flex: none; transition: translate 300ms var(--ease-out); }
.pill--line { background: transparent; color: var(--bone); box-shadow: inset 0 0 0 1px rgba(236,237,233,0.45); }
.pill--ink { background: var(--on-bone); color: var(--bone); }
@media (hover: hover) and (pointer: fine) {
  .pill:hover svg, .link-arrow:hover svg { translate: 4px 0; }
  .pill--line:hover { box-shadow: inset 0 0 0 1px var(--bone); }
}
.link-arrow {
  display: inline-flex; align-items: center; gap: 12px; font-weight: 600; font-size: 15px; min-height: 48px;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 5px) / 100% 1px no-repeat;
  transition: background-size 400ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .link-arrow:hover { background-size: 0% 1px; background-position: 100% calc(100% - 5px); } }

/* ---------- Reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 900ms var(--ease-out), transform 1100ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.light .w { color: rgba(236, 237, 233, 0.5); transition: color 350ms ease; }
.light .w.is-lit { color: inherit; }
.band .light .w { color: rgba(11, 11, 14, 0.5); }
.band .light .w.is-lit { color: var(--on-bone); }

/* ---------- Media frames: always the file's own proportion ---------- */
.frame { position: relative; overflow: hidden; border-radius: var(--radius); background: #000; }
.frame > img, .frame > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.frame > video { opacity: 0; transition: opacity 600ms ease; }
.frame.is-playing > video { opacity: 1; }
.frame--light { background: #fff; }
.zoom {
  position: absolute; right: 14px; bottom: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(9, 9, 11, 0.72); color: var(--bone); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.zoom svg { width: 14px; height: 14px; }

/* =========================================================
   Case study
   ========================================================= */
.cs-hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; grid-template-rows: 1fr auto; padding: 120px var(--gutter) var(--s5); overflow: clip; }
.cs-hero__top { align-self: center; }
.cs-hero__title {
  margin-top: var(--s4);
  font-family: var(--display); font-weight: 800; font-stretch: 112%;
  font-size: clamp(3.2rem, 10.6vw, 12.5rem); line-height: 0.88; letter-spacing: -0.045em;
  user-select: none;
}
.kin .word { display: inline-block; white-space: nowrap; }
.kin .ch { display: inline-block; will-change: transform; transform-origin: 50% 70%; }
.cs-hero__sub { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s5) var(--col-gap); margin-top: var(--s6); align-items: start; }
.cs-hero__lead { font-size: var(--fs-lead); line-height: 1.35; font-weight: 450; max-width: 34ch; color: var(--bone); }
.cs-hero__sig { font-family: var(--display); font-style: italic; font-weight: 300; font-stretch: 100%; font-size: clamp(1.25rem, 0.9rem + 1vw, 1.875rem); line-height: 1.25; letter-spacing: -0.02em; color: var(--bone-2); max-width: 28ch; }
.cs-meta { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s4) var(--col-gap); margin-top: var(--s7); }
.cs-meta > div { border-top: 1px solid var(--line); padding-top: var(--s3); }
.cs-meta dt { font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--bone-3); font-weight: 500; }
.cs-meta dd { margin-top: 6px; font-size: 16px; font-weight: 500; line-height: 1.4; }
.js .cs-hero:not(.is-in) .cs-hero__fade { opacity: 0; transform: translateY(18px); }
.cs-hero__fade { transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: var(--d, 700ms); }

/* Hero gallery: the original bento, assembled from a stacked deck */
.assemble { position: relative; height: 150vh; }
.assemble__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; padding: 76px var(--gutter) 3vh; }
.assemble__box { position: relative; }
.bento { display: grid; gap: 10px; aspect-ratio: var(--ar); width: min(100%, calc((100svh - 76px - 6vh) * var(--ar))); }
.bento--sfqc, .bento--aqc { --ar: 1.4253; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: 5fr 5fr 4fr 4fr; }
.bento--sfqc .cell--1 { grid-column: 1 / 4; grid-row: 1 / 4; }
.bento--sfqc .cell--2 { grid-column: 4 / 9; grid-row: 1 / 3; }
.bento--sfqc .cell--3 { grid-column: 4 / 7; grid-row: 3 / 5; }
.bento--sfqc .cell--4 { grid-column: 7 / 9; grid-row: 3 / 5; }
.bento--sfqc .cell--5 { grid-column: 1 / 4; grid-row: 4 / 5; }
.bento--aqc .cell--1 { grid-column: 6 / 9; grid-row: 1 / 4; }
.bento--aqc .cell--2 { grid-column: 1 / 6; grid-row: 1 / 3; }
.bento--aqc .cell--3 { grid-column: 1 / 4; grid-row: 3 / 5; }
.bento--aqc .cell--4 { grid-column: 4 / 6; grid-row: 3 / 5; }
.bento--aqc .cell--5 { grid-column: 6 / 9; grid-row: 4 / 5; }
.bento--qiddiya { --ar: 1.565; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.bento .assemble__item { position: relative; min-width: 0; min-height: 0; border-radius: 14px; box-shadow: 0 40px 80px -30px rgba(0,0,0,0.8); }
.bento .frame > img, .bento .frame > video { object-fit: cover; }
.bento--aqc .cell--3 { background: transparent; border-radius: 0; overflow: visible; box-shadow: none; }

/* At a glance: the sixty-second version */
.glance { padding-top: var(--section); }
.glance__grid { margin-top: var(--s6); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--s5) var(--col-gap); }
.glance__col { border-top: 1px solid var(--line); padding-top: var(--s5); }
.glance__k { font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bone-3); }
.glance__lead { margin-top: var(--s3); font-family: var(--display); font-weight: 600; font-stretch: 100%; font-size: clamp(1.25rem, 0.95rem + 0.9vw, 1.8rem); line-height: 1.2; letter-spacing: -0.02em; max-width: 26ch; }
.glance__list { margin-top: var(--s3); display: grid; gap: var(--s3); counter-reset: gl; }
.glance__list li { counter-increment: gl; position: relative; padding-left: 2.6em; font-size: 16px; line-height: 1.6; color: var(--bone); }
.glance__list li::before { content: counter(gl, decimal-leading-zero); position: absolute; left: 0; top: 0.2em; font-size: var(--fs-label); color: var(--bone-3); font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }

/* Impact */
.impact { padding-top: var(--section); }
.impact__list { counter-reset: imp; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: var(--s5) var(--col-gap); margin-top: var(--s5); }
.impact__list li { counter-increment: imp; border-top: 1px solid var(--line); padding-top: var(--s4); font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.3125rem); line-height: 1.45; font-weight: 500; }
.impact__list li::before { content: counter(imp, decimal-leading-zero); display: block; margin-bottom: var(--s3); font-size: var(--fs-label); letter-spacing: 0.08em; color: var(--bone-3); font-weight: 500; }

/* Chapter rail (wide screens): ticks live in the gutter, labels only on hover */
.rail { position: fixed; left: 10px; top: 50%; z-index: 40; transform: translateY(-50%); opacity: 0; pointer-events: none; transition: opacity 400ms ease; }
.rail.is-on { opacity: 1; pointer-events: auto; }
.rail ol { display: grid; gap: 0; }
.rail a { position: relative; display: flex; align-items: center; height: 22px; padding-right: 8px; color: var(--bone-3); transition: color 300ms ease; }
.rail a i { display: block; width: 12px; height: 1.5px; border-radius: 2px; background: currentColor; transition: width 400ms var(--ease-out); }
.rail a span { position: absolute; left: 40px; top: 50%; transform: translate(-6px, -50%); white-space: nowrap; font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 999px; background: rgba(9, 9, 11, 0.86); box-shadow: inset 0 0 0 1px var(--line); color: var(--bone); opacity: 0; pointer-events: none; transition: opacity 250ms ease, transform 400ms var(--ease-out); }
.rail a.is-active { color: var(--bone); }
.rail a.is-active i { width: 26px; }
@media (hover: hover) and (pointer: fine) { .rail a:hover span, .rail a:focus-visible span { opacity: 1; transform: translate(0, -50%); } .rail a:hover { color: var(--bone); } }
@media (max-width: 1279px) { .rail { display: none; } }
/* Current chapter, shown in the nav */
.nav__chap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 13px; font-weight: 500; white-space: nowrap; opacity: 0; transition: opacity 300ms ease; pointer-events: none; font-variant-numeric: tabular-nums; }
.nav__chap.is-on { opacity: 1; }
.nav__chap b { font-weight: 500; opacity: 0.6; margin-right: 10px; }
@media (max-width: 1100px) {
  .cs-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); } .nav__chap { display: none; } }

/* Chapter */
.chap { position: relative; padding-top: var(--section); scroll-margin-top: 0; }
.ch__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end; padding-bottom: var(--s6); border-bottom: 1px solid var(--line); }
.ch__num {
  grid-column: 1 / span 3; font-family: var(--display); font-weight: 800; font-stretch: 62%;
  font-size: clamp(4rem, 8vw, 9rem); line-height: 0.78; letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
  color: transparent; -webkit-text-stroke: 1.5px var(--bone-3);
  transition: font-stretch 1200ms var(--ease-out), color 900ms ease;
}
.is-in > .ch__head .ch__num, .piece.is-in .ch__num { font-stretch: 125%; color: var(--bone); -webkit-text-stroke: 1.5px transparent; }
.ch__title { grid-column: 4 / -1; font-family: var(--display); font-weight: 800; font-stretch: 100%; font-size: clamp(2.4rem, 5.4vw, 6.4rem); line-height: 0.95; letter-spacing: -0.04em; }
.ch__body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
.ch__body > * { grid-column: 4 / -1; }
.ch__body > .full { grid-column: 1 / -1; }
.ch__body > * + * { margin-top: var(--s7); }
.ch__body > :first-child { margin-top: var(--s7); }
/* Full-width blocks (media, card sets) get a larger pause around them */
.ch__body > * + .full, .ch__body > .full + * { margin-top: var(--block); }

.lead { font-size: var(--fs-lead); line-height: 1.35; font-weight: 450; letter-spacing: -0.01em; max-width: 40ch; color: var(--bone); }
.statement { font-family: var(--display); font-weight: 700; font-stretch: 100%; font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3.6rem); line-height: 1.06; letter-spacing: -0.035em; max-width: 24ch; }
.ch__body > .lead + .lead { margin-top: var(--s4); }
.note { font-size: var(--fs-body); line-height: 1.8; color: var(--bone-2); max-width: 60ch; padding: var(--s1) 0 var(--s1) var(--s5); border-left: 1px solid rgba(236,237,233,0.35); }
.ch__body > .note { margin-top: var(--s7); }
.ch__body > .note + * { margin-top: var(--block); }
.sub-eyebrow { color: var(--bone-3); }

/* Goals */
.goals { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5) var(--col-gap); }
.goals__col { border-radius: var(--radius); padding: var(--s6) var(--s5); background: rgba(236,237,233,0.035); box-shadow: inset 0 0 0 1px var(--line); }
.goals__col ol { margin-top: var(--s4); display: grid; gap: var(--s4); counter-reset: g; }
.goals__col li { counter-increment: g; display: grid; grid-template-columns: 2.4em 1fr; font-size: 16px; line-height: 1.6; }
.goals__col li::before { content: counter(g, decimal-leading-zero); color: var(--bone-3); font-size: var(--fs-label); padding-top: 3px; font-variant-numeric: tabular-nums; }

/* Bone band (HMW, outcomes) */
.band { position: relative; background: var(--bone); color: var(--on-bone); border-radius: 32px; padding: clamp(48px, 7vw, 120px) clamp(24px, 5vw, 96px); }
.band .eyebrow { color: var(--on-bone-2); }
.band strong, .band b { color: var(--on-bone); }
.hmw__text { margin-top: var(--s5); font-family: var(--display); font-weight: 700; font-stretch: 100%; font-size: clamp(1.9rem, 1rem + 3.2vw, 4.8rem); line-height: 1.04; letter-spacing: -0.035em; max-width: 26ch; }

/* Numbered rows (role) */
.rows { border-top: 1px solid var(--line); }
.ch__body > .rows:first-child { border-top: 0; }
.ch__body > .rows:first-child li:first-child { padding-top: 0; }
.rows li { display: grid; grid-template-columns: 3.2em 1fr; gap: var(--s3); padding: var(--s5) 0; border-bottom: 1px solid var(--line); font-size: clamp(1.0625rem, 0.95rem + 0.45vw, 1.375rem); line-height: 1.5; font-weight: 450; }
.rows li > span:first-child { font-size: var(--fs-label); color: var(--bone-3); padding-top: 0.45em; font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }

/* Cards (constraints, building blocks) */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); }
/* Four cards sit as an even 2 x 2 rather than three and an orphan */
.cards:has(> .card:nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); padding: var(--s6) var(--s6) var(--s6);
  background: rgba(236,237,233,0.035); box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color 300ms ease, box-shadow 300ms ease, transform 500ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .card:hover { background: rgba(236,237,233,0.06); box-shadow: inset 0 0 0 1px rgba(236,237,233,0.3); transform: translateY(-4px); } }
.card__n { font-size: var(--fs-label); color: var(--bone-3); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.card__t { margin-top: var(--s5); font-family: var(--display); font-weight: 700; font-stretch: 100%; font-size: clamp(1.25rem, 1rem + 0.6vw, 1.6rem); line-height: 1.15; letter-spacing: -0.02em; }
.card__d { margin-top: var(--s3); font-size: var(--fs-small); line-height: 1.7; color: var(--bone-2); }
.card .frame { margin: calc(var(--s5) * -1) calc(var(--s5) * -1) var(--s4); border-radius: var(--radius) var(--radius) 0 0; background: #fff; }
.card .frame + .card__n { margin-top: 0; }
.js .cards--build .card { opacity: 0; transform: translateY(60px) rotate(var(--r, 0deg)) scale(0.96); transition: opacity 700ms ease, transform 1000ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js .cards--build.is-in .card { opacity: 1; transform: none; }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5) var(--col-gap); }
.pillar { padding-top: var(--s2); }
.pillar__n { font-family: var(--display); font-weight: 800; font-stretch: 62%; font-size: clamp(3rem, 5vw, 5rem); line-height: 0.85; letter-spacing: -0.04em; transition: font-stretch 1200ms var(--ease-out); transition-delay: var(--d, 0ms); }
.is-in .pillar__n { font-stretch: 125%; }
.pillar__t { margin-top: var(--s4); font-family: var(--display); font-weight: 700; font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.02em; }
.pillar__d { margin-top: var(--s3); font-size: var(--fs-small); line-height: 1.7; color: var(--bone-2); }

/* Diagram */
.diagram { position: relative; }
.diagram .frame { cursor: zoom-in; }

/* Feature rows (design system, decisions) */
.feature { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: center; }
.feature + .feature { margin-top: clamp(72px, 8vw, 120px); }
.feature__media { grid-column: 1 / span 6; }
.feature__text { grid-column: 8 / -1; }
.feature--flip .feature__media { grid-column: 7 / -1; grid-row: 1; }
.feature--flip .feature__text { grid-column: 1 / span 5; grid-row: 1; }
.feature__k { color: var(--bone-3); }
.feature__t { margin-top: var(--s3); font-family: var(--display); font-weight: 700; font-stretch: 100%; font-size: clamp(1.6rem, 1.1rem + 1.5vw, 2.6rem); line-height: 1.04; letter-spacing: -0.03em; }
.feature__p { margin-top: var(--s4); font-size: 16px; line-height: 1.75; color: var(--bone-2); }
.feature__p + .feature__p { margin-top: var(--s3); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--col-gap); }
.duo .card__t { margin-top: var(--s3); }

/* Story: sticky stage, the text scrolls past it */
.story { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
.story__steps { grid-column: 1 / span 5; }
.story__stage { grid-column: 6 / -1; position: sticky; top: 12vh; height: 76vh; margin-top: 12vh; }
.story__frames { position: absolute; inset: 0; }
.story__frames .frame { position: absolute; left: 50%; top: 50%; opacity: 0; transform: translate(-50%, -50%) scale(0.94); transition: opacity 600ms ease, transform 900ms var(--ease-out); box-shadow: 0 40px 80px -30px rgba(0,0,0,0.75); }
.story__frames .frame.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.story__count { position: absolute; left: 0; bottom: -36px; color: var(--bone-3); }
.story__count b { color: var(--bone); font-weight: 600; }
.step { min-height: 46vh; display: flex; flex-direction: column; justify-content: center; padding: var(--s6) 0; opacity: 0.32; transition: opacity 500ms ease; }
.step.is-on { opacity: 1; }
.step__k { color: var(--bone-3); }
.step__t { margin-top: var(--s3); font-family: var(--display); font-weight: 800; font-stretch: 100%; font-size: clamp(2rem, 1.2rem + 2vw, 3.4rem); line-height: 1; letter-spacing: -0.035em; }
.step__block { margin-top: var(--s5); }
.step__block .eyebrow { color: var(--bone-3); }
.step__block p { margin-top: var(--s1); font-size: 16px; line-height: 1.75; color: var(--bone-2); }
.step__why { margin-top: var(--s5); display: grid; gap: var(--s2); }
.step__why li { position: relative; padding-left: 22px; font-size: var(--fs-small); line-height: 1.65; color: var(--bone); }
.step__why li::before { content: ''; position: absolute; left: 0; top: 0.72em; width: 10px; height: 1.5px; background: var(--bone); }
.step__inline { display: none; }

/* Interaction cards */
.icards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); }
.icard { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: rgba(236,237,233,0.035); box-shadow: inset 0 0 0 1px var(--line); }
.icard__stage { aspect-ratio: 16 / 10; padding: 10px 10px 0; display: grid; place-items: center; }
.icard__stage .frame { width: 100%; border-radius: 12px; }
.icard__body { padding: var(--s5) var(--s5) var(--s6); }
.icard__t { font-family: var(--display); font-weight: 700; font-size: 1.35rem; line-height: 1.15; letter-spacing: -0.02em; }
.icard__p { margin-top: var(--s3); font-size: var(--fs-small); line-height: 1.7; color: var(--bone-2); }
.icard .step__why { margin-top: var(--s4); }
.icard .step__why li { font-size: 14px; }

/* Outcomes */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6) var(--col-gap); margin-top: var(--s6); }
.stat { border-top: 1px solid var(--line-dark); padding-top: var(--s4); }
.stat__v { font-family: var(--display); font-weight: 800; font-stretch: 100%; font-size: clamp(1.8rem, 1.1rem + 2.2vw, 3.4rem); line-height: 0.98; letter-spacing: -0.035em; }
.stat__l { margin-top: var(--s2); font-size: var(--fs-small); line-height: 1.55; color: var(--on-bone-2); }
.checks { margin-top: var(--s6); display: grid; gap: 0; border-top: 1px solid var(--line-dark); }
.checks li { display: grid; grid-template-columns: 2.4em 1fr; padding: var(--s3) 0; border-bottom: 1px solid var(--line-dark); font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1875rem); line-height: 1.5; }
.checks li::before { content: ''; width: 18px; height: 10px; margin-top: 0.38em; border-left: 2px solid var(--on-bone); border-bottom: 2px solid var(--on-bone); transform: rotate(-45deg) scale(0.8); transform-origin: 30% 50%; }

/* Reflection */
.reflect { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); }
.reflect__card { border-radius: var(--radius); padding: var(--s6) var(--s5); background: rgba(236,237,233,0.035); box-shadow: inset 0 0 0 1px var(--line); }
.reflect__n { font-family: var(--display); font-weight: 800; font-stretch: 125%; font-size: 3rem; line-height: 0.8; letter-spacing: -0.04em; color: transparent; -webkit-text-stroke: 1.2px var(--bone-3); }
.reflect__t { margin-top: var(--s6); font-size: var(--fs-small); line-height: 1.75; color: var(--bone-2); }
.reflect__t strong { display: block; margin-bottom: var(--s3); font-family: var(--display); font-weight: 700; font-size: clamp(1.25rem, 1rem + 0.6vw, 1.6rem); line-height: 1.15; letter-spacing: -0.02em; color: var(--bone); }

/* Next project */
.next { position: relative; margin-top: var(--section); border-top: 1px solid var(--line); }
.next__link { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--s6) var(--col-gap); align-items: center; padding: var(--s8) 0; }
.next__t { margin-top: var(--s3); font-family: var(--display); font-weight: 800; font-stretch: 75%; font-size: clamp(3rem, 9vw, 10rem); line-height: 0.86; letter-spacing: -0.045em; transition: font-stretch 900ms var(--ease-out); }
.next__d { margin-top: var(--s4); font-size: var(--fs-lead); line-height: 1.35; max-width: 32ch; color: var(--bone-2); }
.next__cta { margin-top: var(--s5); }
.next__img { transform: rotate(-3deg); transition: transform 900ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .next__link:hover .next__t { font-stretch: 125%; }
  .next__link:hover .next__img { transform: rotate(0deg) scale(1.03); }
}

/* Contact footer */
.contact { position: relative; padding: var(--section) var(--gutter) 30px; min-height: 100vh; min-height: 100svh; display: grid; grid-template-rows: 1fr auto; }
.contact__body { align-self: center; text-align: center; }
.talk { display: inline-block; font-family: var(--display); font-weight: 800; font-stretch: 75%; font-size: clamp(4.4rem, 19vw, 24rem); line-height: 0.85; letter-spacing: -0.045em; white-space: nowrap; }
.talk .ch { display: inline-block; }
.contact__sub { margin: var(--s5) auto 0; max-width: 46ch; color: var(--bone); font-size: var(--fs-lead); line-height: 1.4; }
.contact__links { margin-top: var(--s4); display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s2); }
.foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s3); font-size: 13px; color: var(--bone-3); padding-top: 40px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 var(--s4); }
.foot a { min-height: 44px; display: inline-flex; align-items: center; transition: color 200ms ease; }
.foot a:hover { color: var(--bone); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(5, 5, 7, 0.94); display: none; overflow: auto; overscroll-behavior: contain; }
.lightbox.is-open { display: block; }
.lightbox img { width: min(100%, 1800px); height: auto; margin: 0 auto; padding: 72px var(--gutter) 40px; }
.lightbox__close { position: fixed; top: 16px; right: var(--gutter); z-index: 2; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--bone); color: var(--ink); font-weight: 600; font-size: 14px; }

/* =========================================================
   Studio
   ========================================================= */
.page-hero { position: relative; min-height: 88vh; display: grid; align-content: end; padding: 140px var(--gutter) var(--s7); }
.page-hero__title { font-family: var(--display); font-weight: 800; font-stretch: 62%; font-size: clamp(5rem, 22vw, 26rem); line-height: 0.8; letter-spacing: -0.045em; user-select: none; }
.page-hero__row { margin-top: var(--s6); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4) var(--col-gap); align-items: end; }
.page-hero__tag { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 1rem + 1.6vw, 2.6rem); line-height: 1.1; letter-spacing: -0.03em; max-width: 22ch; }
.page-hero__sub { font-size: var(--fs-lead); line-height: 1.4; color: var(--bone-2); max-width: 36ch; }
.index { border-top: 1px solid var(--line); margin-top: var(--s7); }
.index a { display: grid; grid-template-columns: 3em minmax(0, 1fr) auto; gap: var(--s3); align-items: baseline; padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.index__n { font-size: var(--fs-label); color: var(--bone-3); font-variant-numeric: tabular-nums; }
.index__t { font-family: var(--display); font-weight: 700; font-stretch: 88%; font-size: clamp(1.5rem, 1rem + 2vw, 3rem); line-height: 1.05; letter-spacing: -0.035em; transition: font-stretch 600ms var(--ease-out), translate 600ms var(--ease-out); }
.index__m { font-size: var(--fs-label); color: var(--bone-3); white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .index a:hover .index__t { font-stretch: 125%; translate: 12px 0; } }

.piece { padding-top: var(--section); }
.piece__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); border-top: 1px solid var(--line); padding-top: var(--s7); }
.piece__side { grid-column: 1 / span 4; align-self: start; position: sticky; top: 104px; }
.piece__main { grid-column: 6 / -1; }
.piece__num { font-family: var(--display); font-weight: 800; font-stretch: 62%; font-size: clamp(3.4rem, 5.6vw, 6rem); line-height: 0.8; letter-spacing: -0.04em; color: transparent; -webkit-text-stroke: 1.5px var(--bone-3); transition: font-stretch 1200ms var(--ease-out), color 900ms ease; }
.piece.is-in .piece__num { font-stretch: 125%; color: var(--bone); -webkit-text-stroke: 1.5px transparent; }
.piece__meta { margin-top: var(--s5); }
.piece__t { margin-top: var(--s2); font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 3.2vw, 3.4rem); line-height: 1; letter-spacing: -0.035em; }
.piece__tag { margin-top: var(--s3); font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.3125rem); line-height: 1.45; color: var(--bone-2); max-width: 32ch; }
.piece__quote { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--line); font-family: var(--display); font-style: italic; font-weight: 400; font-size: clamp(1.25rem, 1rem + 0.7vw, 1.75rem); line-height: 1.22; letter-spacing: -0.02em; color: var(--bone); max-width: 24ch; }
.strip { margin-top: var(--col-gap); display: grid; gap: var(--col-gap); }
.strip__row { display: flex; gap: var(--col-gap); }
.strip__row > .frame[style] { flex: var(--r) 1 0; width: auto; min-width: 0; margin: 0; border-radius: 14px; }
.piece__copy { margin-top: var(--s7); max-width: 64ch; }
.piece__copy p { font-size: 17px; line-height: 1.75; color: var(--bone-2); }
.piece__copy p:first-child { font-size: clamp(1.125rem, 1rem + 0.3vw, 1.25rem); line-height: 1.6; color: var(--bone); }
.piece__copy p + p { margin-top: var(--s5); }
.vctl { position: absolute; right: 14px; bottom: 14px; z-index: 2; display: flex; gap: 8px; }
.vctl button { min-width: 44px; min-height: 44px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 600; background: rgba(9, 9, 11, 0.72); color: var(--bone); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.vctl svg { width: 16px; height: 16px; }

/* =========================================================
   About
   ========================================================= */
.about-hero { padding: 140px var(--gutter) 0; }
.about-hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
.about-hero__title { grid-column: 1 / span 9; margin-top: var(--s4); font-family: var(--display); font-weight: 800; font-size: clamp(2.8rem, 6.6vw, 8rem); line-height: 0.96; letter-spacing: -0.045em; }
.about-body { margin-top: var(--s7); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
.about-photo { grid-column: 1 / span 4; position: sticky; top: 100px; }
.about-photo .frame { background: #1a1a1f; }
.js .about-photo .frame { clip-path: inset(100% 0 0 0 round var(--radius)); transition: clip-path 1400ms var(--ease-io); }
.js .about-photo.is-in .frame { clip-path: inset(0 0 0 0 round var(--radius)); }
.about-bio { grid-column: 6 / -1; }
.about-bio p { font-size: clamp(1.125rem, 1rem + 0.45vw, 1.4rem); line-height: 1.65; color: var(--bone-2); }
.about-bio p:first-child { font-size: var(--fs-lead); line-height: 1.35; color: var(--bone); font-weight: 450; }
.about-bio p + p { margin-top: var(--s5); }
.caps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5) var(--col-gap); }
.caps > div { border-top: 1px solid var(--line); padding-top: var(--s4); }
.caps dt { font-family: var(--display); font-weight: 700; font-stretch: 112%; font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.02em; }
.caps dd { margin-top: 10px; font-size: var(--fs-small); line-height: 1.55; color: var(--bone-2); }
.edu { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: var(--s6); align-items: center; }
.edu__deg { grid-column: 1 / -1; font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 1rem + 2.6vw, 3.8rem); line-height: 1.02; letter-spacing: -0.035em; }
.edu__school { margin-top: var(--s3); font-size: var(--fs-lead); line-height: 1.4; color: var(--bone-2); }
.edu__media { grid-column: 1 / span 7; }
.edu__text { grid-column: 9 / -1; }
.edu__text .feature__t { margin-top: var(--s3); }
.closing { padding: var(--section) var(--gutter) 0; }
.closing p { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 1rem + 3.4vw, 5rem); line-height: 1.02; letter-spacing: -0.04em; max-width: 22ch; }
.closing .pill { margin-top: var(--s5); }

/* =========================================================
   Small screens
   ========================================================= */
@media (max-width: 1100px) {
  .ch__body > * { grid-column: 1 / -1; }
  .feature__media, .feature--flip .feature__media { grid-column: 1 / -1; grid-row: auto; }
  .feature__text, .feature--flip .feature__text { grid-column: 1 / -1; grid-row: auto; margin-top: var(--s4); }
  .cards { grid-template-columns: 1fr 1fr; }
  .pillars { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav { mix-blend-mode: normal; color: var(--bone); gap: var(--s3); padding: max(12px, env(safe-area-inset-top)) var(--gutter) 12px; transition: background-color 300ms ease, box-shadow 300ms ease; }
  .nav.is-scrolled { background: rgba(9, 9, 11, 0.72); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }
  .nav.is-open { background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav__hide { display: none; }
  .nav__talk { min-height: 40px; display: inline-flex; align-items: center; }
  .nav__menu { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 500; }
  .nav__menu i { position: relative; width: 18px; height: 10px; }
  .nav__menu i::before, .nav__menu i::after { content: ''; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform 400ms var(--ease-out), top 400ms var(--ease-out); }
  .nav__menu i::before { top: 0; }
  .nav__menu i::after { top: 8.5px; }
  .nav__menu[aria-expanded="true"] i::before { top: 4.25px; transform: rotate(45deg); }
  .nav__menu[aria-expanded="true"] i::after { top: 4.25px; transform: rotate(-45deg); }

  .cs-hero { padding: 96px var(--gutter) var(--s5); }
  .cs-hero__title { font-size: clamp(2.8rem, 13vw, 5rem); }
  .cs-hero__sub { grid-template-columns: 1fr; gap: var(--s3); margin-top: var(--s5); }
  .cs-meta { grid-template-columns: 1fr 1fr; margin-top: var(--s6); }
  .glance__grid { grid-template-columns: 1fr; gap: var(--s4); }
  .glance__lead { max-width: none; }

  .assemble { height: auto; padding-top: var(--s4); }
  .assemble__stage { position: relative; height: auto; overflow: visible; display: block; padding: 0 var(--gutter); }
  .bento { width: 100%; aspect-ratio: auto; grid-template-columns: 1fr 1fr; grid-template-rows: auto; gap: 8px; }
  .bento .assemble__item { transform: none !important; box-shadow: none; border-radius: 10px; grid-column: auto; grid-row: auto; }
  .bento--sfqc .cell--1 { grid-column: 1 / 3; aspect-ratio: 16 / 9; order: 2; }
  .bento--sfqc .cell--2 { grid-column: 1 / 3; aspect-ratio: 2878 / 1780; order: 1; }
  .bento--sfqc .cell--3 { grid-column: 1 / 2; aspect-ratio: 1; order: 3; }
  .bento--sfqc .cell--4 { grid-column: 2 / 3; aspect-ratio: 1; order: 4; }
  .bento--sfqc .cell--4 img { object-position: bottom; }
  .bento--sfqc .cell--5 { grid-column: 1 / 3; aspect-ratio: 3 / 1; order: 5; }
  .bento--sfqc .cell--5 img { object-position: top; }
  .bento--aqc .cell--1 { grid-column: 1 / -1; aspect-ratio: 16 / 9; order: 20; }
  .bento--aqc .cell--2 { grid-column: 1 / -1; aspect-ratio: 16 / 9; order: 10; }
  .bento--aqc .cell--3 { grid-column: 1 / 2; aspect-ratio: 1; order: 50; overflow: hidden; border-radius: 10px; background: #000; }
  .bento--aqc .cell--4 { grid-column: 1 / -1; aspect-ratio: 16 / 9; order: 30; }
  .bento--aqc .cell--5 { grid-column: 2 / 3; aspect-ratio: 1; order: 50; }
  .bento--aqc .cell--5 img { object-position: right; }
  .bento--qiddiya { grid-template-columns: 1fr; }
  .bento--qiddiya .assemble__item { aspect-ratio: 1440 / 920; }
  .impact__list { grid-template-columns: 1fr; gap: 0; }
  .impact__list li { padding: var(--s4) 0; }

  .ch__head { grid-template-columns: 1fr; row-gap: var(--s3); padding-bottom: var(--s5); }
  .ch__num, .ch__title { grid-column: 1; }
  .ch__num { font-size: clamp(3.6rem, 18vw, 5.5rem); }
  .ch__title { font-size: clamp(2.2rem, 10.5vw, 3.4rem); }
  .ch__body > :first-child { margin-top: var(--s6); }
  .ch__body > * + * { margin-top: var(--s6); }
  .ch__body > * + .full, .ch__body > .full + * { margin-top: var(--s7); }
  .statement { font-size: clamp(1.75rem, 7.6vw, 2.4rem); }
  .goals { grid-template-columns: 1fr; }
  .goals__col { padding: var(--s4); }
  .band { border-radius: 24px; padding: 40px 22px; }
  .rows li { grid-template-columns: 2.6em 1fr; padding: var(--s3) 0; }
  .cards, .pillars, .duo, .reflect, .stats, .caps { grid-template-columns: 1fr; }
  .cards:has(> .card:nth-child(4):last-child) { grid-template-columns: 1fr; }
  .ch__body > .note { margin-top: var(--s6); }
  .ch__body > .note + * { margin-top: var(--s7); }
  .card { padding: var(--s4); }
  .card .frame { margin: calc(var(--s4) * -1) calc(var(--s4) * -1) var(--s4); }
  .card__t { margin-top: var(--s3); }

  .story { display: block; }
  .story__stage { display: none; }
  .step { min-height: 0; opacity: 1; padding: var(--s5) 0; border-top: 1px solid var(--line); }
  .step:first-child { border-top: 0; padding-top: 0; }
  .step__inline { display: block; margin-bottom: var(--s4); }

  /* Interactions swipe as cards */
  .icards { display: flex; gap: var(--s2); overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) var(--s1); scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .icards::-webkit-scrollbar { display: none; }
  .icard { flex: 0 0 min(84vw, 420px); scroll-snap-align: start; }
  .swipe-hint { display: block; }

  .next__link { grid-template-columns: 1fr; padding: var(--s7) 0; }
  .next__t { font-size: clamp(2.8rem, 15vw, 5rem); }
  .next__img { transform: none; }

  .contact { padding: var(--section) var(--gutter) calc(20px + env(safe-area-inset-bottom)); min-height: 100svh; }
  .talk { font-size: 21vw; }
  .foot { flex-direction: column-reverse; align-items: flex-start; gap: var(--s1); border-top: 1px solid var(--line); padding-top: var(--s3); margin-top: var(--s6); }

  .page-hero { min-height: 72vh; padding: 110px var(--gutter) var(--s6); }
  .page-hero__row { grid-template-columns: 1fr; }
  .index a { grid-template-columns: 2.4em minmax(0, 1fr); }
  .index__m { grid-column: 2; }

  .piece__grid { grid-template-columns: 1fr; padding-top: var(--s5); }
  .piece__side { grid-column: 1; position: relative; top: auto; }
  .piece__main { grid-column: 1; margin-top: var(--s5); }
  .piece__quote { margin-top: var(--s4); }
  .strip__row { gap: 8px; }
  .strip { gap: 8px; margin-top: 8px; }
  .about-hero { padding: 110px var(--gutter) 0; }
  .about-hero__title { grid-column: 1 / -1; font-size: clamp(2.4rem, 11vw, 3.6rem); }
  .about-body { grid-template-columns: 1fr; row-gap: var(--s6); }
  .about-photo { grid-column: 1; position: relative; top: auto; max-width: 420px; }
  .about-bio { grid-column: 1; }
  .edu__media, .edu__text { grid-column: 1 / -1; }
  .closing { padding: var(--section) var(--gutter) 0; }
}
.swipe-hint { display: none; margin-top: var(--s2); }

@media (prefers-reduced-motion: reduce) {
  .assemble { height: auto; }
  .assemble__stage { position: relative; height: auto; overflow: visible; padding-block: var(--s4); }
  .curtain { display: none; }
  .js [data-reveal], .js .cards--build .card { opacity: 1 !important; transform: none !important; transition: none !important; }
  .light .w { color: inherit !important; }
  .ch__num { transition: none; }
  .js .about-photo .frame { clip-path: none; }
}

/* Frames sized from the file's own ratio: full width, never taller than --maxh */
.frame[style*="--r"] { aspect-ratio: var(--r); width: min(100%, calc(var(--maxh, 72vh) * var(--r))); margin-inline: auto; }
/* Diagrams open full size on click, so in the page they sit smaller */
.diagram .frame[style*="--r"] { --maxh: 64vh !important; }
.card .frame[style] { width: auto; margin: calc(var(--s5) * -1) calc(var(--s5) * -1) var(--s4); }
.story__frames .frame[style] { --maxh: 76vh; margin: 0; }
@media (max-width: 860px) {
  .card .frame[style] { margin: calc(var(--s4) * -1) calc(var(--s4) * -1) var(--s4); }
  .frame[style*="--r"] { --maxh: 200vh; }
}

/* =========================================================
   AI Audit System
   ========================================================= */
.mosaic { position: relative; }
.mosaic__item { position: absolute; cursor: zoom-in; }
/* One film and two stills, all at 16:10: the film at twice the size, the stills stacked beside it */
.bento--audit { --ar: 2.4; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; }
.bento--audit .cell--1 { grid-column: 1; grid-row: 1 / 3; }
.bento--audit .cell--2 { grid-column: 2; grid-row: 1; }
.bento--audit .cell--3 { grid-column: 2; grid-row: 2; }
.bento--audit .frame { background: #F3F1EB; }

.dims__bar { display: flex; height: 64px; border-radius: 14px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.dims__bar span { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 16px; font-size: 13px; font-weight: 600; color: var(--ink); transform-origin: left; }
.dims__bar span:nth-child(1) { flex: 30; background: #C7F23F; }
.dims__bar span:nth-child(2) { flex: 25; background: #B9AEF8; }
.dims__bar span:nth-child(3) { flex: 25; background: #ECEDE9; }
.dims__bar span:nth-child(4) { flex: 20; background: #8E87C9; }
.dims__bar b { color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.js .dims__bar span { transform: scaleX(0); transition: transform 1100ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js .is-in .dims__bar span { transform: none; }
.dims { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--col-gap); margin-top: var(--s5); }
.dim { border-radius: var(--radius); padding: var(--s5); background: rgba(236,237,233,0.035); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; }
.dim__pts { font-family: var(--display); font-weight: 800; font-stretch: 125%; font-size: 3.4rem; line-height: 0.85; letter-spacing: -0.04em; }
.dim__pts small { font-family: var(--text); font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bone-3); margin-left: 8px; font-stretch: 100%; }
.dim__k { margin-top: var(--s4); color: var(--bone-3); }
.dim__t { margin-top: 6px; font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.15; letter-spacing: -0.02em; }
.dim__d { margin-top: var(--s2); font-size: var(--fs-small); line-height: 1.6; color: var(--bone-2); }
.track2 { margin-top: var(--col-gap); border-radius: var(--radius); padding: var(--s5); background: rgba(199,242,63,0.06); box-shadow: inset 0 0 0 1px rgba(199,242,63,0.35); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--s4) var(--col-gap); align-items: center; }
.track2 .dim__t { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { min-height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 500; box-shadow: inset 0 0 0 1px rgba(236,237,233,0.3); }
.sev { display: flex; flex-wrap: wrap; gap: 10px; }
.sev span { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink); }
.sev span:nth-child(1) { background: #F6C9CC; } .sev span:nth-child(2) { background: #EADFD6; } .sev span:nth-child(3) { background: #E6F1CF; }

.skill { border-radius: var(--radius); background: #0E0E14; box-shadow: inset 0 0 0 1px var(--line); padding: var(--s5); font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 14px; line-height: 1.9; color: var(--bone-2); overflow-x: auto; }
.skill b { color: #C7F23F; font-weight: 600; }
.skill i { font-style: normal; color: var(--bone-3); }
.lanes { border-radius: var(--radius); background: #0E0E14; box-shadow: inset 0 0 0 1px var(--line); padding: var(--s5); display: grid; gap: 14px; }
.lane { display: grid; grid-template-columns: 3.2em 1fr; align-items: center; gap: 14px; font-size: 13px; font-weight: 600; color: var(--bone-2); }
.lane__track { height: 10px; border-radius: 10px; background: rgba(236,237,233,0.08); overflow: hidden; }
.lane__fill { display: block; height: 100%; width: 100%; border-radius: 10px; background: #C7F23F; transform: scaleX(0); transform-origin: left; }
.is-in .lane__fill { animation: laneFill var(--t, 2.4s) var(--ease-io) var(--d, 0s) forwards; }
@keyframes laneFill { to { transform: scaleX(1); } }
.lanes__out { margin-top: 6px; padding-top: 14px; border-top: 1px dashed rgba(236,237,233,0.2); display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--bone-3); }
.lanes__out b { color: var(--ink); background: #C7F23F; border-radius: 999px; padding: 6px 12px; font-size: 12px; opacity: 0; transition: opacity 400ms ease 2.8s; }
.is-in .lanes__out b { opacity: 1; }
.palette-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.palette-row span { aspect-ratio: 1 / 1.1; border-radius: 16px; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; font-size: 13px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.film-frame { border-radius: var(--radius); overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0,0,0,0.8), inset 0 0 0 1px var(--line); }
.film-frame .frame { border-radius: 0; }
.sub-h { font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 1rem + 1vw, 2rem); letter-spacing: -0.025em; line-height: 1.1; }
@media (max-width: 1100px) { .dims { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .dims { grid-template-columns: 1fr; }
  .track2 { grid-template-columns: 1fr; }
  .bento--audit { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .bento--audit .assemble__item { aspect-ratio: 16 / 10; }
  .bento--audit .cell--1 { grid-column: 1 / -1; grid-row: auto; }
  .bento--audit .cell--2, .bento--audit .cell--3 { grid-column: auto; grid-row: auto; }
  .dims__bar { height: 56px; } .dims__bar span { padding: 0 10px; font-size: 11px; } .dims__bar b { font-size: 1rem; }
  .palette-row { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   Films: click to pause, click again to resume
   ========================================================= */
.vfr { cursor: pointer; }
.story__frames .frame:not(.is-on) { pointer-events: none; }
.vhold {
  position: absolute; left: 14px; bottom: 14px; z-index: 3; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
  display: grid; place-items: center; background: rgba(9, 9, 11, 0.72); color: var(--bone); cursor: pointer;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transform: scale(0.88); transition: opacity 220ms ease, transform 320ms var(--ease-out);
}
.vhold svg { grid-area: 1 / 1; width: 16px; height: 16px; transition: opacity 160ms ease; }
.vhold .i-play, .is-held .vhold .i-pause { opacity: 0; }
.is-held .vhold .i-play { opacity: 1; }
.is-held .vhold, .vhold:focus-visible { opacity: 1; transform: none; }
@media (hover: hover) { .vfr:hover .vhold { opacity: 1; transform: none; } }
@media (max-width: 860px) { .vhold { left: 10px; bottom: 10px; width: 40px; height: 40px; } }
.piece__note { margin-top: var(--s3); color: var(--bone-3); text-transform: none; letter-spacing: 0.01em; }

/* =========================================================
   Moving between pages: the old page dips into ink, the new one
   rises out of it while its intro settles. Nothing depends on an
   image loading in time. Cross-document view transitions remove
   the flash between pages where the browser supports them.
   ========================================================= */
@view-transition { navigation: auto; }
html.xfer-in::after { content: ''; position: fixed; inset: 0; z-index: 200; pointer-events: none; background: var(--ink); }
html.xfer-in.xfer-out::after { animation: xferOut 1000ms cubic-bezier(0.33, 0, 0.2, 1) forwards; }
@keyframes xferOut { from { opacity: 1; } to { opacity: 0; } }
html.xfer-in .cs-hero__inner, html.xfer-in .cs-hero > * { transform: translateY(28px); }
html.xfer-in.xfer-out .cs-hero__inner, html.xfer-in.xfer-out .cs-hero > * { transform: none; transition: transform 1100ms cubic-bezier(0.22, 1, 0.36, 1); }
@media (prefers-reduced-motion: reduce) { html.xfer-in::after { display: none; } }

/* Four design decisions read as a 2 x 2: image above, text below.
   Half the scroll of four stacked rows, every visual kept. */
@media (min-width: 861px) {
  #decisions .full:has(> .feature:nth-child(4):last-child) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--block) var(--col-gap); align-items: start; }
  #decisions .full:has(> .feature:nth-child(4):last-child) > .feature { display: flex; flex-direction: column; align-items: stretch; margin-top: 0; }
  #decisions .full:has(> .feature:nth-child(4):last-child) .feature__media,
  #decisions .full:has(> .feature:nth-child(4):last-child) .feature__text { grid-column: auto; grid-row: auto; }
  #decisions .full:has(> .feature:nth-child(4):last-child) .feature__media .frame { margin-inline: 0; }
  #decisions .full:has(> .feature:nth-child(4):last-child) .feature__text { margin-top: var(--s5); max-width: 54ch; }
}
