/* FORGE — Private AI Engineering Workspace — visual system */

:root {
  --bg: #07080a;
  --bg-0: #050506;
  --bg-1: #0b0d10;
  --bg-2: #101318;
  --bg-glass: rgba(16, 19, 24, 0.55);
  --border: #1f242b;
  --border-soft: #171b20;
  --border-bright: #33393f;
  --text: #f0f2f4;
  --text-dim: #9aa2ab;
  --text-faint: #565d65;
  --ember: #ff8a4c;
  --ember-soft: #ffb37a;
  --ember-dim: rgba(255, 138, 76, 0.16);
  --steel: #8fb2cf;
  --ok: #6fcf9a;
  --warn: #e8b95f;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  --sans: -apple-system, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", "Meiryo", "Segoe UI", sans-serif;
  --max: 1180px;
  --ease: cubic-bezier(.16,.8,.24,1);
}

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-feature-settings: "palt" 1;
  letter-spacing: 0.01em;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
  position: relative;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }
section { position: relative; }
code { font-family: var(--mono); }
::selection { background: rgba(255,138,76,0.28); color: #fff; }
a:focus-visible, button:focus-visible, .btn:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 4px; }

/* ================= AMBIENT BACKGROUND ================= */
.bg-fixed { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-grid {
  position: absolute; inset: -10% -10%;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 30%, transparent 78%);
  animation: gridDrift 60s linear infinite;
}
@keyframes gridDrift { from { transform: translate3d(0,0,0); } to { transform: translate3d(-64px,-64px,0); } }
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 3;
  opacity: 0.03; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.glow-orb {
  position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none;
  opacity: 0.55; will-change: transform;
}
.glow-orb.ember { background: radial-gradient(circle, rgba(255,138,76,0.55), transparent 70%); }
.glow-orb.steel { background: radial-gradient(circle, rgba(143,178,207,0.4), transparent 70%); }

/* ================= NAV ================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color .4s ease, background-color .4s ease, backdrop-filter .4s ease;
}
.nav.scrolled { background: rgba(7,8,10,0.72); backdrop-filter: blur(14px) saturate(140%); border-bottom-color: var(--border); }
.nav-inner { max-width: var(--max); margin: 0 auto; padding: 17px 32px; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2; }
.brand { font-family: var(--mono); font-size: 14px; letter-spacing: 0.16em; color: var(--text); display: flex; align-items: center; gap: 10px; font-weight: 600; }
.brand .mark { width: 15px; height: 15px; position: relative; flex: none; }
.brand .mark svg { width: 100%; height: 100%; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 22px; font-size: 12.5px; color: var(--text-dim); font-family: var(--mono); letter-spacing: 0.03em; }
.nav-links a { position: relative; padding: 4px 0; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-links .nav-portfolio { color: var(--ember-soft); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px; background: var(--ember);
  transition: width .25s var(--ease);
}
.nav-links a:hover::after { width: 100%; }

/* ---------- mobile nav ---------- */
.nav-toggle {
  display: none; flex: none; width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border-soft); background: rgba(255,255,255,0.02);
  align-items: center; justify-content: center; gap: 4px; flex-direction: column;
  cursor: pointer;
}
.nav-toggle .nt-bar { width: 16px; height: 1.5px; background: var(--text-dim); transition: transform .25s var(--ease), opacity .2s ease; }
.nav-toggle[aria-expanded="true"] .nt-bar:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nt-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nt-bar:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
.nav-mobile { display: none; }
@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav-mobile {
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(7,8,10,0.96); backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--border); max-height: calc(100vh - 60px); overflow-y: auto;
  }
  .nav-mobile[hidden] { display: none; }
  .nav-mobile:not([hidden]) { display: flex; flex-direction: column; padding: 6px 32px 18px; }
  .nav-mobile a {
    padding: 13px 0; font-family: var(--mono); font-size: 13.5px; color: var(--text-dim);
    border-bottom: 1px solid var(--border-soft); min-height: 44px; display: flex; align-items: center;
  }
  .nav-mobile a:last-child { border-bottom: none; }
  .nav-mobile a:hover, .nav-mobile a:focus-visible { color: var(--text); }
  .nav-mobile .nav-portfolio { color: var(--ember-soft); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-toggle .nt-bar { transition: none; }
}

/* ================= GLASS PANEL BASE ================= */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(130%);
  border: 1px solid var(--border);
  border-radius: 16px;
}

/* ================= HERO ================= */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 150px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero-canvas { position: absolute; inset: 0; z-index: 0; opacity: 0.9; }
.hero-word {
  font-family: var(--sans); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(56px, 11vw, 132px); line-height: 0.94; margin: 0 0 22px 0;
  background: linear-gradient(180deg, #ffffff 24%, #c9cdd2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  position: relative; width: fit-content;
  opacity: 0; animation: rise 1s var(--ease) .2s forwards, forgeGlow 6s ease-in-out 1.2s infinite;
}
@keyframes forgeGlow {
  0%, 100% { text-shadow: 0 0 120px rgba(255,138,76,0.18); }
  50% { text-shadow: 0 0 150px rgba(255,138,76,0.32); }
}
.hero-sub-line {
  font-family: var(--mono); font-size: clamp(12px, 1.4vw, 14px); letter-spacing: 0.12em; color: var(--text-dim);
  text-transform: uppercase; margin-bottom: 40px;
  opacity: 0; animation: rise .8s var(--ease) .32s forwards;
}
.hero h1 {
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.22; font-weight: 700; margin: 0 0 28px 0; max-width: 16ch; letter-spacing: -0.01em;
  opacity: 0; animation: rise .9s var(--ease) .42s forwards;
}
.philosophy-line {
  font-size: clamp(19px, 2.6vw, 27px); line-height: 1.6; font-weight: 700; color: var(--text);
  max-width: 22ch; margin: 28px 0;
}
.philosophy-line em { font-style: normal; color: var(--ember); }
.philosophy-line.small { font-size: clamp(15px, 1.8vw, 18px); font-weight: 600; max-width: 30ch; color: var(--text-dim); }
.philosophy-line.small em { color: var(--ember-soft); }
.hero-def {
  font-size: clamp(15px, 1.7vw, 18px); line-height: 1.75; color: var(--text);
  max-width: 52ch; margin: 0 0 40px 0; font-weight: 500;
  padding: 16px 20px; border-radius: 10px; background: rgba(255,255,255,0.02); border: 1px solid var(--border-soft);
  opacity: 0; animation: rise .9s var(--ease) .62s forwards;
}
.verification-chip {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 22px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .1em;
  color: var(--ok); border: 1px solid rgba(111,207,154,.3); background: rgba(111,207,154,.06);
  border-radius: 100px; padding: 6px 12px; opacity: 0; animation: rise .8s var(--ease) .38s forwards;
}
.verification-chip span { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 9px rgba(111,207,154,.8); }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }

.cta-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 64px; opacity: 0; animation: rise .9s var(--ease) .68s forwards; }
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 10px; font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
  cursor: pointer; transition: transform .25s var(--ease), border-color .25s ease, background-color .25s ease;
}
.btn-primary { background: var(--ember); color: #1a0e06; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255,138,76,0.35); }
.btn-ghost { border: 1px solid var(--border-bright); color: var(--text); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { border-color: var(--ember); transform: translateY(-2px); background: rgba(255,138,76,0.06); }
.btn .sweep {
  position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-18deg); transition: left .7s ease;
}
.btn:hover .sweep { left: 130%; }

/* ---------- boot sequence — layers of the workspace coming online ---------- */
.boot-seq {
  margin-top: 54px; padding-top: 34px; border-top: 1px solid var(--border-soft);
  opacity: 0; animation: rise .9s var(--ease) .82s forwards;
}
.boot-layers { display: flex; align-items: center; }
.boot-layer {
  position: relative; flex: none; padding: 13px 20px; border-radius: 10px;
  background: rgba(255,255,255,0.015); backdrop-filter: blur(10px);
  border: 1px solid var(--border-soft); overflow: hidden;
  transform: scale(0.93) translateY(4px); opacity: 0.001;
  transition: transform .6s var(--ease), border-color .6s ease, opacity .5s ease;
}
.boot-layer.in { transform: scale(1) translateY(0); opacity: 1; border-color: rgba(111,207,154,0.4); }
.boot-layer .bl-glow {
  position: absolute; inset: -60% -30%; background: radial-gradient(ellipse at center, rgba(111,207,154,0.28), transparent 70%);
  opacity: 0; transition: opacity .7s ease;
}
.boot-layer.in .bl-glow { opacity: 1; }
.boot-layer .bl-label {
  position: relative; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em;
  color: var(--text-faint); transition: color .5s ease;
}
.boot-layer.in .bl-label { color: var(--text); }
.boot-layer.ready.in { border-color: var(--ember); animation: slabBreathe 3.2s ease-in-out .7s infinite; }
.boot-layer.ready.in .bl-glow { background: radial-gradient(ellipse at center, rgba(255,138,76,0.4), transparent 70%); }
.boot-layer.ready.in .bl-label { color: var(--text); font-weight: 700; }
.boot-connector { flex: 1 1 32px; min-width: 14px; max-width: 40px; height: 1px; position: relative; background: var(--border-soft); overflow: hidden; }
.boot-connector .bc-fill {
  position: absolute; inset: 0; width: 0%; background: linear-gradient(90deg, var(--ok), var(--ember-soft));
  box-shadow: 0 0 8px rgba(111,207,154,0.6); transition: width .55s var(--ease);
}
.boot-connector .bc-fill.in { width: 100%; }
@media (max-width: 620px) {
  .boot-layers { flex-wrap: wrap; gap: 10px 0; }
  .boot-connector { display: none; }
  .boot-layer { flex: 1 1 auto; }
}

.hero-readout {
  margin-top: 26px; font-family: var(--mono); font-size: 12.5px; color: var(--text-faint);
  letter-spacing: 0.02em; opacity: 0; animation: rise .9s var(--ease) 3.1s forwards;
}
.hero-readout .count { color: var(--text-dim); font-weight: 600; }
.hero-readout .rdot { color: var(--border-bright); margin: 0 2px; }
.hero-note { margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--text-faint); opacity: 0; animation: rise .9s var(--ease) 3.2s forwards; }

.scroll-cue {
  position: absolute; bottom: 34px; left: 32px; font-family: var(--mono);
  font-size: 11px; color: var(--text-faint); letter-spacing: 0.14em;
  display: flex; align-items: center; gap: 8px; z-index: 2;
}
.scroll-cue .ln { width: 1px; height: 26px; background: linear-gradient(var(--ember), transparent); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .25 } 50% { opacity: 1 } }

/* ================= SECTION CHROME ================= */
.sect { padding: 150px 0; border-top: 1px solid var(--border-soft); scroll-margin-top: 76px; }
.sect.tight { padding: 110px 0; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; color: var(--ember);
  text-transform: uppercase; margin-bottom: 20px; display: flex; align-items: center; gap: 12px;
}
.eyebrow .idx {
  position: relative; color: var(--ember-soft); border: 1px solid rgba(255,138,76,0.4); border-radius: 6px;
  padding: 2px 8px; font-size: 11px; font-weight: 700;
  background: linear-gradient(165deg, rgba(255,158,102,0.22), rgba(255,138,76,0.06) 60%);
  box-shadow: inset 0 1px 0 rgba(255,200,160,0.28), inset 0 -1px 2px rgba(0,0,0,0.35), 0 0 10px rgba(255,138,76,0.12);
  text-shadow: 0 1px 0 rgba(0,0,0,0.3);
}
h2.title { font-size: clamp(26px, 3.6vw, 42px); line-height: 1.4; font-weight: 700; max-width: 20ch; margin: 0 0 22px 0; letter-spacing: -0.01em; }
.lede { color: var(--text-dim); font-size: 16.5px; max-width: 64ch; margin: 0 0 60px 0; }

/* ================= REVEAL — varied choreography, not one repeating pattern ================= */
.reveal { opacity: 0.7; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.d1.in { transition-delay: .08s; } .reveal.d2.in { transition-delay: .16s; } .reveal.d3.in { transition-delay: .24s; }

/* two perspectives converging (Why section) */
.reveal-left { opacity: 0.001; transform: translateX(-26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal-left.in { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0.001; transform: translateX(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal-right.in { opacity: 1; transform: translateX(0); }

/* FORGE's column lands with more presence (Handover section) */
.reveal-pop { opacity: 0.001; transform: scale(0.94) translateY(10px); transition: opacity .6s var(--ease), transform .6s cubic-bezier(.2,1.1,.4,1); }
.reveal-pop.in { opacity: 1; transform: scale(1) translateY(0); }

/* cascading card groups — each grid staggers its own children */
.arch-grid > .reveal:nth-child(1), .ev-grid > .reveal:nth-child(1), .proj-row > .reveal:nth-child(1) { transition-delay: 0s; }
.arch-grid > .reveal:nth-child(2), .ev-grid > .reveal:nth-child(2), .proj-row > .reveal:nth-child(2) { transition-delay: .08s; }
.arch-grid > .reveal:nth-child(3), .ev-grid > .reveal:nth-child(3), .proj-row > .reveal:nth-child(3) { transition-delay: .16s; }
.arch-grid > .reveal:nth-child(4), .ev-grid > .reveal:nth-child(4) { transition-delay: .24s; }
.arch-grid > .reveal:nth-child(5), .ev-grid > .reveal:nth-child(5) { transition-delay: .32s; }
.arch-grid > .reveal:nth-child(6) { transition-delay: .4s; }
.arch-grid > .reveal:nth-child(7) { transition-delay: .48s; }
.arch-grid > .reveal, .ev-grid > .reveal, .proj-row > .reveal { transform: scale(0.96) translateY(14px); }
.arch-grid > .reveal.in, .ev-grid > .reveal.in, .proj-row > .reveal.in { transform: scale(1) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-left, .reveal-right, .reveal-pop,
  .hero-word, .hero-sub-line, .verification-chip, .hero h1, .hero-def, .cta-row, .boot-seq, .hero-readout, .hero-note {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
  .boot-layer, .boot-layer .bl-glow, .boot-layer .bl-label, .boot-connector .bc-fill,
  .ctx-ignored, .ctx-flow, .story-fill, .story-item, .story-item::before, .story-item .s-data {
    transition: none !important;
  }
  .bg-grid, .scroll-cue .ln, .boot-layer.ready.in, .ev-pulse,
  .story-item.active::before, .oa-beam::after, .oa-chip, .os-slab {
    animation: none !important;
  }
}

/* ================= DISCOVERY ================= */
.discovery-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: start; }
.disc-text p { color: var(--text-dim); font-size: 15.5px; margin: 0 0 18px 0; }
.disc-text .highlight { color: var(--text); background: linear-gradient(transparent 60%, rgba(255,138,76,0.2) 60%); }
.badge-row { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.badge {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.03em; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 100px; padding: 6px 14px;
  display: inline-flex; align-items: center; gap: 6px;
}
.badge.ok { color: var(--ok); border-color: rgba(111,207,154,0.3); }
.badge.warm { color: var(--ember-soft); border-color: rgba(255,138,76,0.32); }
.badge .dot2 { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.quote-card {
  padding: 30px 32px; position: relative;
}
.quote-card .k { font-family: var(--mono); font-size: 11px; color: var(--text-faint); letter-spacing: 0.06em; margin-bottom: 16px; }
.quote-card p { font-size: 17px; line-height: 1.85; color: var(--text); margin: 0 0 16px 0; }
.quote-card p:last-of-type { margin-bottom: 0; }
.quote-card b { color: var(--ember-soft); font-weight: 700; }
.quote-card .edge { position: absolute; left: 0; top: 20px; bottom: 20px; width: 2px; background: linear-gradient(var(--ember), transparent); border-radius: 2px; }

.mono-note { font-family: var(--mono); font-size: 12px; color: var(--text-faint); margin-top: 14px; }

/* ================= EVIDENCE — real capture + product card, varied rhythm ================= */
.ev-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 12px; align-items: start; }
.ev-card { padding: 0; display: flex; flex-direction: column; overflow: hidden; transition: border-color .35s ease, transform .35s var(--ease); }
.ev-card:hover { border-color: var(--border-bright); }
.ev-card.span1 { grid-column: span 1; }
.ev-card.span2 { grid-column: span 2; }
.ev-card.wide { grid-column: 1 / -1; }

/* top — the real, cropped, result-only capture, fused into the card */
.ev-crop { position: relative; background: var(--bg-2); }
.ev-crop img { display: block; width: 100%; height: auto; }
.ev-crop::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 44px; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg-1) 92%);
}
/* Environment / QA — compact, badge-led, crop de-emphasized */
.ev-card.compact .ev-crop { padding: 14px 14px 0; }
.ev-card.compact .ev-crop img { border-radius: 8px; }
.ev-card.compact .ev-crop::after { display: none; }
.ev-card.compact .ev-body { padding: 18px 22px 22px; }
/* Context — progress-UI led, larger ratio */
.ev-card.hero-ratio .ev-ratio-num { font-size: 60px; }
.ev-card.hero-ratio .ev-body { padding-top: 28px; }
/* Repository — vertical weight, taller numbers */
.ev-card.tower .ev-repo-row .n { font-size: 30px; }
.ev-card.tower .ev-repo-rows { gap: 18px; margin-top: 10px; }
.ev-proof-console {
  min-height: 174px; padding: 24px; display: flex; flex-direction: column; justify-content: center; gap: 8px;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    #0b0e12;
  background-size: 28px 28px;
  border-bottom: 1px solid var(--border-soft); font-family: var(--mono);
}
.ev-proof-console .proof-kicker { font-size: 10px; letter-spacing: .12em; color: var(--text-faint); }
.ev-proof-console strong { font-size: clamp(25px, 3vw, 36px); line-height: 1.1; color: var(--ok); letter-spacing: .02em; }
.ev-proof-console .proof-code { font-size: 11px; color: var(--ember-soft); }
.ev-proof-console.source-audit strong { color: var(--text); }
.ev-proof-console.context-audit strong { color: var(--ember-soft); }
.ev-proof-console.build-proof strong { color: var(--ok); }
.evidence-scope { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.evidence-scope .mono-note { margin: 0; max-width: 78ch; }
.proof-link {
  flex: none; font-family: var(--mono); font-size: 11px; color: var(--ember-soft);
  border-bottom: 1px solid rgba(255,138,76,.35); padding-bottom: 3px;
  transition: color .2s ease, border-color .2s ease;
}
.proof-link:hover { color: var(--text); border-color: var(--ember); }

/* bottom 65-75% — product UI: what it means */
.ev-body { padding: 24px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.ev-badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.09em; color: var(--ok);
  border: 1px solid rgba(111,207,154,0.32); background: rgba(111,207,154,0.08);
  border-radius: 100px; padding: 5px 12px; margin-bottom: 16px;
}
.ev-pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px rgba(111,207,154,0.7); animation: evPulse 2s ease-in-out infinite; }
@keyframes evPulse { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
.ev-card-title { font-size: 16px; font-weight: 700; margin: 0 0 4px 0; }
.ev-desc { font-size: 13.5px; color: var(--text-dim); margin: 14px 0 0 0; line-height: 1.7; }
.ev-foot { margin-top: auto; padding-top: 18px; font-family: var(--mono); font-size: 11px; color: var(--text-faint); letter-spacing: 0.02em; }

/* context selection — ratio */
.ev-ratio { display: flex; align-items: baseline; gap: 8px; padding: 10px 0 4px; }
.ev-ratio-num { font-family: var(--mono); font-weight: 700; font-size: 44px; color: var(--ember); line-height: 1; }
.ev-ratio-of { font-family: var(--mono); font-size: 16px; color: var(--text-faint); }
.ev-ratio-bar { margin-top: 14px; height: 6px; border-radius: 4px; background: var(--bg-2); border: 1px solid var(--border-soft); overflow: hidden; }
.ev-ratio-fill { display: block; height: 100%; width: 1.09%; min-width: 5px; border-radius: 4px; background: linear-gradient(90deg, var(--ember), var(--ember-soft)); }
.ev-ratio-tag { margin-top: 10px; font-family: var(--mono); font-size: 11px; color: var(--text-faint); letter-spacing: 0.02em; }

/* build & test — stats row */
.ev-build-stats { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 4px; }
.ev-build-stat { display: flex; flex-direction: column; gap: 6px; }
.ev-build-stat .n { font-family: var(--mono); font-weight: 700; font-size: 28px; color: var(--text); }
.ev-build-stat .n.ok { color: var(--ok); }
.ev-build-stat .n.muted { color: var(--text-dim); font-size: 20px; }
.ev-build-stat .l { font-size: 12px; color: var(--text-faint); }

/* repository scale — stacked rows */
.ev-repo-rows { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.ev-repo-row { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px dashed var(--border-soft); }
.ev-repo-row:last-child { border-bottom: none; padding-bottom: 0; }
.ev-repo-row .n { font-family: var(--mono); font-weight: 700; font-size: 20px; color: var(--text); }
.ev-repo-row .l { font-size: 12.5px; color: var(--text-faint); }

@media (max-width: 980px) {
  .ev-grid { grid-template-columns: 1fr; }
  .ev-card.span1, .ev-card.span2, .ev-card.wide { grid-column: 1 / -1; }
  .ev-build-stats { gap: 28px; }
}

/* ================= ARCHITECTURE CARDS ================= */
.arch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (min-width: 881px) { .arch-grid > .arch-card:last-child:nth-child(3n+1) { grid-column: 2 / 3; } }
.arch-card {
  padding: 26px 24px; position: relative; transition: transform .35s var(--ease), border-color .35s ease;
  transform-style: preserve-3d;
}
.arch-card:hover { border-color: var(--border-bright); }
.arch-card .icon { width: 30px; height: 30px; margin-bottom: 18px; color: var(--ember); }
.arch-card .icon svg { width: 100%; height: 100%; }
.arch-card h3 { font-size: 15.5px; margin: 0 0 10px 0; font-weight: 700; }
.arch-card p { font-size: 13.6px; color: var(--text-dim); margin: 0; line-height: 1.72; }
.arch-card .tag { position: absolute; top: 22px; right: 22px; font-family: var(--mono); font-size: 10px; padding: 3px 8px; border-radius: 5px; letter-spacing: 0.03em; }
.tag.impl { color: var(--ok); border: 1px solid rgba(111,207,154,0.32); }
.tag.partial { color: var(--warn); border: 1px solid rgba(232,185,95,0.32); }
.tag.design { color: var(--text-dim); border: 1px solid var(--border-bright); }

/* ================= PROJECT CARDS ================= */
.proj-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 8px; }
.proj-card { padding: 26px 24px; transition: transform .35s var(--ease), border-color .35s ease; }
.proj-card:hover { border-color: var(--border-bright); transform: translateY(-4px); }
.proj-card .name { font-family: var(--mono); font-size: 13px; color: var(--ember-soft); letter-spacing: 0.03em; }
.proj-card .desc { margin-top: 12px; font-size: 13.8px; color: var(--text-dim); line-height: 1.75; }

/* ---------- context-forge — scroll-scrubbed 1,269 → 8 selection ---------- */
.ctx-forge { position: relative; height: 220vh; }
.ctx-sticky {
  position: absolute; top: 0; left: 0; width: 100%; height: 100vh; min-height: 560px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.ctx-sticky.pinned { position: fixed; top: 0; left: 0; }
.ctx-sticky.docked { position: absolute; top: auto; bottom: 0; }
.ctx-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ctx-canvas { width: min(100%, 1160px); height: auto; aspect-ratio: 16 / 8.4; display: block; }
.ctx-readout { margin-top: 4px; }
.ctx-count {
  font-family: var(--mono); font-weight: 700; color: var(--text);
  font-size: clamp(40px, 7vw, 72px); line-height: 1; font-variant-numeric: tabular-nums;
}
.ctx-count-label { margin-top: 10px; font-size: 13.5px; color: var(--text-dim); }
.ctx-ignored { margin-top: 16px; opacity: 0.001; transform: translateY(6px); transition: opacity .5s ease, transform .5s ease; }
.ctx-ignored.in { opacity: 1; transform: translateY(0); }
.ctx-ignored-pct { font-family: var(--mono); font-weight: 600; font-size: 14px; color: var(--text-dim); letter-spacing: 0.02em; }
.ctx-ignored-pct b { color: var(--ember-soft); font-weight: 700; }
.ctx-ignored-label { margin-top: 2px; font-family: var(--mono); font-size: 10px; color: var(--text-faint); letter-spacing: 0.08em; text-transform: uppercase; }
.ctx-flow { margin-top: 24px; opacity: 0.001; transform: translateY(10px) scale(0.96); transition: opacity .5s ease, transform .5s ease; justify-content: center; }
.ctx-flow.in { opacity: 1; transform: translateY(0) scale(1); }
@media (max-width: 700px) {
  .ctx-forge { height: 200vh; }
  .ctx-canvas { aspect-ratio: 16 / 11; }
  .ctx-flow { flex-wrap: wrap; row-gap: 10px; }
}

/* ---------- before / after comparison ---------- */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 12px; }
.compare-col { padding: 30px 28px; position: relative; }
.compare-col.alone { border-color: var(--border-soft); opacity: 0.88; }
.compare-col.forge { border-color: rgba(255,138,76,0.35); box-shadow: 0 0 40px rgba(255,138,76,0.08); }
.compare-head { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--border-soft); }
.compare-col.alone .compare-head { color: var(--text-faint); }
.compare-col.forge .compare-head { color: var(--ember); }
.compare-steps { display: flex; flex-direction: column; }
.cstep { display: flex; align-items: center; gap: 14px; padding: 11px 0; font-size: 14.5px; }
.cstep .cdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.compare-col.alone .cstep .cdot { background: var(--text-faint); }
.compare-col.forge .cstep .cdot { background: var(--ember); box-shadow: 0 0 8px rgba(255,138,76,0.6); }
.compare-col.alone .cstep { color: var(--text-dim); }
.compare-col.forge .cstep { color: var(--text); font-weight: 500; }
.cstep.loss { font-weight: 600; }
.compare-foot { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border-soft); font-family: var(--mono); font-size: 12px; }
.compare-col.forge .compare-foot { color: var(--ok); }
@media (max-width: 760px) { .compare-grid { grid-template-columns: 1fr; } }

/* ---------- live-handoff timeline — scroll-linked, not read-only ---------- */
.story { position: relative; margin-top: 32px; padding-left: 40px; }
.story::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--border-soft); }
.story-fill {
  position: absolute; left: 7px; top: 8px; width: 1px; height: 0%;
  background: linear-gradient(var(--ember), var(--ok)); box-shadow: 0 0 10px rgba(255,138,76,0.55);
  border-radius: 1px; transition: height .5s var(--ease); pointer-events: none;
}
.story-item {
  position: relative; padding-bottom: 38px; opacity: 0.34;
  transition: opacity .45s ease, transform .45s var(--ease);
}
.story-item:last-child { padding-bottom: 0; }
.story-item.done { opacity: 0.58; }
.story-item.active { opacity: 1; transform: translateX(4px); }
.story-item::before {
  content: ""; position: absolute; left: -40px; top: 3px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--border-bright); box-shadow: none;
  transition: border-color .4s ease, background-color .4s ease, box-shadow .4s ease, transform .4s var(--ease);
}
.story-item.done::before { border-color: var(--ok); background: var(--ok); }
.story-item.active::before {
  border-color: var(--ember); background: var(--ember); transform: scale(1.25);
  box-shadow: 0 0 0 7px rgba(255,138,76,0.16), 0 0 20px rgba(255,138,76,0.75);
  animation: evPulse 1.6s ease-in-out infinite;
}
.story-item h3 { font-size: 17px; margin: 0 0 6px 0; font-weight: 700; transition: color .4s ease; }
.story-item.active h3 { font-size: 18.5px; }
.story-item.active h3 { color: var(--ember-soft); }
.story-item p { font-size: 14px; color: var(--text-dim); margin: 0; max-width: 60ch; }
.story-item .s-data {
  display: inline-block; margin-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--ember-soft);
  background: var(--ember-dim); padding: 3px 10px; border-radius: 5px;
  opacity: 0.001; transform: scale(0.86); transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.story-item.active .s-data, .story-item.done .s-data { opacity: 1; transform: scale(1); }

/* ---------- OS platform — apps living on top of FORGE ---------- */
.os-platform { margin: 28px 0 44px 0; }
.os-apps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.os-app-node { display: flex; flex-direction: column; align-items: center; }
.oa-beam {
  width: 2.5px; height: 34px;
  background: linear-gradient(rgba(255,138,76,0.32), var(--ember));
  box-shadow: 0 0 13px rgba(255,138,76,0.55);
  position: relative; overflow: visible;
}
.oa-beam::after {
  content: ""; position: absolute; left: -6px; top: -100%; width: 14px; height: 60%;
  background: linear-gradient(to top, rgba(255,178,122,1), transparent);
  filter: drop-shadow(0 0 8px rgba(255,178,122,0.9));
  border-radius: 50%;
  animation: beamRise 2.2s ease-in-out infinite;
}
.os-app-node:nth-child(1) .oa-beam::after { animation-delay: 0s; }
.os-app-node:nth-child(2) .oa-beam::after { animation-delay: 0.72s; }
.os-app-node:nth-child(3) .oa-beam::after { animation-delay: 1.44s; }
@keyframes beamRise { 0% { top: 100%; opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { top: -56%; opacity: 0; } }
.oa-chip {
  padding: 14px 20px; border-radius: 10px; text-align: center; font-family: var(--mono);
  font-size: 12.5px; color: var(--text); font-weight: 600; letter-spacing: 0.02em;
  background: var(--bg-2); border: 1px solid var(--border); width: 100%;
  transition: box-shadow .3s ease;
  animation: chipPulse 2.2s ease-in-out infinite;
}
.os-app-node:nth-child(1) .oa-chip { animation-delay: 0.3s; }
.os-app-node:nth-child(2) .oa-chip { animation-delay: 1.02s; }
.os-app-node:nth-child(3) .oa-chip { animation-delay: 1.74s; }
@keyframes chipPulse {
  0%, 85%, 100% { box-shadow: none; border-color: var(--border); }
  92% { box-shadow: 0 0 18px rgba(255,178,122,0.35); border-color: rgba(255,138,76,0.5); }
}
.os-slab {
  position: relative; margin-top: 0; padding: 30px 26px; border-radius: 16px; text-align: center;
  background: linear-gradient(180deg, rgba(255,138,76,0.14), rgba(255,138,76,0.03));
  border: 1.5px solid var(--ember); overflow: hidden;
  animation: slabBreathe 4s ease-in-out infinite;
}
@keyframes slabBreathe {
  0%, 100% { box-shadow: 0 10px 50px rgba(255,138,76,0.16); }
  50% { box-shadow: 0 10px 64px rgba(255,138,76,0.3); }
}
.os-slab-glow {
  position: absolute; inset: -40% -10% auto -10%; height: 80%;
  background: radial-gradient(ellipse at center, rgba(255,138,76,0.35), transparent 70%);
  pointer-events: none;
}
.os-slab-word { position: relative; font-weight: 800; font-size: 28px; letter-spacing: 0.05em; color: var(--text); }
.os-slab-sub { position: relative; margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--ember-soft); letter-spacing: 0.08em; }
@media (max-width: 760px) { .os-apps-row { grid-template-columns: 1fr; } .oa-beam { height: 20px; } }
/* ================= GRANULARITY CHIPS (Context Diet) ================= */
.granularity-row { display: flex; flex-wrap: wrap; gap: 10px; margin: -8px 0 8px; }
.g-chip {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.03em; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 100px; padding: 6px 14px;
}
.g-chip.muted { color: var(--text-faint); border-style: dashed; }

/* ================= FLOW STRIP — reusable static process diagram ================= */
.flow-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 4px; margin: 26px 0; }
.flow-node {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; color: var(--text-dim);
  padding: 9px 15px; border-radius: 8px; border: 1px solid var(--border); background: rgba(255,255,255,0.02);
  white-space: nowrap;
}
.flow-node.accent { color: var(--ember-soft); border-color: rgba(255,138,76,0.35); background: var(--ember-dim); }
.flow-node.ok { color: var(--ok); border-color: rgba(111,207,154,0.35); background: rgba(111,207,154,0.08); }
.flow-node.bad { color: var(--text-dim); border-color: var(--border-bright); }
.flow-node.warn { color: var(--warn); border-color: rgba(232,185,95,0.35); background: rgba(232,185,95,0.08); }
.flow-arrow { color: var(--text-faint); font-size: 13px; padding: 0 2px; }
.flow-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 560px) { .flow-strip { gap: 8px 2px; } .flow-node { font-size: 11px; padding: 8px 11px; } }

/* ================= ISOLATED CALLOUT ================= */
.isolate-box {
  display: flex; align-items: center; gap: 16px; padding: 18px 22px; margin: 8px 0 26px;
}
.isolate-box .ib-icon {
  flex: none; width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  border: 1px dashed rgba(255,138,76,0.4); color: var(--ember-soft);
}
.isolate-box .ib-icon svg { width: 18px; height: 18px; }
.isolate-box p { margin: 0; font-size: 13.6px; color: var(--text-dim); line-height: 1.7; }
.isolate-box b { color: var(--text); }

/* ================= KNOWLEDGE EVOLUTION / CODE SELF-IMPROVEMENT ================= */
.kd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 8px 0 30px; }
.kd-card { padding: 22px 24px; }
.kd-card .kd-tag { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--text-dim); margin-bottom: 10px; }
.kd-card.accent .kd-tag { color: var(--ember-soft); }
.kd-card p { margin: 0; font-size: 14px; color: var(--text-dim); line-height: 1.75; }
@media (max-width: 700px) { .kd-grid { grid-template-columns: 1fr; } }

/* ================= STATUS PILL ================= */
.status-pill {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.05em; padding: 5px 12px; border-radius: 100px; white-space: nowrap;
}
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.status-pill.prod { color: var(--ok); border: 1px solid rgba(111,207,154,0.32); background: rgba(111,207,154,0.08); }
.status-pill.shadow { color: var(--steel); border: 1px solid rgba(143,178,207,0.35); background: rgba(143,178,207,0.08); }
.status-pill.flagged { color: var(--warn); border: 1px solid rgba(232,185,95,0.35); background: rgba(232,185,95,0.08); }
.status-pill.gated { color: var(--warn); border: 1px solid rgba(232,185,95,0.35); background: rgba(232,185,95,0.08); }
.status-pill.off { color: var(--text-faint); border: 1px solid var(--border-bright); background: rgba(255,255,255,0.02); }
.status-pill.pending { color: var(--text-faint); border: 1px dashed var(--border-bright); background: transparent; }

/* ================= STATUS TABLE (Operational Status) ================= */
.status-table-wrap { padding: 8px; overflow-x: auto; }
.status-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.status-table th, .status-table td { text-align: left; padding: 14px 20px; }
.status-table thead th {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-faint); border-bottom: 1px solid var(--border);
}
.status-table tbody tr { border-bottom: 1px solid var(--border-soft); }
.status-table tbody tr:last-child { border-bottom: none; }
.status-table tbody td:first-child { font-size: 14px; color: var(--text); font-weight: 600; }
.status-table tbody td:last-child { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.status-table .st-note { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }

/* ================= ev-build-stat warn variant ================= */
.ev-build-stat .n.warn { color: var(--warn); }

/* ================= CONTACT / FOOTER ================= */
.contact { text-align: left; }
.contact-card { padding: 56px 52px; position: relative; overflow: hidden; }
.contact-card h3 { font-size: clamp(24px, 3.4vw, 36px); max-width: 24ch; margin: 0 0 16px 0; font-weight: 700; }
.contact-card p { color: var(--text-dim); font-size: 15px; max-width: 52ch; margin: 0 0 32px 0; }

.foot { padding: 60px 0 50px; border-top: 1px solid var(--border-soft); }
.foot-grid { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 30px; }
.foot-brand { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; color: var(--text-dim); }
.foot-meta { font-family: var(--mono); font-size: 11px; color: var(--text-faint); text-align: right; line-height: 2; }

/* ================= COUNT-UP NUMBER ================= */
.count { font-variant-numeric: tabular-nums; }

@media (max-width: 880px) {
  .discovery-grid { grid-template-columns: 1fr; gap: 36px; }
  .arch-grid, .proj-row { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hero { padding: 128px 0 70px; }
  .sect { padding: 96px 0; }
  .foot-grid { flex-direction: column; align-items: flex-start; }
  .foot-meta { text-align: left; }
  .hstat { flex: 1 1 45%; }
  .contact-card { padding: 40px 26px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
}
