/* Hero: the film plays inside a framed gallery screen, a pearl cursor opens the doors, warmer stage light */
.hx{--sw:min(84vw,1360px,calc((100svh - 210px) * 1.7778));--sh:calc(var(--sw) * .5625);--sy:calc(50% + 28px);
  background:radial-gradient(60% 50% at 50% 0%,rgba(255,226,196,.10),transparent 70%),radial-gradient(80% 60% at 50% 100%,rgba(90,30,24,.35),transparent 70%),#0b0907}

/* the screen */
.hx-bg{inset:auto!important;left:50%!important;top:var(--sy)!important;right:auto!important;bottom:auto!important;width:var(--sw);height:var(--sh);translate:-50% -50%!important;border-radius:16px;overflow:hidden;background:#050403;isolation:isolate;
  animation:none!important;transition:none!important;
  box-shadow:0 0 0 1px rgba(255,236,214,.10),0 0 0 9px #0f0c0a,0 0 0 10px rgba(233,207,160,.38),0 0 0 11px rgba(0,0,0,.6),0 60px 120px -40px rgba(0,0,0,.95),0 0 90px 4px rgba(255,214,170,.07)}
.hx-bg img,.hx-bg video.hx-b1{object-position:50% 50%}
.hx-b1{animation:none!important;transform:none!important;will-change:auto}
/* glass: a fixed reflection and one slow sweep of light */
.hx-bg::after{content:"";position:absolute;inset:0;z-index:3;pointer-events:none;border-radius:inherit;
  background:linear-gradient(118deg,rgba(255,255,255,.09) 0%,rgba(255,255,255,.025) 24%,transparent 42%),linear-gradient(0deg,rgba(0,0,0,.28),transparent 22%);box-shadow:inset 0 0 0 1px rgba(255,255,255,.06),inset 0 0 60px rgba(0,0,0,.35)}
.hx-bg::before{content:"";position:absolute;top:-20%;bottom:-20%;left:0;width:22%;z-index:3;pointer-events:none;
  background:linear-gradient(100deg,transparent,rgba(255,244,230,.10) 45%,rgba(255,255,255,.16) 50%,rgba(255,244,230,.10) 55%,transparent);transform:translateX(-120%) skewX(-12deg);animation:hxGlass 9s cubic-bezier(.5,0,.3,1) 3s infinite}
@keyframes hxGlass{0%,62%{transform:translateX(-140%) skewX(-12deg)}100%{transform:translateX(560%) skewX(-12deg)}}
.hx.travel:not(.arrived) .hx-bg::before{animation:none;opacity:0}
/* the screen powers on after the doors */
.hx.intro .hx-bg{animation:hxOn 1.8s cubic-bezier(.2,.7,.2,1) 2.1s both!important}
@keyframes hxOn{0%{opacity:0;scale:.96}100%{opacity:1;scale:1}}

/* bias light: the picture spills colour onto the wall behind */
.hx-amb{position:absolute;z-index:0;left:50%;top:var(--sy);width:var(--sw);height:var(--sh);translate:-50% -50%;pointer-events:none}
.hx-amb img{position:absolute;inset:-6%;width:112%;height:112%;object-fit:cover;filter:blur(60px) saturate(1.35) brightness(.9);opacity:.55;transition:opacity 1.6s}
.hx-amb .a2{opacity:0}
.hx.arrived .hx-amb .a1,.hx[data-step="3"] .hx-amb .a1{opacity:0}
.hx.arrived .hx-amb .a2{opacity:.5}
.hx[data-step="3"] .hx-amb .a2{opacity:.18}
.hx-amb::after{content:"";position:absolute;left:8%;right:8%;top:calc(100% + 6px);height:22%;background:radial-gradient(50% 60% at 50% 0%,rgba(255,220,180,.16),transparent 75%);filter:blur(8px)}
.hx.intro .hx-amb{animation:hxAmb 2.4s ease 2.3s both}
@keyframes hxAmb{from{opacity:0}to{opacity:1}}

/* letterbox bars are not needed now the film sits in a frame */
.hx-bars{display:none}
.hx-door{left:var(--dx,50%)!important;top:var(--dy,65%)!important}
/* text over the screen stays readable */
.hx-scrim{background:radial-gradient(70% 65% at 50% 52%,rgba(8,6,4,0) 40%,rgba(8,6,4,.55) 100%),linear-gradient(180deg,rgba(8,6,4,.55),rgba(8,6,4,0) 34%,rgba(8,6,4,0) 62%,rgba(8,6,4,.5))!important}

/* overhead key light: a soft warm cone over the screen */
.hx-halo{top:-14%!important;height:70%;background:radial-gradient(46% 52% at 50% 32%,rgba(255,236,214,.20),rgba(233,190,140,.07) 55%,transparent 76%)!important}
.hx-halo::before{background:linear-gradient(180deg,rgba(255,242,226,.22),rgba(255,226,200,.05) 70%,transparent)!important}

/* ---------- doors: lighter, warmer, with a slow sheen ---------- */
.hx-leaf{background:
    radial-gradient(90% 50% at 50% -6%,rgba(255,232,200,.20),transparent 62%),
    radial-gradient(60% 40% at 50% 104%,rgba(0,0,0,.45),transparent 70%),
    repeating-linear-gradient(90deg,rgba(255,255,255,.014) 0 2px,transparent 2px 7px),
    linear-gradient(90deg,#0c1d12,#1d4a2c 46%,#133222 100%)}
.hx-leaf.r{background:
    radial-gradient(90% 50% at 50% -6%,rgba(255,232,200,.20),transparent 62%),
    radial-gradient(60% 40% at 50% 104%,rgba(0,0,0,.45),transparent 70%),
    repeating-linear-gradient(90deg,rgba(255,255,255,.014) 0 2px,transparent 2px 7px),
    linear-gradient(270deg,#0c1d12,#1d4a2c 46%,#133222 100%)}
.hx-leaf::before,.hx-leaf::after{border-color:rgba(240,214,166,.55);box-shadow:inset 0 0 0 7px rgba(0,0,0,.18),inset 0 0 0 8px rgba(240,214,166,.22),inset 0 1px 0 9px rgba(255,240,214,.05),0 1px 0 rgba(255,255,255,.06)}
.hx-pull{box-shadow:0 6px 14px rgba(0,0,0,.55),0 0 0 3px rgba(0,0,0,.12),0 0 18px rgba(255,214,150,.35)}
.hx-sheen{position:absolute;inset:0;z-index:4;pointer-events:none;overflow:hidden}
.hx-sheen::before{content:"";position:absolute;top:-10%;bottom:-10%;left:0;width:30%;background:linear-gradient(100deg,transparent,rgba(255,236,206,.10) 42%,rgba(255,246,230,.18) 50%,rgba(255,236,206,.10) 58%,transparent);transform:translateX(-120%) skewX(-14deg)}
.hx.intro .hx-sheen::before{animation:hxSheen 1.5s cubic-bezier(.5,0,.3,1) .15s both}
@keyframes hxSheen{to{transform:translateX(420%) skewX(-14deg)}}

/* ---------- the pearl cursor ---------- */
.hx-hand{display:none!important}
.hx-cur{position:absolute;z-index:8;width:clamp(46px,4.2vw,66px);aspect-ratio:40/50;pointer-events:none;opacity:0;transform-origin:8% 5%;
  filter:drop-shadow(0 14px 18px rgba(0,0,0,.55)) drop-shadow(0 0 14px rgba(255,226,190,.35))}
.hx-cur svg{display:block;width:100%;height:100%;overflow:visible}
.hx-tap{position:absolute;z-index:7;width:0;height:0;pointer-events:none}
.hx-tap i{position:absolute;left:-30px;top:-30px;width:60px;height:60px;border-radius:50%;opacity:0;
  box-shadow:0 0 0 2px rgba(255,236,206,.9),0 0 26px 6px rgba(232,163,176,.55),inset 0 0 18px rgba(255,236,206,.5)}
/* on the doors: glide in, press the seam, leave */
.hx-cur.on-door,.hx-tap.on-door{left:50%;top:38%}
.hx.intro .hx-cur.on-door{animation:hxCurDoor 2.7s cubic-bezier(.3,.7,.2,1) .3s both}
@keyframes hxCurDoor{
  0%{opacity:0;transform:translate(26vw,48vh) rotate(12deg)}
  12%{opacity:1}
  50%{opacity:1;transform:translate(0,0) rotate(-4deg) scale(1)}
  56%{transform:translate(0,0) rotate(-4deg) scale(.8)}
  64%{transform:translate(0,0) rotate(-4deg) scale(1)}
  80%{opacity:1;transform:translate(0,0) rotate(-4deg)}
  100%{opacity:0;transform:translate(5vw,7vh) rotate(6deg)}}
.hx.intro .hx-tap.on-door i{animation:hxTap 1.2s cubic-bezier(.2,.7,.3,1) 1.8s both}
.hx.intro .hx-tap.on-door i+i{animation-delay:1.95s}
@keyframes hxTap{0%{opacity:1;transform:scale(.2)}100%{opacity:0;transform:scale(5)}}
/* on the letter: the cursor brings it in and taps it open */
.hx-carry .hx-cur.on-card,.hx-carry .hx-tap.on-card{left:82%;top:86%}
.hx-carry .hx-cur.on-card{width:clamp(38px,3.4vw,52px)}
.hx[data-step="3"] .hx-cur.on-card{animation:hxCurCard 2.6s cubic-bezier(.3,.7,.2,1) .5s both}
@keyframes hxCurCard{
  0%{opacity:0;transform:translate(40%,180%) rotate(10deg)}
  15%{opacity:1}
  50%{opacity:1;transform:translate(0,0) rotate(-4deg) scale(1)}
  57%{transform:translate(0,0) rotate(-4deg) scale(.8)}
  66%{transform:translate(0,0) rotate(-4deg) scale(1)}
  82%{opacity:1}
  100%{opacity:0;transform:translate(60%,90%) rotate(8deg)}}
.hx[data-step="3"] .hx-tap.on-card i{animation:hxTap 1.1s cubic-bezier(.2,.7,.3,1) 1.85s both}
.hx[data-step="3"] .hx-tap.on-card i+i{animation-delay:2s}

/* phones: a taller screen so the hall still fills it */
@media (max-width:760px){
  .hx{--sw:calc(100vw - 28px);--sh:min(calc(var(--sw) * 1.32),calc(100svh - 250px));--sy:calc(50% + 34px)}
  .hx-bg{border-radius:14px;box-shadow:0 0 0 1px rgba(255,236,214,.10),0 0 0 6px #0f0c0a,0 0 0 7px rgba(233,207,160,.38),0 40px 80px -30px rgba(0,0,0,.95)}
  .hx-cur.on-door,.hx-tap.on-door{top:34%}
}
@media (prefers-reduced-motion:reduce){
  .hx-cur,.hx-tap{display:none}
  .hx-bg::before,.hx-sheen::before{animation:none!important}
  .hx.intro .hx-bg,.hx.intro .hx-amb{animation:none!important}
}
.hx-carry .hx-cur.on-card{width:clamp(44px,3.8vw,58px);filter:drop-shadow(0 10px 14px rgba(40,10,14,.45)) drop-shadow(0 0 1px rgba(58,14,18,.9))}
