/* Homepage environment only. Existing sizing, typography and portrait coordinates remain owned by the site. */
#home.moody-hero { isolation:isolate; background-image:none!important; }
#home .lp-hero-environment,#home .cosmic-static,#home .planet-canvas,#home .meteor-canvas { position:absolute;inset:0;width:100%;height:100%;pointer-events:none; }
#home .lp-hero-environment { z-index:0;background:#050403 center/cover no-repeat; }
#home .cosmic-static,#home .planet-canvas { z-index:0; }
#home .meteor-far { z-index:1; }
#home .meteor-middle { z-index:2; }
#home .meteor-near { z-index:3; }
#home .original-mountain-layer {position:absolute;left:-3px;bottom:-2px;width:calc(100% + 6px);height:auto;object-fit:contain;z-index:3;pointer-events:none;filter:brightness(.63) contrast(1.02) saturate(.60) blur(.55px);transform:translateY(var(--mountain-y,0px));}
#home.moody-hero .hero-static-portrait { z-index:4!important; }
#home .atmosphere-front { z-index:5; }
#home.moody-hero > .container { z-index:6!important; }
#home.moody-hero::before {z-index:3!important;pointer-events:none;background:linear-gradient(90deg,rgba(0,0,0,.28),transparent 49%)!important;}
#home .meteor-controls { position:absolute;left:5%;bottom:20px;z-index:7;display:flex;gap:8px;flex-wrap:wrap; }
#home .meteor-controls button {font:500 12px/1.2 Arial,sans-serif;min-height:44px;padding:10px 17px;border:1px solid #ffffff40;border-radius:24px;background:#0c0b09e8;color:#fff;cursor:pointer;}
#home .meteor-controls button:focus-visible {outline:2px solid #ffad00;outline-offset:3px;}
#home .surface-credit {position:absolute;right:12px;bottom:12px;z-index:7;color:#aaa;font:11px/1.3 Arial,sans-serif;text-decoration:none;max-width:42%;text-align:right;}
#home .meteor-controls[hidden],#home .surface-credit[hidden] {display:none;}
@media(max-width:480px){#home.moody-hero::before{background:linear-gradient(90deg,rgba(0,0,0,.80),rgba(0,0,0,.55) 48%,transparent 85%)!important;}}

/* V2: one landscape, with optical depth dissolving into the next black chapter.
   Masks affect environment layers only; portrait and content geometry stay owned
   by the existing responsive composition. */
#home .lp-hero-environment,
#home .cosmic-static,
#home .planet-canvas,
#home .meteor-canvas:not(.atmosphere-front),
#home .valley-atmosphere {
    opacity: var(--space-opacity, 1);
    -webkit-mask-image: linear-gradient(#000 0%, #000 77%, transparent 100%);
    mask-image: linear-gradient(#000 0%, #000 77%, transparent 100%);
}
#home .original-mountain-layer {
    -webkit-mask-image: linear-gradient(#000 0%, #000 60%, transparent 100%);
    mask-image: linear-gradient(#000 0%, #000 60%, transparent 100%);
    will-change: transform;
}
/* The Hero image is the authoritative mountain; suppress the legacy repeat. */
#home ~ .impact-scene::before { background-image: none !important; }
@media (prefers-reduced-motion: reduce) {
    #home .original-mountain-layer { will-change: auto; }
}

/* Stage 6: the photographic foreground must be present with its rim light.
   Keep the approved coordinates and float; omit the 3.5-second opacity entrance. */
#home.moody-hero .hero-static-portrait {
    opacity: 1;
    transform: translateX(-50%);
    animation: portrait-float 6s ease-in-out 3.7s infinite;
}

/* Fade the portrait's rendered alpha independently of the scroll reveal. */
#home.moody-hero .hero-static-portrait {
    -webkit-mask-image: linear-gradient(#000 0%, #000 72%, rgba(0,0,0,.85) 81%, rgba(0,0,0,.35) 91%, transparent 100%) !important;
    mask-image: linear-gradient(#000 0%, #000 72%, rgba(0,0,0,.85) 81%, rgba(0,0,0,.35) 91%, transparent 100%) !important;
}
/* The foreground enters only once the visitor leaves the opening frame. */
#home .original-mountain-layer {
    z-index: 5;
    opacity: var(--ridge-opacity, 0);
    bottom: -2px;
    min-height: 190px;
    object-fit: cover;
    object-position: center bottom;
    filter: brightness(.73) contrast(1.02) saturate(.65);
    -webkit-mask-image: linear-gradient(#000 0%, #000 82%, transparent 100%);
    mask-image: linear-gradient(#000 0%, #000 82%, transparent 100%);
}
#home.moody-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: clamp(75px, 7vw, 140px);
    z-index: 5;
    pointer-events: none;
    background: linear-gradient(transparent, #000 96%);
}
@media (max-width: 991px), (prefers-reduced-motion: reduce) {
    #home .original-mountain-layer { transform: none; will-change: auto; }
}
