/* ══════════════════════════════════════════
   ULTIMATE RV TRAINER — styles.css
   Canvas image-sequence scrub site
   ══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #050510;
  --text: #E0E4F0;
  --text-dim: #6B7099;
  --accent-cyan: #00D4FF;
  --accent-purple: #7B5CFF;
  --accent-blue: #4A7CFF;
  --accent-teal: #00E5C7;
  --gold: #00D4FF; /* using cyan as the "brass" accent for RV theme */
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: clip;
}

body {
  background: var(--bg);
  overflow-x: clip;
}

/* ── PRELOADER ── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-text {
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 32px;
}

.progress-bar {
  width: 200px;
  height: 1px;
  background: rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: var(--accent-cyan);
  transition: width 0.15s linear;
  box-shadow: 0 0 12px rgba(0,212,255,0.4);
}

.progress-pct {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 16px;
  letter-spacing: 0.15em;
}

/* ── CANVAS ── */
.scene-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ── CHAPTERS ── */
.chapter {
  position: relative;
  height: 300vh;
  z-index: 1;
}

.chapter-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* ── IDEOGRAM CHAPTER ── */

/* Dark vignette behind ideogram */
#ideogram .chapter-sticky::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, rgba(5,5,16,0.7) 0%, rgba(5,5,16,0.3) 40%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.stage-label {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: clamp(0.8rem, 2vw, 1.1rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  opacity: 0;
  transition: opacity 1.2s ease;
  white-space: nowrap;
  text-shadow: 0 0 30px rgba(0,0,0,1), 0 0 60px rgba(0,0,0,0.8);
  z-index: 1;
}

.stage-label.visible {
  opacity: 1;
}

.ideogram-desc {
  position: absolute;
  top: 32%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 600;
  font-style: italic;
  color: #fff;
  opacity: 0;
  transition: opacity 1.2s ease;
  text-align: center;
  max-width: 500px;
  padding: 0 24px;
  line-height: 1.6;
  text-shadow: 0 0 40px rgba(0,0,0,1), 0 2px 80px rgba(0,0,0,0.9), 0 0 120px rgba(0,0,0,0.5);
  z-index: 1;
}

.ideogram-desc.visible {
  opacity: 1;
}

.coordinates {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0;
}

.coord-digit {
  font-family: var(--mono);
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  font-weight: 500;
  color: var(--accent-cyan);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  padding: 0 0.08em;
  text-shadow: 0 0 20px rgba(0,212,255,0.4), 0 0 40px rgba(0,0,0,0.9);
}

.coord-digit.visible {
  opacity: 1;
  transform: translateY(0);
}

.coord-space {
  width: 0.6em;
}

/* ── HERO TEXT ── */

/* Dark vignette behind hero text for readability */
#hero .chapter-sticky::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(5,5,16,0.75) 0%, rgba(5,5,16,0.3) 55%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.hero-overline {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  opacity: 0;
  transition: opacity 1.2s ease, letter-spacing 1.2s ease;
  white-space: nowrap;
  text-shadow: 0 0 20px rgba(0,0,0,0.9), 0 0 50px rgba(0,0,0,0.8);
  z-index: 1;
}

.hero-overline.visible {
  opacity: 1;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0;
  transition: opacity 1.5s ease, letter-spacing 1.5s ease;
  text-align: center;
  line-height: 1;
  text-shadow: 0 0 40px rgba(0,0,0,1), 0 2px 80px rgba(0,0,0,0.9), 0 0 120px rgba(0,0,0,0.5);
  z-index: 1;
}

.hero-title.visible {
  opacity: 1;
  letter-spacing: 0.25em;
}

/* ── MANIFESTO ── */

/* Dark vignette behind manifesto text */
#manifesto .chapter-sticky::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(5,5,16,0.8) 0%, rgba(5,5,16,0.4) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.manifesto-lines {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
  padding: 0 24px;
}

.manifesto-line {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
  max-width: 700px;
  line-height: 1.5;
  text-shadow: 0 0 40px rgba(0,0,0,1), 0 2px 80px rgba(0,0,0,0.9), 0 0 120px rgba(0,0,0,0.5);
}

.manifesto-line.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── EXPANSION CALLOUTS ── */
.callout {
  position: absolute;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.callout.visible { opacity: 1; }

.callout-label {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  white-space: nowrap;
  text-shadow: 0 0 20px rgba(0,0,0,1);
}

.callout-detail {
  font-family: var(--serif);
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 2px;
  text-shadow: 0 0 20px rgba(0,0,0,1);
}

.callout-line {
  position: absolute;
  background: var(--accent-cyan);
  opacity: 0.3;
}

.callout-line-h {
  height: 1px;
  width: 60px;
}

.callout-line-v {
  width: 1px;
  height: 40px;
}

/* Callout positions */
.callout-1 { top: 20%; left: 8%; }
.callout-2 { top: 18%; right: 8%; text-align: right; }
.callout-3 { bottom: 28%; left: 10%; }
.callout-4 { bottom: 25%; right: 10%; text-align: right; }

/* ── COORD INTRO TEXT ── */
.coord-intro {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  font-weight: 600;
  font-style: italic;
  color: #fff;
  opacity: 0;
  transition: opacity 1.2s ease;
  text-align: center;
  max-width: 500px;
  padding: 0 24px;
  line-height: 1.5;
  text-shadow: 0 0 40px rgba(0,0,0,1), 0 2px 80px rgba(0,0,0,0.9), 0 0 120px rgba(0,0,0,0.5);
  z-index: 1;
}

.coord-intro.visible {
  opacity: 1;
}

/* ── MACRO CLOSING TEXT ── */
.macro-text {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  font-weight: 600;
  font-style: italic;
  color: #fff;
  opacity: 0;
  transition: opacity 1.2s ease;
  text-align: center;
  max-width: 550px;
  padding: 0 24px;
  line-height: 1.5;
  text-shadow: 0 0 40px rgba(0,0,0,1), 0 2px 80px rgba(0,0,0,0.9), 0 0 120px rgba(0,0,0,0.5);
  z-index: 1;
}

.macro-text.visible {
  opacity: 1;
}

/* ── REASSEMBLY LINE ── */

/* Dark vignette behind reassembly */
#reassemble .chapter-sticky::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center bottom, rgba(5,5,16,0.75) 0%, rgba(5,5,16,0.35) 45%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.reassembly-text {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  opacity: 0;
  transition: opacity 1.2s ease;
  white-space: nowrap;
  text-shadow: 0 0 40px rgba(0,0,0,1), 0 2px 80px rgba(0,0,0,0.9), 0 0 120px rgba(0,0,0,0.5);
  z-index: 1;
}

.reassembly-text.visible { opacity: 1; }

/* ── CONTENT SECTIONS (non-scrub) ── */
.content-wrapper {
  position: relative;
  z-index: 2;
  background: var(--bg);
}

.content-section {
  position: relative;
  padding: 140px 24px;
  max-width: 1000px;
  margin: 0 auto;
}

/* ── FEATURES GRID ── */
.features-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-overline {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 16px;
}

.section-heading {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 20px;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-dim);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.04);
}

.feature-cell {
  padding: 48px 36px;
  background: var(--bg);
  transition: background 0.3s;
}

.feature-cell:hover {
  background: rgba(255,255,255,0.02);
}

.feature-label {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.feature-name {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ── PRICING ── */
.pricing-section {
  padding: 140px 24px;
  max-width: 900px;
  margin: 0 auto;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.04);
  margin-top: 60px;
}

.price-cell {
  padding: 48px 28px;
  background: var(--bg);
  text-align: center;
  position: relative;
}

.price-cell.featured {
  background: rgba(0,212,255,0.02);
}

.price-badge {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  border: 1px solid rgba(0,212,255,0.2);
  padding: 4px 14px;
  border-radius: 2px;
}

.price-tier {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 20px;
  margin-top: 16px;
}

.price-amount {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 4px;
}

.price-period {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 32px;
}

.price-features {
  list-style: none;
  text-align: left;
  margin-bottom: 32px;
}

.price-features li {
  padding: 8px 0;
  font-size: 0.8rem;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-features li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-cyan);
  flex-shrink: 0;
}

.price-cta {
  display: block;
  width: 100%;
  padding: 12px;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
}

.price-cta:hover {
  border-color: var(--accent-cyan);
  background: rgba(0,212,255,0.04);
}

.price-cta.primary {
  border-color: var(--accent-cyan);
  background: rgba(0,212,255,0.06);
}

.price-cta.primary:hover {
  background: rgba(0,212,255,0.12);
}

/* ── CTA SECTION ── */
.cta-section {
  padding: 160px 24px;
  text-align: center;
}

.cta-heading {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  margin-bottom: 16px;
}

.cta-sub {
  font-size: 0.95rem;
  color: var(--text-dim);
  margin-bottom: 40px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.cta-appstore {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 40px;
  border: 1px solid var(--accent-cyan);
  color: var(--text);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background 0.3s, box-shadow 0.3s;
}

.cta-appstore:hover {
  background: rgba(0,212,255,0.06);
  box-shadow: 0 0 40px rgba(0,212,255,0.1);
}

.cta-appstore svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 60px 24px;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.footer-links {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin-bottom: 20px;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.3s;
}

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

.footer-copy {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.15);
  letter-spacing: 0.1em;
}

/* ── SCROLL HINT ── */
.scroll-hint {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.6s;
}

.scroll-hint.visible { opacity: 0.7; }

.scroll-hint span {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.scroll-arrow {
  width: 16px;
  height: 16px;
  border-right: 2px solid var(--accent-cyan);
  border-bottom: 2px solid var(--accent-cyan);
  transform: rotate(45deg);
  animation: bobble 2.5s ease-in-out infinite;
}

@keyframes bobble {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(4px); }
}

/* ── REVEAL (for content sections) ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .callout { display: none; }
  .feature-cell { padding: 32px 24px; }

  /* Bigger, bolder, brighter text on mobile */
  .hero-title {
    font-size: clamp(3.5rem, 14vw, 6rem);
    font-weight: 400;
    color: #fff;
  }
  .hero-overline {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #fff;
    text-shadow: 0 0 30px rgba(0,212,255,0.6), 0 0 60px rgba(0,0,0,1);
    padding: 0 20px;
    white-space: normal;
    text-align: center;
  }
  .manifesto-line {
    font-size: clamp(1.5rem, 5.5vw, 2.2rem);
    font-weight: 400;
    color: #fff;
  }
  .stage-label {
    font-size: clamp(1.1rem, 3.5vw, 1.5rem);
    font-weight: 500;
    color: #fff;
  }
  .coord-digit {
    font-size: clamp(2.5rem, 9vw, 4rem);
    color: #fff;
  }
  .reassembly-text {
    font-size: clamp(2rem, 7vw, 3rem);
    font-weight: 400;
    color: #fff;
  }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}