/* ------------------------------------------------------------------
   Anthony Hope Architectural Services
   Design system: "Tectonic Precision" (Stitch export, see design/DESIGN.md)
   Dark basalt surfaces, terracotta primary, brass secondary, slate tertiary.
   Bodoni Moda display · Plus Jakarta Sans body · JetBrains Mono labels.
   ------------------------------------------------------------------ */

:root {
  --surface: #131315;
  --surface-lowest: #0e0e10;
  --surface-low: #1b1b1d;
  --surface-container: #201f21;
  --surface-high: #2a2a2c;
  --surface-highest: #353437;
  --on-surface: #e5e1e4;
  --on-surface-variant: #dac1b6;
  --outline: #a28c82;
  --outline-variant: #55433a;

  --primary: #ffb690;
  --on-primary: #542100;
  --primary-container: #d47945;
  --on-primary-container: #4a1c00;
  --primary-deep: #c26b38;
  --primary-hover: #a95b2d;
  --secondary: #f2be71;
  --tertiary: #a9cbe5;

  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-soft: rgba(255, 255, 255, 0.05);

  --font-display: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --gutter: 1.5rem;
  --gutter-desktop: 2.5rem;
  --space-xs: .25rem;
  --space-sm: .5rem;
  --space-md: 1rem;
  --space-lg: 1.75rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;
  --space-3xl: 8rem;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --draw-dur: 1.4s;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: .9375rem;
  line-height: 1.65rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure, blockquote, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; appearance: none; -webkit-appearance: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--primary-container); color: var(--on-primary-container); }

/* ---------- type scale ---------- */
.headline-lg { font-family: var(--font-body); font-weight: 500; font-size: 3rem; line-height: 3.5rem; letter-spacing: -.02em; }
.headline-md { font-family: var(--font-body); font-weight: 500; font-size: 1.75rem; line-height: 2.25rem; letter-spacing: -.015em; }
.headline-sm { font-family: var(--font-body); font-weight: 600; font-size: 1.25rem; line-height: 1.75rem; }
.title-editorial { font-family: var(--font-display); font-weight: 400; font-size: 1.875rem; line-height: 2.25rem; letter-spacing: -.01em; }
.body-lg { font-weight: 300; font-size: 1.125rem; line-height: 1.85rem; letter-spacing: .01em; }
.body-md { font-size: .9375rem; line-height: 1.65rem; }
.body-sm { font-size: .8125rem; line-height: 1.35rem; letter-spacing: .01em; }
.mono { font-family: var(--font-mono); font-weight: 500; font-size: .75rem; line-height: 1rem; letter-spacing: .08em; }
.mono-xs { font-family: var(--font-mono); font-weight: 400; font-size: .6875rem; line-height: .875rem; letter-spacing: .1em; text-transform: uppercase; }
.semibold { font-weight: 600; }
.muted { color: var(--on-surface-variant); opacity: .8; }
.light { color: var(--on-surface); opacity: 1; }
.accent { color: var(--primary); }
.accent-2 { color: var(--secondary); }
.accent-3 { color: var(--tertiary); }
.block { display: block; }
.max-md { max-width: 34rem; }
.row-between { display: flex; justify-content: space-between; gap: var(--space-sm); flex-wrap: wrap; }

/* ---------- layout ---------- */
.section { padding: var(--space-3xl) var(--gutter-desktop); }
.section-low { background: var(--surface-lowest); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-md); margin-bottom: var(--space-2xl); flex-wrap: wrap; }
.section-head .headline-lg { margin-top: var(--space-xs); }
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-xl); align-items: start; }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.stack { display: flex; flex-direction: column; gap: var(--space-md); }
.stack-sm { display: flex; flex-direction: column; gap: var(--space-sm); }
.stack-lg { display: flex; flex-direction: column; gap: var(--space-lg); }

/* ---------- dots, chips, tags, buttons ---------- */
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); vertical-align: middle; margin-right: 4px; }
.dot-2 { background: var(--secondary); }
.dot-pulse { animation: pulse 2s ease-in-out infinite; }
.dot-ping { position: relative; background: var(--secondary); }
.dot-ping::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--secondary); animation: ping 1.6s ease-out infinite; }
.sq { display: inline-block; width: 6px; height: 6px; background: var(--secondary); margin-right: 6px; vertical-align: middle; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px; background: var(--surface-container); }
.tag-3 { color: var(--tertiary); }
.chip { position: absolute; padding: 3px 6px; background: rgba(14, 14, 16, .85); backdrop-filter: blur(4px); }
.chip-tl { top: var(--space-xs); left: var(--space-xs); }
.chip-br { bottom: var(--space-xs); right: var(--space-xs); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-mono); font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  transition: background .2s, color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn-primary { background: var(--primary-container); color: var(--on-primary-container); box-shadow: 0 1px 8px rgba(0, 0, 0, .2); }
.btn-primary:hover { background: var(--primary); color: var(--on-primary); }
.btn-block { width: 100%; justify-content: space-between; padding: var(--space-md) var(--space-lg); white-space: normal; text-align: left; }
.btn-sm { padding: var(--space-xs) var(--space-sm); font-size: .6875rem; justify-self: end; }
.btn .arr { font-size: 1rem; transition: transform .2s; }
.btn:hover .arr { transform: translate(2px, -2px); }
.link-arrow { color: var(--primary); transition: color .2s; }
.link-arrow:hover { color: var(--on-surface); }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(14, 14, 16, .9);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 8px rgba(0, 0, 0, .4);
}
.header-inner { height: 80px; padding: 0 var(--gutter-desktop); display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); }
.brand { display: flex; align-items: center; gap: var(--space-md); }
.brand-mark { width: 34px; height: 34px; fill: none; stroke: var(--primary); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.brand-text { display: flex; flex-direction: column; white-space: nowrap; }
.brand-name { font-family: var(--font-mono); font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.brand-sub { font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-surface-variant); opacity: .8; }
.mainnav { display: flex; align-items: center; gap: var(--space-xs); }
.mainnav a {
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--on-surface-variant); transition: color .2s, background .2s;
}
.mainnav a:hover, .mainnav a.is-active { color: var(--primary); background: var(--surface-high); }
.header-tools { display: flex; align-items: center; gap: var(--space-md); }
.live-chip { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-xs) var(--space-sm); background: var(--surface-low); font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .1em; color: var(--on-surface-variant); }
.live-chip .sep { color: var(--outline); padding: 0 2px; }
.menu-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; }
.menu-toggle svg { width: 24px; height: 24px; fill: none; stroke: var(--on-surface); stroke-width: 2; stroke-linecap: round; }
.menu-toggle line { transform-origin: 12px 12px; transition: transform .25s; }
.menu-toggle[aria-expanded="true"] .bar-1 { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bar-2 { transform: translateY(-4px) rotate(-45deg); }

main { padding-top: 80px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: var(--space-xl) var(--gutter-desktop) var(--space-2xl); overflow: hidden; }
.corner { position: absolute; top: 8px; color: var(--outline); pointer-events: none; }
.corner-tl { left: var(--gutter-desktop); }
.corner-tr { right: var(--gutter-desktop); }
.hero-grid { display: grid; grid-template-columns: 7fr 5fr; gap: var(--space-lg); align-items: stretch; }
.hero-main { display: flex; flex-direction: column; gap: var(--space-md); }
.eyebrow { display: flex; align-items: center; gap: var(--space-sm); }
.lede { max-width: 36rem; color: var(--on-surface-variant); }

.footnotes { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-sm); }
.note { background: var(--surface-low); padding: var(--space-sm); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.note .mono { text-transform: none; letter-spacing: .04em; }

/* drawing sheets */
.sheet { position: relative; background: var(--surface-low); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .5); overflow: hidden; }
.sheet-grid, .sheet-dots { position: absolute; inset: 0; pointer-events: none; }
.sheet-grid {
  background-image:
    linear-gradient(var(--hairline-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline-soft) 1px, transparent 1px);
  background-size: 48px 48px;
}
.sheet-dots { background-image: radial-gradient(circle, rgba(218, 193, 182, .18) 1px, transparent 1px); background-size: 24px 24px; opacity: .6; }
.hero-sheet { aspect-ratio: 16 / 10; display: flex; flex-direction: column; }
.hero-sheet svg { position: relative; width: 100%; height: 100%; padding: var(--space-md) var(--space-md) 0; }
.sheet-foot {
  position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-sm);
  padding: var(--space-md);
  background: linear-gradient(to top, var(--surface-lowest) 60%, transparent);
}
.sheet-foot .mono-xs { display: block; margin-bottom: var(--space-xs); }
.sheet-foot .headline-lg { font-size: clamp(1.6rem, 3.2vw, 2.75rem); line-height: 1.05; }
.sheet-foot-flat { background: rgba(14, 14, 16, .9); align-items: center; }
.sheet-foot-flat .mono { display: block; }
.sheet-sm { aspect-ratio: 3 / 2; }
.sheet-sm svg { position: relative; width: 100%; height: 100%; padding: var(--space-sm); }
.drawing-wall { position: relative; width: 100%; height: auto; padding: var(--space-md); }

/* hero side viewport */
.hero-side { display: flex; }
.viewport { position: relative; flex: 1; background: var(--surface-low); padding: var(--space-md); display: flex; flex-direction: column; gap: var(--space-md); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .5); overflow: hidden; min-height: 380px; }
.viewport > * { position: relative; }
.viewport-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); color: var(--on-surface-variant); }
.drawing-detail { width: 100%; max-width: 24rem; height: auto; margin: auto; }
.spec-pin { align-self: center; display: inline-flex; align-items: center; gap: var(--space-xs); padding: var(--space-xs) var(--space-sm); background: rgba(53, 52, 55, .9); }
.telemetry { background: var(--surface-lowest); padding: var(--space-sm); display: flex; flex-direction: column; gap: var(--space-xs); }
.telemetry-head { display: flex; justify-content: space-between; color: var(--outline); }
.telemetry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xs); padding-top: var(--space-xs); }
.telemetry-grid .mono { font-weight: 600; font-size: .9rem; }

/* ---------- SVG drawing styles ---------- */
.draw { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.draw .ink, .draw .ink-2, .draw .ink-3, .draw .ink-dim, .draw .ink-faint, .draw .ink-accent { fill: none; }
.draw .ink { stroke: var(--on-surface); stroke-width: 1.4; }
.draw .ink-2 { stroke: var(--on-surface-variant); stroke-width: 1; }
.draw .ink-3 { stroke: var(--tertiary); stroke-width: 1.2; }
.draw .ink-dim { stroke: var(--outline); stroke-width: .8; }
.draw .ink-faint { stroke: var(--hairline); stroke-width: 1; }
.draw .ink-accent { stroke: var(--primary); stroke-width: 1.6; }
.draw .stroke-accent { stroke: var(--primary-container); }
.draw .stroke-accent-2 { stroke: var(--secondary); }
.draw .stroke-accent-3 { stroke: var(--tertiary); }
.draw .fill-accent { fill: var(--primary); stroke: none; }
.draw .fill-accent-2 { fill: var(--secondary); stroke: none; }
.draw .label text { font-family: var(--font-mono); font-size: 9px; letter-spacing: .08em; fill: var(--on-surface-variant); stroke: none; }
.draw .label .accent-text { fill: var(--primary); }
.draw .label .accent-3-text { fill: var(--tertiary); }
.drawing-hero .label text { font-size: 11px; }
.icon { width: 32px; height: 32px; stroke: var(--secondary); stroke-width: 1.5; }
.icon .stroke-accent-3 { stroke: var(--tertiary); }

/* The "drawn" effect: every stroke starts fully dashed-out and draws on when
   its section enters the viewport. Each group's --d staggers the start. */
.js .draw [pathLength] {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset var(--draw-dur) var(--ease);
  transition-delay: var(--d, 0s);
}
.js .draw .label { opacity: 0; transition: opacity .6s ease; transition-delay: var(--d, 0s); }
.js .in-view .draw [pathLength], .js .draw.in-view [pathLength] { stroke-dashoffset: 0; }
.js .in-view .draw .label, .js .draw.in-view .label { opacity: 1; }
.js .draw.icon [pathLength] { --draw-dur: 1s; }

/* text reveals */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in-view { opacity: 1; transform: none; }
.js .reveal-clip span { display: inline-block; clip-path: inset(0 100% 0 0); transition: clip-path 1.6s var(--ease); }
.js .reveal-clip.in-view span { clip-path: inset(0 0 0 0); }

/* ---------- runner ---------- */
.runner-section { background: var(--surface-lowest); padding: var(--space-xl) 0; overflow: hidden; user-select: none; }
.runner-meta { display: flex; justify-content: space-between; gap: var(--space-md); padding: 0 var(--gutter-desktop) var(--space-sm); }
.runner { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; white-space: nowrap; line-height: .9; letter-spacing: -.03em; font-size: clamp(3rem, 12.5vw, 15rem); padding: 0 var(--gutter-desktop); transition: color .3s; }
.runner:hover { color: var(--primary); }
.runner-ghost { color: rgba(42, 42, 44, .9); padding-left: 0; }
.runner-ghost:hover { color: var(--primary-container); }
.runner-ghost-2 { color: rgba(42, 42, 44, .55); margin-bottom: var(--space-lg); }
.runner-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); padding: var(--space-sm) var(--gutter-desktop) 0; flex-wrap: wrap; }
.runner-foot .title-editorial { color: var(--on-surface-variant); }
.runner-foot .body-md { font-weight: 300; letter-spacing: 0; }

/* ---------- cards, metrics, ribbon ---------- */
.card { background: var(--surface-low); padding: var(--space-md); display: flex; flex-direction: column; gap: var(--space-sm); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .3); }
.card p { color: var(--on-surface-variant); }
.card strong { color: var(--on-surface); font-weight: 600; }
.card-mid { background: var(--surface-container); }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
.metric { background: var(--surface-container); padding: var(--space-sm); display: flex; flex-direction: column; gap: 2px; }
.ribbon { background: var(--surface-lowest); padding: var(--space-lg); display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .4); }
.ribbon p { color: var(--on-surface-variant); margin-top: var(--space-xs); }
.philosophy .headline-lg { margin-top: var(--space-xs); }

/* ---------- stages ---------- */
.stages { display: flex; flex-direction: column; gap: var(--space-xs); }
.stage {
  display: grid; grid-template-columns: 1fr 3fr 6fr 2fr; gap: var(--space-md); align-items: center;
  padding: var(--space-lg); background: var(--surface-container);
  transition: background .3s;
  position: relative;
}
.stage:hover { background: var(--surface-high); }
.stage-no { color: var(--outline); transition: color .3s; }
.stage:hover .stage-no { color: var(--primary); }
.stage-title { display: flex; flex-direction: column; gap: 2px; }
.stage-tag { justify-self: end; padding: var(--space-xs) var(--space-sm); background: var(--surface-low); color: var(--on-surface-variant); }
.stage-active { background: var(--surface-high); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .4); }
.stage-active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); }

/* ---------- badges ---------- */
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); margin: var(--space-xl) 0; }
.badge { background: var(--surface-low); padding: var(--space-lg); display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-md); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .4); transition: background .2s; }
.badge:hover { background: var(--surface-container); }
.badge-head { display: flex; align-items: center; justify-content: space-between; }
.badge .mono.semibold { text-transform: uppercase; display: block; margin-bottom: var(--space-xs); }
.quote-strip { background: var(--surface-container); padding: var(--space-lg); display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .4); }
.quote-strip blockquote { margin-top: var(--space-xs); max-width: 40rem; }
.quote-meta { text-align: right; flex-shrink: 0; }
.quote-meta .light { opacity: 1; }

/* ---------- projects ---------- */
.filters { display: flex; gap: var(--space-xs); }
.filter { padding: var(--space-xs) var(--space-sm); background: var(--surface-container); color: var(--on-surface-variant); font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; transition: background .2s, color .2s; }
.filter:hover { color: var(--on-surface); }
.filter.is-active { background: var(--primary-container); color: var(--on-primary-container); font-weight: 600; }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.project { background: var(--surface-low); display: flex; flex-direction: column; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .4); transition: box-shadow .3s, opacity .3s, transform .3s; }
.project:hover { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .6); }
.project.is-hidden { display: none; }
.project-art { position: relative; aspect-ratio: 4 / 3; background: var(--surface-container); overflow: hidden; }
.project-art svg { position: relative; width: 100%; height: 100%; padding: var(--space-sm); transition: transform .7s var(--ease); }
.project:hover .project-art svg { transform: scale(1.04); }
.project-body { padding: var(--space-md); display: flex; flex-direction: column; gap: var(--space-xs); }
.project-body .headline-sm { transition: color .2s; }
.project:hover .headline-sm { color: var(--primary); }
.project-body p { color: var(--on-surface-variant); }
.project .link-arrow { color: var(--on-surface); display: inline-block; transition: transform .2s; }
.project:hover .link-arrow { transform: translateX(4px); }

/* ---------- contact ledger ---------- */
.contact-lines { display: flex; align-items: center; gap: var(--space-md); flex-wrap: wrap; }
.ledger { background: var(--surface-low); padding: var(--space-xl); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .5); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.field { display: flex; flex-direction: column; gap: var(--space-xs); }
.field input, .field select, .field textarea {
  width: 100%; background: var(--surface-highest); color: var(--on-surface);
  border: 1px solid transparent; border-radius: 0; padding: var(--space-sm);
  font-family: var(--font-mono); font-size: .75rem; letter-spacing: .04em;
  transition: background .2s, border-color .2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--outline); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; background: var(--surface-high); border-color: var(--primary-deep); }
.field textarea { resize: vertical; min-height: 5rem; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--on-surface-variant) 50%), linear-gradient(135deg, var(--on-surface-variant) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
.form-note { text-align: center; }
.form-note.is-ok { color: var(--secondary); }

/* ---------- closing + footer ---------- */
.closing { padding: var(--space-2xl) var(--gutter-desktop) var(--space-lg); overflow: hidden; }
.closing .title-editorial { margin-top: var(--space-xs); }
.closing-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; text-align: right; height: 100%; }
.closing .runner-ghost { margin-top: var(--space-xl); }
.site-footer { background: var(--surface-lowest); padding: var(--space-2xl) var(--gutter-desktop) var(--space-xl); overflow: hidden; }
.site-footer .title-editorial { margin-top: var(--space-xs); }
.footer-links li { display: flex; gap: var(--space-xs); color: var(--on-surface-variant); }
.footer-links li::before { content: "+"; color: var(--outline); }
.footer-links a { transition: color .2s; }
.footer-links a:hover { color: var(--primary); }
.footer-ticks { display: flex; justify-content: space-between; gap: var(--space-md); padding: var(--space-sm) 0; margin: var(--space-2xl) 0 var(--space-lg); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); flex-wrap: wrap; }
.footer-bottom-tags { display: flex; gap: var(--space-md); color: var(--outline); }

/* ---------- animations ---------- */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.2); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .draw [pathLength], .js .reveal, .js .reveal-clip span, .js .draw .label { transition: none !important; }
  .js .draw [pathLength] { stroke-dashoffset: 0; }
  .js .draw .label { opacity: 1; }
  .js .reveal { opacity: 1; transform: none; }
  .js .reveal-clip span { clip-path: none; }
  .dot-pulse, .dot-ping::after { animation: none; }
}

/* ---------- responsive: tablet ---------- */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { min-height: 0; }
  .grid-12 > [class*="col-"] { grid-column: span 12; }
  .philosophy .grid-12.gap-md > .col-7 { grid-column: span 7; }
  .philosophy .grid-12.gap-md > .col-5 { grid-column: span 5; }
  .badges { grid-template-columns: repeat(2, 1fr); }
  .projects { grid-template-columns: repeat(2, 1fr); }
  .stage { grid-template-columns: 1fr 4fr 7fr; }
  .stage-tag, .stage .btn-sm { grid-column: 2 / -1; justify-self: start; }
  .live-chip { display: none; }
  .brand-sub { display: none; }
  .mainnav a { padding: var(--space-xs) 6px; }
}

/* ---------- responsive: phone ---------- */
@media (max-width: 767px) {
  :root { --gutter-desktop: 1.25rem; --space-3xl: 4.5rem; --space-2xl: 3rem; }
  .header-inner { height: 64px; }
  main { padding-top: 64px; }
  .brand-sub { display: none; }
  .menu-toggle { display: flex; }
  .header-tools .btn { display: none; }
  .mainnav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface-lowest); border-top: 1px solid var(--hairline);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .5);
    display: none;
  }
  .mainnav.open { display: flex; }
  .mainnav a { padding: var(--space-md) var(--gutter-desktop); border-left: 3px solid transparent; }
  .mainnav a.is-active { border-left-color: var(--primary); background: none; }

  .corner { display: none; }
  .hero { padding-top: var(--space-md); }
  .footnotes { grid-template-columns: 1fr 1fr; }
  .hero-sheet { aspect-ratio: auto; }
  .hero-sheet svg { height: auto; aspect-ratio: 800 / 480; padding: var(--space-sm) var(--space-sm) 0; }
  .sheet-foot { flex-direction: column; align-items: flex-start; background: var(--surface-lowest); }
  .headline-lg { font-size: 2rem; line-height: 2.35rem; letter-spacing: -.01em; }
  .headline-md { font-size: 1.5rem; line-height: 2rem; }
  .title-editorial { font-size: 1.5rem; line-height: 1.9rem; }
  .runner-meta { flex-direction: column; gap: var(--space-xs); }
  .hide-sm { display: none; }
  .philosophy .grid-12.gap-md > .col-7, .philosophy .grid-12.gap-md > .col-5 { grid-column: span 12; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .ribbon { grid-template-columns: 1fr; padding: var(--space-md); }
  .stage { grid-template-columns: 1fr; gap: var(--space-sm); padding: var(--space-md); }
  .stage-no { font-size: 1.5rem; }
  .stage-tag, .stage .btn-sm { grid-column: auto; }
  .badges { grid-template-columns: 1fr; }
  .quote-strip { flex-direction: column; align-items: flex-start; }
  .quote-meta { text-align: left; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .filters { flex-wrap: wrap; }
  .projects { grid-template-columns: 1fr; }
  .ledger { padding: var(--space-md); }
  .two-col { grid-template-columns: 1fr; }
  .closing-right { align-items: flex-start; text-align: left; }
  .footer-ticks { flex-direction: column; gap: var(--space-xs); }
  .footer-bottom-tags { flex-wrap: wrap; }
}
