/*
 * Motion-only guardrails.
 * The page stays fully readable when JavaScript or GSAP is unavailable.
 * Runtime transforms and opacity are applied by motion.js after the invitation opens.
 */

html[data-motion="ready"] [data-reveal],
html[data-motion="ready"] [data-hero-step],
html[data-motion="ready"] [data-hero-photo],
html[data-motion="ready"] [data-calendar],
html[data-motion="ready"] [data-venue-left],
html[data-motion="ready"] [data-venue-right],
html[data-motion="ready"] [data-venue-photo],
html[data-motion="ready"] [data-venue-card],
html[data-motion="ready"] [data-program-photo],
html[data-motion="ready"] [data-program-timeline] li,
html[data-motion="ready"] [data-closing-photo] {
  backface-visibility: hidden;
}

html[data-motion="ready"] .venue-stage.is-active [data-venue-left],
html[data-motion="ready"] .venue-stage.is-active [data-venue-right],
html[data-motion="ready"] .venue-stage.is-active [data-venue-photo],
html[data-motion="ready"] .venue-stage.is-active [data-venue-card] {
  will-change: transform, opacity;
}

html[data-motion="ready"] .program.is-active [data-program-photo],
html[data-motion="ready"] .program.is-active [data-program-timeline] li,
html[data-motion="ready"] .program.is-active .timeline__line {
  will-change: transform, opacity;
}

html[data-motion="ready"] .opening-curtain__panel,
html[data-motion="ready"] .envelope__letter,
html[data-motion="ready"] .envelope__flap,
html[data-motion="ready"] .envelope,
html[data-motion="ready"] .opening-screen__branch {
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-hero-step],
  [data-hero-photo],
  [data-calendar],
  [data-venue-left],
  [data-venue-right],
  [data-venue-photo],
  [data-venue-card],
  [data-program-photo],
  [data-program-timeline] li,
  [data-closing-photo] {
    opacity: 1 !important;
    transform: none !important;
    will-change: auto !important;
  }

  .venue-draw,
  .calendar__draw {
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
  }
}
