/* ==========================================================================
   RobSafe — palette
   Pitch Black #131200 · Moss Green #78bc61 · Dry Sage #c0c781
   Camel #c59b76 · Salmon #e9806e
   ========================================================================== */
:root {
  --bg: #131200;
  --bg-2: #1b1a06;
  --moss: #78bc61;
  --sage: #c0c781;
  --camel: #c59b76;
  --salmon: #e9806e;
  --ink: #eceed6;            /* light tint of sage for headlines */
  --text: rgba(192, 199, 129, 0.82);
  --dim: rgba(192, 199, 129, 0.45);
  --line: rgba(192, 199, 129, 0.14);
  --glass: rgba(27, 26, 6, 0.55);
  --sans: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
@media (hover: hover) and (pointer: fine) { body, a, button, input { cursor: none; } }
::selection { background: var(--moss); color: var(--bg); }
a { color: inherit; text-decoration: none; }
em { color: var(--sage); font-style: normal; border-bottom: 1px dashed rgba(192,199,129,.4); }
strong { color: var(--ink); font-weight: 600; }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.accent { color: var(--moss); }
.danger { color: var(--salmon); }
.dim { color: var(--dim); }

/* ---------- background layers ---------- */
#dots {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body::after { /* vignette */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(10,10,0,.75) 100%);
}
main, .foot, .nav { position: relative; z-index: 2; }

/* ---------- cursor ---------- */
.cursor { position: fixed; top: 0; left: 0; z-index: 100; pointer-events: none; mix-blend-mode: difference; }
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; border-radius: 50%; transform: translate(-50%, -50%); }
.cursor-dot { width: 6px; height: 6px; background: var(--moss); }
.cursor-ring {
  width: 36px; height: 36px; border: 1px solid var(--sage);
  transition: width .25s var(--ease), height .25s var(--ease), border-color .25s;
}
.cursor.hover .cursor-ring { width: 64px; height: 64px; border-color: var(--moss); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- progress ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; }
.progress span {
  display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--moss), var(--sage), var(--camel), var(--salmon));
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(20px, 4vw, 56px);
  transition: background .4s, backdrop-filter .4s, padding .4s;
}
.nav.scrolled { background: rgba(19,18,0,.7); backdrop-filter: blur(12px); padding-top: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; color: var(--moss); font-weight: 600; letter-spacing: .18em; font-size: 15px; }
.logo span { color: var(--ink); }
.logo b { color: var(--moss); font-weight: 600; }
.nav-links { display: flex; gap: 28px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.nav-links a { color: var(--dim); position: relative; transition: color .2s; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 100%; background: var(--moss); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-links a:hover, .nav-links a.active { color: var(--sage); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.status { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--moss); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--moss); box-shadow: 0 0 0 0 rgba(120,188,97,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(120,188,97,0); } 100% { box-shadow: 0 0 0 0 rgba(120,188,97,0); } }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: 120px clamp(20px, 6vw, 96px) 80px; overflow: hidden;
}
#arm { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.hero-inner { position: relative; z-index: 2; max-width: 680px; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .2em; color: var(--camel); margin-bottom: 22px; }
.bracket { color: var(--moss); }
.hero-title {
  font-size: clamp(52px, 9vw, 132px); line-height: .92; font-weight: 600; color: var(--ink);
  letter-spacing: -.035em; margin-bottom: 32px;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: inline-block; transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; }
.hero-title .line:nth-child(2) > span { animation-delay: .12s; }
.hero-title .line:nth-child(3) > span { animation-delay: .24s; }
.hero-title .accent { color: var(--moss); text-shadow: 0 0 40px rgba(120,188,97,.35); }
@keyframes rise { to { transform: translateY(0); } }
.hero-sub { max-width: 540px; font-size: 19px; opacity: 0; animation: fade 1s .6s var(--ease) forwards; }
.hero-cta { display: flex; gap: 14px; margin-top: 40px; flex-wrap: wrap; opacity: 0; animation: fade 1s .8s var(--ease) forwards; }
.hero-cta.center { justify-content: center; opacity: 1; animation: none; }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px;
  font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .1em;
  border-radius: 2px; position: relative; overflow: hidden; transition: color .3s, border-color .3s, transform .3s var(--ease);
}
.btn.primary { background: var(--moss); color: var(--bg); font-weight: 500; }
.btn.primary::before { content: ""; position: absolute; inset: 0; background: var(--sage); transform: translateX(-101%); transition: transform .4s var(--ease); z-index: -1; }
.btn.primary { z-index: 0; }
.btn.primary:hover::before { transform: none; }
.btn.ghost { border: 1px solid var(--line); color: var(--sage); }
.btn.ghost:hover { border-color: var(--moss); color: var(--moss); }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateY(3px); }

.hud {
  position: absolute; right: clamp(20px, 4vw, 56px); top: 120px; z-index: 2;
  font-size: 11px; color: var(--dim); display: grid; gap: 6px; text-align: right;
  padding: 12px 14px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(6px);
}
.hud .k { color: var(--camel); margin-right: 10px; }
.hud .ok { color: var(--moss); }
.hud .bad { color: var(--salmon); }
.scroll-hint {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 10px; letter-spacing: .3em; color: var(--dim); text-transform: uppercase;
}
.scroll-hint i { width: 1px; height: 46px; background: linear-gradient(var(--moss), transparent); animation: drip 2s infinite var(--ease); transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 860px) { .hud { display: none; } }

/* ---------- manifesto (scroll scrub) ---------- */
.manifesto { padding: 18vh clamp(20px, 8vw, 160px); max-width: 1300px; margin: 0 auto; }
.scrub { font-size: clamp(26px, 3.6vw, 50px); line-height: 1.25; font-weight: 500; color: var(--ink); letter-spacing: -.015em; }
.scrub .w { opacity: .14; transition: opacity .25s linear, color .25s; }
.scrub .w.on { opacity: 1; }
.scrub .hl.on, .scrub .hl .w.on { color: var(--salmon); }

/* ---------- chapters ---------- */
.chapter { padding: 14vh clamp(20px, 6vw, 96px); max-width: 1320px; margin: 0 auto; }
.chapter-head { display: flex; gap: clamp(20px, 4vw, 56px); align-items: flex-start; margin-bottom: 72px; }
.chapter-num {
  font-size: clamp(60px, 9vw, 120px); line-height: .8; font-weight: 400;
  color: transparent; -webkit-text-stroke: 1px rgba(120,188,97,.55);
}
h2 { font-size: clamp(34px, 5vw, 68px); line-height: 1.02; font-weight: 600; color: var(--ink); letter-spacing: -.03em; }
h3 { font-size: 22px; color: var(--ink); font-weight: 500; margin-bottom: 10px; letter-spacing: -.01em; }
h4 { font-size: 15px; color: var(--ink); font-weight: 500; }
.lede { font-size: clamp(19px, 1.6vw, 23px); max-width: 820px; margin-bottom: 64px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
.card, .stat {
  position: relative; padding: 32px 28px 30px; border: 1px solid var(--line);
  background: var(--glass); backdrop-filter: blur(6px); overflow: hidden;
  transition: border-color .4s, transform .4s var(--ease);
}
.card::before, .stat::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--moss), transparent);
  transform: translateX(-100%); transition: transform .9s var(--ease);
}
.card:hover::before, .stat:hover::before { transform: translateX(100%); }
.card:hover, .stat:hover { border-color: rgba(120,188,97,.4); transform: translateY(-4px); }
.grid-3 .reveal:nth-child(2) { transition-delay: .12s; }
.grid-3 .reveal:nth-child(3) { transition-delay: .24s; }
.card-icon { font-size: 13px; color: var(--camel); margin-bottom: 40px; }
.card.hot { border-color: rgba(120,188,97,.35); background: linear-gradient(160deg, rgba(120,188,97,.10), var(--glass) 60%); }
.card.hot .card-icon { color: var(--moss); }

/* ---------- split / adversarial ---------- */
.split { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
@media (max-width: 980px) { .split { grid-template-columns: 1fr; } }
.prose p { margin-bottom: 22px; }
.callout { border-left: 2px solid var(--salmon); padding: 6px 0 6px 20px; color: var(--ink); font-size: 20px; }

.adv {
  border: 1px solid var(--line); background: rgba(19,18,0,.75); backdrop-filter: blur(8px);
  padding: 22px; position: relative; transition-delay: .15s;
}
.adv::after { /* corner brackets */
  content: ""; position: absolute; inset: -1px; pointer-events: none;
  background:
    linear-gradient(var(--moss), var(--moss)) top left / 14px 1px no-repeat,
    linear-gradient(var(--moss), var(--moss)) top left / 1px 14px no-repeat,
    linear-gradient(var(--moss), var(--moss)) bottom right / 14px 1px no-repeat,
    linear-gradient(var(--moss), var(--moss)) bottom right / 1px 14px no-repeat;
}
.adv-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); margin-bottom: 20px; }
.tag { border: 1px solid var(--line); padding: 1px 8px; color: var(--camel); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.adv-panels { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.adv-panels figure { flex: 1; text-align: center; }
.adv-panels canvas { width: 100%; aspect-ratio: 1; image-rendering: pixelated; border: 1px solid var(--line); display: block; }
.adv-panels figcaption { font-size: 11px; color: var(--dim); margin-top: 8px; }
.op { color: var(--camel); font-size: 14px; white-space: nowrap; }
.slider { display: flex; align-items: center; gap: 16px; margin: 24px 0 18px; font-size: 13px; }
.slider b { color: var(--salmon); font-weight: 500; display: inline-block; min-width: 50px; }
input[type=range] { flex: 1; -webkit-appearance: none; appearance: none; height: 2px; background: var(--line); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; background: var(--salmon); border-radius: 0; transform: rotate(45deg); box-shadow: 0 0 16px rgba(233,128,110,.6); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; background: var(--salmon); border: none; border-radius: 0; }
.preds { display: grid; gap: 8px; font-size: 12px; }
.pred { display: grid; grid-template-columns: 120px 1fr 52px; align-items: center; gap: 12px; }
.pred .lbl { color: var(--sage); }
.pred .bar { height: 6px; background: rgba(192,199,129,.08); position: relative; overflow: hidden; }
.pred .bar i { position: absolute; inset: 0; background: var(--moss); transform-origin: left; transform: scaleX(var(--v)); transition: transform .35s var(--ease), background .3s; }
.pred.top .bar i { box-shadow: 0 0 12px currentColor; }
.pred.bad .bar i { background: var(--salmon); }
.pred .pct { text-align: right; color: var(--dim); }
.adv-note { margin-top: 18px; font-size: 13px; color: var(--dim); }
.ok { color: var(--moss); }
.bad { color: var(--salmon); }
.adv.attacked { animation: glitch .35s steps(2) 1; }
@keyframes glitch { 0% { transform: translate(0); } 25% { transform: translate(-3px, 1px); } 50% { transform: translate(3px, -1px); } 75% { transform: translate(-1px, 2px); } 100% { transform: none; } }

/* ---------- VLA pipeline ---------- */
.pipeline { position: relative; height: 340px; margin-bottom: 72px; }
.pipe-svg { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 220px; overflow: visible; }
.pipe-svg path { fill: none; stroke: rgba(192,199,129,.25); stroke-width: 1.5; stroke-dasharray: 6 8; animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -28; } }
.stage { position: absolute; left: var(--x); top: 70px; width: 19%; min-width: 160px; }
.node {
  width: 80px; height: 80px; display: grid; place-items: center; border: 1px solid var(--moss);
  background: var(--bg); color: var(--moss); font-size: 13px; position: relative; margin-bottom: 20px;
  box-shadow: 0 0 0 6px rgba(19,18,0,1), 0 0 30px rgba(120,188,97,.15);
  transition: border-color .3s, color .3s, box-shadow .3s;
}
.node.core { width: 80px; height: 80px; transform: rotate(45deg); }
.node.core span { display: inline-block; transform: rotate(-45deg); }
.stage .threat {
  margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--dim);
  border-left: 1px solid rgba(233,128,110,.35); padding-left: 12px; transition: color .3s, border-color .3s;
}
.threat b { color: var(--salmon); font-weight: 400; }
.stage:hover .node, .stage.lit .node { border-color: var(--salmon); color: var(--salmon); box-shadow: 0 0 0 6px var(--bg), 0 0 40px rgba(233,128,110,.35); }
.stage:hover .threat, .stage.lit .threat { color: var(--sage); border-color: var(--salmon); }
.packet { position: absolute; width: 10px; height: 10px; background: var(--moss); border-radius: 50%; box-shadow: 0 0 18px var(--moss); top: 0; left: 0; pointer-events: none; }
@media (max-width: 900px) {
  .pipeline { height: auto; display: grid; gap: 28px; }
  .pipe-svg, .packet { display: none; }
  .stage { position: static; width: auto; }
}

.quote { border: 1px solid var(--line); padding: clamp(28px, 4vw, 52px); background: var(--glass); position: relative; }
.quote::before { content: "“"; position: absolute; top: -28px; left: 28px; font-size: 100px; line-height: 1; color: var(--moss); font-family: Georgia, serif; }
.quote p { font-size: clamp(20px, 2.2vw, 30px); line-height: 1.35; color: var(--ink); margin-bottom: 18px; letter-spacing: -.01em; }
.quote .src { font-size: 11px; color: var(--camel); }

/* ---------- timeline ---------- */
.timeline-wrap { padding-top: 6vh; }
.timeline { position: relative; margin-top: 48px; padding: 20px 0; }
.t-axis { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line); transform: translateX(-50%); }
.t-fill { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: linear-gradient(var(--camel), var(--moss)); transform-origin: top; transform: scaleY(0); }
.t-item { position: relative; width: 50%; padding: 22px 52px; }
.t-item.left { text-align: right; }
.t-item.right { margin-left: 50%; }
.t-item.center { width: 100%; text-align: center; padding-top: 56px; }
.t-item .yr { display: block; font-size: 13px; color: var(--camel); margin-bottom: 6px; letter-spacing: .15em; }
.t-item p { font-size: 17px; }
.t-item p b { color: var(--ink); font-weight: 500; }
.t-item .dot { position: absolute; top: 30px; width: 11px; height: 11px; border-radius: 50%; }
.t-item.left .dot { right: -6px; }
.t-item.right .dot { left: -5px; }
.t-item.center .dot { left: 50%; top: 30px; transform: translateX(-50%); }
.dot.ml { background: var(--salmon); box-shadow: 0 0 14px rgba(233,128,110,.6); }
.dot.rb { background: var(--camel); box-shadow: 0 0 14px rgba(197,155,118,.6); }
.dot.now { width: 18px !important; height: 18px !important; background: var(--moss); box-shadow: 0 0 0 6px rgba(120,188,97,.15), 0 0 30px var(--moss); animation: pulse 2s infinite; }
.t-item.center p { font-size: 22px; }
.legend { display: flex; gap: 28px; justify-content: center; font-size: 12px; color: var(--dim); margin-top: 28px; }
.legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.t-item.left.reveal { transform: translateX(-40px); }
.t-item.right.reveal { transform: translateX(40px); }
.t-item.reveal.in { transform: none; }
@media (max-width: 760px) {
  .t-axis { left: 8px; }
  .t-item, .t-item.right, .t-item.center { width: 100%; margin-left: 0; text-align: left; padding: 18px 0 18px 36px; }
  .t-item.left .dot, .t-item.right .dot, .t-item.center .dot { left: 3px; right: auto; transform: none; }
}

/* ---------- economy ---------- */
.econ-big p { font-size: clamp(30px, 4.4vw, 62px); line-height: 1.1; color: var(--ink); font-weight: 500; letter-spacing: -.025em; margin-bottom: 64px; }
.econ-big .dim { color: var(--camel); }
.stat-k { display: block; font-size: 12px; color: var(--moss); letter-spacing: .18em; margin-bottom: 18px; }
.econ-foot { margin-top: 64px; max-width: 860px; font-size: 20px; }
.econ-foot p { margin-bottom: 22px; }
.accent-line { color: var(--moss); font-family: var(--mono); font-size: 15px; letter-spacing: .02em; }
.accent-line::before { content: "> "; color: var(--camel); }

/* ---------- work ---------- */
.work { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 640px) { .work { grid-template-columns: 1fr; } }
.work-item {
  background: var(--bg); padding: 40px 32px 36px; position: relative; overflow: hidden;
  transform-style: preserve-3d; transition: background .4s, opacity 1s var(--ease), transform 1s var(--ease);
}
.work-item::after { /* spotlight following mouse */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(120,188,97,.13), transparent 60%);
}
.work-item:hover::after { opacity: 1; }
.work-item:hover { background: var(--bg-2); }
.work .reveal:nth-child(2n) { transition-delay: .12s; }
.wi-num { font-size: 12px; color: var(--camel); display: block; margin-bottom: 44px; }
.work-item p { font-size: 16px; margin-bottom: 22px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 10.5px; }
.tags li { padding: 3px 9px; border: 1px solid var(--line); color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.work-item:hover .tags li { border-color: rgba(120,188,97,.35); color: var(--sage); }

/* ---------- closing ---------- */
.closing { min-height: 90vh; display: grid; place-items: center; text-align: center; padding: 14vh 24px; position: relative; }
.closing::before {
  content: ""; position: absolute; width: min(70vw, 760px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(120,188,97,.16), transparent 65%); filter: blur(20px); z-index: -1;
}
.big { font-size: clamp(38px, 6.4vw, 92px); line-height: 1; margin-bottom: 28px; }
.closing-sub { max-width: 560px; margin: 0 auto; font-size: 19px; }
.closing .eyebrow { margin-bottom: 30px; }

.foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 28px clamp(20px, 4vw, 56px); border-top: 1px solid var(--line); font-size: 11px; color: var(--sage);
  text-transform: uppercase; letter-spacing: .12em;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
