/* Monark — final consolidated stylesheet.
   D2 palette (cream + ink + monarch orange) · D3 modular layout · D1 hero wall.
*/

:root {
  /* Surfaces */
  --bg: #f4ede1;
  --bg-2: #ece4d4;
  --bg-3: #e0d6c2;
  --bg-card: #faf6ec;
  --bg-deep: #1a1612;       /* used for dark feature blocks / plate dividers */

  /* Ink */
  --ink: #1a1612;
  --ink-2: #3a3024;
  --ink-dim: #6b5e4a;
  --ink-mute: #9b8e76;

  /* Rules */
  --rule: rgba(26, 22, 18, 0.18);
  --rule-soft: rgba(26, 22, 18, 0.08);
  --rule-strong: rgba(26, 22, 18, 0.32);

  /* Brand */
  --orange: #d9621f;
  --orange-2: #ff7a1a;
  --orange-3: #ffae5a;
  --orange-deep: #9a3a0a;
  --orange-soft: rgba(217, 98, 31, 0.12);
  --orange-glow: rgba(217, 98, 31, 0.4);

  --navy: #14223d;
  --navy-2: #1f3050;

  --good: #1b7d3b;
  --warn: #b25a0a;

  --pad-x: clamp(20px, 4vw, 72px);
  --grid-line: rgba(26, 22, 18, 0.045);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Sentient', Georgia, serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* === Type === */
.t-array       { font-family: 'Array', sans-serif; font-weight: 700; }
.t-arrayw      { font-family: 'Array Wide', sans-serif; font-weight: 700; }
.t-khand       { font-family: 'Khand', sans-serif; }
.t-display     { font-family: 'Array Wide', sans-serif; font-weight: 700; line-height: 0.88; letter-spacing: -0.025em; text-transform: uppercase; }
.t-display-c   { font-family: 'Array', sans-serif; font-weight: 700; line-height: 0.92; letter-spacing: -0.03em; text-transform: uppercase; }
.t-eyebrow     { font-family: 'Khand', sans-serif; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; font-size: 12px; color: var(--ink-dim); }
.t-mono        { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: 11px; letter-spacing: 0.05em; }
.t-italic      { font-family: 'Sentient', serif; font-style: italic; font-weight: 300; }
.t-orange      { color: var(--orange); }

a, button, [data-monarch-magnet] { cursor: pointer; }

/* === NAV === */
.nav {
  position: fixed; top: 14px; left: 14px; right: 14px; z-index: 100;
  padding: 10px 18px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px;
  background: rgba(244, 237, 225, 0.84);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--rule);
  border-radius: 999px;
  box-shadow: 0 6px 32px rgba(26, 22, 18, 0.06);
}
.nav-logo { font-family: 'Array Wide', sans-serif; font-weight: 700; font-size: 14px; letter-spacing: 0.04em; color: var(--ink); text-transform: uppercase; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.nav-logo .mark { width: 14px; height: 14px; background: var(--orange); border-radius: 50%; display: inline-block; box-shadow: 0 0 12px var(--orange-glow); }
.nav-links { display: flex; gap: 26px; justify-self: center; }
.nav-links a { font-family: 'Khand', sans-serif; font-weight: 500; letter-spacing: 0.14em; font-size: 12px; text-transform: uppercase; color: var(--ink-2); text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--orange); }
.nav-right { justify-self: end; display: flex; gap: 10px; align-items: center; }
.nav-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Khand', sans-serif; letter-spacing: 0.12em; font-size: 11px; text-transform: uppercase; color: var(--ink-dim);
}
.nav-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.nav-cta {
  font-family: 'Khand', sans-serif; font-weight: 600; letter-spacing: 0.12em; font-size: 12px; text-transform: uppercase;
  background: var(--ink); color: var(--bg); padding: 8px 16px; border-radius: 999px;
  text-decoration: none; transition: all .25s ease; border: 1px solid var(--ink);
}
.nav-cta:hover { background: var(--orange); border-color: var(--orange); color: #fff; }

/* === Monark veil: fixed full-viewport wall sitting on top of the page === */
.monark-veil {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  background: var(--bg);
  transition: background-color 0.6s ease, opacity 0.6s ease;
  /* Cursor-reveal: punch a soft hole around the cursor so the actual page
     underneath shows through. JS sets --mx/--my on mousemove. */
  --mx: -400px;
  --my: -400px;
  -webkit-mask: radial-gradient(circle 220px at var(--mx) var(--my),
                  transparent 0%,
                  rgba(0,0,0,0.18) 35%,
                  rgba(0,0,0,0.72) 70%,
                  black 100%);
          mask: radial-gradient(circle 220px at var(--mx) var(--my),
                  transparent 0%,
                  rgba(0,0,0,0.18) 35%,
                  rgba(0,0,0,0.72) 70%,
                  black 100%);
}
.monark-veil canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
/* During dispersal: drop the background and the cursor-reveal mask so
   butterflies fly across the live page. Veil itself stays fully opaque
   until the wall script signals all butterflies have left. */
.monark-veil.dispersing {
  background: transparent;
  -webkit-mask: none;
          mask: none;
}
.monark-veil.dispersed { opacity: 0; }

/* Disperse hint sitting on the veil */
.veil-hint {
  position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--ink-dim);
  pointer-events: none; text-align: center;
  transition: opacity .6s ease;
}
.veil-hint .label {
  font-family: 'Khand', sans-serif; letter-spacing: 0.2em; font-size: 12px;
  text-transform: uppercase;
  background: rgba(244, 237, 225, 0.78);
  padding: 6px 14px; border-radius: 999px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}
.veil-hint .arr-down {
  width: 12px; height: 12px;
  border-right: 1px solid var(--orange); border-bottom: 1px solid var(--orange);
  transform: rotate(45deg);
  animation: bob 1.6s infinite ease-in-out;
}
.monark-veil.dispersed .veil-hint { opacity: 0; }
@keyframes bob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50%      { transform: rotate(45deg) translate(4px, 4px); }
}

/* === HERO ============================================= */
.hero {
  position: relative; min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 35%, rgba(255,174,90,0.18) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  border-bottom: 1px solid var(--rule);
}

.hero-content {
  position: relative; z-index: 3;
  padding: 130px var(--pad-x) 64px;
  min-height: 100vh;
  display: grid; grid-template-rows: auto 1fr auto; gap: 32px;
}

.hero-meta-row {
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.hero-meta-row .left { display: flex; gap: 24px; align-items: center; }
.hero-meta-row .ver { color: var(--orange); }

.hero-center { display: grid; align-items: center; position: relative; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: 'Khand', sans-serif; font-weight: 500; letter-spacing: 0.18em; font-size: 13px; text-transform: uppercase; color: var(--ink-2);
}
.hero-eyebrow .line { width: 40px; height: 1px; background: var(--orange); }

.hero-h1 {
  margin-top: 48px;
  font-family: 'Array Wide', sans-serif; font-weight: 700; text-transform: uppercase;
  font-size: clamp(52px, 10vw, 160px); line-height: 0.92; letter-spacing: -0.03em;
  color: var(--ink);
}
.hero-h1 .row { display: block; white-space: nowrap; }
.hero-h1 .gradient {
  background: linear-gradient(92deg, #ffae5a 0%, #ff7a1a 38%, #d9621f 70%, #9a3a0a 100%);
  background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-h1 .italic {
  font-family: 'Sentient', serif; font-style: italic; font-weight: 300;
  text-transform: none; color: var(--orange); letter-spacing: -0.04em; display: inline-block; transform: translateY(-0.08em);
}
.hero-h1 .outline { color: transparent; -webkit-text-stroke: 2px var(--ink); }

.hero-sub {
  margin-top: 28px;
  max-width: 640px;
  font-size: clamp(16px, 1.4vw, 19px); color: var(--ink-2); line-height: 1.55;
}
.hero-sub em { font-style: italic; color: var(--orange); }

.hero-cta-row {
  margin-top: 36px; display: flex; gap: 12px; align-items: center;
}

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 26px; border-radius: 999px;
  font-family: 'Khand', sans-serif; font-weight: 600; letter-spacing: 0.12em; font-size: 13px; text-transform: uppercase;
  text-decoration: none; transition: all .25s ease; border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--orange); color: #fff; box-shadow: 0 0 40px var(--orange-glow); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-deep); box-shadow: 0 0 40px var(--orange-glow); transform: translateY(-1px); }
.btn .arr { transition: transform .25s; }
.btn:hover .arr { transform: translateX(4px); }

/* Hero data cards row */
.hero-cards {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 12px;
  position: relative; z-index: 5;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 18px;
  position: relative;
  transition: border-color .25s ease, transform .25s ease;
  overflow: hidden;
}
.card:hover { border-color: var(--rule-strong); }
.card .label {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.card h4 {
  font-family: 'Array', sans-serif; font-weight: 700; text-transform: uppercase;
  font-size: 20px; letter-spacing: -0.015em; margin-top: 6px;
}
.card-sub { font-size: 13px; color: var(--ink-dim); line-height: 1.5; margin-top: 10px; }

.card-live { display: flex; flex-direction: column; gap: 10px; }
.card-live .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; background: rgba(27, 125, 59, 0.12);
  color: var(--good); font-family: 'JetBrains Mono', monospace; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.06em; width: max-content;
}
.card-live .pill::before { content: ''; width: 5px; height: 5px; background: var(--good); border-radius: 50%; animation: pulse 2s infinite ease-in-out; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.card-live .agent-rows { display: flex; flex-direction: column; gap: 6px; }
.agent-row {
  display: flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink);
}
.agent-row .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--orange); flex-shrink: 0; }
.agent-row .dot.b { background: var(--navy); }
.agent-row .dot.g { background: var(--good); }
.agent-row .name { flex: 1; }
.agent-row .val { color: var(--ink-mute); }

.spark { display: block; width: 100%; height: 56px; margin-top: 12px; }
.spark .line { fill: none; stroke: var(--orange); stroke-width: 1.4; }
.spark .fill { fill: url(#sg-light); }

.card-stat .big {
  font-family: 'Array', sans-serif; font-weight: 700; font-size: 52px; letter-spacing: -0.04em;
  margin-top: 6px; color: var(--orange); line-height: 1;
}
.card-stat .delta { font-family: 'Khand', sans-serif; letter-spacing: 0.12em; font-size: 12px; color: var(--good); text-transform: uppercase; margin-top: 4px; }

.card-cta { display: flex; flex-direction: column; gap: 12px; justify-content: space-between; }
.card-cta .btn { width: 100%; justify-content: center; padding: 12px 18px; }

/* === Sections ================================================ */
section { position: relative; }
.sec-pad { padding: 140px var(--pad-x); }
.sec-head-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: end;
  padding-bottom: 24px; border-bottom: 1px solid var(--rule);
  margin-bottom: 64px;
}
.sec-head-row .num { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--orange); letter-spacing: 0.1em; text-transform: uppercase; align-self: center; }
.sec-head-row h2 {
  font-family: 'Array', sans-serif; font-weight: 700; text-transform: uppercase;
  font-size: clamp(38px, 5vw, 76px); line-height: 0.92; letter-spacing: -0.025em;
}
.sec-head-row .right {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-mute);
  text-transform: uppercase; text-align: right; line-height: 1.6;
}

/* Manifesto */
.manifesto { background: var(--bg-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.manifesto-row {
  display: grid; grid-template-columns: 220px 1fr 220px; gap: 40px; align-items: start;
}
.manifesto-body {
  font-family: 'Sentient', serif; font-size: clamp(26px, 3vw, 44px); line-height: 1.22;
  font-weight: 300; letter-spacing: -0.005em; text-wrap: pretty;
}
.manifesto-body em { font-style: italic; color: var(--orange); font-weight: 400; }
.manifesto-tags { display: flex; flex-direction: column; gap: 8px; }
.tag {
  padding: 6px 12px; border: 1px solid var(--rule-strong); border-radius: 999px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-2); width: max-content;
}
.tag.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tag.or { background: var(--orange); color: #fff; border-color: var(--orange); }

/* === PLATE DIVIDER (wing scales) === */
.plate {
  height: 60vh; min-height: 360px; position: relative; overflow: hidden;
  background: #1a0a04;
}
.plate canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.plate-caption {
  position: absolute; bottom: 24px; left: var(--pad-x); right: var(--pad-x);
  z-index: 2; display: flex; justify-content: space-between; align-items: end;
  color: rgba(255,255,255,0.7);
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.plate-caption .big {
  font-family: 'Khand', sans-serif; font-weight: 500; letter-spacing: 0.14em; font-size: 18px;
  color: #fff; text-transform: uppercase;
}
.plate-caption .body { max-width: 540px; line-height: 1.5; margin-top: 6px; }
.plate-corner {
  position: absolute; top: 24px; left: var(--pad-x);
  z-index: 2; color: rgba(255,255,255,0.7);
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  display: flex; align-items: baseline; gap: 14px;
}
.plate-corner .n { color: var(--orange-3); font-size: 14px; letter-spacing: 0.1em; }
.plate-corner .crosshair { display: inline-block; }
.plate-corner .crosshair::before { content: '+'; color: var(--orange-3); margin-right: 6px; font-size: 18px; }
.plate-scale {
  position: absolute; top: 24px; right: var(--pad-x); z-index: 2;
  color: rgba(255,255,255,0.6); font-family: 'JetBrains Mono', monospace; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em;
  display: flex; align-items: center; gap: 8px;
}
.plate-scale .bar { width: 60px; height: 1px; background: #fff; }

/* === SERVICES grid =========================================== */
.services { background: var(--bg); }
.svc-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
}
.svc-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 28px;
  position: relative;
  display: flex; flex-direction: column;
  transition: border-color .25s, transform .25s, background .25s;
  overflow: hidden;
}
.svc-card:hover { border-color: var(--orange); transform: translateY(-3px); }
.svc-card.span-2 { grid-column: span 2; }
.svc-card.span-3 { grid-column: span 3; }
.svc-card.span-4 { grid-column: span 4; }
.svc-card.span-6 { grid-column: span 6; }

.svc-card .head {
  display: flex; justify-content: space-between; align-items: baseline;
}
.svc-card .ix {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--orange); letter-spacing: 0.1em;
}
.svc-card .kicker {
  font-family: 'Khand', sans-serif; font-weight: 500; letter-spacing: 0.14em; font-size: 11px; color: var(--ink-mute); text-transform: uppercase;
}
.svc-card h3 {
  margin-top: 16px;
  font-family: 'Array', sans-serif; font-weight: 700; text-transform: uppercase;
  font-size: 28px; line-height: 0.95; letter-spacing: -0.02em;
}
.svc-card .desc {
  margin-top: 12px; color: var(--ink-2); font-size: 14px; line-height: 1.55;
  max-width: 540px;
}
.svc-card .price {
  margin-top: 14px;
  font-family: 'Khand', sans-serif; letter-spacing: 0.12em; font-size: 12px; text-transform: uppercase; color: var(--ink-dim);
}
.svc-card .price b { color: var(--orange); font-weight: 600; font-family: 'Array', sans-serif; }
.svc-card .widget {
  margin-top: 20px; flex: 1; min-height: 140px;
  position: relative;
  border-top: 1px dashed var(--rule);
  padding-top: 18px;
}
.svc-card .more {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Khand', sans-serif; letter-spacing: 0.14em; font-size: 13px; text-transform: uppercase; color: var(--orange);
}
.svc-card .more .arr { transition: transform .25s; }
.svc-card:hover .more .arr { transform: translateX(4px); }

/* === Service widgets ========================================= */
/* Gauge */
.gauge {
  display: flex; align-items: center; gap: 20px;
}
.gauge svg { flex-shrink: 0; }
.gauge .gauge-track { fill: none; stroke: var(--rule); stroke-width: 10; }
.gauge .gauge-fill { fill: none; stroke: url(#gg); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.6s cubic-bezier(.2,.7,.2,1); }
.gauge-num {
  font-family: 'Array', sans-serif; font-weight: 700; font-size: 48px; letter-spacing: -0.04em;
  line-height: 1; color: var(--ink);
}
.gauge-num .unit { color: var(--orange); font-size: 24px; }
.gauge-lbl { font-family: 'Khand', sans-serif; letter-spacing: 0.12em; font-size: 11px; text-transform: uppercase; color: var(--ink-mute); margin-top: 4px; }
.gauge-rows { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.gauge-rows .gr {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  font-family: 'Khand', sans-serif; letter-spacing: 0.08em; font-size: 13px; text-transform: uppercase; color: var(--ink-2);
}
.gauge-rows .bar { height: 4px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.gauge-rows .bar .fill { height: 100%; background: var(--orange); border-radius: 2px; width: 0; transition: width 1.6s cubic-bezier(.2,.7,.2,1); }
.gauge-rows .gr .row2 { grid-column: 1 / -1; }

/* Workflow map */
.workflow {
  width: 100%; height: 220px; position: relative;
}
.workflow svg { width: 100%; height: 100%; }
.workflow .node {
  fill: var(--bg-card); stroke: var(--ink); stroke-width: 1.5;
}
.workflow .node-orange { fill: var(--orange); stroke: var(--orange); }
.workflow .link { fill: none; stroke: var(--ink-mute); stroke-width: 1.2; stroke-dasharray: 4 4; }
.workflow .pulse {
  fill: var(--orange); r: 3;
  animation: pulse-move 4s infinite linear;
}
.workflow .node-label {
  font-family: 'Khand', sans-serif; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; fill: var(--ink-2);
}
@keyframes pulse-move {
  0% { offset-distance: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

/* Agent activity */
.agents-feed { display: flex; flex-direction: column; gap: 8px; }
.agent-fr {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center;
  padding: 8px 10px; border: 1px solid var(--rule); border-radius: 6px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  background: var(--bg);
}
.agent-fr .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); animation: pulse 2s infinite; }
.agent-fr .dot.g { background: var(--good); }
.agent-fr .dot.b { background: var(--navy); }
.agent-fr .name { color: var(--ink); font-weight: 500; }
.agent-fr .stat { color: var(--ink-mute); }
.agent-fr .badge {
  padding: 2px 8px; border-radius: 999px;
  background: rgba(27, 125, 59, 0.12); color: var(--good);
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
}
.agent-fr .badge.processing { background: rgba(217, 98, 31, 0.12); color: var(--orange); }

/* Integration hub */
.hub {
  width: 100%; height: 220px; position: relative;
}
.hub svg { width: 100%; height: 100%; }
.hub .ring { fill: none; stroke: var(--rule); stroke-width: 1; stroke-dasharray: 3 3; }
.hub .hub-node { fill: var(--bg-card); stroke: var(--ink); stroke-width: 1.5; }
.hub .hub-center { fill: var(--orange); stroke: var(--orange); }
.hub .spoke { stroke: var(--ink-mute); stroke-width: 1; }
.hub .lbl { font-family: 'JetBrains Mono', monospace; font-size: 10px; fill: var(--ink-2); }

/* Mini-dashboard for Butterfly OS */
.os-dash {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
}
.os-tile {
  padding: 12px; background: var(--bg); border: 1px solid var(--rule); border-radius: 6px;
}
.os-tile .lb {
  font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.os-tile .vb {
  font-family: 'Array', sans-serif; font-weight: 700; font-size: 22px; color: var(--orange); letter-spacing: -0.02em; margin-top: 4px;
}
.os-tile .sb { font-family: 'Khand', sans-serif; font-size: 11px; color: var(--good); letter-spacing: 0.08em; text-transform: uppercase; }
.os-tile .sb.warn { color: var(--warn); }

/* Training modules */
.modules { display: flex; flex-direction: column; gap: 10px; }
.module {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--rule); border-radius: 6px;
  background: var(--bg);
}
.module .ix {
  width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Array', sans-serif; font-weight: 700; font-size: 11px;
}
.module .ix.done { background: var(--good); }
.module .ix.cur { background: var(--orange); }
.module .ttl { font-family: 'Khand', sans-serif; font-weight: 500; letter-spacing: 0.1em; font-size: 13px; text-transform: uppercase; color: var(--ink); }
.module .pct { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-mute); }
.module .pct b { color: var(--orange); font-weight: 600; font-family: 'Array', sans-serif; }

/* === By the numbers ========================================== */
.numbers { background: var(--bg-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.numgrid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.numgrid .nb {
  background: var(--bg-card); border: 1px solid var(--rule); border-radius: 10px;
  padding: 28px; position: relative; overflow: hidden;
  min-height: 220px; display: flex; flex-direction: column; justify-content: space-between;
}
.numgrid .nb .lbl { font-family: 'Khand', sans-serif; letter-spacing: 0.14em; font-size: 11px; text-transform: uppercase; color: var(--ink-mute); }
.numgrid .nb .big { font-family: 'Array Wide', sans-serif; font-weight: 700; font-size: clamp(48px, 5vw, 88px); letter-spacing: -0.04em; line-height: 1; color: var(--orange); }
.numgrid .nb .desc { font-size: 13px; color: var(--ink-2); line-height: 1.5; max-width: 220px; }
.numgrid .nb .vein {
  position: absolute; right: -40px; bottom: -40px; width: 220px; height: 220px;
  opacity: 0.08; pointer-events: none;
}

/* === Process rail ============================================ */
.process { background: var(--bg); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.rail {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  position: relative;
}
.rail::before {
  content: ''; position: absolute; left: 28px; right: 28px; top: 48px; height: 1px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange) 25%, var(--rule) 25%, var(--rule) 100%);
  z-index: 0;
}
.rail-card {
  background: var(--bg-card); border: 1px solid var(--rule); border-radius: 10px;
  padding: 24px; position: relative; z-index: 1;
  transition: border-color .25s, transform .25s;
}
.rail-card:hover { border-color: var(--orange); }
.rail-card .ix-wrap { display: flex; align-items: center; gap: 12px; }
.rail-card .ring {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--orange);
  background: var(--bg-card); position: relative;
}
.rail-card .ring::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--orange); }
.rail-card .ix { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--orange); letter-spacing: 0.1em; }
.rail-card .week { font-family: 'Khand', sans-serif; font-size: 12px; letter-spacing: 0.14em; color: var(--ink-mute); text-transform: uppercase; margin-top: 4px; }
.rail-card h4 {
  margin-top: 14px;
  font-family: 'Array', sans-serif; font-weight: 700; text-transform: uppercase;
  font-size: 22px; letter-spacing: -0.01em;
}
.rail-card p { margin-top: 12px; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.rail-card .ticks { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.tick { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-2); display: flex; gap: 8px; align-items: baseline; }
.tick::before { content: '◆'; color: var(--orange); font-size: 8px; }
.rail-card .meter {
  margin-top: 18px; height: 3px; background: var(--rule); border-radius: 2px; overflow: hidden;
}
.rail-card .meter .fill { height: 100%; background: var(--orange); border-radius: 2px; width: 0; transition: width 1.4s cubic-bezier(.2,.7,.2,1); }

/* === Cases =================================================== */
.cases { background: var(--bg-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.case-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.case-tile {
  position: relative;
  background: var(--bg-card); border: 1px solid var(--rule); border-radius: 10px;
  padding: 28px; min-height: 360px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: border-color .25s, transform .25s;
  overflow: hidden;
}
.case-tile:hover { border-color: var(--orange); transform: translateY(-3px); }
.case-tile .top { display: flex; justify-content: space-between; align-items: start; }
.case-tile .ix { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--orange); }
.case-tile .industry { font-family: 'Khand', sans-serif; font-size: 12px; letter-spacing: 0.12em; color: var(--ink-mute); text-transform: uppercase; text-align: right; line-height: 1.4; }
.case-tile h3 {
  margin-top: 18px;
  font-family: 'Array', sans-serif; font-weight: 700; text-transform: uppercase;
  font-size: 30px; letter-spacing: -0.02em; line-height: 0.95;
}
.case-tile .quote { margin-top: 16px; font-family: 'Sentient', serif; font-style: italic; color: var(--ink-dim); font-size: 15px; line-height: 1.5; }
.case-tile .case-spark { margin-top: 18px; }
.case-tile .metric-row { display: flex; gap: 18px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--rule); }
.case-tile .met .val { font-family: 'Array', sans-serif; font-weight: 700; color: var(--orange); font-size: 28px; letter-spacing: -0.02em; }
.case-tile .met .lbl { font-family: 'Khand', sans-serif; font-size: 11px; color: var(--ink-mute); letter-spacing: 0.12em; text-transform: uppercase; }

/* === Team =================================================== */
.team { background: var(--bg); }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.member {
  background: var(--bg-card); border: 1px solid var(--rule); border-radius: 10px;
  padding: 18px; transition: border-color .25s, transform .25s;
}
.member:hover { border-color: var(--orange); transform: translateY(-3px); }
.member .frame {
  aspect-ratio: 1/1; background: var(--bg-3);
  border: 1px solid var(--rule); border-radius: 6px;
  position: relative; overflow: hidden;
}
.member .frame .placeholder {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(26,22,18,0.05) 0 8px, transparent 8px 16px);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-mute); font-family: 'JetBrains Mono', monospace; font-size: 11px;
}
.member .frame .placeholder span { padding: 5px 10px; border: 1px solid var(--rule); background: var(--bg-card); }
.member h4 { margin-top: 14px; font-family: 'Array', sans-serif; font-weight: 700; text-transform: uppercase; font-size: 18px; letter-spacing: -0.01em; }
.member .role { font-family: 'Khand', sans-serif; letter-spacing: 0.14em; font-size: 12px; text-transform: uppercase; color: var(--orange); margin-top: 4px; }

/* === Closing ================================================ */
.closing {
  background: var(--bg-deep); color: var(--bg); padding: 200px var(--pad-x);
  text-align: center; position: relative; overflow: hidden;
}
.closing canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.62; }
.closing > *:not(canvas):not(.wing-stat-popup) { position: relative; z-index: 2; }
.closing::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse 55% 50% at 50% 50%, rgba(26,10,4,0.78), rgba(26,10,4,0) 70%);
}
.closing-eyebrow { font-family: 'Khand', sans-serif; letter-spacing: 0.18em; font-size: 13px; text-transform: uppercase; color: var(--orange-3); margin-bottom: 28px; }
.closing-title {
  font-family: 'Array Wide', sans-serif; font-weight: 700; text-transform: uppercase;
  font-size: clamp(56px, 8vw, 130px); line-height: 0.88; letter-spacing: -0.025em;
  max-width: 1300px; margin: 0 auto;
}
.closing-title .italic { font-style: italic; color: var(--orange-3); font-family: 'Sentient', serif; text-transform: none; font-weight: 300; letter-spacing: -0.02em; }
.closing-sub { margin: 36px auto 48px; max-width: 580px; font-size: 19px; color: rgba(244,237,225,0.75); line-height: 1.5; }
.closing-form {
  display: flex; max-width: 560px; margin: 0 auto;
  border: 1px solid rgba(244,237,225,0.3); border-radius: 999px;
  padding: 6px; transition: border-color .25s ease;
}
.closing-form:focus-within { border-color: var(--orange-3); }
.closing-form input { flex: 1; background: transparent; border: 0; outline: none; padding: 14px 22px; color: var(--bg); font-family: 'Sentient', serif; font-size: 16px; }
.closing-form input::placeholder { color: rgba(244,237,225,0.4); }
.closing-form button { background: var(--orange); color: #fff; border: 0; padding: 12px 24px; border-radius: 999px; font-family: 'Khand', sans-serif; font-weight: 600; letter-spacing: 0.12em; font-size: 13px; text-transform: uppercase; cursor: pointer; transition: all .25s; }
.closing-form button:hover { background: var(--orange-deep); }

/* === Footer ================================================= */
footer { background: var(--bg); border-top: 1px solid var(--rule); padding: 60px var(--pad-x) 36px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--rule); }
.foot-logo { font-family: 'Array Wide', sans-serif; font-weight: 700; font-size: 22px; }
.foot-logo .mark { width: 14px; height: 14px; background: var(--orange); border-radius: 50%; display: inline-block; margin-right: 6px; }
.foot-tag { margin-top: 10px; font-size: 14px; color: var(--ink-dim); max-width: 280px; line-height: 1.5; }
.foot-col h5 { font-family: 'Khand', sans-serif; letter-spacing: 0.18em; font-size: 11px; text-transform: uppercase; color: var(--ink-mute); }
.foot-col ul { list-style: none; margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { text-decoration: none; color: var(--ink); font-family: 'Khand', sans-serif; letter-spacing: 0.08em; font-size: 14px; }
.foot-col a:hover { color: var(--orange); }
.foot-bottom { margin-top: 22px; display: flex; justify-content: space-between; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.06em; color: var(--ink-mute); text-transform: uppercase; }

/* === Scroll-reveal utility =================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: .1s; }
.reveal.delay-2 { transition-delay: .2s; }
.reveal.delay-3 { transition-delay: .3s; }
.reveal.delay-4 { transition-delay: .4s; }

/* Sparkline draw animation */
.spark-anim .line { stroke-dasharray: 600; stroke-dashoffset: 600; transition: stroke-dashoffset 2s cubic-bezier(.2,.7,.2,1); }
.spark-anim.in .line { stroke-dashoffset: 0; }
.spark-anim .fill { opacity: 0; transition: opacity .9s 1s; }
.spark-anim.in .fill { opacity: 1; }

/* === Responsive ============================================== */
@media (max-width: 1100px) {
  .hero-cards { grid-template-columns: 1fr 1fr; }
  .svc-grid { grid-template-columns: repeat(4, 1fr); }
  .svc-card.span-3, .svc-card.span-4 { grid-column: span 4; }
  .numgrid { grid-template-columns: 1fr 1fr; }
  .rail { grid-template-columns: 1fr 1fr; }
  .case-row { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .manifesto-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .hero-cards { grid-template-columns: 1fr; }
  .sec-head-row { grid-template-columns: 1fr; gap: 8px; }
  .svc-grid { grid-template-columns: 1fr; }
  .svc-card.span-2, .svc-card.span-3, .svc-card.span-4 { grid-column: span 1; }
  .numgrid { grid-template-columns: 1fr; }
  .rail { grid-template-columns: 1fr; }
  .rail::before { display: none; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
