/* ==========================================================================
   Neural Network Canvas Landing Page - Story-Driven Design
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --gradient-hero: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(236, 72, 153, 0.1) 50%, rgba(139, 92, 246, 0.15) 100%);
  --glow-primary: 0 0 60px rgba(99, 102, 241, 0.4);
  --glow-secondary: 0 0 40px rgba(236, 72, 153, 0.3);
  --timing-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --timing-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   Interactive Weight Tracker (Mouse Follower)
   ========================================================================== */

.weight-tracker {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--accent-primary, #6366f1);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-weight: 600;
  transform: translate(15px, 15px);
  opacity: 0;
  transition: opacity 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 20px rgba(99, 102, 241, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.weight-tracker.visible {
  opacity: 1;
}

@media (max-width: 768px) {
  .weight-tracker {
    display: none;
  }

  .loss-counter {
    bottom: 10px;
    right: 10px;
    padding: 8px 12px;
    font-size: 0.75rem;
    border-radius: 8px;
  }

  .loss-counter .loss-value {
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   Global Loss Counter (Fixed Bottom-Right)
   ========================================================================== */

.loss-counter {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(239, 68, 68, 0.5);
  padding: 12px 16px;
  border-radius: 10px;
  z-index: 100;
  font-size: 0.85rem;
  color: #ef4444;
  transition: color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 8px;
}

.loss-counter .loss-label {
  color: #ffffff;
  font-weight: 500;
}

.loss-counter .loss-value {
  font-weight: 700;
  font-size: 1rem;
}

.loss-counter.optimized {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 20px rgba(34, 197, 94, 0.2);
}

.loss-counter.optimized .loss-value {
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}


/* ==========================================================================
   Typing Effect (Footer)
   ========================================================================== */

.typing-container {
  margin-top: 1.5rem;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.9rem;
  color: var(--accent-primary, #6366f1);
  min-height: 1.5em;
}

#typing-text {
  color: var(--accent-primary, #6366f1);
}

.typing-cursor {
  color: var(--accent-primary, #6366f1);
  animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

.landing-container {
  width: 100%;
  position: relative;
}

/* ==========================================================================
   Shared Base Styles (Used by Login, Courses, Dashboard, Course-Detail pages)
   ========================================================================== */

/* Hero Section - Base styles for all pages */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(2rem, 5vh, 4rem) clamp(1rem, 4vw, 3rem);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.main-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 auto;
}

/* Start/Action Button - Shared CTA style */
.start-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.3);
  transition: all 0.3s var(--timing-smooth);
  position: relative;
  overflow: hidden;
}

.start-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.start-button:hover::before {
  left: 100%;
}

.start-button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 60px rgba(99, 102, 241, 0.4), 0 10px 30px rgba(0, 0, 0, 0.15);
}

.start-button .arrow {
  transition: transform 0.3s ease;
}

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

/* Hero Metrics - Used by Course Detail page */
.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.metric-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 20px;
  padding: 1.25rem 2rem;
  text-align: center;
  min-width: 140px;
  transition: all 0.3s ease;
}

.metric-card:hover {
  border-color: var(--border-secondary);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.metric-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 0.5rem 0;
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 0.25rem 0;
}

.metric-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   Landing Page Specific Styles
   ========================================================================== */

/* Landing page uses the standard hero-section but needs different padding */
.hero-section.landing-page {
  min-height: auto;
  padding: 0;
}

/* ==========================================================================
   Hero Section - Full Screen Neural Network (Landing Page Specific)
   ========================================================================== */

.hero-fullscreen {
  position: relative;
  height: calc(100vh - 80px);
  height: calc(100dvh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-primary);
}

#heroNeuralCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.2;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-text-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Hero Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  animation: fadeSlideUp 0.8s var(--timing-smooth) both;
  animation-delay: 0.2s;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

/* Hero Headlines */
.hero-headline {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  animation: fadeSlideUp 0.8s var(--timing-smooth) both;
  animation-delay: 0.4s;
}

.hero-headline .line-1 {
  display: block;
  color: var(--text-primary);
}

.hero-headline .line-2 {
  display: block;
  background: linear-gradient(135deg, #6366f1 0%, #ec4899 50%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Rotating Line Animation */
.line-2-container {
  position: relative;
  display: block;
  height: 1.25em;
}

.hero-headline .line-2 {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: linear-gradient(135deg, #6366f1 0%, #ec4899 50%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-headline .line-2.active {
  opacity: 1;
}

.hero-headline .line-2.exit {
  opacity: 0;
}

.hero-headline .line-2 strong {
  color: var(--text-primary);
  -webkit-text-fill-color: var(--text-primary);
  font-weight: 800;
}

.hero-subtext {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 550px;
  margin-bottom: 2rem;
  animation: fadeSlideUp 0.8s var(--timing-smooth) both;
  animation-delay: 0.6s;
}

.hero-subtext strong {
  color: var(--text-primary);
}

/* CTA Buttons */
.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 0.5rem;
  animation: fadeSlideUp 0.8s var(--timing-smooth) both;
  animation-delay: 0.8s;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--glow-primary);
  transition: all 0.3s var(--timing-smooth);
  position: relative;
  overflow: hidden;
}

.cta-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.cta-primary:hover::before {
  left: 100%;
}

.cta-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 80px rgba(99, 102, 241, 0.5), 0 10px 40px rgba(0, 0, 0, 0.2);
}

.cta-primary svg {
  transition: transform 0.3s ease;
}

.cta-primary:hover svg {
  transform: translateX(4px);
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  border: 2px solid var(--border-secondary);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s var(--timing-smooth);
}

.cta-secondary:hover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
}

.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: rgba(99, 102, 241, 0.4);
  border-radius: 50%;
  font-size: 0.7rem;
  padding-left: 4px;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: fadeIn 1s var(--timing-smooth) both;
  animation-delay: 1.2s;
}

.scroll-indicator span {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mouse {
  width: 26px;
  height: 40px;
  border: 2px solid var(--border-secondary);
  border-radius: 20px;
  position: relative;
}

.wheel {
  width: 4px;
  height: 8px;
  background: var(--text-secondary);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 2s infinite;
}

@keyframes scroll-wheel {

  0%,
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  50% {
    opacity: 0.3;
    transform: translateX(-50%) translateY(10px);
  }
}

/* ==========================================================================
   Story Sections - Shared Styles
   ========================================================================== */

.story-section {
  padding: clamp(4rem, 10vh, 8rem) clamp(1.5rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  /* Horizontal padding for mobile safety */
  box-sizing: border-box;
  overflow: hidden;
  /* Prevent any child from extending outside */
}

.story-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
}

.story-badge.highlight {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.2));
  border-color: rgba(236, 72, 153, 0.3);
}

.story-headline {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

.highlight-strike {
  position: relative;
  color: rgba(239, 68, 68, 0.9);
}

.highlight-strike::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 3px;
  background: rgba(239, 68, 68, 0.6);
  transform: rotate(-2deg);
}

.highlight-glow {
  background: linear-gradient(135deg, #6366f1, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
}

.highlight-underline {
  position: relative;
  color: var(--accent-primary);
}

.highlight-underline::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #6366f1, #ec4899);
  border-radius: 2px;
}

.highlight-start {
  color: var(--text-muted);
  font-size: 0.85em;
}

.highlight-end {
  background: linear-gradient(135deg, #10b981, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================================================
   Problem Section
   ========================================================================== */

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

.problem-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.problem-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.4s var(--timing-smooth);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeSlideUp 0.6s var(--timing-smooth) forwards;
  display: flex;
  flex-direction: column;
}

.problem-card[data-delay="0"] {
  animation-delay: 0.1s;
}

.problem-card[data-delay="1"] {
  animation-delay: 0.2s;
}

.problem-card[data-delay="2"] {
  animation-delay: 0.3s;
}

.problem-card:hover {
  transform: translateY(-5px);
  border-color: rgba(239, 68, 68, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.problem-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.problem-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.problem-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-style: italic;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.problem-result {
  padding-top: 1rem;
  border-top: 1px solid var(--border-primary);
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(239, 68, 68, 0.8);
  margin-top: auto;
}

.story-transition {
  text-align: center;
  font-size: 1.3rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Code Bridge Section
   ========================================================================== */

.code-bridge-section {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-primary);
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

/* Background Glow for the section */
.code-bridge-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.split-layout {
  display: grid;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
  /* Ensure grid itself respects width */
}

/* Fix for Grid Items refusing to shrink */
.split-layout>* {
  min-width: 0;
}




.bridge-text .story-headline {
  font-size: clamp(2rem, 3.5vw, 3rem);
  text-align: left;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.highlight-code {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'SF Mono', 'Fira Code', monospace;
  position: relative;
  display: inline-block;
}

/* Subtle underline for the highlighted text */
.highlight-code::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #10b981, transparent);
  border-radius: 2px;
  opacity: 0.5;
}

.bridge-description {
  color: var(--text-secondary);
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
  max-width: 500px;
  line-height: 1.7;
}

.bridge-tags {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.bridge-tag {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 0.6rem 1.2rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.3s ease;
}

.bridge-tag:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.bridge-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.6);
  /* Light glass */
  /* Glassmorphism base */
  padding: 2rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* The glowing connection line behind everything */
.bridge-visual::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg,
      rgba(99, 102, 241, 0) 0%,
      rgba(99, 102, 241, 0.3) 50%,
      /* lighter opacity */
      rgba(99, 102, 241, 0) 100%);
  z-index: 0;
}

.visual-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
  /* Dark text for light glass */
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 2;
  position: relative;
}

.node-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: conic-gradient(from 180deg at 50% 50%, #6366f1 0deg, #ec4899 180deg, #6366f1 360deg);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
  position: relative;
  animation: spin-slow 10s linear infinite;
}

.node-circle::after {
  content: '';
  position: absolute;
  inset: 4px;
  /* Inner circle */
  background: #fff;
  /* White center for light theme */
  border-radius: 50%;
  z-index: 1;
}

/* Arrow Animation */
.visual-arrow {
  color: var(--accent-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0 1.5rem;
  z-index: 2;
  opacity: 0.8;
  animation: pulse-arrow 2s infinite;
}

@keyframes pulse-arrow {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
    text-shadow: 0 0 10px var(--accent-primary);
  }
}

.visual-arrow i {
  font-size: 1.5rem;
}

/* Window / Code Card */
.code-snippet-card {
  background: #0f172a;
  /* Slate 900 */
  border-radius: 12px;
  /* Removed min-width: 320px to allow shrinking on mobile */
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
  z-index: 2;
  overflow: hidden;
  transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
  transition: transform 0.4s ease;
}

.code-snippet-card:hover {
  transform: perspective(1000px) rotateY(0) rotateX(0);
}

.window-header {
  background: #1e293b;
  /* Slate 800 */
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.window-controls {
  display: flex;
  gap: 8px;
}

.window-controls span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.window-controls span:nth-child(1) {
  background: #ff5f56;
}

/* Mac Red */
.window-controls span:nth-child(2) {
  background: #ffbd2e;
}

/* Mac Yellow */
.window-controls span:nth-child(3) {
  background: #27c93f;
}

/* Mac Green */

.window-title {
  flex: 1;
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  margin-right: 20px;
  /* Balance the controls width roughly */
}

.code-content {
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
}

.line-numbers {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  /* Match line-height of code */
  color: #475569;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.95rem;
  user-select: none;
  text-align: right;
  min-width: 1.5rem;
  line-height: 1.6;
}

.code-snippet-card pre {
  margin: 0;
  color: #e2e8f0;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Syntax Highlighting Colors */
.kwd {
  color: #c084fc;
  font-weight: bold;
}

/* Purple (Keywords) */
.func {
  color: #60a5fa;
}

/* Blue (Functions) */
.cls {
  color: #fbbf24;
}

/* Amber (Classes) */
.str {
  color: #a3e635;
}

/* Lime (Strings) */
.num {
  color: #f472b6;
}

/* Pink (Numbers) */
.op {
  color: #ff79c6;
}

/* Variable Highlighting */
.var {
  color: #e2e8f0;
}

/* Responsive adjustments for Code Bridge */
@media (max-width: 960px) {
  /* No changes needed for .split-layout here since we handle it globally or default */
}

@media (max-width: 768px) {
  .split-layout {
    padding: 0
  }

  .code-bridge-section {
    padding: 3rem 1rem;
    /* Adjust padding nicely */
  }

  .bridge-visual {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 1rem;
    width: 100%;
    /* Ensure it doesn't overflow container */
    box-sizing: border-box;
  }

  /* Rotate the visual flow for vertical layout */
  .visual-arrow {
    transform: rotate(90deg);
    margin: 0.5rem 0;
    animation: none;
  }

  .visual-arrow i {
    transform: none;
    /* Point down */
  }

  /* Fix Arrow Label Rotation */
  .visual-arrow .arrow-label {
    transform: rotate(-90deg);
    display: inline-block;
    white-space: nowrap;
    /* Prevent breaking */
    margin-bottom: 5px;
    font-size: 0.7rem;
  }

  .visual-node {
    flex-direction: column;
  }

  .code-snippet-card {
    min-width: 0;
    width: 100%;
    transform: none;
    margin-top: 1rem;
    max-width: 100%;
    overflow: hidden;
    /* Clip anything that tries to overflow */
    box-sizing: border-box;
  }

  .code-content {
    padding: 1rem;
    /* Reduce padding on mobile */
    gap: 0.5rem;
    min-width: 0;
    /* Allow shrinking */
    overflow: hidden;
    /* Clip overflow */
    width: 100%;
    box-sizing: border-box;
  }

  .code-snippet-card pre {
    overflow-x: auto;
    /* Enable scrolling for long code */
    white-space: pre;
    /* Keep code formatting */
    font-size: 0.75rem;
    /* Even smaller for mobile */
    min-width: 0;
    /* CRITICAL: Allow flex item to shrink below content width */
    flex: 1;
    max-width: 100%;
  }

  .code-snippet-card code {
    display: block;
    min-width: 0;
  }

  .code-snippet-card:hover {
    transform: none;
  }

  .bridge-tags {
    justify-content: center;
  }

  /* Ensure the headline wraps properly */
  .bridge-text .story-headline {
    text-align: center;
    font-size: 1.75rem;
    line-height: 1.3;
    padding: 0;
    width: 100%;
    overflow-wrap: break-word;
    /* Standard property */
    word-wrap: break-word;
    /* Legacy support */
    hyphens: auto;
    /* Allow hyphenation */
  }

  /* Allow the highlighted span to break naturally */
  .highlight-code {
    display: inline;
    /* Changed from inline-block to allow wrapping */
    white-space: normal;
  }

  /* Fix underline for inline display if needed, or hide it on mobile if it breaks */
  .highlight-code::after {
    display: none;
    /* Simplify on mobile to avoid broken underlines across lines */
  }

  .bridge-description {
    text-align: center;
    margin: 0 auto 2rem auto;
    font-size: 1rem;
    padding: 0 10px;
  }
}


/* Variable */


/* ==========================================================================
   Pricing Section
   ========================================================================== */

.pricing-section {
  background: var(--bg-primary);
}

.pricing-cards {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 3rem;
}

.pricing-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 24px;
  padding: 2.5rem;
  width: 100%;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s var(--timing-smooth);
  position: relative;
}

.pricing-card.featured {
  border-color: var(--accent-primary);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.15);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.05) 0%, var(--bg-secondary) 100%);
}

.popular-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-primary);
  color: white;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

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

.card-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-primary);
}

.card-header h3 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.price {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  line-height: 1;
}

.currency {
  font-size: 1.5rem;
  margin-top: 5px;
  color: var(--text-secondary);
}

.period {
  font-size: 1rem;
  color: var(--text-secondary);
  align-self: flex-end;
  margin-bottom: 5px;
  font-weight: 400;
}

.sub-price {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #10b981;
  font-weight: 500;
}

.card-features ul {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
}

.card-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.card-features li i {
  color: var(--accent-primary);
}

.full-width {
  width: 100%;
  justify-content: center;
}

/* ==========================================================================
   Footer Code Line
   ========================================================================== */

.code-footer {
  margin-top: 2rem;
  text-align: center;
}

.code-line {
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--accent-primary);
  font-size: 1rem;
  opacity: 0.8;
}

.story-transition strong {
  color: var(--text-primary);
}

/* ==========================================================================
   Solution Section - Live Demo
   ========================================================================== */

.solution-section {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.demo-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .demo-container {
    grid-template-columns: 2fr 1fr;
    align-items: center;
  }
}

.demo-canvas-wrapper {
  position: relative;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

#demoCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.demo-overlay {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.demo-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-primary);
}

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

.demo-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-group label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.control-group input[type="range"] {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  outline: none;
  appearance: none;
  cursor: pointer;
}

.control-group input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
  transition: transform 0.2s ease;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.control-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'SF Mono', 'Consolas', monospace;
}

.demo-output {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}

.output-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.output-value {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'SF Mono', 'Consolas', monospace;
}

.revelation-text {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.revelation-text strong {
  color: var(--text-primary);
  font-size: 1.4rem;
}

.revelation-text em {
  color: var(--accent-primary);
  font-style: normal;
}

/* ==========================================================================
   Method Section
   ========================================================================== */

.method-section {
  background: var(--bg-primary);
}

/* Interactive Method Experience */
.method-interactive {
  max-width: 800px;
  margin: 0 auto;
}

.method-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
}

.method-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border-primary);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s var(--timing-smooth);
  position: relative;
}

.method-step:hover {
  border-color: var(--accent-primary);
}

.method-step.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.method-step.completed {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
}

.method-step.completed .step-number {
  background: #22c55e;
}

.step-number {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.method-step.active .step-number {
  background: var(--accent-primary);
  color: white;
}

.step-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.method-step.active .step-title {
  color: var(--text-primary);
}

.step-connector {
  width: 40px;
  height: 2px;
  background: var(--border-primary);
  transition: background 0.3s ease;
}

.step-connector.active {
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

/* Canvas Container */
.method-canvas-container {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

#methodCanvas {
  width: 100%;
  height: 350px;
  display: block;
}

/* Step Controls (Outside Canvas) */
.method-step-controls {
  min-height: 220px;
}

.step-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 20px;
  transition: opacity 0.3s ease, transform 0.3s ease;
  height: 250px;
}

.step-panel.hidden {
  display: none;
}

.step-description {
  color: var(--text-secondary);
  font-size: 1rem;
  text-align: center;
  margin: 0;
}

/* Method Controls */
.method-controls {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.method-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.method-control label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.method-control input[type="range"] {
  width: 150px;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-tertiary);
  appearance: none;
  cursor: pointer;
}

.output-control {
  padding: 0.75rem 1.25rem;
  background: var(--bg-tertiary);
  border-radius: 12px;
}

.output-control .output-value {
  font-size: 1.5rem;
}

.method-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.5);
}

.control-val {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-primary);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Next/Action Buttons */
.method-next-btn,
.method-restart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.method-next-btn:hover,
.method-restart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.method-restart-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
}

.method-restart-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Aha Moment Content */
.step-panel[data-step="3"] {
  text-align: center;
}

@keyframes aha-glow {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
  }

  50% {
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.7);
  }
}

.aha-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.aha-explanation {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.aha-explanation strong {
  color: var(--accent-primary);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Output Value */
.output-value {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Legacy styles for backwards compatibility */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.method-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 24px;
  padding: 2rem;
  text-align: center;
  transition: all 0.4s var(--timing-smooth);
  position: relative;
  overflow: hidden;
}

.method-number {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
}

.method-visual {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.neuron-pulse {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, #6366f1, #8b5cf6);
  border-radius: 50%;
  animation: neuron-pulse 2s ease-in-out infinite;
}

@keyframes neuron-pulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
  }

  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 20px rgba(99, 102, 241, 0);
  }
}

.slider-demo {
  width: 60px;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  position: relative;
}

.slider-demo::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  border-radius: 50%;
  animation: slider-move 2s ease-in-out infinite;
}

@keyframes slider-move {

  0%,
  100% {
    left: 0;
  }

  50% {
    left: calc(100% - 20px);
  }
}

.aha-moment {
  width: 60px;
  height: 60px;
  position: relative;
}

.aha-moment::before {
  content: '💡';
  font-size: 2.5rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: aha-glow 2s ease-in-out infinite;
}

@keyframes aha-glow {

  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.5) drop-shadow(0 0 10px rgba(255, 200, 0, 0.5));
  }
}

.method-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.method-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.method-card p em {
  color: var(--text-primary);
  font-style: normal;
  font-weight: 600;
}

/* ==========================================================================
   Journey Section - Timeline
   ========================================================================== */

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

.journey-timeline {
  position: relative;
  padding-left: 60px;
}

.timeline-line {
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #6366f1 0%, #ec4899 50%, #10b981 100%);
}

.journey-stop {
  position: relative;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
}

.journey-stop:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}


.stop-marker {
  position: absolute;
  left: -50px;
  top: 0;
  width: 44px;
  height: 44px;
  background: var(--bg-tertiary);
  border: 2px solid #6366f1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.3s var(--timing-smooth);
  box-shadow: 0 0 0 4px var(--bg-primary);
}

.journey-stop:hover .stop-marker {
  transform: scale(1.15);
  background: #6366f1;
  box-shadow: 0 0 0 4px var(--bg-primary), 0 0 20px rgba(99, 102, 241, 0.4);
  border-color: #6366f1;
}

.journey-stop:hover .marker-inner {
  color: #ffffff;
}

.stop-marker.graduation {
  background: linear-gradient(135deg, #10b981, #6366f1);
  border-color: transparent;
}

.marker-inner {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.stop-marker.graduation .marker-inner {
  color: white;
  font-size: 1.1rem;
}

.stop-content {
  transition: transform 0.3s ease;
}

.journey-stop:hover .stop-content {
  transform: translateX(8px);
}

.stop-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.journey-stop:hover .stop-content h3 {
  color: var(--accent-primary);
}

.stop-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.6;
}

.stop-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stop-tags span {
  padding: 0.4rem 0.85rem;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.journey-stop:hover .stop-tags span {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--text-primary);
}

.final-stop .stop-content h3 {
  background: linear-gradient(135deg, #10b981, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================================================
   Social Proof Section
   ========================================================================== */

.proof-section {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  text-align: center;
}

.proof-stats {
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 6vw, 5rem);
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

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

.stat-number {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-suffix {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-left: 0.1em;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.testimonial-carousel {
  max-width: 700px;
  margin: 0 auto 2rem;
  position: relative;
  min-height: 200px;
}

.testimonial {
  opacity: 0;
  transform: translateX(20px);
  position: absolute;
  width: 100%;
  transition: all 0.5s var(--timing-smooth);
  pointer-events: none;
}

.testimonial.active {
  opacity: 1;
  transform: translateX(0);
  position: relative;
  pointer-events: auto;
}

.testimonial blockquote {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.testimonial blockquote em {
  color: var(--text-primary);
  font-style: normal;
  font-weight: 600;
}

.testimonial cite {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-style: normal;
}

.avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
}

.cite-info {
  text-align: left;
}

.cite-info strong {
  display: block;
  color: var(--text-primary);
  font-size: 1rem;
}

.cite-info span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-secondary);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--accent-primary);
  transform: scale(1.2);
}

.dot:hover {
  background: var(--accent-secondary);
}

/* ==========================================================================
   Final CTA Section
   ========================================================================== */

.final-cta-section {
  background: var(--bg-primary);
  text-align: center;
  position: relative;
  padding: clamp(6rem, 15vh, 10rem) clamp(1.5rem, 5vw, 4rem);
}

.cta-neural-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.4;
}

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

.final-cta-content {
  position: relative;
  z-index: 2;
}

.final-cta-content h2 {
  margin-bottom: 1.5rem;
}

.cta-small {
  display: block;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.cta-large {
  display: block;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--text-primary);
}

.cta-large em {
  background: linear-gradient(135deg, #6366f1, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: normal;
}

.cta-subtext {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.cta-subtext br {
  display: block;
  margin-bottom: 0.5rem;
}

.cta-free-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.cta-free-label::before,
.cta-free-label::after {
  content: '';
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary));
}

.cta-free-label::after {
  background: linear-gradient(90deg, var(--accent-primary), transparent);
}

.cta-primary.large {
  padding: 1.25rem 2.5rem;
  font-size: 1.2rem;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.cta-primary.large svg {
  transition: transform 0.3s ease;
}

.cta-primary.large:hover svg {
  transform: translateX(4px);
}

.cta-reassurance {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border-primary);
  padding: 3rem clamp(1rem, 4vw, 3rem);
  text-align: center;
  background: var(--bg-secondary);
}

.site-footer>p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
}

.logo-symbol {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 0.9rem;
}

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

.logo-title {
  display: block;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  gap: 2rem;
}

.footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

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

/* Footer Links - Used by other pages */
.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

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

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

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Intersection Observer Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s var(--timing-smooth);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {

  /* Main Content Padding */
  .section-inner {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .hero-text-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .hero-headline {
    padding: 0 0.5rem;
  }

  /* Hero Section */
  .hero-fullscreen {
    height: auto;
    min-height: calc(100vh - 80px);
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

  .hero-headline {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .line-2-container {
    height: 1.3em;
  }

  .hero-subtext {
    font-size: 1rem;
    padding: 0 0.5rem;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    padding: 0 1rem;
  }

  .cta-primary,
  .cta-secondary {
    width: 100%;
    justify-content: center;
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }

  .scroll-indicator {
    bottom: 1rem;
  }

  /* Problem Section */
  .problem-cards,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .problem-card {
    padding: 1.5rem;
  }

  /* Story Sections */
  .story-headline {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  /* Demo Section */
  .demo-container {
    gap: 1.5rem;
  }

  .demo-canvas-wrapper {
    aspect-ratio: 4 / 3;
  }

  .demo-controls {
    padding: 0 0.5rem;
  }

  /* Method Section */
  .method-steps {
    flex-direction: row;
    gap: 0;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .method-step {
    padding: 0.6rem 0.8rem;
    min-width: auto;
    flex-shrink: 0;
  }

  .step-number {
    font-size: 0.6rem;
  }

  .step-connector {
    width: 15px;
    flex-shrink: 0;
  }

  .step-title {
    font-size: 0.7rem;
  }

  #methodCanvas {
    height: 250px;
  }

  .method-controls {
    flex-direction: column;
    gap: 1rem;
  }

  .method-control input[type="range"] {
    width: 100%;
    max-width: 150px;
  }

  .step-panel {
    padding: 1rem;
    height: auto;
    min-height: 200px;
  }

  .method-step-controls {
    min-height: auto;
  }

  .aha-title {
    font-size: 1.1rem;
  }

  /* Journey Section */
  .journey-timeline {
    padding-left: 50px;
  }

  .journey-stop::before {
    left: -50px;
    font-size: 0.6rem;
    width: 40px;
  }

  .stop-marker {
    left: -40px;
    width: 32px;
    height: 32px;
  }

  .stop-content h3 {
    font-size: 1.15rem;
  }

  .stop-content p {
    font-size: 0.9rem;
  }

  .stop-tags {
    gap: 0.4rem;
  }

  .stop-tags span {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }

  .journey-stop:hover .stop-content {
    transform: none;
  }

  /* Final CTA Section */
  .final-cta-section {
    padding: 4rem 1rem;
  }

  .cta-small {
    font-size: 0.9rem;
  }

  .cta-large {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .cta-subtext {
    font-size: 1rem;
  }

  .cta-subtext br {
    display: none;
  }

  .cta-free-label {
    font-size: 0.75rem;
  }

  .cta-primary.large {
    width: 100%;
    justify-content: center;
  }

  .cta-reassurance {
    font-size: 0.75rem;
    flex-direction: column;
    gap: 0.25rem;
  }

  /* Footer */
  .site-footer {
    padding: 2rem 1rem;
  }

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

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

  .footer-nav,
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .typing-container {
    font-size: 0.8rem;
  }

  /* Shared Base Styles - Mobile */
  .hero {
    padding: 1.5rem 1rem;
  }

  .main-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .subtitle {
    font-size: 0.95rem;
  }

  .hero-eyebrow {
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
  }

  .start-button {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  .hero-metrics {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .metric-card {
    width: 100%;
    max-width: 280px;
    padding: 1rem 1.5rem;
  }

  .metric-value {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .section-inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-text-container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .story-section {
    padding: 2.5rem 0.5rem;
  }

  .hero-content {
    padding: 1rem 0;
  }

  .hero-headline {
    font-size: clamp(1.4rem, 6vw, 1.8rem);
    padding: 0 0.25rem;
  }

  .hero-subtext {
    font-size: 0.95rem;
  }

  .story-badge {
    font-size: 0.65rem;
    padding: 0.3rem 0.75rem;
  }

  .story-headline {
    font-size: clamp(1.3rem, 6vw, 1.8rem);
    margin-bottom: 2rem;
  }

  .journey-timeline {
    padding-left: 40px;
  }

  .timeline-line {
    left: 15px;
  }

  .journey-stop::before {
    display: none;
  }

  .stop-marker {
    left: -32px;
    width: 28px;
    height: 28px;
  }

  .marker-inner {
    font-size: 0.75rem;
  }

  .method-step {
    padding: 0.5rem 0.6rem;
  }

  .step-title {
    font-size: 0.65rem;
  }

  .step-connector {
    width: 10px;
  }

  #methodCanvas {
    height: 200px;
  }

  .problem-icon {
    font-size: 2rem;
  }

  .problem-card h3 {
    font-size: 1.1rem;
  }

  .demo-canvas-wrapper {
    aspect-ratio: 1 / 1;
  }

  /* Shared Base Styles - Small Mobile */
  .main-title {
    font-size: clamp(1.3rem, 5vw, 1.6rem);
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .hero-eyebrow {
    font-size: 0.7rem;
  }

  .start-button {
    font-size: 1rem;
    padding: 0.85rem 1.5rem;
  }

  .metric-card {
    padding: 0.85rem 1.25rem;
  }

  .metric-label {
    font-size: 0.7rem;
  }

  .metric-value {
    font-size: 1.35rem;
  }

  .metric-hint {
    font-size: 0.75rem;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-secondary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* ==========================================================================
   Evolution Path (New Journey Section)
   ========================================================================== */

.evolution-path {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-bottom: 2rem;
}

.evolution-card {
  display: flex;
  gap: 2rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: 20px;
  padding: 2rem;
  width: 100%;
  position: relative;
  z-index: 2;
  transition: all 0.4s var(--timing-smooth);
}

.evolution-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.card-visual {
  flex-shrink: 0;
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-icon {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid var(--border-secondary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.evolution-card:hover .visual-icon {
  color: #fff;
  border-color: var(--accent-primary);
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.visual-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(99, 102, 241, 0) 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.evolution-card:hover .visual-glow {
  opacity: 1;
}

.card-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card-content p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-tags span {
  font-size: 0.75rem;
  padding: 0.3rem 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Connectors */
.path-connector {
  width: 2px;
  height: 40px;
  background: var(--border-primary);
  margin-left: -58px;
  /* Align with icon visual center mostly */
  /* This margin logic depends on alignment. Let's fix alignment in mobile/desktop below */
  position: relative;
}

/* Better Layout for Desktop */
@media (min-width: 768px) {
  .evolution-path {
    gap: 0;
    /* Let connectors handle spacing */
  }

  .path-connector {
    margin-left: 0;
    align-self: flex-start;
    margin-left: 51px;
    /* (padding 2rem + visual width/2) approx */
    background: linear-gradient(to bottom, var(--border-primary) 0%, var(--border-primary) 100%);
  }

  /* Make connector 'light up' */
  .evolution-card:hover+.path-connector {
    background: linear-gradient(to bottom, #6366f1 0%, var(--border-primary) 100%);
  }
}

/* Final Card */
.final-evolution {
  border-color: rgba(234, 179, 8, 0.3);
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.05), rgba(0, 0, 0, 0));
}

.final-evolution:hover {
  border-color: rgba(234, 179, 8, 0.8);
  box-shadow: 0 0 50px rgba(234, 179, 8, 0.15);
}

.final-evolution .visual-icon {
  background: linear-gradient(135deg, #422006, #713f12);
  border-color: rgba(234, 179, 8, 0.3);
  color: #fcd34d;
}

.final-evolution:hover .visual-icon {
  background: linear-gradient(135deg, #eab308, #a16207);
  color: #fff;
  border-color: #fef08a;
}

.gold-glow {
  background: radial-gradient(circle, rgba(234, 179, 8, 0.5) 0%, rgba(234, 179, 8, 0) 70%);
}

.tag-gold {
  background: rgba(234, 179, 8, 0.1) !important;
  border-color: rgba(234, 179, 8, 0.3) !important;
  color: #fcd34d !important;
}

/* Highlight Text */
.highlight-fear {
  color: #94a3b8;
  text-decoration: line-through;
  text-decoration-color: rgba(239, 68, 68, 0.6);
  text-decoration-thickness: 3px;
}

.highlight-triumph {
  background: linear-gradient(135deg, #10b981, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .evolution-card {
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    align-items: center;
    text-align: center;
  }

  .card-tags {
    justify-content: center;
  }

  .path-connector {
    margin: 0;
    align-self: center;
    height: 30px;
  }
}