/* ============================================================
   ANIMATIONS — page curtain (keyhole reveal) + reveal states
   ============================================================ */

/* ---- Page curtain / keyhole ---- */
.page-curtain {
  position: fixed;
  inset: 0;
  z-index: var(--z-curtain);
  pointer-events: none;
  display: none;             /* no-js: never block the page */
}
.js .page-curtain {
  display: block;
  pointer-events: all;       /* block interaction while playing */
}
.page-curtain.is-done {
  display: none;
}
.page-curtain__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.page-curtain__fill { fill: var(--color-night); }
/* The keyhole hole is scaled open by JS via the SVG `transform` ATTRIBUTE
   (set in markup as translate(50 46) scale(0.0001)) — kept off CSS so the
   attribute animation is never overridden. Tiny initial scale = screen fully
   covered (dark) before the intro plays = no FOUC. */

/* ---- Reveal states (driven by GSAP; safe without JS) ---- */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(2rem); will-change: transform, opacity; }
.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s var(--ease-entrance), transform 0.9s var(--ease-entrance);
}

/* Hero text starts hidden only when JS can animate it in */
.js .hero-title,
.js .hero-surtitle,
.js .hero-subtitle { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js .hero-title,
  .js .hero-surtitle,
  .js .hero-subtitle { opacity: 1; transform: none; }
}
