/* Appearance hand-off only. Load after home/header styles. The canonical
   renderer, its16 phases, imagery, crop and projection remain unchanged. */
html.intro-active {
  --gz-entry-ui-visibility: hidden;
  --gz-entry-ui-opacity: 0;
}
html.intro-active.gz-entry-ui-revealing {
  --gz-entry-ui-visibility: visible;
  --gz-entry-ui-opacity: 1;
}

/* This direct phase selector also works while the module graph is loading.
   Older engines retain the MutationObserver class fallback above. */
@supports selector(html:has(body)) {
  html.intro-active:has(> body > #brand-intro[data-phase="reveal"]),
  html.intro-active:has(> body > #brand-intro[data-phase="original"]) {
    --gz-entry-ui-visibility: visible;
    --gz-entry-ui-opacity: 1;
  }
}

html.intro-active body[data-page="home"] > .entry-header,
html.intro-active body[data-page="home"] .gz-hero-title,
html.intro-active body[data-page="home"] .gz-hero-description {
  /* The canonical body>:not(#brand-intro) rule carries ID specificity.
     This tightly scoped override must release the direct-child header too. */
  visibility: var(--gz-entry-ui-visibility) !important;
  opacity: var(--gz-entry-ui-opacity) !important;
  transition: opacity .28s ease;
}

/* The studio is already a decoded raster during this short hand-off. Avoid
   repeatedly filtering its moving opacity layers, then restore normal glass. */
html.intro-active body[data-page="home"] .gz-hero-description,
html.intro-active body[data-page="home"] .entry-header .tx-brand-trigger {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html.intro-active body[data-page="home"] > .entry-header,
  html.intro-active body[data-page="home"] .gz-hero-title,
  html.intro-active body[data-page="home"] .gz-hero-description {
    transition: none;
  }
}
