/* ---------- DESIGN TOKENS ---------- */
:root {
  --bg: #0a0a0a;
  --bg-1: #0f0f0f;
  --bg-2: #161616;
  --bg-3: #1c1c1c;
  --rule: #232323;
  --rule-2: #2e2e2e;
  --fg: #fafafa;
  --fg-1: #d4d4d4;
  --fg-2: #8a8a8a;
  --fg-3: #9a9a9a;
  /* --green and --red are intentionally available even though only used inline */
  --accent: oklch(76% 0.13 75);   /* warm amber */
  --accent-soft: oklch(76% 0.13 75 / 0.12);
  --accent-line: oklch(76% 0.13 75 / 0.35);
  --green: oklch(76% 0.13 145);
  --red: oklch(70% 0.16 25);

  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --max: 1280px;
  --gutter: 32px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
html, body { background: var(--bg); color: var(--fg); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--accent); color: #0a0a0a; }

/* ---------- SKIP LINK ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--bg-1);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 12px;
  border: 1px solid var(--accent);
}
.skip-link:focus { left: 8px; }

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--rule-2); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--fg-3); }

/* ---------- LAYOUT ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); width: 100%; }

/* ---------- TYPE ---------- */
.mono { font-family: var(--mono); }
.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.label-accent { color: var(--accent); }
.h1 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(40px, 6.4vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.h2 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.body { font-size: 15px; line-height: 1.6; color: var(--fg-1); }
.body-lg { font-size: 17px; line-height: 1.6; color: var(--fg-1); }
.small { font-size: 13px; color: var(--fg-2); line-height: 1.55; }
.tiny { font-family: var(--mono); font-size: 11px; color: var(--fg-3); letter-spacing: 0.06em; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,10,0.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; }
.brand-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 12px var(--accent); }
.brand-name { color: var(--fg); letter-spacing: 0.02em; }
.brand-sub { color: var(--fg-3); }
.nav-links { display: flex; gap: 4px; align-items: center; font-family: var(--mono); font-size: 12px; }
.nav-link {
  padding: 8px 14px; color: var(--fg-2); border-radius: 2px; position: relative;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--fg); }
.nav-link.active { color: var(--fg); }
.nav-link.active::before {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 1px; background: var(--accent);
}
.nav-status { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--fg-2); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border: 1px solid var(--rule-2);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--fg); background: transparent; transition: all 0.18s;
  text-transform: uppercase;
}
.btn:hover { border-color: var(--accent); color: var(--accent); background: color-mix(in oklab, var(--accent) 6%, transparent); }
.btn-primary { background: var(--accent); color: #0a0a0a; border-color: var(--accent); }
.btn-primary:hover { background: transparent; color: var(--accent); }
.btn-ghost { border-color: transparent; padding-left: 0; padding-right: 0; }
.btn-ghost:hover { transform: none; }
.btn .arrow { transition: color 0.2s; }
.btn:hover .arrow { color: var(--accent); }

/* ---------- ANIMATIONS ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

@keyframes blink { 50% { opacity: 0; } }
.cursor { display: inline-block; width: 0.55em; height: 1em; background: var(--accent); margin-left: 0.08em; vertical-align: -0.12em; animation: blink 1.05s steps(1) infinite; }

@keyframes scan {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ---------- PAGE TRANSITIONS ---------- */
.page-fade { animation: pageEnter 0.5s ease both; }
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-leaving { opacity: 0; transition: opacity 0.25s ease; }

/* ---------- SECTIONS ---------- */
.section { padding: 120px 0; border-top: 1px solid var(--rule); position: relative; }
.section-head { display: grid; grid-template-columns: 200px 1fr; gap: 48px; margin-bottom: 64px; align-items: start; }
.section-head .label { padding-top: 8px; }
@media (max-width: 900px) {
  .section { padding: 80px 0; }
  .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; }
}

/* ---------- CARDS / RULES ---------- */
.rule { height: 1px; background: var(--rule); width: 100%; }
.card {
  border: 1px solid var(--rule);
  background: var(--bg-1);
  padding: 28px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.card:hover { border-color: var(--rule-2); background: var(--bg-2); }
.card-tick {
  position: absolute; top: 0; left: 0; height: 1px; background: var(--accent);
  width: 0; transition: width 0.4s ease;
}
.card:hover .card-tick { width: 100%; }

/* ---------- TICKER GRID BG ---------- */
.gridbg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 30%, transparent 80%);
  pointer-events: none;
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--rule); padding: 48px 0 32px; margin-top: auto;
  font-family: var(--mono); font-size: 11px; color: var(--fg-3);
}
.footer-grid { display: grid; grid-template-columns: 1fr auto auto; gap: 32px; align-items: end; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- UTIL ---------- */
.col { display: flex; flex-direction: column; }
.row { display: flex; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.center { display: flex; align-items: center; justify-content: center; }
.muted { color: var(--fg-2); }
