/* ryan portfolio
   type: Pretendard only (JetBrains Mono for URLs/data). Sizes snap to 12 14 16 18 20 24 30 36 48 60 72 96 128.
   spacing: 4 8 12 16 24 32 40 48 64 80 96. Easing: cubic-bezier(.22,1,.36,1). */

:root {
  --brand: #2445ff;
  --ink: #111110;
  --ink-2: #3b3b37;
  --mute: #5f5f59;
  --line: #e4e2dd;
  --paper: #ffffff;
  --fill: #f3f2ef;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --pad: 24px;
  --max: 1360px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (min-width: 768px) { :root { --pad: 40px; } }
@media (min-width: 1200px) { :root { --pad: 64px; } }

*, *::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(--paper); color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  font-size: 16px; line-height: 24px; letter-spacing: -0.01em;
  word-break: keep-all; overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ol, ul { margin: 0; padding: 0; list-style: none; }
dl, dd, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 4px; }
.ic { width: 1em; height: 1em; fill: currentColor; flex: none; }

.skip { position: absolute; left: 16px; top: -64px; z-index: 100; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 16px; }

/* ───────── top bar ───────── */
.top {
  position: fixed; inset: 12px 12px auto; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  max-width: var(--max); margin: 0 auto; padding: 8px 8px 8px 16px;
  background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 16px;
  transition: transform .5s var(--ease);
}
.top.is-hidden { transform: translateY(-120%); }
.mark { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; line-height: 28px; letter-spacing: -0.03em; }
.mark-word span { color: var(--mute); font-weight: 500; }
.mark-glyph { width: 24px; height: 24px; flex: none; }
.mark-glyph .mg-bg { fill: var(--brand); }
.mark-glyph .mg-fg { fill: #fff; }
.top-nav { display: flex; gap: 4px; margin-left: auto; }
.top-nav a { padding: 8px 12px; border-radius: 8px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink-2); transition: background-color .3s var(--ease), color .3s var(--ease); }
.top-nav a:hover { background: var(--fill); color: var(--ink); }
.top-nav a[aria-current="true"], .top-nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.top-nav sup { font-family: var(--mono); font-size: 12px; font-weight: 500; vertical-align: 4px; line-height: 0; }
@media (max-width: 559px) { .top-nav a:not(:first-child) { display: none; } }

/* ───────── hero ───────── */
.hero { padding-top: 128px; overflow: hidden; }
.hero-grid { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); display: grid; gap: 40px; }
.hero-role { font-size: 18px; line-height: 28px; font-weight: 500; color: var(--ink-2); margin-bottom: 24px; }
.hero-role b { color: var(--brand); font-weight: 700; }
@media (min-width: 900px) { .hero-role { font-size: 24px; line-height: 32px; } }
.hero-title { font-size: 48px; line-height: 1.04; letter-spacing: -0.05em; font-weight: 700; }
.hero-title .ln { display: block; }
.hero-title .dot { color: var(--brand); }
.hero-title .ln-lead { font-size: 30px; line-height: 1.2; letter-spacing: -0.04em; margin-bottom: 8px; }
@media (min-width: 640px) { .hero-title .ln-lead { font-size: 36px; } }
@media (min-width: 900px) { .hero-title .ln-lead { font-size: 48px; margin-bottom: 12px; } }
@media (min-width: 1240px) { .hero-title .ln-lead { font-size: 60px; } }
@media (min-width: 640px) { .hero-title { font-size: 60px; } }
@media (min-width: 900px) { .hero-title { font-size: 72px; } }
@media (min-width: 1240px) { .hero-title { font-size: 96px; } }

.hero-side { display: grid; gap: 32px; align-content: end; }
.hero-lead { font-size: 18px; line-height: 28px; color: var(--ink-2); max-width: 680px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.hero-stats div { padding: 12px 12px 0 0; }
.hero-stats div + div { padding-left: 12px; border-left: 1px solid var(--line); }
.hero-stats dt { font-size: 12px; line-height: 16px; color: var(--mute); font-weight: 500; }
.hero-stats dd { font-size: 48px; line-height: 1; font-weight: 700; letter-spacing: -0.04em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.hero-stats small { font-size: 14px; letter-spacing: 0; margin-left: 4px; color: var(--mute); font-weight: 600; }
@media (min-width: 1100px) {
  .hero-grid { row-gap: 48px; }
  .hero-side { grid-template-columns: minmax(0, 560px); }
}

/* tilted wall of real screens */
.wall { position: relative; height: 480px; margin-top: 24px; overflow: hidden; perspective: 1600px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 68%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 68%, transparent); }
.wall-plane { position: absolute; left: -12%; right: -12%; top: 0; display: grid; gap: 16px;
  transform: rotateX(24deg) rotateZ(-6deg) translateY(64px); transform-origin: 50% 0; }
.wall-row { overflow: visible; }
.wall-track { display: flex; gap: 16px; width: max-content; animation: drift var(--dur, 100s) linear infinite; }
.wall-row.is-rev .wall-track { animation-direction: reverse; }
.wall-track img { height: 200px; width: auto; flex: none; border-radius: 8px; object-fit: cover; object-position: top;
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 12px 32px -12px rgba(17,17,16,.28); background: var(--fill); }
.wall-track .t-d { aspect-ratio: 16 / 10; width: 320px; }
.wall-track .t-m { aspect-ratio: 390 / 844; width: 92px; border-radius: 12px; }
@keyframes drift { to { transform: translateX(-50%); } }
@media (min-width: 900px) {
  .wall { height: 720px; margin-top: 32px; }
  .wall-track img { height: 280px; }
  .wall-track .t-d { width: 448px; }
  .wall-track .t-m { width: 129px; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) { .wall-track { animation: none; } }

/* ───────── work: filter + cards (scales to dozens) ───────── */
.work { max-width: var(--max); margin: 0 auto; padding: 96px var(--pad); }
.work-head { display: grid; gap: 16px; margin-bottom: 40px; }
.work-head h2 { font-size: 36px; line-height: 40px; letter-spacing: -0.04em; }
.work-head p { color: var(--ink-2); max-width: 680px; font-size: 18px; line-height: 28px; }
@media (min-width: 900px) { .work-head { grid-template-columns: 1fr 1fr; align-items: end; } .work-head h2 { font-size: 60px; line-height: 1; } }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filters button { min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink-2);
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease); }
.filters button span { font-family: var(--mono); font-weight: 500; font-size: 12px; margin-left: 4px; color: var(--mute); }
.filters button:hover { border-color: var(--ink); color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filters button[aria-pressed="true"] span { color: rgba(255,255,255,.7); }
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cards-empty { padding: 48px 0; color: var(--mute); }
.cards:not(.is-open) .card[data-more] { display: none; }
.cards-more { display: flex; margin: 40px auto 0; min-height: 48px; padding: 12px 24px; border-radius: 12px; border: 1px solid var(--ink); background: #fff; font-size: 16px; line-height: 24px; font-weight: 600;
  transition: background-color .3s var(--ease), color .3s var(--ease); }
.cards-more:hover { background: var(--ink); color: #fff; }
.cards-more[hidden] { display: none; }
.card { background: var(--bg); color: var(--fg); border-radius: 16px; overflow: hidden; }
.card[hidden] { display: none; }
.card a { display: grid; height: 100%; grid-template-rows: auto 1fr; }
.card-art { position: relative; padding: 32px 0 0 32px; overflow: hidden; aspect-ratio: 4 / 3; }
/* PC 화면은 아래 끝까지 보이게(카드 아래 여백 24px), 오른쪽만 카드 밖으로 넘긴다 */
.card-art:not(.is-app) { aspect-ratio: auto; padding-bottom: 24px; }
.card-shot { display: block; width: 118%; max-width: none; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; border-radius: 8px 0 0 8px;
  box-shadow: 0 24px 48px -16px rgba(0,0,0,.4); transition: transform .5s var(--ease); }
.card-phone { position: absolute; right: 24px; bottom: -48px; width: 28%; transition: transform .5s var(--ease); }
.card a:hover .card-shot { transform: translateY(-8px); }
.card a:hover .card-phone { transform: translateY(-16px); }
/* 휴대폰 여러 대: --k는 오른쪽 맨 앞에서 몇 번째인지. 뒤쪽 폰은 왼쪽으로 비켜 조금 위에 둔다 */
.card-phone[style*="--k"] { width: 24%; right: calc(24px + var(--k) * 22%); bottom: calc(-48px + var(--k) * 24px); }
.card a:focus-visible { outline: 2px solid var(--fg); outline-offset: -6px; border-radius: 16px; }
.card-body { display: grid; gap: 8px; align-content: start; padding: 24px 24px 32px; border-top: 1px solid var(--rule); }
.card-meta { display: flex; justify-content: space-between; gap: 16px; font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--fg-3); }
.card-name { font-size: 30px; line-height: 36px; letter-spacing: -0.04em; margin-top: 8px; }
.card-name .hl { color: var(--accent); }
.card-name .sub { color: var(--fg-3); font-weight: 500; }
.card-what { font-size: 16px; line-height: 24px; color: var(--fg); font-weight: 500; }
.card-tags { font-size: 14px; line-height: 20px; color: var(--fg-2); }
@media (prefers-reduced-motion: reduce) { .card a:hover .card-shot, .card a:hover .card-phone { transform: none; } }

/* ───────── case (shared) ───────── */
.case { background: var(--bg); color: var(--fg); padding: 128px 0 96px; overflow: hidden; }
.case .hl { color: var(--accent); }
.case-title .sub { color: var(--fg-3); font-weight: 500; }
.case > * { max-width: var(--max); margin-left: auto; margin-right: auto; padding-left: var(--pad); padding-right: var(--pad); }
.case-head { display: grid; gap: 24px; }
.case-id { display: flex; align-items: center; gap: 16px; font-size: 14px; line-height: 20px; color: var(--fg-3); }
.case-back { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; margin-left: -8px; border-radius: 8px; font-weight: 600; color: var(--fg); transition: background-color .3s var(--ease); }
.case-back:hover { background: var(--rule); }
.case-n { font-family: var(--mono); font-size: 12px; order: 2; }
.case-id::after { content: ""; flex: 1; height: 1px; background: var(--rule); order: 1; }
.case-title { font-size: 60px; line-height: 1; letter-spacing: -0.05em; }
@media (min-width: 640px) { .case-title { font-size: 96px; } }
@media (min-width: 1100px) { .case-title { font-size: 128px; } }
.case-line { font-size: 20px; line-height: 28px; max-width: 680px; color: var(--fg); font-weight: 500; }
@media (min-width: 900px) { .case-line { font-size: 24px; line-height: 32px; } }
.case-meta { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.case-meta div { display: grid; grid-template-columns: 80px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.case-meta dt { font-size: 14px; line-height: 20px; color: var(--fg-3); font-weight: 600; }
.case-meta dd { font-size: 14px; line-height: 20px; color: var(--fg-2); }
.case-cta { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 1100px) {
  .case-head { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 64px; align-items: end; }
  .case-id { grid-column: 1 / -1; }
  .case-title { grid-column: 1 / -1; }
  .case-line { grid-column: 1; grid-row: 3; }
  .case-cta { grid-column: 1; grid-row: 4; }
  .case-meta { grid-column: 2; grid-row: 3 / span 2; align-self: end; }
}

.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 12px 24px; border-radius: 12px;
  font-size: 16px; line-height: 24px; font-weight: 600; border: 1px solid transparent;
  transition: background-color .3s var(--ease), color .3s var(--ease), transform .5s var(--ease), border-color .3s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn .ic { transition: transform .5s var(--ease); }
.btn:hover .ic { transform: translate(2px, -2px); }
.btn-solid { background: var(--solid); color: var(--on-solid); }
.btn-solid:hover { background: var(--solid-hover, var(--solid)); }
.btn-line { background: transparent; border-color: var(--fg); color: var(--fg); }
.btn-line:hover { background: var(--fg); color: var(--bg); }

/* stage: browser + phone */
.stage { position: relative; margin-top: 64px; padding-bottom: 48px; }
.browser { border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 40px 80px -32px rgba(0,0,0,.45); }
.browser-bar { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; background: #f1f0ed; border-bottom: 1px solid #e2e0db; color: #5f5f59; }
.browser-bar i { width: 12px; height: 12px; border-radius: 50%; background: #d6d3cd; }
.browser-bar i:nth-child(1) { background: #ff5f57; }
.browser-bar i:nth-child(2) { background: #febc2e; }
.browser-bar i:nth-child(3) { background: #28c840; }
.browser-bar a { margin: 0 auto; font-family: var(--mono); font-size: 12px; line-height: 16px; padding: 4px 12px; background: #fff; border-radius: 8px; transform: translateX(-26px); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background-color .3s var(--ease), color .3s var(--ease); }
.browser-bar a:hover { background: #111110; color: #fff; }
.browser-screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #fff; }
.browser-screen img { width: 100%; }
.browser[data-scroll] .browser-screen { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.25) transparent; }
.browser[data-scroll] .browser-screen:focus-visible { outline-offset: -4px; }
.browser-screen.is-static img { height: 100%; object-fit: cover; object-position: top left; }

/* Phone frame from real iPhone 15/16 specs (393×852pt display, 55pt display corner radius, 71.6mm body on a 65.1mm-wide
   screen): bezel = 4.54% of the phone width, screen corner = 13.99% of the screen width, outer corner = screen corner + bezel
   (concentric). Expressed in container units so every size (card 28%, float 128–280px, phones row) keeps the real shape —
   fixed px corners made small phones look over-rounded (2026-10-31 "폰프레임 라운드 너무 들어간거 아냐?").
   The bezel is the screen's own spread shadow, so it is always concentric with the screen corner. */
.phone, .card-phone { container-type: inline-size; }
.phone-screen { --bezel: 4.54cqw; position: relative; aspect-ratio: 390 / 844; overflow: hidden; margin: var(--bezel); border-radius: 12.72cqw; background: #fff;
  box-shadow: 0 0 0 var(--bezel) #0d0d0c, 0 32px 64px -24px rgba(0,0,0,.5); }
/* the dynamic island is part of the phone image (scripts/images.mjs, real iOS status bar) — not drawn again here */
.phone-screen img, .phone-screen video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone-float { position: absolute; right: 16px; bottom: 0; width: 128px; }
@media (min-width: 640px) { .phone-float { width: 200px; } }
@media (min-width: 1100px) {
  .stage { padding-right: 160px; padding-bottom: 64px; }
  .phone-float { width: 280px; right: var(--pad); }
}
.phone-float[style*="--k"] { right: calc(16px + var(--k) * 112px); bottom: calc(var(--k) * 24px); }
@media (min-width: 640px) { .phone-float[style*="--k"] { right: calc(16px + var(--k) * 176px); } }
@media (min-width: 1100px) { .phone-float[style*="--k"] { width: 248px; right: calc(var(--pad) + var(--k) * 224px); bottom: calc(var(--k) * 40px); } }
figcaption { font-size: 14px; line-height: 20px; color: var(--fg-2); font-weight: 600; }

/* facts */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 96px; border-top: 1px solid var(--fg); }
.facts div { padding: 24px 16px 0 0; display: grid; gap: 12px; align-content: start; }
.facts div:nth-child(n+3) { margin-top: 32px; }
.facts b { font-size: 48px; line-height: 1; font-weight: 700; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.facts small { font-size: 18px; letter-spacing: -0.01em; margin-left: 4px; font-weight: 600; color: var(--fg-2); }
.facts span { font-size: 14px; line-height: 20px; color: var(--fg-2); max-width: 260px; }
@media (min-width: 900px) {
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .facts div:nth-child(n+3) { margin-top: 0; }
  .facts div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
  .facts b { font-size: 72px; }
}

/* section heading inside case */
.case h3 { font-size: 30px; line-height: 36px; letter-spacing: -0.04em; }
@media (min-width: 900px) { .case h3 { font-size: 48px; line-height: 1.05; } }

/* ───────── blocks ───────── */
.case[data-dark] .phone-screen { box-shadow: 0 0 0 var(--bezel) #000, 0 0 0 calc(var(--bezel) + 1px) rgba(255,255,255,.1), 0 32px 64px -24px rgba(0,0,0,.7); }

/* flow */
.flow { margin-top: 96px; }
.flow-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.flow-nav { display: flex; gap: 8px; }
.flow-nav button { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--fg); background: transparent; font-size: 20px; transition: background-color .3s var(--ease), color .3s var(--ease); }
.flow-nav button:hover { background: var(--fg); color: var(--bg); }
.flow-nav button:disabled { opacity: .32; pointer-events: none; }
.flow-track { display: grid; grid-auto-flow: column; grid-auto-columns: min(84vw, 480px); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 16px; scrollbar-width: none; overscroll-behavior-x: contain; }
.flow-track::-webkit-scrollbar { display: none; }
.flow-track:focus-visible { outline-offset: 8px; }
.flow-track li { scroll-snap-align: start; display: grid; grid-template-columns: auto 1fr; gap: 12px 16px; align-content: start; }
.flow-track img { grid-column: 1 / -1; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; border-radius: 8px; background: #fff; margin-bottom: 12px; }
.flow-track b { font-family: var(--mono); font-weight: 500; font-size: 14px; line-height: 28px; color: var(--fg-3); }
.flow-track h4 { font-size: 20px; line-height: 28px; letter-spacing: -0.03em; }
.flow-track p { grid-column: 2; font-size: 16px; line-height: 24px; color: var(--fg-2); }

/* phones */
.phones { margin-top: 96px; display: grid; gap: 48px; }
.phones-head { display: grid; gap: 16px; max-width: 680px; }
.phones-head p { font-size: 18px; line-height: 28px; color: var(--fg-2); }
.phones-list { display: grid; grid-template-columns: repeat(var(--n), minmax(150px, 1fr)); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 16px; }
.phones-list li { scroll-snap-align: start; display: grid; gap: 16px; align-content: start; }
.phones-list p { display: flex; gap: 8px; font-size: 14px; line-height: 20px; color: var(--fg-2); font-weight: 600; }
.phones-list p b { font-family: var(--mono); font-weight: 500; font-size: 12px; color: var(--accent); }
.phones:not(:has(b)) .phones-list p { justify-content: center; text-align: center; }
.phones.is-stagger .phones-list li:nth-child(even) { transform: translateY(32px); }
.phones.is-stagger .phones-list { padding-bottom: 48px; }
@media (min-width: 1100px) {
  .phones.is-side { grid-template-columns: 360px minmax(0, 1fr); align-items: center; }
  .phones-list { overflow: visible; }
}

/* tabs */
.roles { margin-top: 96px; }
.roles-h { margin-bottom: 32px; }
.roles-tabs { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--rule); margin-bottom: 32px; }
.roles-tabs button { min-height: 44px; padding: 8px 24px; border: 0; border-radius: 8px; background: transparent; color: var(--fg-2); font-size: 16px; line-height: 24px; font-weight: 600; transition: background-color .3s var(--ease), color .3s var(--ease); }
.roles-tabs button:hover { color: var(--fg); }
.roles-tabs button[aria-selected="true"] { background: var(--tab); color: var(--on-tab); }
.roles-panel { display: grid; gap: 32px; }
.roles-panel[hidden] { display: none; }
.roles-panel .shot { border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--rule), 0 32px 64px -32px rgba(0,0,0,.4); }
.roles-panel .shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.roles-list { display: grid; border-top: 1px solid var(--rule); align-content: start; }
.roles-list li { padding: 16px 0; border-bottom: 1px solid var(--rule); color: var(--fg-2); font-size: 16px; line-height: 24px; }
.roles-list b { display: block; color: var(--fg); font-size: 18px; line-height: 28px; margin-bottom: 4px; }
@media (min-width: 1100px) { .roles-panel { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 48px; } }
@media (prefers-reduced-motion: no-preference) {
  .roles-panel:not([hidden]) { animation: panel-in .5s var(--ease); }
  @keyframes panel-in { from { opacity: 0; transform: translateY(8px); } }
}

/* spotlight */
.spot { margin-top: 96px; display: grid; gap: 32px; position: relative; }
.spot-copy { display: grid; gap: 32px; align-content: start; }
.spot-steps { counter-reset: s; border-top: 1px solid var(--rule); }
.spot-steps li { counter-increment: s; position: relative; padding: 16px 0 16px 40px; border-bottom: 1px solid var(--rule); color: var(--fg-2); }
.spot-steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 18px; font-family: var(--mono); font-size: 12px; line-height: 24px; color: var(--accent); }
.spot-steps b { display: block; color: var(--fg); font-size: 18px; line-height: 28px; margin-bottom: 4px; }
.spot-overlay { width: 200px; justify-self: end; margin-top: -96px; position: relative; z-index: 2; }
.spot-overlay img { border-radius: 16px; box-shadow: 0 0 0 8px #fff, 0 32px 64px -24px rgba(0,0,0,.4); aspect-ratio: 1; object-fit: cover; }
.spot-overlay figcaption { margin-top: 16px; text-align: center; }
@media (min-width: 1100px) {
  .spot { grid-template-columns: 360px minmax(0, 1fr); column-gap: 64px; }
  .spot .browser { grid-column: 2; grid-row: 1; }
  .spot-overlay { grid-column: 2; grid-row: 1; align-self: end; width: 280px; margin: 0 -32px -64px 0; }
}

/* app stage + card */
.stage-app { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 24px; max-width: calc(var(--n, 3) * 320px); padding-bottom: 0; }
.stage-app .phone:nth-child(2) { transform: translateY(32px); }
@media (min-width: 1100px) { .stage-app { gap: 48px; padding-right: var(--pad); } }
.card-art.is-app { display: flex; justify-content: center; align-items: flex-end; gap: 12px; padding: 32px 24px 0; }
.card-art.is-app .card-phone { position: static; width: 30%; margin-bottom: -48px; }
.card-art.is-app .card-phone:nth-child(2) { margin-bottom: -24px; }
.card a:hover .card-art.is-app .card-phone { transform: translateY(-12px); }

/* points */
.points { margin-top: 96px; }
.points h3 { margin-bottom: 32px; }
.points-list { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.points-list li { padding: 20px 0; border-bottom: 1px solid var(--rule); color: var(--fg-2); font-size: 16px; line-height: 24px; }
.points-list b { display: block; color: var(--fg); font-size: 18px; line-height: 28px; margin-bottom: 4px; }
@media (min-width: 900px) {
  .points-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
}

/* next project */
.next a { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: center; padding: 64px var(--pad); background: var(--bg); color: var(--fg); }
.next-label { font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--fg-3); grid-column: 1; }
.next-name { font-size: 48px; line-height: 1; font-weight: 700; letter-spacing: -0.05em; grid-column: 1; }
.next-name .hl { color: var(--accent); }
.next-name .sub { color: var(--fg-3); font-weight: 500; }
.next-what { font-size: 18px; line-height: 28px; color: var(--fg-2); grid-column: 1; }
.next-go { grid-column: 2; grid-row: 1 / span 3; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--fg); font-size: 24px; transition: transform .5s var(--ease), background-color .3s var(--ease), color .3s var(--ease); }
.next a:hover .next-go { transform: translateX(8px); background: var(--fg); color: var(--bg); }
@media (min-width: 900px) { .next-name { font-size: 96px; } .next a { padding-top: 96px; padding-bottom: 96px; } .next-go { width: 96px; height: 96px; font-size: 32px; } }
.next a > * { max-width: var(--max); }

/* ───────── process ───────── */
.process { background: #131209; color: #f4f3ee; padding: 96px var(--pad); }
.process > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.process-head { display: grid; gap: 24px; margin-bottom: 64px; }
.process-head h2 { font-size: 36px; line-height: 40px; letter-spacing: -0.04em; }
.process-head p { font-size: 18px; line-height: 28px; color: rgba(244,243,238,.76); max-width: 680px; }
@media (min-width: 900px) {
  .process-head { grid-template-columns: 1fr 1fr; align-items: end; }
  .process-head h2 { font-size: 60px; line-height: 1.05; }
}
.process-steps { display: grid; gap: 0; border-top: 1px solid rgba(244,243,238,.9); }
.process-steps li { display: grid; grid-template-columns: 48px 1fr; gap: 8px 16px; padding: 24px 0; border-bottom: 1px solid rgba(244,243,238,.16); }
.ps-n { grid-row: span 3; font-size: 30px; line-height: 36px; font-weight: 700; color: #f4f3ee; font-variant-numeric: tabular-nums; }
.process-steps h3 { font-size: 20px; line-height: 28px; letter-spacing: -0.03em; }
.process-steps p { font-size: 16px; line-height: 24px; color: rgba(244,243,238,.72); }
.ps-out { font-family: var(--mono); font-size: 12px; line-height: 16px; color: rgba(244,243,238,.56); margin-top: 8px; }
@media (min-width: 1100px) {
  .process-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 0; }
  .process-steps li { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr auto; padding: 24px 24px 0 0; border-bottom: 0; }
  .process-steps li + li { padding-left: 24px; border-left: 1px solid rgba(244,243,238,.16); }
  .ps-n { grid-row: auto; font-size: 60px; line-height: 1; margin-bottom: 24px; }
}

.pledges { display: grid; gap: 0; margin-top: 64px; border-top: 1px solid rgba(244,243,238,.9); }
.pledges li { display: grid; gap: 4px; padding: 24px 0; border-bottom: 1px solid rgba(244,243,238,.16); font-size: 16px; line-height: 24px; color: rgba(244,243,238,.72); }
.pledges b { font-size: 20px; line-height: 28px; color: #f4f3ee; }
@media (min-width: 900px) {
  .pledges { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 0; }
  .pledges li { border-bottom: 0; padding-right: 24px; }
  .pledges li + li { padding-left: 24px; border-left: 1px solid rgba(244,243,238,.16); }
}

/* ───────── about ───────── */
.about { max-width: var(--max); margin: 0 auto; padding: 96px var(--pad); display: grid; gap: 48px; }
.about-main { display: grid; gap: 24px; align-content: start; }
.about-main h2 { font-size: 36px; line-height: 40px; letter-spacing: -0.04em; }
.about-main p { font-size: 18px; line-height: 28px; color: var(--ink-2); max-width: 560px; }
.about-career { border-top: 1px solid var(--ink); }
.about-career div { display: grid; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.about-career dt { font-weight: 700; font-size: 18px; line-height: 28px; }
.about-career dd { color: var(--ink-2); font-size: 16px; line-height: 24px; }
.about-stack { display: grid; gap: 24px; }
.about-stack h3 { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--mute); margin-bottom: 8px; }
.about-stack ul { display: flex; flex-wrap: wrap; gap: 8px; }
.about-stack li { padding: 4px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink-2); }
@media (min-width: 900px) {
  .about { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); column-gap: 64px; }
  .about-main h2 { font-size: 60px; line-height: 1.05; }
  .about-career div { grid-template-columns: 160px 1fr; gap: 24px; }
  .about-stack { grid-column: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
}

/* ───────── ai compute ───────── */
.ai { background: var(--brand); color: #fff; padding: 96px var(--pad); }
.ai-inner { max-width: var(--max); margin: 0 auto; display: grid; gap: 32px; }
.ai-main { display: grid; gap: 24px; align-content: start; }
.ai-kicker { font-size: 18px; line-height: 28px; font-weight: 700; color: rgba(255,255,255,.86); }
.ai-main h2 { font-size: 36px; line-height: 40px; letter-spacing: -0.04em; }
.ai-side { display: grid; gap: 24px; align-content: end; }
.ai-side p { font-size: 18px; line-height: 28px; color: rgba(255,255,255,.88); max-width: 560px; }
.ai-side .ai-spec { padding-top: 16px; border-top: 1px solid rgba(255,255,255,.5); font-size: 14px; line-height: 20px; font-weight: 600; color: #fff; }
@media (min-width: 900px) {
  .ai-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 64px; align-items: end; }
  .ai-main h2 { font-size: 60px; line-height: 1.05; }
  .ai-kicker { font-size: 20px; }
}

/* ───────── closer (word-by-word reveal) ───────── */
.closer { max-width: var(--max); margin: 0 auto; padding: 96px var(--pad); border-top: 1px solid var(--line); display: grid; gap: 32px; }
.closer h2 { font-size: 48px; line-height: 1.05; letter-spacing: -0.05em; max-width: 1000px; }
.closer h2 span:not(.w) { color: var(--brand); }
@media (min-width: 640px) { .closer h2 { font-size: 72px; } }
@media (min-width: 1100px) { .closer h2 { font-size: 96px; line-height: 1.05; max-width: none; } }
.closer p { max-width: 560px; font-size: 18px; line-height: 28px; color: var(--ink-2); }
.closer .closer-lead { max-width: 680px; font-size: 24px; line-height: 32px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.closer .closer-lead + p { margin-top: -16px; font-size: 16px; line-height: 24px; color: var(--mute); }
.closer .w { opacity: .28; transition: opacity .6s var(--ease); }
.closer .w.on { opacity: 1; }

.foot { max-width: var(--max); margin: 0 auto; padding: 24px var(--pad) 48px; display: grid; gap: 8px; font-size: 14px; line-height: 20px; color: var(--mute); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .foot { grid-template-columns: auto 1fr; gap: 48px; } .foot span:last-child { text-align: right; } }

/* ───────── reveal (major blocks only) ───────── */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 0; transition: opacity .6s var(--ease); }
  .js [data-reveal].is-in { opacity: 1; }
}

/* ───────── 404 ───────── */
.nf { min-height: 100dvh; display: grid; place-content: center; gap: 24px; padding: var(--pad); }
.nf h1 { font-size: 72px; line-height: 1; letter-spacing: -0.05em; }
.nf p { font-size: 18px; line-height: 28px; color: var(--ink-2); max-width: 480px; }
