/* ArCoSec — tokens from the logo: charcoal, the mark's grey, and its red */
@font-face { font-family: "Inter"; src: url("../vendor/fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JB Mono"; src: url("../vendor/fonts/jbmono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JB Mono"; src: url("../vendor/fonts/jbmono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --red: #ea433a;
  --red-deep: #b3261e;
  --grey: #6e6f71;
  --charcoal: #222222;
  --ink: #0d0e10;
  --paper: #eef0f3;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JB Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  /* theme-driven (hero.js moves these as the story goes light → rogue → light) */
  --fg: #15171a;
  --fg-2: rgba(21, 23, 26, 0.66);
  --line: rgba(21, 23, 26, 0.14);
  --nav-bg: rgba(238, 240, 243, 0.55);
}
body.theme-dark { --fg: #eceef1; --fg-2: rgba(236, 238, 241, 0.62); --line: rgba(236, 238, 241, 0.14); --nav-bg: rgba(13, 14, 16, 0.5); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--fg); background: var(--ink); -webkit-font-smoothing: antialiased; transition: color .6s ease; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.025em; }

/* nav */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 44px); background: var(--nav-bg); backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); transition: background .6s ease, border-color .6s ease; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-word { font-weight: 700; letter-spacing: .22em; font-size: 15px; color: var(--grey); }
body.theme-dark .brand-word { color: #a7a9ac; }
.brand-word .o { color: var(--red); }
.nav-links { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 30px); font-size: 14px; }
.nav-links a:not(.btn) { text-decoration: none; color: var(--fg-2); transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--fg); }
@media (max-width: 760px) { .nav-links a:not(.btn) { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px; border-radius: 999px; background: var(--red);
  color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; border: 1px solid transparent;
  box-shadow: 0 10px 30px -10px rgba(234, 67, 58, .7); transition: transform .2s ease, box-shadow .2s ease, background .2s; }
.btn:hover { transform: translateY(-1px); background: #f04f46; box-shadow: 0 14px 36px -10px rgba(234, 67, 58, .85); }
.btn-small { padding: 9px 15px; font-size: 13px; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { background: rgba(127, 127, 127, .1); box-shadow: none; }

/* the story */
.story { position: relative; height: 680vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.shade { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .8s ease;
  background: linear-gradient(90deg, rgba(8,9,11,.82) 0%, rgba(8,9,11,.55) 32%, transparent 58%); }
body.theme-dark .shade { opacity: 1; }
.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 65% 45%, transparent 55%, rgba(0,0,0,.28) 100%); }

/* floating data tags, positioned from 3D each frame */
.tags { position: absolute; inset: 0; pointer-events: none; }
.tag { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px; padding: 6px 11px 6px 9px;
  font: 500 12px/1 var(--mono); letter-spacing: .01em; white-space: nowrap; color: #20242a;
  background: rgba(255, 255, 255, .72); border: 1px solid rgba(255, 255, 255, .9); border-radius: 6px;
  box-shadow: 0 6px 22px -8px rgba(20, 30, 50, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; will-change: transform, opacity; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #3f8cff; box-shadow: 0 0 10px #3f8cff; flex: none; }
.tag.ctx-hot::before { background: #2ad3a0; box-shadow: 0 0 10px #2ad3a0; }
.tag.warn { color: #ffd9d6; background: rgba(60, 8, 8, .62); border-color: rgba(234, 67, 58, .7); box-shadow: 0 0 28px -6px rgba(234, 67, 58, .75); }
.tag.warn::before { background: var(--red); box-shadow: 0 0 12px var(--red); }
.tag.far { color: #ffd9d6; background: rgba(40, 10, 10, .55); border-color: rgba(234, 67, 58, .45); }
.tag.far::before { background: var(--red); box-shadow: 0 0 10px var(--red); }
.tag.ok { color: #1b1d20; background: rgba(255, 255, 255, .86); border-color: rgba(34, 34, 34, .12); }
.tag.ok::before { content: "✓"; width: auto; height: auto; background: none; box-shadow: none; color: var(--red); font-size: 12px; }
.tag.gate { font: 600 11px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: #fff; background: var(--charcoal); border-color: rgba(255,255,255,.12); }
.tag.gate::before { background: var(--red); box-shadow: 0 0 10px var(--red); }

/* HUD */
.hud { position: absolute; right: clamp(16px, 4vw, 44px); bottom: clamp(20px, 5vh, 44px); display: grid; gap: 10px; justify-items: end; pointer-events: none; }
.hud-counter { display: grid; justify-items: end; opacity: 0; transition: opacity .5s; }
.hud-counter.on { opacity: 1; }
.hud-k { font: 500 10px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
.hud-v { font: 500 clamp(26px, 3.4vw, 40px)/1.1 var(--mono); color: var(--red); font-variant-numeric: tabular-nums; }
.hud-status { display: flex; align-items: center; gap: 8px; font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }
.hud-status .dot { width: 7px; height: 7px; border-radius: 50%; background: #3f8cff; box-shadow: 0 0 10px #3f8cff; }
.hud-status.rogue .dot { background: var(--red); box-shadow: 0 0 12px var(--red); animation: blink .6s steps(2) infinite; }
.hud-status.safe .dot { background: #2ad3a0; box-shadow: 0 0 10px #2ad3a0; }
@keyframes blink { 50% { opacity: .2; } }

/* scene copy */
.copy { position: absolute; left: clamp(16px, 6vw, 88px); top: 50%; transform: translateY(-50%); width: min(520px, calc(100vw - 32px)); pointer-events: none; }
.scene-copy { position: absolute; left: 0; top: 0; transform: translateY(-50%) translateY(24px); opacity: 0; filter: blur(6px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1), filter .7s ease; }
.scene-copy.on { opacity: 1; transform: translateY(-50%); filter: blur(0); pointer-events: auto; }
.kicker { margin: 0 0 14px; font: 500 12px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--red); }
.scene-copy h1, .scene-copy h2 { font-size: clamp(38px, 5.4vw, 76px); line-height: .98; font-weight: 750; }
.scene-copy .lede { margin: 20px 0 0; font-size: clamp(16px, 1.35vw, 19px); line-height: 1.55; color: var(--fg-2); max-width: 44ch; }
.scene-copy.rogue h2 { color: #fff; text-shadow: 0 0 40px rgba(234, 67, 58, .55); }
.accent { color: var(--red); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (max-width: 760px) {
  .copy { top: auto; bottom: 18vh; transform: none; }
  .scene-copy { transform: translateY(24px); top: auto; bottom: 0; }
  .scene-copy.on { transform: none; }
  .scene-copy h1, .scene-copy h2 { font-size: clamp(32px, 9vw, 44px); }
  .hud { bottom: auto; top: 76px; }
}

.scroll-hint { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px;
  font: 500 10px/1 var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--fg-2); transition: opacity .5s; }
.scroll-hint i { width: 1px; height: 34px; background: linear-gradient(var(--fg-2), transparent); animation: drip 1.8s ease-in-out infinite; transform-origin: top; }
.scroll-hint.off { opacity: 0; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* after the story */
.pillars { position: relative; z-index: 2; padding: clamp(80px, 12vw, 150px) clamp(16px, 6vw, 88px); background: var(--paper); color: #15171a; }
.pillars h2 { font-size: clamp(34px, 4.6vw, 62px); line-height: 1; margin-bottom: 48px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.card { position: relative; display: block; padding: 26px 24px 28px; border-radius: 16px; background: #fff; text-decoration: none;
  border: 1px solid rgba(21,23,26,.08); box-shadow: 0 1px 0 rgba(21,23,26,.04); transition: transform .25s ease, box-shadow .25s ease, border-color .25s; }
.card:hover { transform: translateY(-4px); border-color: rgba(234,67,58,.35); box-shadow: 0 24px 50px -24px rgba(21,23,26,.35); }
.card .n { font: 500 12px/1 var(--mono); color: var(--red); letter-spacing: .14em; }
.card h3 { margin: 18px 0 10px; font-size: 21px; }
.card p { margin: 0; color: rgba(21,23,26,.66); line-height: 1.55; font-size: 15px; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 28px clamp(16px, 6vw, 88px); background: var(--ink); color: #9a9ca0; font-size: 13px; }
.muted { opacity: .6; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene-copy, .tag { transition: none; filter: none; }
  .scroll-hint i { animation: none; }
}
