/* ===== SECTION 1 : HERO ===== */
.hero{position:relative;height:var(--H);overflow:hidden;background:var(--sky);isolation:isolate}
.hero__layer{position:absolute;left:0;width:100%;will-change:transform;pointer-events:none}

/* sky: fills hero, art top-aligned */
.hero__sky{top:0;height:100%}
.hero__sky img{width:100%;height:100%;object-fit:cover;object-position:50% 0}

/* floating light orbs */
.hero__orbs{top:0;height:100%}
.orb{position:absolute;width:calc(var(--W)*.068);aspect-ratio:1;border-radius:50%;
  background:radial-gradient(circle at 35% 30%,rgba(190,235,255,.42),rgba(90,185,255,.32) 60%,rgba(60,160,255,.22));
  box-shadow:0 0 calc(var(--W)*.02) rgba(150,215,255,.35);opacity:0}
.orb--1{left:38%;top:1.2%}
.orb--2{left:59%;top:15.5%;width:calc(var(--W)*.075)}
.orb--3{left:80%;top:31%}

/* names */
.hero__names{top:0;height:auto}
.names{margin:0;position:absolute;left:0;right:0;top:calc(var(--W)*.122);
  display:flex;flex-direction:column;align-items:center;text-align:center;
  font-family:var(--font-display);font-weight:500;color:#fff;text-transform:uppercase;
  text-shadow:0 calc(var(--W)*.004) calc(var(--W)*.03) rgba(0,40,110,.25)}
.names__first,.names__second{font-size:calc(var(--W)*.121);line-height:.98;letter-spacing:.012em}
.names__weds{font-size:calc(var(--W)*.03);letter-spacing:.14em;line-height:1;margin:calc(var(--W)*.004) 0 calc(var(--W)*.006) .14em}
.names__tag{font-size:calc(var(--W)*.0165);letter-spacing:.2em;font-weight:600;margin-top:calc(var(--W)*.022);margin-left:.2em}

/* temple (centered, bottom anchored) */
.hero__temple{bottom:calc(var(--W)*.06);height:auto}
.hero__temple img{width:min(calc(var(--W)*.86), calc(var(--H)*.485));height:auto;margin:0 auto}

/* trees (foreground, scrolls with page) */
.hero__trees{bottom:calc(var(--W)*-.30);height:auto}
.hero__trees img{width:101%;height:auto;margin-left:-.5%;transform-origin:50% 100%}

/* ---------- Intro (plays once when images are decoded) ---------- */
.hero:not(.is-ready) .hero__layer{opacity:0}
.hero__layer{transition:opacity .9s ease}
.hero.is-ready.intro .hero__sky img{animation:sky-in 1.6s cubic-bezier(.2,.7,.2,1) both}
.hero.is-ready.intro .hero__temple img{animation:temple-in 1.5s .15s cubic-bezier(.2,.7,.2,1) both}
.hero.is-ready.intro .hero__trees img{animation:trees-in 1.5s .1s cubic-bezier(.2,.7,.2,1) both}
.hero.is-ready.intro .names > *{animation:name-in 1.1s .55s cubic-bezier(.2,.7,.2,1) both}
.hero.is-ready.intro .names__weds{animation-delay:.75s}
.hero.is-ready.intro .names__second{animation-delay:.9s}
.hero.is-ready.intro .names__tag{animation-delay:1.15s}
@keyframes sky-in{from{transform:scale(1.08)}to{transform:scale(1)}}
@keyframes temple-in{from{transform:translateY(5%);opacity:0}to{transform:none;opacity:1}}
@keyframes trees-in{from{transform:translateY(8%)}to{transform:none}}
@keyframes name-in{from{opacity:0;transform:translateY(.4em)}to{opacity:1;transform:none}}

/* ---------- Idle life ---------- */
.hero.is-ready .hero__trees img{animation:sway 9s ease-in-out infinite alternate}
.hero.is-ready.intro .hero__trees img{animation:trees-in 1.5s .1s cubic-bezier(.2,.7,.2,1) both, sway 9s 1.6s ease-in-out infinite alternate}
@keyframes sway{from{transform:rotate(-.35deg)}to{transform:rotate(.35deg)}}
.hero.is-ready .orb{animation:orb-float 7s ease-in-out infinite alternate, orb-in 1.4s 1s ease both}
.hero.is-ready .orb--2{animation-duration:8.5s,1.4s;animation-delay:-2s,1.3s}
.hero.is-ready .orb--3{animation-duration:6.5s,1.4s;animation-delay:-4s,1.6s}
@keyframes orb-float{from{transform:translate(0,0)}to{transform:translate(calc(var(--W)*.012),calc(var(--W)*-.02))}}
@keyframes orb-in{from{opacity:0}to{opacity:1}}

/* ---------- Gate on screen: the hero is held STILL in the START pose of its entrance (sky a touch zoomed, temple/trees a touch low, names not yet shown).
   When the gate has fully vanished, js/sections/hero.js swaps `hold` for `intro intro-g` and the entrance plays from exactly this pose, so nothing jumps. ---------- */
.hero.hold .hero__sky img,.hero.hold .hero__temple img,.hero.hold .hero__trees img,.hero.hold .names > *,.hero.hold .orb{animation:none !important}
.hero.hold .hero__sky img{transform:scale(1.08)}
.hero.hold .hero__temple img{transform:translateY(5%)}
.hero.hold .hero__trees img{transform:translateY(8%)}
.hero.hold .names > *{opacity:0;transform:translateY(.4em)}
.hero.hold .orb{opacity:0}
/* entrance after the gate: same as the normal intro, but the temple only rises (it was already visible behind the doors) */
@keyframes temple-rise{from{transform:translateY(5%)}to{transform:none}}
.hero.is-ready.intro.intro-g .hero__temple img{animation-name:temple-rise}
