/**
 * PressConf layout utilities and background overlays.
 * Replaces legacy nfd-* classes from the old live theme.
 */

/* Decorative overlays sit behind content so contrast checks read solid surfaces. */
:is([class*="pc-bg-"], [class*="nfd-bg-effect"]) {
  isolation: isolate;
  position: relative;
}

:is([class*="pc-bg-"], [class*="nfd-bg-effect"])::after {
  pointer-events: none;
  z-index: 0;
}

:is([class*="pc-bg-"], [class*="nfd-bg-effect"]) > * {
  position: relative;
  z-index: 1;
}

/* Section hooks (pattern shells migrated from nfd-wb-*). */
.pc-hero-home,
.pc-hero-split,
.pc-archive-hero,
.pc-single-hero,
.pc-site-footer,
.pc-contact-page,
.pc-news-archive,
.pc-feature-cards,
.pc-faq-section,
.pc-lodging-cta,
.pc-testimonials,
.pc-help-finder {
  position: relative;
}

/* Scroll reveal (replaces nfd-wb-animate). */
@media (prefers-reduced-motion: no-preference) {
  .pc-animate:not(.pc-animated-in) {
    opacity: 0;
  }

  .pc-fade-in-up:not(.pc-animated-in) {
    opacity: 0;
    transform: translate3d(0, 32px, 0);
  }

  /*
   * Full-bleed surface bands must not pre-shift. translateY paints the band
   * over the next section (e.g. Speakers dark over Attendees muted grid).
   */
  :is(
    .pc-speakers-home,
    .pc-testimonials,
    .pc-feature-cards,
    .pc-sponsors-band,
    .pc-faq-band,
    .pc-faq-section
  ).pc-fade-in-up:not(.pc-animated-in) {
    transform: none;
  }

  /* Above-the-fold hero must paint immediately (no wait for reveal JS / WAAPI). */
  .pc-hero-home .pc-animate,
  .pc-hero-home.pc-animate,
  .pc-hero-home .pc-fade-in-down,
  .pc-hero-home .pc-fade-in-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pc-animate,
  .pc-fade-in-up {
    opacity: 1 !important;
    transform: none !important;
  }
}

.pc-animated-in {
  opacity: 1;
  transform: none;
}

/* Migrated from nfd-wb-zoom-in: layout utilities pin opacity at 0 until this wins. */
.pc-animated-in.pc-zoom-in {
  opacity: 1;
  transform: scale3d(1, 1, 1);
}

/* Legacy layout utilities pin left/right fades at opacity 0 until WAAPI or this override runs. */
.pc-animated-in.pc-fade-in-left,
.pc-animated-in.pc-fade-in-right {
  opacity: 1;
  transform: none;
}
