/* ========================================
   DBWizard Landing Page — Styles
   ======================================== */

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

/* ---------- CSS Variables ---------- */
:root {
  --brand-primary: #0f52ba;
  --brand-primary-hover: #0c4294;
  --brand-primary-light: rgba(15, 82, 186, 0.08);
  --brand-primary-rgb: 15, 82, 186;

  --bg-primary: #ffffff;
  --bg-secondary: #f7f8fb;
  --bg-tertiary: #f0f2f5;
  --bg-card: rgba(255, 255, 255, 0.8);

  --text-primary: #1a1a2e;
  --text-secondary: #555566;
  --text-tertiary: #888899;
  --text-inverse: #ffffff;

  --border-color: rgba(0, 0, 0, 0.08);
  --border-color-hover: rgba(15, 82, 186, 0.25);

  --shadow-sm: 0 2px 8px rgba(15, 82, 186, 0.06);
  --shadow-md: 0 4px 20px rgba(15, 82, 186, 0.1);
  --shadow-lg: 0 8px 40px rgba(15, 82, 186, 0.12);
  --shadow-xl: 0 20px 60px rgba(15, 82, 186, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition: 0.3s ease;
  --transition-fast: 0.15s ease;

  --navbar-height: 72px;
  --navbar-bg: rgba(255, 255, 255, 0.85);

  /* Demo animation colors - Light theme */
  --demo-user-bg: #0f52ba;
  --demo-user-text: #ffffff;
  --demo-assistant-bg: #f1f3f4;
  --demo-assistant-text: #333333;
  --demo-assistant-header: #555555;
  --demo-assistant-time: #999999;
  --demo-container-bg: linear-gradient(135deg, #f7f8fb 0%, #f0f3f8 100%);
  --demo-card-bg: #ffffff;
  --demo-card-shadow: 0 4px 20px rgba(15, 82, 186, 0.12);
  --demo-title-color: #333333;
  --demo-loading-dots: #0f52ba;
  --demo-chart-grid: rgba(0, 0, 0, 0.06);
  --demo-chart-text: #666666;
}

[data-theme="dark"] {
  --brand-primary: #4a8fff;
  --brand-primary-hover: #6ba3ff;
  --brand-primary-light: rgba(74, 143, 255, 0.1);
  --brand-primary-rgb: 74, 143, 255;

  --bg-primary: #0d0d1a;
  --bg-secondary: #131322;
  --bg-tertiary: #1a1a2e;
  --bg-card: rgba(19, 19, 34, 0.85);

  --text-primary: #e4e4ed;
  --text-secondary: #a0a0b8;
  --text-tertiary: #6b6b82;

  --border-color: rgba(255, 255, 255, 0.07);
  --border-color-hover: rgba(74, 143, 255, 0.3);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.5);

  --navbar-bg: rgba(13, 13, 26, 0.88);

  /* Demo animation colors - Dark theme */
  --demo-user-bg: #4a8fff;
  --demo-user-text: #ffffff;
  --demo-assistant-bg: #1a1a2e;
  --demo-assistant-text: #e4e4ed;
  --demo-assistant-header: #a0a0b8;
  --demo-assistant-time: #6b6b82;
  --demo-container-bg: linear-gradient(135deg, #131322 0%, #1a1a2e 100%);
  --demo-card-bg: #1a1a2e;
  --demo-card-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  --demo-title-color: #e4e4ed;
  --demo-loading-dots: #4a8fff;
  --demo-chart-grid: rgba(255, 255, 255, 0.1);
  --demo-chart-text: #a0a0b8;
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-height);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; height: auto; }

/* ---------- Layout ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  transition: background-color var(--transition);
}

.section-alt {
  background-color: var(--bg-secondary);
}

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

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-weight: 300;
}

/* ---------- Badge ---------- */
.badge {
  display: inline-block;
  padding: 8px 20px;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid rgba(var(--brand-primary-rgb), 0.15);
}

.badge-sm {
  padding: 4px 12px;
  font-size: 0.75rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand-primary);
  color: var(--text-inverse);
  box-shadow: 0 2px 8px rgba(var(--brand-primary-rgb), 0.3);
}

.btn-primary:hover {
  background: var(--brand-primary-hover);
  box-shadow: 0 4px 16px rgba(var(--brand-primary-rgb), 0.4);
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-primary-light);
}

.btn-sm { padding: 8px 20px; font-size: 0.875rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; border-radius: var(--radius-md); }
.btn-full { width: 100%; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: var(--navbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

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

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

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

.logo-db {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brand-primary);
}

.logo-wizard {
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 450;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand-primary);
  border-radius: 1px;
  transition: width var(--transition);
}

.nav-link:hover { color: var(--brand-primary); }
.nav-link:hover::after { width: 100%; }

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

.lang-toggle,
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: transparent;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.lang-toggle:hover,
.theme-toggle:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-primary-light);
}

.lang-label {
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
}

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

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-primary);
}

.menu-icon-close { display: none; }
.menu-toggle.active .menu-icon-open { display: none; }
.menu-toggle.active .menu-icon-close { display: block; }

.mobile-menu-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  cursor: pointer;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 2;
  backdrop-filter: blur(8px);
}

.mobile-menu-close:hover {
  background: var(--brand-primary);
  color: var(--text-inverse);
  border-color: var(--brand-primary);
  transform: rotate(90deg);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--navbar-height);
  overflow: hidden;
  background: var(--bg-primary);
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.12;
}

.hero-orb-1 {
  width: 600px;
  height: 600px;
  background: var(--brand-primary);
  top: -150px;
  right: -100px;
  animation: heroFloat 20s ease-in-out infinite;
}

.hero-orb-2 {
  width: 400px;
  height: 400px;
  background: rgba(var(--brand-primary-rgb), 0.8);
  bottom: -100px;
  left: -100px;
  animation: heroFloat 25s ease-in-out infinite reverse;
}

.hero-orb-3 {
  width: 300px;
  height: 300px;
  background: rgba(var(--brand-primary-rgb), 0.5);
  top: 40%;
  left: 50%;
  animation: heroFloat 18s ease-in-out infinite 3s;
}

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 10px) scale(1.02); }
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
  padding: 60px 24px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.1875rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 300;
}

.hero-tagline {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--brand-primary);
  line-height: 1.5;
  margin-top: 4px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Mockup browser */
.mockup-browser {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(8px);
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.mockup-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition), border-color var(--transition);
}

.mockup-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.mockup-dot.red { background: #ff5f57; }
.mockup-dot.yellow { background: #febc2e; }
.mockup-dot.green { background: #28c840; }

.mockup-url {
  margin-left: 12px;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  background: var(--bg-primary);
  padding: 4px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}

.mockup-content {
  padding: 0;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mockup-video-content {
  padding: 0;
  background: var(--demo-container-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16/10;
  width: 100%;
  overflow: hidden;
  position: relative;
  transition: background var(--transition);
}

.mockup-lg { max-width: 900px; margin: 0 auto; }

/* Vídeo i imatge dins mockup */
.showcase-video-player,
.mockup-screenshot {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: 600px;
}

.mockup-screenshot {
  background: var(--bg-primary);
  padding: 20px;
}

/* Hero static demo */
.hero-static-demo {
  width: 100%;
  min-height: 400px;
  padding: 24px;
  background: var(--demo-container-bg);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

/* ScalarBubble dins demo */
.demo-scalar-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.25rem 1.5rem;
  background: var(--demo-card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-align: center;
  margin-top: 0.5rem;
}

.demo-scalar-etiqueta {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--demo-assistant-header);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.demo-scalar-valor {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--demo-title-color);
  line-height: 1.2;
  word-break: break-word;
}

.demo-scalar-bubble.scalar-numeric .demo-scalar-valor {
  font-size: 2rem;
  color: var(--brand-primary);
  font-variant-numeric: tabular-nums;
}

.placeholder-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--text-tertiary);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 48px 40px;
  width: 100%;
  transition: border-color var(--transition), color var(--transition);
}

.placeholder-media svg { opacity: 0.35; }
.placeholder-media p { font-size: 0.875rem; font-weight: 500; }
.placeholder-video { padding: 64px 40px; }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2.5s ease infinite;
  color: var(--text-tertiary);
  opacity: 0.4;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* ============================================================
   FEATURES
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(8px);
  transition: all var(--transition);
}

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

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--brand-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--brand-primary);
  transition: background-color var(--transition);
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  font-weight: 300;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.step {
  flex: 1;
  text-align: center;
  padding: 0 24px;
  max-width: 320px;
}

.step-number {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.step-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--brand-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--brand-primary);
  border: 2px solid rgba(var(--brand-primary-rgb), 0.12);
  transition: background-color var(--transition), border-color var(--transition);
}

.step h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.step p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  font-weight: 300;
}

.step-connector {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, rgba(var(--brand-primary-rgb), 0.2), rgba(var(--brand-primary-rgb), 0.05));
  margin-top: 54px;
  flex-shrink: 0;
}

/* ============================================================
   PRIVACY MODES
   ============================================================ */
.privacy-modes {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.modes-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: stretch;
  margin-bottom: 48px;
}

.mode-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  backdrop-filter: blur(8px);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

/* Mode Privat - Gradient verd/blau */
.mode-private {
  border: 2px solid transparent;
  background-image:
    linear-gradient(var(--bg-card), var(--bg-card)),
    linear-gradient(135deg, rgba(52, 168, 83, 0.4), rgba(6, 182, 212, 0.4));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.mode-private:hover {
  background-image:
    linear-gradient(var(--bg-card), var(--bg-card)),
    linear-gradient(135deg, rgba(52, 168, 83, 0.7), rgba(6, 182, 212, 0.7));
  box-shadow: 0 8px 40px rgba(52, 168, 83, 0.1), 0 8px 40px rgba(6, 182, 212, 0.1);
}

.mode-private .mode-badge {
  background: linear-gradient(135deg, rgba(52, 168, 83, 0.15), rgba(6, 182, 212, 0.15));
  color: #34a853;
}

/* Mode Insights - Gradient taronja/lila */
.mode-insights {
  border: 2px solid transparent;
  background-image:
    linear-gradient(var(--bg-card), var(--bg-card)),
    linear-gradient(135deg, rgba(251, 140, 0, 0.4), rgba(168, 85, 247, 0.4));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.mode-insights:hover {
  background-image:
    linear-gradient(var(--bg-card), var(--bg-card)),
    linear-gradient(135deg, rgba(251, 140, 0, 0.7), rgba(168, 85, 247, 0.7));
  box-shadow: 0 8px 40px rgba(251, 140, 0, 0.1), 0 8px 40px rgba(168, 85, 247, 0.1);
}

.mode-insights .mode-badge {
  background: linear-gradient(135deg, rgba(251, 140, 0, 0.15), rgba(168, 85, 247, 0.15));
  color: #fb8c00;
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  align-self: flex-start;
}

.mode-badge svg {
  width: 20px;
  height: 20px;
}

.mode-card h3 {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  margin: 0;
}

.mode-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mode-benefits li {
  position: relative;
  padding-left: 28px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.mode-benefits li::before {
  content: '✓';
  position: absolute;
  left: 0;
  font-weight: 700;
  font-size: 1.125rem;
}

.mode-private .mode-benefits li::before {
  background: linear-gradient(135deg, #34a853, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mode-insights .mode-benefits li::before {
  background: linear-gradient(135deg, #fb8c00, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mode-use-case {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.mode-use-case strong {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.mode-use-case p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Separator */
.mode-separator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 60px;
}

.separator-line {
  width: 2px;
  flex: 1;
  background: linear-gradient(180deg,
    rgba(52, 168, 83, 0.3) 0%,
    rgba(6, 182, 212, 0.3) 25%,
    var(--border-color) 50%,
    rgba(251, 140, 0, 0.3) 75%,
    rgba(168, 85, 247, 0.3) 100%
  );
}

.separator-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.separator-toggle svg {
  width: 24px;
  height: 24px;
}

/* Modes footer */
.modes-footer {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 32px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
}

.reassurance-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.reassurance-item svg {
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* ============================================================
   ROLES
   ============================================================ */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.role-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: all var(--transition);
}

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

.role-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--brand-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--brand-primary);
  transition: background-color var(--transition);
}

.role-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.role-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  font-weight: 300;
}

/* ============================================================
   SHOWCASE
   ============================================================ */
.showcase-video {
  margin-top: 20px;
}

/* ============================================================
   ROADMAP
   ============================================================ */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.roadmap-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(8px);
  transition: all var(--transition);
}

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

.roadmap-card .badge { margin-bottom: 16px; }

.roadmap-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--brand-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--brand-primary);
  transition: background-color var(--transition);
}

.roadmap-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.roadmap-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  font-weight: 300;
}

.early-access {
  text-align: center;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  transition: background-color var(--transition), border-color var(--transition);
}

.early-access p {
  font-size: 1.0625rem;
  font-weight: 500;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.early-access-form {
  display: flex;
  gap: 12px;
  max-width: 420px;
  margin: 0 auto;
}

.early-access-form input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9375rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition), color var(--transition);
}

.early-access-form input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.1);
}

.early-access-form input::placeholder {
  color: var(--text-tertiary);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}

.contact-info h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.contact-desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  font-weight: 300;
}

.contact-email {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.contact-email svg {
  color: var(--brand-primary);
  flex-shrink: 0;
}

.contact-email a {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
}

.contact-email a:hover { text-decoration: underline; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

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

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9375rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition), color var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.1);
}

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

.form-success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 32px;
  text-align: center;
  color: #34a853;
}

.form-success.visible { display: flex; }

.form-success p {
  font-weight: 500;
  font-size: 1.0625rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
  transition: background-color var(--transition), border-color var(--transition);
}

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

.footer-brand .logo { margin-bottom: 4px; }

.footer-tagline {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.digit4l-link {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
}

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

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

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

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

.footer-copyright {
  width: 100%;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-top: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.features-grid .fade-up:nth-child(2) { transition-delay: 0.1s; }
.features-grid .fade-up:nth-child(3) { transition-delay: 0.2s; }
.features-grid .fade-up:nth-child(4) { transition-delay: 0.15s; }
.features-grid .fade-up:nth-child(5) { transition-delay: 0.25s; }

.steps .step.fade-up:nth-of-type(2) { transition-delay: 0.15s; }
.steps .step.fade-up:nth-of-type(3) { transition-delay: 0.3s; }

.roles-grid .fade-up:nth-child(2) { transition-delay: 0.1s; }
.roles-grid .fade-up:nth-child(3) { transition-delay: 0.2s; }

.roadmap-grid .fade-up:nth-child(2) { transition-delay: 0.1s; }
.roadmap-grid .fade-up:nth-child(3) { transition-delay: 0.2s; }

/* ============================================================
   RESPONSIVE — Tablet
   ============================================================ */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 24px;
  }

  .hero-content { align-items: center; }
  .hero-actions { justify-content: center; }
  .hero-title { font-size: 2.75rem; }
  .hero-visual { max-width: 600px; margin: 0 auto; }

  .features-grid { grid-template-columns: repeat(2, 1fr); }

  .modes-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .mode-separator {
    flex-direction: row;
    min-width: auto;
    height: 60px;
  }

  .separator-line {
    width: auto;
    height: 2px;
    flex: 1;
    background: linear-gradient(90deg,
      rgba(52, 168, 83, 0.3) 0%,
      rgba(6, 182, 212, 0.3) 25%,
      var(--border-color) 50%,
      rgba(251, 140, 0, 0.3) 75%,
      rgba(168, 85, 247, 0.3) 100%
    );
  }

  .modes-footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .reassurance-item {
    justify-content: center;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-info { text-align: center; }
  .contact-email { justify-content: center; }
}

/* ============================================================
   RESPONSIVE — Mobile
   ============================================================ */
@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .section-header { margin-bottom: 48px; }
  .section-header h2 { font-size: 1.75rem; }
  .section-header p { font-size: 1rem; }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 80px;
    gap: 32px;
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 1001;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .nav-links::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1;
  }

  .nav-links.open { transform: translateX(0); }
  .nav-link { font-size: 1.25rem; font-weight: 500; }
  .nav-link::after { display: none; }
  .nav-cta { display: none; }
  .menu-toggle { display: flex; z-index: 1002; }
  .mobile-menu-close { display: flex; }

  .hero {
    min-height: auto;
    padding-top: calc(var(--navbar-height) + 40px);
    padding-bottom: 60px;
  }

  .hero-title { font-size: 2.25rem; }
  .hero-subtitle { font-size: 1.0625rem; }
  .scroll-indicator { display: none; }

  .features-grid,
  .modes-grid,
  .roles-grid,
  .roadmap-grid {
    grid-template-columns: 1fr;
  }

  .mode-separator {
    display: none;
  }

  .modes-footer {
    padding: 24px 20px;
  }

  .steps {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .step-connector {
    width: 2px;
    height: 32px;
    margin: 0;
    background: linear-gradient(180deg, rgba(var(--brand-primary-rgb), 0.2), rgba(var(--brand-primary-rgb), 0.05));
  }

  .early-access-form { flex-direction: column; }
  .contact-info h2 { font-size: 2rem; }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ============================================================
   RESPONSIVE — Small mobile
   ============================================================ */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-title { font-size: 1.875rem; }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn { width: 100%; }

  .mockup-content {
    padding: 32px 20px;
    min-height: 200px;
  }

  .mockup-video-content {
    min-height: auto;
    padding: 0;
  }

  .showcase-video-player,
  .mockup-screenshot {
    max-height: 400px;
  }

  .feature-card,
  .role-card,
  .roadmap-card {
    padding: 24px;
  }

  .early-access { padding: 28px 20px; }
}

/* ============================================================
   SCROLL TO TOP BUTTON
   ============================================================ */
.scroll-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  color: var(--brand-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  z-index: 900;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
  background: var(--brand-primary);
  color: var(--text-inverse);
  border-color: var(--brand-primary);
  box-shadow: 0 8px 24px rgba(var(--brand-primary-rgb), 0.35);
  transform: translateY(-4px) scale(1);
}

.scroll-to-top:active {
  transform: translateY(-2px) scale(0.95);
}

.scroll-to-top svg {
  width: 24px;
  height: 24px;
  transition: transform var(--transition-fast);
}

.scroll-to-top:hover svg {
  transform: translateY(-2px);
}

/* Responsive — Mobile */
@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
  }

  .scroll-to-top svg {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 480px) {
  .scroll-to-top {
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
}

/* ============================================================
   DEMO ANIMATION
   ============================================================ */
#demoContainer {
  position: relative;
  width: 100%;
  height: 100%;
  background: transparent;
  padding: 1.5rem;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.demo-message-wrapper {
  position: absolute;
  width: calc(100% - 3rem);
  left: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.demo-message-wrapper.visible {
  opacity: 1;
  transform: translateY(0);
}

.demo-message-wrapper.fade-out {
  opacity: 0;
  transform: translateY(-20px);
}

.demo-message-wrapper.user-message {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.demo-message-wrapper.assistant-message {
  display: flex;
  justify-content: flex-start;
}

.demo-message-bubble {
  padding: 1rem 1.5rem;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(15, 82, 186, 0.25);
  max-width: 70%;
}

.demo-message-bubble.user {
  background: var(--demo-user-bg);
  color: var(--demo-user-text);
  border-bottom-right-radius: 6px;
  min-width: min(420px, 80%);
  transition: background var(--transition), color var(--transition);
}

.demo-message-bubble.assistant {
  background: var(--demo-assistant-bg);
  color: var(--demo-assistant-text);
  border-bottom-left-radius: 6px;
  box-shadow: 0 2px 12px rgba(15, 82, 186, 0.12);
  min-width: min(420px, 80%);
  transition: background var(--transition), color var(--transition);
}

.demo-ai-response {
  width: 95%;
  height: 95%;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.demo-ai-response.visible {
  opacity: 1;
  transform: translateY(0);
}

.demo-ai-response.fade-out {
  opacity: 0;
  transform: translateY(-20px);
}

.demo-message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.demo-message-role {
  font-weight: 600;
}

.user .demo-message-role {
  color: rgba(255, 255, 255, 0.9);
}

.assistant .demo-message-role {
  color: var(--demo-assistant-header);
  transition: color var(--transition);
}

.demo-message-time {
  font-size: 0.75rem;
}

.user .demo-message-time {
  color: rgba(255, 255, 255, 0.7);
}

.assistant .demo-message-time {
  color: var(--demo-assistant-time);
  transition: color var(--transition);
}

.demo-message-text {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}

.demo-typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: currentColor;
  margin-left: 2px;
  animation: demoBlink 1s step-end infinite;
  vertical-align: text-bottom;
}

.demo-loading-dots {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}

.demo-loading-dots .dot {
  width: 8px;
  height: 8px;
  background: var(--demo-loading-dots);
  border-radius: 50%;
  animation: demoLoadingDot 1.4s ease-in-out infinite;
  transition: background var(--transition);
}

.demo-loading-dots .dot:nth-child(1) {
  animation-delay: 0s;
}

.demo-loading-dots .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.demo-loading-dots .dot:nth-child(3) {
  animation-delay: 0.4s;
}

.demo-chart-container {
  padding: 0 1.25rem 1.25rem 1.25rem;
  background: var(--demo-card-bg);
  border-radius: 16px;
  box-shadow: var(--demo-card-shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: background var(--transition), box-shadow var(--transition);
}

.demo-chart-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--demo-title-color);
  margin-bottom: 1rem;
  padding-top: 1.25rem;
  text-align: center;
  flex-shrink: 0;
  transition: color var(--transition);
}

#demoMonthlyChart {
  flex: 1;
  min-height: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#demoMonthlyChart.ready {
  opacity: 1;
}

.demo-mermaid-container {
  padding: 0 1.25rem 1.25rem 1.25rem;
  background: var(--demo-card-bg);
  border-radius: 16px;
  box-shadow: var(--demo-card-shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  transition: background var(--transition), box-shadow var(--transition);
}

.demo-mermaid-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--demo-title-color);
  margin-bottom: 1rem;
  padding-top: 1.25rem;
  text-align: center;
  flex-shrink: 0;
  transition: color var(--transition);
}

#demoContainer .mermaid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  opacity: 0;
  transition: opacity 0.3s ease;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#demoContainer .mermaid.ready {
  opacity: 1;
}

#demoContainer .mermaid svg {
  box-shadow: none !important;
  max-width: 100%;
  max-height: 100%;
  height: auto !important;
  width: auto !important;
}

@keyframes demoBlink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

@keyframes demoLoadingDot {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  30% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* Responsive demo animation */
@media (max-width: 768px) {
  #demoContainer {
    padding: 1rem;
  }

  .demo-message-wrapper {
    width: calc(100% - 2rem);
    left: 1rem;
  }

  .demo-ai-response {
    width: 95%;
    height: 95%;
  }

  .demo-message-bubble.user,
  .demo-message-bubble.assistant {
    min-width: 280px;
    max-width: 85%;
  }

  .demo-message-text {
    font-size: 1rem;
  }

  .demo-chart-container,
  .demo-mermaid-container {
    padding: 0 1.5rem 1.5rem 1.5rem;
  }

  .demo-chart-title,
  .demo-mermaid-title {
    font-size: 1.125rem;
  }
}

@media (max-width: 480px) {
  #demoContainer {
    padding: 0.75rem;
  }

  .demo-message-wrapper {
    width: calc(100% - 1.5rem);
    left: 0.75rem;
  }

  .demo-ai-response {
    width: 95%;
    height: 95%;
  }

  .demo-message-bubble.user,
  .demo-message-bubble.assistant {
    min-width: 200px;
    max-width: 90%;
    padding: 1rem 1.25rem;
  }

  .demo-message-text {
    font-size: 0.95rem;
  }

  .demo-chart-container,
  .demo-mermaid-container {
    padding: 0 1rem 1rem 1rem;
  }

  #demoMonthlyChart {
    max-height: 300px;
  }
}
