/* ============================================================
   Delta Executor — Design System
   Cyber-neon GREEN theme · dark (default) + light mode
   Fonts: Space Grotesk (display) · Inter (body) · JetBrains Mono
   ============================================================ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  /* dark theme (default) */
  --bg: #060907;
  --bg-grid: rgba(22, 224, 102, 0.04);
  --surface: #0c120e;
  --surface-2: #121a15;
  --surface-3: #18231c;
  --border: rgba(22, 224, 102, 0.14);
  --border-soft: rgba(231, 240, 234, 0.08);
  --brand: #16e066;
  --brand-dim: #10b853;
  --brand-2: #8b6cff;
  --brand-glow: rgba(22, 224, 102, 0.35);
  --success: #38e08a;
  --warn: #ffb020;
  --danger: #ff5470;
  --text: #e7f0ea;
  --muted: #8ba796;
  --on-brand: #04140a;
  --glass: rgba(6, 9, 7, 0.78);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --code-bg: #0a0f0c;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --container: 1160px;
  --header-h: 68px;
}

[data-theme="light"] {
  --bg: #f4faf6;
  --bg-grid: rgba(11, 168, 74, 0.05);
  --surface: #ffffff;
  --surface-2: #ecf5ef;
  --surface-3: #e2efe7;
  --border: rgba(11, 168, 74, 0.22);
  --border-soft: rgba(20, 32, 26, 0.1);
  --brand: #0ba84a;
  --brand-dim: #098a3d;
  --brand-2: #6c4fe0;
  --brand-glow: rgba(11, 168, 74, 0.25);
  --success: #0e9e5c;
  --warn: #b97a00;
  --danger: #d63455;
  --text: #14201a;
  --muted: #55685d;
  --on-brand: #ffffff;
  --glass: rgba(244, 250, 246, 0.85);
  --shadow: 0 8px 28px rgba(20, 32, 26, 0.1);
  --code-bg: #0c120e; /* console stays dark in light mode — it's a terminal */
}

/* ── Reset / base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 44px 44px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
section { padding: 56px 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--brand); color: var(--on-brand); padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* mono "eyebrow" label above headings */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--brand);
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 10px;
}
.eyebrow::before { content: "> "; opacity: 0.7; }

.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { color: var(--muted); }
.center { text-align: center; margin-inline: auto; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  height: var(--header-h);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: var(--text); text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--on-brand); font-weight: 700; font-size: 1.15rem;
  box-shadow: 0 0 18px var(--brand-glow);
}
[data-theme="light"] .brand-mark { color: #fff; }

.main-nav { margin-left: auto; }
.nav-list {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0; padding: 0;
}
.nav-list > li { position: relative; }
.nav-list a, .nav-drop-btn {
  display: inline-block; padding: 9px 13px;
  color: var(--text); font-size: 0.95rem; font-weight: 500;
  background: none; border: 0; cursor: pointer; font-family: inherit;
  border-radius: var(--radius-sm);
}
.nav-list a:hover, .nav-drop-btn:hover { background: var(--surface-2); text-decoration: none; }
.nav-list a[aria-current="page"], .nav-drop-btn.is-active { color: var(--brand); }
.caret { font-size: 0.7em; opacity: 0.7; }

.dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: 6px; margin: 0; list-style: none;
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.open .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown a { display: block; padding: 9px 12px; width: 100%; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  position: relative; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border-soft); background: var(--surface-2);
  color: var(--text); cursor: pointer; overflow: hidden;
  display: grid; place-items: center;
  transition: border-color .25s ease, box-shadow .25s ease, transform .18s ease;
}
.theme-toggle:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); transform: translateY(-1px); }
.theme-toggle:active { transform: scale(.9); }
.theme-toggle-orb { position: relative; width: 20px; height: 20px; }
.theme-icon {
  position: absolute; inset: 0; width: 20px; height: 20px;
  transition: opacity .45s ease, transform .55s cubic-bezier(.5, 1.7, .4, 1);
}
.theme-icon-sun  { color: #ffc63d; }
.theme-icon-moon { color: var(--brand); }
[data-theme="dark"]  .theme-icon-sun  { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"]  .theme-icon-moon { opacity: 0; transform: rotate(90deg) scale(.3); }
[data-theme="light"] .theme-icon-sun  { opacity: 0; transform: rotate(-90deg) scale(.3); }
[data-theme="light"] .theme-icon-moon { opacity: 1; transform: rotate(0) scale(1); }

.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-burger span {
  width: 22px; height: 2px; background: var(--text);
  border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dim));
  color: var(--on-brand);
  box-shadow: 0 0 20px var(--brand-glow);
}
.btn-primary:hover { box-shadow: 0 0 32px var(--brand-glow); }
.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-lg { padding: 15px 32px; font-size: 1.05rem; }
.btn-nav { padding: 9px 18px; }

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding: 84px 0 64px; position: relative; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 48px; align-items: center;
}
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 520px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 18px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; }

.chip {
  font-family: var(--font-mono); font-size: 0.8rem;
  padding: 6px 12px; border-radius: 100px;
  background: var(--surface-2); border: 1px solid var(--border-soft);
  color: var(--muted);
}
.chip strong { color: var(--brand); font-weight: 600; }

/* trust badges */
.trust-badges { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 22px; }
.trust-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.88rem; color: var(--muted);
}
.trust-badge::before { content: "✓"; color: var(--success); font-weight: 700; }

/* ── Console (signature component) ──────────────────────── */
.console {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 44px var(--brand-glow);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.88rem;
}
.console-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.console-dot { width: 11px; height: 11px; border-radius: 50%; }
.console-dot.red { background: #ff5f57; }
.console-dot.yellow { background: #febc2e; }
.console-dot.green { background: #28c840; }
.console-title { margin-left: 8px; color: #8ba796; font-size: 0.78rem; }
.console-body { padding: 18px 20px; min-height: 240px; color: #cfe8d8; }
.console-body .line { display: block; white-space: pre-wrap; word-break: break-word; }
.console-body .cmt { color: #5c7a68; }
.console-body .kw { color: #8b6cff; }
.console-body .str { color: #ffd479; }
.console-body .fn { color: #16e066; }
.console-body .ok { color: #38e08a; font-weight: 700; }
.cursor {
  display: inline-block; width: 8px; height: 1.1em;
  background: #16e066; vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── Cards / grids ──────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border);
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card p { color: var(--muted); margin-bottom: 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

/* platform cards */
.platform-card { text-align: left; position: relative; display: block; color: var(--text); }
.platform-card:hover { text-decoration: none; }
.platform-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.5rem;
  background: var(--surface-3); margin-bottom: 16px;
  border: 1px solid var(--border);
}
.platform-card .meta {
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--muted); margin-top: 12px; display: block;
}
.platform-card .go {
  color: var(--brand); font-weight: 600; font-size: 0.92rem;
  display: inline-block; margin-top: 12px;
  transition: transform 0.15s ease;
}
/* prominent highlight so the whole card reads as a clickable link */
.platform-card:hover,
.platform-card:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), 0 14px 34px rgba(0, 0, 0, 0.28), 0 0 34px var(--brand-glow);
}
.platform-card:hover .platform-icon {
  border-color: var(--brand);
  box-shadow: 0 0 16px var(--brand-glow);
}
.platform-card:hover .go { transform: translateX(4px); }

/* stat strip */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  padding: 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border-soft);
}
.stat { text-align: center; }
.stat b {
  display: block; font-family: var(--font-display);
  font-size: 1.7rem; color: var(--brand);
}
.stat span { font-size: 0.85rem; color: var(--muted); }

/* bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bento .card.span-2 { grid-column: span 2; }

/* steps */
.steps { display: grid; gap: 16px; counter-reset: step; padding: 0; margin: 0; list-style: none; }
.step {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 20px 22px;
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-weight: 700;
  color: var(--brand); font-size: 1.05rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 6px 10px; flex-shrink: 0;
}
.step h3 { margin-bottom: 4px; font-size: 1.05rem; }
.step p { color: var(--muted); margin: 0; }

/* ── FAQ accordion ──────────────────────────────────────── */
.accordion { display: grid; gap: 12px; }
.accordion details {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); overflow: hidden;
}
.accordion details[open] { border-color: var(--border); }
.accordion summary {
  cursor: pointer; padding: 18px 22px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+"; font-family: var(--font-mono); color: var(--brand);
  font-size: 1.2rem; transition: transform 0.2s ease;
}
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion .answer { padding: 0 22px 18px; color: var(--muted); }
/* a CTA button that follows a content block: consistent gap above, none below */
.bento + .center, .grid-2 + .center, .grid-3 + .center, .grid-4 + .center,
.steps + .center, .accordion + .center, .table-wrap + .center,
.post-grid + .center {
  margin: 36px 0 0;
}

/* ── Tables (changelog / requirements) ──────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border-soft); }
table.data {
  width: 100%; border-collapse: collapse;
  background: var(--surface); font-size: 0.94rem;
}
table.data th, table.data td {
  text-align: left; padding: 13px 18px;
  border-bottom: 1px solid var(--border-soft);
}
table.data th {
  font-family: var(--font-mono); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); background: var(--surface-2);
}
table.data tr:last-child td { border-bottom: 0; }
table.data .version-chip {
  font-family: var(--font-mono); color: var(--brand); font-weight: 600;
}

/* ── Notices / bands ────────────────────────────────────── */
.notice {
  border-radius: var(--radius); padding: 18px 22px;
  border: 1px solid; font-size: 0.95rem;
  display: flex; gap: 12px; align-items: flex-start;
}
.notice-warn {
  border-color: rgba(255, 176, 32, 0.35);
  background: rgba(255, 176, 32, 0.07);
  color: var(--text);
}
.notice-warn::before { content: "⚠"; color: var(--warn); font-size: 1.1rem; }
.notice-info {
  border-color: var(--border);
  background: rgba(22, 224, 102, 0.06);
}
.notice-info::before { content: "ℹ"; color: var(--brand); font-size: 1.1rem; }

.disclaimer-band {
  background: var(--surface); border-block: 1px solid var(--border-soft);
  padding: 28px 0; font-size: 0.92rem; color: var(--muted);
}
.disclaimer-band strong { color: var(--warn); }

/* version box */
.version-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px;
}
.version-box .vb-item span {
  display: block; font-family: var(--font-mono); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
}
.version-box .vb-item b { font-family: var(--font-display); font-size: 1.08rem; }
.version-box .vb-item b.hl { color: var(--brand); }

/* ── Blog ───────────────────────────────────────────────── */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { display: flex; flex-direction: column; color: var(--text); }
.post-card:hover { text-decoration: none; }
.post-card time {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted);
  display: block; margin-bottom: 8px;
}
.post-card .excerpt { color: var(--muted); font-size: 0.94rem; flex: 1; }
.post-card .read-more { color: var(--brand); font-weight: 600; font-size: 0.9rem; margin-top: 14px; }
.post-card { overflow: hidden; }
.post-card-thumb {
  width: calc(100% + 52px); margin: -26px -26px 16px; height: 172px;
  object-fit: cover; display: block; background: var(--surface-2);
}
.post-hero {
  width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover;
  border-radius: var(--radius); margin: 8px 0 24px; border: 1px solid var(--border-soft);
}

.post-body { max-width: 760px; }
.post-body h2 { margin-top: 1.6em; }
.post-body img { border-radius: var(--radius); }
.post-body code {
  font-family: var(--font-mono); font-size: 0.88em;
  background: var(--surface-2); padding: 2px 7px; border-radius: 5px;
}
.post-body pre {
  background: var(--code-bg); color: #cfe8d8; padding: 18px 20px;
  border-radius: var(--radius-sm); overflow-x: auto;
  border: 1px solid var(--border);
}

/* ── Breadcrumbs ────────────────────────────────────────── */
.breadcrumbs { padding: 18px 0 0; font-size: 0.85rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li { color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; opacity: 0.5; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs [aria-current="page"] { color: var(--text); }

/* ── Ad slots (fixed size, no CLS) ──────────────────────── */
.ad-slot {
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px dashed var(--border-soft);
  border-radius: var(--radius-sm); color: var(--muted);
  font-family: var(--font-mono); font-size: 0.75rem;
  margin: 32px auto;
}
.ad-slot-leaderboard { width: 100%; max-width: 728px; min-height: 90px; }
.ad-slot-rect { width: 100%; max-width: 336px; min-height: 280px; }

/* ── Forms ──────────────────────────────────────────────── */
.form-grid { display: grid; gap: 16px; max-width: 560px; }
label { font-weight: 600; font-size: 0.92rem; display: block; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"],
input[type="url"], textarea, select {
  width: 100%; padding: 12px 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.96rem;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
textarea { min-height: 140px; resize: vertical; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  margin-top: 48px;
  background: var(--surface);
  border-top: 1px solid var(--border-soft);
  padding: 56px 0 28px;
  font-size: 0.93rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px; margin-bottom: 40px;
}
.footer-heading {
  font-family: var(--font-mono); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin-bottom: 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-col a { color: var(--text); }
.footer-col a:hover { color: var(--brand); }
.footer-blurb { color: var(--muted); margin: 14px 0 10px; }
.footer-disclaimer-snippet { font-size: 0.8rem; color: var(--muted); opacity: 0.8; }
.footer-seo {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  border-top: 1px solid var(--border-soft); padding-top: 20px; margin-top: 8px;
  font-size: 0.82rem;
}
.footer-seo-label { color: var(--muted); font-family: var(--font-mono); font-size: 0.78rem; }
.footer-seo a { color: var(--muted); }
.footer-seo a:hover { color: var(--brand); }

.footer-legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px;
  border-top: 1px solid var(--border-soft); padding-top: 22px; margin-top: 20px;
  color: var(--muted); font-size: 0.85rem;
}
.legal-links { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.legal-links a { color: var(--muted); }
.legal-links a:hover { color: var(--brand); }
.copyright { margin: 0; }

/* ── Scroll reveal ──────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ── 404 ────────────────────────────────────────────────── */
.error-hero { text-align: center; padding: 100px 0; }
.error-code {
  font-family: var(--font-mono); font-size: clamp(4rem, 14vw, 8rem);
  font-weight: 700; color: var(--brand);
  text-shadow: 0 0 40px var(--brand-glow); line-height: 1;
}

/* ── Motion & polish ────────────────────────────────────── */

/* smooth palette crossfade when toggling theme (only on surfaces that
   don't already own a transition, so we never clobber hover animations) */
body, .site-header, .site-footer, .console, .stat-strip, .version-box,
table.data, table.data th, table.data td, .accordion details,
input, textarea, select {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}

/* brand mark: gentle ambient glow + playful hover tilt */
.brand-mark { transition: transform .3s cubic-bezier(.5, 1.7, .4, 1); animation: brandPulse 3.4s ease-in-out infinite; }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
@keyframes brandPulse {
  0%, 100% { box-shadow: 0 0 16px var(--brand-glow); }
  50%      { box-shadow: 0 0 26px var(--brand-glow); }
}

/* animated underline on primary nav links */
.nav-list > li > a { position: relative; }
.nav-list > li > a::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 5px;
  height: 2px; border-radius: 2px; background: var(--brand);
  transform: scaleX(0); transform-origin: left; transition: transform .28s ease;
}
.nav-list > li > a:hover::after,
.nav-list > li > a[aria-current="page"]::after { transform: scaleX(1); }

/* buttons: light sheen sweep + tactile press */
.btn { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -130%;
  width: 55%; height: 100%; transform: skewX(-20deg); pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .38), transparent);
  transition: left .6s ease;
}
.btn-primary:hover::after { left: 150%; }
.btn:active { transform: translateY(0) scale(.97); }

/* hero ambient glow orbs (clipped by hero's overflow:hidden) */
.hero { isolation: isolate; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(90px); z-index: -1; pointer-events: none; opacity: .55;
}
.hero::before {
  width: 360px; height: 360px; top: -80px; left: -90px;
  background: radial-gradient(circle, var(--brand-glow), transparent 70%);
  animation: orbA 13s ease-in-out infinite;
}
.hero::after {
  width: 300px; height: 300px; bottom: -90px; right: -70px;
  background: radial-gradient(circle, rgba(139, 108, 255, .28), transparent 70%);
  animation: orbB 16s ease-in-out infinite;
}
@keyframes orbA { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(28px, 22px); } }
@keyframes orbB { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-24px, -18px); } }

/* staggered scroll-reveal for grids of cards */
.reveal :is(.grid-3, .grid-4, .bento, .steps, .post-grid, .stat-strip) > * {
  opacity: 0; transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.is-visible :is(.grid-3, .grid-4, .bento, .steps, .post-grid, .stat-strip) > * {
  opacity: 1; transform: none;
}
.reveal.is-visible :is(.grid-3, .grid-4, .bento, .steps, .post-grid, .stat-strip) > *:nth-child(2) { transition-delay: .07s; }
.reveal.is-visible :is(.grid-3, .grid-4, .bento, .steps, .post-grid, .stat-strip) > *:nth-child(3) { transition-delay: .14s; }
.reveal.is-visible :is(.grid-3, .grid-4, .bento, .steps, .post-grid, .stat-strip) > *:nth-child(4) { transition-delay: .21s; }
.reveal.is-visible :is(.grid-3, .grid-4, .bento, .steps, .post-grid, .stat-strip) > *:nth-child(5) { transition-delay: .28s; }
.reveal.is-visible :is(.grid-3, .grid-4, .bento, .steps, .post-grid, .stat-strip) > *:nth-child(n+6) { transition-delay: .34s; }

/* small life on accordion + platform icons */
.accordion summary { transition: color .2s ease; }
.accordion details[open] summary, .accordion summary:hover { color: var(--brand); }
.platform-icon { transition: transform .25s cubic-bezier(.5, 1.7, .4, 1), border-color .25s ease, box-shadow .25s ease; }
.card:hover .platform-icon { transform: translateY(-2px); }

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1020px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento .card.span-2 { grid-column: span 2; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }

  /* mobile drawer nav */
  .nav-burger { display: flex; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 0 auto;
    width: min(320px, 85vw);
    background: var(--surface);
    border-left: 1px solid var(--border-soft);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto; padding: 18px;
    margin-left: 0;
  }
  .main-nav.open { transform: translateX(0); box-shadow: var(--shadow); }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-list a, .nav-drop-btn { display: block; width: 100%; text-align: left; padding: 13px 14px; }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; padding-left: 16px;
    display: none;
  }
  .has-dropdown.open .dropdown { display: block; }
  .btn-nav { display: none; }
}

@media (max-width: 560px) {
  section { padding: 44px 0; }
  .hero { padding: 56px 0 40px; }
  .grid-2, .grid-4, .bento, .post-grid { grid-template-columns: 1fr; }
  .bento .card.span-2 { grid-column: span 1; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-legal { flex-direction: column; }
}
