/* Entrance v9 (Pete 11-28 10:24 AM PST, app-developer #264: "go with entrance v9" · "stich it to the site").
   The home opens on the entrance film; the scroll scrubs it (js/entrance.js); its last frame is the hero dome, which this
   layer dims to exactly the hero's look (.hero-loop filter + ::after + .vignette, v2.css/site.css) before it fades out over
   the live hero. Only on html.entrance (set in index.html's head: first visit this session, no deep link, motion + WebGL ok). */
#entrance { display: none; }
html.entrance #entrance { display: block; position: fixed; inset: 0; z-index: 1000; overflow: hidden; touch-action: none; overscroll-behavior: none;
  background: #050403 url(../media/temple/loop/dome.jpg) center / cover no-repeat; transition: opacity .9s ease; }
html.entrance #entrance.out { opacity: 0; pointer-events: none; }
html.entrance #entrance.skip-out { transition-duration: .55s; }
/* the film, sized by entrance.js to the dome's own cover box (the film is the dome's centre 1920x1080 of 1920x1084) */
#entrance .ent-film { position: absolute; left: 50%; top: 50%; width: 100%; height: 100%; display: block; object-fit: cover; transform: translate(-50%, -50%);
  background: #050403 center / cover no-repeat; }
/* the hero's own dimming, faded in over the film's last stretch (--ent-dim 0 -> 1) */
#entrance .ent-dim { position: absolute; inset: 0; pointer-events: none; opacity: var(--ent-dim, 0);
  background: radial-gradient(70% 60% at 50% 46%, rgba(6,10,8,.25), rgba(4,8,6,.78) 100%), linear-gradient(180deg, rgba(4,8,6,.35), transparent 30%, transparent 70%, rgba(4,8,6,.7)),
    linear-gradient(rgba(0,0,0,.22), rgba(0,0,0,.22)); }   /* the last layer = the hero video's brightness(.78), without animating a filter on a 5K video layer */
#entrance .ent-vig { position: absolute; inset: 0; pointer-events: none; opacity: var(--ent-dim, 0); background: radial-gradient(120% 90% at 50% 45%, transparent 52%, rgba(0,0,0,.62)); }
#entrance .ent-skip { position: absolute; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 2; margin: 0; padding: 9px 14px;
  font: 500 12px/1 Montserrat, system-ui, sans-serif; letter-spacing: .26em; text-transform: uppercase; color: #e8c47a; background: rgba(5,4,3,.45);
  border: 1px solid rgba(232,196,122,.5); border-radius: 2px; cursor: pointer; transition: opacity .4s, background .2s; }
#entrance .ent-skip:hover, #entrance .ent-skip:focus-visible { background: rgba(5,4,3,.75); }
#entrance .ent-cue { position: absolute; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); z-index: 2; transform: translateX(-50%); margin: 0; pointer-events: none;
  font: 500 12px/1 Montserrat, system-ui, sans-serif; letter-spacing: .3em; text-transform: uppercase; color: #e8c47a; text-shadow: 0 1px 8px #000; white-space: nowrap; transition: opacity .6s; }
#entrance.moved .ent-cue { opacity: 0; }
#entrance.late .ent-skip { opacity: 0; pointer-events: none; }
@media (pointer: coarse) { html.entrance #entrance { bottom: auto; height: 100lvh; } }   /* same box as .hero-loop on phones (phone.css) */
@media (max-width: 760px) { #entrance .ent-cue { bottom: max(64px, calc(env(safe-area-inset-bottom) + 48px)); } }
/* phones: the hero is the dome the film lands on, not the portrait photograph (rail.css .hero-portrait), so the handoff has
   no cut; a session that skipped the entrance keeps the photograph hero as before */
html.entrance .hero-portrait, html.entered .hero-portrait { display: none; }
/* ...and the gallery's waiting photo layer (#vision, z 2), which the portrait used to cover, stays hidden while the hero is up */
html.entrance #vision, html.entered.in-hero #vision { visibility: hidden; }
html.entrance #home .ph-fill, html.entered #home .ph-fill { display: none; }   /* ...and the phone hero's photo fill (reading-flow) */
/* #270 (Pete 11-28): a Play button from the very start: skips the door and runs the auto-show at 1.5x */
#entrance .ent-play { position: absolute; left: 50%; bottom: max(64px, calc(env(safe-area-inset-bottom) + 48px)); transform: translateX(-50%); z-index: 2; margin: 0;
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; font: 600 13px/1 Montserrat, system-ui, sans-serif; letter-spacing: .24em; text-transform: uppercase;
  color: #140d05; background: linear-gradient(180deg, #ffe2a3, #d9a64e); border: 0; border-radius: 2px; cursor: pointer; box-shadow: 0 6px 30px rgba(0,0,0,.55); transition: opacity .4s, filter .2s; }
#entrance .ent-play b { font-weight: 400; }
#entrance .ent-play:hover, #entrance .ent-play:focus-visible { filter: brightness(1.08); }
#entrance.moved .ent-play { opacity: 0; pointer-events: none; }
@media (max-width: 760px) { #entrance .ent-play { bottom: max(108px, calc(env(safe-area-inset-bottom) + 92px)); } }
