/* v53 atmosphere + Side A clarity (from the atmosphere mockup v11). Every idea is gated by an html class mk-N. */

/* ---------- 1 Room light: light cone from above, vignette, slow flicker ---------- */
.mk-room{position:fixed;inset:0;pointer-events:none;z-index:40;display:none}
html.mk-1 .mk-room{display:block}
.mk-room .cone{position:absolute;inset:0;mix-blend-mode:screen;
  background:radial-gradient(60% 75% at 50% -12%,rgba(205,220,230,.11) 0%,rgba(205,220,230,.04) 45%,transparent 75%);
  animation:mkFlick 7s steps(1) infinite}
.mk-room .vig{position:absolute;inset:0;background:radial-gradient(120% 95% at 50% 42%,transparent 52%,rgba(0,0,0,.62) 100%)}
@keyframes mkFlick{0%{opacity:1}23%{opacity:.9}24%{opacity:1}61%{opacity:.94}62%{opacity:1}63%{opacity:.88}64%{opacity:1}}

/* ---------- 2 Film grain, v60: over the hero video only (it lives inside .mk-herobg and fades out with it) ---------- */
.mk-grain{position:absolute;inset:-60px;pointer-events:none;z-index:1;display:none;opacity:.075;mix-blend-mode:overlay;
  animation:mkGrain .5s steps(6) infinite}
html.mk-2 .mk-grain{display:block}
@keyframes mkGrain{0%{transform:translate(0,0)}17%{transform:translate(-23px,11px)}33%{transform:translate(17px,-29px)}
  50%{transform:translate(-9px,31px)}67%{transform:translate(29px,7px)}83%{transform:translate(-31px,-17px)}}

/* ---------- 3 Screen spill: the Side A monitor lights the metal around it ---------- */
.mk-spill{position:absolute;pointer-events:none;z-index:30;display:none;mix-blend-mode:screen;opacity:.3;
  filter:blur(70px) saturate(1.3);background-size:cover;background-position:center;
  -webkit-mask:radial-gradient(closest-side,#000 35%,transparent 100%);mask:radial-gradient(closest-side,#000 35%,transparent 100%);
  animation:mkBreathe 4.2s ease-in-out infinite}
html.mk-3 .mk-spill{display:block}
@keyframes mkBreathe{50%{opacity:.22}}

/* ---------- 4 Hero: full-bleed moving picture instead of the boxed placeholder ---------- */
.mk-herobg{display:none}
html.mk-4 .hero{position:relative;min-height:calc(100vh - 60px);display:flex;flex-direction:column;justify-content:center;align-items:center;isolation:isolate}
html.mk-4 .hero .filmgate{display:none}
html.mk-4 .mk-herobg{display:block;position:absolute;top:-90px;bottom:0;left:calc(50% - 50vw);width:100vw;z-index:-1;overflow:hidden}
.mk-herobg video{width:100%;height:100%;object-fit:cover;opacity:.5;filter:grayscale(.35) contrast(1.1) brightness(.8)}
.mk-herobg::after{content:"";position:absolute;inset:0;
  background:linear-gradient(to bottom,rgba(7,9,10,.55) 0%,transparent 30%,transparent 55%,#07090a 100%),
             radial-gradient(70% 60% at 50% 45%,transparent 30%,rgba(7,9,10,.7) 100%)}
.mk-herobg .standin{position:absolute;right:16px;bottom:14px;font:500 10px/1 'Azeret Mono',monospace;letter-spacing:.12em;color:#7d8a90;text-transform:uppercase}
.mk-heroplay{display:none}
html.mk-4 .mk-heroplay{display:inline-flex;align-items:center;gap:.7em;margin-top:28px;padding:14px 26px;border:1px solid rgba(242,240,235,.55);background:rgba(2,3,3,.35);
  color:#f2f0eb;font:400 15px/1 'Azeret Mono',monospace;letter-spacing:.22em;text-transform:uppercase;cursor:pointer;
  text-shadow:1px 0 rgba(255,40,60,.5),-1px 0 rgba(40,220,255,.5);backdrop-filter:blur(2px);transition:background .2s,border-color .2s}
html.mk-4 .mk-heroplay:hover{background:rgba(242,240,235,.1);border-color:#f2f0eb}
.mk-heroplay small{font-size:11px;opacity:.6;letter-spacing:.14em}
.mk-cue{display:none}
html.mk-4 .mk-cue{display:block;position:absolute;bottom:22px;left:50%;transform:translateX(-50%);font:500 10px/1 'Azeret Mono',monospace;letter-spacing:.3em;color:#8a979c;text-transform:uppercase;animation:mkCue 2.4s ease-in-out infinite}
@keyframes mkCue{50%{transform:translate(-50%,6px);opacity:.5}}

/* ---------- 5 Lights down: Play dims the room, VHS PLAY screen, then the reel ---------- */
html.mk-5 dialog.theater[open]::backdrop{background:rgba(0,0,0,.985);animation:mkDim .9s ease-out both}
@keyframes mkDim{from{background:rgba(0,0,0,0)}}
html.mk-5 dialog.theater[open] .theater-frame{box-shadow:0 0 140px rgba(120,150,170,.12);animation:mkOn .5s .55s ease-out both;container-type:size}
@keyframes mkOn{0%{opacity:0;transform:scaleY(.004)}55%{opacity:1;transform:scaleY(.02)}100%{opacity:1;transform:none}}
.mk-tosd{position:absolute;inset:0;z-index:3;background:#020303;overflow:hidden;pointer-events:none;animation:mkOff .01s 2.3s forwards}
@keyframes mkOff{to{opacity:0;visibility:hidden}}
.mk-tosd .snow{position:absolute;inset:-50%;background:url(../metal/copyscan-graded.webp) 0 0/30cqh;opacity:.35;mix-blend-mode:screen;animation:snow .12s steps(3) infinite}
.mk-tosd .trk{position:absolute;left:0;right:0;top:-12%;height:9%;background:linear-gradient(transparent,rgba(255,255,255,.18),transparent);animation:trk 1.3s linear infinite}
.mk-tosd .txt{position:absolute;left:6%;top:8%;font:400 6.5cqh/1 'Azeret Mono',monospace;color:#f2f0eb;letter-spacing:.08em;
  text-shadow:.35cqh 0 rgba(255,40,60,.55),-.35cqh 0 rgba(40,220,255,.55);animation:blink .5s steps(2) infinite}
.mk-tosd .tc{position:absolute;right:6%;bottom:9%;font:400 4.4cqh/1 'Azeret Mono',monospace;color:#f2f0eb;letter-spacing:.08em;opacity:.9}
html.mk-5 .theater-x{opacity:.35;transition:opacity .3s}
html.mk-5 .theater-x:hover{opacity:1}

/* ---------- 6 Side A monitor is a play button ---------- */
.mk-hov{display:none}
html.mk-6 .side-a .pvwin{cursor:pointer}
html.mk-6 .side-a .pvwin .mk-hov{display:grid;place-items:center;position:absolute;inset:0;z-index:7;opacity:0;transition:opacity .18s;pointer-events:none;
  background:rgba(2,3,3,.35);container-type:size}
html.mk-6 .side-a .pvwin:hover .mk-hov{opacity:1}
.mk-hov b{font:400 11cqh/1 'Azeret Mono',monospace;color:#f2f0eb;letter-spacing:.12em;
  text-shadow:.5cqh 0 rgba(255,40,60,.55),-.5cqh 0 rgba(40,220,255,.55)}
.mk-hov i{position:absolute;right:6%;bottom:9%;font:normal 400 4.4cqh/1 'Azeret Mono',monospace;color:#f2f0eb;letter-spacing:.08em;opacity:.85}

/* ---------- 7 PLAY REEL key: breathing READY lamp + engraved caption ---------- */
.mk-cap,.mk-lamp{display:none}
html.mk-7 .mk-cap{display:block;position:absolute;z-index:6;text-align:center;white-space:nowrap;pointer-events:none;
  font:600 10px/1 'Archivo Narrow','Arial Narrow',sans-serif;letter-spacing:.2em;text-transform:uppercase;color:#f3f0e8;opacity:.85}
html.mk-7 .mk-lamp{display:none;position:absolute;z-index:6;width:8px;height:8px;border-radius:50%;pointer-events:none;
  background:radial-gradient(circle at 40% 35%,#ffe7a8,#ffb028 55%,#8a4d00);box-shadow:0 0 8px 2px rgba(255,170,40,.7);animation:mkLamp 2.2s ease-in-out infinite}
@keyframes mkLamp{50%{box-shadow:0 0 3px 0 rgba(255,170,40,.35);filter:brightness(.6)}}

/* ---------- 8 Prev/Next go quiet while there is only one year to pick ---------- */
html.mk-8 .side-a button.rk[aria-label$="year"]{opacity:.38;filter:grayscale(1);pointer-events:none;cursor:default}



/* v04: no VHS snow/PLAY screen when the reel starts (Side A windows) */
.side-a .osd,.side-a .osd.on{display:none!important}
/* v04: hero picture fades out under the thorn line into the page instead of ending on a flat colour band */
html.mk-4 .mk-herobg{bottom:-220px;-webkit-mask:linear-gradient(to bottom,#000 0,#000 52%,rgba(0,0,0,.55) 72%,transparent 100%);mask:linear-gradient(to bottom,#000 0,#000 52%,rgba(0,0,0,.55) 72%,transparent 100%)}
.mk-herobg::after{background:linear-gradient(to bottom,rgba(7,9,10,.55) 0%,transparent 30%),radial-gradient(70% 60% at 50% 45%,transparent 30%,rgba(7,9,10,.55) 100%)!important}
html.mk-4 .mk-herobg .standin{bottom:auto;top:100px;right:120px;opacity:.7}

/* v06: long side lines under the top ornaments; bigger hero logo */
.mk-slx{position:absolute;z-index:45;pointer-events:none;height:auto}
.mk-slx.m{transform:scaleX(-1)}
html.mk-4 #heroLogo{width:min(clamp(300px,60vw,760px),calc(100vw - 32px),calc((100vh - 300px) * 1840 / 1415))}

/* v07: hero content sits higher so the thorn line and scroll cue fit on the first screen */
html.mk-4 .hero{justify-content:flex-start;padding-top:8px;min-height:calc(100vh - 80px)}
html.mk-4 .hero .tagline{margin-top:-22px;position:relative}
html.mk-4 .mk-heroplay{margin-top:18px}
/* v09: the long side lines pass behind the A/B panels instead of over them */
html.mk-4 .mk-slx{z-index:1}
html.mk-4 #reel{position:relative;z-index:2}

/* v54: on tall/large screens (1440p, 4K) the tagline / Play reel / thorn line / cue block stays at the bottom of
   the first screen, where it sits at 1440x900, instead of floating high; above 1080 tall the logo grows with the
   screen height (same 760px up to 1080p) so the top doesn't sit empty. */
html.mk-4 .hero{justify-content:flex-end;padding-bottom:146px;box-sizing:border-box}
html.mk-4 #heroLogo{width:min(clamp(300px,60vw,max(760px,calc((100vh - 560px) * 1840 / 1415))),1400px,calc(100vw - 32px),calc((100vh - 300px) * 1840 / 1415))}
html.mk-4 #heroLogo{max-width:none}
/* v54: until atmos.js has placed them, the thorn line and top side ornaments stay hidden (no flash over the logo) */
html.mk-4 img.mx-orn2[src$="orn-mid.png"]:not([data-mkpos]),html.mk-4 img.mx-orn2[src$="orn-tl.png"]:not([data-mk]){visibility:hidden}

/* v58 phone: the logo block sits in the middle of the first screen instead of leaving the top 40% empty */
@media (max-width:700px) and (orientation:portrait){html.mk-4 .hero{justify-content:center;padding-bottom:120px}}
/* v58 phone held sideways: the logo was ~120px wide; give it the height the tagline block doesn't need */
@media (max-height:500px) and (orientation:landscape){
  html.mk-4 #heroLogo{width:min(52vw,calc((100vh - 120px) * 1840 / 1415))}
  html.mk-4 .hero{padding-bottom:110px}}
