/* =========================================================
   Refinements (round 2) — loaded after style.css
   ========================================================= */
/* nav: soft scrim so the links stay readable over the hero image */
.nav::before{content:"";position:absolute;inset:0 0 -56px 0;background:linear-gradient(180deg,rgba(4,4,26,.78),rgba(4,4,26,.4) 55%,rgba(4,4,26,0));pointer-events:none;z-index:-1;transition:opacity .4s}
.nav.solid::before{opacity:0}

/* card hover: yellow ring + soft haze */
.arch{transition:transform .5s var(--stop),box-shadow .45s,border-color .3s}
.card:hover .arch,.card:focus-within .arch{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent),0 0 38px 6px color-mix(in srgb,var(--accent) 42%,transparent)}
.card:hover h3{color:var(--accent)}

/* slow breathing zoom on the full-bleed backgrounds */
.passage .bg,.cta .bg{transform-origin:50% 55%;animation:kb 32s ease-in-out infinite alternate;will-change:transform}
@keyframes kb{from{transform:scale(1)}to{transform:scale(1.12)}}

/* Coraline's button eyes: teal → glowing yellow, stepped like a stop-motion colour swap */
.mk-frame .eye{position:absolute;top:37.3%;width:12.4%;aspect-ratio:1;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none;background:none;mix-blend-mode:normal;opacity:1;animation:none}
.mk-frame .eye::before{content:"";position:absolute;inset:0;border-radius:50%;background:#f0b52a;mix-blend-mode:color;opacity:0;animation:eyeColor 4.8s steps(14) infinite}
.mk-frame .eye::after{content:"";position:absolute;inset:-55%;border-radius:50%;background:radial-gradient(closest-side,rgba(255,214,90,.9),rgba(255,168,40,.38) 52%,transparent 72%);mix-blend-mode:screen;opacity:0;animation:eyeColor 4.8s steps(14) infinite}
.mk-frame .e2::before,.mk-frame .e2::after{animation-delay:.1s}
@keyframes eyeColor{0%,22%{opacity:0}42%,72%{opacity:1}92%,100%{opacity:0}}

/* candle: brighter flame + warm halo */
.candle .flame{left:44%;top:-6%;width:46%;background:radial-gradient(closest-side,#fffbe0 0%,rgba(255,226,130,.98) 24%,rgba(255,160,50,.7) 52%,transparent 74%);filter:drop-shadow(0 0 18px rgba(255,170,60,.9))}
.candle::before{content:"";position:absolute;left:44%;top:0;width:340%;aspect-ratio:1;transform:translate(-50%,-34%);background:radial-gradient(closest-side,rgba(255,186,80,.42),rgba(255,150,40,.12) 55%,transparent 72%);mix-blend-mode:screen;pointer-events:none;animation:halo .5s steps(1) infinite}
@keyframes halo{0%{opacity:1;transform:translate(-50%,-34%) scale(1)}33%{opacity:.82;transform:translate(-50%,-34%) scale(.96)}66%{opacity:.95;transform:translate(-50%,-34%) scale(1.04)}}

/* "Meet the Beldam": voice button */
.btn .eq{display:none;align-items:flex-end;gap:3px;height:14px}
.btn .eq i{display:block;width:3px;height:100%;background:currentColor;border-radius:2px;transform-origin:bottom;animation:eqb .5s steps(4) infinite alternate}
.btn .eq i:nth-child(2){animation-delay:.12s}.btn .eq i:nth-child(3){animation-delay:.24s}.btn .eq i:nth-child(4){animation-delay:.06s}
@keyframes eqb{from{transform:scaleY(.25)}to{transform:scaleY(1)}}
.btn[aria-pressed="true"]{background:var(--accent);color:var(--inv)}
.btn[aria-pressed="true"] .eq{display:inline-flex}
.btn[aria-pressed="true"] .ico{display:none}

/* hands + key: 1600×720 stage, same coordinates as the Figma break frame */
.hands{position:absolute;left:50%;top:0;width:min(100%,1600px);aspect-ratio:1600/720;transform:translateX(-50%);z-index:2;pointer-events:none}
.hands img{position:absolute;display:block;max-width:none;height:auto}
.hands .hand-open{left:42.25%;top:-51.53%;width:15.56%}
.hands .hand-fist{left:44.19%;top:-47.36%;width:11.63%;opacity:0}
.hands .keyw{position:absolute;left:47.19%;top:17.08%;width:5.625%;transform:none}
.hands .keyw img{position:static;width:100%;filter:drop-shadow(0 10px 18px rgba(0,0,0,.6))}
.break.in .hand-open{animation:hOpen 9s steps(22) infinite}
.break.in .hand-fist{animation:hFist 9s steps(22) infinite}
.break.in .keyw{animation:hKey 9s steps(22) infinite}
@keyframes hOpen{0%{transform:translateY(-42%);opacity:1}26%{transform:translateY(0);opacity:1}26.01%,100%{transform:translateY(0);opacity:0}}
@keyframes hFist{0%,26%{transform:translateY(0);opacity:0}26.01%{transform:translateY(0);opacity:1}58%{transform:translateY(0);opacity:1}88%{transform:translateY(-100%);opacity:1}88.01%,100%{transform:translateY(-100%);opacity:0}}
@keyframes hKey{0%{transform:translateY(0);opacity:1}58%{transform:translateY(0);opacity:1}88%{transform:translateY(-175%);opacity:1}88.01%,99.9%{transform:translateY(-175%);opacity:0}100%{transform:translateY(0);opacity:1}}
@media (max-width:700px){.hands{width:260%}.break{min-height:560px}}

/* making: pinned scroll — buttons and thread light up until the key */
.making{overflow:clip}
.steps-pin{height:230vh;margin-top:clamp(32px,4vw,64px);position:relative}
.steps-sticky{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;justify-content:center;padding-top:72px}
.steps-title{display:none}
.steps{display:grid;grid-template-columns:repeat(4,1fr);gap:24px clamp(24px,2.5vw,40px);margin-top:0}
.step .thread{display:flex;align-items:center;gap:16px;margin-bottom:20px;height:44px}
.step .bt{width:44px;height:44px;flex:none;color:var(--bone-100);--btn-hole:var(--night-950);opacity:.28;transform:scale(.82);transition:opacity .3s,transform .4s var(--stop),filter .3s}
.step .line{flex:1;height:0;border-top:2px dashed var(--yellow-300);transform-origin:left;transform:scaleX(var(--line,0))}
.step .tkey{width:56px;height:22px;color:var(--yellow-300);flex:none;opacity:.22;transform:scale(.8);transition:opacity .3s,transform .5s var(--stop),filter .3s}
.step .n,.step h3,.step p{opacity:.28;transition:opacity .45s}
.step .n{display:block;font:italic 400 18px/1.3 var(--display);color:var(--yellow-300);margin-bottom:16px}
.step h3{font:400 clamp(26px,2.3vw,36px)/1.1 var(--display);margin-bottom:16px;color:var(--bone-100)}
.step p{font:15px/1.6 var(--body);color:var(--text2);max-width:24em}
.step.on .bt{opacity:1;transform:scale(1);filter:drop-shadow(0 0 12px rgba(246,220,102,.75))}
.step.on .n,.step.on h3,.step.on p{opacity:1}
.step.key-on .tkey{opacity:1;transform:scale(1.15) rotate(-8deg);filter:drop-shadow(0 0 14px rgba(246,220,102,.9))}
@media (max-width:1100px){.steps{grid-template-columns:repeat(2,1fr)}}
@media (max-width:700px){.steps-pin{height:200vh}.steps-title{display:block;font-size:34px;color:var(--yellow-300);margin-bottom:28px}.steps.scroller{overflow-x:hidden;scroll-snap-type:none}.steps.scroller>*{flex-basis:80%}}
@media (prefers-reduced-motion:reduce){.steps-pin{height:auto}.steps-sticky{position:static;height:auto;padding-top:0}}

/* =========================================================
   Layout alignment with the Figma 1600 frames (measured)
   ========================================================= */
.sh{margin-bottom:24px}
.sec h2{margin-bottom:24px}
.sec .sh+h2{margin-top:0}

@media (min-width:1101px){
  /* 01 palace: text 700 / arch 640×780, both centred on the same axis, 146px above and below */
  .palace{padding-block:146px}
  .palace .grid-2{grid-template-columns:minmax(0,700px) minmax(0,640px);justify-content:space-between}
  .palace .col-art .cq{aspect-ratio:640/780}
  .stats{margin-top:64px}
  /* 03 other world / 05 cast: cards start at fixed distance under the lede */
  .other{padding-block:128px 140px}
  .other .cards{margin-top:111px}
  .other .cards-3 .card:nth-child(2) .arch{margin-top:0}
  .other .cards-3 .card:nth-child(1){padding-top:11px}
  .cast{padding-block:128px 150px}
  .cast .cards{margin-top:119px}
  .card h3{margin:24px 0 8px}
  .card .tag{margin-bottom:8px}
  /* 04 beldam: image 620×820 at x=80, copy at x=820 */
  .beldam{padding-block:141px}
  .beldam .grid-2.rev{grid-template-columns:minmax(0,620px) minmax(0,700px);justify-content:space-between}
  .bel-frame{aspect-ratio:620/820}
  /* 06 trailer */
  .trailer{padding-block:128px}
  .player{margin-top:64px}
  /* 08 making */
  .making{padding-top:128px}
  .making-top{grid-template-columns:minmax(0,740px) minmax(0,620px);justify-content:space-between}
  .spec-grid{margin-top:104px}
  /* 09 verdict */
  .verdict{padding-block:140px 120px}
  .verdict-grid{grid-template-columns:minmax(0,640px) minmax(0,720px);justify-content:space-between}
  .door-line{margin-top:91px}
  /* final cta */
  .cta h2{max-width:1200px;text-wrap:wrap}
}
.making-top{align-items:center}
.spec{min-height:226px;padding:44px 48px;gap:12px;justify-content:flex-start}
.spec .v{margin:0;padding:0}

/* 07 takes: 70px black bands, film strips 320px tall with perforations 3px from the edge */
.takes{border-block-width:clamp(32px,4.4vw,70px);padding-top:clamp(40px,3.6vw,58px);padding-bottom:20px}
.reels{margin-top:clamp(40px,6.7vw,107px);gap:60px}
.reel{height:320px;padding:46px 0 0}
.reel::before{top:3px}.reel::after{bottom:3px}
.rtrack{padding:0 0 0 15px}
.reel-meta{margin-top:25px}

/* ---------- round 3 ---------- */
/* eyes: a translucent tint exactly the size of each button, cycling through the whole colour wheel (hue-rotate, stepped ~10 fps) */
.mk-frame .eye{width:11.7%;top:37.4%;animation:eyeHue 10s steps(100) infinite;filter:hue-rotate(0deg)}
.mk-frame .eye::before{inset:0;background:radial-gradient(circle,#f2b92e 0 58%,rgba(242,185,46,.5) 66%,transparent 74%);mix-blend-mode:color;opacity:0;animation:eyeFade 5s steps(20) infinite}
.mk-frame .eye::after{inset:-18%;background:radial-gradient(closest-side,rgba(255,214,90,.55),rgba(255,168,40,.2) 55%,transparent 72%);mix-blend-mode:screen;opacity:0;animation:eyeFade 5s steps(20) infinite}
.mk-frame .e2{animation-delay:.2s}
.mk-frame .e2::before,.mk-frame .e2::after{animation-delay:0s}
@keyframes eyeHue{to{filter:hue-rotate(360deg)}}
@keyframes eyeFade{0%,8%{opacity:0}30%,70%{opacity:.42}92%,100%{opacity:0}}

/* footer credit: label and logo share one centre line */
.credit{align-items:center;line-height:1}
.credit>span{display:inline-flex;align-items:center;height:22px;line-height:1;transform:translateY(1px)}
.credit .sig{display:inline-flex;align-items:center;height:22px}
.credit .sig img{display:block}

/* stronger breathing zoom on passage + final cta */
.passage .bg,.cta .bg{animation:kb2 20s ease-in-out infinite alternate}
@keyframes kb2{from{transform:scale(1)}to{transform:scale(1.3)}}

/* eyes: each overlay matches its own button (left one is larger and lower in the still) */
.mk-frame .e1{left:37.9%;top:40.2%;width:13.2%}
.mk-frame .e2{left:55.7%;top:37.3%;width:11.9%}

/* ---------- mobile (round 3): steps become a real horizontal swipe row ---------- */
@media (max-width:700px){
  .steps-pin{height:auto;margin-top:40px}
  .steps-sticky{position:static;height:auto;padding-top:0}
  .steps.scroller{display:flex;grid-template-columns:none;overflow-x:auto;scroll-snap-type:x mandatory;gap:20px;padding-inline:var(--m);margin-inline:calc(var(--m) * -1);scroll-padding-inline:var(--m);scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  .steps.scroller::-webkit-scrollbar{display:none}
  .steps.scroller>.step{flex:0 0 78%;scroll-snap-align:start}
  .step .thread{height:44px}
  .spec{padding:24px}
  .spec-grid.scroller .spec{min-height:190px}
  .k6{left:auto;right:6%;top:-40px}
  .footer{padding-bottom:150px}
  .walker{bottom:8px;width:90px}
  .steps-hint{display:block}
}
.steps-hint{display:none}

/* ---------- mobile (round 4) ---------- */
@media (max-width:700px){
  /* footer: door aligned with the text column on the left; watermark fully visible and below the content */
  .f-top{flex-direction:column-reverse;align-items:flex-start;gap:24px}
  .f-door{align-self:flex-start;width:min(46%,180px);margin:0}
  .footer{padding-bottom:200px}
  .ghost-word{font-size:clamp(88px,25vw,140px);bottom:14px;line-height:1;width:100%;text-align:center;left:0;transform:none;-webkit-text-stroke:1.2px rgba(246,220,102,.16)}
  .walker{bottom:34px;width:84px;z-index:2}
  .f-bottom{padding-bottom:12px}
  /* takes: key and ghost no longer stack on each other */
  .ghost-wrap{width:190px;margin:0 0 -6px auto;position:relative}
  .takes .k5{left:-58%;top:26%;width:84px}
  .rec{margin-top:-14px}
  /* trailer: smaller play button */
  .play{width:56px;margin-bottom:8px}
  .play::before{inset:-8px;border-width:1.5px}
  .pt{font-size:22px}
  .player-cta .hand{font-size:22px}
  .player-cta{gap:2px}
}
