/* ════════════════════════════════════════════════════════════
   ThriveCraft AI — Design System
   ════════════════════════════════════════════════════════════ */

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

/* ── CSS Variables ── */
:root {
  /* Backgrounds */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-card-hover: #263348;
  --bg-surface: #0b1120;

  /* Brand colors — derived from logo + wordmark */
  --cyan: #06b6d4;           /* Logo right facet, primary accent */
  --cyan-light: #22d3ee;     /* Logo branches, highlights */
  --cyan-muted: #155e75;     /* Logo base, deep cyan */
  --silver: #cbd5e1;         /* Logo left facet — light */
  --silver-light: #e2e8f0;   /* Logo left facet — top */
  --silver-dark: #94a3b8;    /* Logo left facet — bottom */
  --teal: #0891b2;           /* Logo right facet — dark cyan */
  --teal-deep: #0d9488;      /* Enterprise accent */
  --green: #22c55e;          /* Education: ping-learn, ThrivTree */
  --green-muted: #10b981;
  --amber: #f59e0b;          /* Premium */

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  /* Borders */
  --border: #334155;
  --border-light: #475569;

  /* Gradients — logo-derived (silver to cyan, no blue) */
  --gradient-brand: linear-gradient(135deg, #cbd5e1, #06b6d4);
  --gradient-hero: linear-gradient(180deg, #0f172a 0%, #0b1120 100%);

  /* Spacing */
  --section-pad: clamp(60px, 8vw, 120px);
  --container: 1200px;

  /* Radius */
  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 8px;

  /* Shadows */
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 40px -10px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(6,182,212,0.15);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 0.3s var(--ease);
}

/* ── Base ── */
html { scroll-behavior: smooth; font-size: 16px; }

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

a { color: var(--cyan); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--cyan-light); }
img { max-width: 100%; display: block; }

/* ── Typography ── */
h1, h2, h3, h4, h5 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2.5rem, 6vw, 4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

.font-display { font-family: 'Syne', sans-serif; }
.font-serif { font-family: 'Bodoni Moda', 'Didot', Georgia, serif; }
.font-mono { font-family: 'Space Grotesk', monospace; }
.font-brand { font-family: 'Unbounded', sans-serif; }

/* ── Layout ── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

.section {
  padding: var(--section-pad) 0;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.75rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 640px;
  line-height: 1.7;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: #fff;
  box-shadow: 0 4px 15px rgba(6,182,212,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(6,182,212,0.4);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(6,182,212,0.05);
}

.btn-ghost {
  background: transparent;
  color: var(--cyan);
  padding: 8px 0;
}
.btn-ghost:hover { color: var(--cyan-light); }
.btn-ghost::after { content: ' →'; }

.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* Color-variant buttons */
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: #0f766e; color: #fff; }
.btn-blue, .btn-teal-dev { background: var(--teal); color: #fff; }
.btn-blue:hover, .btn-teal-dev:hover { background: var(--cyan-muted); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #16a34a; color: #fff; }
.btn-purple { background: var(--purple); color: #fff; }
.btn-purple:hover { background: #9333ea; color: #fff; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
}
.card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-accent-teal { border-top: 3px solid var(--teal); }
.card-accent-blue { border-top: 3px solid var(--teal); }
.card-accent-green { border-top: 3px solid var(--green); }
.card-accent-purple { border-top: 3px solid var(--purple); }
.card-accent-cyan { border-top: 3px solid var(--cyan); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-cyan { background: rgba(6,182,212,0.15); color: var(--cyan-light); }
.badge-teal { background: rgba(13,148,136,0.15); color: var(--teal); }
.badge-blue { background: rgba(8,145,178,0.15); color: var(--cyan-light); }
.badge-green { background: rgba(34,197,94,0.15); color: var(--green); }
.badge-purple { background: rgba(168,85,247,0.15); color: var(--purple); }
.badge-amber { background: rgba(245,158,11,0.15); color: var(--amber); }

/* Status badges */
.badge-live { background: rgba(34,197,94,0.15); color: var(--green); }
.badge-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.badge-beta { background: rgba(168,85,247,0.15); color: var(--purple); }
.badge-coming { background: rgba(245,158,11,0.15); color: var(--amber); }
.badge-oss { background: rgba(8,145,178,0.15); color: var(--cyan-light); }

/* ── Stats ── */
.stats-row {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.stat {
  text-align: center;
}
.stat-value {
  font-size: 2rem;
  font-weight: 800;
  font-family: 'Syne', sans-serif;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow-x: auto;
}
.tab {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
  white-space: nowrap;
  border: none;
  background: transparent;
}
.tab:hover { color: var(--text-primary); }
.tab.active {
  background: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow);
}

/* ── Tab Panels ── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Pricing ── */
.price {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: 'Syne', sans-serif;
}
.price-period {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}
.price-currency {
  font-size: 1rem;
  vertical-align: super;
  color: var(--text-secondary);
}

/* ── Feature list ── */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.feature-list li::before {
  content: '✓';
  color: var(--cyan);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Navigation ── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  transition: all var(--transition);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}
.nav-logo:hover { color: var(--text-primary); }

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

.nav-link {
  position: relative;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-dropdown-trigger::after {
  content: '';
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform var(--transition);
}
.nav-dropdown:hover .nav-dropdown-trigger::after {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 480px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s var(--ease);
  pointer-events: none;
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.dropdown-item:hover {
  background: rgba(6,182,212,0.05);
}
.dropdown-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.dropdown-item-text h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.dropdown-item-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg-primary);
  padding: 80px 24px 24px;
  overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu-link {
  display: block;
  padding: 14px 16px;
  font-size: 1.1rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}
.mobile-menu-link:hover { background: var(--bg-secondary); color: var(--text-primary); }
.mobile-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}
.mobile-menu-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 8px 16px 4px;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta-desktop { display: none !important; }
}

/* ── Footer ── */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 280px;
  line-height: 1.6;
}

.footer-col h5 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.82rem;
}
.footer-social {
  display: flex;
  gap: 16px;
}
.footer-social a {
  color: var(--text-muted);
  font-size: 1.1rem;
}
.footer-social a:hover { color: var(--cyan); }

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ── Utilities ── */
.text-center { text-align: center; }
.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-6 { margin-top: 48px; }
.mb-2 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 32px; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 32px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.inline-flex { display: inline-flex; }
.hidden { display: none; }

/* Page content offset for fixed nav */
.page-content {
  padding-top: 72px;
}

/* ── Hero Slideshow (Book Page-Turn) ── */
.hero-slideshow {
  padding-top: clamp(80px, 12vw, 140px);
  padding-bottom: var(--section-pad);
  background: var(--gradient-hero);
  overflow: hidden;
}

.book {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  perspective: 1500px;
  perspective-origin: left center;
}

.pages-stack {
  position: relative;
  width: 100%;
  min-height: 420px;
  transform-style: preserve-3d;
}

.page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 1.4s cubic-bezier(0.645, 0.045, 0.355, 1.0),
              opacity 0.3s ease;
  will-change: transform;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 5vw, 60px);
}

.page.turning {
  transform: rotateY(-180deg);
  pointer-events: none;
}

/* Stacking order: page-1 on top */
.page-1 { z-index: 5; }
.page-2 { z-index: 4; }
.page-3 { z-index: 3; }
.page-4 { z-index: 2; }
.page-5 { z-index: 1; }

/* Page edge shadow during flip */
.page.turning::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 100%;
  background: linear-gradient(to left, rgba(0,0,0,0.3), transparent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  pointer-events: none;
}

/* Slide content layout */
.slide-content {
  text-align: center;
  width: 100%;
  max-width: 720px;
}

.slide-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.slide-content h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  margin-bottom: 16px;
}

.slide-content p {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 1.5vw, 1.125rem);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
}

/* Products mini-grid on slide 2 */
.slide-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 24px;
  width: 100%;
}

.slide-product-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  transition: border-color var(--transition);
}

.slide-product-card:hover {
  border-color: var(--cyan);
}

.slide-product-card .icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.slide-product-card h4 {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.slide-product-card p {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin: 0;
}

/* Differentiators pillars on slide 3 */
.slide-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
  width: 100%;
}

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

.slide-pillar .pillar-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.slide-pillar h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.slide-pillar p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Stats on slide 4 */
.slide-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.slide-stat .stat-value {
  font-size: clamp(2rem, 4vw, 3rem);
}

/* Progress dots */
.slideshow-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.slideshow-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--silver-dark);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}

.slideshow-dot:hover {
  background: var(--silver);
}

.slideshow-dot.active {
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
  transform: scale(1.2);
}

/* Slide number indicator */
.slide-number {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Mobile: crossfade instead of 3D flip */
@media (max-width: 767px) {
  .pages-stack {
    min-height: 480px;
    transform-style: flat;
  }

  .page {
    transform-style: flat;
    transition: opacity 0.6s ease;
    transform: none !important;
    opacity: 0;
    pointer-events: none;
  }

  .page.active-slide {
    opacity: 1;
    pointer-events: auto;
  }

  .page.turning {
    transform: none !important;
    opacity: 0;
  }

  .slide-pillars {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

  .slide-stats {
    gap: 20px;
  }
}

/* Reduced motion: no 3D, just crossfade */
@media (prefers-reduced-motion: reduce) {
  .page {
    transition: opacity 0.4s ease !important;
    transform: none !important;
  }

  .page.turning {
    opacity: 0;
    transform: none !important;
  }

  .page.active-slide {
    opacity: 1;
  }

  .page.turning::after {
    display: none;
  }
}

/* ── Cinematic Logo Intro ── */
#introOverlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #050a18;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#introStarfield {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#introLogoWrap {
  position: relative;
  z-index: 1;
  width: clamp(160px, 25vw, 240px);
  height: clamp(160px, 25vw, 240px);
  display: flex;
  align-items: center;
  justify-content: center;
}

#introLogo {
  width: 100%;
  height: 100%;
}

/* Start: halves offset to sides */
#introLeft {
  transform: translateX(-120px);
  transition: transform 1s ease;
}
#introRight {
  transform: translateX(120px);
  transition: transform 1s ease;
}

/* Glow effect on merge */
#introGlow {
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6,182,212,0.15) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
}
#introGlow.pulse {
  animation: introGlowPulse 0.8s ease-out forwards;
}
@keyframes introGlowPulse {
  0% { opacity: 0; transform: scale(0.5); }
  30% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.5); }
}

/* Engine glow (rocket exhaust) */
#introEngine {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 0;
  background: linear-gradient(to bottom, #06b6d4, #0891b2, transparent);
  border-radius: 0 0 50% 50%;
  opacity: 0;
  filter: blur(4px);
  transition: height 0.5s ease, opacity 0.5s ease;
}
#introEngine.firing {
  height: 80px;
  opacity: 0.8;
  animation: introEnginePulse 0.15s ease-in-out infinite alternate;
}
#introEngine.fading {
  height: 0;
  opacity: 0;
  transition: height 0.8s ease, opacity 0.8s ease;
}
@keyframes introEnginePulse {
  0% { height: 70px; opacity: 0.6; }
  100% { height: 90px; opacity: 0.9; }
}

/* Wordmark container */
#introWordmark {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 0;
  margin-top: 16px;
  opacity: 0;
  white-space: nowrap;
}

/* Individual letters */
.iw-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.iw-thrive {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: #e2e8f0;
  letter-spacing: 0.15em;
}

.iw-craft {
  font-family: 'Bodoni Moda', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  color: #06b6d4;
}

.iw-space {
  width: 0.3em;
  display: inline-block;
}

#introAiBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  color: #06b6d4;
  border: 1.5px solid rgba(6,182,212,0.5);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 6px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  top: -0.8em;
}

/* Skip intro on reduced motion */
@media (prefers-reduced-motion: reduce) {
  #introOverlay { display: none; }
}

/* ── Scroll animations ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Fallback: if JS hasn't run after 1.5s, show everything */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
