/* Desktop-only Home prototype: a persistent scene, independent of portal geometry. */
@media (min-width: 901px) {
  body.home-view .forest-landing:has(.forest-stage:not([data-scene=plain])) {
    --home-landscape: url('assets/forest-background.jpg');
    --home-reading-rgb: 14, 39, 29;
    --home-intro-lift: 12px;
    background: transparent;
    isolation: isolate;
  }
  body.home-view .forest-landing:has(.forest-stage[data-scene=treetop]) {
    --home-landscape: url('assets/treetop-background.png');
    --home-reading-rgb: 13, 22, 38;
    --home-intro-lift: 28px;
  }
  body.home-view .forest-landing:has(.forest-stage[data-scene=nyc]) {
    --home-landscape: url('assets/nyc-photo-matthew-wiebe-3840.jpg');
    --home-reading-rgb: 36, 31, 31;
    --home-intro-lift: 64px;
  }
  body.home-view .forest-landing:has(.forest-stage:not([data-scene=plain]))::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: max(840px, 116svh);
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(rgba(5, 14, 18, .22), rgba(5, 14, 18, .22)), var(--home-landscape) center / cover no-repeat;
  }
  body.home-view .forest-landing:has(.forest-stage[data-scene=nyc])::before {
    transform: translateY(-98px) scale(1.18);
  }
  /* Keep animated canopy details registered to the now-fixed artwork. */
  body.home-view .forest-stage:not([data-scene=plain]) > :is(.forest-leaf-layer,.foliage-detail,.ambient) {
    position: fixed;
    inset: 0 0 auto;
    width: 100%;
    height: max(840px, 116svh);
  }
  body.home-view .forest-stage:not([data-scene=plain]) {
    background: transparent;
  }
  body.home-view .forest-stage:not([data-scene=plain]) > :is(.forest-scene,.treetop-scene,.nyc-scene,.landing-bottom-shade,.forest-shade) {
    visibility: hidden;
  }
  body.home-view .forest-landing:has(.forest-stage:not([data-scene=plain])) .landing-reflection {
    margin-top: calc(100svh - var(--scene-height) - var(--signature-height) - 24px - var(--home-intro-lift));
    background: transparent;
    isolation: isolate;
  }
  body.home-view .forest-landing:has(.forest-stage:not([data-scene=plain]))::after {
    content: "";
    position: absolute;
    inset: calc(100svh - var(--signature-height) - 124px - var(--home-intro-lift)) 0 0;
    z-index: 1;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 100px);
    mask-image: linear-gradient(to bottom, transparent, #000 100px);
    background: linear-gradient(90deg,
      rgba(var(--home-reading-rgb), .91) 0%,
      rgba(var(--home-reading-rgb), .88) 49%,
      rgba(var(--home-reading-rgb), .68) 70%,
      rgba(var(--home-reading-rgb), .22) 100%);

  }
  body.home-view .forest-landing:has(.forest-stage:not([data-scene=plain])) > :is(.landing-contact,.home-section-pagination) {
    position: relative;
    z-index: 2;
    background: transparent;
  }
}

/* Quiet grounding, Classic desktop only; no layout or interaction changes. */
@media (min-width: 901px) {
  body.home-view[data-site-scene=plain] .chic-doors .door-portal::before {
    content: '';
    position: absolute;
    left: -12%; right: -12%; bottom: -8px;
    height: 13px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(55, 49, 44, .16), rgba(55, 49, 44, 0) 72%);
    z-index: -1;
    pointer-events: none;
  }

}

/* Desktop scenic refinement: wider journeys, unchanged vertical geometry. */
@media (min-width: 901px) {
  body.home-view .forest-stage:is([data-scene=treetop],[data-scene=nyc]) > .connections {
    left: calc(-1 * clamp(30px, 8vw, 128px));
    right: calc(-1 * clamp(30px, 8vw, 128px));
  }
  body.home-view .forest-landing:has(.forest-stage[data-scene=treetop]) {
    --home-intro-lift: 36px;
  }
  body.home-view .forest-landing:has(.forest-stage:not([data-scene=plain])) > .landing-contact::before {
    content: '';
    position: absolute;
    inset: -70px 0 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(var(--home-reading-rgb), 0), rgba(var(--home-reading-rgb), .30) 110px, rgba(var(--home-reading-rgb), .38));
  }
}

/* City footer: a touch of neutral black depth without a hard boundary. */
@media (min-width: 901px) {
  body.home-view .forest-landing:has(.forest-stage[data-scene=nyc]) > .landing-contact::before {
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,.34) 110px, rgba(0,0,0,.44));
  }
}

/* Reference E/D pathway decoration, desktop only. Existing destinations untouched. */
@media(min-width:901px){
 .journey-trail.has-pathway-concept>.trail-leg{display:none}
 .pathway-concept{pointer-events:none}
 .pathway-concept .skyline-halo{fill:none;stroke:#ffdb83;stroke-width:5;opacity:.48;filter:blur(4px)}
 .pathway-concept .skyline-core{fill:none;stroke:#fff1c4;stroke-width:2.1;filter:drop-shadow(0 0 4px #ffe09b)}
 .pathway-concept .skyline-window{filter:drop-shadow(0 0 3px #faca57)}
 .pathway-concept .skyline-beacon{filter:drop-shadow(0 0 4px #ff7b7b)}
 .pathway-concept .footprint{filter:drop-shadow(0 0 3px #fff0b3)}
}

/* Restore the previous cyan/lime/pink route palette on destination attention. */
@media(min-width:901px){
 .pathway-concept [data-destination=research]{--route-neon:#8de5ff}
 .pathway-concept [data-destination=practice]{--route-neon:#c7ff78}
 .pathway-concept [data-destination=books]{--route-neon:#ff9cdd}
 .pathway-concept .skyline-focus{opacity:0;transition:opacity .35s ease-out}
 .pathway-concept .skyline-focus-line{fill:none;stroke:var(--route-neon);stroke-width:3;filter:drop-shadow(0 0 5px var(--route-neon))}
 .pathway-concept .footprint ellipse{transition:fill .35s ease-out}
.connections[data-selected=research] .skyline-focus[data-destination=research],
.connections:has(.discovery-research:focus-within) .skyline-focus[data-destination=research],
.connections:has(.discovery-research:hover) .skyline-focus[data-destination=research]{opacity:.95}
.connections[data-selected=research] .footprint-branch[data-destination=research] ellipse,
.connections:has(.discovery-research:focus-within) .footprint-branch[data-destination=research] ellipse,
.connections:has(.discovery-research:hover) .footprint-branch[data-destination=research] ellipse{fill:var(--route-neon)}
.connections[data-selected=research] .footprint-branch[data-destination=research] .footprint,
.connections:has(.discovery-research:focus-within) .footprint-branch[data-destination=research] .footprint,
.connections:has(.discovery-research:hover) .footprint-branch[data-destination=research] .footprint{opacity:1;filter:drop-shadow(0 0 5px var(--route-neon))}
.connections[data-selected=practice] .skyline-focus[data-destination=practice],
.connections:has(.discovery-practice:focus-within) .skyline-focus[data-destination=practice],
.connections:has(.discovery-practice:hover) .skyline-focus[data-destination=practice]{opacity:.95}
.connections[data-selected=practice] .footprint-branch[data-destination=practice] ellipse,
.connections:has(.discovery-practice:focus-within) .footprint-branch[data-destination=practice] ellipse,
.connections:has(.discovery-practice:hover) .footprint-branch[data-destination=practice] ellipse{fill:var(--route-neon)}
.connections[data-selected=practice] .footprint-branch[data-destination=practice] .footprint,
.connections:has(.discovery-practice:focus-within) .footprint-branch[data-destination=practice] .footprint,
.connections:has(.discovery-practice:hover) .footprint-branch[data-destination=practice] .footprint{opacity:1;filter:drop-shadow(0 0 5px var(--route-neon))}
.connections[data-selected=books] .skyline-focus[data-destination=books],
.connections:has(.discovery-books:focus-within) .skyline-focus[data-destination=books],
.connections:has(.discovery-books:hover) .skyline-focus[data-destination=books]{opacity:.95}
.connections[data-selected=books] .footprint-branch[data-destination=books] ellipse,
.connections:has(.discovery-books:focus-within) .footprint-branch[data-destination=books] ellipse,
.connections:has(.discovery-books:hover) .footprint-branch[data-destination=books] ellipse{fill:var(--route-neon)}
.connections[data-selected=books] .footprint-branch[data-destination=books] .footprint,
.connections:has(.discovery-books:focus-within) .footprint-branch[data-destination=books] .footprint,
.connections:has(.discovery-books:hover) .footprint-branch[data-destination=books] .footprint{opacity:1;filter:drop-shadow(0 0 5px var(--route-neon))}
}
@media(prefers-reduced-motion:reduce){.pathway-concept .skyline-focus,.pathway-concept .footprint ellipse{transition:none}}
/* City reading scrim: broad eased feather, rather than a short dark ledge. */
@media(min-width:901px){
 body.home-view .forest-landing:has(.forest-stage[data-scene=nyc])::after{
  top:calc(100svh - var(--signature-height) - 304px - var(--home-intro-lift));
  -webkit-mask-image:linear-gradient(to bottom,transparent 0px,rgba(0,0,0,.04) 55px,rgba(0,0,0,.18) 110px,rgba(0,0,0,.45) 170px,rgba(0,0,0,.76) 225px,#000 280px);
  mask-image:linear-gradient(to bottom,transparent 0px,rgba(0,0,0,.04) 55px,rgba(0,0,0,.18) 110px,rgba(0,0,0,.45) 170px,rgba(0,0,0,.76) 225px,#000 280px);
 }
}
/* Slightly clearer treasure symbols, with rooftop/contact anchors unchanged. */
.forest-stage:is([data-scene=treetop],[data-scene=nyc]) .light-call .treasure{
 scale:1.15;
 transform-origin:50% 100%;
}

/* City D+: cream-gold prints, colored aura, and destination constellations. */
@media(min-width:901px){
 .forest-stage[data-scene=nyc] .pathway-concept .footstep-aura{fill:none;stroke-width:18;opacity:.18;filter:blur(8px)}
 .forest-stage[data-scene=nyc] .pathway-concept .chest-path-ring{fill:none;stroke-width:1.3;opacity:.5;filter:drop-shadow(0 0 5px currentColor)}
 .forest-stage[data-scene=nyc] .pathway-concept .footprint{filter:drop-shadow(0 0 4px #ffd37c)}
 .forest-stage[data-scene=nyc] .pathway-concept .path-star{filter:drop-shadow(0 0 4px #ffe5aa)}
.connections[data-selected=research] .footprint-branch[data-destination=research] .footstep-aura,
.connections:has(.discovery-research:focus-within) .footprint-branch[data-destination=research] .footstep-aura,
.connections:has(.discovery-research:hover) .footprint-branch[data-destination=research] .footstep-aura{stroke:var(--route-neon);opacity:.42}
.connections[data-selected=books] .footprint-branch[data-destination=books] .footstep-aura,
.connections:has(.discovery-books:focus-within) .footprint-branch[data-destination=books] .footstep-aura,
.connections:has(.discovery-books:hover) .footprint-branch[data-destination=books] .footstep-aura{stroke:var(--route-neon);opacity:.42}
.connections[data-selected=practice] .footprint-branch[data-destination=practice] .footstep-aura,
.connections:has(.discovery-practice:focus-within) .footprint-branch[data-destination=practice] .footstep-aura,
.connections:has(.discovery-practice:hover) .footprint-branch[data-destination=practice] .footstep-aura{stroke:var(--route-neon);opacity:.42}
}
