/* John Granowitz · personal site */

:root {
  --bg: #0a0a0b;
  --bg-2: #111114;
  --bg-3: #17171b;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f1f0ee;
  --muted: #a7a6ad;
  --dim: #8b8a93;
  --accent: #ff7a1a;
  --accent-soft: rgba(255, 122, 26, 0.14);
  --accent-line: rgba(255, 122, 26, 0.45);

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --section-pad: clamp(88px, 12vw, 160px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Grid + noise texture */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
body::before {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
}
body::after {
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

main, .site-head, .site-foot { position: relative; z-index: 1; }

img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
cite { font-style: italic; }

::selection { background: var(--accent); color: #0a0a0b; }

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

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.nowrap { white-space: nowrap; }

.skip {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: #0a0a0b;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 16px; }

/* ---------- Header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 11, 0.6);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-head.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(10, 10, 11, 0.82);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-mark { width: 26px; height: 26px; color: var(--muted); }
.brand-hub { fill: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}
.nav-links a {
  display: inline-block;
  padding: 8px 12px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-links .nav-cta {
  color: var(--text);
  border: 1px solid var(--line-2);
  margin-left: 8px;
}
.nav-links .nav-cta:hover { border-color: var(--accent-line); background: var(--accent-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, color 0.25s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #0a0a0b; }
.btn-primary:hover { background: #ff8c3a; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent-line); }
.btn-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  opacity: 0.7;
}
.btn-icon {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Shared type ---------- */
.eyebrow,
.kicker {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.kicker span {
  color: var(--accent);
}
.kicker span::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  margin-left: 12px;
  vertical-align: middle;
  background: var(--accent-line);
}

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 1.2rem + 3.2vw, 3.75rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.lede {
  margin-top: 24px;
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  text-wrap: pretty;
}

.section { padding-block: var(--section-pad); }
.section--panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.008));
  border-block: 1px solid var(--line);
}
.section-head { margin-bottom: clamp(48px, 7vw, 88px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(100svh, 980px);
  display: flex;
  align-items: center;
  padding-block: clamp(48px, 8vw, 96px) clamp(96px, 10vw, 128px);
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  right: -10%;
  top: 10%;
  width: 70vw;
  max-width: 900px;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(255, 122, 26, 0.16), rgba(255, 122, 26, 0.04) 55%, transparent 75%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  margin-bottom: 28px;
  font-size: 11.5px;
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 122, 26, 0.6);
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(255, 122, 26, 0.55); }
  70%, 100% { box-shadow: 0 0 0 9px rgba(255, 122, 26, 0); }
}
.hero-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.4rem, 1rem + 8.4vw, 8.4rem);
  line-height: 0.88;
  letter-spacing: -0.055em;
  margin-left: -0.04em;
}
.hero-role {
  margin-top: 22px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 1rem + 1.4vw, 2.1rem);
  letter-spacing: -0.02em;
  color: var(--accent);
}
.hero-thesis {
  margin-top: 18px;
  max-width: 34ch;
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.35rem);
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.hero-visual {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 600px;
  justify-self: end;
}
.hero-visual canvas {
  width: 100%;
  height: 100%;
}
.hero-caption {
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
}
.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 9px;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--accent);
  animation: cue 2s var(--ease) infinite;
}
@keyframes cue {
  0% { transform: translateY(0); opacity: 1; }
  80% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Numbers ---------- */
.numbers {
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}
.stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.stat {
  padding: clamp(32px, 4vw, 52px) clamp(14px, 1.6vw, 24px);
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 1.4rem + 2.2vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat-unit { color: var(--muted); font-weight: 500; }
.stat-from {
  color: var(--dim);
  font-weight: 500;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent-line);
}
.stat-arrow {
  display: inline-block;
  margin-inline: 0.06em;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.7em;
  transform: translateY(-0.12em);
}
.stat-label {
  margin-top: 14px;
  max-width: 22ch;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

/* ---------- Timeline ---------- */
.tl-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  grid-template-areas: "list now";
  gap: 40px;
}
.tl-layout > .tl { grid-area: list; }
.tl-now {
  grid-area: now;
  position: sticky;
  top: 32vh;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  text-align: right;
}
.tl-now-year {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4.5rem, 2rem + 4.6vw, 7.5rem);
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(241, 240, 238, 0.32);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tl-now.is-hot .tl-now-year { -webkit-text-stroke-color: var(--accent); }
.tl-now-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tl-now.is-swapping .tl-now-year,
.tl-now.is-swapping .tl-now-label { opacity: 0; transform: translateY(8px); }
.tl-now-year,
.tl-now-label { transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), -webkit-text-stroke-color 0.4s var(--ease); }

.tl {
  position: relative;
  --rail-x: 180px;
  --progress: 0;
}
.tl-rail {
  position: absolute;
  left: var(--rail-x);
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--line-2);
}
.tl-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--accent), rgba(255, 122, 26, 0.6));
  transform-origin: top;
  transform: scaleY(var(--progress));
  box-shadow: 0 0 12px rgba(255, 122, 26, 0.5);
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: var(--rail-x) minmax(0, 1fr);
  padding-bottom: clamp(44px, 6vw, 72px);
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: var(--rail-x);
  top: 12px;
  width: 11px;
  height: 11px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.tl-item.is-active::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 5px rgba(255, 122, 26, 0.15);
}
.tl-year {
  padding-right: 40px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 1.2rem + 1vw, 2.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--dim);
  text-align: right;
  font-variant-numeric: tabular-nums;
  transition: color 0.4s var(--ease);
}
.tl-year span { font-size: 0.62em; letter-spacing: -0.02em; }
.tl-item.is-active .tl-year { color: var(--text); }
.tl-item--hot.is-active .tl-year { color: var(--accent); }
.tl-body {
  padding-left: 44px;
  max-width: 640px;
}
.tl-body h3 { margin-bottom: 10px; }
.tl-body p { color: var(--muted); }
.tl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.tl-tags li,
.chips li {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- Platform diagram ---------- */
.flow-fig { margin-bottom: clamp(40px, 6vw, 64px); }
.flow {
  position: relative;
  padding-bottom: 96px; /* room for the feedback loop */
}
.flow-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.flow-wires .wire {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 1.5;
}
.flow-wires .wire-dash {
  fill: none;
  stroke: var(--accent);
  stroke-opacity: 0.55;
  stroke-width: 1.5;
  stroke-dasharray: 3 9;
  animation: dash 1.2s linear infinite;
}
.flow-wires .wire-loop {
  fill: none;
  stroke: var(--muted);
  stroke-opacity: 0.6;
  stroke-width: 1.5;
  stroke-dasharray: 6 7;
  animation: dash 1.6s linear infinite;
}
.flow-wires .arrow { fill: var(--muted); }
.flow-wires .packet { fill: var(--accent); filter: drop-shadow(0 0 6px rgba(255, 122, 26, 0.9)); }
.flow-wires .packet--loop { fill: var(--text); filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.7)); }
@keyframes dash { to { stroke-dashoffset: -24; } }

.flow-nodes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.3fr);
  gap: 44px;
  align-items: stretch;
}
.flow-node {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px 20px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}
.flow-node strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.flow-node > span:last-child {
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--muted);
}
.flow-step {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.08em;
}
.flow-icon {
  width: 26px;
  height: 26px;
  margin: 6px 0 8px;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.flow-node--accent { border-color: var(--accent-line); background: linear-gradient(180deg, rgba(255, 122, 26, 0.1), var(--bg-2) 70%); }
.flow-node--accent .flow-icon { stroke: var(--accent); }
.flow-node.is-lit {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.12), 0 12px 40px -12px rgba(255, 122, 26, 0.45);
  transform: translateY(-2px);
}
.flow-node--systems .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.flow-node--systems .chips li { font-size: 11.5px; padding: 4px 8px; color: var(--text); }
.flow-loop-label {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  visibility: hidden;
}
.flow.is-ready .flow-loop-label { visibility: visible; }
.flow-caption {
  margin-top: 8px;
  max-width: 70ch;
  font-size: 14px;
  color: var(--dim);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.facts > div {
  padding: 24px 24px 0 0;
}
.facts dt {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.facts dd {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}

/* ---------- Work cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  grid-column: span 4;
  padding: clamp(24px, 3vw, 36px);
  border-radius: calc(var(--radius) + 4px);
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 122, 26, 0.09), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.card:hover { border-color: var(--line-2); }
.card:hover::after { opacity: 1; }
.card--lead { grid-column: span 7; }
.card--lead + .card { grid-column: span 5; }
.card--lab { grid-column: span 8; }
.card h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); letter-spacing: -0.03em; }
.card p { color: var(--muted); }
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.card-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}
.card-glyph {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  align-self: flex-start;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-line);
  transition: color 0.2s, border-color 0.2s;
}
.card-link:hover { color: var(--accent); border-color: var(--accent); }
.card-link::before {
  /* make the whole card clickable without nesting */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--quiet { margin-top: auto; padding-top: 6px; }

/* ---------- Principles ---------- */
.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.principles li {
  padding-top: 24px;
  border-top: 1px solid var(--line-2);
  position: relative;
}
.principles li::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 40px;
  height: 1px;
  background: var(--accent);
}
.p-num {
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}
.principles h3 { margin-bottom: 12px; }
.principles p { color: var(--muted); font-size: 15.5px; }

/* ---------- Case study ---------- */
.case {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  padding: clamp(28px, 5vw, 64px);
  border-radius: 24px;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(600px circle at 0% 0%, rgba(255, 122, 26, 0.1), transparent 60%),
    var(--bg-2);
}
.case-copy h2 { font-size: clamp(1.9rem, 1.2rem + 2.2vw, 3rem); }
.case-copy p:not(.kicker) { margin: 20px 0 32px; color: var(--muted); max-width: 52ch; }
.case-doc {
  display: flex;
  flex-direction: column;
  gap: 10px;
  aspect-ratio: 8.5 / 11;
  width: 100%;
  max-width: 340px;
  margin-inline: auto;
  padding: 28px 26px;
  border-radius: 10px;
  background: #f4f2ee;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: rotate(-3deg);
  transition: transform 0.5s var(--ease);
}
.case:hover .case-doc { transform: rotate(-1deg) translateY(-4px); }
.case-doc-tag {
  align-self: flex-start;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--accent);
  color: #0a0a0b;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.case-doc-line { display: block; height: 8px; border-radius: 3px; background: #d8d5cf; }
.case-doc-line.w90 { width: 90%; height: 14px; background: #2a2a2e; }
.case-doc-line.w70 { width: 70%; height: 14px; background: #2a2a2e; }
.case-doc-line.w100 { width: 100%; }
.case-doc-line.w95 { width: 95%; }
.case-doc-line.w80 { width: 80%; }
.case-doc-gap { height: 10px; }
.case-doc-table {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 6px;
}
.case-doc-table i { height: 18px; border-radius: 3px; background: #e5e2dc; }
.case-doc-table i:nth-child(2n) { background: rgba(255, 122, 26, 0.35); }

/* ---------- Contact ---------- */
.contact {
  position: relative;
  overflow: hidden;
  padding-bottom: clamp(96px, 12vw, 160px);
}
.contact::before {
  content: "";
  position: absolute;
  right: -8%;
  top: 50%;
  width: min(720px, 80vw);
  aspect-ratio: 1;
  transform: translateY(-50%);
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><g fill='none' stroke='%23f1f0ee' stroke-opacity='.09' stroke-width='.1'><path d='M16 16 8.5 9.5M16 16l7.5-6.5M16 16v8.5'/><circle cx='8.5' cy='9.5' r='1.2'/><circle cx='23.5' cy='9.5' r='1.2'/><circle cx='16' cy='24.5' r='1.2'/><circle cx='16' cy='16' r='5'/><circle cx='16' cy='16' r='11'/></g><circle cx='16' cy='16' r='.9' fill='%23ff7a1a' fill-opacity='.7'/><circle cx='16' cy='16' r='2' fill='none' stroke='%23ff7a1a' stroke-opacity='.35' stroke-width='.1'/></svg>") center / contain no-repeat,
    radial-gradient(closest-side, rgba(255, 122, 26, 0.12), transparent 70%);
  pointer-events: none;
}
.contact .wrap { position: relative; }
.contact-title {
  max-width: 18ch;
  font-size: clamp(2.4rem, 1.2rem + 4.2vw, 4.8rem);
}
.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  margin-top: 40px;
}
.contact-email {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 0.9rem + 1.8vw, 2.25rem);
  letter-spacing: -0.02em;
  color: var(--accent);
  text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 0% 2px no-repeat;
  padding-bottom: 4px;
  transition: background-size 0.4s var(--ease);
  overflow-wrap: anywhere;
}
.contact-email:hover { background-size: 100% 2px; }
.copy {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  font: 500 14px var(--font-body);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.copy:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.copy-status { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  padding-block: 28px;
  font-size: 13.5px;
  color: var(--dim);
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

/* ---------- Reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.8s var(--ease) calc(var(--d, 0) * 80ms),
    transform 0.8s var(--ease) calc(var(--d, 0) * 80ms);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(3n + 1) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n + 4) { border-top: 1px solid var(--line); }

  .flow { padding-bottom: 0; padding-right: 64px; max-width: 620px; }
  .flow-caption { margin-top: 28px; }
  .flow-nodes { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .flow-node { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; padding: 16px 18px; }
  .flow-node .flow-step { grid-column: 1 / -1; }
  .flow-icon { grid-row: span 2; margin: 0; }
  .flow-node--systems .chips { grid-column: 1 / -1; }
  .tl-now { display: none; }
  .tl-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "list"; }
  .flow-loop-label.is-vertical {
    writing-mode: vertical-rl;
    transform: translate(-50%, -50%) rotate(180deg);
    padding: 12px 6px;
  }

  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card, .card--lead, .card--lead + .card, .card--lab { grid-column: span 6; }
  .card--lead { grid-column: span 12; }
  .card--lab { grid-column: span 12; }
}

@media (max-width: 860px) {
  .hero { min-height: 0; padding-top: clamp(72px, 18vw, 120px); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { position: relative; z-index: 1; }
  .hero-visual {
    position: absolute;
    top: -64px;
    right: calc(-1 * min(34vw, 180px));
    width: min(100vw, 560px);
    max-width: none;
    opacity: 0.55;
    pointer-events: none;
  }
  .hero-caption { display: none; }
  .eyebrow { font-size: 10.5px; letter-spacing: 0.05em; }
  .hero-glow { right: -40%; top: -10%; width: 120vw; }
  .scroll-cue { display: none; }
  .nav-links li:not(:last-child) { display: none; }
  .tl { --rail-x: 0px; }
  .tl-item { grid-template-columns: minmax(0, 1fr); padding-left: 28px; }
  .tl-item::before { left: 0; top: 6px; }
  .tl-year { text-align: left; padding: 0 0 12px; }
  .tl-body { padding-left: 0; }
  .case { grid-template-columns: minmax(0, 1fr); }
  .case-doc { max-width: 220px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat, .stat:nth-child(3n + 1) { border-left: 1px solid var(--line); padding-left: 18px; }
  .stat:nth-child(2n + 1) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .stat-num { font-size: 2.5rem; }
  .card, .card--lead, .card--lead + .card, .card--lab { grid-column: span 12; }
  .principles { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts > div { padding-right: 0; }
  .flow { padding-right: 52px; }
  .hero-thesis { color: #bdbcc2; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .case .btn { width: 100%; justify-content: center; }
  .case .btn-meta { display: none; }
  .case-doc { max-width: 200px; }
  .contact::before { top: auto; bottom: -180px; right: -45%; transform: none; opacity: 0.7; }
  .foot-row { flex-direction: column; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .flow-wires .wire-dash,
  .flow-wires .wire-loop { animation: none; }
  .scroll-cue span { animation: none; }
}
