/* ============================================
   CHRIS TERTERIAN — PORTFOLIO, 2026 REDESIGN
   One typeface, one accent, hairlines. Light only.
   ============================================ */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;

  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --ink: #1d1d1f;
  --ink-dim: #6e6e73;
  --line: #e5e5ea;
  --accent: #0066cc;

  --margin: clamp(20px, 7.2vw, 104px);
  --page: min(1232px, 100vw - 2 * var(--margin));
  --gap: 24px;
  --nav-h: 64px;
  --radius: 16px;

  /* Motion: one settle curve, four durations */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --quick: 200ms;
  --base: 400ms;
  --slow: 700ms;
  --draw: 900ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.58 var(--font); letter-spacing: -0.006em; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: var(--page); margin-inline: auto; }
.label { display: block; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); }
.dim { color: var(--ink-dim); }
.skip { position: absolute; left: var(--margin); top: -48px; z-index: 20; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 13px; }
.skip:focus { top: 12px; }

/* Text links draw their underline from the left */
.link { position: relative; color: var(--accent); }
.link::after, .nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: center; transition: transform var(--base) var(--ease); }
.link:hover::after, .nav a:hover::after { transform: none; }

/* ---------- Header: clear at the top, frosted once the page scrolls ---------- */
.header { position: sticky; top: 0; z-index: 10; height: var(--nav-h); border-bottom: 1px solid transparent; transition: background-color 250ms ease, border-color 250ms ease, backdrop-filter 250ms ease; }
.header.is-stuck { background: rgba(255, 255, 255, 0.72); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); border-bottom-color: var(--line); }
.header .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; height: 100%; column-gap: 24px; font-size: 13px; line-height: 18px; }
.header__right { display: flex; align-items: center; justify-content: flex-end; gap: 28px; }
.header__name { font-size: 17px; font-weight: 600; letter-spacing: -0.012em; white-space: nowrap; }
.header__place { display: flex; gap: 8px; white-space: nowrap; }
.moved { position: relative; color: var(--ink-dim); }
.moved::after { content: ""; position: absolute; left: -1px; right: -1px; top: 52%; height: 1px; background: currentColor; transform-origin: left; }
.nav { display: flex; gap: 28px; }
.nav a { position: relative; color: var(--ink-dim); transition: color var(--quick) ease; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.copy { position: relative; color: var(--accent); white-space: nowrap; }
.copy__done { position: absolute; right: 0; top: 100%; margin-top: 6px; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 12px; opacity: 0; transform: translateY(-4px); transition: opacity var(--quick) ease, transform var(--quick) var(--ease); pointer-events: none; }
.copy.is-copied .copy__done { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 40px 0 72px; overflow: clip; }
.hero > .wrap { position: relative; }
@media (min-width: 1001px) { .hero > .wrap { min-height: calc(100svh - var(--nav-h) - 112px); } }
.hero__title { position: relative; z-index: 1; margin-left: -0.04em; font-weight: 600; font-size: clamp(60px, min(14.45vw, 22svh), 208px); line-height: 0.925; letter-spacing: -0.04em; }
.line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.line > span { display: block; }
.hero__body { position: static; }
.hero__copy { max-width: 420px; }
.hero__intro { padding-top: clamp(40px, 12svh, 132px); font-size: clamp(19px, 1.67vw, 24px); line-height: 1.42; letter-spacing: -0.012em; color: var(--ink-dim); }
.hero__scroll { display: inline-flex; gap: 8px; margin-top: 36px; }
.hero__shown { display: flex; flex-direction: column; gap: 6px; margin-top: 40px; font-size: 15px; }

/* The graphic: one page at three stages, stacked */
.stack-box { position: absolute; z-index: 2; right: 0; top: var(--top, 300px); width: calc(var(--w, 880) * 1px * var(--s, 1)); height: calc(640px * var(--s, 1)); }
.stack { position: absolute; left: 0; top: 0; width: 880px; height: 740px; transform: scale(var(--s, 1)); transform-origin: 0 0; }
.layer { position: absolute; left: 262px; top: calc(var(--k) * 120px); width: 460px; height: 300px; transform: translate(calc(var(--px, 0) * (2 - var(--k)) * 1px), calc(var(--spread, 0) * var(--k) * 1px)); will-change: transform; }
.plane { width: 100%; height: 100%; overflow: hidden; border-radius: 20px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line), 0 28px 56px rgba(0, 0, 0, 0.14); transform: matrix(0.866, 0.5, -0.866, 0.5, 0, 0); transform-origin: 0 0; }
.plane img, .plane svg { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.layer__tag { position: absolute; left: 410px; top: 222px; display: flex; align-items: center; gap: 12px; white-space: nowrap; transform: scale(calc(1 / var(--s, 1))); transform-origin: left center; } /* labels stay at reading size however small the graphic gets */
.layer__tag::before { content: ""; width: 28px; height: 1px; background: var(--ink-dim); }
.layer__tag b { font-weight: 500; color: var(--ink); }

/* ---------- Sections ---------- */
.section { position: relative; padding: 64px 0 104px; border-top: 1px solid var(--line); }
.cols { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }
.section__label { grid-column: 2 / -1; margin-bottom: 32px; }

.intro { grid-column: 2 / span 6; font-size: clamp(22px, 1.95vw, 28px); line-height: 1.57; font-weight: 500; letter-spacing: -0.016em; color: var(--ink-dim); }
.intro b { font-weight: 600; color: var(--ink); }
.chip { display: inline-flex; align-items: center; gap: 8px; margin: 0 2px; padding: 4px 12px 4px 5px; vertical-align: -6px; border-radius: 10px; background: var(--bg-soft); color: var(--ink); font-size: 0.86em; font-weight: 600; line-height: 30px; transition: transform var(--quick) var(--ease); }
.chip img { width: 30px; height: 30px; padding: 4px; border-radius: 7px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); transition: transform var(--quick) var(--ease); }
.chip:hover { transform: translateY(-2px); }
.chip:hover img { transform: rotate(-6deg); }
.intro__links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 40px; }
.intro__links a { display: grid; place-items: center; width: 28px; height: 28px; margin-left: -4px; color: var(--ink-dim); transition: color var(--quick) ease; }
.intro__links a:hover { color: var(--ink); }
.intro__links svg { width: 20px; height: 20px; }
.prose { grid-column: 8 / -1; padding-top: 8px; color: var(--ink-dim); }
.prose p + p { margin-top: 20px; }

/* Work */
.work__head { grid-column: 2 / span 5; font-size: clamp(22px, 1.95vw, 28px); line-height: 1.29; font-weight: 600; letter-spacing: -0.016em; }
.work__head span { display: block; font-weight: 500; color: var(--ink-dim); }
.work__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px var(--gap); margin-top: 72px; }
.card { display: block; }
.card--lead { grid-column: 1 / -1; }
.card__thumb { position: relative; overflow: hidden; aspect-ratio: 604 / 378; border-radius: var(--radius); background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line); }
.card--lead .card__thumb { aspect-ratio: 1232 / 587; }
.card__thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); pointer-events: none; }
.card__thumb img, .card__thumb video { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform var(--slow) var(--ease); }
a.card:hover .card__thumb img, a.card:hover .card__thumb video { transform: scale(1.03); }
.card__meta { display: grid; grid-template-columns: 1fr minmax(0, 260px); gap: 4px var(--gap); margin-top: 18px; }
.card--lead .card__meta { grid-template-columns: 1fr minmax(0, 380px); }
.card__name { display: flex; align-items: center; gap: 8px; font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -0.012em; }
.card--lead .card__name { font-size: 24px; line-height: 28px; }
.card__name i { font-style: normal; font-weight: 400; opacity: 0; transform: translateX(-6px); transition: opacity var(--quick) ease, transform var(--quick) var(--ease); }
a.card:hover .card__name i { opacity: 1; transform: none; }
.card__what { font-size: 15px; line-height: 20px; color: var(--ink-dim); }
.card__result { grid-column: 2; grid-row: 1 / span 3; font-size: 15px; line-height: 22px; font-weight: 500; text-align: right; }
.tags { display: flex; gap: 6px; margin-top: 10px; }
.tags li { padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); font-size: 12px; line-height: 16px; font-weight: 500; }
.soon { font-size: 12px; font-weight: 500; color: var(--ink-dim); }

/* Every autoplaying video carries a pause control */
.pause { position: absolute; right: 20px; bottom: 20px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(40, 40, 43, 0.72); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform var(--quick) var(--ease); }
.pause:hover { transform: scale(1.08); }
.pause::before, .pause::after { content: ""; width: 3px; height: 12px; border-radius: 1px; background: currentColor; grid-area: 1 / 1; }
.pause::before { transform: translateX(-3.5px); }
.pause::after { transform: translateX(3.5px); }
.pause[aria-pressed="true"]::before { width: 0; height: 0; border-radius: 0; background: none; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent currentColor; transform: translateX(1.5px); }
.pause[aria-pressed="true"]::after { display: none; }

/* Footer */
.footer { padding: 28px 0 36px; border-top: 1px solid var(--line); }
.footer .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px var(--gap); }
.footer .label + .label { color: var(--ink); }
.footer a { position: relative; }
.footer a:hover { color: var(--accent); }

/* ---------- Motion (only when the visitor has not asked for less) ---------- */
.motion .header .wrap > * { opacity: 0; animation: settle var(--slow) var(--ease) forwards; }
.motion .header .wrap > :nth-child(2) { animation-delay: 60ms; }
.motion .header .wrap > :nth-child(3) { animation-delay: 120ms; }
.motion .moved::after { transform: scaleX(0); animation: strike var(--base) var(--ease) 900ms forwards; }
.motion .line > span { transform: translateY(108%); animation: rise var(--draw) var(--ease) forwards; animation-delay: calc(150ms + var(--i, 0) * 90ms); }
.motion .hero__intro, .motion .hero__shown { opacity: 0; animation: settle var(--slow) var(--ease) 500ms forwards; }
.motion .layer { opacity: 0; animation: drop 900ms var(--ease) forwards, float 6s ease-in-out infinite; animation-delay: calc(500ms + (2 - var(--k)) * 140ms), calc(1600ms + var(--k) * 700ms); }
.motion .layer__tag { opacity: 0; animation: settle var(--slow) var(--ease) calc(1300ms + (2 - var(--k)) * 140ms) forwards; }
@keyframes settle { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes rise { to { transform: none; } }
@keyframes strike { to { transform: none; } }
@keyframes drop { from { opacity: 0; translate: 0 -90px; } to { opacity: 1; translate: 0 0; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

/* Sections: the hairline draws across, then the content settles */
.motion .section, .motion .footer { border-top-color: transparent; }
.motion .section::before, .motion .footer::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--line); transform: scaleX(0); transform-origin: left; transition: transform var(--draw) var(--ease); }
.motion .footer { position: relative; }
.motion .is-in.section::before, .motion .is-in.footer::before { transform: none; }
.motion [data-rise] { opacity: 0; transform: translateY(16px); transition: opacity var(--base) ease-out, transform var(--slow) var(--ease); transition-delay: calc(var(--n, 0) * 60ms + 120ms); }
.motion .is-in [data-rise], .motion [data-rise].is-in { opacity: 1; transform: none; }
/* Cards are unmasked from the bottom while the picture settles back */
.motion .card .card__thumb { clip-path: inset(100% 0 0 0 round var(--radius)); transition: clip-path 800ms var(--ease); transition-delay: calc(var(--n, 0) * 80ms); }
.motion .card .card__thumb img, .motion .card .card__thumb video { scale: 1.08; transition: scale 1200ms var(--ease), transform var(--slow) var(--ease); transition-delay: calc(var(--n, 0) * 80ms), 0s; }
.motion .card.is-in .card__thumb { clip-path: inset(0 0 0 0 round var(--radius)); }
.motion .card.is-in .card__thumb img, .motion .card.is-in .card__thumb video { scale: 1; }
.motion .card .card__meta { opacity: 0; transform: translateY(12px); transition: opacity var(--base) ease-out, transform var(--slow) var(--ease); transition-delay: calc(var(--n, 0) * 80ms + 250ms); }
.motion .card.is-in .card__meta { opacity: 1; transform: none; }

/* ---------- Smaller screens ---------- */
@media (max-width: 1000px) {
  .section__label, .intro, .work__head { grid-column: 1 / -1; }
  .prose { grid-column: 1 / -1; margin-top: 40px; max-width: 640px; }
  .stack-box { position: relative; top: auto; right: auto; margin: 24px auto 0; }
  .hero__copy { max-width: 520px; }
  .hero__intro { padding-top: 32px; max-width: 520px; }
  .hero__shown { margin-top: 32px; }
}
@media (max-width: 880px) { .header .wrap { grid-template-columns: auto 1fr; } .header__place { display: none; } }
@media (max-width: 700px) {
  .header .wrap { gap: 16px; }
  .header .wrap { grid-template-columns: auto 1fr; }
  .header__place { display: none; }
  .nav { gap: 18px; }
  .hero { padding-top: 24px; }
  .work__grid { grid-template-columns: 1fr; gap: 44px; margin-top: 48px; }
  .card__meta, .card--lead .card__meta { grid-template-columns: 1fr; }
  .card__result { grid-column: 1; grid-row: auto; margin-top: 10px; text-align: left; }
  .card--lead .card__thumb { aspect-ratio: 604 / 378; }
  .section { padding: 48px 0 72px; }
  .footer .wrap { grid-template-columns: 1fr 1fr; }
  .layer__tag { display: none; }
  .stack-box { --w: 680; }
  .nav { gap: 14px; }
  .header__name { font-size: 15px; }
}

/* ============================================
   CASE STUDY
   ============================================ */
.case-top { padding: 48px 0 104px; }
.back { display: inline-block; font-size: 13px; line-height: 18px; color: var(--ink-dim); transition: color var(--quick) ease; }
.back:hover { color: var(--ink); }
.case-top > .wrap > .label { margin-top: 30px; }
.case-title { margin: 12px 0 0 -0.04em; font-weight: 600; font-size: clamp(42px, 7.5vw, 108px); line-height: 1; letter-spacing: -0.035em; }
.case-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 16px; font-size: clamp(20px, 1.95vw, 28px); line-height: 1.29; font-weight: 500; letter-spacing: -0.012em; color: var(--ink-dim); }
.case-kicker .tags { margin-top: 0; }

.band { display: grid; gap: 32px var(--gap); margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.band--3 { grid-template-columns: repeat(3, 1fr); }
.band--4 { grid-template-columns: repeat(4, 1fr); }
.band .label { margin-bottom: 10px; }
.summary p { max-width: 370px; font-size: clamp(19px, 1.67vw, 24px); line-height: 1.33; font-weight: 500; letter-spacing: -0.012em; }
.stats { margin-top: 40px; padding-top: 40px; }
.stats b { display: block; margin-left: -0.04em; font-weight: 600; font-size: clamp(40px, 5vw, 72px); line-height: 1.06; letter-spacing: -0.03em; }
.stats span { display: block; margin-top: 10px; font-size: 15px; line-height: 22px; color: var(--ink-dim); }
.caveat { margin-top: 20px; font-size: 13px; line-height: 18px; color: var(--ink-dim); }
.meta { margin-top: 56px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.meta p { font-size: 15px; line-height: 22px; font-weight: 500; }

.figure { margin: 0; }
.figure + .figure, .tri + .figure, .figure + .tri { margin-top: 48px; }
.case-top .figure { margin-top: 56px; }
.frame { position: relative; overflow: hidden; aspect-ratio: var(--ar, 1232 / 770); border-radius: var(--radius); background: var(--bg-soft); }
.frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); pointer-events: none; }
.frame img, .frame video { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.figure figcaption { margin-top: 14px; }

.made { margin-top: 64px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: 20px; }
.panel { padding: 28px 32px 32px; border-radius: var(--radius); background: var(--bg-soft); }
.panel h3 { font-size: 24px; line-height: 28px; font-weight: 600; letter-spacing: -0.012em; }
.panel p { margin-top: 12px; color: var(--ink-dim); }
.panel .label + p { margin-top: 14px; }
.panel--strong p { color: var(--ink); }

.h { grid-column: 2 / span 5; font-weight: 600; font-size: clamp(28px, 2.8vw, 40px); line-height: 1.15; letter-spacing: -0.02em; }
.h--wide { grid-column: 2 / -1; max-width: 1023px; }
.block { margin-top: 64px; }
.tri { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.tile { padding: 24px; border-radius: var(--radius); background: var(--bg-soft); }
.tile h3 { margin-top: 12px; font-size: 24px; line-height: 28px; font-weight: 600; letter-spacing: -0.012em; }
.tile p { margin-top: 12px; font-size: 15px; line-height: 22px; color: var(--ink-dim); }
.buyer h3 { margin-top: 12px; font-size: clamp(22px, 1.95vw, 28px); line-height: 1.21; font-weight: 600; letter-spacing: -0.016em; color: var(--ink-dim); }
.buyer h3 b { font-weight: 600; color: var(--ink); }
.reframe { margin-top: 96px; }
.reframe p { grid-column: 2 / -1; max-width: 1023px; margin-top: 12px; font-weight: 600; font-size: clamp(28px, 3.35vw, 48px); line-height: 1.17; letter-spacing: -0.022em; }
.reframe .label { grid-column: 2 / -1; }

.decision { margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--line); }
.decision + .decision { margin-top: 96px; }
.decision__what { grid-column: 2 / span 5; }
.decision__what .label { color: #424245; } /* darker than the "Why" label; 10:1 on white, 9.3:1 on --bg-soft */
.decision__what h3 { margin-top: 12px; font-weight: 600; font-size: clamp(24px, 2.25vw, 32px); line-height: 1.19; letter-spacing: -0.018em; }
.decision__what p { margin-top: 16px; max-width: 480px; color: var(--ink-dim); }
.result { display: inline-block; margin-top: 20px; padding: 6px 12px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 13px; line-height: 18px; font-weight: 500; }
.decision__why { grid-column: 8 / -1; }
.decision__why p { margin-top: 12px; font-size: clamp(18px, 1.4vw, 20px); line-height: 1.5; }
.decision .figure, .decision .diagram { margin-top: 56px; }
.diagram { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.diagram .panel { display: flex; flex-direction: column; min-height: 300px; }
.diagram h4 { margin: 12px 0 20px; font-size: 24px; line-height: 28px; font-weight: 600; letter-spacing: -0.012em; }
.diagram ul li, .diagram dl { color: var(--ink-dim); }
.diagram ul li + li { margin-top: 10px; }
.diagram dt { font-weight: 600; color: var(--ink); }
.diagram dd + dt { margin-top: 16px; }
.diagram dd { font-size: 15px; line-height: 22px; }
.diagram .panel > :last-child { margin-top: auto; padding-top: 24px; font-size: 15px; line-height: 22px; }
.panel--dark { background: var(--ink); }
.panel--dark, .panel--dark dt, .panel--dark h4 { color: #fff; }
.panel--dark .label, .panel--dark dd, .panel--dark dl { color: #a1a1a6; }
.panel--dark > :last-child { color: #fff; }

.phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); justify-items: center; padding: 52px 24px; border-radius: var(--radius); background: var(--bg-soft); }
.phone { width: min(316px, 100%); aspect-ratio: 316 / 676; padding: 8px; border-radius: 44px; background: var(--ink); }
.phone > div { height: 100%; overflow: hidden; border-radius: 36px; background: var(--bg); }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.refused { margin-top: 56px; border-bottom: 1px solid var(--line); }
.refused li { padding: 26px 0 30px; border-top: 1px solid var(--line); }
.refused h3 { grid-column: 2 / span 5; font-size: clamp(19px, 1.67vw, 24px); line-height: 1.25; font-weight: 600; letter-spacing: -0.012em; color: var(--ink-dim); text-decoration: line-through; text-decoration-thickness: 1px; }
.refused p { grid-column: 8 / -1; }
.outcome p { grid-column: 2 / -1; max-width: 820px; margin-top: 40px; font-size: 15px; line-height: 23px; color: var(--ink-dim); }

.next { display: block; padding: 64px 0 104px; border-top: 1px solid var(--line); }
.next__title { display: block; margin: 12px 0 0 -0.04em; font-weight: 600; font-size: clamp(36px, 6.1vw, 88px); line-height: 1.05; letter-spacing: -0.032em; transition: color var(--quick) ease; }
.next__what { display: block; margin-top: 12px; font-size: clamp(20px, 1.95vw, 28px); line-height: 1.29; font-weight: 500; color: var(--ink-dim); }
.next__what i { display: inline-block; font-style: normal; transition: transform var(--quick) var(--ease); }
.next:hover .next__title { color: var(--accent); }
.next:hover .next__what i { transform: translateX(8px); }

/* Media is unmasked from the bottom as it enters view */
.motion .figure .frame, .motion .figure .phones { clip-path: inset(100% 0 0 0 round var(--radius)); transition: clip-path 800ms var(--ease); }
.motion .figure.is-in .frame, .motion .figure.is-in .phones { clip-path: inset(0 0 0 0 round var(--radius)); }
.motion .figure figcaption { opacity: 0; transition: opacity var(--base) ease-out 300ms; }
.motion .figure.is-in figcaption { opacity: 1; }
.motion .rise { opacity: 0; transform: translateY(16px); transition: opacity var(--base) ease-out, transform var(--slow) var(--ease); transition-delay: calc(var(--n, 0) * 70ms); }
.motion .rise.is-in { opacity: 1; transform: none; }
.motion .case-top .back, .motion .case-top > .wrap > .label, .motion .case-kicker, .motion .case-top .band { opacity: 0; animation: settle var(--slow) var(--ease) forwards; }
.motion .case-kicker { animation-delay: 450ms; }
.motion .case-top .summary { animation-delay: 550ms; }
.motion .case-top .stats { animation-delay: 650ms; }

@media (max-width: 1000px) {
  .h, .decision__what, .decision__why, .refused h3, .refused p { grid-column: 1 / -1; }
  .decision__why, .refused p { margin-top: 24px; }
  .reframe p, .reframe .label, .outcome p, .h--wide { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .band--3, .tri, .pair, .diagram { grid-template-columns: 1fr; }
  .band--4 { grid-template-columns: 1fr 1fr; }
  .phones { grid-template-columns: 1fr; padding: 32px 24px; }
  .phone { width: min(260px, 100%); }
  .case-top { padding-bottom: 72px; }
  .decision + .decision { margin-top: 72px; }
}

/* Three-up cards that carry a question, used in "Who it had to work for" */
.tile.buyer h3 { font-size: clamp(20px, 1.67vw, 24px); }
.refused p .link { white-space: nowrap; }

/* ============================================
   PLAIN PAGES — About, Notes, Contact
   ============================================ */
.page-top { padding: 48px 0 88px; }
.page-title { margin: 12px 0 0 -0.04em; font-weight: 600; font-size: clamp(48px, 9vw, 128px); line-height: 1; letter-spacing: -0.04em; }
.page-title--note { margin-left: -0.02em; max-width: 16em; font-size: clamp(36px, 5vw, 72px); line-height: 1.04; letter-spacing: -0.032em; }
.page-sub { max-width: 620px; margin-top: 28px; font-size: clamp(19px, 1.67vw, 24px); line-height: 1.42; letter-spacing: -0.012em; color: var(--ink-dim); }
.portrait { width: 72px; height: 72px; margin-bottom: 28px; border-radius: 50%; background: var(--bg-soft); }
.back { display: inline-block; font-size: 13px; color: var(--ink-dim); transition: color var(--quick) ease; }
.back:hover { color: var(--ink); }

/* Hairline rows: experience, and the list of notes */
.rows { grid-column: 2 / -1; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 5fr 4fr 2fr; gap: 4px var(--gap); align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line); color: var(--ink-dim); }
.row__name { font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -0.012em; color: var(--ink); transition: color var(--quick) ease; }
.row__meta { text-align: right; font-size: 15px; }
.rows__more { grid-column: 2 / -1; margin-top: 28px; font-size: 15px; }
a.row { grid-template-columns: 2fr 4fr 5fr; }
a.row time { font-size: 15px; }
a.row .row__sum { display: flex; justify-content: space-between; gap: 24px; font-size: 15px; line-height: 22px; }
a.row i { font-style: normal; color: var(--ink); opacity: 0; transform: translateX(-6px); transition: opacity var(--quick) ease, transform var(--quick) var(--ease); }
a.row:hover .row__name { color: var(--accent); }
a.row:hover i { opacity: 1; transform: none; }
.draft { margin-left: 10px; padding: 3px 9px; border-radius: 999px; background: var(--bg-soft); font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--ink-dim); vertical-align: middle; }

/* A note, set for reading */
.longform { grid-column: 2 / span 7; font-size: 19px; line-height: 1.6; }
.longform > * + * { margin-top: 24px; }
.longform h2 { margin-top: 56px; font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -0.016em; }
.longform h3, .longform h4 { margin-top: 40px; font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -0.012em; }
.longform a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.longform ul, .longform ol { padding-left: 1.2em; }
.longform ul { list-style: disc; }
.longform li + li { margin-top: 8px; }
.longform blockquote { margin-left: 0; margin-right: 0; padding-left: 20px; border-left: 2px solid var(--ink); font-weight: 500; }
.longform code { padding: 2px 6px; border-radius: 6px; background: var(--bg-soft); font: 0.86em ui-monospace, "SF Mono", Menlo, monospace; }
.longform pre { overflow-x: auto; padding: 20px; border-radius: var(--radius); background: var(--bg-soft); font-size: 14px; line-height: 1.6; }
.longform pre code { padding: 0; background: none; }
.longform img { width: 100%; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); }
.longform figcaption { margin-top: 10px; font-size: 13px; color: var(--ink-dim); }
.longform hr { height: 1px; border: 0; background: var(--line); margin-block: 48px; }
.share { grid-column: 2 / span 7; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.share .label { margin-right: 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 24px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 500; transition: transform var(--quick) var(--ease), background-color var(--quick) ease; }
.btn i { font-style: normal; transition: transform var(--quick) var(--ease); }
.btn:hover { transform: scale(1.03); }
.btn:hover i { transform: translateX(4px); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn--ghost { height: 36px; padding: 0 16px; background: var(--bg-soft); color: var(--ink); font-size: 13px; }
.btn--ghost svg { width: 14px; height: 14px; }

/* Contact */
.contact__direct { grid-column: 2 / span 5; }
.contact__email { display: inline-block; margin-top: 12px; font-size: clamp(22px, 1.95vw, 28px); line-height: 1.29; font-weight: 600; letter-spacing: -0.016em; }
.facts { margin-top: 48px; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.form { grid-column: 8 / -1; }
.field { margin-top: 28px; }
.field input, .field textarea { display: block; width: 100%; margin-top: 4px; padding: 10px 0 12px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; color: var(--ink); font: inherit; resize: vertical; transition: border-color var(--quick) ease; }
.field input:hover, .field textarea:hover { border-bottom-color: var(--ink-dim); }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.field-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { margin-top: 36px; }
.form-note { margin-top: 16px; font-size: 13px; color: var(--ink-dim); }
.form-success, .form-error { display: none; margin-top: 16px; font-size: 15px; font-weight: 500; }
.form-success.is-visible, .form-error.is-visible { display: block; }
.form-error { color: #c4001a; }

.motion .page-top > .wrap > :not(.page-title) { opacity: 0; animation: settle var(--slow) var(--ease) 450ms forwards; }
.motion .page-top > .wrap > .portrait, .motion .page-top > .wrap > .back, .motion .page-top > .wrap > .label:first-child { animation-delay: 100ms; }

@media (max-width: 1000px) {
  .rows, .rows__more, .longform, .share, .contact__direct, .form { grid-column: 1 / -1; }
  .form { margin-top: 64px; }
}
@media (max-width: 700px) {
  .page-top { padding: 32px 0 64px; }
  .row, a.row { grid-template-columns: 1fr; }
  .row__meta { text-align: left; }
  .longform { font-size: 18px; }
}

/* Trial: the whole header in capitals */
.header .wrap { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.header__name { font-size: 14px; letter-spacing: 0.08em; }
.copy__done { letter-spacing: 0; text-transform: none; }
.header .wrap { font-size: 11px; }
.header__right, .header .nav { gap: 24px; }
@media (max-width: 700px) {
  .header .wrap { letter-spacing: 0.04em; gap: 12px; }
  .header__name { font-size: 12px; letter-spacing: 0.05em; }
  .header .nav { gap: 12px; }
}
@media (max-width: 380px) { .header .wrap { font-size: 10px; gap: 8px; } .header__name { font-size: 11px; } .header .nav { gap: 9px; } }

/* Email lives in the footer and on About, in lower case; clicking copies it */
.page-mail { margin-top: 20px; font-size: clamp(19px, 1.67vw, 24px); line-height: 1.42; font-weight: 500; letter-spacing: -0.012em; }
.page-mail .copy__done, .contact__email .copy__done { right: auto; left: 0; letter-spacing: 0; font-weight: 500; }
.footer .mail { position: relative; width: max-content; max-width: 100%; font-size: 13px; letter-spacing: 0; text-transform: none; }
.footer .mail .copy__done { top: auto; bottom: 100%; right: auto; left: 0; margin: 0 0 6px; }
.mail.is-copied .copy__done { opacity: 1; transform: none; }

/* Over a project the pointer is replaced by a frosted grey label */
.cursor { position: fixed; left: 0; top: 0; z-index: 30; pointer-events: none; padding: 11px 18px; border-radius: 999px; background: rgba(110, 110, 115, 0.5); color: #fff; -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; opacity: 0; scale: 0.6; transition: opacity var(--quick) ease, scale var(--base) var(--ease); will-change: transform; }
.cursor.is-on { opacity: 1; scale: 1; }
.cursor.is-on.is-down { scale: 0.92; }
.has-cursor a.card, .has-cursor a.card * { cursor: none; }
.has-cursor a.card .pause { cursor: pointer; }

/* Role and company on the first screen; the facts band sits directly under a case study title */
.hero__role { margin-bottom: 14px; color: var(--ink); }
.case-kicker + .meta { margin-top: 40px; }
.meta + .summary { margin-top: 0; padding-top: 40px; border-top: 0; }
.tri > .figure + .figure { margin-top: 0; } /* tiles in a row share one top edge */

/* ---------- Clean Bean: the design system section ---------- */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); margin-bottom: 0; padding: 0; list-style: none; counter-reset: none; }
.flow li { position: relative; padding: 24px; border-radius: var(--radius); background: var(--bg-soft); }
.flow li + li::before { content: "→"; position: absolute; left: calc(var(--gap) / -2); top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; color: var(--ink-dim); }
.flow h3 { margin-top: 12px; font-size: 24px; line-height: 28px; font-weight: 600; letter-spacing: -0.012em; }
.flow p { margin-top: 12px; font-size: 15px; line-height: 22px; color: var(--ink-dim); }
.flow + .figure, .spec + .parts, .parts + .cols { margin-top: 48px; }

.spec { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0 var(--gap); align-items: center; }
.spec__art { border-radius: var(--radius); background: #faf8ed; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.spec__art svg { display: block; width: 100%; height: auto; }
.spec__line path { fill: none; stroke: #1d1d1f; stroke-width: 1.25; }
.spec__num text { font: 500 17px var(--font); fill: #1d1d1f; }
.spec__list { border-top: 1px solid var(--line); }
.spec__list > div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 22px; font-weight: 500; }
.spec__list code, .part code { margin-left: 4px; padding: 2px 6px; border-radius: 6px; background: var(--bg-soft); font: 400 12px ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink-dim); white-space: nowrap; }
.spec figcaption { grid-column: 1 / -1; }

.parts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px var(--gap); }
.parts .figure { margin: 0; display: flex; flex-direction: column; }
.part__art { flex: 1; display: grid; place-items: center; min-height: 200px; padding: 28px; border-radius: var(--radius); background: #faf8ed; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.part__art img { max-width: 100%; height: auto; } /* shown at the size they are in Figma */
.part--tall { grid-row: span 2; }
.part--wide { grid-column: span 2; }
.motion .figure .part__art, .motion .figure .spec__art { clip-path: inset(100% 0 0 0 round var(--radius)); transition: clip-path 800ms var(--ease); }
.motion .figure.is-in .part__art, .motion .figure.is-in .spec__art { clip-path: inset(0 0 0 0 round var(--radius)); }
.motion .spec .spec__list { opacity: 0; transition: opacity var(--base) ease-out 300ms; }
.motion .spec.is-in .spec__list { opacity: 1; }

@media (max-width: 1000px) {
  .flow { grid-template-columns: 1fr 1fr; }
  .flow li:nth-child(3)::before { display: none; }
  .spec { grid-template-columns: 1fr; }
  .spec__list { margin-top: 24px; }
}
@media (max-width: 700px) {
  .flow { grid-template-columns: 1fr; }
  .flow li + li::before { left: 50%; top: calc(var(--gap) / -2); rotate: 90deg; display: grid; }
  .parts { grid-template-columns: 1fr; }
  .part--tall, .part--wide { grid-row: auto; grid-column: auto; }
}
.spec__list code { white-space: normal; overflow-wrap: anywhere; }

/* Four screenshots as one figure, two by two */
.quad { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.quad img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line), 0 0 0 1px rgba(0, 0, 0, 0.08); }
.motion .figure .quad { clip-path: inset(100% 0 0 0 round var(--radius)); transition: clip-path 800ms var(--ease); }
.motion .figure.is-in .quad { clip-path: inset(0 0 0 0 round var(--radius)); }
@media (max-width: 700px) { .quad { grid-template-columns: 1fr; } }

/* Download button: fills as the file arrives, then turns green with a check. */
.dl { position: relative; overflow: hidden; justify-content: center; min-width: 204px; }
.dl > * { position: relative; }
.dl .dl__bar { position: absolute; inset: 0; background: rgba(255, 255, 255, 0.24); transform: scaleX(var(--p, 0)); transform-origin: left; opacity: 0; transition: opacity var(--quick) ease; }
.dl svg { width: 16px; height: 16px; flex: none; }
.dl .dl__check { display: none; }
.dl.is-loading { cursor: progress; }
.dl.is-loading:hover { transform: none; }
.dl.is-loading .dl__bar { opacity: 1; }
.dl.is-done { background: #1f7a3a; color: #fff; }
.dl.is-done .dl__arrow { display: none; }
.dl.is-done .dl__check { display: block; }
.motion .dl.is-done .dl__check path { stroke-dasharray: 16; stroke-dashoffset: 16; animation: dl-check 320ms var(--ease) 80ms forwards; }
@keyframes dl-check { to { stroke-dashoffset: 0; } }
