/* assets/hero-warmth.css
   Sitewide hero warmth retrofit — brings every .page-hero up to the approved
   Home hero look (parity.css .hero). Loaded LAST. Home (.hero) is untouched.
   Fallback hexes are hardcoded because learning/index.html does not load
   parity.css, so --p-* tokens may be undefined on some pages.
   Spec: AH-20261106-133055-cypress-sitewide-photo-warmth-consistency-spec

   C3 edit (life-pass, AH-20261108-163622): deleted 8 dead firefly-mote
   radial-gradient layers from both the base and reduced-motion background
   stacks. The mote system is now .hero-fx/.ff nodes (life-pass.css C3).
   Two systems must not compete. hero-ff-drift was already removed by
   Codex-A (fd8bb42). Warm scrim + hero-shimmer sweep untouched. */

/* ── 1. Replace cold mauve scrim with warm Home-matched grade.
        Override existing .page-hero::before in place.
        Layers (top of stack → bottom):
          a) Bottom-up: dark top, LIGHT MIDDLE (photo breathes), dark anchor at bottom
          b) Left text scrim, transparent by 65%
          c) Gold+teal atmospheric wash
   (Mote radial-gradient layers removed — C3 life-pass; real .hero-fx nodes now)
   ──────────────────────────────────────────────────────────────── */
body:not([data-page="home"]) .page-hero::before {
  /* Scrim + gold/teal grade (static; always present) */
  background:
    /* bottom-up: dark top, light middle (photo breathes at 28%), dark anchor */
    linear-gradient(to bottom,
      rgba(0,0,0,0.50) 0%,
      rgba(0,0,0,0.15) 28%,
      rgba(0,0,0,0.80) 70%,
      rgba(0,0,0,0.97) 100%),
    /* left text scrim — goes transparent by 65% */
    linear-gradient(to right,
      rgba(0,0,0,0.80) 0%,
      rgba(0,0,0,0.40) 42%,
      transparent       65%),
    /* warm gold+teal atmospheric wash */
    linear-gradient(115deg,
      rgba(232,168,60,0.10) 0%,
      transparent           42%),
    radial-gradient(circle at 82% 22%,
      rgba(34,168,142,0.12), transparent 30%);
  /* keep it behind copy exactly as the base rule had it */
  z-index: -1;
}

/* ── 2. Shimmer animation — lives on ::before (background-position only; no transform).
        hero-ff-drift removed (Codex-A fd8bb42): it animated translate/scale on the scrim
        pseudo-element, causing the dark scrim to shrink into a visible rectangle at ~t=12s
        with bright unshaded photo around its edges. Shimmer kept: background-position only.
        Mote radial-gradient layers removed (C3 life-pass): .hero-fx nodes are now the mote
        system; the two must not compete.
        Static warm base above is always present without animation.
   ──────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  body:not([data-page="home"]) .page-hero::before {
    /* Shimmer sweep prepended as an extra animated background layer */
    background:
      /* animated gold shimmer sweep — 200% wide, slides across */
      linear-gradient(120deg, transparent 30%, rgba(232,168,60,0.065) 50%, transparent 70%),
      /* bottom-up warm scrim */
      linear-gradient(to bottom,
        rgba(0,0,0,0.50) 0%,
        rgba(0,0,0,0.15) 28%,
        rgba(0,0,0,0.80) 70%,
        rgba(0,0,0,0.97) 100%),
      /* left text scrim */
      linear-gradient(to right,
        rgba(0,0,0,0.80) 0%,
        rgba(0,0,0,0.40) 42%,
        transparent       65%),
      /* gold+teal wash */
      linear-gradient(115deg,
        rgba(232,168,60,0.10) 0%,
        transparent           42%),
      radial-gradient(circle at 82% 22%,
        rgba(34,168,142,0.12), transparent 30%);
    background-size: 200% 100%, auto, auto, auto, auto;
    background-repeat: no-repeat;
    /* hero-ff-drift removed (Codex-A) — it translated/scaled the scrim, causing visible edge drift */
    animation: hero-shimmer 14s ease-in-out infinite;
    transform: none;
  }

  @keyframes hero-shimmer {
    0%   { background-position: -200% 0, 0 0, 0 0, 0 0, 0 0; }
    100% { background-position:  200% 0, 0 0, 0 0, 0 0, 0 0; }
  }

  /* hero-ff-drift @keyframes removed (Codex-A fd8bb42) — see comment above */
}

/* ── 3. Fade bottom of every hero into warm green page background.
        Ensures green page color (#0b1710) is the anchor, not the mauve --darker.
   ──────────────────────────────────────────────────────────────── */
body:not([data-page="home"]) .page-hero {
  background-color: #0b1710;
}

/* ── 4. Fix About — neutralize element-level dark gradient, keep photo.
        Re-declare background-image as photo URL only at all three breakpoints.
        The warm ::before scrim above becomes the sole overlay.
   ──────────────────────────────────────────────────────────────── */
body:not([data-page="home"]) .page-hero.about {
  background-image: url("about-hero-blend-768.webp");
}
@media (min-width: 800px) {
  body:not([data-page="home"]) .page-hero.about {
    background-image: url("about-hero-blend-1280.webp");
  }
}
@media (min-width: 1400px) {
  body:not([data-page="home"]) .page-hero.about {
    background-image: url("about-hero-blend-1600.webp");
  }
}

/* ── 5. Fix Privacy — neutralize element-level dark gradient, keep photo.
        Re-declare background-image as photo URL only at all three breakpoints.
   ──────────────────────────────────────────────────────────────── */
body:not([data-page="home"]) .page-hero.privacy {
  background-image: url("privacy-hero-blend-768.webp");
}
@media (min-width: 800px) {
  body:not([data-page="home"]) .page-hero.privacy {
    background-image: url("privacy-hero-blend-1280.webp");
  }
}
@media (min-width: 1400px) {
  body:not([data-page="home"]) .page-hero.privacy {
    background-image: url("privacy-hero-blend-1600.webp");
  }
}
