/* ============================================================================
   MERIDIAN — Home cinematic hero (scoped .mrd-hero, ADDITIVE over app.css .hero).
   Multi-slide light-wipe background + Ken-Burns drift + scroll cue. The existing
   .hero-photo stays as the SSR/no-JS base; slides layer on top. Reduced-motion &
   low-power fall back to a single static frame (JS never activates).
   ========================================================================== */

.mrd-hero .mrd-hero-slides { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.mrd-hero .hero-photo { z-index: 0; }
.mrd-hero .hero-scrim { z-index: 2; }     /* keep the darkening scrim above the slides */
.mrd-hero .hero-grain { z-index: 3; }
.mrd-hero .hero-inner { position: relative; z-index: 4; }

.mrd-hero .mrd-hero-slide {
  position: absolute; inset: 0; z-index: 1;
  background-image: var(--img); background-size: cover; background-position: center;
  opacity: 0; visibility: hidden; transform: scale(1.12);
  clip-path: inset(0 0 0 100%);
}
/* first slide is visible by default (covers .hero-photo; same image → seamless even w/o JS) */
.mrd-hero .mrd-hero-slide.is-active {
  opacity: 1; visibility: visible; clip-path: inset(0);
  animation: mrd-hero-kb 10s ease-out forwards;
}
@keyframes mrd-hero-kb { from { transform: scale(1.12) translate3d(0,0,0); } to { transform: scale(1.2) translate3d(-1.5%,-1.5%,0); } }

/* diagonal cinematic wipe between slides (JS toggles the classes) */
.mrd-hero .mrd-hero-slide.is-entering {
  visibility: visible; opacity: 1; transform: scale(1.14);
  animation: mrd-hero-wipe-in 1.25s cubic-bezier(.83,0,.17,1) forwards, mrd-hero-kb 10s ease-out forwards;
}
.mrd-hero .mrd-hero-slide.is-leaving {
  visibility: visible; opacity: 1;
  animation: mrd-hero-wipe-out 1.25s cubic-bezier(.83,0,.17,1) forwards;
}
@keyframes mrd-hero-wipe-in  { from { clip-path: polygon(100% 0, 100% 0, 120% 100%, 120% 100%); }
                               to   { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); } }
@keyframes mrd-hero-wipe-out { from { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
                               to   { clip-path: polygon(-20% 0, 0 0, 0 100%, -20% 100%); } }

/* Slide indicators. Hidden until hero-cinematic.js confirms it is actually
   rotating the slides (.is-live) — otherwise the dots advertise a carousel that
   never advances and sit frozen on "1 of 3". Keyed off the class, not a media
   query, so this cannot drift from the JS capability gate (which also weighs
   reduced-motion/cores/memory/saveData — untestable from CSS). */
.mrd-hero-dots { display: none; }
.mrd-hero.is-live .mrd-hero-dots { position: absolute; left: 0; right: 0; bottom: clamp(18px, 4vh, 40px);
  z-index: 5; display: flex; gap: 10px; justify-content: center; pointer-events: none; }
.mrd-hero-dots .d { width: 26px; height: 3px; border-radius: 3px; background: rgba(247,241,230,.32); overflow: hidden; }
.mrd-hero-dots .d.on { background: rgba(247,241,230,.7); }

/* scroll cue */
.mrd-hero-cue { position: absolute; left: 50%; bottom: clamp(10px, 2.4vh, 22px); transform: translateX(-50%);
  z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 6px; color: rgba(247,241,230,.7);
  font-family: var(--font-sans); font-size: .64rem; letter-spacing: .22em; text-transform: uppercase; pointer-events: none; }
.mrd-hero-cue .m { width: 15px; height: 23px; border: 1px solid rgba(247,241,230,.5); border-radius: 8px; position: relative; }
.mrd-hero-cue .m::after { content: ""; position: absolute; left: 50%; top: 5px; width: 3px; height: 3px; border-radius: 50%;
  background: currentColor; transform: translateX(-50%); animation: mrd-hero-cue 1.8s ease-in-out infinite; }
@keyframes mrd-hero-cue { 0%,100% { opacity: 1; top: 5px; } 50% { opacity: .25; top: 11px; } }

@media (prefers-reduced-motion: reduce) {
  .mrd-hero .mrd-hero-slide.is-active { animation: none; transform: none; }
  .mrd-hero .mrd-hero-slide.is-entering, .mrd-hero .mrd-hero-slide.is-leaving { animation: none; }
  .mrd-hero-cue .m::after { animation: none; }
}
/* The cue is a CSS-only scroll hint and works without JS, so width alone gates
   it. The dots are gated by .is-live above, not here. */
@media (max-width: 700px) { .mrd-hero-cue { display: none; } }
