/* ============================================================
   Synthetix — Intro Site Design System
   Aligned to project01 product: violet #7C3AED + orange #F97316
   Plus Jakarta Sans (display) + Inter (body) · soft shadows · glass
   ============================================================ */

/* ---------- Design Tokens (mirrors project01 globals.css) ---------- */
:root {
  /* Brand — violet primary scale (project01 globals.css:11-24) */
  --primary: #7C3AED;
  --primary-light: #8B5CF6;
  --primary-dark: #6D28D9;
  --primary-50: #F5F3FF;
  --primary-100: #EDE9FE;
  --primary-200: #DDD6FE;
  --primary-300: #C4B5FD;
  --primary-400: #A78BFA;
  --primary-500: #8B5CF6;
  --primary-600: #7C3AED;
  --primary-700: #6D28D9;

  /* Accent — orange (project01 globals.css:26-28) */
  --accent: #F97316;
  --accent-light: #FB923C;
  --accent-dark: #C2410C;
  --success: #10B981;

  /* Chart palette */
  --chart-1: #7C3AED;
  --chart-2: #F97316;
  --chart-3: #10B981;

  /* Typography (project01 globals.css:67-69) */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue",
    Arial, sans-serif;
  --font-display: "Plus Jakarta Sans", -apple-system, "PingFang SC",
    "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "SF Mono", Consolas,
    "Courier New", monospace;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Radius (project01 globals.css:71-76,100) */
  --radius: 0.75rem;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  /* Layout */
  --container: 1180px;
  --container-narrow: 920px;
  --nav-height: 64px;

  /* Transitions (ui-ux-pro-max: ease-out for entering, 150-300ms range) */
  --t-fast: 0.2s ease-out;
  --t-base: 0.25s ease-out;
}

/* ---------- Light theme (default — project01 uses light default) ---------- */
:root,
[data-theme="light"] {
  --background: #F8FAFC;
  --foreground: #0F172A;
  --card: #FFFFFF;
  --card-foreground: #0F172A;
  --secondary: #F1F5F9;
  --muted: #F1F5F9;
  --muted-foreground: #64748B;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --code-bg: #F1F5F9;
  color-scheme: light;
}

/* ---------- Dark theme (project01 .dark — globals.css:116-150) ---------- */
[data-theme="dark"] {
  --background: #0B0F19;
  --foreground: #F8FAFC;
  --card: #111827;
  --card-foreground: #F8FAFC;
  --secondary: #1E293B;
  --muted: #1E293B;
  --muted-foreground: #A1ADC0;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.28);
  --code-bg: #0D1220;
  color-scheme: dark;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1rem);
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background var(--t-base), color var(--t-base);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover {
  color: var(--primary-dark);
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

p {
  text-wrap: pretty;
}

::selection {
  background: var(--primary-200);
  color: var(--primary-900);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-2xl) 0;
  position: relative;
}
.section + .section {
  border-top: 1px solid var(--border);
}

.text-center {
  text-align: center;
}

/* Section header — number + title, left-aligned (de-slop: breaks centered symmetry) */
.section-head {
  max-width: 720px;
  margin: 0 0 var(--space-xl);
}
.section-head .eyebrow,
.section-head .section-num {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-sm);
  display: block;
}
.section-head .section-num {
  color: var(--muted-foreground);
}
.section-head .section-num span {
  color: var(--primary);
}
.section-head h2 {
  font-size: clamp(1.75rem, 3.8vw, 2.6rem);
  margin-bottom: var(--space-sm);
}
.section-head p {
  color: var(--muted-foreground);
  font-size: 1.08rem;
  line-height: 1.6;
}

/* Eyebrow (page headers) */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

/* ---------- Navbar (project01 header.tsx: frosted) ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--background) 80%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background var(--t-base), border-color var(--t-base);
}

.navbar.scrolled {
  background: color-mix(in srgb, var(--card) 85%, transparent);
  border-bottom-color: var(--border);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--foreground);
}
.nav-brand:hover {
  color: var(--foreground);
}

.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  color: var(--muted-foreground);
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--foreground);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Icon buttons */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted-foreground);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--t-fast);
}
.icon-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-50);
}
[data-theme="dark"] .icon-btn:hover {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}
.icon-btn svg {
  width: 17px;
  height: 17px;
}

/* theme toggle: show correct icon */
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* Mobile hamburger */
.nav-toggle {
  display: none;
}

/* ---------- Buttons (project01 button.tsx style) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--t-fast);
  white-space: nowrap;
  font-family: var(--font-sans);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

[data-theme="dark"] .btn-primary {
  background: var(--primary-light);
}
[data-theme="dark"] .btn-primary:hover {
  background: var(--primary);
}

.btn-secondary {
  background: var(--card);
  border-color: var(--border);
  color: var(--foreground);
}
.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

/* ---------- Meta row / Badges ---------- */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--secondary);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
}
.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-height);
  text-align: left;
  background-image:
    radial-gradient(at 20% 20%, color-mix(in srgb, var(--primary) 8%, transparent) 0px, transparent 45%),
    radial-gradient(at 80% 80%, color-mix(in srgb, var(--accent) 5%, transparent) 0px, transparent 45%);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.4;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-inner {
  max-width: 760px;
  padding: var(--space-2xl) 0;
}

.hero-logo {
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-md);
  border-radius: var(--radius-xl);
}

.hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin-bottom: var(--space-md);
  max-width: 15ch;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--muted-foreground);
  max-width: 540px;
  line-height: 1.65;
  margin-bottom: var(--space-lg);
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.hero-badges,
.hero .badges {
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---------- Editorial feature list (de-slop: breaks 3-card symmetry) ---------- */
.feature-list-editorial {
  border-top: 1px solid var(--border);
}
.feature-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.feature-item:last-child {
  border-bottom: none;
}
.feature-num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  padding-top: 0.4rem;
  letter-spacing: 0.05em;
}
.feature-body h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.feature-body p {
  color: var(--muted-foreground);
  max-width: 640px;
  font-size: 1rem;
}
.feature-body .feature-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

/* ---------- Grid (kept for genuinely grid-like content) ---------- */
.grid {
  display: grid;
  gap: var(--space-md);
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ---------- Card (project01 dashboard pattern: white, soft shadow, hover lift) ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-lg);
  box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.03);
  transition: transform var(--t-base), box-shadow var(--t-base),
    border-color var(--t-base);
  position: relative;
  cursor: pointer;
}
[data-theme="dark"] .card {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 12px 32px -16px rgba(0, 0, 0, 0.7);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.08);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}
[data-theme="dark"] .card:hover {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 20px 48px -20px rgba(0, 0, 0, 0.85);
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.card p {
  color: var(--muted-foreground);
  font-size: 0.95rem;
}

/* Line icons — stroke only, in muted chip (project01 upload-zone style) */
.card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  color: var(--primary);
  background: var(--muted);
  border-radius: var(--radius-lg);
}
[data-theme="dark"] .card-icon {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}
.card-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

/* ---------- Screenshot showcase ---------- */
.showcase {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-md);
}
.shot {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.03);
  transition: transform var(--t-base), box-shadow var(--t-base);
  cursor: pointer;
}
[data-theme="dark"] .shot {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 12px 32px -16px rgba(0, 0, 0, 0.7);
}
.shot:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.1);
}
.shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.shot figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted-foreground);
  border-top: 1px solid var(--border);
}
.shot--feature {
  grid-row: span 2;
}
.shot--feature img {
  aspect-ratio: 4 / 3;
}

/* ---------- Code block ---------- */
.code-block {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
}
.code-block pre {
  padding: var(--space-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--foreground);
}
.code-block pre code {
  font-family: inherit;
}
.copy-btn {
  position: relative;
  padding: 0.3rem 0.65rem;
  font-size: 0.72rem;
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all var(--t-fast);
}
.copy-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.copy-btn.copied {
  color: var(--success);
  border-color: var(--success);
}

/* code syntax tint */
.tok-cmd { color: var(--primary); }
.tok-comment { color: var(--muted-foreground); }
.tok-str { color: var(--accent-dark); }
[data-theme="dark"] .tok-str { color: var(--accent-light); }

/* ---------- Architecture flow ---------- */
.flow {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 820px;
  margin: 0 auto;
}
.flow-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
}
.flow-node {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--foreground);
}
.flow-node.brand {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.flow-node.layer {
  border-color: var(--primary);
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--card));
}
.flow-arrow {
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 1rem;
}

/* ---------- Stack layers ---------- */
.stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 760px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--card);
}
.stack-layer {
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
.stack-layer + .stack-layer {
  border-top: 1px solid var(--border);
}
.stack-layer .layer-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}
.stack-layer .layer-desc {
  color: var(--muted-foreground);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

/* ---------- Table ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
th,
td {
  padding: 0.85rem 1.1rem;
  text-align: left;
}
thead th {
  background: var(--secondary);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
tbody tr:last-child {
  border-bottom: none;
}
tbody tr:hover {
  background: var(--secondary);
}
tbody td {
  color: var(--muted-foreground);
}
tbody td:first-child {
  color: var(--foreground);
  font-weight: 600;
}
td code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--primary);
}

/* ---------- CTA banner ---------- */
.cta-banner {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl) var(--space-md);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.03);
}
[data-theme="dark"] .cta-banner {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 12px 32px -16px rgba(0, 0, 0, 0.7);
}
.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(at 30% 0%, color-mix(in srgb, var(--primary) 12%, transparent) 0px, transparent 50%),
    radial-gradient(at 70% 100%, color-mix(in srgb, var(--accent) 8%, transparent) 0px, transparent 50%);
  pointer-events: none;
}
.cta-banner > * {
  position: relative;
}
.cta-banner h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin-bottom: var(--space-sm);
}
.cta-banner p {
  color: var(--muted-foreground);
  margin-bottom: var(--space-md);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0 var(--space-md);
  background: var(--background);
}
.footer .container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
}
.footer-brand p {
  color: var(--muted-foreground);
  font-size: 0.9rem;
  max-width: 340px;
  margin-top: 0.5rem;
  line-height: 1.6;
}
.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  margin-bottom: var(--space-sm);
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-col a {
  color: var(--muted-foreground);
  font-size: 0.9rem;
}
.footer-col a:hover {
  color: var(--primary);
}
.footer-bottom {
  max-width: var(--container);
  margin: var(--space-lg) auto 0;
  padding: var(--space-md) var(--space-md) 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted-foreground);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Mobile menu panel ---------- */
.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md);
  display: none;
  flex-direction: column;
  gap: var(--space-sm);
  z-index: 99;
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu a {
  color: var(--foreground);
  font-weight: 500;
  padding: 0.5rem 0;
}

/* ---------- Page header (sub-pages) ---------- */
.page-header {
  padding: calc(var(--nav-height) + var(--space-2xl)) 0 var(--space-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
  background-image:
    radial-gradient(at 50% 0%, color-mix(in srgb, var(--primary) 8%, transparent) 0px, transparent 55%);
}
.page-header .container {
  max-width: var(--container-narrow);
}
.page-header .eyebrow {
  margin-bottom: var(--space-sm);
  display: inline-block;
}
.page-header h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  margin-bottom: var(--space-sm);
  font-weight: 700;
  letter-spacing: -0.025em;
}
.page-header p {
  color: var(--muted-foreground);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---------- Feature comparison rows ---------- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-lg);
  align-items: center;
  margin-bottom: var(--space-xl);
}
.feature-row:nth-child(even) .feature-row-img {
  order: 2;
}
.feature-row-img {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.04);
}
.feature-row-img img {
  width: 100%;
}
.feature-row-text h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  font-weight: 700;
}
.feature-row-text p {
  color: var(--muted-foreground);
  margin-bottom: var(--space-sm);
}
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--muted-foreground);
  font-size: 0.95rem;
}
.feature-list li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* ---------- Tag ---------- */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  background: color-mix(in srgb, var(--primary) 8%, var(--card));
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}

/* ---------- Link arrow ---------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.92rem;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color var(--t-fast);
}
.link-arrow:hover {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .showcase { grid-template-columns: 1fr; }
  .showcase .shot--feature { grid-row: auto; }
  .footer .container { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  :root {
    --space-2xl: 4.5rem;
    --space-xl: 3rem;
  }
  .nav-links { display: none; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--foreground);
    cursor: pointer;
  }
  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; }
  .feature-row:nth-child(even) .feature-row-img { order: 0; }
  .footer .container { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .feature-item {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
  .hero h1 { max-width: none; }
  .page-header { text-align: left; }
}

@media (max-width: 480px) {
  .btn { width: 100%; }
  .hero-actions { flex-direction: column; }
}

/* ---------- Reading progress bar ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  background: transparent;
  pointer-events: none;
}
.reading-progress-bar {
  height: 100%;
  background: var(--primary);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.1s linear;
}

/* ---------- Back to top ---------- */
#back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--t-base), transform var(--t-base),
    border-color var(--t-fast);
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
}
#back-to-top svg {
  width: 20px;
  height: 20px;
}
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#back-to-top:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 300;
  padding: 0.6rem 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  transition: top var(--t-fast);
}
.skip-link:focus {
  top: 1rem;
  color: #fff;
}

/* ---------- Code block: terminal header ---------- */
.code-block {
  display: flex;
  flex-direction: column;
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--code-bg) 70%, var(--card));
}
.code-dots {
  display: flex;
  gap: 0.4rem;
}
.code-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: block;
}
.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }
.code-lang {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted-foreground);
  margin-left: auto;
  margin-right: 0.75rem;
}
.code-block pre {
  margin: 0;
}

/* ---------- Hero two-column (desktop) ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-xl);
  align-items: center;
}
.hero-inner {
  padding: var(--space-xl) 0;
}
.hero-visual {
  position: relative;
  display: none;
}
.hero-visual img {
  width: 100%;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px -20px rgba(124, 58, 237, 0.25),
    0 8px 24px -8px rgba(0, 0, 0, 0.1);
  animation: float 7s ease-in-out infinite;
}
[data-theme="dark"] .hero-visual img {
  box-shadow: 0 24px 60px -20px rgba(139, 92, 246, 0.35),
    0 8px 24px -8px rgba(0, 0, 0, 0.5);
}
@media (min-width: 960px) {
  .hero-visual {
    display: block;
  }
}

/* ---------- Theme transition smoothing ---------- */
.navbar,
.card,
.footer,
.cta-banner,
.mobile-menu,
.shot,
.stack,
.table-wrap {
  transition: background-color 0.3s ease, border-color 0.3s ease,
    color 0.3s ease;
}

/* ---------- Section divider gradient ---------- */
.section + .section::before {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--border) 20%,
    var(--border) 80%,
    transparent
  );
  margin-bottom: var(--space-2xl);
}
.section + .section {
  border-top: none;
  padding-top: 0;
}

/* ---------- Mobile menu slide-down ---------- */
.mobile-menu {
  display: flex;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease,
    padding 0.3s ease, border-color 0.3s ease;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom: 1px solid transparent;
}
.mobile-menu.open {
  max-height: 400px;
  opacity: 1;
  padding-top: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom-color: var(--border);
}

/* ---------- 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;
  }
  #back-to-top,
  .hero-visual img {
    animation: none !important;
  }
}

/* ============================================================
   Documentation center — docs.html
   Two-column: sticky TOC + reading content
   ============================================================ */

/* ---- Layout shell ---- */
.docs-section {
  padding-top: var(--space-lg);
}
.docs-layout {
  display: grid;
  grid-template-columns: 1fr;     /* mobile: stacked, TOC hidden */
  gap: var(--space-xl);
  align-items: start;
}
@media (min-width: 960px) {
  .docs-layout {
    grid-template-columns: 220px 1fr;
  }
}

/* ---- Left TOC ---- */
.docs-toc {
  display: none;                  /* hidden on mobile */
}
@media (min-width: 960px) {
  .docs-toc {
    display: block;
    position: sticky;
    top: calc(var(--nav-height) + 1.5rem);
    max-height: calc(100vh - var(--nav-height) - 3rem);
    overflow-y: auto;
  }
}
.docs-toc-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: var(--space-sm);
  padding-left: var(--space-sm);
}
.docs-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--border);
}
.docs-toc a {
  display: block;
  padding: 0.45rem var(--space-sm);
  font-size: 0.875rem;
  color: var(--muted-foreground);
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color var(--t-fast), border-color var(--t-fast),
    background-color var(--t-fast);
}
.docs-toc a:hover {
  color: var(--foreground);
  background: color-mix(in srgb, var(--primary-50) 50%, transparent);
}
.docs-toc a.active {
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
  background: color-mix(in srgb, var(--primary-50) 40%, transparent);
}

/* ---- Right content ---- */
.docs-content {
  max-width: 760px;
  min-width: 0;                   /* prevent grid blowout */
}
.docs-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1vw + 1.2rem, 2rem);
  margin: 0.4rem 0 var(--space-sm);
  letter-spacing: -0.02em;
}
.docs-content h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}
.docs-content p {
  line-height: 1.7;
}
.doc-lead {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: var(--space-md);
}
.doc-block {
  scroll-margin-top: calc(var(--nav-height) + 1.5rem);
  padding-bottom: var(--space-xl);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}
.doc-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* ---- Card tweaks inside docs ---- */
.docs-cards {
  margin-top: var(--space-md);
}
.docs-cards .card {
  padding: var(--space-md);
}
.docs-cards .card h3 {
  margin-bottom: 0.5rem;
}
.docs-cards .card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ---- Callout component (info / tip / warning) ---- */
.callout {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--primary);
  background: color-mix(in srgb, var(--primary-50) 55%, var(--card));
  font-size: 0.92rem;
  line-height: 1.65;
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}
.callout strong {
  flex-shrink: 0;
  color: var(--primary);
}
.callout a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.callout-info {
  border-left-color: var(--primary);
  background: color-mix(in srgb, var(--primary-50) 55%, var(--card));
}
.callout-info strong {
  color: var(--primary);
}
.callout-tip {
  border-left-color: var(--success);
  background: color-mix(in srgb, var(--success) 8%, var(--card));
}
.callout-tip strong {
  color: var(--success);
}
.callout-warning {
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
}
.callout-warning strong {
  color: var(--accent-dark);
}

/* ---- Step list (Quick Start checklist) ---- */
.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.step-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--space-sm);
  align-items: start;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary-50) 60%, var(--card));
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-body {
  padding-top: 0.3rem;
}
.step-body strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.step-body span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}
.step-expected {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.85rem !important;
  color: var(--success) !important;
  font-style: normal;
}

/* ---- FAQ accordion ---- */
.faq-list {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  overflow: hidden;
  transition: border-color var(--t-fast);
}
.faq-item[open] {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}
.faq-item summary {
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 2.5rem;
  transition: color var(--t-fast);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--muted-foreground);
  transition: transform var(--t-fast);
  font-weight: 300;
}
.faq-item[open] summary::after {
  content: "−";
}
.faq-item summary:hover {
  color: var(--primary);
}
.faq-a {
  padding: 0 var(--space-md) var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ---- Tables inside docs ---- */
.docs-content .table-wrap {
  margin-top: var(--space-sm);
}
.docs-content table code {
  font-size: 0.82rem;
  white-space: nowrap;
}

/* ---- Mobile TOC fallback: inline section nav ---- */
@media (max-width: 959px) {
  .docs-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-elev);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
  }
  .docs-toc-title {
    width: 100%;
    padding: 0;
    margin-bottom: 0;
  }
  .docs-toc nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .docs-toc ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    border-left: none;
  }
  .docs-toc a {
    border-left: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 0.3rem 0.8rem;
    margin: 0;
    font-size: 0.82rem;
  }
  .docs-toc a.active {
    border-color: var(--primary);
    background: var(--primary-50);
  }
}

/* ---- Theme transition for docs components ---- */
.callout,
.faq-item,
.step-num,
.docs-toc a {
  transition: background-color 0.3s ease, border-color 0.3s ease,
    color 0.3s ease;
}
