/* ═══════════════════════════════════════════════════════
   Kitesurf 中文站 · 样式表
   Design tokens → Layout → Components → Utilities
   ═══════════════════════════════════════════════════════ */

/* ── 1. Design tokens ─────────────────────────────── */
:root {
  /* Colors */
  --bg: #0b0d10;
  --bg-elev: #12151a;
  --bg-elev-2: #181c22;
  --bg-elev-3: #1e232a;
  --border: #23282f;
  --border-strong: #313842;
  --border-brand: rgba(246, 130, 31, 0.4);

  --text: #eef1f5;
  --text-muted: #9aa4b2;
  --text-dim: #6b7684;

  --brand: #f6821f;
  --brand-2: #faae40;
  --brand-3: #ff9a3c;
  --brand-glow: rgba(246, 130, 31, 0.35);
  --brand-soft: rgba(246, 130, 31, 0.08);

  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.25);
  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.14);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.14);

  /* Sizing */
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --container: 1200px;
  --nav-h: 68px;

  /* Type */
  --font-sans: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── 2. Reset & base ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand-2); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--brand); }
img, svg { max-width: 100%; display: block; }
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(246, 130, 31, 0.1);
  color: var(--brand-2);
  border: 1px solid rgba(246, 130, 31, 0.2);
}
::selection { background: var(--brand); color: #111; }

/* Custom scrollbar (WebKit + Firefox) */
html { scrollbar-color: var(--border-strong) var(--bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 8px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #3d4650; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── 3. Background decorations ────────────────────── */
.aurora {
  position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none;
}
.aurora::before,
.aurora::after {
  content: "";
  position: absolute;
  width: 780px;
  height: 780px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.5;
  animation: float 22s ease-in-out infinite;
}
.aurora::before {
  background: radial-gradient(circle, var(--brand) 0%, transparent 70%);
  top: -200px; left: -220px;
}
.aurora::after {
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  bottom: -260px; right: -240px;
  opacity: 0.22;
  animation-delay: -11s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.05); }
}

.grid-overlay {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 30%, transparent 80%);
}

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 100;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--accent));
  width: 0%;
  transition: width 0.08s linear;
  box-shadow: 0 0 12px var(--brand-glow);
}

/* ── 4. Navigation ─────────────────────────────────── */
header.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(11, 13, 16, 0.72);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s, background 0.2s;
}
header.nav.scrolled {
  background: rgba(11, 13, 16, 0.88);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h); gap: 24px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 18px; letter-spacing: -0.02em;
  color: var(--text);
}
.logo:hover { color: var(--text); }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  display: grid; place-items: center;
  color: #111;
  box-shadow: 0 8px 24px var(--brand-glow), inset 0 1px 0 rgba(255,255,255,0.3);
}

nav ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 20px; align-items: center;
}
nav a {
  color: var(--text-muted); font-weight: 500; font-size: 14px;
  position: relative; padding: 6px 0;
}
nav a:hover { color: var(--text); }
nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; background: var(--brand);
  transition: width 0.25s var(--ease-out);
}
nav a:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle {
  display: none;
  background: transparent; border: 1px solid var(--border-strong);
  color: var(--text); border-radius: 9px; padding: 8px 10px; cursor: pointer;
}

.cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600; font-size: 14px;
  background: var(--brand);
  color: #111 !important;
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s;
  box-shadow: 0 8px 24px var(--brand-glow);
  white-space: nowrap;
}
.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px var(--brand-glow);
  color: #111 !important;
}
.cta-lg { padding: 14px 26px; font-size: 15px; border-radius: 12px; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600; font-size: 14px;
  background: rgba(255,255,255,0.02);
  color: var(--text) !important;
  border: 1px solid var(--border-strong);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand-2) !important;
  background: var(--brand-soft);
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  padding: 12px 24px 20px;
  flex-direction: column; gap: 4px;
}
.mobile-menu a {
  padding: 12px 8px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu.open { display: flex; }

@media (max-width: 1024px) {
  nav ul { display: none; }
  .menu-toggle { display: inline-grid; place-items: center; }
}

/* ── 5. Hero ──────────────────────────────────────── */
.hero { padding: 100px 0 88px; text-align: center; position: relative; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px;
  background: var(--brand-soft);
  border: 1px solid var(--border-brand);
  color: var(--brand-2);
  font-weight: 600; font-size: 13px;
  margin-bottom: 26px;
  letter-spacing: 0.02em;
}
.badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 12px var(--brand);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

h1 {
  font-size: clamp(40px, 6.5vw, 76px);
  line-height: 1.02;
  margin: 0 0 22px;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text);
}
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  h1 {
    background: linear-gradient(180deg, #ffffff 0%, #b7bec9 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}
.gradient {
  color: var(--brand-2);
  filter: drop-shadow(0 4px 30px var(--brand-glow));
}
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .gradient {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 55%, var(--brand-3) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}
.hero .lead {
  max-width: 780px;
  margin: 0 auto 40px;
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--text-muted);
  line-height: 1.65;
}
.hero .lead strong { color: var(--text); font-weight: 600; }

.hero-actions {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 72px;
}

/* Metrics strip */
.metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  max-width: 1000px; margin: 0 auto 56px;
}
.metric {
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease-out), border-color 0.25s;
}
.metric::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.metric:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.metric:hover::before { transform: scaleX(1); }
.metric .num {
  font-size: 36px; font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--brand-2);
  margin-bottom: 6px;
}
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .metric .num {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}
.metric .lbl { color: var(--text); font-weight: 600; font-size: 14px; }
.metric .sub { color: var(--text-dim); font-size: 12.5px; margin-top: 2px; }
@media (max-width: 720px) { .metrics { grid-template-columns: repeat(2, 1fr); } }

/* Hero quote */
.hero-quote {
  max-width: 780px; margin: 0 auto;
  padding: 28px 32px;
  background: linear-gradient(180deg, rgba(246,130,31,0.05), rgba(246,130,31,0));
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-lg);
  text-align: left; position: relative;
}
.hero-quote .quote-icon {
  color: var(--brand); opacity: 0.6;
  position: absolute; top: 20px; left: 24px;
}
.hero-quote p {
  margin: 0 0 12px 0;
  padding-left: 44px;
  font-size: 16px; color: var(--text);
  font-weight: 500; font-style: italic;
  line-height: 1.7;
}
.hero-quote cite {
  padding-left: 44px;
  color: var(--text-muted); font-size: 13px; font-style: normal; font-weight: 500;
}

/* ── 6. Sections ──────────────────────────────────── */
section { padding: 100px 0; position: relative; }
.section-alt {
  background:
    linear-gradient(180deg, transparent, rgba(255,255,255,0.02) 20%, rgba(255,255,255,0.02) 80%, transparent),
    linear-gradient(180deg, transparent, rgba(246,130,31,0.02) 50%, transparent);
}
.section-head { text-align: center; margin-bottom: 60px; max-width: 800px; margin-left: auto; margin-right: auto; }
.kicker {
  color: var(--brand-2); font-weight: 600; font-size: 12.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  margin-bottom: 14px;
  display: inline-block;
}
h2 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800; letter-spacing: -0.025em;
  margin: 0 0 16px;
  line-height: 1.15;
  color: var(--text);
}
.section-head p {
  color: var(--text-muted);
  max-width: 720px; margin: 0 auto;
  font-size: 17px; line-height: 1.7;
}
.section-head p strong { color: var(--text); font-weight: 600; }

.highlight {
  color: var(--brand-2);
  background: linear-gradient(180deg, transparent 60%, rgba(246,130,31,0.15) 60%);
  padding: 0 4px;
}

/* ── 7. Problem grid (Why) ────────────────────────── */
.problem-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-bottom: 48px;
}
.problem-card {
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform 0.25s var(--ease-out), border-color 0.25s;
  position: relative;
}
.problem-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.problem-num {
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 600;
  color: var(--brand-2);
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}
.problem-card h3 {
  margin: 0 0 12px; font-size: 20px; font-weight: 700;
  letter-spacing: -0.01em; color: var(--text);
}
.problem-card p { margin: 0; color: var(--text-muted); font-size: 15px; line-height: 1.7; }
.problem-card p strong { color: var(--text); font-weight: 600; }
@media (max-width: 900px) { .problem-grid { grid-template-columns: 1fr; } }

.timeline-box {
  background: linear-gradient(135deg, rgba(246,130,31,0.12), rgba(56,189,248,0.06));
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}
.timeline-label {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--brand-2);
  letter-spacing: 0.18em; text-transform: uppercase;
  margin-bottom: 12px;
}
.timeline-box p { margin: 0; font-size: 18px; color: var(--text); }
.timeline-box strong { color: var(--text); font-weight: 700; }

/* ── 8. Philosophy ────────────────────────────────── */
.philosophy-main {
  max-width: 860px; margin: 0 auto 48px;
}
.philosophy-quote {
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 44px 48px;
  position: relative; overflow: hidden;
}
.philosophy-quote::before {
  content: ""; position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}
.philosophy-quote h3 {
  margin: 0 0 18px; font-size: 24px; font-weight: 700;
  letter-spacing: -0.02em; color: var(--text);
}
.philosophy-quote p {
  margin: 0 0 14px; font-size: 16px; color: var(--text-muted);
  line-height: 1.75;
}
.philosophy-quote p:last-child { margin-bottom: 0; }
.philosophy-quote strong { color: var(--text); font-weight: 600; }
@media (max-width: 600px) { .philosophy-quote { padding: 28px 24px; } }

.principles {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
  max-width: 900px; margin: 0 auto;
}
.principle {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.2s, transform 0.2s;
}
.principle:hover { border-color: var(--border-strong); transform: translateX(2px); }
.p-icon {
  flex: none;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--brand-soft);
  border: 1px solid var(--border-brand);
  color: var(--brand-2);
  display: grid; place-items: center;
}
.principle h4 { margin: 0 0 4px; font-size: 15.5px; font-weight: 700; color: var(--text); }
.principle p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.6; }
@media (max-width: 700px) { .principles { grid-template-columns: 1fr; } }

/* ── 9. Features ──────────────────────────────────── */
.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  transition: border-color 0.25s, transform 0.25s var(--ease-out), background 0.25s;
  position: relative; overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(246,130,31,0.06), transparent 40%);
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}
.card:hover::before { opacity: 1; }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(246, 130, 31, 0.18), rgba(246, 130, 31, 0.05));
  border: 1px solid var(--border-brand);
  display: grid; place-items: center;
  color: var(--brand-2);
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(246,130,31,0.15);
}
.card h3 { font-size: 19px; margin: 0 0 10px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.card p { margin: 0; color: var(--text-muted); font-size: 14.5px; line-height: 1.7; }
.card p strong { color: var(--text); font-weight: 600; }
@media (max-width: 940px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }

/* ── 10. Architecture flow ────────────────────────── */
.flow {
  display: flex; align-items: stretch; gap: 12px;
  justify-content: center; flex-wrap: wrap;
  padding: 32px 20px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin-bottom: 40px;
}
.flow-node {
  flex: 1 1 160px;
  min-width: 150px; max-width: 200px;
  padding: 18px 16px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.flow-node:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.flow-node.accent {
  border-color: var(--border-brand);
  background: linear-gradient(180deg, rgba(246,130,31,0.06), var(--bg-elev-2));
}
.flow-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-2);
  display: grid; place-items: center;
  margin: 0 auto 10px;
  border: 1px solid var(--border-brand);
}
.flow-label { font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 4px; }
.flow-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }

.flow-arrow {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--brand-2);
  min-width: 40px;
}
.flow-arrow span {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-dim); margin-top: 6px;
}
@media (max-width: 900px) {
  .flow { flex-direction: column; align-items: stretch; }
  .flow-node { max-width: none; }
  .flow-arrow { transform: rotate(90deg); margin: -6px 0; min-width: 0; }
}

/* Component deep dives */
.components { display: grid; gap: 24px; }
.component {
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 38px 40px;
}
.component-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.component-tag {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  padding: 5px 10px; border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-2);
  border: 1px solid var(--border-brand);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.component-head h3 {
  margin: 0; font-size: 26px; font-weight: 800;
  letter-spacing: -0.02em; color: var(--text);
}
.component-lead {
  color: var(--text); font-size: 17px;
  line-height: 1.7; margin: 0 0 16px;
}
.component p { margin: 0 0 14px; color: var(--text-muted); font-size: 15px; line-height: 1.75; }
.component p:last-child { margin-bottom: 0; }
.component strong { color: var(--text); font-weight: 600; }

.component-list {
  list-style: none; padding: 0; margin: 20px 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 20px;
}
.component-list li {
  padding: 10px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px; color: var(--text-muted);
  position: relative; padding-left: 32px;
}
.component-list li::before {
  content: "▸"; position: absolute; left: 14px; top: 10px;
  color: var(--brand-2); font-weight: 800;
}
.component-list li strong { color: var(--text); }
@media (max-width: 700px) { .component-list { grid-template-columns: 1fr; } }

.component-note {
  margin-top: 20px;
  padding: 14px 18px;
  background: rgba(246,130,31,0.06);
  border-left: 3px solid var(--brand);
  border-radius: 6px;
  color: var(--text);
  font-size: 14.5px;
  font-style: italic;
}

.callout {
  margin-top: 20px;
  padding: 22px 24px;
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
}
.callout.accent {
  background: rgba(246, 130, 31, 0.05);
  border-color: rgba(246, 130, 31, 0.25);
  border-left-color: var(--brand);
}
.callout-title {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 15px; color: var(--text);
  margin-bottom: 10px;
}
.callout-title svg { color: var(--accent); flex: none; }
.callout.accent .callout-title svg { color: var(--brand); }
.callout p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.75; color: var(--text-muted); }
.callout p:last-child { margin-bottom: 0; }
.callout em { color: var(--text-muted); }

@media (max-width: 640px) {
  .component { padding: 28px 24px; }
  .component-head { flex-direction: column; align-items: flex-start; }
  .component-head h3 { font-size: 22px; }
}

/* ── 11. Tech stack ───────────────────────────────── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.stack-item {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.stack-item:hover { border-color: var(--border-brand); transform: translateY(-2px); }
.stack-name {
  font-family: var(--font-mono);
  font-size: 18px; font-weight: 700;
  color: var(--brand-2); margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.stack-role {
  font-size: 12px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 14px;
  font-weight: 600;
}
.stack-item p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.65; }

/* ── 12. Comparison table ─────────────────────────── */
.compare-wrap {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px;
  overflow: hidden;
  margin-bottom: 32px;
}
.table-scroll { overflow-x: auto; }
table.compare {
  width: 100%; border-collapse: collapse; font-size: 15px;
  min-width: 720px;
}
table.compare th, table.compare td {
  padding: 18px 22px; text-align: left;
  border-bottom: 1px solid var(--border);
}
table.compare thead th {
  color: var(--text-muted); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.14em;
  background: rgba(255,255,255,0.02);
}
table.compare tbody tr {
  transition: background 0.15s;
}
table.compare tbody tr:hover { background: rgba(255,255,255,0.02); }
table.compare tbody tr:last-child td { border-bottom: none; }
table.compare td.metric-name {
  font-weight: 600; color: var(--text);
  white-space: nowrap;
}
table.compare td.metric-name .tag-cpu,
table.compare td.metric-name .tag-mem,
table.compare td.metric-name .tag-time {
  margin-right: 10px;
  vertical-align: -1px;
}
table.compare td.kitesurf { color: var(--brand-2); font-weight: 700; font-family: var(--font-mono); font-size: 15px; }
table.compare td.chromium { color: var(--text-muted); font-family: var(--font-mono); font-size: 15px; }
table.compare td.delta { font-weight: 700; font-size: 13.5px; }
.delta .pill {
  display: inline-flex; align-items: center;
  padding: 6px 12px; border-radius: 999px;
  font-weight: 700; line-height: 1; white-space: nowrap;
}
.delta.win { color: var(--success); }
.delta.lose { color: var(--danger); }
.delta.win .pill { background: var(--success-soft); border: 1px solid rgba(34,197,94,0.35); }
.delta.lose .pill { background: var(--danger-soft); border: 1px solid rgba(239,68,68,0.35); }
.delta .arrow {
  display: inline-block; margin-right: 6px;
  font-size: 15px; line-height: 1;
}

.tag-cpu, .tag-mem, .tag-time {
  display: inline-block;
  font-family: var(--font-mono); font-size: 10.5px;
  padding: 3px 8px; border-radius: 5px;
  letter-spacing: 0.1em;
  font-weight: 600;
  vertical-align: middle;
}
.tag-cpu { background: rgba(56,189,248,0.15); color: #7dd3fc; border: 1px solid rgba(56,189,248,0.3); }
.tag-mem { background: rgba(168,85,247,0.15); color: #c4b5fd; border: 1px solid rgba(168,85,247,0.3); }
.tag-time { background: rgba(234,179,8,0.15); color: #fde047; border: 1px solid rgba(234,179,8,0.3); }

.verdict {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.verdict-col {
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.verdict-col.win {
  background: linear-gradient(180deg, var(--success-soft), transparent);
  border-color: rgba(34,197,94,0.3);
}
.verdict-col.lose {
  background: linear-gradient(180deg, var(--danger-soft), transparent);
  border-color: rgba(239,68,68,0.3);
}
.verdict-title {
  font-weight: 700; font-size: 17px; margin-bottom: 10px;
  color: var(--text);
}
.verdict-col.win .verdict-title::before { content: "✓ "; color: var(--success); }
.verdict-col.lose .verdict-title::before { content: "✗ "; color: var(--danger); }
.verdict-col p { margin: 0; color: var(--text-muted); font-size: 14.5px; line-height: 1.7; }
.verdict-col strong { color: var(--text); font-weight: 600; }
@media (max-width: 720px) { .verdict { grid-template-columns: 1fr; } }

/* ── 13. Standards grid ───────────────────────────── */
.standards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.std-cell {
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}
.std-cell:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.std-cell .area {
  font-size: 12px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.14em;
  margin-bottom: 8px;
  font-weight: 600;
}
.std-cell .pct {
  font-size: 34px; font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}
.std-cell .pct span { font-size: 18px; color: var(--text-muted); margin-left: 2px; }
.std-cell .bar {
  position: absolute; left: 0; bottom: 0;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 1.2s var(--ease-out);
}
@media (max-width: 900px) { .standards { grid-template-columns: repeat(2, 1fr); } }

.wpt-note {
  padding: 22px 28px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  text-align: center;
}
.wpt-note strong { color: var(--text); font-weight: 600; }

/* ── 14. Use cases ────────────────────────────────── */
.split {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px;
  margin-bottom: 32px;
}
.usecase-card { padding: 34px 30px; }
.usecase-card h3 {
  display: flex; align-items: center; gap: 12px;
  font-size: 22px; font-weight: 800;
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.check, .cross {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800; font-size: 14px;
  flex: none;
}
.check {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid rgba(34,197,94,0.35);
}
.cross {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.35);
}
ul.check-list { list-style: none; padding: 0; margin: 0; }
ul.check-list li {
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
  display: flex; flex-direction: column; gap: 4px;
  padding-left: 24px;
  position: relative;
}
ul.check-list li:last-child { border-bottom: none; }
ul.check-list li::before {
  content: "▸"; color: var(--brand-2);
  font-weight: 800; font-size: 14px;
  position: absolute; left: 0; top: 15px;
}
ul.check-list.neg li::before { color: var(--text-dim); content: "×"; font-size: 16px; }
ul.check-list li strong { color: var(--text); font-size: 15px; font-weight: 600; }
ul.check-list li span { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

.fallback-note {
  margin-top: 20px;
  padding: 14px 18px;
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  font-size: 14px; color: var(--text);
}
.fallback-note strong { color: var(--accent); font-weight: 700; }

@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

.try-note {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 26px;
  background: linear-gradient(90deg, var(--brand-soft), transparent);
  border: 1px solid var(--border-brand);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 15px; line-height: 1.65;
}
.try-note svg {
  color: var(--brand);
  flex: none;
  animation: spin-slow 10s linear infinite;
}
.try-note strong { color: var(--text); font-weight: 600; }
@keyframes spin-slow { to { transform: rotate(360deg); } }

/* ── 15. Code blocks ──────────────────────────────── */
.code-tabs {
  display: flex; gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.tab-btn {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font-sans);
  transition: all 0.15s;
}
.tab-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
.tab-btn.active {
  background: var(--brand);
  color: #111;
  border-color: var(--brand);
  box-shadow: 0 6px 18px var(--brand-glow);
}

.tab-pane { display: none; animation: fadeIn 0.3s var(--ease-out); }
.tab-pane.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.code-block {
  background: #0a0c0f;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 12px;
}
.code-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
}
.code-head .lang { color: var(--brand-2); font-weight: 600; }

.copy-btn {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font-mono);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  font-weight: 500;
}
.copy-btn:hover {
  color: var(--brand-2);
  border-color: var(--brand);
  background: var(--brand-soft);
}
.copy-btn.copied {
  color: var(--success);
  border-color: var(--success);
  background: var(--success-soft);
}

pre {
  margin: 0;
  padding: 22px 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.75;
  color: #d6dee9;
  tab-size: 2;
}
pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }
pre .k { color: #ff8a65; }
pre .s { color: #a5d6a7; }
pre .c { color: #6b7684; font-style: italic; }
pre .p { color: #90caf9; }
pre .f { color: #ffcc80; }

.code-note, .param-note {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 13.5px;
  text-align: center;
}
.param-note { padding: 14px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; margin-top: 20px; }

/* ── 16. FAQ ──────────────────────────────────────── */
.faq-list {
  max-width: 860px; margin: 0 auto;
  display: grid; gap: 12px;
}
.faq-item {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item:hover { border-color: var(--border-strong); }
.faq-item[open] { border-color: var(--border-brand); }
.faq-item summary {
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  width: 12px; height: 12px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease-out), border-color 0.2s;
  flex: none;
}
.faq-item[open] summary::after {
  transform: rotate(-135deg);
  border-color: var(--brand);
}
.faq-body {
  padding: 0 24px 22px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.75;
  animation: fadeIn 0.3s var(--ease-out);
}
.faq-body p { margin: 0 0 12px; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body strong { color: var(--text); font-weight: 600; }
.faq-body em { color: var(--text); font-style: italic; }

/* ── 17. Final CTA ────────────────────────────────── */
.cta-section { padding: 40px 0 100px; }
.final-cta {
  background:
    radial-gradient(circle at 30% 30%, rgba(246,130,31,0.14), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(56,189,248,0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 64px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  opacity: 0.5;
}
.final-cta > * { position: relative; z-index: 1; }
.final-cta h2 { margin-bottom: 14px; }
.final-cta p {
  color: var(--text-muted);
  max-width: 640px; margin: 0 auto 32px;
  font-size: 16.5px;
  line-height: 1.7;
}

/* ── 18. Footer ───────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 40px;
  color: var(--text-dim);
  font-size: 14px;
  background: rgba(0,0,0,0.2);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand p {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
  max-width: 320px;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer-col h4 {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.footer-col a {
  display: block;
  padding: 5px 0;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
}
.footer-col a:hover { color: var(--brand-2); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  color: var(--text-dim);
  font-size: 13px;
}
.footer-bottom strong { color: var(--text-muted); font-weight: 600; }

@media (max-width: 800px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .footer-cols { grid-template-columns: 1fr; gap: 20px; }
}

/* ── 19. Back to top button ───────────────────────── */
.back-to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--brand);
  color: #111;
  border: none;
  cursor: pointer;
  display: grid; place-items: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.25s, transform 0.25s var(--ease-out), background 0.15s;
  box-shadow: 0 10px 28px var(--brand-glow);
  z-index: 40;
}
.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--brand-2);
  transform: translateY(-3px);
}

/* ── 20. Scroll reveal ────────────────────────────── */
/* Hidden state only applies when JS is available (html.js set inline in <head>) */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.reveal.on {
  opacity: 1;
  transform: translateY(0);
}

/* Anchor targets account for the sticky nav even without JS smooth-scroll */
section[id] { scroll-margin-top: 84px; }

/* Keyboard focus ring */
:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
  border-radius: 4px;
}
summary:focus-visible { outline-offset: -2px; border-radius: var(--radius); }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
