/* ==========================================================
   USINE AGENT IA — Style Principal
   Dark theme, responsive, glassmorphism
   ========================================================== */

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: rgba(30, 41, 59, 0.6);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.8);
  --border-subtle: rgba(99, 102, 241, 0.15);
  --border-hover: rgba(99, 102, 241, 0.4);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --green: #10b981;
  --green-glow: rgba(16, 185, 129, 0.3);
  --red: #ef4444;
  --yellow: #f59e0b;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --pink: #ec4899;
  --orange: #f97316;

  /* Typography */
  --font-heading: 'JetBrains Mono', 'Fira Code', monospace;
  --font-body: 'Plus Jakarta Sans', 'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --container-max: 1200px;
  --header-height: 70px;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--accent-light); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent); }
ul, ol { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin-bottom: var(--space-lg); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); margin-bottom: var(--space-md); }
h4 { font-size: 1.1rem; }

p { color: var(--text-secondary); margin-bottom: var(--space-md); }
strong { color: var(--text-primary); }

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

section {
  padding: var(--space-4xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header p {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-light);
  background: var(--accent-glow);
  padding: var(--space-xs) var(--space-md);
  border-radius: 20px;
  margin-bottom: var(--space-md);
}

/* --- Header & Navigation --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.header.scrolled {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-xs) 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-light);
  border-bottom-color: var(--accent);
}

.nav-cta-link {
  padding: 6px 16px !important;
  background: linear-gradient(135deg, var(--green), var(--accent));
  color: #fff !important;
  border-radius: 8px;
  border-bottom: none !important;
  letter-spacing: 0.05em !important;
}

.nav-cta-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
  color: #fff !important;
  border-bottom-color: transparent !important;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-sm);
  background: none;
  border: none;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--header-height);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
  animation: heroGlow 15s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-2%, 2%) rotate(3deg); }
}

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

.hero-logo {
  max-width: 500px;
  height: auto;
  margin: var(--space-3xl) auto var(--space-2xl);
  border-radius: var(--border-radius);
  filter: drop-shadow(0 4px 20px rgba(99, 102, 241, 0.2));
}

.hero h1 {
  margin-bottom: var(--space-lg);
}

.hero h1 .highlight {
  color: var(--accent-light);
  text-shadow: 0 0 40px var(--accent-glow);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Tech tags */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.tech-tag:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* Stats counters */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--accent-light);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* CTA buttons */
.hero-cta {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 6px 25px var(--accent-glow);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--accent-light);
  color: var(--accent-light);
}

/* --- Card Component --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
  backdrop-filter: blur(8px);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  margin-bottom: var(--space-md);
  font-size: 1.5rem;
}

.card-icon.purple { background: var(--accent-glow); color: var(--accent-light); }
.card-icon.green { background: var(--green-glow); color: var(--green); }
.card-icon.blue { background: rgba(59, 130, 246, 0.2); color: var(--blue); }
.card-icon.cyan { background: rgba(6, 182, 212, 0.2); color: var(--cyan); }
.card-icon.pink { background: rgba(236, 72, 153, 0.2); color: var(--pink); }
.card-icon.orange { background: rgba(249, 115, 22, 0.2); color: var(--orange); }
.card-icon.red { background: rgba(239, 68, 68, 0.2); color: var(--red); }
.card-icon.yellow { background: rgba(245, 158, 11, 0.2); color: var(--yellow); }

.card h3 { font-size: 1.1rem; }
.card p { font-size: 0.9rem; margin-bottom: 0; }

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-lg); }

/* --- Overview Section --- */
.overview-intro {
  max-width: 800px;
  margin: 0 auto var(--space-3xl);
  text-align: center;
}

.overview-intro blockquote {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  border-left: 3px solid var(--accent);
  padding-left: var(--space-lg);
  text-align: left;
  font-style: italic;
}

.pillar-cards { margin-bottom: var(--space-3xl); }

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.use-case-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-sm);
  transition: border-color var(--transition-fast);
}

.use-case-card:hover {
  border-color: var(--border-hover);
}

.use-case-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.use-case-card h4 { font-size: 0.95rem; margin-bottom: var(--space-xs); }
.use-case-card p { font-size: 0.85rem; margin-bottom: 0; }

/* --- Architecture Section --- */
.architecture-section {
  background: var(--bg-secondary);
}

/* Animated Architecture Diagram */
.arch-diagram {
  position: relative;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-lg);
  padding: var(--space-2xl) var(--space-xl);
  margin-bottom: var(--space-2xl);
  overflow: hidden;
}

.arch-diagram::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(51,103,145,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(65,189,245,0.05) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 20%, rgba(99,102,241,0.08) 0%, transparent 50%);
  pointer-events: none;
}

/* SVG connection lines — positioned absolutely, drawn by JS */
.arch-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

.arch-line {
  fill: none;
  stroke-width: 1.5;
  stroke-dasharray: 8 4;
  stroke-linecap: round;
}

/* Animated flow — particles travel along the line */
.arch-line { animation: archFlow 3s linear infinite; }

@keyframes archFlow {
  0%   { stroke-dashoffset: 24; }
  100% { stroke-dashoffset: 0; }
}

/* Connection label (mid-line) */
.arch-conn-label {
  font-family: var(--font-heading);
  font-size: 10px;
  fill: var(--text-muted);
  text-anchor: middle;
  pointer-events: none;
}

/* Rows layout */
.arch-row {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.arch-row-3 { gap: var(--space-md); }

.arch-row-4 {
  gap: var(--space-2xl);
  margin-bottom: 0;
}

/* Node base */
.arch-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
  min-width: 120px;
}

.arch-node:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: var(--border-hover);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  z-index: 5;
}

.arch-node-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  transition: box-shadow var(--transition-base);
}

.arch-node:hover .arch-node-icon {
  box-shadow: 0 0 20px currentColor;
}

.arch-node-label {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.arch-node-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Pulse animation on critical nodes */
.arch-pulse {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
  50% { transform: scale(1.3); opacity: 0.8; box-shadow: 0 0 12px 4px rgba(16,185,129,0.3); }
}

/* Node color themes */
.arch-claude .arch-node-icon { background: rgba(99,102,241,0.2); color: var(--accent-light); }
.arch-claude { border-color: rgba(99,102,241,0.3); }

.arch-mcp .arch-node-icon { background: rgba(16,185,129,0.2); color: var(--green); }
.arch-mcp { border-color: rgba(16,185,129,0.2); background: rgba(16,185,129,0.05); }

.arch-pg .arch-node-icon { background: rgba(51,103,145,0.25); color: #5ba4d9; }
.arch-pg { border-color: rgba(51,103,145,0.3); }

.arch-qdrant .arch-node-icon { background: rgba(220,38,38,0.2); color: var(--red); }
.arch-qdrant { border-color: rgba(220,38,38,0.2); }

.arch-n8n .arch-node-icon { background: rgba(255,109,90,0.2); color: #ff6d5a; }
.arch-n8n { border-color: rgba(255,109,90,0.2); }

.arch-ollama .arch-node-icon { background: rgba(148,163,184,0.15); color: var(--text-secondary); }
.arch-ollama { border-color: rgba(148,163,184,0.2); }

.arch-ha .arch-node-icon { background: rgba(65,189,245,0.2); color: #41bdf5; }
.arch-ha { border-color: rgba(65,189,245,0.2); }

.arch-storage .arch-node-icon { background: rgba(100,116,139,0.15); color: var(--text-muted); }
.arch-storage { border-color: rgba(100,116,139,0.15); min-width: 100px; padding: var(--space-md) var(--space-lg); }

/* Mermaid (kept for other diagrams) */
.mermaid-wrapper {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
  overflow-x: auto;
}

.mermaid-wrapper .mermaid {
  display: flex;
  justify-content: center;
}

.subsection-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.subsection-title::before {
  content: '';
  width: 4px;
  height: 1.2em;
  background: var(--accent);
  border-radius: 2px;
}

/* --- Tables --- */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--space-2xl);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background: var(--bg-secondary);
}

th {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid rgba(99, 102, 241, 0.06);
  color: var(--text-secondary);
}

tr:hover td {
  background: rgba(99, 102, 241, 0.04);
}

td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-heading);
}

.badge-core { background: rgba(99, 102, 241, 0.15); color: var(--accent-light); }
.badge-monitoring { background: rgba(6, 182, 212, 0.15); color: var(--cyan); }
.badge-proxy { background: rgba(245, 158, 11, 0.15); color: var(--yellow); }
.badge-homeassistant { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.badge-critical { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.badge-optional { background: rgba(100, 116, 139, 0.15); color: var(--text-muted); }
.badge-infra { background: rgba(99, 102, 241, 0.15); color: var(--accent-light); }
.badge-mcp { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.badge-docs { background: rgba(6, 182, 212, 0.15); color: var(--cyan); }
.badge-workflows { background: rgba(249, 115, 22, 0.15); color: var(--orange); }
.badge-qdrant { background: rgba(239, 68, 68, 0.15); color: var(--red); }

/* --- Components Section (Tabs) --- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-sm);
}

.tab-btn {
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.tab-btn:hover,
.tab-btn.active {
  color: var(--accent-light);
  border-bottom-color: var(--accent);
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.component-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.component-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
  font-size: 1.5rem;
}

.component-stats {
  display: flex;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.component-stat {
  text-align: center;
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-sm);
  min-width: 120px;
}

.component-stat .number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-light);
}

.component-stat .label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.workflow-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.workflow-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
}

.workflow-item .wf-icon { font-size: 1.1rem; flex-shrink: 0; }
.workflow-item .wf-name { font-weight: 600; color: var(--text-primary); }
.workflow-item .wf-desc { color: var(--text-muted); margin-left: auto; font-size: 0.8rem; }

/* --- Setup Section --- */
.setup-section {
  background: var(--bg-secondary);
}

.prereq-table { margin-bottom: var(--space-2xl); }

.platform-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  text-align: center;
  transition: border-color var(--transition-fast);
}

.platform-card:hover { border-color: var(--border-hover); }

.platform-card .platform-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.platform-card h3 { margin-bottom: var(--space-md); }

.platform-card .platform-status {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: var(--space-md);
}

.status-reference { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.status-supported { background: rgba(245, 158, 11, 0.15); color: var(--yellow); }
.status-ideal { background: rgba(99, 102, 241, 0.15); color: var(--accent-light); }

.platform-detail { text-align: left; font-size: 0.85rem; color: var(--text-muted); }
.platform-detail li { margin-bottom: var(--space-xs); padding-left: var(--space-md); position: relative; }
.platform-detail li::before { content: '›'; position: absolute; left: 0; color: var(--accent-light); }

/* Compose profiles */
.compose-profiles { margin-bottom: var(--space-2xl); }

/* Code blocks */
pre[class*="language-"] {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-sm);
  padding: var(--space-lg) !important;
  margin-bottom: var(--space-lg);
  font-size: 0.85rem;
  overflow-x: auto;
}

code {
  font-family: var(--font-heading);
  font-size: 0.85em;
}

:not(pre) > code {
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-light);
}

/* Checklist */
.checklist {
  max-width: 600px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-sm);
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast);
}

.checklist-item:hover { border-color: var(--border-hover); }

.checklist-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--green);
  font-size: 0.75rem;
}

/* --- Changelog Section --- */
.changelog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
  justify-content: center;
}

.filter-btn {
  padding: var(--space-xs) var(--space-md);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-subtle);
}

.timeline-month {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: var(--space-lg);
  margin-top: var(--space-2xl);
  position: relative;
}

.timeline-month:first-child { margin-top: 0; }

.timeline-month::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
}

.timeline-entry {
  position: relative;
  margin-bottom: var(--space-lg);
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-sm);
  transition: border-color var(--transition-fast);
}

.timeline-entry:hover { border-color: var(--border-hover); }

.timeline-entry::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 24px;
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
}

.timeline-entry-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.timeline-date {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timeline-title {
  font-weight: 700;
  font-size: 1rem;
}

.timeline-details {
  display: none;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
}

.timeline-details.expanded { display: block; }

.timeline-details ul {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.timeline-details li {
  margin-bottom: var(--space-xs);
  padding-left: var(--space-md);
  position: relative;
}

.timeline-details li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.timeline-toggle {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--accent-light);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-top: var(--space-sm);
}

.timeline-toggle:hover { color: var(--accent); }

/* --- Audiences Section --- */
.audiences-section {
  padding: 100px 0;
  background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.03) 50%, transparent 100%);
}

.audiences-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px;
  margin: 48px 0 40px;
}

.audience-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px 28px;
  transition: border-color 0.3s, transform 0.3s;
}
.audience-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
}

.audience-card-highlight {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.04);
}
.audience-card-highlight:hover {
  border-color: #818cf8;
}

.audience-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 16px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.audience-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.audience-icon-indep {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}
.audience-icon-tpe {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
}
.audience-icon-pme {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}
.audience-icon-tech {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
}

.audience-card h3 {
  font-family: 'Sora', sans-serif;
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.audience-size {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.audience-tagline {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
}

.audience-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.audience-benefits li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 5px 0;
}
.audience-benefits li i {
  color: #10b981;
  flex-shrink: 0;
}

.audience-saving {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.saving-number {
  font-family: 'Sora', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.saving-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.audiences-transition {
  text-align: center;
  margin-top: 16px;
}
.audiences-transition p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.audiences-transition strong {
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .audiences-grid {
    grid-template-columns: 1fr;
  }
  .audience-card-highlight {
    order: -1;
  }
}

/* --- Security Section --- */
.security-section {
  padding: 100px 0;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.03) 0%, transparent 100%);
}

.security-flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 48px 0;
}

.flow-node {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  min-width: 180px;
  max-width: 220px;
  transition: border-color 0.3s, transform 0.3s;
}
.flow-node:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.flow-node h4 {
  font-family: 'Sora', sans-serif;
  font-size: 0.95rem;
  margin: 12px 0 6px;
  color: var(--text-primary);
}
.flow-node p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
}
.flow-icon {
  color: var(--accent);
}

.flow-classifier {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.05);
}
.flow-classifier .flow-icon { color: #6366f1; }

.flow-local {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.05);
}
.flow-local .flow-icon { color: #10b981; }

.flow-cloud {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.03);
}
.flow-cloud .flow-icon { color: #818cf8; }

.flow-arrow {
  color: var(--text-secondary);
  opacity: 0.5;
}

.flow-split {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.flow-or {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}
.tag {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tag-red { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.tag-orange { background: rgba(249, 115, 22, 0.15); color: #f97316; }
.tag-yellow { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.tag-green { background: rgba(16, 185, 129, 0.15); color: #10b981; }

.flow-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  margin-top: 10px;
}
.flow-badge-secure {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}
.flow-badge-fast {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

/* Security Callout */
.security-callout {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-left: 4px solid #ef4444;
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 48px;
}
.callout-icon {
  color: #ef4444;
  flex-shrink: 0;
  margin-top: 2px;
}
.callout-content h3 {
  font-family: 'Sora', sans-serif;
  font-size: 1.1rem;
  color: #ef4444;
  margin: 0 0 10px;
}
.callout-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* Security CTA */
.security-cta {
  text-align: center;
  margin-top: 48px;
  padding: 32px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
}
.security-cta-text {
  font-family: 'Sora', sans-serif;
  font-size: 1.15rem;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .security-callout {
    flex-direction: column;
    gap: 16px;
    padding: 20px;
  }
}

/* Security Pillars */
.security-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin: 64px 0;
}

.pillar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
}
.pillar:hover {
  border-color: #10b981;
  transform: translateY(-4px);
}
.pillar-icon {
  color: #10b981;
  margin-bottom: 16px;
}
.pillar h3 {
  font-family: 'Sora', sans-serif;
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.pillar p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Security Comparison Table */
.security-comparison {
  margin-top: 48px;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 0.9rem;
}
.comparison-table th,
.comparison-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.comparison-table th {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.comparison-table td {
  color: var(--text-secondary);
}
.comparison-table .highlight-col {
  color: #10b981;
  font-weight: 500;
}
.comparison-table thead th.highlight-col {
  color: #10b981;
}
.comparison-table tbody tr:hover {
  background: rgba(16, 185, 129, 0.03);
}

@media (max-width: 768px) {
  .security-flow-diagram {
    flex-direction: column;
  }
  .flow-arrow {
    transform: rotate(90deg);
  }
  .flow-split {
    width: 100%;
  }
  .flow-node {
    max-width: 100%;
    width: 100%;
  }
  .comparison-table {
    font-size: 0.8rem;
  }
  .comparison-table th,
  .comparison-table td {
    padding: 10px 12px;
  }
}

/* --- Roadmap Section --- */
.roadmap-section {
  background: var(--bg-secondary);
}

.roadmap-progress {
  max-width: 600px;
  margin: 0 auto var(--space-3xl);
  text-align: center;
}

.progress-bar {
  height: 12px;
  background: var(--bg-primary);
  border-radius: 6px;
  overflow: hidden;
  margin: var(--space-md) 0;
  border: 1px solid var(--border-subtle);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: 6px;
  width: 0;
  transition: width 1.5s ease-out;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.progress-percent {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-light);
}

/* Horizontal timeline (roadmap milestones) */
.milestones {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  position: relative;
}

.milestones::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 5%;
  right: 5%;
  height: 2px;
  background: var(--border-subtle);
}

.milestone {
  text-align: center;
  position: relative;
}

.milestone-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin: 0 auto var(--space-md);
  position: relative;
  z-index: 1;
}

.milestone-dot.done { background: var(--green); box-shadow: 0 0 10px var(--green-glow); }
.milestone-dot.current { background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.milestone-dot.future { background: var(--text-muted); }

.milestone h4 {
  font-size: 0.85rem;
  margin-bottom: var(--space-xs);
}

.milestone p {
  font-size: 0.8rem;
  margin-bottom: 0;
}

/* --- Footer --- */
.footer {
  padding: var(--space-3xl) 0 var(--space-xl);
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.footer-tech {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-tech span {
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links a:hover { color: var(--accent-light); }

.footer-badge {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.footer-version {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Animated Flow Demo --- */
.flow-demo {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-2xl);
}

.flow-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(30, 41, 59, 0.4);
}

.flow-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.flow-tab:hover { color: var(--text-secondary); background: rgba(99, 102, 241, 0.04); }
.flow-tab.active {
  color: var(--accent-light);
  border-bottom-color: var(--accent);
  background: rgba(99, 102, 241, 0.06);
}

/* Viewport */
.flow-viewport {
  position: relative;
  padding: var(--space-2xl) var(--space-xl);
  min-height: 200px;
}

.flow-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.flow-scene { display: none; }
.flow-scene.active { display: block; }

.flow-nodes {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

/* Flow node */
.flow-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
  min-width: 0;
  opacity: 0.4;
  transform: scale(0.95);
  transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
}

.flow-node.active {
  opacity: 1;
  transform: scale(1);
}

.flow-node.glow {
  filter: drop-shadow(0 0 12px currentColor);
}

.flow-node-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.flow-node.active .flow-node-icon {
  border-color: currentColor;
}

.flow-node.glow .flow-node-icon {
  box-shadow: 0 0 20px currentColor;
}

.flow-node-name {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.4s ease;
}

.flow-node.active .flow-node-name { color: var(--text-primary); }

/* Data packet animation */
.flow-packet {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 12px var(--accent-glow), 0 0 4px var(--accent-light);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.flow-packet.visible { opacity: 1; }

/* Step message */
.flow-status {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: var(--space-xl);
}

.flow-step-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: var(--space-sm);
}

.flow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.3;
  transition: opacity 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.flow-dot.active {
  opacity: 1;
  background: var(--accent-light);
  transform: scale(1.3);
}

.flow-dot.done {
  opacity: 0.7;
  background: var(--green);
}

.flow-message {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text-secondary);
  min-height: 1.4em;
  transition: opacity 0.3s ease;
}

/* Controls */
.flow-controls {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-md) var(--space-xl);
  border-top: 1px solid var(--border-subtle);
  background: rgba(30, 41, 59, 0.3);
}

.flow-play-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.flow-play-btn:hover { background: var(--accent-light); transform: translateY(-1px); }
.flow-play-btn:disabled { opacity: 0.5; cursor: default; transform: none; }

.flow-progress {
  flex: 1;
  height: 4px;
  background: var(--bg-secondary);
  border-radius: 2px;
  overflow: hidden;
}

.flow-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* SVG flow lines */
.flow-line {
  fill: none;
  stroke-width: 2;
  stroke-dasharray: 0;
  opacity: 0.1;
  transition: opacity 0.4s ease;
}

.flow-line.active {
  opacity: 0.5;
  stroke-dasharray: 8 4;
  animation: flowLinePulse 1.5s linear infinite;
}

.flow-line.done {
  opacity: 0.2;
  stroke-dasharray: 0;
}

@keyframes flowLinePulse {
  0% { stroke-dashoffset: 24; }
  100% { stroke-dashoffset: 0; }
}

/* ---- Vertical Setup Flow ---- */
.setup-flow-viewport {
  padding: var(--space-xl) var(--space-2xl);
}

.setup-flow-nodes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  position: relative;
  z-index: 2;
}

.setup-flow-node {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  max-width: 420px;
  opacity: 0.35;
  transform: scale(0.95) translateY(4px);
  transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
}

.setup-flow-node.active {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.setup-flow-node.glow {
  filter: drop-shadow(0 0 12px currentColor);
}

.setup-flow-node .flow-node-icon {
  flex-shrink: 0;
}

.setup-flow-node.active .flow-node-icon {
  border-color: currentColor;
}

.setup-flow-node.glow .flow-node-icon {
  box-shadow: 0 0 20px currentColor;
}

.setup-flow-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.setup-flow-name {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.4s ease;
}

.setup-flow-node.active .setup-flow-name {
  color: var(--text-primary);
}

.setup-flow-detail {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.6;
  transition: opacity 0.4s ease;
}

.setup-flow-node.active .setup-flow-detail {
  opacity: 0.85;
}

/* Responsive flow */
@media (max-width: 768px) {
  .flow-viewport { padding: var(--space-xl) var(--space-md); }
  .flow-tab { font-size: 0.75rem; padding: var(--space-sm) var(--space-md); }
  .flow-tab span { display: none; }
  .flow-node-icon { width: 44px; height: 44px; }
  .flow-node-name { font-size: 0.65rem; }
  .flow-controls { padding: var(--space-sm) var(--space-md); }
  .flow-message { font-size: 0.8rem; }
  .setup-flow-viewport { padding: var(--space-lg) var(--space-md); }
  .setup-flow-node { max-width: 100%; }
  .setup-flow-name { font-size: 0.8rem; }
  .setup-flow-detail { font-size: 0.7rem; }
}

@media (max-width: 480px) {
  .flow-node-icon { width: 36px; height: 36px; }
  .flow-nodes { gap: var(--space-xs); }
  .flow-node-name { font-size: 0.6rem; }
  .flow-play-btn span { display: none; }
  .setup-flow-nodes { gap: var(--space-md); }
  .setup-flow-name { font-size: 0.75rem; }
}

/* --- Scroll indicators --- */
.tabs-wrapper {
  position: relative;
}

.tabs-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to right, transparent, var(--bg-primary));
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.tabs-wrapper.has-scroll::after {
  opacity: 1;
}

/* Code block scroll hint */
pre[class*="language-"] {
  position: relative;
}

.code-scroll-hint {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 30px;
  background: linear-gradient(to right, transparent, var(--bg-primary));
  pointer-events: none;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px var(--accent-glow);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition-base), transform var(--transition-base), background var(--transition-fast);
  z-index: 900;
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}

/* ========================================
   MARKETING SECTIONS (Landing)
   ======================================== */

/* --- Hero Marketing --- */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--green);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: heroPulse 2s infinite;
}

@keyframes heroPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  max-width: 850px;
  margin: 0 auto var(--space-lg);
}

.hero-headline .gradient-text {
  background: linear-gradient(135deg, var(--green) 0%, var(--accent) 50%, var(--purple, #8b5cf6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.8;
}

.hero-metrics {
  display: flex;
  gap: 48px;
  justify-content: center;
  margin-top: var(--space-2xl);
}

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

.hero-metric .metric-value {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--green), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-metric .metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

/* --- Pain Points --- */
.section-alt {
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

.pain-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl) var(--space-lg);
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.pain-card:hover {
  border-color: rgba(249, 115, 22, 0.3);
  transform: translateY(-3px);
}

.pain-icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
}

.pain-card h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--orange);
  margin-bottom: var(--space-sm);
}

.pain-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Benefits --- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

.benefit-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.benefit-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--accent));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.benefit-card:hover {
  border-color: rgba(16, 185, 129, 0.2);
  transform: translateY(-3px);
}

.benefit-card:hover::before { opacity: 1; }

.benefit-number {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--green), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.benefit-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin: var(--space-md) 0 var(--space-sm);
}

.benefit-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.75;
}

/* --- Evolution Timeline --- */
.evo-timeline {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-top: var(--space-2xl);
}

.evo-step {
  flex: 1;
  max-width: 220px;
  text-align: center;
  position: relative;
  padding: 0 var(--space-md);
}

.evo-step::after {
  content: '→';
  position: absolute;
  right: -12px;
  top: 28px;
  font-size: 1.2rem;
  color: var(--text-muted);
}

.evo-step:last-child::after { content: ''; }

.evo-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  font-size: 1.5rem;
  border: 2px solid var(--border-subtle);
  background: var(--bg-secondary);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.evo-step:hover .evo-circle {
  border-color: var(--green);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.15);
}

.evo-step h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.evo-step p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.infinity-symbol {
  font-family: var(--font-heading);
  font-size: 5rem;
  font-weight: 200;
  background: linear-gradient(135deg, var(--green), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: var(--space-2xl);
  display: block;
  animation: breathe 4s ease-in-out infinite;
}

.infinity-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 550px;
  margin: var(--space-md) auto 0;
  line-height: 1.8;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
}

/* --- Use Cases --- */
.usecases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

.usecase {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl) var(--space-lg);
  transition: all var(--transition-base);
}

.usecase:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-3px);
}

.usecase-icon {
  font-size: 1.8rem;
  margin-bottom: var(--space-md);
}

.usecase h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.usecase p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.usecase .savings {
  display: inline-block;
  margin-top: var(--space-md);
  padding: 4px 12px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

/* --- Comparison Table --- */
.comparison {
  margin-top: var(--space-2xl);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  background: var(--bg-secondary);
}

.comparison table {
  width: 100%;
  border-collapse: collapse;
}

.comparison th, .comparison td {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
}

.comparison th {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
}

.comparison th:last-child { color: var(--green); }
.comparison td { color: var(--text-secondary); }
.comparison td:first-child { color: var(--text-primary); font-weight: 500; }
.comparison td:last-child { color: var(--green); font-weight: 600; }
.comparison tr:last-child td { border-bottom: none; }
.comparison .old { color: var(--orange); opacity: 0.7; }

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(16,185,129,0.04) 0%, rgba(99,102,241,0.03) 40%, transparent 70%);
  pointer-events: none;
}

.cta-section h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
}

.cta-section p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 520px;
  margin: var(--space-lg) auto var(--space-xl);
  line-height: 1.8;
}

.cta-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-md);
}

.cta-form-wrapper {
  max-width: 520px;
  margin: var(--space-xl) auto 0;
  text-align: left;
}

.cta-form-wrapper .form-group input,
.cta-form-wrapper .form-group textarea {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}

.cta-form-wrapper .form-group input:focus,
.cta-form-wrapper .form-group textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}

/* --- Programme Beta --- */
.beta-hero {
  text-align: center;
  padding: var(--space-4xl) 0 var(--space-3xl);
  position: relative;
}

.beta-hero::before {
  content: '';
  position: absolute;
  top: -150px; left: 50%;
  transform: translateX(-50%);
  width: 1000px; height: 1000px;
  background: radial-gradient(ellipse, rgba(245,197,66,0.04) 0%, rgba(6,214,160,0.04) 30%, rgba(59,130,246,0.03) 50%, transparent 70%);
  pointer-events: none;
}

.beta-exclusive {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border: 1px solid rgba(245,197,66,0.25);
  background: rgba(245,197,66,0.04);
  border-radius: 50px;
  margin-bottom: var(--space-xl);
}

.beta-exclusive .icon { font-size: 1.1rem; }

.beta-exclusive .text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold, #f5c542);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
}

.places-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(245,197,66,0.12);
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold, #f5c542);
}

.beta-hero h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  max-width: 850px;
  margin: 0 auto var(--space-lg);
}

.beta-hero h2 .gradient-text {
  background: linear-gradient(135deg, var(--gold, #f5c542) 0%, var(--accent, #f97316) 50%, var(--green, #10b981) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.beta-hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.85;
}

/* Perks grid */
.perks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

.perk-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: all 0.4s;
}

.perk-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity 0.4s;
}

.perk-card:nth-child(1)::before { background: linear-gradient(90deg, #f5c542, #f97316); }
.perk-card:nth-child(2)::before { background: linear-gradient(90deg, var(--green), var(--accent)); }
.perk-card:nth-child(3)::before { background: linear-gradient(90deg, #8b5cf6, var(--green)); }
.perk-card:nth-child(4)::before { background: linear-gradient(90deg, var(--accent), #8b5cf6); }
.perk-card:nth-child(5)::before { background: linear-gradient(90deg, #f97316, #f5c542); }
.perk-card:nth-child(6)::before { background: linear-gradient(90deg, var(--green), #f5c542); }

.perk-card:hover {
  border-color: rgba(245,197,66,0.2);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.perk-card:hover::before { opacity: 1; }

.perk-icon { font-size: 2rem; margin-bottom: var(--space-md); }

.perk-card h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.perk-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.perk-badge {
  display: inline-block;
  margin-top: var(--space-md);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.badge-gold { background: rgba(245,197,66,0.1); color: #f5c542; }
.badge-cyan { background: rgba(16,185,129,0.1); color: var(--green); }
.badge-purple { background: rgba(139,92,246,0.1); color: #8b5cf6; }

/* Beta Timeline */
.beta-timeline-section {
  padding: var(--space-4xl) 0;
}

.beta-timeline {
  margin-top: var(--space-3xl);
  position: relative;
  padding-left: 40px;
  max-width: 800px;
}

.beta-timeline::before {
  content: '';
  position: absolute;
  left: 14px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, #f5c542, var(--green), #8b5cf6);
  border-radius: 2px;
}

.beta-timeline-item {
  position: relative;
  margin-bottom: var(--space-2xl);
  padding-left: var(--space-lg);
}

.beta-timeline-item:last-child { margin-bottom: 0; }

.beta-timeline-dot {
  position: absolute;
  left: -33px; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
}

.beta-timeline-item:nth-child(1) .beta-timeline-dot { background: #f5c542; box-shadow: 0 0 16px rgba(245,197,66,0.4); }
.beta-timeline-item:nth-child(2) .beta-timeline-dot { background: var(--green); box-shadow: 0 0 16px rgba(16,185,129,0.4); }
.beta-timeline-item:nth-child(3) .beta-timeline-dot { background: var(--accent); box-shadow: 0 0 16px rgba(59,130,246,0.4); }
.beta-timeline-item:nth-child(4) .beta-timeline-dot { background: #8b5cf6; box-shadow: 0 0 16px rgba(139,92,246,0.4); }

.beta-timeline-phase {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.beta-timeline-item h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.beta-timeline-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Quote */
.quote-section {
  padding: var(--space-3xl) 0;
  text-align: center;
  max-width: 750px;
  margin: 0 auto;
}

.quote-mark {
  font-size: 4rem;
  line-height: 1;
  background: linear-gradient(135deg, #f5c542, var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: Georgia, serif;
}

.quote-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.6;
  margin: var(--space-md) 0 var(--space-lg);
  font-style: italic;
  color: var(--text-primary);
}

.quote-author {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.quote-author strong {
  color: var(--green);
  font-weight: 600;
}

/* Beta Form */
.beta-form-section {
  padding: var(--space-4xl) 0;
}

.beta-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.form-perks {
  margin-top: var(--space-2xl);
  list-style: none;
  padding: 0;
}

.form-perks li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.form-perks .check {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: var(--radius-sm);
  background: rgba(16,185,129,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--green);
  margin-top: 2px;
}

.form-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
}

.form-container h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-container .form-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.3px;
}

.form-group label .required {
  color: var(--accent);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: all 0.3s;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234a5068' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-group select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: var(--space-lg) 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.form-consent input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--green);
  cursor: pointer;
  flex-shrink: 0;
}

.form-consent a {
  color: var(--accent, #6366f1);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.3s;
}
.form-consent a:hover {
  color: #818cf8;
}

.btn-submit {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #f5c542, #f97316);
  color: #06080d;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 0.3px;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(245,197,66,0.25);
}

.btn-submit:active { transform: translateY(0); }

.form-note {
  text-align: center;
  margin-top: var(--space-md);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.form-success {
  display: none;
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}

.form-success.show { display: block; }

.form-success .success-icon { font-size: 3.5rem; margin-bottom: var(--space-md); }

.form-success h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, #f5c542, var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-success p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* FAQ */
.faq-section {
  padding: var(--space-4xl) 0;
  max-width: 750px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-lg) 0;
}

.faq-item:first-of-type { border-top: 1px solid var(--border-subtle); }

.faq-question {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  user-select: none;
  transition: color 0.3s;
}

.faq-question:hover { color: var(--green); }

.faq-toggle {
  font-size: 1.3rem;
  color: var(--text-muted);
  transition: transform 0.3s;
  flex-shrink: 0;
}

.faq-item.open .faq-toggle { transform: rotate(45deg); color: var(--green); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-top: var(--space-md);
}

.faq-answer p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* Nav beta badge */
.nav-beta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border: 1px solid rgba(245,197,66,0.3);
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #f5c542 !important;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
  text-decoration: none !important;
  transition: all 0.3s;
}

.nav-beta-link::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #f5c542;
  animation: betaPulse 2s infinite;
}

.nav-beta-link:hover {
  background: rgba(245,197,66,0.1);
  border-color: rgba(245,197,66,0.5);
}

@keyframes betaPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .milestones { grid-template-columns: repeat(2, 1fr); }
  .milestones::before { display: none; }

  .arch-row-3 { flex-wrap: wrap; }
  .arch-node { min-width: 100px; padding: var(--space-md); }
  .arch-lines { display: none; }

  .pain-grid, .usecases-grid { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr; }
  .evo-timeline { flex-direction: column; align-items: center; gap: var(--space-xl); }
  .evo-step::after { content: '↓'; position: static; display: block; margin-top: var(--space-sm); }
  .evo-step:last-child::after { display: none; }
  .hero-metrics { flex-direction: column; gap: var(--space-lg); }
  .comparison { overflow-x: auto; }
  .perks-grid { grid-template-columns: repeat(2, 1fr); }
  .beta-form-grid { grid-template-columns: 1fr; gap: var(--space-2xl); }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --header-height: 60px; }

  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    background: var(--bg-primary);
    padding: calc(var(--header-height) + var(--space-xl)) var(--space-xl) var(--space-xl);
    border-left: 1px solid var(--border-subtle);
    transition: right var(--transition-base);
    gap: var(--space-md);
    align-items: flex-start;
    z-index: 999;
  }

  .nav-links.open { right: 0; }

  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
  }

  .nav-overlay.open { display: block; }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .perks-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-5 { grid-template-columns: 1fr; }
  .use-case-grid { grid-template-columns: 1fr; }
  .platform-cards { grid-template-columns: 1fr; }
  .milestones { grid-template-columns: 1fr; gap: var(--space-xl); }

  .arch-diagram { min-height: auto; padding: var(--space-lg) var(--space-md); }
  .arch-row { flex-wrap: wrap; gap: var(--space-md); }
  .arch-row-3 { gap: var(--space-sm); }
  .arch-node { min-width: 80px; padding: var(--space-sm) var(--space-md); }
  .arch-node-icon { width: 40px; height: 40px; }
  .arch-node-label { font-size: 0.75rem; }
  .arch-node-sub { font-size: 0.65rem; }

  /* Tabs scroll with fade indicator */
  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--space-md);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs-wrapper::after { opacity: 1; }

  .tab-btn { white-space: nowrap; flex-shrink: 0; }

  section { padding: var(--space-3xl) 0; }

  .mermaid-wrapper { padding: var(--space-md); }

  /* Timeline compact on mobile */
  .timeline { padding-left: 22px; }
  .timeline::before { left: 6px; }
  .timeline-month::before { left: -19px; width: 10px; height: 10px; }
  .timeline-entry::before { left: -19px; width: 6px; height: 6px; }
  .timeline-entry { padding: var(--space-md); }
  .timeline-entry-header { gap: var(--space-sm); }
  .timeline-title { font-size: 0.9rem; }

  /* Workflow items stack description below */
  .workflow-item {
    flex-wrap: wrap;
    padding: var(--space-md);
  }
  .workflow-item .wf-desc {
    margin-left: 0;
    width: 100%;
    padding-left: calc(1.1rem + var(--space-md));
    margin-top: var(--space-xs);
  }

  /* Component stats wrap tighter */
  .component-stats { gap: var(--space-md); }
  .component-stat { min-width: 100px; padding: var(--space-md); }
  .component-stat .number { font-size: 1.25rem; }

  /* Footer vertical on mobile */
  .footer-links {
    flex-direction: column;
    gap: var(--space-md);
  }

  /* Back to top smaller position */
  .back-to-top { bottom: 1.5rem; right: 1.5rem; width: 40px; height: 40px; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-md); }

  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .stat-number { font-size: 1.5rem; }
  .stat-label { font-size: 0.7rem; }
  .hero h1 { font-size: 1.75rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-logo { max-width: 300px; }

  .tech-tags { gap: 4px; }
  .tech-tag { font-size: 0.7rem; padding: 2px 8px; }

  section { padding: var(--space-2xl) 0; }
  .section-header { margin-bottom: var(--space-2xl); }

  /* Cards less padding */
  .card { padding: var(--space-lg); }
  .card-icon { width: 40px; height: 40px; font-size: 1.2rem; }

  /* Use case cards tighter */
  .use-case-card { padding: var(--space-md); gap: var(--space-sm); }
  .use-case-icon { font-size: 1.25rem; }

  /* Tables tighter */
  th, td { padding: var(--space-sm) var(--space-md); font-size: 0.8rem; }

  /* Milestones single column */
  .milestone { text-align: left; display: flex; align-items: flex-start; gap: var(--space-md); }
  .milestone-dot { margin: 4px 0 0; flex-shrink: 0; }
  .milestone h4 { margin-bottom: 2px; }

  /* Checklist */
  .checklist-item { font-size: 0.8rem; padding: var(--space-sm) var(--space-md); }

  /* Progress stats wrap */
  .progress-stats { font-size: 0.75rem; flex-wrap: wrap; justify-content: center; gap: var(--space-sm); }

  /* Code blocks smaller font */
  pre[class*="language-"] { font-size: 0.75rem !important; padding: var(--space-md) !important; }

  /* Back to top */
  .back-to-top { bottom: 1rem; right: 1rem; width: 36px; height: 36px; }
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-accent { color: var(--accent-light); }
.mt-1 { margin-top: var(--space-md); }
.mt-2 { margin-top: var(--space-xl); }
.mt-3 { margin-top: var(--space-2xl); }
.mb-1 { margin-bottom: var(--space-md); }
.mb-2 { margin-bottom: var(--space-xl); }
.mb-3 { margin-bottom: var(--space-2xl); }

/* --- Toast notification (doc access message) --- */
.doc-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: linear-gradient(135deg, var(--glass-bg, rgba(30,30,50,0.95)), rgba(20,20,40,0.98));
  border: 1px solid var(--accent, #6366f1);
  border-radius: 12px;
  padding: 16px 24px;
  color: var(--text, #e2e8f0);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 480px;
  width: 90%;
  text-align: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.doc-toast.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.doc-toast .toast-icon {
  font-size: 1.3rem;
  margin-bottom: 4px;
}
.doc-toast .toast-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.doc-toast .toast-close:hover {
  color: var(--text, #e2e8f0);
}

/* --- AOS overrides for dark theme --- */
[data-aos] { transition-duration: 600ms; }
