/* Match the site canvas before the bundled styles arrive. */
html { background-color: var(--surface-canvas, #f7f4ee); }

/* Keep root snapshots painted without crossfading; hiding them can expose a blank frame. */
::view-transition-group(root),
::view-transition-old(root),
::view-transition-new(root) { animation: none; }
::view-transition-old(root),
::view-transition-new(root) { mix-blend-mode: normal; }

/* Unsupported scripting queries and no-JavaScript browsers remain visible. */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  /* Pending reveals retain their place and accessibility until the trigger fires. */
  [data-reveal][data-intro-state='pending'] { opacity: 0; }

  [data-reveal]:not(#aurora-hero-root *):not([data-intro-state]),
  #aurora-hero-root :is([data-text-reveal], [data-hero-intro], [data-bottle-reveal]):not([data-intro-state]) {
    visibility: hidden;
  }

  /* A missing or failed module must not leave the page hidden indefinitely.
     Successful controllers remove only their own deadline before it fires. */
  html:not([data-reveal-controller='ready']) [data-reveal]:not(#aurora-hero-root *):not([data-intro-state]),
  #aurora-hero-root:not([data-hero-controller='ready']) :is([data-text-reveal], [data-hero-intro], [data-bottle-reveal]):not([data-intro-state]) {
    animation: reveal-initialization-deadline 3s steps(1, end) forwards;
  }
}

@keyframes reveal-initialization-deadline {
  from { visibility: hidden; }
  to { visibility: visible; }
}
