/* ==========================================================================
   SynapseAI - Design System & Stylesheet
   Modern Tech SaaS Landing Page with Dual-Theme & Glassmorphism
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
  /* Font Families */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --trans-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shared Brand Accents */
  --brand-primary: #6366f1;
  --brand-primary-hover: #4f46e5;
  --brand-secondary: #06b6d4;
  --brand-purple: #a855f7;
  --brand-pink: #ec4899;
  --brand-emerald: #10b981;
  --brand-amber: #f59e0b;
}

/* Dark Theme (Default) */
[data-theme="dark"] {
  --bg-main: #060813;
  --bg-secondary: #0c1024;
  --bg-tertiary: #141a36;
  --card-bg: rgba(16, 22, 48, 0.65);
  --card-bg-hover: rgba(23, 31, 68, 0.85);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(129, 140, 248, 0.4);
  --glass-header: rgba(6, 8, 19, 0.75);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  --terminal-bg: #090d1f;
  --terminal-border: rgba(99, 102, 241, 0.25);
  --terminal-header: #0e142e;

  --input-bg: rgba(13, 18, 41, 0.8);
  --input-border: rgba(255, 255, 255, 0.12);

  --glow-1: rgba(99, 102, 241, 0.18);
  --glow-2: rgba(168, 85, 247, 0.14);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 35px -5px rgba(99, 102, 241, 0.35);

  --btn-ghost-hover: rgba(255, 255, 255, 0.06);
}

/* Light Theme */
[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e2e8f0;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-bg-hover: rgba(255, 255, 255, 1);
  --card-border: rgba(15, 23, 42, 0.08);
  --card-border-hover: rgba(99, 102, 241, 0.35);
  --glass-header: rgba(248, 250, 252, 0.85);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --terminal-bg: #1e293b;
  --terminal-border: rgba(15, 23, 42, 0.15);
  --terminal-header: #0f172a;

  --input-bg: #ffffff;
  --input-border: rgba(15, 23, 42, 0.16);

  --glow-1: rgba(99, 102, 241, 0.12);
  --glow-2: rgba(168, 85, 247, 0.09);
  --shadow-lg: 0 20px 35px -10px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 10px 25px -5px rgba(99, 102, 241, 0.25);

  --btn-ghost-hover: rgba(15, 23, 42, 0.05);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  transition: background-color var(--trans-smooth), color var(--trans-smooth);
}

/* Ambient Background Lights */
.glow-sphere {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.8;
  transition: background var(--trans-smooth);
}

.glow-1 {
  width: 550px;
  height: 550px;
  top: -150px;
  left: 20%;
  background: var(--glow-1);
}

.glow-2 {
  width: 600px;
  height: 600px;
  top: 40%;
  right: -150px;
  background: var(--glow-2);
}

.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] .grid-overlay {
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

/* Global Container & Layout Utilities */
.section-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.w-full {
  width: 100%;
}

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

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  letter-spacing: -0.025em;
  font-weight: 700;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all var(--trans-base);
}

.btn-large {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px -2px rgba(99, 102, 241, 0.45);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -2px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-primary);
  border-color: var(--card-border);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: var(--card-bg-hover);
  border-color: var(--card-border-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--card-border);
}

.btn-outline:hover {
  background: var(--btn-ghost-hover);
  border-color: var(--card-border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

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

.btn-arrow {
  width: 18px;
  height: 18px;
  transition: transform var(--trans-fast);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-icon {
  width: 20px;
  height: 20px;
  color: var(--brand-secondary);
}

/* Announcement Top Banner */
.top-banner {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.15));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 16px;
  font-size: 0.85rem;
  text-align: center;
  position: relative;
  z-index: 50;
}

.banner-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: #38bdf8;
  border-radius: 50%;
  animation: pulse-ring 2s infinite ease-out;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
  100% { transform: scale(0.9); opacity: 1; }
}

.banner-link {
  color: var(--brand-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: opacity var(--trans-fast);
}

.banner-link:hover {
  text-decoration: underline;
}

/* Site Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
  transition: background-color var(--trans-smooth);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-mark.mini {
  width: 28px;
  height: 28px;
}

.logo-svg {
  width: 100%;
  height: 100%;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.brand-accent {
  color: var(--brand-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-item {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--trans-fast);
}

.nav-item:hover {
  color: var(--text-primary);
}

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

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--btn-ghost-hover);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.theme-toggle-btn:hover {
  border-color: var(--card-border-hover);
  transform: rotate(15deg);
}

.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
}

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--trans-fast), opacity var(--trans-fast);
}

/* Mobile Dropdown */
.mobile-menu {
  display: none;
  background: var(--bg-main);
  border-bottom: 1px solid var(--card-border);
  padding: 20px 24px;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.mobile-nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 80px 24px 60px;
  position: relative;
  z-index: 1;
}

.hero-container {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 6px 14px 6px 6px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: border-color var(--trans-fast), transform var(--trans-fast);
}

.hero-pill:hover {
  border-color: var(--card-border-hover);
  transform: translateY(-1px);
}

.hero-pill-badge {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.hero-pill-text {
  color: var(--text-secondary);
  font-weight: 500;
}

.hero-pill-arrow {
  color: var(--brand-secondary);
}

.hero-title {
  font-size: clamp(2.5rem, 5.5vw, 4.4rem);
  font-weight: 800;
  line-height: 1.1;
  max-width: 950px;
  margin: 0 auto 24px;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 740px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero-proof {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 50px;
}

/* ==========================================================================
   Interactive AI Playground Terminal
   ========================================================================== */
.playground-showcase {
  max-width: 1050px;
  margin: 0 auto 60px;
  perspective: 1000px;
}

.terminal-card {
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  text-align: left;
  transition: transform var(--trans-smooth), border-color var(--trans-base);
}

.terminal-topbar {
  background: var(--terminal-header);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dots {
  display: flex;
  gap: 7px;
}

.terminal-dots .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #94a3b8;
}

.pulse-indicator {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.terminal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.latency-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

.terminal-tabs {
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 16px;
}

.tab-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  position: relative;
  transition: color var(--trans-fast);
}

.tab-btn:hover {
  color: #f8fafc;
}

.tab-btn.active {
  color: #818cf8;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: #818cf8;
  border-radius: 2px;
}

.terminal-body {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  min-height: 380px;
}

.terminal-controls {
  padding: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.control-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  font-weight: 700;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.chip.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: #818cf8;
  color: #c7d2fe;
}

.input-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.terminal-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 12px;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color var(--trans-fast);
}

.terminal-input:focus {
  border-color: var(--brand-primary);
}

.input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.token-estimate {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: #64748b;
}

.run-icon {
  width: 12px;
  height: 12px;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tel-label {
  font-size: 0.68rem;
  color: #64748b;
  text-transform: uppercase;
}

.tel-value {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: #e2e8f0;
}

.text-emerald {
  color: #34d399 !important;
}

.terminal-output-pane {
  background: rgba(0, 0, 0, 0.45);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #64748b;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.copy-logs-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.copy-logs-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.terminal-pre {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-y: auto;
  max-height: 290px;
}

.log-info { color: #38bdf8; }
.log-success { color: #4ade80; }
.log-warn { color: #facc15; }
.log-agent { color: #c084fc; font-weight: 600; }
.log-metric { color: #f43f5e; font-weight: 600; }

/* Social Proof Logos */
.partners-section {
  padding-top: 30px;
  border-top: 1px solid var(--card-border);
}

.partners-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 24px;
}

.partners-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.partner-logo {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.05em;
  transition: color var(--trans-fast);
}

.partner-logo:hover {
  color: var(--text-primary);
}

.logo-sym {
  color: var(--brand-primary);
}

/* ==========================================================================
   Metrics Ribbon
   ========================================================================== */
.metrics-ribbon {
  background: var(--bg-secondary);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  padding: 50px 0;
  position: relative;
  z-index: 1;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.metric-card {
  padding: 0 16px;
  border-right: 1px solid var(--card-border);
}

.metric-card:last-child {
  border-right: none;
}

.metric-number {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-primary), var(--brand-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.metric-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   Bento Features Grid
   ========================================================================== */
.features-section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 56px;
}

.sub-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.12);
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 3.8vw, 3rem);
  margin-bottom: 16px;
}

.section-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.bento-wide {
  grid-column: span 2;
}

.bento-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  transition: transform var(--trans-base), border-color var(--trans-base), box-shadow var(--trans-base);
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-lg);
}

.card-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.card-icon-wrap svg {
  width: 24px;
  height: 24px;
  color: #fff;
}

.gradient-indigo { background: linear-gradient(135deg, #6366f1, #818cf8); }
.gradient-cyan { background: linear-gradient(135deg, #06b6d4, #38bdf8); }
.gradient-rose { background: linear-gradient(135deg, #f43f5e, #fb7185); }
.gradient-amber { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.gradient-emerald { background: linear-gradient(135deg, #10b981, #34d399); }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand-secondary);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.bento-heading {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.bento-body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Bento custom interactive previews */
.interactive-node-tree {
  margin-top: auto;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.tree-node {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.node-master {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--brand-primary);
  color: #a5b4fc;
  font-weight: 600;
}

.tree-branch {
  width: 2px;
  height: 12px;
  background: var(--card-border);
}

.tree-subnodes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.mini-speed-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 8px;
}

.speed-fill {
  width: 82%;
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #10b981);
  border-radius: var(--radius-full);
}

.speed-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.badge-list {
  list-style: none;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.pill-mini {
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.25);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.code-snippet-preview {
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  margin-top: auto;
}

.syntax-kw { color: #c084fc; }
.syntax-str { color: #34d399; }

.recovery-flow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.step-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.step-chip.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.step-num {
  font-family: var(--font-mono);
  font-weight: 700;
}

/* ==========================================================================
   Architecture & Workflow Timeline
   ========================================================================== */
.architecture-section {
  padding: 80px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  position: relative;
  z-index: 1;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.timeline-step {
  display: flex;
  flex-direction: column;
}

.step-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.step-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--brand-primary);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--card-border);
  margin-left: 12px;
}

.step-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.step-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.step-text {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.card-footer-tag {
  margin-top: auto;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--brand-secondary);
}

/* ==========================================================================
   Pricing Section & Switcher
   ========================================================================== */
.pricing-section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

.billing-switcher {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-top: 24px;
}

.billing-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.discount-pill {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.toggle-switch {
  width: 46px;
  height: 24px;
  background: var(--card-border);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  position: relative;
  transition: background-color var(--trans-fast);
}

.toggle-switch[aria-checked="true"] {
  background: var(--brand-primary);
}

.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--trans-fast);
}

.toggle-switch[aria-checked="true"] .toggle-knob {
  transform: translateX(22px);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.pricing-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--trans-base), border-color var(--trans-base);
}

.pricing-card:hover {
  transform: translateY(-4px);
}

.pricing-card.featured {
  border-color: var(--brand-primary);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.12) 0%, var(--card-bg) 40%);
  box-shadow: 0 0 35px -5px rgba(99, 102, 241, 0.3);
  transform: scale(1.03);
}

.pricing-card.featured:hover {
  transform: scale(1.03) translateY(-4px);
}

.featured-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.plan-name {
  font-size: 1.45rem;
  margin-bottom: 6px;
}

.plan-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  min-height: 42px;
  margin-bottom: 20px;
}

.price-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 24px;
}

.currency {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.price-amount {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

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

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.check-icon {
  width: 18px;
  height: 18px;
  color: #10b981;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================================================
   Testimonials Section
   ========================================================================== */
.testimonials-section {
  padding: 80px 0;
  border-top: 1px solid var(--card-border);
  position: relative;
  z-index: 1;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: transform var(--trans-base);
}

.testimonial-card:hover {
  transform: translateY(-3px);
  border-color: var(--card-border-hover);
}

.testi-stars {
  color: #f59e0b;
  font-size: 1.1rem;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.testi-quote {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 24px;
  flex: 1;
}

.testi-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.ring-cyan { background: linear-gradient(135deg, #06b6d4, #38bdf8); box-shadow: 0 0 10px rgba(6, 182, 212, 0.4); }
.ring-pink { background: linear-gradient(135deg, #ec4899, #f43f5e); box-shadow: 0 0 10px rgba(236, 72, 153, 0.4); }

.author-name {
  font-weight: 600;
  font-size: 0.92rem;
}

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

/* ==========================================================================
   FAQ Section (Accordion)
   ========================================================================== */
.faq-section {
  padding: 90px 0;
  position: relative;
  z-index: 1;
}

.accordion-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--trans-fast);
}

.accordion-item[open] {
  border-color: var(--brand-primary);
}

.accordion-trigger {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.accordion-trigger::-webkit-details-marker {
  display: none;
}

.accordion-icon {
  font-size: 1.3rem;
  color: var(--brand-secondary);
  transition: transform var(--trans-base);
}

.accordion-item[open] .accordion-icon {
  transform: rotate(45deg);
}

.accordion-content {
  padding: 0 24px 24px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ==========================================================================
   CTA Banner Section
   ========================================================================== */
.cta-banner-section {
  padding: 40px 0 100px;
  position: relative;
  z-index: 1;
}

.cta-banner-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px -10px rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .cta-banner-card {
  background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%);
  border-color: rgba(99, 102, 241, 0.3);
}

.cta-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cta-content {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cta-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.cta-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  margin-bottom: 16px;
}

.cta-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

.cta-form {
  max-width: 480px;
  margin: 0 auto 24px;
}

.input-with-button {
  display: flex;
  gap: 8px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-lg);
  padding: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 10px 16px;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.cta-input::placeholder {
  color: var(--text-muted);
}

.form-feedback {
  font-size: 0.85rem;
  margin-top: 8px;
  min-height: 20px;
  font-weight: 500;
}

.form-feedback.success {
  color: #34d399;
}

.form-feedback.error {
  color: #f87171;
}

.cta-badges {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Modern Native Modal Dialog with @starting-style
   ========================================================================== */
.native-modal {
  margin: auto;
  border: none;
  background: transparent;
  padding: 0;
  max-width: 480px;
  width: 90%;
  color: var(--text-primary);
  outline: none;
}

.native-modal::backdrop {
  background: rgba(6, 8, 19, 0.75);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.native-modal[open]::backdrop {
  opacity: 1;
}

.modal-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border-hover);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), var(--shadow-glow);
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.native-modal[open] .modal-wrapper {
  transform: scale(1);
  opacity: 1;
}

@starting-style {
  .native-modal[open]::backdrop {
    opacity: 0;
  }
  .native-modal[open] .modal-wrapper {
    transform: scale(0.95);
    opacity: 0;
  }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  transition: color var(--trans-fast);
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-intro {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.92rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--trans-fast);
}

.form-control:focus {
  border-color: var(--brand-primary);
}

.modal-footer {
  padding: 14px 24px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--card-border);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--brand-primary);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   Site Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--card-border);
  padding-top: 70px;
  position: relative;
  z-index: 1;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 320px;
  line-height: 1.6;
}

.status-indicator-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  width: fit-content;
}

.green-status-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
}

.footer-heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-list a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color var(--trans-fast);
}

.footer-list a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid var(--card-border);
  padding: 24px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--trans-fast);
}

.footer-bottom-links a:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .nav-links, .nav-login {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
  .mobile-menu.open {
    display: block;
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-wide {
    grid-column: span 1;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
  .metric-card {
    border-right: none;
  }
  .timeline-grid, .pricing-grid, .testimonial-grid {
    grid-template-columns: 1fr;
  }
  .pricing-card.featured {
    transform: none;
  }
  .pricing-card.featured:hover {
    transform: translateY(-4px);
  }
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .terminal-body {
    grid-template-columns: 1fr;
  }
  .terminal-controls {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .footer-content {
    grid-template-columns: 1fr;
  }
  .nav-cta {
    display: none;
  }
}
