/* =========================================================
   PP STYLE LAYERS v1.8.2 — HOMEPAGE GATEWAY SURFACE
   Ownership: Gateway outer shell only. The Gateway Custom HTML block owns
   its own visual components, typography, media, and interactions.
========================================================= */

body.pp-surface-home-gateway :where(
  .ct-page-title,
  .hero-section:has(.page-title),
  .hero-section:has(.entry-title),
  .entry-header:has(.page-title),
  .entry-header:has(.entry-title),
  header.entry-header
) {
  display: none !important;
}

body.pp-surface-home-gateway :where(
  .pp-article-navigator,
  .pp-article-guide,
  #pp-article-navigator,
  #pp-article-guide,
  [data-pp-article-navigator],
  [data-pp-article-guide],
  [class^="ppan-"],
  [class*=" ppan-"],
  [class*="article-navigator"],
  [class*="article-guide"],
  [id*="article-navigator"],
  [id*="article-guide"]
) {
  display: none !important;
}

body.pp-surface-home-gateway :where(
  .site-main,
  #main,
  .content-area,
  .entry-content
) {
  width: 100% !important;
  max-width: none !important;
}

body.pp-surface-home-gateway .entry-content > .wp-block-html:first-child,
body.pp-surface-home-gateway .entry-content > #pp-home-gateway:first-child {
  margin-top: 0 !important;
}

body.pp-surface-home-gateway .entry-content > .wp-block-html:has(#pp-home-gateway) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

@media (max-width: 767px) {
  body.pp-surface-home-gateway .entry-content {
    padding-top: 0 !important;
  }
}


/* =========================================================
   v1.8.1 — Gateway recovery contract
   The Gateway component owns its headings. These guardrails counter any
   stale/theme/plugin title animation, clipping, text-fill, or opacity rule.
========================================================= */
body.pp-surface-home-gateway #pp-home-gateway h2.pphg-section-title,
body.pp-surface-home-gateway #pp-home-gateway h2.pphg-method__title,
body.pp-surface-home-gateway #pp-home-gateway h2.pphg-prophecy__title,
body.pp-surface-home-gateway #pp-home-gateway h2.pphg-investigations__title,
body.pp-surface-home-gateway #pp-home-gateway h2.pphg-explore__title,
body.pp-surface-home-gateway #pp-home-gateway h2.pphg-method__title span {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: static !important;
  transform: none !important;
  filter: none !important;
  clip: auto !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  height: auto !important;
  width: auto !important;
  max-height: none !important;
  overflow: visible !important;
  color: #f7efdc !important;
  -webkit-text-fill-color: #f7efdc !important;
}

/* Close Gateway content cleanly into the global footer without modifying
   its widget structure. Footer compression remains a separate audited pass. */
body.pp-gateway-footer-context #pp-home-gateway {
  padding-bottom: clamp(34px, 4vw, 58px) !important;
}

body.pp-gateway-footer-context :where(.site-main, #main, .content-area) {
  padding-bottom: 0 !important;
}

body.pp-gateway-footer-context :where(.ct-footer, footer, #colophon, .site-footer) {
  margin-top: 0 !important;
}


/* =========================================================
   v1.8.2 — Gateway sticky header reading shield
   Scope: the Gateway only. This intentionally avoids blur so the iPhone
   header stays stable while scrolling and page copy cannot ghost through.
========================================================= */
@media (max-width: 999px) {
  body.pp-surface-home-gateway :is(.ct-header, .site-header, #header, header) {
    isolation: isolate;
    background: #030303 !important;
  }

  body.pp-surface-home-gateway :is(.ct-header, .site-header, #header, header) :is([data-row], .ct-header-container, .ct-container) {
    background:
      linear-gradient(180deg, rgba(3, 3, 3, 1) 0%, rgba(3, 3, 3, 0.992) 100%) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  /* Blocksy may use a dedicated sticky holder on some header layouts. */
  body.pp-surface-home-gateway :is(.ct-sticky-container, .ct-sticky-container > div, [data-sticky]) {
    background: #030303 !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}
