/* ==========================================================================
   Aravel — stylesheet (upgraded)
   Design tokens, layout, and components for the project homepage.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #030405;
  --bg-alt: #06070a;
  --surface: #0c0f14;
  --surface-2: #12161d;
  --border: #1d2129;
  --border-strong: #2c313c;
  --text: #edf0f4;
  --text-muted: #949bab;
  --text-faint: #737b8c;

  --accent-violet: #1e86f4;
  --accent-violet-soft: #1e86f42b;
  --accent-teal: #12e8f0;
  --accent-teal-soft: #12e8f026;
  --accent-gradient: linear-gradient(135deg, #12e8f0 0%, #1e86f4 100%);
  --accent-gradient-soft: linear-gradient(135deg, #12e8f01f 0%, #1e86f41f 100%);

  --warn: #e3b341;
  --danger: #ef6672;
  --ok: #12e8f0;

  --shadow-soft: 0 1px 0 rgba(255,255,255,0.03) inset, 0 20px 40px -24px rgba(0,0,0,0.6);
  --shadow-lift: 0 30px 60px -30px rgba(0,0,0,0.7);
  --glow-teal: 0 0 22px rgba(18,232,240,0.25);
  --glow-blue: 0 0 22px rgba(30,134,244,0.25);

  --font-display: "Space Grotesk","Segoe UI Variable",-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
  --font-body: "Inter","Segoe UI",-apple-system,BlinkMacSystemFont,"Helvetica Neue",Roboto,Arial,sans-serif;
  --font-mono: "JetBrains Mono",ui-monospace,"SF Mono","Cascadia Mono",Consolas,"Roboto Mono",Menlo,monospace;

  --maxw: 1180px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --nav-h: 72px;

  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f7f8fb;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f2f7;
  --border: #e2e4ed;
  --border-strong: #ccd0e0;
  --text: #12141a;
  --text-muted: #545b6c;
  --text-faint: #676e83;
  --accent-violet-soft: #1e86f414;
  --accent-teal-soft: #12e8f017;
  --accent-gradient-soft: linear-gradient(135deg,#12e8f014 0%,#1e86f414 100%);
  --shadow-soft: 0 1px 0 rgba(255,255,255,0.6) inset, 0 20px 40px -28px rgba(18,20,26,0.18);
  --shadow-lift: 0 30px 60px -30px rgba(18,20,26,0.25);
  --glow-teal: 0 0 22px rgba(8,120,125,0.2);
  color-scheme: light;
  --accent-teal: #08787d;
  --ok: #08787d;
  --warn: #8e6a15;
}

/* ---------- Skip link ---------- */
.visually-hidden-focusable {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  background: var(--surface);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 0 0 10px 0;
  border: 1px solid var(--border-strong);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
}
.visually-hidden-focusable:focus { left: 0; }

/* ---------- Status badge ---------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  padding: 6px 12px;
  border-radius: 999px;
}
.status-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 3px #e3b34122, 0 0 8px #e3b34155;
  animation: dotPulse 2.4s ease-in-out infinite;
}
@keyframes dotPulse {
  0%,100% { box-shadow: 0 0 0 3px #e3b34122, 0 0 8px #e3b34155; }
  50%      { box-shadow: 0 0 0 5px #e3b34115, 0 0 14px #e3b34180; }
}

/* ---------- Reset ---------- */
*,*::before,*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

/* Touch targets: prevent 300ms click delay on mobile */
button, a, summary, [role="button"], label {
  touch-action: manipulation;
}

img,svg { display: block; max-width: 100%; }

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

ul { list-style: none; margin: 0; padding: 0; }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

h1,h2,h3,h4,p { margin: 0; }

a:focus-visible,button:focus-visible,summary:focus-visible,[tabindex]:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Extra small phones (≤ 480px) ---------- */
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .section-head h2 { font-size: clamp(22px,6vw,28px); }
  .hero-copy h1 { font-size: clamp(32px,10vw,48px); }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 16px; }
  .hero-stat .num { font-size: 17px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .btn { font-size: 14px; padding: 11px 16px; }
  .nav-actions .btn-primary { padding: 8px 14px; font-size: 13px; }
  .planned-grid { grid-template-columns: 1fr; }
  .cta-actions { flex-direction: column; width: 100%; }
  .cta-actions .btn { width: 100%; justify-content: center; }
  .timeline { padding-left: 20px; }
  .timeline-item::before { left: -26px; }
  .progress-grid { grid-template-columns: 1fr; }
  .hub { min-height: 280px; }
  .hub-center { width: 80px; height: 80px; font-size: 10px; }
}

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

/* ---------- Utility ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent-teal);
  font-weight: 600;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 0 6px rgba(18,232,240,0.7);
}

.section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px,3.4vw,40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 14px 0 14px;
}
.section-head p {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 56ch;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.subhead-sm { font-family: var(--font-display); font-size: 17px; margin-bottom: 16px; }
.subhead-md { font-family: var(--font-display); font-size: 18px; margin-bottom: 24px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font-mono);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  background: var(--surface-2);
}
.pill.ok {
  color: var(--ok);
  border-color: var(--accent-teal-soft);
  background: var(--accent-teal-soft);
}
.pill.warn { color: var(--warn); border-color: #e3b34133; background: #e3b34114; }

.icon { width: 22px; height: 22px; color: var(--accent-teal); flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent-gradient);
  color: #08110f;
  box-shadow: 0 0 0 0 transparent;
}
.btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18) inset, 0 8px 24px -8px rgba(18,232,240,0.45);
  transform: translateY(-1px);
}

.btn-outline {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface-2);
}
.btn-outline:hover {
  border-color: var(--accent-teal);
  box-shadow: 0 0 12px rgba(18,232,240,0.12);
  transform: translateY(-1px);
}

.btn-ghost { color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); }

.btn svg { width: 16px; height: 16px; }
.btn-sm { padding: 8px 12px; font-size: 13px; }

/* ---------- Nav ---------- */
#top-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent-gradient);
  z-index: 1000;
  transition: width 0.08s linear;
  box-shadow: 0 0 8px rgba(18,232,240,0.7);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.site-nav.scrolled {
  border-bottom-color: var(--border-strong);
  box-shadow: 0 1px 0 var(--border), 0 8px 32px -16px rgba(0,0,0,0.4);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  transition: opacity 0.2s ease;
}
.brand:hover { opacity: 0.8; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }

.hero-logo {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  margin-bottom: 26px;
  box-shadow: var(--shadow-soft), 0 0 40px rgba(18,232,240,0.12);
}
.footer-brand img { border-radius: 8px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s ease, background-color 0.15s ease;
  position: relative;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-gradient);
}

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

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.theme-toggle:hover { border-color: var(--accent-teal); color: var(--accent-teal); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: block; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 16px;
  height: 1.6px;
  background: var(--text);
  position: relative;
  transition: transform 0.22s ease, opacity 0.22s ease, background 0.2s;
}
.nav-toggle span::before { position: absolute; top: -5px; }
.nav-toggle span::after  { position: absolute; top: 5px; }
.nav-toggle[aria-expanded="true"] span                { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before        { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after         { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding: 60px 0 68px;
  overflow: hidden;
  position: relative;
}

/* Canvas background */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 620px;
  background:
    radial-gradient(60% 60% at 30% 20%, var(--accent-violet-soft), transparent 70%),
    radial-gradient(50% 50% at 80% 10%, var(--accent-teal-soft), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,460px);
  gap: 48px;
  align-items: center;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px,6vw,68px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 18px 0 20px;
}
.hero-copy h1 .grad {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Typewriter cursor */
.hero-copy h1 .grad.typing::after {
  content: '|';
  display: inline-block;
  animation: blink 0.65s step-end infinite;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: 2px;
  font-weight: 300;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-copy p.lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 54ch;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 44px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4,auto);
  gap: 28px;
}
.hero-stat .num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
}
.hero-stat .label {
  font-size: 12.5px;
  color: var(--text-faint);
  margin-top: 2px;
}

/* Convergence diagram */
.convergence {
  position: relative;
  aspect-ratio: 1/1;
  width: 100%;
  transition: transform 0.4s cubic-bezier(0.25,1,0.5,1);
  will-change: transform;
}
.convergence svg { width: 100%; height: 100%; overflow: visible; }

.conv-node-bg  { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1; }
.conv-node-label {
  font-family: var(--font-mono);
  font-size: 8.6px;
  fill: var(--text-muted);
}
.conv-path {
  fill: none;
  stroke: url(#convGrad);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 5 8;
  animation: dashflow 4.5s linear infinite;
  opacity: 0.9;
}
@keyframes dashflow { to { stroke-dashoffset: -110; } }

.conv-core-ring {
  fill: none;
  stroke: var(--accent-teal-soft);
  stroke-width: 1.2;
  animation: pulse-ring 3.2s ease-in-out infinite;
  transform-origin: center;
}
@keyframes pulse-ring {
  0%,100% { transform: scale(1); opacity: 0.8; }
  50%      { transform: scale(1.14); opacity: 0.1; }
}

/* ---------- Cards ---------- */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
  gap: 18px;
}
.grid-cards > *, .feature-grid > *, .principles-grid > *,
.arch-cols > *, .os-grid > *, .split > * { min-width: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}
/* Cursor-glow overlay */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(380px circle at var(--glow-x,50%) var(--glow-y,50%), rgba(18,232,240,0.07), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }

.card .icon-wrap {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-gradient-soft);
  margin-bottom: 18px;
  transition: box-shadow 0.25s ease;
}
.card:hover .icon-wrap { box-shadow: 0 0 16px rgba(18,232,240,0.2); }

.card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.card p { color: var(--text-muted); font-size: 14.5px; line-height: 1.65; }

/* ---------- Vision split ---------- */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: start;
}
.split .prose p { color: var(--text-muted); font-size: 16.5px; margin-bottom: 18px; max-width: 60ch; }

.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-teal);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-size: 15px;
  color: var(--text-muted);
}
.callout strong { color: var(--text); }
.callout.note { border-left-color: var(--accent-violet); }
.callout.warn { border-left-color: var(--warn); }
.callout.tip  { border-left-color: var(--accent-teal); }
.callout-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 700;
}

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(270px,1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.feature-grid .card { border: none; border-radius: 0; background: var(--surface); }
.feature-grid .card:hover { transform: none; box-shadow: none; background: var(--surface-2); }
.feature-grid .card::before {
  background: radial-gradient(350px circle at var(--glow-x,50%) var(--glow-y,50%), rgba(18,232,240,0.06), transparent 60%);
}

/* ---------- Shipped chips ---------- */
.shipped { margin-top: 44px; }
.shipped-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.shipped-head h3 { font-family: var(--font-display); font-size: 20px; font-weight: 700; }

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13.5px;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.chip:hover { border-color: var(--border-strong); }
.chip svg { width: 14px; height: 14px; color: var(--accent-teal); }

/* ---------- Architecture ---------- */
.flow { display: flex; flex-direction: column; align-items: center; gap: 0; }
.flow-step {
  width: 100%;
  max-width: 460px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  text-align: center;
  font-weight: 600;
  font-size: 14.5px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.flow-step:hover { border-color: var(--border-strong); box-shadow: 0 0 18px rgba(18,232,240,0.08); }
.flow-step .sub {
  display: block;
  font-weight: 400;
  font-size: 12.5px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.flow-arrow { color: var(--text-faint); padding: 6px 0; }
.flow-arrow svg { width: 16px; height: 16px; }

.arch-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; }
.arch-col h3 { font-family: var(--font-display); font-size: 16px; margin-bottom: 22px; }

/* Hub diagram */
.hub { position: relative; display: grid; place-items: center; min-height: 360px; }
.hub-center {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--accent-gradient-soft);
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  z-index: 2;
  line-height: 1.3;
  box-shadow: 0 0 0 6px rgba(18,232,240,0.05), var(--glow-teal);
}
.hub-ring { position: absolute; inset: 0; display: grid; }
.hub-node {
  position: absolute;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-family: var(--font-mono);
  white-space: nowrap;
  z-index: 2;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hub-node:hover { border-color: var(--accent-teal); box-shadow: 0 0 12px rgba(18,232,240,0.2); }
.hub-node:nth-child(1) { top: 0; left: 50%; transform: translate(-50%,0); }
.hub-node:nth-child(2) { top: 16%; right: 2%; }
.hub-node:nth-child(3) { bottom: 16%; right: 2%; }
.hub-node:nth-child(4) { bottom: 0; left: 50%; transform: translate(-50%,0); }
.hub-node:nth-child(5) { bottom: 16%; left: 2%; }
.hub-node:nth-child(6) { top: 16%; left: 2%; }
.hub-svg-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.hub-svg-lines line { stroke: var(--border-strong); stroke-width: 1; }

.stack-list { display: flex; flex-direction: column; gap: 14px; }
.stack-list .row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.2s;
}
.stack-list .row:hover { border-color: var(--border-strong); }
.stack-list .row .icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  flex-shrink: 0;
}
.stack-list .row h4 { font-size: 14.5px; font-weight: 700; margin-bottom: 3px; }
.stack-list .row p  { font-size: 13.5px; color: var(--text-muted); }

/* ---------- Tables ---------- */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 36px;
}
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
thead th {
  text-align: left;
  background: var(--surface-2);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: var(--surface-2); }
tbody td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
tbody td code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-teal);
  background: var(--accent-teal-soft);
  padding: 2px 7px;
  border-radius: 5px;
}

/* ---------- Documentation ---------- */
.doc-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 40px 44px;
  max-width: 820px;
}
.doc-preview h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.doc-preview h3:not(:first-child) { margin-top: 34px; }
.doc-preview p { color: var(--text-muted); font-size: 15px; line-height: 1.7; margin-bottom: 14px; }
.doc-preview blockquote {
  margin: 0 0 18px;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 14.5px;
  font-style: italic;
}
.doc-preview code:not(pre code) {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1.5px 6px;
  border-radius: 5px;
  color: var(--accent-teal);
}

.task-list { display: grid; gap: 9px; margin-bottom: 18px; }
.task-list li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--text-muted); }
.task-list li.done { color: var(--text); }
.task-list .box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.task-list li.done .box { background: var(--accent-gradient); border-color: transparent; }
.task-list li.done .box svg { width: 10px; height: 10px; color: #051013; }

/* ---------- Terminal / code blocks ---------- */
.terminal {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #090b11;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.terminal:hover { border-color: var(--border-strong); box-shadow: 0 0 24px rgba(0,0,0,0.4); }
html[data-theme="light"] .terminal { background: #14161f; }

.terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.terminal-dots { display: flex; gap: 6px; }
.terminal-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.terminal-title { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-faint);
  border: 1px solid var(--border-strong);
  padding: 5px 10px;
  border-radius: 7px;
  font-family: var(--font-mono);
  transition: color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent-teal); box-shadow: 0 0 8px rgba(18,232,240,0.15); }
.copy-btn svg { width: 13px; height: 13px; }

pre { margin: 0; padding: 20px 22px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
pre code {
  font-family: var(--font-mono);
  font-size: 13.6px;
  line-height: 1.9;
  color: #d7dae4;
  white-space: pre;
  display: block;
  min-width: max-content;
}

.terminal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.example-block { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.setup-note { margin-top: 22px; font-size: 13.5px; color: var(--text-faint); }

/* ---------- Roadmap ---------- */
.progress-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 18px;
  margin-bottom: 48px;
}
.progress-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.progress-card:hover { border-color: var(--border-strong); box-shadow: 0 0 20px rgba(18,232,240,0.06); }
.progress-card .label { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.progress-bar {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin-bottom: 10px;
}
.progress-bar > span {
  display: block;
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 999px;
  width: 0%;
  transition: width 1.4s cubic-bezier(0.25,1,0.5,1) 0.2s;
  box-shadow: 0 0 8px rgba(18,232,240,0.4);
}
.progress-card.in-view .progress-bar > span { width: var(--bar-target,0%); }
.progress-card .value { font-family: var(--font-mono); font-weight: 700; font-size: 15px; }

/* Timeline */
.timeline { position: relative; padding-left: 28px; border-left: 1px solid var(--border); }
.timeline-item { position: relative; padding-bottom: 30px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 0 0 4px var(--bg), 0 0 10px rgba(18,232,240,0.6);
  transition: box-shadow 0.2s;
}
.timeline-item:hover::before { box-shadow: 0 0 0 4px var(--bg), 0 0 18px rgba(18,232,240,0.9); }
.timeline-item .ver { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent-teal); font-weight: 700; }
.timeline-item h4 { font-size: 15.5px; font-weight: 700; margin: 4px 0 6px; }
.timeline-item p  { font-size: 13.5px; color: var(--text-muted); }

.planned-grid {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(200px,1fr));
  gap: 10px;
}
.planned-item {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: border-color 0.2s, color 0.2s;
}
.planned-item:hover { border-color: var(--border-strong); border-style: solid; color: var(--text); }
.planned-item span.tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

.ideas-note { margin-top: 18px; font-size: 13px; color: var(--text-faint); font-style: italic; }

/* ---------- Principles ---------- */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 18px;
}
.principle {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}
.principle::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(380px circle at var(--glow-x,50%) var(--glow-y,50%), rgba(18,232,240,0.05), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.principle:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: 0 8px 32px -16px rgba(0,0,0,0.4); }
.principle:hover::before { opacity: 1; }
.principle > * { position: relative; z-index: 1; }
.principle .num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  display: block;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.principle h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.principle p  { font-size: 13.8px; color: var(--text-muted); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q:hover { color: var(--text); }

.faq-q .plus { flex-shrink: 0; width: 22px; height: 22px; position: relative; }
.faq-q .plus::before,.faq-q .plus::after {
  content: "";
  position: absolute;
  background: var(--text-muted);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1), opacity 0.2s;
}
.faq-q .plus::before { left: 0; top: 50%; width: 100%; height: 1.6px; transform: translateY(-50%); }
.faq-q .plus::after  { top: 0; left: 50%; width: 1.6px; height: 100%; transform: translateX(-50%); }
.faq-item[open] .faq-q .plus::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }

/* Smooth open animation */
.faq-a {
  padding: 0 4px 24px;
  color: var(--text-muted);
  font-size: 15px;
  max-width: 65ch;
  animation: faqReveal 0.22s ease;
}
@keyframes faqReveal {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Open source ---------- */
.os-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }

.dev-rules { display: grid; gap: 10px; }
.dev-rules li { display: flex; gap: 10px; font-size: 14.5px; color: var(--text-muted); align-items: flex-start; }
.dev-rules svg { width: 16px; height: 16px; color: var(--accent-teal); margin-top: 3px; flex-shrink: 0; }

/* ---------- CTA banner ---------- */
.cta-banner {
  border-radius: var(--radius-lg);
  background: var(--accent-gradient-soft);
  border: 1px solid var(--border-strong);
  padding: 56px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.cta-banner::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--accent-gradient);
  z-index: -1;
  opacity: 0.2;
  animation: ctaBorderPulse 4s ease-in-out infinite;
}
@keyframes ctaBorderPulse {
  0%,100% { opacity: 0.15; }
  50%      { opacity: 0.35; }
}
.cta-banner:hover { box-shadow: 0 0 48px rgba(18,232,240,0.1); }

.cta-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(24px,3vw,34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 22ch;
}
.cta-banner p { color: var(--text-muted); max-width: 52ch; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 48px 0 28px; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3,1fr); gap: 40px; margin-bottom: 36px; }
.footer-brand p { color: var(--text-muted); font-size: 14px; margin-top: 14px; max-width: 34ch; }
.footer-col h4 {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  font-family: var(--font-mono);
  margin-bottom: 16px;
}
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { font-size: 14.5px; color: var(--text-muted); transition: color 0.15s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-faint);
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s, box-shadow 0.2s;
  z-index: 500;
  box-shadow: var(--shadow-lift);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { border-color: var(--accent-teal); box-shadow: var(--glow-teal); }
.back-to-top svg { width: 18px; height: 18px; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .convergence { max-width: 420px; margin: 0 auto; }
  .split,.arch-cols,.os-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .principles-grid { grid-template-columns: repeat(2,1fr); }
  .progress-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 720px) {
  .section { padding: 52px 0; }
  .hero { padding: 44px 0 40px; }

  /* Word-break for long headings on narrow screens */
  h1, h2, h3 { word-break: break-word; overflow-wrap: break-word; }

  /* CTA banner tighter on mobile */
  .cta-banner { padding: 36px 24px; gap: 14px; }
  .cta-banner h2 { font-size: clamp(20px,5.5vw,28px); }

  /* Footer stacked on mobile */
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  /* Smaller pre text on mobile */
  pre { padding: 14px 16px; }
  pre code { font-size: 12.5px; line-height: 1.8; }

  /* Terminal title wraps */
  .terminal-head { flex-wrap: wrap; gap: 8px; }
  .terminal-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Doc preview on mobile */
  .doc-preview { padding: 24px 18px; }

  /* Chip row wrap */
  .chip-row { gap: 8px; }
  .chip { font-size: 13px; padding: 8px 12px; }

  /* Callout on mobile */
  .callout { font-size: 14px; }

  /* Stack tables as cards on mobile */
  .table-wrap { overflow: hidden; }
  .table-wrap table { min-width: unset; width: 100%; }
  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { display: none; }
  .table-wrap tbody tr {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
  }
  .table-wrap tbody tr:last-child { border-bottom: none; }
  .table-wrap tbody tr:hover { background: var(--surface-2); }
  .table-wrap tbody td {
    padding: 0;
    border: none;
    display: block;
    white-space: normal;
    font-size: 13.5px;
    color: var(--text-muted);
  }
  .table-wrap tbody td:first-child {
    font-weight: 700;
    color: var(--text);
    font-size: 14px;
    white-space: normal;
    margin-bottom: 2px;
  }
  .nav-actions .status-badge { display: none; }
  .hero-logo { display: none; }
  .convergence { max-width: 260px; }
  .nav-actions { gap: 6px; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: color-mix(in srgb, var(--bg) 95%, transparent);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 20px 20px;
    gap: 2px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }
  .nav-links.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav-links a { padding: 14px 10px; }
  .nav-links a.active::after { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-stats { grid-template-columns: repeat(2,1fr); row-gap: 20px; }
  .terminal-grid,.example-block { grid-template-columns: 1fr; }
  .doc-preview { padding: 28px 22px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .principles-grid,.progress-grid { grid-template-columns: 1fr; }
}
