/* =========================================================
   Nodo Cero Lab — styles
   Tokens first. Change colors/type here, not in components.
   ========================================================= */
:root {
  --paper: #F3F1EC;
  --paper-2: #EAE7E0;
  --card: #FBFAF7;
  --ink: #121210;
  --ink-2: #3A3833;
  --muted: #66625A;           /* 5.3:1 on paper */
  --line: rgba(18, 18, 16, .12);
  --line-strong: rgba(18, 18, 16, .22);
  --accent: #FF5A1F;          /* graphics, large type, buttons with ink text */
  --accent-ink: #B83A0A;      /* accent for small text: 5.6:1 on paper */
  --live: #1E7F4A;
  --dev: #B86E00;
  --research: #4A56C8;

  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --f-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;

  --fs-display: clamp(3rem, 1.4rem + 7.2vw, 9.25rem);
  --fs-h2: clamp(2.25rem, 1.3rem + 3.8vw, 5rem);
  --fs-statement: clamp(2rem, 1.1rem + 3.6vw, 4.5rem);
  --fs-h3: clamp(1.375rem, 1.15rem + .8vw, 1.875rem);
  --fs-lede: clamp(1.125rem, 1.02rem + .45vw, 1.375rem);
  --fs-body: 1.0625rem;
  --fs-small: .875rem;
  --fs-label: .75rem;

  --gutter: clamp(1rem, .5rem + 2.4vw, 2.5rem);
  --max: 1360px;
  --section: clamp(5rem, 3rem + 6vw, 9rem);
  --radius: 18px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --z-header: 50;
  --z-menu: 60;
  --z-progress: 70;
  --z-skip: 100;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
strong { font-weight: 600; }
::selection { background: var(--accent); color: var(--ink); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 1rem; top: 1rem; z-index: var(--z-skip);
  padding: .75rem 1rem; background: var(--ink); color: var(--paper); border-radius: 10px;
  transform: translateY(-200%); transition: transform 200ms var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* paper grain, very light */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); position: relative; }

.section-index {
  font-family: var(--f-mono); font-size: var(--fs-label); letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 2rem;
}
.h2 {
  font-size: var(--fs-h2); font-weight: 500; line-height: 1.02; letter-spacing: -.045em;
  max-width: 16ch; text-wrap: balance;
}
.h2 em, .statement em, .hero-title em, .contact-title em { color: var(--ink-2); }
.lede { font-size: var(--fs-lede); line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
.lede.narrow { margin-top: 1.75rem; }

/* ---------- progress ---------- */
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: var(--z-progress); pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- buttons ---------- */
.btn {
  --h: 48px;
  position: relative; display: inline-flex; align-items: center; gap: .6rem;
  height: var(--h); padding: 0 1.4rem; border-radius: 999px;
  font-size: .9375rem; font-weight: 500; letter-spacing: -.01em; white-space: nowrap;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, transform 160ms var(--ease-out);
  touch-action: manipulation;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 250ms var(--ease-out); }
.btn-sm { --h: 40px; padding: 0 1.1rem; font-size: .875rem; }
.btn-lg { --h: 60px; padding: 0 1.9rem; font-size: 1.0625rem; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn-ink:hover { background: #2a2a26; }
  .btn-accent:hover { background: #ff7040; }
  .btn-ghost:hover { border-color: var(--ink); }
  .btn:hover svg { transform: translateX(3px); }
}

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: var(--z-header);
  transition: transform 400ms var(--ease-out), background-color 300ms ease, box-shadow 300ms ease;
}
.site-header.is-scrolled { background: rgba(243, 241, 236, .78); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 1px 0 var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.header-inner { display: flex; align-items: center; gap: 2rem; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 600; letter-spacing: -.03em; font-size: 1.125rem; }
.brand-mark { width: 30px; height: 30px; }
.mark-ring, .mark-slash { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; fill: none; }
.mark-node { fill: var(--accent); transform-box: fill-box; transform-origin: center; }
.brand-lab { font-family: var(--f-mono); font-weight: 400; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-left: .2rem; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: .25rem; }
.nav a {
  position: relative; display: inline-flex; align-items: center; height: 40px; padding: 0 .85rem;
  font-size: .9375rem; color: var(--ink-2); border-radius: 999px; transition: color 200ms ease, background-color 200ms ease;
}
.nav a.is-active { color: var(--ink); background: rgba(18, 18, 16, .06); }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--ink); } }
.menu-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line-strong); place-items: center; }
.menu-lines { display: grid; gap: 6px; width: 18px; }
.menu-lines i { display: block; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform 300ms var(--ease-out); }
.menu-toggle[aria-expanded="true"] .menu-lines i:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-lines i:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: var(--z-menu); background: var(--paper);
  padding: 96px var(--gutter) 2rem; display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; transform: translateY(-8px); transition: opacity 300ms var(--ease-out), transform 400ms var(--ease-drawer);
}
.mobile-menu[hidden] { display: none; } /* display:flex above would otherwise override [hidden] and block every click */
.mobile-menu.is-open { opacity: 1; transform: none; }
.mobile-menu a { display: block; font-size: clamp(2.25rem, 9vw, 3.5rem); font-weight: 500; letter-spacing: -.04em; line-height: 1.2; padding: .15rem 0; }
.mobile-mail { font-family: var(--f-mono); font-size: 1rem !important; letter-spacing: 0 !important; color: var(--accent-ink); }
body.menu-open .site-header { z-index: calc(var(--z-menu) + 1); background: transparent; box-shadow: none; backdrop-filter: none; }

@media (max-width: 960px) {
  .nav, .header-cta { display: none; }
  .menu-toggle { display: grid; }
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; padding: 140px 0 clamp(3rem, 6vw, 5.5rem); overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero::after { /* soft fade so text always reads over the network */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--paper) 0%, rgba(243,241,236,.86) 38%, rgba(243,241,236,0) 72%),
              linear-gradient(0deg, var(--paper) 0%, rgba(243,241,236,0) 30%);
}
.hero-inner { position: relative; z-index: 2; }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--f-mono); font-size: var(--fs-label); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 2rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(255, 90, 31, .5); animation: pulse 2.4s var(--ease-out) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,90,31,.45); } 70%, 100% { box-shadow: 0 0 0 10px rgba(255,90,31,0); } }
.hero-title { font-size: var(--fs-display); font-weight: 500; line-height: .92; letter-spacing: -.055em; max-width: 11ch; }
.hero-title em { letter-spacing: -.03em; }
.hero-lede { margin-top: 2rem; font-size: var(--fs-lede); line-height: 1.5; color: var(--ink-2); max-width: 44ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.5rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; margin-top: clamp(3rem, 7vw, 6rem); padding-top: 1.5rem; border-top: 1px solid var(--line); }
.hero-meta dt { font-family: var(--f-mono); font-size: var(--fs-label); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hero-meta dd { font-size: .9375rem; margin-top: .3rem; }
.scroll-cue { position: absolute; right: var(--gutter); bottom: clamp(3rem, 6vw, 5.5rem); z-index: 2; width: 44px; height: 68px; border: 1px solid var(--line-strong); border-radius: 999px; display: grid; justify-items: center; padding-top: 12px; }
.scroll-cue span { width: 3px; height: 10px; border-radius: 3px; background: var(--ink); animation: cue 1.8s var(--ease-in-out) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(26px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@media (max-width: 720px) { .scroll-cue { display: none; } .hero::after { background: linear-gradient(0deg, var(--paper) 10%, rgba(243,241,236,.82) 60%, rgba(243,241,236,.5)); } }

/* split-line masks */
.line-mask { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }

/* ---------- build ---------- */
.statement { font-size: var(--fs-statement); font-weight: 500; line-height: 1.05; letter-spacing: -.045em; max-width: 22ch; text-wrap: balance; }
.statement .word { display: inline-block; }
.build-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: clamp(4rem, 8vw, 7rem); }
.build-card { background: var(--paper); padding: clamp(1.75rem, 3vw, 2.75rem); display: flex; flex-direction: column; gap: 1rem; min-height: 320px; }
.build-num { font-family: var(--f-mono); font-size: var(--fs-label); width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; margin-bottom: auto; }
.build-card h3 { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -.03em; margin-top: 2.5rem; }
.build-card p { color: var(--ink-2); }
@media (max-width: 900px) { .build-grid { grid-template-columns: 1fr; } .build-card { min-height: 0; } }

/* ---------- work (horizontal) ---------- */
.work { padding-top: var(--section); background: var(--ink); color: var(--paper); position: relative; z-index: 2; border-radius: 28px 28px 0 0; }
.work .section-index { color: rgba(243,241,236,.6); }
.work .h2 em { color: rgba(243,241,236,.72); }
.work-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem; margin-bottom: clamp(3rem, 5vw, 4.5rem); }
.work-head .section-index { grid-column: 1 / -1; margin-bottom: 0; }
.work-hint { font-family: var(--f-mono); font-size: var(--fs-label); letter-spacing: .08em; text-transform: uppercase; color: rgba(243,241,236,.6); }
.work-hint span { display: inline-block; animation: nudge 1.6s var(--ease-in-out) infinite; }
@keyframes nudge { 50% { transform: translateX(6px); } }
.work-viewport { padding-bottom: var(--section); }
.work-track { display: flex; gap: clamp(1rem, 2vw, 1.5rem); padding-inline: var(--gutter); width: max-content; }
.project {
  width: min(78vw, 1040px); flex: none; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 3vw, 3rem);
  background: #1C1C19; border: 1px solid rgba(243,241,236,.1); border-radius: 24px; padding: clamp(1.25rem, 2vw, 1.75rem);
}
.project-visual { position: relative; border-radius: 16px; overflow: hidden; min-height: 420px; background: #262622; }
.project-body { display: flex; flex-direction: column; padding: clamp(.5rem, 1.5vw, 1.25rem) clamp(.25rem, 1vw, 1rem) clamp(.5rem, 1vw, 1rem) 0; }
.project h3 { font-size: clamp(2rem, 1.4rem + 2vw, 3.25rem); font-weight: 500; letter-spacing: -.045em; line-height: 1; margin: 1.25rem 0 1.25rem; }
.project-body > p:not(.status) { color: rgba(243,241,236,.74); font-size: 1rem; }
.status { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--f-mono); font-size: var(--fs-label); letter-spacing: .08em; text-transform: uppercase; color: rgba(243,241,236,.82); }
.status span { width: 8px; height: 8px; border-radius: 50%; }
.status-live span { background: #3DDC84; }
.status-dev span { background: #FFB020; }
.status-research span { background: #8C96FF; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: 2rem; }
.tags li { font-size: .8125rem; padding: .35rem .8rem; border-radius: 999px; border: 1px solid rgba(243,241,236,.16); color: rgba(243,241,236,.82); }

@media (max-width: 1023px) {
  .work-track { flex-direction: column; width: auto; }
  .project { width: auto; grid-template-columns: 1fr; }
  .project-visual { min-height: 300px; }
  .project-body { padding: .25rem .25rem 1rem; }
  .work-hint { display: none; }
}

/* viz: ACP */
.visual-acp { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; background: radial-gradient(120% 90% at 0% 0%, #34342e 0%, #22221f 60%); }
.acp-top { display: flex; align-items: center; gap: .6rem; font-family: var(--f-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(243,241,236,.7); }
.acp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.acp-count { margin-left: auto; color: rgba(243,241,236,.9); }
.acp-count b { font-weight: 500; font-variant-numeric: tabular-nums; }
.acp-lines { display: grid; gap: .55rem; }
.acp-lines li { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; border-radius: 12px; background: rgba(243,241,236,.05); border: 1px solid rgba(243,241,236,.08); font-size: .9375rem; color: rgba(243,241,236,.86); transition: background-color 300ms ease, border-color 300ms ease; }
.acp-lines li i { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(243,241,236,.3); position: relative; transition: background-color 250ms ease, border-color 250ms ease; }
.acp-lines li i::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(.6); opacity: 0; transition: opacity 200ms ease, transform 300ms var(--ease-out); }
.acp-lines li.is-done i { background: #3DDC84; border-color: #3DDC84; }
.acp-lines li.is-done i::after { opacity: 1; transform: rotate(45deg) scale(1); }
.acp-lines li.is-working { border-color: rgba(255,90,31,.55); background: rgba(255,90,31,.08); }
.acp-lines li.is-working i { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.acp-lines em { margin-left: auto; font-family: var(--f-mono); font-style: normal; font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(243,241,236,.55); }
.acp-bar { margin-top: auto; height: 4px; border-radius: 4px; background: rgba(243,241,236,.1); overflow: hidden; }
.acp-bar span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); transition: transform 600ms var(--ease-out); }

/* viz: voice */
.visual-voice { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2.5rem; padding: 2rem; background: radial-gradient(80% 70% at 50% 45%, rgba(255,90,31,.22), transparent 70%), #22221f; }
.wave { display: flex; align-items: center; gap: 6px; height: 140px; }
.wave span { width: 6px; height: 100%; border-radius: 6px; background: var(--paper); transform: scaleY(.12); transform-origin: center; }
.is-playing .wave span { animation: bar 1.1s var(--ease-in-out) infinite; }
.wave span:nth-child(3n) { animation-duration: .9s !important; }
.wave span:nth-child(4n) { animation-duration: 1.3s !important; }
.wave span:nth-child(5n+1) { background: var(--accent); }
@keyframes bar { 0%, 100% { transform: scaleY(.12); } 50% { transform: scaleY(var(--amp, .8)); } }
.voice-line { display: flex; align-items: baseline; gap: .8rem; font-size: 1.125rem; color: var(--paper); min-height: 1.6em; }
.voice-who { font-family: var(--f-mono); font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(243,241,236,.55); }
.voice-text::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 3px; background: var(--accent); vertical-align: -.2em; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* viz: photo compare */
.visual-photo { background: #22221f; }
.compare { position: absolute; inset: 0; --pos: 50%; touch-action: pan-y; }
.scene { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(180deg, #F7B27A 0%, #F48A5B 38%, #C9566B 62%, #4E2F5E 100%); }
.scene .sun { position: absolute; left: 58%; top: 26%; width: 22%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #FFF2C8 0%, #FFD38A 55%, rgba(255,211,138,0) 72%); }
.scene .hill { position: absolute; left: -10%; right: -10%; border-radius: 50% 50% 0 0; }
.scene .h1 { bottom: -18%; height: 62%; background: #7A3A5E; left: -30%; right: 30%; }
.scene .h2 { bottom: -26%; height: 58%; background: #4A2448; left: 20%; right: -40%; }
.scene .h3 { bottom: -34%; height: 52%; background: #241326; }
.scene-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); filter: grayscale(.55) contrast(.72) brightness(.92) saturate(.6); }
.compare-label { position: absolute; top: 1rem; font-family: var(--f-mono); font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; padding: .35rem .6rem; border-radius: 999px; background: rgba(18,18,16,.55); color: var(--paper); backdrop-filter: blur(6px); }
.l-before { left: 1rem; } .l-after { right: 1rem; }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--paper); pointer-events: none; }
.compare-handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: var(--paper); box-shadow: 0 6px 24px rgba(0,0,0,.25); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121210' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 7l-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E"); background-size: 22px; background-repeat: no-repeat; background-position: center; }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare-range:focus-visible + * , .compare:has(.compare-range:focus-visible) .compare-handle::after { outline: 2px solid var(--accent); outline-offset: 3px; }

/* viz: website factory */
.visual-web { display: grid; place-items: center; padding: 2rem; background: repeating-linear-gradient(0deg, transparent 0 23px, rgba(243,241,236,.05) 23px 24px), repeating-linear-gradient(90deg, transparent 0 23px, rgba(243,241,236,.05) 23px 24px), #22221f; }
.wf { width: min(100%, 420px); background: var(--paper); border-radius: 12px; padding: .9rem; display: grid; gap: .7rem; box-shadow: 0 30px 60px rgba(0,0,0,.35); }
.wf > * { will-change: transform; }
.wf-bar { display: flex; gap: 5px; }
.wf-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--paper-2); }
.wf-hero { display: grid; gap: .45rem; padding: 1.2rem; border-radius: 8px; background: var(--paper-2); }
.wf-hero b { height: 12px; border-radius: 4px; background: var(--ink); }
.wf-hero b.short { width: 45%; height: 22px; background: var(--accent); border-radius: 999px; margin-top: .4rem; }
.wf-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.wf-row.two { grid-template-columns: 2fr 1fr; }
.wf-row span { height: 64px; border-radius: 8px; background: var(--paper-2); border: 1px solid var(--line); }

/* ---------- problem ---------- */
.problem { background: var(--paper); }
.problem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem, 6vw, 6rem); align-items: start; }
.problem-intro { position: sticky; top: 120px; }
.problem-intro .lede { margin-top: 2rem; }
.who { margin-top: 2.5rem; display: grid; gap: 1.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.who dt { font-family: var(--f-mono); font-size: var(--fs-label); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.who dd { margin-top: .4rem; color: var(--ink-2); max-width: 46ch; }
.stack { display: grid; gap: 1.25rem; }
.stack-card {
  position: sticky; top: calc(120px + var(--i, 0) * 22px);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.75rem); min-height: 340px; display: flex; flex-direction: column;
  box-shadow: 0 1px 0 rgba(18,18,16,.04), 0 30px 60px -40px rgba(18,18,16,.25);
  transform-origin: 50% 0;
}
.stack-card:nth-child(1) { --i: 0; } .stack-card:nth-child(2) { --i: 1; } .stack-card:nth-child(3) { --i: 2; }
.stack-num { font-family: var(--f-serif); font-style: italic; font-size: clamp(4rem, 3rem + 3vw, 6.5rem); line-height: .8; color: var(--accent); }
.stack-card h3 { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; margin-top: auto; padding-top: 3rem; max-width: 20ch; }
.stack-card p { margin-top: .9rem; color: var(--ink-2); max-width: 40ch; }
@media (max-width: 900px) {
  .problem-grid { grid-template-columns: 1fr; }
  .problem-intro { position: static; }
  .stack-card { min-height: 0; position: relative; top: auto; }
}

/* ---------- solution ---------- */
.solution { background: var(--paper-2); }
.flow-wrap { position: relative; margin-top: clamp(4rem, 7vw, 6rem); }
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; }
.flow-rail { position: absolute; left: 0; right: 0; top: 8px; height: 2px; background: var(--line-strong); }
.flow-rail span { position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--p, 1)); }
.flow-step { position: relative; padding-top: 2.75rem; }
.flow-dot { position: absolute; top: 0; left: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--paper-2); border: 2px solid var(--line-strong); transition: background-color 300ms ease, border-color 300ms ease, transform 400ms var(--ease-out); }
.flow-step.is-lit .flow-dot { background: var(--accent); border-color: var(--accent); transform: scale(1.15); }
.flow-k { font-family: var(--f-mono); font-size: var(--fs-label); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; transition: color 300ms ease; }
.flow-step.is-lit .flow-k { color: var(--ink); }
.flow-step p:last-child { color: var(--ink-2); font-size: 1rem; }
@media (max-width: 960px) {
  .flow { grid-template-columns: 1fr; gap: 2rem; padding-left: 2.25rem; }
  .flow-rail { left: 8px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .flow-rail span { transform-origin: 50% 0; transform: scaleY(var(--p, 1)); }
  .flow-step { padding-top: 0; }
  .flow-dot { left: -2.25rem; }
}
.caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: clamp(4rem, 7vw, 6rem); }
.cap { background: var(--paper-2); padding: 2rem; transition: background-color 300ms ease; }
.cap h3 { font-size: 1.1875rem; font-weight: 500; letter-spacing: -.02em; }
.cap p { margin-top: .6rem; color: var(--ink-2); font-size: 1rem; }
@media (hover: hover) and (pointer: fine) { .cap:hover { background: var(--card); } }
@media (max-width: 900px) { .caps { grid-template-columns: 1fr; } }

/* ---------- tech ---------- */
.models { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: clamp(3.5rem, 6vw, 5rem); perspective: 1000px; }
.model { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; min-height: 280px; display: flex; flex-direction: column; transform-style: preserve-3d; will-change: transform; }
.model-tag { font-family: var(--f-mono); font-size: var(--fs-label); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.model h3 { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: clamp(3rem, 2rem + 3vw, 4.75rem); line-height: 1; letter-spacing: -.02em; margin-top: auto; }
.model p:last-child { margin-top: .75rem; color: var(--ink-2); font-size: 1rem; }
.tech-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 5vw, 5rem); margin-top: clamp(4rem, 7vw, 6rem); }
.badge { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--f-mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; padding: .45rem .85rem; border-radius: 999px; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-now { color: var(--live); background: rgba(30,127,74,.1); }
.badge-planned { color: var(--ink-2); border: 1px dashed var(--line-strong); }
.badge-planned::before { background: transparent; border: 1.5px solid currentColor; }
.ticks { margin-top: 1.75rem; display: grid; border-top: 1px solid var(--line); }
.ticks li { position: relative; padding: 1rem 0 1rem 2rem; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 1.45rem; width: 12px; height: 7px; border: solid var(--live); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.ticks.planned li::before { width: 10px; height: 10px; top: 1.4rem; border: 1.5px dashed var(--muted); border-radius: 50%; transform: none; }
.fineprint { margin-top: 3rem; font-size: var(--fs-small); color: var(--muted); max-width: 70ch; }
@media (max-width: 900px) { .models, .tech-cols { grid-template-columns: 1fr; } .model { min-height: 220px; } }

/* ---------- stage ---------- */
.stage { background: var(--paper); }
.meter { margin-top: clamp(3.5rem, 6vw, 5rem); }
.meter-track { position: relative; height: 6px; border-radius: 6px; background: var(--paper-2); overflow: hidden; }
.meter-fill { position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink), var(--accent)); transform-origin: 0 50%; transform: scaleX(.375); }
.meter-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-top: 1rem; font-family: var(--f-mono); font-size: var(--fs-label); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.meter-labels li.is-current { color: var(--accent-ink); font-weight: 500; }
.stage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 4vw, 4rem); margin-top: clamp(3.5rem, 6vw, 5rem); }
.stage-col h3 { font-size: 1.25rem; font-weight: 500; letter-spacing: -.02em; padding-bottom: 1rem; border-bottom: 1px solid var(--ink); }
.list li { padding: .85rem 0; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 1rem; }
@media (max-width: 900px) { .stage-grid { grid-template-columns: 1fr; } .meter-labels { font-size: .6875rem; } }

/* ---------- roadmap ---------- */
.roadmap { background: var(--ink); color: var(--paper); }
.roadmap .section-index { color: rgba(243,241,236,.6); }
.roadmap .h2 em { color: rgba(243,241,236,.72); }
.road { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); margin-top: clamp(4rem, 7vw, 6rem); padding-top: 3rem; }
.road::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 2px; background: rgba(243,241,236,.16); }
.road::after { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--road, 1)); }
.road-step { position: relative; }
.road-dot { position: absolute; top: calc(-3rem + 0px); left: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); border: 2px solid rgba(243,241,236,.4); z-index: 1; }
.road-step.is-now .road-dot { background: var(--accent); border-color: var(--accent); animation: ring 2.4s var(--ease-out) infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(255,90,31,.5); } 70%, 100% { box-shadow: 0 0 0 14px rgba(255,90,31,0); } }
.road-when { font-family: var(--f-mono); font-size: var(--fs-label); letter-spacing: .08em; text-transform: uppercase; color: rgba(243,241,236,.6); }
.road-step.is-now .road-when { color: var(--accent); }
.road-step h3 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); font-weight: 500; letter-spacing: -.04em; margin: .9rem 0 .9rem; }
.road-step p:last-child { color: rgba(243,241,236,.72); max-width: 36ch; }
@media (max-width: 900px) {
  .road { grid-template-columns: 1fr; padding-top: 0; padding-left: 2.25rem; gap: 3rem; }
  .road::before, .road::after { left: 8px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; transform-origin: 50% 0; transform: scaleY(var(--road, 1)); }
  .road-dot { top: .1rem; left: -2.25rem; }
}

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(3rem, 6vw, 7rem); align-items: start; }
.about-quote { font-size: clamp(2rem, 1.2rem + 3vw, 4rem); font-weight: 500; line-height: 1.06; letter-spacing: -.04em; text-wrap: balance; }
.about-quote em { color: var(--accent-ink); }
.about-quote .word { display: inline-block; }
.about-body { padding-top: 3.25rem; }
.mv { margin-top: 2.5rem; display: grid; }
.mv > div { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; padding: 1.25rem 0; border-top: 1px solid var(--line); }
.mv dt { font-family: var(--f-mono); font-size: var(--fs-label); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: .3rem; }
.mv dd { color: var(--ink); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } .about-body { padding-top: 0; } .mv > div { grid-template-columns: 1fr; gap: .3rem; } }

/* ---------- contact ---------- */
.contact { background: var(--paper-2); text-align: center; }
.contact .section-index { margin-inline: auto; }
.contact-title { font-size: var(--fs-h2); font-weight: 500; line-height: 1.02; letter-spacing: -.045em; max-width: 18ch; margin-inline: auto; text-wrap: balance; }
.contact-mail {
  display: inline-block; margin-top: 2.5rem; font-family: var(--f-serif); font-style: italic;
  font-size: clamp(2rem, 1rem + 5vw, 5.5rem); letter-spacing: -.02em; line-height: 1.1; color: var(--ink);
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 3px no-repeat;
  transition: background-size 500ms var(--ease-out);
  overflow-wrap: anywhere;
}
@media (hover: hover) and (pointer: fine) { .contact-mail:hover { background-size: 100% 3px; } }
.contact-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .75rem; margin-top: 3rem; }
.toast {
  position: fixed; left: 50%; bottom: 2rem; z-index: var(--z-progress);
  padding: .8rem 1.2rem; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: .9375rem;
  transform: translate(-50%, 140%); opacity: 0; pointer-events: none;
  transition: transform 300ms var(--ease-out), opacity 200ms ease;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding: clamp(4rem, 7vw, 6rem) 0 2rem; overflow: hidden; }
.footer-top { display: flex; justify-content: space-between; gap: 3rem; flex-wrap: wrap; }
.footer-brand { font-size: 1.5rem; font-weight: 500; letter-spacing: -.03em; }
.footer-sub { color: rgba(243,241,236,.6); margin-top: .3rem; font-size: var(--fs-small); }
.footer-mail { display: inline-block; margin-top: 1.25rem; font-family: var(--f-mono); color: var(--accent); }
.footer-nav { display: grid; grid-template-columns: repeat(2, auto); gap: .35rem 3rem; }
.footer-nav a { display: inline-block; padding: .3rem 0; color: rgba(243,241,236,.78); transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .footer-nav a:hover { color: var(--paper); } }
.footer-word { font-size: clamp(3rem, 18vw, 17rem); font-weight: 500; letter-spacing: -.06em; line-height: .85; margin: clamp(3rem, 7vw, 6rem) 0 2rem; white-space: nowrap; color: var(--paper); }
.footer-word .char { display: inline-block; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.5rem; border-top: 1px solid rgba(243,241,236,.14); font-size: var(--fs-small); color: rgba(243,241,236,.6); }
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- reveal initial states (only when JS + motion are on) ---------- */
.js.motion [data-reveal] { opacity: 0; transform: translateY(28px); }
.js.motion [data-hero-fade] { opacity: 0; transform: translateY(20px); }
.js.motion .hero-canvas { opacity: 0; }
.js.motion [data-split-hero] { visibility: hidden; }
.js.motion .brand-mark .mark-ring, .js.motion .brand-mark .mark-slash { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js.motion .brand-mark .mark-node { opacity: 0; }

/* horizontal projects, desktop + motion only (class set by JS) */
.work.is-h { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 88px; padding-bottom: 2rem; }
.work.is-h .work-head { margin-bottom: clamp(1.5rem, 3vh, 2.5rem); }
.work.is-h .work-head .h2 { font-size: clamp(2rem, 1rem + 3.2vw, 4rem); }
.work.is-h .work-viewport { padding-bottom: 0; }
.work.is-h .project-visual { min-height: clamp(300px, 50vh, 480px); }
.work.is-h .project { will-change: transform; }

/* ---------- legal page ---------- */
.legal { padding: 160px 0 var(--section); }
.legal h1 { font-size: var(--fs-h2); font-weight: 500; letter-spacing: -.045em; line-height: 1; }
.legal h2 { font-size: 1.375rem; font-weight: 500; letter-spacing: -.02em; margin-top: 3rem; }
.legal p, .legal li { color: var(--ink-2); max-width: 68ch; margin-top: 1rem; }
.legal a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .stack-card { position: relative; top: auto; }
}
