/* E.P.C — scroll-driven camera intro (demo)
   Replaces the timed reel in style.css with one continuous camera move
   tied to scroll position. */

.hero-scroll{
  position:relative;
  height:620svh;
}

.hero{
  position:sticky;
  top:0;
  height:100svh;
  min-height:560px;
  overflow:hidden;
  background:#08080a;
}

.stage{
  position:absolute;
  inset:0;
  overflow:hidden;
  transform:none !important;      /* the parallax lives on the layers now */
  background:#08080a;
}

.layer{
  position:absolute;
  inset:0;
  opacity:0;
  transform-origin:50% 50%;
  will-change:transform,opacity;
  backface-visibility:hidden;
  contain:paint;
}

.layer img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:50% 50%;
  transform:none;
  backface-visibility:hidden;
}

/* the dollhouse: shown whole, and its dark ground screened into the page so
   there is no visible frame around it */
.layer[data-shot="0"] img{
  object-fit:contain;
  mix-blend-mode:screen;
}

/* warm haze that tightens as the camera goes deeper */
.hero-glow{
  position:absolute;
  inset:0;
  z-index:2;
  pointer-events:none;
  background:radial-gradient(58% 58% at 50% 52%,rgba(201,169,122,.10),rgba(201,169,122,0) 70%);
  opacity:0;
  mix-blend-mode:screen;
}

.hero-copy{
  transition:none;
  will-change:opacity,transform;
}
.hero-end{transition:none}

/* camera HUD: one tick per shot */
.rail{
  position:absolute;
  z-index:4;
  inset-inline-end:calc(5.5vw - 14px);
  top:50%;
  transform:translateY(-50%);
  display:flex;
  flex-direction:column;
  gap:9px;
}
.rail i{
  display:block;
  width:16px;
  height:1px;
  background:rgba(255,255,255,.22);
  transition:background .3s ease,width .3s ease;
}
.rail i.on{background:var(--brass);width:26px}

@media (max-width:860px){
  .hero-scroll{height:520svh}
  .rail{display:none}
}

/* ---- reduced motion: a single still, no scroll-linked camera ---- */
html.reduced .hero-scroll,
html:not(.js) .hero-scroll{height:auto}

html.reduced .hero,
html:not(.js) .hero{position:relative}

html.reduced .layer,
html:not(.js) .layer{opacity:0;transform:none !important}

html.reduced .layer[data-shot="0"],
html:not(.js) .layer[data-shot="0"]{opacity:1}

html.reduced .hero-copy,
html:not(.js) .hero-copy{opacity:1 !important;transform:none !important}

html.reduced .hero-end,
html:not(.js) .hero-end{opacity:0 !important;pointer-events:none !important}

html.reduced .rail,
html:not(.js) .rail{display:none}

html.reduced .progress,
html:not(.js) .progress{display:none}

html.reduced .skip,
html:not(.js) .skip{display:none}

@media (prefers-reduced-motion:reduce){
  .layer{transition:none}
}
