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

:root {
  --bg: #FFFFFF;
  --panel: #F5F5F5;
  --panel-2: #EDEDED;
  --ink: #111111;
  --ink-2: #505050;
  --ink-3: #737373;
  --rule: #E8E8E8;
  --rule-2: #D4D4D4;
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 14px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-feature-settings: "cv11", "ss01";
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: #E2E2E2; }

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
ol, ul { list-style: none; }
img, video { display: block; max-width: 100%; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}


/* Buttons and links */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  border-radius: 100px;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #333; }
.btn--line { border-color: var(--rule-2); color: var(--ink); }
.btn--line:hover { border-color: var(--ink); }

.link {
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule-2);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.link:hover { color: var(--ink); border-color: var(--ink); }

.arrow-link { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.arrow-link span { transition: transform 0.3s var(--ease); }
.arrow-link:hover span { transform: translateX(4px); }

/* Nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}

.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.wordmark { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14.5px; color: var(--ink-2); transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links .nav-cta { color: #fff; background: var(--ink); padding: 8px 16px; border-radius: 100px; }
.nav-links .nav-cta:hover { color: #fff; background: #333; }

/* Home hero */
.hero { padding: 168px 0 104px; }

.hero h1 {
  font-size: clamp(40px, 5.2vw, 68px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.04;
  max-width: 17ch;
  margin: 20px 0 28px;
}

.lede { font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-2); max-width: 58ch; margin-bottom: 30px; }
.lede strong { color: var(--ink); font-weight: 500; }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.hero-actions .link { font-size: 15px; }

/* Sections */
.section { padding: clamp(80px, 9vw, 128px) 0; border-top: 1px solid var(--rule); }
.section-head { margin-bottom: 52px; }

.section-title {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
  max-width: 26ch;
  margin-top: 12px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.split > .section-head { position: sticky; top: 104px; margin-bottom: 0; }

/* Work index */
.work-list { display: grid; gap: clamp(64px, 8vw, 112px); }

.work-row {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: clamp(32px, 4.5vw, 64px);
  align-items: center;
}

.work-row:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr); }
.work-row:nth-child(even) .work-media { order: 2; }

.work-media {
  position: relative;
  display: block;
  transition: transform 0.5s var(--ease);
}

.work-media:hover { transform: translateY(-4px); }
.work-media > img { width: 100%; height: auto; }
.work-media.fill video { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); }

.work-info .eyebrow { margin-bottom: 14px; }

.work-title {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 14px;
}

.work-sum { color: var(--ink-2); margin-bottom: 22px; }

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  padding: 16px 0;
  margin-bottom: 22px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.facts dt { font-size: 12.5px; color: var(--ink-3); margin-bottom: 2px; }
.facts dd { font-size: 15px; font-weight: 500; line-height: 1.4; }

/* Browser frame */
.browser {
  width: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--rule-2);
  border-radius: 10px;
  box-shadow: 0 24px 50px -32px rgba(0, 0, 0, 0.35);
}

.browser-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  background: #FAFAFA;
  border-bottom: 1px solid var(--rule);
}

.dots { display: flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: #D9D9D9; }

.url {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(320px, 55%);
  padding: 2px 10px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-3);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 100px;
}

.browser img { width: 100%; height: auto; }
.browser video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; background: #FAFAFA; }
.browser-sm { box-shadow: none; border-radius: 8px; }
.browser-sm .browser-bar { height: 20px; padding: 0 8px; }
.browser-sm .dots { gap: 4px; }
.browser-sm .dots i { width: 6px; height: 6px; }

/* Rows */
.rows li {
  display: grid;
  grid-template-columns: 1fr 1.4fr 150px;
  gap: 24px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15.5px;
  line-height: 1.5;
}

.rows li:first-child { border-top: 1px solid var(--rule); }
.rows .org { font-weight: 500; }
.rows .role { color: var(--ink-2); }
.rows .when { font-size: 14px; color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }

.sub-head { margin: 56px 0 14px; }

.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 40px; padding-top: 22px; border-top: 1px solid var(--rule); }
.skills h4 { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.skills p { font-size: 15px; color: var(--ink-2); line-height: 1.6; }

/* Leadership */
.lead-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.lead-name { font-size: clamp(24px, 2.4vw, 32px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 6px; }
.lead-meta { font-size: 14px; color: var(--ink-3); margin-bottom: 18px; }
.lead-text { font-size: 17px; color: var(--ink-2); max-width: 58ch; margin-bottom: 22px; }
.partners { font-size: 15px; color: var(--ink-2); }
.partners .eyebrow { display: block; margin-bottom: 6px; }

.figures { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.figures li { padding: 22px; background: var(--panel); border-radius: 12px; }
.figures b { display: block; font-size: clamp(30px, 3vw, 40px); font-weight: 500; letter-spacing: -0.035em; line-height: 1; margin-bottom: 8px; }
.figures span { display: block; font-size: 14px; color: var(--ink-2); line-height: 1.4; }

/* Press */
.press-list a {
  display: grid;
  grid-template-columns: 200px 1fr 24px;
  gap: 24px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}

.press-list li:first-child a { border-top: 1px solid var(--rule); }
.press-list .outlet { font-size: 13.5px; color: var(--ink-3); }
.press-list .headline { font-size: 15.5px; font-weight: 500; }
.press-list .arrow { color: var(--ink-3); text-align: right; transition: transform 0.3s var(--ease), color 0.2s; }
.press-list a:hover .arrow { color: var(--ink); transform: translate(2px, -2px); }
.press-list a:hover .headline { text-decoration: underline; text-underline-offset: 3px; }

/* About and contact */
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.about-cols p { font-size: 17px; color: var(--ink-2); }
.about-meta { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-3); }

.contact-title {
  font-size: clamp(36px, 4.6vw, 60px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.06;
  max-width: 16ch;
  margin: 12px 0 24px;
}

.contact-sub { font-size: 17px; color: var(--ink-2); max-width: 52ch; margin-bottom: 30px; }

/* Footer */
.footer { border-top: 1px solid var(--rule); padding: 28px 0 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; font-size: 13.5px; color: var(--ink-3); }

/* Case study pages */
.case-hero { padding: 136px 0 40px; }

.back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); margin-bottom: 44px; transition: color 0.2s; }
.back:hover { color: var(--ink); }

.case-hero h1 {
  font-size: clamp(34px, 4.6vw, 60px);
  font-weight: 500;
  letter-spacing: -0.032em;
  line-height: 1.06;
  max-width: 21ch;
  margin: 16px 0 22px;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 22px 0;
  margin-top: 40px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.case-meta dt { font-size: 12.5px; color: var(--ink-3); margin-bottom: 4px; }
.case-meta dd { font-size: 15px; line-height: 1.5; }
.case-meta dd a { border-bottom: 1px solid var(--rule-2); transition: border-color 0.2s; }
.case-meta dd a:hover { border-color: var(--ink); }

.case-cover { position: relative; display: block; }
.case-cover > img { width: 100%; height: auto; }
.case-cover.fill video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #222; border-radius: var(--radius); }
.case-cover.fill.r16-10 video { aspect-ratio: 16 / 10; background: #EFEEEB; }
.cover-caption { margin-top: 12px; font-size: 13.5px; color: var(--ink-3); }

.case-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 48px 0 8px; }
.case-stats b { display: block; font-size: clamp(30px, 3.4vw, 46px); font-weight: 500; letter-spacing: -0.035em; line-height: 1; }
.case-stats span { display: block; font-size: 14px; color: var(--ink-2); margin-top: 10px; max-width: 24ch; line-height: 1.45; }

.case-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(56px, 7vw, 96px) 0;
  border-top: 1px solid var(--rule);
}

.case-section:first-of-type { margin-top: 48px; }
.case-section > * { min-width: 0; }
.case-section.stack { grid-template-columns: 1fr; gap: 28px; }
.case-section.stack > h2 { position: static; }

/* Scoring: the weights bar fills in */
.score-fig .weights span { transform-origin: 0 50%; transition: transform 0.9s var(--ease) calc(var(--i, 0) * 0.35s); }
.js .score-fig:not(.filled) .weights span { transform: scaleX(0); }

/* Spec tables */
.table-wrap { margin: 28px 0; overflow-x: auto; }
.spec { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14.5px; }
.spec caption { caption-side: top; text-align: left; font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.spec th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); padding: 0 20px 10px 0; border-bottom: 1px solid var(--ink); }
.spec td { padding: 14px 20px 14px 0; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--ink-2); line-height: 1.55; }
.spec td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }
.spec td:last-child, .spec th:last-child { padding-right: 0; }
.tag-s { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--panel); color: var(--ink-3); white-space: nowrap; }
.tag-s.on { background: var(--ink); color: #fff; }
.table-note { margin-top: 12px; font-size: 13.5px; color: var(--ink-3); }
.tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 24px; }
.table-wrap + .cards, .clip-fig + .cards { margin-top: 28px; }
@media (max-width: 760px) { .tiles.four { grid-template-columns: 1fr 1fr; } .spec td:first-child { white-space: normal; } }

/* CS 129 */
.tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bars.rose .bar { background: #A8295F; }
.data-grid .spec { min-width: 0; }
.data-grid .spec td, .data-grid .spec th { padding-right: 14px; }
.prose + .data-grid { margin-top: 32px; }
.tone { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
@media (max-width: 760px) { .tiles.three { grid-template-columns: 1fr 1fr; } }

/* Explainer clips */
.clip-fig { margin: 28px 0 8px; }
.clip-fig iframe { display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; border-radius: var(--radius); background: #EFEEEB; overflow: hidden; }

/* Data bars grow in */
.bars .bar { transform-origin: 0 50%; transition: transform 0.9s var(--ease) calc(0.15s + var(--i, 0) * 0.09s); }
.js .reveal:not(.in) .bars .bar { transform: scaleX(0); }

@media (prefers-reduced-motion: reduce) {
  .js .score-fig:not(.filled) .weights span, .js .reveal:not(.in) .bars .bar { transform: none; }
}

/* Case study section menu */
.toc { position: fixed; left: 22px; top: 50%; z-index: 40; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 10px 8px;
       border-radius: 12px; transform: translateY(-50%); opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease), visibility 0.35s, background 0.2s, box-shadow 0.2s; }
.toc.show { opacity: 1; visibility: visible; }
.toc a { display: flex; align-items: center; gap: 10px; height: 22px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; transition: color 0.2s; }
.toc a i { flex: none; width: 12px; height: 2px; border-radius: 2px; background: var(--rule-2); transition: width 0.3s var(--ease), background 0.3s; }
.toc a span { transition: opacity 0.2s; }
.toc a:hover { color: var(--ink); }
.toc a:hover i { background: var(--ink-3); }
.toc a.on { color: var(--ink); font-weight: 500; }
.toc a.on i { width: 24px; background: var(--ink); }
@media (max-width: 1419px) {
  .toc a span { opacity: 0; pointer-events: none; }
  .toc:hover, .toc:focus-within { background: rgba(255, 255, 255, 0.97); box-shadow: 0 10px 34px rgba(17, 17, 17, 0.10), 0 0 0 1px var(--rule); }
  .toc:hover a span, .toc:focus-within a span { opacity: 1; pointer-events: auto; }
}
@media (max-width: 1099px) { .toc { display: none; } }
@media print { .toc { display: none; } }

/* Smart Match technical sections */
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.86em; background: var(--panel); border: 1px solid var(--rule); border-radius: 5px; padding: 1px 5px; overflow-wrap: anywhere; }
.node code, .arch code { background: none; border: 0; padding: 0; font-size: 12.5px; }
.arch-fig { margin-top: 28px; }
.arch { display: grid; gap: 0; }
.arch-group { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 14px; display: grid; gap: 10px; align-content: start; }
.arch-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.arch-label--gap { margin-top: 8px; }
.arch-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.arch-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.arch .node { border-color: var(--rule-2); }
.arch-wire { position: relative; display: flex; align-items: center; height: 40px; padding-left: 40px; font-size: 12.5px; color: var(--ink-3); }
.arch-wire::before { content: ''; position: absolute; left: 24px; top: 6px; bottom: 6px; width: 1px; background: #B5B5B5; }
.arch-wire::after { content: ''; position: absolute; left: 21px; bottom: 4px; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; border-top: 5px solid #8A8A8A; }
.flow { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 36px; counter-reset: f; padding: 0; }
.flow li { list-style: none; position: relative; padding-left: 34px; font-size: 15px; color: var(--ink-2); line-height: 1.55; counter-increment: f; }
.flow li::before { content: counter(f); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--rule-2); font-size: 12px; font-weight: 600; color: var(--ink); display: grid; place-items: center; }
.flow b { color: var(--ink); font-weight: 600; }
.score-fig { margin: 24px 0 28px; padding: clamp(20px, 3vw, 32px); background: var(--panel); border-radius: var(--radius); }
.formula { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: clamp(14px, 1.6vw, 18px); color: var(--ink); margin-bottom: 20px; overflow-wrap: anywhere; }
.formula span { font-weight: 600; }
.weights { display: flex; gap: 2px; height: 18px; }
.weights span { display: block; min-width: 6px; }
.weights span:first-child { border-radius: 4px 0 0 4px; }
.weights span:last-child { border-radius: 0 4px 4px 0; }
.weights-key { display: flex; gap: 2px; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.weights-key span { display: flex; align-items: baseline; gap: 6px; min-width: 0; white-space: nowrap; }
.weights-key i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; flex: none; transform: translateY(-1px); }
.weights-key b { color: var(--ink); font-weight: 600; }
.score-note { margin-top: 14px; font-size: 14px; color: var(--ink-3); }
.data-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.bars-fig { padding: clamp(20px, 3vw, 28px); background: var(--panel); border-radius: var(--radius); }
.bars-title { font-size: 16px; font-weight: 600; }
.bars-sub { font-size: 14px; color: var(--ink-2); margin: 4px 0 20px; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 12px; }
.bar-row dt { font-size: 14px; color: var(--ink-2); }
.bar-row dd { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bar { display: block; height: 18px; background: #113C7B; border-radius: 0 4px 4px 0; transition: opacity 0.2s; }
.bar-row:hover .bar { opacity: 0.8; }
.bar-val { font-size: 13.5px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0; }
.tiles li { list-style: none; padding: 18px; border: 1px solid var(--rule); border-radius: 12px; }
.tiles b { display: block; font-size: 26px; font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.tiles span { display: block; margin-top: 8px; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.stack-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.stack-list { display: grid; }
.stack-list > div { display: grid; grid-template-columns: 140px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.stack-list > div:first-child { border-top: 1px solid var(--rule); }
.stack-list dt { font-size: 13.5px; color: var(--ink-3); }
.stack-list dd { font-size: 14.5px; color: var(--ink); line-height: 1.5; }
.tech-list { padding: 0; display: grid; gap: 10px; }
.tech-list li { list-style: none; font-size: 14.5px; color: var(--ink-2); line-height: 1.55; padding-left: 18px; position: relative; }
.tech-list li::before { content: ''; position: absolute; left: 0; top: 0.75em; width: 9px; height: 1px; background: var(--ink); }
.tech-list b { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) {
  .arch-split, .flow, .data-grid, .stack-grid { grid-template-columns: 1fr; }
  .weights-key { flex-direction: column; gap: 6px; }
  .bar-row { grid-template-columns: 96px 1fr; }
  .stack-list > div { grid-template-columns: 110px 1fr; }
}

/* Feature-by-feature clips on the Renude case study */
.features { display: grid; gap: clamp(48px, 6vw, 88px); }
.feature { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.feature:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); }
.feature:nth-child(even) video { order: 2; }
.feature video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); background: #fff; }
.feature .eyebrow { display: block; margin-bottom: 10px; }
.feature h3 { font-size: clamp(19px, 1.8vw, 22px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 10px; }
.feature p { font-size: 15.5px; color: var(--ink-2); line-height: 1.6; max-width: 46ch; }
@media (max-width: 760px) {
  .feature, .feature:nth-child(even) { grid-template-columns: 1fr; gap: 18px; }
  .feature:nth-child(even) video { order: 0; }
}

.case-section > h2 {
  position: sticky;
  top: 100px;
  align-self: start;
  font-size: clamp(20px, 1.8vw, 24px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.prose > * + * { margin-top: 18px; }
.prose p { font-size: 17px; color: var(--ink-2); max-width: 66ch; }
.prose p strong { color: var(--ink); font-weight: 500; }

.points li {
  position: relative;
  padding-left: 22px;
  font-size: 16.5px;
  color: var(--ink-2);
  max-width: 66ch;
}

.points li + li { margin-top: 12px; }
.points li::before { content: ''; position: absolute; left: 0; top: 0.8em; width: 9px; height: 1px; background: var(--ink); }
.points strong { color: var(--ink); font-weight: 500; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cards.two { grid-template-columns: 1fr 1fr; }
.card { padding: 22px; border: 1px solid var(--rule); border-radius: 12px; }
.card h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.card p { font-size: 15px; color: var(--ink-2); line-height: 1.6; }
.card .eyebrow { display: block; margin-bottom: 10px; }

.formula {
  padding: 18px 22px;
  font-size: 15.5px;
  color: var(--ink);
  background: var(--panel);
  border-radius: 10px;
  overflow-x: auto;
  white-space: nowrap;
}

.formula i { font-style: italic; }

/* Diagrams */
.diagram { padding: clamp(20px, 3vw, 32px); background: var(--panel); border-radius: var(--radius); }
.diagram-caption { margin-top: 12px; font-size: 13.5px; color: var(--ink-3); }

.node {
  padding: 13px 16px;
  background: #fff;
  border: 1px solid var(--rule-2);
  border-radius: 10px;
}

.node-k { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; }
.node-v { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.45; margin-top: 2px; }
.node-out { background: var(--ink); border-color: var(--ink); color: #fff; }
.node-out .node-v { color: rgba(255, 255, 255, 0.75); }

.wire { position: relative; display: block; width: 1px; height: 22px; margin-left: 24px; background: #B5B5B5; }

.wire::after {
  content: '';
  position: absolute;
  bottom: 0; left: -3px;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 5px solid #8A8A8A;
}

.diagram--row { display: flex; align-items: stretch; }
.diagram--row .node { flex: 1 1 0; min-width: 0; }
.diagram--row .wire { flex: none; align-self: center; width: 22px; height: 1px; margin: 0; }

.diagram--row .wire::after {
  bottom: auto; left: auto;
  right: 0; top: -3px;
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
  border-left: 5px solid #8A8A8A;
  border-right: 0;
}

/* Media grids */
.media-grid { display: grid; gap: 18px; }
.media-grid.three { grid-template-columns: repeat(3, 1fr); }
.media-grid.four { grid-template-columns: repeat(4, 1fr); }
.media-grid.two { grid-template-columns: 1fr 1fr; }
.media-grid figcaption { margin-top: 10px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.media-grid figcaption b { color: var(--ink); font-weight: 500; }
.media-grid video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: #222; }
.panel-shot { display: block; }
.panel-shot img { width: 100%; height: auto; }
.framed img { border: 1px solid var(--rule-2); border-radius: 12px; }

.wide { margin-top: 40px; }

/* Next project */
.next {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  padding: clamp(48px, 6vw, 80px) 0;
  border-top: 1px solid var(--rule);
}

.next-title { font-size: clamp(26px, 3vw, 40px); font-weight: 500; letter-spacing: -0.025em; line-height: 1.15; margin-top: 10px; }
.next .arrow-big { font-size: 32px; transition: transform 0.3s var(--ease); }
.next:hover .arrow-big { transform: translateX(6px); }

/* Motion
   Every state below is added by site.js, which skips all of it under
   prefers-reduced-motion, so the page stays fully visible without JS or motion. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--base, 0ms);
}
.js .reveal.in { opacity: 1; transform: none; }

/* Headlines rise word by word */
.js .reveal.words { opacity: 1; transform: none; }
.words .wi {
  display: inline-block;
  opacity: 0;
  filter: blur(6px);
  transform: translateY(0.45em);
  transition: opacity 0.7s var(--ease), transform 0.9s var(--ease), filter 0.7s var(--ease);
  transition-delay: calc(var(--base, 0ms) + var(--d, 0) * 45ms);
}
.words.in .wi { opacity: 1; filter: none; transform: none; }

/* Groups arrive one item at a time */
.stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--base, 0ms) + var(--i, 0) * 80ms);
}
.stagger.in > * { opacity: 1; transform: none; }

/* Media opens from a narrower window */
.clip {
  clip-path: inset(9% 7% 9% 7% round 22px);
  transform: scale(1.05);
  transition: clip-path 1.2s var(--ease), transform 1.6s var(--ease);
}
.clip.in { clip-path: inset(-80px -80px -80px -80px round 0px); transform: none; }

/* Section dividers draw from left to right */
.section.draw { position: relative; border-top-color: transparent; }
.section.draw::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: var(--rule);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.6s var(--ease);
}
.section.draw.in::before { transform: none; }

/* Reading progress along the bottom of the nav */
.nav::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--ink);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { transition: none; }
  .work-media, .arrow-link span, .next .arrow-big { transition: none; }
  .nav::after { display: none; }
}

/* Responsive */
@media (max-width: 960px) {
  .work-row, .work-row:nth-child(even) { grid-template-columns: 1fr; gap: 24px; }
  .work-row:nth-child(even) .work-media { order: 0; }

  .split { grid-template-columns: 1fr; gap: 36px; }
  .split > .section-head { position: static; }

  .lead-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-cols { grid-template-columns: 1fr; gap: 16px; }

  .case-meta, .case-stats { grid-template-columns: 1fr 1fr; }
  .case-section { grid-template-columns: 1fr; gap: 20px; }
  .case-section > h2 { position: static; }
  .cards { grid-template-columns: 1fr; }
  .media-grid.four { grid-template-columns: 1fr 1fr; }

  .diagram--row { flex-direction: column; }
  .diagram--row .wire { width: 1px; height: 22px; margin-left: 24px; align-self: flex-start; }
  .diagram--row .wire::after {
    right: auto; top: auto; left: -3px; bottom: 0;
    border-left: 3.5px solid transparent;
    border-right: 3.5px solid transparent;
    border-top: 5px solid #8A8A8A;
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  .nav-inner { height: 60px; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 14px; }
  .hide-sm { display: none; }

  .hero { padding: 120px 0 72px; }
  .case-hero { padding: 104px 0 32px; }

  .rows li { grid-template-columns: 1fr auto; gap: 4px 16px; }
  .rows .role { grid-column: 1 / -1; grid-row: 2; }
  .rows .when { grid-row: 1; grid-column: 2; }

  .skills { grid-template-columns: 1fr; }
  .media-grid.three, .media-grid.two { grid-template-columns: 1fr; }
  .media-grid.three.tall {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(72%, 300px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  .media-grid.three.tall > figure { scroll-snap-align: start; }

  .press-list a { grid-template-columns: 1fr 24px; gap: 4px 16px; }
  .press-list .arrow { grid-column: 2; grid-row: 1 / 3; align-self: center; }

  .footer-inner { flex-direction: column; gap: 6px; }
}

@media (max-width: 520px) {
  .facts { grid-template-columns: 1fr; }
  .cards.two { grid-template-columns: 1fr; }
  .case-meta, .case-stats { grid-template-columns: 1fr; }
  .figures { grid-template-columns: 1fr 1fr; }
  .media-grid.four { grid-template-columns: 1fr; }
  .url { position: static; transform: none; flex: 1; width: auto; margin-left: 10px; }
}
