/* ── wadachi 轍 landing — Sumi: inchiostro su carta notte ─────────
   Brand book: BRAND.md nel repo. Un solo accento (vermiglio shu),
   Fraunces per il display, JetBrains Mono per il codice.            */

/* font self-hosted (CSP: niente CDN) */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/fraunces-latin-400-500-600.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/jetbrainsmono-latin-400-500.woff2') format('woff2');
}

:root {
  --bg:        #101012;   /* carta notte */
  --bg-elev:   #18181B;
  --panel:     rgba(232,228,220,0.035);
  --panel-2:   rgba(232,228,220,0.06);
  --border:    rgba(232,228,220,0.10);
  --border-2:  rgba(232,228,220,0.16);

  --text:      #E8E4DC;   /* inchiostro chiaro / carta di riso */
  --text-dim:  #A8A296;
  --text-faint:#6E6A62;   /* grigio pietra */

  --accent:    #D9442B;   /* vermiglio (shu) — UNICO accento */
  --accent-2:  #E8663F;   /* vermiglio chiaro, solo per sheen/gradienti tono-su-tono */

  /* category palette (mirrors app.js) — inchiostri desaturati */
  --c-architecture:#8FA3B8;
  --c-bugfix:      #C96A5A;
  --c-config:      #C9972C;
  --c-pattern:     #A08BB8;
  --c-context:     #7A8B5E;
  --c-reference:   #6FA3A0;
  --c-note:        #9B958A;
  --c-decision:    #D0B054;
  --c-entity:      #8A857B;

  --maxw: 1280px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* clip (non hidden) per non rompere il position:sticky dell'hero */
}

a { color: inherit; text-decoration: none; }

/* display serif per i titoli — il tratto caldo del brand */
h1, h2, h3, .brand-name, .strip-num {
  font-family: var(--serif);
  font-weight: 500;
}

.grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* key-word highlight — reveals to vermilion when it enters view, with a
   soft tone-on-tone sheen. Added via .lit by the IntersectionObserver. */
.hl {
  background-image: linear-gradient(100deg,
    var(--accent) 0%, var(--accent-2) 30%, #F0A088 50%, var(--accent-2) 70%, var(--accent) 100%);
  background-size: 220% 100%;
  background-position: 92% 0;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: currentColor;    /* starts as the heading colour */
  transition: -webkit-text-fill-color .55s ease;
  will-change: background-position;
}
.hl.lit {
  -webkit-text-fill-color: transparent;     /* reveal the vermilion */
  animation: hl-sheen 6.5s linear .55s infinite;
}
@keyframes hl-sheen {
  0%   { background-position: 92% 0; }
  100% { background-position: -128% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hl { -webkit-text-fill-color: transparent; background-position: 50% 0; }
  .hl.lit { animation: none; }
}

/* hero headline — words blur-in on load (elegant, no glyph scramble) */
.reveal-words .w { display: inline-block; opacity: 0; transform: translateY(0.42em); filter: blur(12px); }
.reveal-words.in .w { animation: word-in 0.72s cubic-bezier(.2,.7,.2,1) both; }
@keyframes word-in {
  from { opacity: 0; transform: translateY(0.42em); filter: blur(12px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-words .w { opacity: 1; transform: none; filter: none; animation: none; }
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--panel-2);
  padding: 1px 6px;
  border-radius: 5px;
  color: #D8D2C4;
}

/* ── NAV ──────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(18px, 4vw, 40px);
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(16,16,18,0.85), rgba(16,16,18,0.35));
  border-bottom: 0.5px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 500; letter-spacing: 0.2px; }
.brand-mark { display: flex; align-items: center; color: var(--text); }
.brand-mark svg { display: block; width: 24px; height: auto; }
.brand-name { font-size: 19px; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); font-size: 14px; }
.nav-links a { color: var(--text-dim); transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-gh {
  border: 0.5px solid var(--border-2); border-radius: 8px;
  padding: 6px 13px; color: var(--text) !important;
}
.nav-gh:hover { background: var(--panel-2); }
@media (max-width: 640px) { .nav-links a:not(.nav-gh) { display: none; } }

/* ── HERO ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(900px 600px at 78% 18%, rgba(217,68,43,0.07), transparent 60%),
    radial-gradient(800px 700px at 12% 88%, rgba(232,228,220,0.04), transparent 60%),
    var(--bg);
  overflow: hidden;
}
.graph-canvas { position: absolute; inset: 0; z-index: 1; }
.graph-canvas canvas { display: block; }

/* veil keeps the left-side text legible over the live graph */
.hero-veil {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(105deg, rgba(16,16,18,0.92) 0%, rgba(16,16,18,0.70) 34%, rgba(16,16,18,0.04) 62%, transparent 80%),
    linear-gradient(0deg, rgba(16,16,18,0.85) 0%, transparent 22%);
}

.hero-content {
  position: relative; z-index: 3; pointer-events: none;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(110px, 16vh, 190px) clamp(18px, 4vw, 40px) 60px;
}
.hero-content > * { pointer-events: auto; }

.pill {
  display: inline-block;
  font-size: 12.5px; letter-spacing: 0.3px;
  color: var(--text-dim);
  border: 0.5px solid var(--border-2); border-radius: 999px;
  padding: 6px 14px; margin-bottom: 26px;
  background: rgba(232,228,220,0.03);
}
.hero h1 {
  font-size: clamp(40px, 6.4vw, 76px);
  line-height: 1.02; font-weight: 500; letter-spacing: -1px;
  margin-bottom: 22px;
}
.lede {
  max-width: 540px; font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-dim); margin-bottom: 32px;
}
.lede strong { color: var(--text); }
.lede em { color: var(--text-faint); font-style: italic; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-row.center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 15px; font-weight: 540; padding: 12px 22px;
  border-radius: 11px; transition: transform .12s, box-shadow .2s, background .2s, border-color .2s;
  border: 0.5px solid transparent; cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #F7F3EA; box-shadow: 0 8px 28px -10px rgba(217,68,43,0.55);
}
.btn-primary:hover { transform: translateY(-2px); background: #C33C22; box-shadow: 0 14px 34px -10px rgba(217,68,43,0.7); }
.btn-ghost { border-color: var(--border-2); color: var(--text); background: rgba(232,228,220,0.02); }
.btn-ghost:hover { background: var(--panel-2); transform: translateY(-2px); }

.hero-stats { display: flex; gap: clamp(22px, 4vw, 48px); margin-top: 46px; flex-wrap: wrap; }
.hero-stats > div { display: flex; flex-direction: column; }
.hero-stats .num {
  font-size: clamp(26px, 3vw, 34px); font-weight: 600; letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.hero-stats .lbl { font-size: 12.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 1px; }

/* graph UI: legend + hint */
.graph-ui {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 40px) 26px; pointer-events: none;
}
.legend {
  display: flex; flex-wrap: wrap; gap: 7px 12px; max-width: 540px;
  pointer-events: auto;
}
.legend-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--text-dim);
  padding: 4px 9px; border-radius: 7px; cursor: pointer;
  border: 0.5px solid transparent; transition: background .15s, border-color .15s, color .15s, opacity .15s;
  user-select: none;
}
.legend-item:hover { background: rgba(232,228,220,0.05); color: var(--text); }
.legend-item.dim { opacity: 0.32; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }
.legend-diamond { width: 9px; height: 9px; transform: rotate(45deg); border-radius: 2px; }
.legend-ring { width: 9px; height: 9px; border-radius: 50%; border: 1.6px solid var(--c-entity); }

.graph-hint {
  display: flex; align-items: center; gap: 12px;
  font-size: 11.5px; color: var(--text-faint); pointer-events: auto;
  text-align: right;
}
.mini-btn {
  font-family: var(--font); font-size: 11.5px; color: var(--text-dim);
  background: rgba(232,228,220,0.04); border: 0.5px solid var(--border-2);
  border-radius: 7px; padding: 5px 11px; cursor: pointer; transition: background .15s, color .15s;
}
.mini-btn:hover { background: var(--panel-2); color: var(--text); }
@media (max-width: 720px) { .graph-hint span { display: none; } }

/* ── INSPECTOR (node detail) ─────────────────────────────────── */
.inspector {
  position: absolute; z-index: 6; top: 92px; right: clamp(14px, 4vw, 40px);
  width: 320px; max-width: calc(100vw - 28px);
  background: rgba(24,24,27,0.92); backdrop-filter: blur(14px);
  border: 0.5px solid var(--border-2); border-radius: 14px;
  padding: 18px 18px 20px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.8);
  opacity: 0; transform: translateY(-6px) scale(0.99); pointer-events: none;
  transition: opacity .18s, transform .18s;
}
.inspector.show { opacity: 1; transform: none; pointer-events: auto; }
.insp-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; color: var(--text-faint);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px;
}
.insp-close:hover { color: var(--text); }
.insp-kind {
  font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 8px;
}
.insp-title { font-size: 16px; line-height: 1.34; font-weight: 600; margin-bottom: 12px; padding-right: 14px; }
.insp-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 13px; }
.badge {
  font-size: 10.5px; padding: 3px 8px; border-radius: 6px;
  background: var(--panel-2); color: var(--text-dim); border: 0.5px solid var(--border);
}
.badge.cat { color: #fff; }
.badge.stale { background: rgba(208,176,84,0.16); color: #D0B054; border-color: rgba(208,176,84,0.4); }
.badge.review { background: rgba(201,106,90,0.12); color: #D89A8C; border-color: rgba(201,106,90,0.35); }
.insp-body { font-size: 13px; color: var(--text-dim); line-height: 1.62; max-height: 46vh; overflow-y: auto; }
.insp-body p { margin-bottom: 10px; }
.insp-body .lbl { color: var(--text-faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; display: block; margin: 12px 0 3px; }
.insp-body::-webkit-scrollbar { width: 4px; }
.insp-body::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }

/* ── SECTIONS ─────────────────────────────────────────────────── */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(64px, 11vh, 130px) clamp(18px, 4vw, 40px);
}
.section-head { max-width: 760px; margin-bottom: 52px; }
.kicker {
  font-size: 12.5px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 14px;
  font-family: var(--mono);
}
.kicker.red, .kicker.green { color: var(--accent); }  /* un solo accento (Sumi) */
h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.12; letter-spacing: -0.6px; }
.section-sub { color: var(--text-dim); font-size: 17px; margin-top: 16px; }

/* problem/solution split */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px);
}
.split-col h2 { margin-bottom: 16px; }
.split-col p { color: var(--text-dim); margin-bottom: 14px; }
.quote-list { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.quote-list li {
  font-size: 14.5px; color: var(--text-dim); font-style: italic;
  border-left: 2px solid var(--border-2); padding: 6px 0 6px 16px;
}
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* feature grid */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(284px, 1fr));
  gap: 16px;
}
.card {
  background: var(--panel); border: 0.5px solid var(--border);
  border-radius: 16px; padding: 26px 24px;
  transition: transform .18s, border-color .18s, background .18s;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-2); background: var(--panel-2); }
.card.accent {
  background: linear-gradient(160deg, rgba(217,68,43,0.10), rgba(232,228,220,0.03));
  border-color: rgba(217,68,43,0.32);
}
.card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-size: 21px;
  background: rgba(232,228,220,0.07); color: var(--text);
  margin-bottom: 18px;
}
.card.accent .card-icon { background: rgba(217,68,43,0.14); color: var(--accent); }
.card h3 { font-size: 19px; margin-bottom: 9px; letter-spacing: 0; }
.card p { font-size: 14px; color: var(--text-dim); }

/* steps */
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 18px;
}
.step {
  border: 0.5px solid var(--border); border-radius: 16px; padding: 24px 22px;
  background: var(--panel);
}
.step-n {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  font-weight: 600; font-size: 15px; margin-bottom: 16px;
  font-family: var(--serif);
  background: var(--accent); color: #F7F3EA;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-dim); margin-bottom: 14px; }

/* code blocks */
.code {
  font-family: var(--mono); font-size: 12.8px; line-height: 1.7;
  background: #0B0B0D; border: 0.5px solid var(--border);
  border-radius: 11px; padding: 16px 18px; color: #D8D2C4;
  overflow-x: auto; white-space: pre;
}
.code.wide { margin: 22px 0 26px; text-align: left; }
.code code { background: none; padding: 0; color: inherit; font-size: inherit; }

/* stats strip */
.strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(28px, 7vw, 90px);
  padding: 46px clamp(18px, 4vw, 40px);
  border-top: 0.5px solid var(--border); border-bottom: 0.5px solid var(--border);
  background: var(--bg-elev);
}
.strip-item { display: flex; flex-direction: column; align-items: center; text-align: center; }
.strip-num { font-size: clamp(22px, 3vw, 30px); font-weight: 500; letter-spacing: -0.4px; }
.strip-lbl { font-size: 12.5px; color: var(--text-faint); margin-top: 4px; }

/* CTA */
.cta { text-align: center; }
.cta-box {
  max-width: 720px; margin: 0 auto;
  background: linear-gradient(165deg, rgba(217,68,43,0.08), rgba(232,228,220,0.03));
  border: 0.5px solid rgba(217,68,43,0.28);
  border-radius: 22px; padding: clamp(36px, 6vw, 60px) clamp(24px, 5vw, 56px);
}
.cta-box h2 { margin-bottom: 12px; }
.cta-box > p { color: var(--text-dim); font-size: 17px; }

/* footer */
.footer {
  text-align: center; padding: 54px 20px 70px;
  border-top: 0.5px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.footer .brand { justify-content: center; }
.footer-note { color: var(--text-dim); font-size: 14.5px; }
.footer-note a { color: var(--accent); }
.footer-note a:hover { text-decoration: underline; }
.footer-fine { color: var(--text-faint); font-size: 12px; max-width: 460px; }
.footer-kanji { font-size: 22px; color: var(--text-faint); opacity: 0.6; }

/* force-graph tooltip override */
.graph-canvas .float-tooltip-kap {
  background: rgba(24,24,27,0.95) !important;
  border: 0.5px solid var(--border-2) !important;
  border-radius: 10px !important;
  color: var(--text) !important;
  font-family: var(--font) !important;
  font-size: 12.5px !important;
  padding: 0 !important;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,0.85) !important;
  max-width: 280px;
}
.tip { padding: 11px 13px; }
.tip-kind { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-faint); margin-bottom: 5px; }
.tip-title { font-weight: 600; font-size: 13.5px; line-height: 1.3; margin-bottom: 6px; }
.tip-preview { color: var(--text-dim); font-size: 12px; line-height: 1.5; }
.tip-hint { color: var(--text-faint); font-size: 10.5px; margin-top: 8px; }

/* ══ HERO v2 — graphify-style scroll-build (overrides above) ═════ */
.hero { position: relative; min-height: 0; overflow: clip; background: var(--bg); } /* clip: preserva il sticky-pin dello stage mentre il grafo si costruisce */
.rain { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; opacity: .10; pointer-events: none; }
.hero-track { position: relative; z-index: 1; }        /* build is a self-playing animation, not scroll-driven */
.hero-stage {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  background:
    radial-gradient(900px 620px at 78% 22%, rgba(217,68,43,0.075), transparent 60%),
    radial-gradient(820px 700px at 10% 92%, rgba(232,228,220,0.045), transparent 60%);
}
/* fade the very bottom of the pinned stage into the page background */
.hero-stage::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 24vh;
  background: linear-gradient(180deg, transparent, var(--bg)); pointer-events: none; z-index: 1;
}
.hero-grid {
  position: relative; z-index: 2; max-width: var(--maxw); width: 100%; margin: 0 auto;
  padding: 88px clamp(18px,4vw,40px) 40px;
  display: grid; grid-template-columns: 1.02fr 0.98fr; gap: clamp(24px,4vw,56px); align-items: center;
}
.hero-left { min-width: 0; }
.hero .pill {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono);
  font-size: 12px; letter-spacing: .3px; color: var(--text-dim);
  border: .5px solid var(--border-2); border-radius: 999px; padding: 6px 13px;
  margin-bottom: 22px; background: rgba(232,228,220,0.03);
}
.hero .pill .seal { color: var(--accent); }
.hero h1 {
  font-size: clamp(34px, 5.2vw, 72px); line-height: 1.05; font-weight: 500;
  letter-spacing: -0.8px; margin-bottom: 18px; min-height: 1.06em;
}
.hero .lede { max-width: 560px; font-size: clamp(15px,1.5vw,18px); color: var(--text-dim); margin-bottom: 26px; }

/* terminal recall ticker */
.terminal { margin-top: 28px; max-width: 520px; background: #0B0B0D; border: .5px solid var(--border); border-radius: 12px; overflow: hidden; font-family: var(--mono); }
.term-head { display: flex; align-items: center; gap: 7px; padding: 9px 13px; border-bottom: .5px solid var(--border); background: rgba(232,228,220,0.02); }
.term-head .td { width: 9px; height: 9px; border-radius: 50%; }
.term-head .r { background: #C96A5A; } .term-head .y { background: #D0B054; } .term-head .g { background: #7A8B5E; }
.term-head .tt { margin-left: 6px; font-size: 11px; color: var(--text-faint); }
/* la cella unica: sizer invisibili + contenuto vivo si sovrappongono,
   così l'altezza è sempre quella del caso peggiore e la pagina non scatta */
.term-body { padding: 13px 15px; min-height: 116px; display: grid; }
.term-body > * { grid-area: 1 / 1; }
.term-sizer { visibility: hidden; pointer-events: none; }
.term-line { font-size: 12.5px; color: var(--text); display: flex; align-items: center; gap: 7px; }
.term-line .prompt { color: var(--accent); }
.caret { display: inline-block; width: 2px; height: 15px; margin-left: 2px; border-radius: 2px; vertical-align: text-bottom; background: var(--accent); box-shadow: 0 0 8px rgba(217,68,43,0.6); animation: caret-blink 1s ease-in-out infinite; }
@keyframes caret-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.12; } }
@keyframes blink { 50% { opacity: 0; } }
#term-results { margin-top: 9px; display: flex; flex-direction: column; gap: 6px; }
.tres { display: flex; align-items: flex-start; gap: 8px; font-size: 11.5px; color: var(--text-dim); opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s; }
.tres.show { opacity: 1; transform: none; }
.tres .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }

/* full-bleed hero graph (6.21/6.22) */
.hero-bg {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; overflow: visible;
}
.hero-veil {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(100deg, var(--bg) 0%, rgba(16,16,18,0.94) 27%, rgba(16,16,18,0.60) 44%, rgba(16,16,18,0.06) 62%, transparent 76%),
    linear-gradient(0deg, var(--bg) 0%, transparent 18%);
}
.hero-fg {
  position: relative; z-index: 3;
  /* full-bleed come la nav: il testo parte allineato al logo, niente
     colonna morta a sinistra sugli schermi larghi */
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 96px clamp(18px, 4vw, 72px) 56px;
  pointer-events: none;
}
.hero-fg > * { pointer-events: auto; max-width: 620px; }
.hero-corner {
  position: absolute; z-index: 3; right: clamp(18px,4vw,40px); bottom: 22px;
  width: min(300px, 40vw); margin: 0; pointer-events: none;
}

/* meta pills: versione, CI, filosofia */
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.meta-pill {
  font-family: var(--mono); font-size: 11.5px; color: var(--text-dim);
  border: 0.5px solid var(--border-2); border-radius: 999px;
  padding: 5px 12px; background: rgba(232,228,220,0.03);
  transition: color .15s, border-color .15s;
}
a.meta-pill:hover { color: var(--text); border-color: var(--text-faint); }
.meta-pill .seal { color: var(--accent); }

/* hover card sul grafo */
.node-tip {
  position: fixed; z-index: 60; width: 280px;
  background: rgba(24,24,27,0.96); border: 0.5px solid var(--border-2);
  border-radius: 12px; padding: 12px 14px;
  opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity .15s, transform .15s;
  box-shadow: 0 18px 48px -18px rgba(0,0,0,0.8);
}
.node-tip.show { opacity: 1; transform: none; }
.node-tip .tip-kind { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.node-tip .tip-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 5px; font-family: var(--mono); }
.node-tip .tip-body { font-size: 12px; color: var(--text-dim); line-height: 1.5; }

#hero-svg { display: block; }
.gnode { will-change: opacity, transform; }
.glabel { font-family: var(--mono); font-size: 12.5px; fill: var(--text-dim); letter-spacing: .3px; }
.glabel.hub { font-size: 15px; fill: var(--text); font-weight: 600; }
.build-meta { display: flex; align-items: center; gap: 16px; margin-top: 8px; padding: 0 6px; flex-wrap: wrap; }
.bm-count { display: flex; flex-direction: column; }
#node-count { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--text); letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.bm-lbl { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 1px; }
.bm-bar { flex: 1; min-width: 120px; height: 3px; border-radius: 3px; background: rgba(232,228,220,0.08); overflow: hidden; }
#build-progress { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #C33C22, var(--accent-2)); transition: width .1s linear; }
.bm-hint { font-family: var(--mono); font-size: 11px; color: var(--text-faint); width: 100%; text-align: center; margin-top: 2px; }

@media (max-width: 920px) {
  .hero-veil { background: linear-gradient(180deg, rgba(16,16,18,0.88) 0%, rgba(16,16,18,0.72) 55%, var(--bg) 100%); }
  .hero-corner { display: none; }
  .hero-fg > * { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-track { height: auto; }
  .hero-stage { position: relative; height: auto; padding: 96px 0 60px; }
  .rain, .caret { display: none; }
}

/* bridge the hero → first content section so the palette carries over */
#why { position: relative; }
#why::before {
  content: ""; position: absolute; left: 0; right: 0; top: -140px; height: 300px;
  background: radial-gradient(680px 260px at 76% 0%, rgba(217,68,43,0.05), transparent 70%);
  pointer-events: none;
}

/* ── confronto onesto (6.23) ─────────────────────────────────── */
.compare-wrap { overflow-x: auto; }
.compare {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
  min-width: 640px;
}
.compare th, .compare td {
  text-align: left; padding: 13px 16px; vertical-align: top;
  border-bottom: 0.5px solid var(--border);
}
.compare thead th {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.6px;
  color: var(--text-dim); text-transform: uppercase; font-weight: 500;
}
.compare thead th:nth-child(2) { color: var(--accent); }
.compare th:nth-child(2), .compare td:nth-child(2) { background: rgba(217,68,43,0.045); }
.compare tbody td:first-child { color: var(--text-faint); width: 22%; }
.compare td { color: var(--text-dim); }
.compare td.good { color: var(--text); }
.compare td.good::before { content: "◆ "; color: var(--accent); font-size: 9px; vertical-align: 2px; }
.compare-note {
  max-width: 720px; margin-top: 22px; font-size: 14.5px;
  color: var(--text-dim); border-left: 2px solid var(--accent);
  padding: 4px 0 4px 16px;
}
.compare-note em { color: var(--text); }

/* ── la scena: loop dell'amnesia vs one-call ─────────────────── */
.scene {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: clamp(16px, 3vw, 36px); align-items: stretch;
}
.scene-panel {
  border-radius: 18px; padding: 28px 26px;
  display: flex; flex-direction: column;
}
.scene-panel h3 { font-size: clamp(20px, 2.2vw, 26px); margin: 10px 0 10px; }
.scene-panel p { font-size: 14.5px; color: var(--text-dim); margin-bottom: 18px; }
.scene-tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text-faint);
}
.scene-tag.solution { color: var(--accent); }

.scene-problem {
  border: 1px dashed var(--border-2);
  background: rgba(232,228,220,0.015);
}
.scene-problem h3 { color: var(--text-dim); }
.scene-solution {
  border: 0.5px solid rgba(217,68,43,0.35);
  background: linear-gradient(165deg, rgba(217,68,43,0.07), rgba(232,228,220,0.02));
  box-shadow: 0 24px 60px -30px rgba(217,68,43,0.25);
}

.scene-track { display: flex; align-items: center; width: clamp(70px, 9vw, 130px); }
.scene-track svg { width: 100%; height: auto; }

/* terminale spettrale: il loop */
.ghost-term {
  margin-top: auto; font-family: var(--mono); font-size: 12.5px;
  background: rgba(16,16,18,0.6); border: 1px dashed var(--border);
  border-radius: 10px; padding: 14px 15px; min-height: 76px;
  color: var(--text-faint);
}
.gt-stack { display: grid; }
.gt-stack > * { grid-area: 1 / 1; }
.gt-sizer { visibility: hidden; pointer-events: none; }
.gt-prompt { color: var(--text-faint); margin-right: 6px; }
.gt-caret {
  display: inline-block; width: 2px; height: 13px; margin-left: 2px;
  background: var(--text-faint); vertical-align: text-bottom;
  animation: caret-blink 1s ease-in-out infinite;
}
.gt-count { margin-top: 10px; font-size: 11px; color: var(--text-faint); opacity: 0.75; font-style: italic; }

/* terminale pieno: la memoria */
.solid-term {
  margin-top: auto; font-family: var(--mono); font-size: 12.5px;
  background: #0B0B0D; border: 0.5px solid var(--border);
  border-radius: 10px; padding: 14px 15px; line-height: 1.75;
}
.st-prompt { color: var(--accent); margin-right: 6px; }
.st-line { color: var(--text); }
.st-out { color: var(--text-dim); }
.st-id { color: var(--accent); font-weight: 500; }
.st-warn { color: #D0B054; }
.st-note { margin-top: 8px; font-size: 11px; color: var(--text-faint); font-style: italic; }

@media (max-width: 880px) {
  .scene { grid-template-columns: 1fr; }
  .scene-track { width: 90px; margin: -6px auto; transform: rotate(90deg); }
}
