/* Entrance and reveal motion.
   Entrance animations are plain CSS so they run on the first paint, before script.js.
   The scroll reveal needs an observer, so it only hides anything once <html> carries `js`. */

@keyframes ad-drop { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
@keyframes ad-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ad-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes ad-up-soft { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes ad-headline { from { opacity: 0; transform: translateY(30px) scale(.97); filter: blur(14px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes ad-stage { from { opacity: 0; transform: translateY(44px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes ad-backdrop { from { opacity: 0; transform: translateY(-50%) scale(1.1); } to { opacity: 1; transform: translateY(-50%) scale(1); } }
@keyframes ad-rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Chrome that every page shares ---------- */

.announcement { animation: ad-drop .65s var(--ease) both; }
.site-header { animation: ad-up-soft .8s var(--ease) .07s both; }
footer { animation: ad-fade 1s ease both; }

/* ---------- Home hero ---------- */

.hero-atmosphere { animation: ad-fade 1.7s ease .15s both; }
.hero-backdrop-type { animation: ad-backdrop 1.5s var(--ease) .1s both; }

.hero h1 > span { animation: ad-headline .95s var(--ease) both; }
.hero-title-intro { animation-delay: .16s; }
.hero-title-main { animation-delay: .26s; }
.hero-title-finale { animation-delay: .36s; }

.hero-description { animation: ad-up .8s var(--ease) .5s both; }
.hero-actions { animation: ad-up .8s var(--ease) .6s both; }
.hero-availability { animation: ad-up .8s var(--ease) .7s both; }
.hero-availability-line { transform-origin: left center; animation: ad-rule .7s var(--ease) 1s both; }

.hero-product { animation: ad-stage 1.15s var(--ease) .28s both; }
.hero-product-meta { animation: ad-up-soft .8s var(--ease) .95s both; }
.hero-controls { animation: ad-up-soft .8s var(--ease) 1.05s both; }
.hero-floor { animation: ad-up-soft .9s var(--ease) .85s both; }

/* The scroll cue keeps nudging once it has arrived, so the fold reads as scrollable. */
@keyframes ad-nudge { 0%, 100% { transform: none; } 50% { transform: translateY(5px); } }
.hero-scroll-cue svg { animation: ad-nudge 2.4s ease-in-out 2s infinite; }

/* ---------- Inner pages ---------- */

.legal-page > * { animation: ad-up .7s var(--ease) both; }
.legal-page > :nth-child(1) { animation-delay: .05s; }
.legal-page > :nth-child(2) { animation-delay: .11s; }
.legal-page > :nth-child(3) { animation-delay: .17s; }
.legal-page > :nth-child(4) { animation-delay: .23s; }
.legal-page > :nth-child(5) { animation-delay: .29s; }
.legal-page > :nth-child(n+6) { animation-delay: .34s; }

/* ---------- Scroll reveal (script.js drives the class) ---------- */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
html.js [data-reveal].is-in { opacity: 1; transform: none; will-change: auto; }

@media (prefers-reduced-motion: reduce) {
  .announcement, .site-header, footer,
  .hero-atmosphere, .hero-backdrop-type, .hero h1 > span, .hero-description,
  .hero-actions, .hero-availability, .hero-availability-line, .hero-product,
  .hero-product-meta, .hero-controls, .hero-floor, .hero-scroll-cue svg,
  .legal-page > * { animation: none !important; }
  html.js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}
