/* ============================================================
   NOVE FITNESS — De Boutique Studio · beweging
   Eén geauthoreerd moment: binnenkomen. De entree licht op als
   je de studio binnenstapt; verderop onthullen kamers zich
   rustig bij het binnenlopen (IntersectionObserver zet
   .is-visible; zie js/animations.js). Alles is standaard
   zichtbaar zonder JS of met reduced-motion.
   ============================================================ */

/* ----------------------------------------------------------
   1. Binnenkomen — de entreesequentie (alleen met JS actief)
   ---------------------------------------------------------- */
@keyframes step-inside {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes door-opens {
  from {
    opacity: 0;
    clip-path: inset(0 0 100% 0 round 8px);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0 round 8px);
  }
}

@keyframes plaque-lights-up {
  0% {
    opacity: 0;
  }
  55% {
    opacity: 0.4;
  }
  70% {
    opacity: 0.25;
  }
  100% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .js body.js-ready .hero__plaque {
    animation: plaque-lights-up 0.9s ease-out both;
  }
  .js body.js-ready .hero__title {
    animation: step-inside 0.7s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .js body.js-ready .hero__sub {
    animation: step-inside 0.7s 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .js body.js-ready .hero__actions {
    animation: step-inside 0.7s 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .js body.js-ready .hero__meta {
    animation: step-inside 0.7s 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .js body.js-ready .hero__frame {
    animation: door-opens 0.9s 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .js body.js-ready .hero__card {
    animation: step-inside 0.7s 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .js body.js-ready .hero__scroll {
    animation: step-inside 0.7s 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}

/* ----------------------------------------------------------
   2. Kamers onthullen zich bij binnenlopen
   Reveal-elementen zijn pas verborgen wanneer JS geladen is
   (html.js); zonder JS blijft alles gewoon zichtbaar.
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal,
  .js .reveal-scale,
  .js .reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
      transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .js .reveal-scale {
    transform: translateY(12px) scale(0.985);
  }
  .js .reveal.is-visible,
  .js .reveal-scale.is-visible,
  .js .reveal-stagger.is-visible > * {
    opacity: 1;
    transform: none;
  }
  .js .reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.08s; }
  .js .reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.16s; }
  .js .reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.24s; }
  .js .reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.32s; }
  .js .reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.4s; }
}

/* ----------------------------------------------------------
   3. De deurbel vraagt één keer aandacht
   ---------------------------------------------------------- */
@keyframes doorbell-ring {
  0%, 100% {
    box-shadow: inset 0 0 0 2px rgb(255 248 235 / 45%), var(--shadow-warm),
      0 0 0 0 rgb(214 173 107 / 45%);
  }
  50% {
    box-shadow: inset 0 0 0 2px rgb(255 248 235 / 60%), var(--shadow-lift),
      0 0 0 12px rgb(214 173 107 / 0%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .pulse-once {
    animation: doorbell-ring 1.1s ease-out 2;
  }
}

/* ----------------------------------------------------------
   4. Reduced motion: geen animaties, alles direct zichtbaar
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
