/* ============================================================
   dydxfx — Benchmarking & performance studio
   Dark-first cinematic · Coral on warm near-black · Space Grotesk
   (Re-skin of the warm-editorial base: same layout & motion,
    token values flipped light→dark, coral emphasis brightened.)
   ============================================================ */

:root {
  /* Brand — coral is the only saturated color */
  --coral:        #cc785c;
  --coral-light:  #d88e70;   /* emphasis / hover on dark */
  --coral-active: #a9583e;   /* pressed */
  --coral-soft:   rgba(204, 120, 92, 0.14);
  --teal:         #5db8a6;
  --amber:        #e8a55a;
  --on-coral:     #1c0f09;   /* dark ink for text on coral fills (≈8:1) */

  /* Warm near-blacks → page canvas & surfaces */
  --paper:    #0a0908;   /* base canvas */
  --paper-2:  #131110;   /* elevated band (approach / team) */
  --paper-3:  #1a1714;   /* card lift */
  --ink:      #f8f4ed;   /* primary text (cream) */
  --ink-2:    #b6ab9b;   /* secondary text */
  --ink-3:    #877d70;   /* muted text */
  --hairline: rgba(248, 244, 237, 0.09);
  --hairline-strong: rgba(248, 244, 237, 0.20);

  /* Deepest surfaces — hero / contact (glows carry them) */
  --dark:     #0a0908;
  --dark-2:   #131110;
  --on-dark:  #f8f4ed;
  --on-dark-2:#b6ab9b;
  --hairline-dark: rgba(248, 244, 237, 0.13);

  /* Mono eyebrow / section-index accent */
  --caramel:  #e0a15c;   /* warm amber, reads well on dark */

  /* Type */
  --font-display: "Space Grotesk", "Hanken Grotesk", system-ui, sans-serif;
  --font-body:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Fluid type scale (≥1.25 steps) */
  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1.0625rem, 1.02rem + 0.22vw, 1.2rem);
  --step-1:  clamp(1.33rem, 1.24rem + 0.45vw, 1.6rem);
  --step-2:  clamp(1.7rem, 1.5rem + 1vw, 2.4rem);
  --step-3:  clamp(2.2rem, 1.8rem + 2vw, 3.4rem);
  --step-4:  clamp(2.9rem, 2.2rem + 3.4vw, 5rem);
  --step-5:  clamp(2.85rem, 1.95rem + 4.05vw, 6rem);

  /* Space */
  --gutter: clamp(1.25rem, 1rem + 3vw, 5rem);
  --section-y: clamp(5rem, 3.5rem + 8vw, 11rem);
  --maxw: 84rem;

  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ───────────────────────── Reset / base ───────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.04; letter-spacing: -0.02em; text-wrap: balance; }
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }
:focus-visible { outline: 2.5px solid var(--coral); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--coral-soft); color: var(--coral-light); }

.visually-hidden {
  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; top: 0.75rem; left: 0.75rem; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 0.6rem 1rem;
  border-radius: 8px; font-size: var(--step--1); font-weight: 600;
  transform: translateY(-150%); transition: transform 0.25s var(--ease-expo);
}
.skip-link:focus { transform: translateY(0); }

/* ───────────────────────── Shared atoms ───────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: var(--step--1);
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-2);
  font-weight: 500;
}
.eyebrow--ondark { color: var(--on-dark-2); }

.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal); position: relative; flex: none;
}
.status-dot::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1.5px solid var(--teal); opacity: 0; animation: pulse 2.6s var(--ease-quart) infinite;
}
@keyframes pulse {
  0%   { opacity: 0.7; transform: scale(0.6); }
  70%  { opacity: 0; transform: scale(1.6); }
  100% { opacity: 0; transform: scale(1.6); }
}

.section-index {
  font-family: var(--font-mono); font-size: var(--step--1);
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--caramel);
  font-weight: 500;
}

.section-title { font-size: var(--step-3); max-width: 20ch; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-body); font-weight: 600; font-size: var(--step-0);
  padding: 0.85rem 1.4rem; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: background 0.4s var(--ease-expo),
    color 0.4s var(--ease-expo), transform 0.4s var(--ease-expo),
    border-color 0.4s var(--ease-expo), box-shadow 0.4s var(--ease-expo);
  will-change: transform;
}
.btn__arrow { width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.4s var(--ease-expo); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* Dark ink on coral (≈8:1) reads at every size. Hover keeps the coral fill,
   lifts, and grows a warm glow; press = coral-active. */
.btn--primary { background: var(--coral); color: var(--on-coral); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -14px rgba(204, 120, 92, 0.7); }
.btn--primary:active { background: var(--coral-active); color: var(--on-coral); transform: translateY(0); box-shadow: none; }
.btn--primary .btn__arrow { stroke-width: 2.25; }

.btn--ghost { border-color: var(--hairline-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn--ondark { border-color: var(--hairline-dark); color: var(--on-dark); }
.btn--ondark:hover { border-color: var(--on-dark); background: rgba(248, 244, 237, 0.06); }

.btn--lg { padding: 1.05rem 1.8rem; font-size: var(--step-1); }

/* ───────────────────────── Header ───────────────────────── */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(1rem, 0.7rem + 1vw, 1.6rem) var(--gutter);
  color: var(--on-dark);
  transition: background 0.5s var(--ease-expo), backdrop-filter 0.5s var(--ease-expo), border-color 0.5s var(--ease-expo);
  border-bottom: 1px solid transparent;
}
/* Solidifies into a blurred near-black bar once scrolled. */
.site-header[data-stuck] {
  background: rgba(10, 9, 8, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--hairline);
  color: var(--on-dark);
}

.wordmark { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 600; font-size: var(--step-0); letter-spacing: -0.01em; }
.wordmark__mark {
  width: 1.05rem; height: 1.05rem; border-radius: 4px; flex: none;
  background: var(--coral);
  box-shadow: 0 0 18px -2px rgba(204, 120, 92, 0.55);
  transition: transform 0.5s var(--ease-expo);
}
.wordmark:hover .wordmark__mark { transform: rotate(45deg); }

/* Wordmark logotype — the dy/dx·fx math mark (mono, coral operators, italic variables) */
.logo-type { font-family: var(--font-mono); font-weight: 600; font-size: 0.94em; letter-spacing: 0.01em; }
.logo-type .v { font-style: italic; }
.logo-type .op { color: var(--coral); font-style: normal; padding: 0 0.03em; }

.site-nav { display: flex; align-items: center; gap: clamp(1rem, 0.5rem + 1.4vw, 2.2rem); font-size: var(--step--1); font-weight: 500; }
.site-nav a:not(.site-nav__cta) { position: relative; padding: 0.3rem 0; opacity: 0.85; transition: opacity 0.3s; }
.site-nav a:not(.site-nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s var(--ease-expo);
}
.site-nav a:not(.site-nav__cta):hover { opacity: 1; }
.site-nav a:not(.site-nav__cta):hover::after { transform: scaleX(1); }
.site-nav__cta {
  border: 1.5px solid currentColor; border-radius: 999px; padding: 0.5rem 1.1rem;
  opacity: 0.9; transition: background 0.4s var(--ease-expo), color 0.4s var(--ease-expo), border-color 0.4s var(--ease-expo), opacity 0.3s;
}
.site-nav__cta:hover { background: var(--coral); border-color: var(--coral); color: var(--on-coral); opacity: 1; }
@media (max-width: 640px) {
  .site-nav a:not(.site-nav__cta):not(.site-nav__cta) { display: none; }
  .site-nav a { display: none; }
  .site-nav__cta { display: inline-flex; }
}

/* ───────────────────────── Hero ───────────────────────── */
.hero {
  position: relative; min-height: 100svh; background: var(--dark); color: var(--on-dark);
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(4rem, 2.8rem + 1.6vw, 5.5rem) var(--gutter) clamp(2.2rem, 1.6rem + 2.5vw, 3.6rem);
  overflow: hidden; isolation: isolate;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; opacity: 0; transition: opacity 1.2s var(--ease-expo); }
.hero__canvas[data-ready] { opacity: 1; }
/* Fallback warm field when WebGL is off */
.hero__veil {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 78% 22%, rgba(204, 120, 92, 0.34) 0%, transparent 55%),
    radial-gradient(90% 80% at 88% 78%, rgba(232, 165, 90, 0.16) 0%, transparent 50%),
    linear-gradient(160deg, transparent 42%, rgba(10, 9, 8, 0.9) 100%);
}
.hero__inner { max-width: 56rem; }
.eyebrow { margin-bottom: clamp(1.1rem, 0.8rem + 1.5vw, 2rem); }

.hero__title {
  font-size: var(--step-5); font-weight: 600; max-width: 16ch;
  line-height: 1.0; letter-spacing: -0.035em;
}
.hero__sub {
  margin-top: clamp(1.2rem, 0.9rem + 1.4vw, 1.9rem);
  max-width: 48ch; color: var(--on-dark-2); font-size: var(--step-1); line-height: 1.5;
}
.hero__sub .accent { color: var(--ink); font-weight: 500; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: clamp(1.6rem, 1.1rem + 1.6vw, 2.4rem); }

.hero__scroll {
  position: absolute; bottom: clamp(1.5rem, 1rem + 2vw, 2.6rem); left: var(--gutter);
  display: flex; align-items: center; gap: 0.8rem;
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--on-dark-2);
}
.hero__scroll-line { width: 3.5rem; height: 1px; background: var(--hairline-strong); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--coral); animation: scrollSlide 2.4s var(--ease-quart) infinite; }
@keyframes scrollSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(280%); } }

/* ───────────────────────── Positioning statement ───────────────────────── */
.statement {
  padding: var(--section-y) var(--gutter);
  max-width: var(--maxw); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1fr);
  column-gap: clamp(2rem, 1rem + 4vw, 5rem); row-gap: clamp(1.6rem, 1rem + 2vw, 2.8rem);
}
.statement .section-index { grid-column: 1 / -1; }
.statement__text {
  font-family: var(--font-display); font-weight: 450; letter-spacing: -0.018em;
  font-size: var(--step-3); line-height: 1.16; max-width: 24ch;
  text-wrap: balance;
}
.statement__text em { font-style: normal; color: var(--coral); font-weight: 600; }
.statement__meta { max-width: 36ch; color: var(--ink-2); font-size: var(--step-0); }
.statement__meta .mono { font-family: var(--font-mono); color: var(--caramel); font-size: 0.9em; }
@media (min-width: 900px) {
  .statement { grid-template-columns: 1.55fr 1fr; align-items: end; }
  .statement__meta { padding-bottom: 0.4rem; }
}

/* ───────────────────────── Work ───────────────────────── */
.work { padding: var(--section-y) var(--gutter); max-width: var(--maxw); margin-inline: auto; }
.work__head { display: flex; flex-direction: column; gap: 1rem; margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.work__list { list-style: none; padding: 0; border-top: 1px solid var(--hairline); }

.work-row { border-bottom: 1px solid var(--hairline); position: relative; }
.work-row__trigger {
  width: 100%; background: none; border: 0; cursor: pointer; text-align: left;
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: baseline;
  gap: clamp(0.8rem, 0.4rem + 1.5vw, 2.5rem);
  padding: clamp(1.4rem, 1rem + 1.6vw, 2.4rem) 0.25rem;
  color: var(--ink); font-family: inherit;
  transition: padding-inline 0.5s var(--ease-expo);
}
.work-row__index {
  font-family: var(--font-mono); font-size: var(--step--1); color: var(--ink-3);
  font-weight: 500;
}
.work-row__title {
  font-family: var(--font-display); font-size: var(--step-2); font-weight: 550;
  letter-spacing: -0.02em; line-height: 1.08; transition: color 0.4s var(--ease-expo);
  grid-column: 2;
}
.work-row__title .num { color: var(--coral); font-family: var(--font-mono); font-weight: 500; font-size: 0.86em; }
.work-row__meta {
  grid-column: 3; text-align: right; display: flex; flex-direction: column; gap: 0.15rem;
  font-size: var(--step--1); color: var(--ink-2);
}
.work-row__year { font-family: var(--font-mono); color: var(--ink); font-weight: 500; }
.work-row__toggle {
  grid-column: 4; width: 1.5rem; height: 1.5rem; position: relative; align-self: center; flex: none;
}
.work-row__toggle::before, .work-row__toggle::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 0.9rem; height: 1.5px;
  background: var(--ink-2); transform: translate(-50%, -50%); transition: transform 0.45s var(--ease-expo), background 0.4s;
}
.work-row__toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
.work-row__trigger[aria-expanded="true"] .work-row__toggle::after { transform: translate(-50%, -50%) rotate(0); }
.work-row__trigger[aria-expanded="true"] .work-row__toggle::before,
.work-row__trigger[aria-expanded="true"] .work-row__toggle::after { background: var(--coral); }

@media (hover: hover) {
  .work-row__trigger:hover { padding-inline: 0.9rem; }
  .work-row__trigger:hover .work-row__title { color: var(--coral-light); }
  .work-row::after {
    content: ""; position: absolute; inset: 0; z-index: -1; background: var(--coral-soft);
    transform: scaleY(0); transform-origin: bottom; transition: transform 0.5s var(--ease-expo);
  }
  .work-row:hover::after { transform: scaleY(1); }
}
.work-row__trigger[aria-expanded="true"] .work-row__title { color: var(--coral-light); }

/* Expanding detail — animate grid-template-rows, never height */
.work-row__detail {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease-expo);
}
.work-row__detail-inner { overflow: hidden; }
.work-row__trigger[aria-expanded="true"] + .work-row__detail { grid-template-rows: 1fr; }
.work-row__detail-inner > p {
  max-width: 62ch; color: var(--ink-2); padding: 0 0 1.4rem;
}
.tag-row { list-style: none; padding: 0 0 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-row li {
  font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ink-2);
  border: 1px solid var(--hairline-strong); border-radius: 999px; padding: 0.35rem 0.8rem;
}

@media (max-width: 720px) {
  .work-row__trigger { grid-template-columns: auto 1fr auto; row-gap: 0.5rem; }
  .work-row__index { grid-row: 1; }
  .work-row__title { grid-column: 1 / -1; grid-row: 2; }
  .work-row__meta { grid-column: 1 / 3; grid-row: 3; text-align: left; flex-direction: row; gap: 0.6rem; align-items: baseline; }
  .work-row__toggle { grid-column: 3; grid-row: 1; }
}

/* ───────────────────────── Approach ───────────────────────── */
.approach {
  background: var(--paper-2); border-block: 1px solid var(--hairline);
  padding: var(--section-y) var(--gutter);
}
.approach__head { max-width: var(--maxw); margin: 0 auto clamp(2.5rem, 1.5rem + 3vw, 4.5rem); display: flex; flex-direction: column; gap: 1rem; }
.principles {
  list-style: none; padding: 0; max-width: var(--maxw); margin-inline: auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1px; background: var(--hairline); border: 1px solid var(--hairline);
}
.principle {
  background: var(--paper-3); padding: clamp(1.6rem, 1.2rem + 1.5vw, 2.6rem);
  display: flex; flex-direction: column; gap: 0.8rem;
}
.principle__num {
  font-family: var(--font-mono); font-size: var(--step-1); color: var(--coral);
  font-weight: 500; letter-spacing: -0.02em;
}
.principle__title { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.02em; max-width: 18ch; }
.principle__body { color: var(--ink-2); font-size: var(--step-0); max-width: 34ch; }

/* ───────────────────────── Capabilities marquee ───────────────────────── */
.capabilities { padding: clamp(3.5rem, 2.5rem + 4vw, 6rem) 0; overflow: hidden; }
.capabilities .section-index { padding-inline: var(--gutter); margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.5rem); display: block; }
.cap-marquee {
  list-style: none; padding: 0; margin: 0; display: flex; align-items: center; gap: 2.2rem;
  width: max-content; will-change: transform;
  font-family: var(--font-display); font-size: clamp(1.8rem, 1.2rem + 3.5vw, 4rem);
  font-weight: 500; letter-spacing: -0.025em; color: var(--ink);
}
.cap-marquee li { white-space: nowrap; }
.cap-marquee__dot { color: var(--coral); font-size: 0.5em; }
.cap-track { display: flex; gap: 2.2rem; width: max-content; }

/* ───────────────────────── Team / studio ───────────────────────── */
.team { padding: var(--section-y) var(--gutter); max-width: var(--maxw); margin-inline: auto; }
.team .section-index { display: block; margin-bottom: clamp(1.6rem, 1rem + 2vw, 2.6rem); }
.team__lead {
  font-family: var(--font-display); font-weight: 400; font-size: var(--step-2);
  line-height: 1.22; letter-spacing: -0.018em; max-width: 26ch; text-wrap: balance;
  margin-bottom: clamp(2.4rem, 1.6rem + 3vw, 4rem);
}
.team__lead em { font-style: normal; color: var(--coral); font-weight: 600; }
.team__grid {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: 1px; background: var(--hairline); border: 1px solid var(--hairline);
}
@media (min-width: 760px) { .team__grid { grid-template-columns: 1fr 1fr; } }
.member {
  background: var(--paper-3); padding: clamp(1.7rem, 1.2rem + 1.6vw, 2.8rem);
  display: flex; flex-direction: column; gap: 0.7rem; min-height: 100%;
}
.member__avatar {
  width: 2.6rem; height: 2.6rem; border-radius: 999px; flex: none; margin-bottom: 0.4rem;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 0.9rem; color: var(--on-coral);
  background: linear-gradient(140deg, var(--coral-light), var(--coral-active));
  box-shadow: 0 0 22px -6px rgba(204, 120, 92, 0.6);
}
.member__name { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; letter-spacing: -0.02em; }
.member__role { font-family: var(--font-mono); font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.12em; color: var(--caramel); }
.member__bio { color: var(--ink-2); font-size: var(--step-0); max-width: 42ch; }
.member__mono { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-3); letter-spacing: 0.06em; margin-top: 0.4rem; }

.studio-facts {
  margin-top: clamp(2rem, 1.4rem + 2vw, 3rem);
  border-top: 1px solid var(--hairline);
  display: flex; flex-wrap: wrap; gap: clamp(1.2rem, 0.8rem + 2vw, 3rem); padding-top: 1.4rem;
}
.studio-facts div { display: flex; flex-direction: column; gap: 0.2rem; }
.studio-facts dt { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); }
.studio-facts dd { font-size: var(--step-0); font-weight: 500; }

/* ───────────────────────── Ventures & partners ───────────────────────── */
.ventures { padding: var(--section-y) var(--gutter); max-width: var(--maxw); margin-inline: auto; }
.ventures .section-index { display: block; margin-bottom: clamp(1.6rem, 1rem + 2vw, 2.6rem); }
.ventures__lead {
  font-family: var(--font-display); font-weight: 400; font-size: var(--step-2);
  line-height: 1.22; letter-spacing: -0.018em; max-width: 28ch; text-wrap: balance;
  margin-bottom: clamp(2rem, 1.4rem + 2vw, 3.4rem);
}
.venture-group { margin-top: clamp(2rem, 1.4rem + 2vw, 3rem); }
.venture-group__label {
  font-family: var(--font-mono); font-size: var(--step--1); text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--caramel); margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: 0.9rem;
}
.venture-group__label::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.venture-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1px; background: var(--hairline); border: 1px solid var(--hairline);
}
.venture {
  background: var(--paper-3); padding: clamp(1.3rem, 1rem + 1.2vw, 2rem);
  display: flex; flex-direction: column; gap: 0.55rem; min-height: 100%;
  transition: background 0.4s var(--ease-expo);
}
.venture:hover { background: var(--paper-2); }
.venture__name { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; letter-spacing: -0.02em; }
.venture__desc { color: var(--ink-2); font-size: var(--step-0); flex: 1; }
.venture__todo { font-style: normal; color: var(--caramel); font-family: var(--font-mono); font-size: 0.82em; }
.venture__link {
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--coral); display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.2rem;
  transition: color 0.3s;
}
.venture__link:hover { color: var(--coral-light); }
.venture__link--soft { color: var(--ink-3); }

/* ───────────────────────── Open source ───────────────────────── */
.repos { background: var(--paper-2); border-block: 1px solid var(--hairline); padding: var(--section-y) var(--gutter); }
.repos__head { max-width: var(--maxw); margin: 0 auto clamp(2rem, 1.4rem + 2vw, 3rem); }
.repos .section-index { display: block; margin-bottom: 1rem; }
.repos__lead {
  font-family: var(--font-display); font-weight: 400; font-size: var(--step-2);
  line-height: 1.22; letter-spacing: -0.018em; max-width: 30ch; text-wrap: balance;
}
.repos__handle { color: var(--coral); font-family: var(--font-mono); font-size: 0.72em; letter-spacing: 0.02em; white-space: nowrap; transition: color 0.3s; }
.repos__handle:hover { color: var(--coral-light); }
.repo-grid {
  max-width: var(--maxw); margin-inline: auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1px; background: var(--hairline); border: 1px solid var(--hairline);
}
.repo {
  background: var(--paper-3); padding: clamp(1.4rem, 1rem + 1.2vw, 2rem);
  display: flex; flex-direction: column; gap: 0.55rem; min-height: 100%;
  transition: background 0.4s var(--ease-expo);
}
.repo:hover { background: var(--paper); }
.repo__top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; }
.repo__name { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.repo__slug { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-3); }
.repo__desc { color: var(--ink-2); font-size: var(--step-0); flex: 1; }
.repo__lang { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); display: inline-flex; align-items: center; gap: 0.45rem; }
.repo__lang::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); flex: none; }
.repos__note { max-width: var(--maxw); margin: clamp(1.4rem, 1rem + 1.5vw, 2.2rem) auto 0; color: var(--ink-3); font-size: var(--step--1); font-family: var(--font-mono); letter-spacing: 0.02em; }

/* ───────────────────────── Contact ───────────────────────── */
.contact { background: var(--dark); color: var(--on-dark); padding: clamp(5rem, 3.5rem + 9vw, 12rem) var(--gutter); position: relative; overflow: hidden; isolation: isolate; }
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(80% 120% at 12% 110%, rgba(204, 120, 92, 0.4) 0%, transparent 55%),
    radial-gradient(70% 90% at 95% -10%, rgba(93, 184, 166, 0.14) 0%, transparent 50%);
}
.contact__inner { max-width: 52rem; }
.contact__title { font-size: var(--step-4); margin-top: clamp(1.2rem, 0.8rem + 2vw, 2rem); letter-spacing: -0.03em; max-width: 16ch; }
.contact__sub { margin-top: clamp(1.4rem, 1rem + 1.5vw, 2.2rem); max-width: 52ch; color: var(--on-dark-2); font-size: var(--step-1); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; margin-top: clamp(2rem, 1.4rem + 2vw, 3rem); }

/* ───────────────────────── Footer ───────────────────────── */
.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.2rem; padding: clamp(2.5rem, 2rem + 2vw, 4rem) var(--gutter);
  max-width: var(--maxw); margin-inline: auto;
  border-top: 1px solid var(--hairline); font-size: var(--step--1);
}
.site-footer__brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 600; }
.site-footer__nav { display: flex; gap: 1.4rem; }
.site-footer__nav a { color: var(--ink-2); transition: color 0.3s; }
.site-footer__nav a:hover { color: var(--coral-light); }
.site-footer__fine { color: var(--ink-3); width: 100%; order: 3; padding-top: 1rem; border-top: 1px solid var(--hairline); }
@media (min-width: 720px) { .site-footer__fine { width: auto; order: 0; padding-top: 0; border-top: 0; } }

/* ───────────────────────── Reveal states (JS-driven) ───────────────────────── */
[data-reveal], [data-reveal-words] > span, [data-reveal-lines] .line > span {
  will-change: transform, opacity;
}
.js [data-reveal] { opacity: 0; transform: translateY(22px); }
.js [data-reveal].is-in { opacity: 1; transform: none; transition: opacity 0.8s var(--ease-expo), transform 0.9s var(--ease-expo); }

.js [data-reveal-lines] .line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.js [data-reveal-lines] .line > span { display: block; transform: translateY(105%); }
.js [data-reveal-lines].is-in .line > span { transform: none; transition: transform 0.95s var(--ease-expo); }

.js [data-reveal-words] .word { display: inline-block; overflow: hidden; vertical-align: top; }
.js [data-reveal-words] .word > span { display: inline-block; transform: translateY(105%); }
.js [data-reveal-words].is-in .word > span { transform: none; transition: transform 0.8s var(--ease-expo); }

/* ════════════════════ v3 — the instrument layer ════════════════════ */

/* ───────── B1 · Tangent-line flourish ───────── */
.tangent {
  position: relative; max-width: 40rem; height: clamp(56px, 8vw, 84px);
  margin-top: clamp(1.1rem, 0.8rem + 1.2vw, 1.7rem);
  opacity: 0; transition: opacity 0.9s var(--ease-expo);
}
.tangent.is-drawn { opacity: 1; }
.tangent__svg { width: 100%; height: 100%; overflow: visible; }
.tangent__curve { stroke: var(--coral); stroke-width: 1.6; opacity: 0.85; }
.tangent__line { stroke: var(--amber); stroke-width: 1.2; opacity: 0.9; }
.tangent__dot { fill: var(--amber); filter: drop-shadow(0 0 6px rgba(232, 165, 90, 0.8)); }
.tangent__readout {
  position: absolute; right: 0; top: -0.4rem;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.04em; color: var(--caramel);
  font-variant-numeric: tabular-nums;
}

/* ───────── F2 · Rotating hero object ───────── */
.rotator {
  display: inline-block; position: relative; vertical-align: bottom;
  overflow: hidden; white-space: nowrap; text-align: left;
  transition: width 0.35s var(--ease-expo);
}
.rotator__word {
  display: inline-block; color: var(--ink); font-weight: 500;
  transition: transform 0.26s var(--ease-expo), opacity 0.26s var(--ease-expo);
}
.rotator__word.is-out { transform: translateY(-110%); opacity: 0; transition-duration: 0.22s; }
.rotator__word.is-in-word { animation: rotorIn 0.45s var(--ease-expo); }
@keyframes rotorIn { from { transform: translateY(110%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ───────── F1 · Hero service chips ───────── */
.hero__chips {
  list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: clamp(1.2rem, 0.9rem + 1.2vw, 1.8rem);
}
.hero__chips li {
  font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--on-dark-2);
  border: 1px solid var(--hairline-dark); border-radius: 999px; padding: 0.42rem 0.85rem;
  transition: color 0.3s, border-color 0.3s;
}
.hero__chips li:hover { color: var(--ink); border-color: var(--hairline-strong); }

/* ───────── I1 · Live instrument readout ───────── */
.readout {
  position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%) translateX(14px);
  width: 15.5rem; padding: 1.2rem 1.3rem 1.05rem;
  background: rgba(19, 17, 16, 0.55); border: 1px solid var(--hairline-dark);
  border-radius: 18px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8);
  opacity: 0; transition: opacity 1s var(--ease-expo) 0.5s, transform 1s var(--ease-expo) 0.5s;
}
.readout.is-live { opacity: 1; transform: translateY(-50%) translateX(0); }
@media (max-width: 1160px) { .readout { display: none; } }
.readout__head {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.16em;
  color: var(--teal); font-weight: 600;
}
.readout__rows { margin: 0.9rem 0 0.4rem; }
.readout__row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0.42rem 0; border-bottom: 1px solid var(--hairline);
}
.readout__row:last-child { border-bottom: 0; }
.readout__row dt { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em; color: var(--ink-3); text-transform: uppercase; }
.readout__row dd { display: flex; align-items: baseline; gap: 0.22rem; font-variant-numeric: tabular-nums; }
.readout__row b { font-family: var(--font-mono); font-weight: 600; font-size: 1.02rem; color: var(--ink); }
.readout__row i { font-style: normal; font-family: var(--font-mono); font-size: 0.66rem; color: var(--ink-3); }
.readout__row em { font-style: normal; font-size: 0.6rem; }
.readout__row em.up { color: var(--teal); }
.readout__row em.down { color: var(--coral); }
.readout__spark { width: 100%; height: 2.2rem; margin-top: 0.3rem; }
.readout__spark polyline { stroke: var(--teal); stroke-width: 1.4; opacity: 0.85; }
.readout__foot { margin-top: 0.55rem; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.04em; color: var(--ink-3); }

/* ───────── I2 · Nav ∂x/∂t readout ───────── */
.nav-velocity {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em;
  color: var(--ink-3); font-variant-numeric: tabular-nums; user-select: none;
}
.nav-velocity b { font-weight: 500; color: var(--caramel); display: inline-block; min-width: 2.6em; }
@media (max-width: 900px) { .nav-velocity { display: none; } }

/* ───────── M2 · Scrollspy underline ───────── */
.site-nav a.is-active:not(.site-nav__cta) { opacity: 1; }
.site-nav a.is-active:not(.site-nav__cta)::after { transform: scaleX(1); background: var(--coral); }

/* ───────── M3 · Wordmark tooltip ───────── */
.wordmark { position: relative; }
.wordmark__tip {
  position: absolute; left: 0; top: calc(100% + 0.55rem); z-index: 60;
  white-space: nowrap; pointer-events: none;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.04em;
  color: var(--ink-2); background: rgba(19, 17, 16, 0.92);
  border: 1px solid var(--hairline-dark); border-radius: 8px; padding: 0.45rem 0.7rem;
  opacity: 0; transform: translateY(-4px);
  transition: opacity 0.3s var(--ease-expo) 0.25s, transform 0.3s var(--ease-expo) 0.25s;
}
.wordmark:hover .wordmark__tip, .wordmark:focus-visible .wordmark__tip { opacity: 1; transform: none; }

/* ───────── M4 · Burger + mobile overlay ───────── */
.nav-burger {
  display: none; position: relative; z-index: 220;
  width: 2.4rem; height: 2.4rem; border: 1px solid var(--hairline-dark); border-radius: 999px;
  background: none; cursor: pointer; padding: 0;
}
.nav-burger span {
  position: absolute; left: 50%; top: 50%; width: 0.95rem; height: 1.5px;
  background: var(--ink); transform: translate(-50%, -50%) translateY(-3px);
  transition: transform 0.4s var(--ease-expo);
}
.nav-burger span:last-child { transform: translate(-50%, -50%) translateY(3px); }
.menu-open .nav-burger span { transform: translate(-50%, -50%) rotate(45deg); }
.menu-open .nav-burger span:last-child { transform: translate(-50%, -50%) rotate(-45deg); }
@media (max-width: 640px) {
  .nav-burger { display: block; }
  .site-nav a:not(.site-nav__cta) { display: none; }
  .site-nav .site-nav__cta { display: none; } /* CTA lives in the overlay on mobile */
}
.mobile-menu {
  position: fixed; inset: 0; z-index: 210;
  background: rgba(10, 9, 8, 0.96); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  display: flex; flex-direction: column; justify-content: center; padding: var(--gutter);
  opacity: 0; visibility: hidden; transition: opacity 0.45s var(--ease-expo), visibility 0.45s;
}
.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.menu-open { overflow: hidden; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 0.4rem; }
.mobile-menu a {
  display: flex; align-items: baseline; gap: 1rem;
  font-family: var(--font-display); font-size: clamp(2rem, 8vw, 3rem); font-weight: 600;
  letter-spacing: -0.02em; color: var(--ink); padding: 0.55rem 0;
  border-bottom: 1px solid var(--hairline);
  transform: translateY(18px); opacity: 0;
  transition: transform 0.55s var(--ease-expo), opacity 0.55s var(--ease-expo), color 0.3s;
}
.menu-open .mobile-menu a { transform: none; opacity: 1; }
.menu-open .mobile-menu a:nth-child(2) { transition-delay: 0.05s; }
.menu-open .mobile-menu a:nth-child(3) { transition-delay: 0.1s; }
.menu-open .mobile-menu a:nth-child(4) { transition-delay: 0.15s; }
.menu-open .mobile-menu a:nth-child(5) { transition-delay: 0.2s; }
.mobile-menu a:hover { color: var(--coral-light); }
.mobile-menu a .idx { font-family: var(--font-mono); font-size: 0.8rem; color: var(--caramel); font-weight: 500; }
.mobile-menu__cta { color: var(--coral) !important; border-bottom: 0 !important; }
.mobile-menu__eq {
  margin-top: 2.2rem; font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.06em; color: var(--ink-3);
}

/* ───────── I3 · Pinned method story ───────── */
.story { position: relative; height: 320vh; background: var(--paper-2); border-block: 1px solid var(--hairline); }
.story__pin { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; overflow: hidden; }
.story__frame { width: 100%; max-width: var(--maxw); margin-inline: auto; padding: 0 var(--gutter); }
.story__stage { position: relative; margin-top: clamp(1.6rem, 1rem + 2vw, 2.8rem); min-height: 22rem; }
.story__phase {
  position: absolute; inset: 0; max-width: 44rem;
  opacity: 0; transform: translateY(26px); pointer-events: none;
  transition: opacity 0.6s var(--ease-expo), transform 0.6s var(--ease-expo);
}
.story__phase.is-current { opacity: 1; transform: none; pointer-events: auto; }
.story__num { font-family: var(--font-mono); font-size: var(--step-1); color: var(--coral); font-weight: 500; }
.story__name { font-family: var(--font-display); font-size: var(--step-3); font-weight: 600; letter-spacing: -0.025em; margin-top: 0.4rem; }
.story__line { margin-top: 0.9rem; color: var(--ink-2); font-size: var(--step-1); max-width: 40ch; }
.story__viz { width: min(24rem, 90%); height: auto; margin-top: 1.4rem; overflow: visible; }
.story__viz rect {
  fill: var(--coral); opacity: 0.75; rx: 2;
  transform: scaleY(0); transform-origin: 100% 104px; transform-box: fill-box;
  transition: transform 0.7s var(--ease-expo);
}
.story__phase.is-played .story__viz rect { transform: none; }
.story__baseline {
  stroke: var(--amber); stroke-width: 1.4; stroke-dasharray: 5 6; opacity: 0.9;
}
.story__viz circle { fill: var(--coral); opacity: 0.85; transition: cy 0.8s var(--ease-expo); }
.story__growth { stroke: var(--teal); stroke-width: 1.8; transition: stroke-dashoffset 1.4s var(--ease-expo); }
.story__growth-fill { fill: rgba(93, 184, 166, 0.08); }
.story__eq { margin-top: 1.1rem; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; color: var(--caramel); }
.story__progress {
  margin-top: clamp(1.4rem, 1rem + 1.5vw, 2.2rem); height: 2px; width: min(24rem, 60%);
  background: var(--hairline); border-radius: 2px; overflow: hidden;
}
.story__progress i { display: block; height: 100%; background: var(--coral); transform: scaleX(0); transform-origin: left; }
/* Static fallback (reduced motion / no sticky): three phases stacked */
.story--static { height: auto; padding: var(--section-y) 0; }
.story--static .story__pin { position: static; height: auto; }
.story--static .story__stage { min-height: 0; display: grid; gap: 3rem; }
.story--static .story__phase { position: static; opacity: 1; transform: none; pointer-events: auto; }
.story--static .story__progress { display: none; }

/* ───────── B4 · Graph-paper grid behind the statement ───────── */
.statement { position: relative; isolation: isolate; }
.statement::before {
  content: ""; position: absolute; inset: 0 0 0 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.35;
  -webkit-mask-image: radial-gradient(75% 70% at 40% 45%, #000 0%, transparent 78%);
  mask-image: radial-gradient(75% 70% at 40% 45%, #000 0%, transparent 78%);
}

/* ───────── B2 · Approach formulas ───────── */
.principle__eq {
  margin-top: auto; padding-top: 0.9rem;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.05em;
  color: var(--caramel); opacity: 0.85;
}

/* ───────── P1 · CTA shine sweep ───────── */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
  transform: skewX(-18deg); opacity: 0; transition: none; pointer-events: none;
}
.btn--primary:hover::after { animation: shineSweep 0.9s var(--ease-expo); }
@keyframes shineSweep { 0% { left: -60%; opacity: 1; } 100% { left: 130%; opacity: 0; } }

/* ───────── P2 · Venture stagger + tilt ───────── */
.venture { will-change: transform; transition: background 0.4s var(--ease-expo), transform 0.25s cubic-bezier(0.33, 1, 0.68, 1); }
.js [data-reveal] .venture { opacity: 0; transform: translateY(16px); }
.js [data-reveal].is-in .venture { opacity: 1; transform: none; transition: opacity 0.7s var(--ease-expo), transform 0.8s var(--ease-expo); }
.js [data-reveal].is-in .venture:nth-child(2) { transition-delay: 0.07s; }
.js [data-reveal].is-in .venture:nth-child(3) { transition-delay: 0.14s; }
.js [data-reveal].is-in .venture:nth-child(4) { transition-delay: 0.21s; }
.js [data-reveal].is-in .venture:nth-child(5) { transition-delay: 0.28s; }
.js [data-reveal].is-in .venture:nth-child(6) { transition-delay: 0.35s; }

/* ───────── B3 · Footer equation ───────── */
.site-footer__eq {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em;
  color: var(--ink-2); min-height: 1.2em; display: inline-flex; align-items: baseline;
}
.site-footer__eq .caret {
  display: none; width: 0.5em; height: 1em; margin-left: 2px;
  background: var(--coral); vertical-align: text-bottom;
}
.site-footer__eq.is-typing .caret { display: inline-block; animation: caretBlink 0.8s steps(1) infinite; }
.site-footer__eq.is-done .caret { animation: caretBlink 0.8s steps(1) 3; animation-fill-mode: forwards; }
@keyframes caretBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ───────── [00] In plain words · the decoder ───────── */
.plain { padding: var(--section-y) var(--gutter); max-width: var(--maxw); margin-inline: auto; }
.plain .section-index { display: block; margin-bottom: clamp(1.6rem, 1rem + 2vw, 2.6rem); }
.plain__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2rem, 1.2rem + 3vw, 4rem); }
@media (min-width: 900px) { .plain__grid { grid-template-columns: 1.05fr 1fr; align-items: start; } }
.plain__title {
  font-family: var(--font-display); font-weight: 600; font-size: var(--step-3);
  line-height: 1.1; letter-spacing: -0.025em; max-width: 17ch; text-wrap: balance;
  margin-bottom: clamp(1.2rem, 1rem + 1vw, 1.8rem);
}
.plain__lead p { color: var(--ink-2); font-size: var(--step-0); max-width: 48ch; }
.plain__lead p + p { margin-top: 1.1rem; }
.plain__lead em { font-style: normal; color: var(--coral); font-weight: 600; }
.decoder { border-top: 1px solid var(--hairline); }
.decoder__row {
  display: grid; grid-template-columns: minmax(6.5rem, 11rem) 1fr;
  gap: clamp(0.8rem, 0.4rem + 1.5vw, 2rem);
  padding: clamp(0.9rem, 0.7rem + 0.6vw, 1.2rem) 0;
  border-bottom: 1px solid var(--hairline); align-items: baseline;
}
.decoder dt { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600; color: var(--caramel); letter-spacing: 0.02em; }
.decoder dt .logo-type { color: var(--ink); font-size: 0.95rem; }
.decoder dd { color: var(--ink-2); font-size: var(--step--1); line-height: 1.55; }
@media (max-width: 560px) { .decoder__row { grid-template-columns: 1fr; gap: 0.3rem; } }

/* ───────── Contact form ───────── */
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2.4rem, 1.5rem + 3vw, 4.5rem); align-items: start; max-width: 72rem; }
@media (min-width: 920px) { .contact__grid { grid-template-columns: 1fr 1fr; } }
.contact__or { margin-top: 1.4rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-2); }
@media (min-width: 920px) { .contact__or { display: none; } }

/* The intake panel — same instrument language as the hero readout card. */
.cform {
  position: relative; isolation: isolate;
  background: linear-gradient(180deg, rgba(26, 23, 20, 0.72) 0%, rgba(14, 12, 10, 0.72) 100%);
  border: 1px solid var(--hairline-dark);
  border-radius: 20px; padding: clamp(1.5rem, 1.1rem + 1.6vw, 2.4rem);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 34px 80px -44px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(248, 244, 237, 0.05);
  display: flex; flex-direction: column; gap: 1.15rem;
  counter-reset: field;
}
/* coral filament across the top edge */
.cform::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, transparent 6%, var(--coral) 32%, var(--amber) 58%, transparent 94%);
  opacity: 0.75;
}
.cform__head {
  display: flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--caramel); font-weight: 600;
  padding-bottom: 0.9rem; border-bottom: 1px solid var(--hairline);
}
.cform__head::before {
  content: "∂"; font-style: italic; font-size: 0.95rem; line-height: 1;
  color: var(--coral); letter-spacing: 0;
}
.cform__row { display: grid; grid-template-columns: 1fr; gap: 1.15rem; }
@media (min-width: 520px) { .cform__row { grid-template-columns: 1fr 1fr; } }

.cform__field { display: flex; flex-direction: column; gap: 0.45rem; counter-increment: field; }
.cform__field > span {
  display: flex; align-items: baseline; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.64rem; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--on-dark-2); font-weight: 500;
}
/* auto-numbered fields — echoes the [ 0N ] section system */
.cform__field > span::before {
  content: counter(field, decimal-leading-zero);
  color: var(--coral); font-weight: 600; letter-spacing: 0.04em;
}
.cform__field > span i { font-style: normal; color: var(--ink-3); text-transform: none; letter-spacing: 0.03em; }

.cform input, .cform select, .cform textarea {
  width: 100%; font-family: var(--font-body); font-size: var(--step--1); color: var(--ink);
  background: rgba(8, 7, 6, 0.6); border: 1px solid var(--hairline-dark);
  border-radius: 11px; padding: 0.8rem 0.95rem;
  transition: border-color 0.3s var(--ease-expo), box-shadow 0.3s var(--ease-expo), background 0.3s var(--ease-expo);
}
.cform textarea { resize: vertical; min-height: 7rem; line-height: 1.55; font-family: var(--font-body); }
.cform select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 2.4rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--coral) 50%),
    linear-gradient(135deg, var(--coral) 50%, transparent 50%);
  background-position: calc(100% - 19px) calc(50% + 1px), calc(100% - 14px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.cform select option { background: #131110; color: var(--ink); }
.cform ::placeholder { color: var(--ink-3); opacity: 1; }
.cform input:hover, .cform select:hover, .cform textarea:hover { border-color: var(--hairline-strong); }
.cform input:focus, .cform select:focus, .cform textarea:focus {
  outline: none; border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(204, 120, 92, 0.16), 0 0 22px -8px rgba(204, 120, 92, 0.5);
  background: rgba(8, 7, 6, 0.85);
}
.cform input:focus + span, .cform textarea:focus + span { color: var(--ink); }

.cform__submit { align-self: flex-start; margin-top: 0.15rem; }
.cform__submit[disabled] { opacity: 0.55; cursor: wait; }
@media (max-width: 519px) { .cform__submit { align-self: stretch; justify-content: center; } }

.cform__status {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.04em;
  min-height: 1.1em; display: flex; align-items: center; gap: 0.45rem;
}
.cform__status:not(:empty)::before { content: "▸"; font-size: 0.7em; }
.cform__status.is-sending { color: var(--ink-3); }
.cform__status.is-ok { color: var(--teal); }
.cform__status.is-ok::before { content: "✓"; }
.cform__status.is-error { color: var(--coral-light); }
.cform__status.is-error::before { content: "!"; font-weight: 700; }
.cform__note {
  font-family: var(--font-mono); font-size: 0.63rem; letter-spacing: 0.03em;
  color: var(--ink-3); line-height: 1.6; padding-top: 0.9rem; border-top: 1px solid var(--hairline);
}

/* ── success state: the panel becomes the confirmation ── */
.cform.is-sent > *:not(.cform__done) { display: none; }
.cform__done { display: none; }
.cform.is-sent .cform__done {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.55rem;
  padding: clamp(0.6rem, 0.4rem + 1vw, 1.4rem) 0;
  animation: doneIn 0.7s var(--ease-expo) both;
}
.cform__done:focus { outline: none; }
@keyframes doneIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.cform__done-mark {
  font-family: var(--font-mono); font-style: italic; font-size: 2.1rem; line-height: 1;
  color: var(--coral); text-shadow: 0 0 26px rgba(204, 120, 92, 0.55);
  animation: donePulse 2.6s var(--ease-quart) infinite;
}
@keyframes donePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.cform__done-title {
  font-family: var(--font-display); font-size: var(--step-2); font-weight: 600;
  letter-spacing: -0.025em; color: var(--ink);
}
.cform__done-body { color: var(--ink-2); font-size: var(--step--1); line-height: 1.6; max-width: 34ch; }
.cform__done-eq {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em;
  color: var(--teal); margin-top: 0.2rem;
}
.cform__again {
  margin-top: 0.7rem; background: none; border: 1px solid var(--hairline-strong);
  color: var(--on-dark-2); border-radius: 999px; padding: 0.5rem 1.05rem; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.cform__again:hover { color: var(--ink); border-color: var(--ink); background: rgba(248, 244, 237, 0.05); }
@media (prefers-reduced-motion: reduce) {
  .cform.is-sent .cform__done { animation: none; }
  .cform__done-mark { animation: none; }
}

/* Reduced motion / no-JS: everything visible and still */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js [data-reveal-lines] .line > span, .js [data-reveal-words] .word > span {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
  .status-dot::after, .hero__scroll-line::after, .cap-marquee { animation: none !important; }
  .cap-marquee { width: 100%; flex-wrap: wrap; font-size: clamp(1.4rem, 1rem + 2vw, 2.4rem); }
  .tangent { opacity: 1; }
  .readout { opacity: 1; transform: translateY(-50%); }
  .js [data-reveal] .venture { opacity: 1 !important; transform: none !important; }
  .story__phase, .story__viz rect, .story__growth { transition: none !important; }
  .btn--primary:hover::after { animation: none; }
}
