/* ============================================================
 * lp-snap engine.css
 * Section sizing, snap-dots, scroll-restore, scroll-cue,
 * mobile resets, reduced-motion.
 * Load AFTER tokens.css.
 * ============================================================ */

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

html, body {
  background: var(--jaz-bg-deep);
  color: var(--white);
  font-family: 'Outfit', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
}
body { overflow-x: hidden; }

/* No-flash scroll restore — engine.js removes the class once positioned */
html.scroll-restoring { visibility: hidden; }

/* === Section === each tile fills the viewport */
.section {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  perspective: 2000px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0 80px;
  overflow: hidden;
}

/* === Snap dots === fixed right-edge nav */
.snap-dots {
  position: fixed;
  /* Sit INSIDE the card's right edge (16px inset from card border).
     Card max-width 1400 + 16px section margin. */
  right: max(32px, calc((100vw - 1400px) / 2 + 16px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: opacity 240ms ease;
}
/* Hide dots whenever any card is flipped */
body:has(.card.is-flipped) .snap-dots {
  opacity: 0;
  pointer-events: none;
}
.snap-dots a {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: background 200ms ease, width 200ms ease, height 200ms ease;
  text-decoration: none;
}
.snap-dots a.active {
  background: var(--accent-cyan);
  width: 12px;
  height: 12px;
}
/* Per-section snap-dot recolor lives in tokens.css under "Per-theme overrides" */

/* === Scroll cue === drop-line animation at section bottom */
.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.scroll-cue .line {
  width: 1px;
  height: 28px;
  background: var(--faint);
  animation: drop 1.8s ease-in-out infinite;
}
@keyframes drop {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* === Mobile === */
@media (max-width: 900px) {
  .section { padding: 64px 0 64px; }
  .snap-dots { display: none; }
  .scroll-cue { bottom: 16px; font-size: 10px; letter-spacing: 1.8px; }
}

/* === Reduced motion ===
 * NOTE: engine.js ALSO branches on prefers-reduced-motion to (1) make
 * butterScrollTo instant and (2) skip rotatePluses entirely. CSS here
 * covers the keyframe + transition surface; JS covers the RAF and the
 * inline-style transform. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card-inner { transition: none !important; }
  .play-circle, .scroll-cue .line { animation: none !important; }
  .eyebrow-row .arrow-flip { transition: none !important; }
  .cta-section.in-view .cta-button,
  .section.in-view .play-circle { animation: none !important; }
}

/* === Visually hidden (skip-link + live region) ===
 * Accessible to screen readers but invisible visually.
 * Skip-link uses :focus to reveal itself; live region stays hidden. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === Skip-to-content link === */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--jaz-blue);
  color: var(--white);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  transition: top 220ms ease;
}
.skip-link:focus {
  top: 16px;
  outline: 2px solid var(--white);
  outline-offset: 2px;
}
