/* A photographed mural becomes the stage; light changes with each scene beat. */
#gate{
  background:#070d12;
  isolation:isolate;overflow:hidden;
}
#gate::before{
  content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:url('./assets/graffiti-wall-burner.webp') center/cover no-repeat;
  opacity:.94;filter:brightness(.68) saturate(1.18) contrast(1.08);
  transition:filter 1.15s ease,opacity 1s ease;
}
#gate::after{
  content:"";position:absolute;inset:0;z-index:0;pointer-events:none;opacity:.76;
  background:
    radial-gradient(ellipse 42% 30% at 50% 48%,rgba(255,148,73,.20),transparent 72%),
    radial-gradient(ellipse 38% 32% at 54% 66%,rgba(66,165,192,.13),transparent 76%),
    radial-gradient(ellipse 70% 65% at 50% 48%,transparent 35%,rgba(2,5,9,.75) 100%),
    linear-gradient(180deg,rgba(1,5,9,.27),transparent 26%,rgba(1,5,9,.45));
  transition:opacity 1.05s ease;
}
html.intro.logo-develop #gate::before{filter:brightness(.85) saturate(1.22) contrast(1.08)}
html.intro.logo-develop #gate::after{opacity:1}
html.intro.logo-reveal #gate::before{filter:brightness(.9) saturate(1.3) contrast(1.07)}
html.intro.logo-depart #gate::before{filter:brightness(.47) saturate(1.12) contrast(1.1)}
html.intro.logo-depart #gate::after{opacity:.42}
html.deck-entering #gate::before,html.deck-visible #gate::before{filter:brightness(.86) saturate(1.24) contrast(1.06)}
html.deck-entering #gate::after,html.deck-visible #gate::after{opacity:.8}
#gate .gate-card{z-index:2}
#gate-embers{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;opacity:0;mix-blend-mode:screen;transition:opacity .7s ease}
#gate.heat-live #gate-embers{opacity:1}
/* The logo gets its own hold before the deck enters the frame. */
.gate-present{position:absolute;top:calc(100% + 24px);left:-12%;width:124%;text-align:center;color:#e4d3b8;font:600 clamp(10px,1.5vw,14px) var(--font-mono);letter-spacing:.32em;white-space:nowrap;text-shadow:0 0 15px rgba(255,173,103,.34);pointer-events:none}
.gate-present .vapor-letter{display:inline-block;opacity:0}
.gate-present .present-particles{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;opacity:0}
html.intro.logo-reveal .gate-present .vapor-letter{animation:presentSettle .57s ease var(--in-delay) both}
html.intro.logo-depart .gate-present .vapor-letter{animation:presentRelease .2s ease-in var(--out-delay) both}
@keyframes presentSettle{0%,68%{opacity:0}100%{opacity:1}}
@keyframes presentRelease{0%{opacity:1}100%{opacity:0}}
html.intro.logo-develop .gate-logo>.logo-img{opacity:1!important;transition:opacity 1.35s cubic-bezier(.18,.54,.27,1)!important}
html.intro.logo-develop .gate-logo>.laser-traces{opacity:0;transition:opacity 1.25s ease!important}
html.intro.logo-reveal .gate-logo>.logo-img{opacity:1!important}
html.intro.logo-reveal .gate-logo>.laser-traces{opacity:0}
html.intro.logo-depart .gate-logo{opacity:1}
html.intro.logo-depart .gate-logo>:not(.gate-present){opacity:0!important;transition:opacity .8s ease!important}
html.deck-entering .gate-logo,html.deck-visible .gate-logo{display:none}
#gate .deck-scene{opacity:0;transform:translateY(26px) scale(.95);transition:opacity 1.3s cubic-bezier(.2,.75,.2,1),transform 1.5s cubic-bezier(.2,.75,.2,1)}
html.deck-visible #gate .deck-scene{opacity:1;transform:none}
.deck-scene{margin-top:0}
#gate .deck-scene::before{content:"";position:absolute;inset:-22% -18%;z-index:0;pointer-events:none;opacity:0;filter:blur(17px);background:radial-gradient(ellipse 43% 28% at 50% 70%,rgba(0,0,0,.87),transparent 82%),radial-gradient(ellipse 47% 43% at 32% 38%,rgba(238,148,76,.18),transparent 75%),radial-gradient(ellipse 40% 43% at 72% 48%,rgba(69,155,178,.08),transparent 77%);transition:opacity 1.6s ease}
html.deck-visible #gate .deck-scene::before{opacity:1}
.walkman{z-index:2;filter:brightness(1.02) saturate(1.12) contrast(1.08) drop-shadow(4px 27px 27px rgba(0,0,0,.81)) drop-shadow(2px 7px 5px rgba(0,0,0,.64))}
.sport-headphones,.headphone-cord,.headphone-plug{position:absolute;top:0;left:-9%;width:108%;height:auto;filter:brightness(.96) saturate(1.1) contrast(1.06) drop-shadow(0 18px 24px rgba(0,0,0,.75));pointer-events:none;user-select:none}
.sport-headphones{clip-path:polygon(0 0,84% 0,84% 78%,79% 78%,79% 100%,0 100%);transform:none;transition:transform 1.35s cubic-bezier(.2,.75,.2,1) .12s,opacity 1.1s ease .12s}
.headphone-cord,.headphone-plug{--plug-seat:-6%;transform:translateX(6%) translateY(-3px);will-change:transform}
.headphone-cord{clip-path:polygon(84% 0,100% 0,100% 100%,79% 100%,79% 78%,84% 78%)}
.headphone-plug{z-index:3;clip-path:inset(32% 0 50% 92%)}
html.deck-visible .headphone-cord,html.deck-visible .headphone-plug{animation:plugDock 1.25s cubic-bezier(.24,.67,.16,1) .95s both}
html.deck-visible .jack-contact{animation:jackSeat 1.25s ease .95s both}
@keyframes plugDock{0%,22%{transform:translateX(6%) translateY(-3px)}70%{transform:translateX(calc(var(--plug-seat) - .3%))}86%{transform:translateX(calc(var(--plug-seat) + .3%))}100%{transform:translateX(var(--plug-seat))}}
@keyframes jackSeat{0%,65%{stroke:#8d8c59;filter:none}72%{stroke:#ffe38a;filter:drop-shadow(0 0 2px #ffd370)}100%{stroke:#8d8c59;filter:none}}
html.deck-entering .sport-headphones{transform:translateY(38px) rotate(-7deg) scale(.95);opacity:0}
html.deck-visible .sport-headphones{transform:none;opacity:.97}
html.deck-entering .walkman{transform:translateX(-50%) translateY(30px) perspective(900px) rotateX(16deg) rotateY(-6deg) scale(.96)}
html.deck-visible .walkman{transform:translateX(-50%) perspective(900px) rotateX(7deg) rotateY(-3deg)}
@media (max-height:690px) and (min-width:500px) and (max-width:640px){
  .deck-scene{height:330px}
  .walkman{width:330px}
}
html.intro .gate-logo{width:min(760px,89vw);filter:drop-shadow(0 18px 28px rgba(0,0,0,.72))}
.gate-logo .logo-img{position:relative;z-index:2}
.gate-logo::before{
  content:"";position:absolute;inset:-38% -25%;z-index:1;pointer-events:none;opacity:0;
  background:radial-gradient(ellipse 29% 23% at 42% 51%,rgba(255,160,65,.56),rgba(240,77,20,.18) 38%,transparent 79%),radial-gradient(ellipse 22% 32% at 73% 50%,rgba(135,204,229,.18),transparent 78%);
  filter:blur(15px);mix-blend-mode:screen;
}
html.intro.logo-develop .gate-logo::before{animation:identBloom 1.68s cubic-bezier(.22,.55,.27,1) both}
.gate-logo .logo-sheen{
  position:absolute;inset:0;z-index:5;display:block;pointer-events:none;overflow:hidden;opacity:0;
  -webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  mix-blend-mode:screen;will-change:opacity;
}
.gate-logo .cooling-face{position:absolute;inset:0;z-index:3;pointer-events:none;opacity:0;background:linear-gradient(90deg,rgba(15,8,8,.94),rgba(32,10,8,.82) 28%,rgba(23,9,8,.68) 37%,transparent 43%);-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}
html.intro.logo-develop .gate-logo .cooling-face{animation:metalWarmup 2.7s cubic-bezier(.32,.02,.5,1) both}
@keyframes metalWarmup{0%,18%{opacity:1}52%{opacity:.68}78%{opacity:.24}100%{opacity:0}}
.gate-logo .logo-sheen::before{
  content:"";position:absolute;left:0;top:0;width:300%;height:100%;
  background:linear-gradient(105deg,transparent 42%,rgba(255,177,101,.06) 46%,rgba(255,226,180,.28) 48.4%,rgba(255,252,239,.77) 50%,rgba(185,225,238,.27) 51.7%,transparent 57%);
  transform:translate3d(0,0,0);will-change:transform;
}
html.intro.logo-develop .gate-logo .logo-sheen{animation:identSheenOpacity 1.68s linear both}
html.intro.logo-develop .gate-logo .logo-sheen::before{animation:identSheenSweep 1.68s cubic-bezier(.23,.58,.21,1) both}
@keyframes identSheenOpacity{0%{opacity:0}12%{opacity:.2}30%,72%{opacity:.8}100%{opacity:0}}
@keyframes identSheenSweep{from{transform:translate3d(-66.667%,0,0)}to{transform:translate3d(0,0,0)}}
@keyframes identBloom{0%{opacity:0;transform:scale(.9)}22%{opacity:.45}55%{opacity:.75}100%{opacity:.14;transform:scale(1.05)}}
.gate-logo .chrome-ting-mask{position:absolute;inset:0;z-index:6;pointer-events:none;opacity:0;mix-blend-mode:screen;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;background:radial-gradient(ellipse 2.5% 12% at var(--x) var(--y),#fff,rgba(var(--glint-rgb),.8) 22%,transparent 100%),radial-gradient(ellipse 8% 2% at var(--x) var(--y),rgba(255,255,255,.9),transparent 82%)}
.gate-logo .chrome-ting{position:absolute;left:var(--x);top:var(--y);z-index:7;width:var(--size);aspect-ratio:1;pointer-events:none;opacity:0;transform:translate(-50%,-50%) scale(.35);mix-blend-mode:screen;background:radial-gradient(circle,#fff 0 3%,rgba(255,255,255,.98) 4% 6%,rgba(var(--glint-rgb),.86) 8%,rgba(var(--glint-rgb),.26) 16%,transparent 36%);filter:drop-shadow(0 0 2px #fff) drop-shadow(0 0 7px rgba(var(--glint-rgb),.7))}
.gate-logo .chrome-ting::before,.gate-logo .chrome-ting::after{content:"";position:absolute;left:50%;top:50%;background:linear-gradient(90deg,transparent 0%,rgba(var(--glint-rgb),.18) 17%,rgba(255,255,255,.8) 43%,#fff 49%,#fff 51%,rgba(255,255,255,.8) 57%,rgba(var(--glint-rgb),.16) 83%,transparent 100%)}
.gate-logo .chrome-ting::before{width:112%;height:2px;transform:translate(-50%,-50%) rotate(-13deg)}
.gate-logo .chrome-ting::after{width:76%;height:1.5px;transform:translate(-50%,-50%) rotate(77deg)}
html.intro.logo-develop .gate-logo .chrome-ting-mask{animation:chromeTingMask var(--duration) ease-out var(--delay) both}
html.intro.logo-develop .gate-logo .chrome-ting{animation:chromeTing var(--duration) cubic-bezier(.16,.62,.22,1) var(--delay) both}
/* The finished steel gets a second, readable run of catches after the sweep. */
html.intro.logo-reveal .gate-logo .chrome-ting-mask{animation:chromeTingMask .46s ease-out var(--hold-delay) both}
html.intro.logo-reveal .gate-logo .chrome-ting{animation:chromeTing .46s cubic-bezier(.16,.62,.22,1) var(--hold-delay) both}
@keyframes chromeTingMask{0%,100%{opacity:0}12%{opacity:.12}24%{opacity:var(--peak)}47%{opacity:.24}}
@keyframes chromeTing{0%,100%{opacity:0;transform:translate(-50%,-50%) scale(.35)}12%{opacity:.12}24%{opacity:var(--peak);transform:translate(-50%,-50%) scale(1.12)}48%{opacity:.4;transform:translate(-50%,-50%) scale(.92)}76%{opacity:0;transform:translate(-50%,-50%) scale(.7)}}
/* These affect the photographed brick itself, so the wall keeps its mortar
   and paint texture while the same grazing light moves across the metal. */
#gate .chrome-wall-sweep,#gate .chrome-wall-bounce{
  position:fixed;z-index:1;pointer-events:none;opacity:0;
  transform:translate(-50%,-50%);
  -webkit-backdrop-filter:brightness(1.7) saturate(1.13);
  backdrop-filter:brightness(1.7) saturate(1.13);
  -webkit-mask-image:radial-gradient(ellipse at center,#000 0%,rgba(0,0,0,.74) 23%,transparent 76%);
  mask-image:radial-gradient(ellipse at center,#000 0%,rgba(0,0,0,.74) 23%,transparent 76%);
  will-change:transform,opacity;
}
#gate .chrome-wall-sweep{width:clamp(260px,36vw,510px);height:clamp(190px,29vw,380px);background:radial-gradient(ellipse at center,rgba(255,242,213,.055),transparent 68%)}
#gate .chrome-wall-bounce{width:clamp(170px,25vw,330px);height:clamp(150px,20vw,270px);background:radial-gradient(ellipse at center,rgba(var(--glint-rgb),.11),transparent 68%)}
html.intro.logo-develop #gate .chrome-wall-sweep{animation:chromeWallSweep 1.68s cubic-bezier(.23,.58,.21,1) both}
html.intro.logo-develop #gate .chrome-wall-bounce{animation:chromeWallBounce var(--duration) ease-out var(--delay) both}
html.intro.logo-reveal #gate .chrome-wall-bounce{animation:chromeWallBounce .46s ease-out var(--hold-delay) both}
html.deck-entering #gate .chrome-wall-sweep,html.deck-entering #gate .chrome-wall-bounce,
html.deck-visible #gate .chrome-wall-sweep,html.deck-visible #gate .chrome-wall-bounce{display:none}
@keyframes chromeWallSweep{0%{opacity:0;transform:translate(-50%,-50%)}23%{opacity:.27}55%{opacity:.38}100%{opacity:0;transform:translate(calc(-50% + var(--travel)),-50%)}}
@keyframes chromeWallBounce{0%,100%{opacity:0}22%{opacity:var(--wall-peak)}48%{opacity:var(--wall-tail)}}
.gate-logo .heat-wash{
  position:absolute;inset:-75% -65%;z-index:0;pointer-events:none;opacity:0;
  background:
    radial-gradient(ellipse 24% 31% at 36% 51%,rgba(255,80,19,.39),rgba(231,60,12,.14) 38%,transparent 76%),
    radial-gradient(ellipse 33% 28% at 34% 55%,rgba(255,156,54,.17),transparent 78%);
  filter:blur(13px);mix-blend-mode:screen;
}
#gate:not(.heat-live) .gate-logo svg.logo-heat,
#gate:not(.heat-live) .gate-logo svg.logo-reflected{opacity:0}
#gate.heat-live .heat-wash{animation:heatWashIgnite 1.75s ease-out both}
#gate.heat-live .gate-logo svg.logo-heat{
  z-index:4;height:100%;mix-blend-mode:screen;
  filter:brightness(1.32) saturate(1.45) drop-shadow(0 0 3px #ffbc69) drop-shadow(0 0 13px #ff581c);
  animation:coalIgnite 1.75s cubic-bezier(.3,.1,.45,1) both;
}
#gate.heat-live .gate-logo svg.logo-reflected{
  z-index:3;height:100%;mix-blend-mode:screen;
  transition:opacity 1.75s cubic-bezier(.3,.1,.45,1);
  filter:sepia(1) saturate(2.2) hue-rotate(-18deg) brightness(1.08);
}
#gate.heat-live .gate-logo svg.logo-reflected-2{
  opacity:.23;mask-image:linear-gradient(90deg,transparent 37%,#000 39%,rgba(0,0,0,.8) 43%,transparent 53%);
}
#gate.heat-live .gate-logo svg.logo-reflected-3{
  opacity:.1;mask-image:linear-gradient(90deg,transparent 53%,#000 54%,transparent 60%);
}
#gate.heat-live .gate-logo svg.logo-reflected-4{
  opacity:.055;mask-image:linear-gradient(90deg,transparent 68%,#000 69%,transparent 73%);
}
@keyframes heatWashIgnite{0%{opacity:0;transform:translateY(2px) scale(.98)}35%{opacity:.1}72%{opacity:.43}100%{opacity:.69;transform:translateY(2px) scale(.98)}}
@keyframes coalIgnite{0%{opacity:0;filter:brightness(.45) saturate(.8)}35%{opacity:calc(var(--heat-alpha)*.14);filter:brightness(.7) saturate(1)}72%{opacity:calc(var(--heat-alpha)*.58)}100%{opacity:var(--heat-alpha);filter:brightness(1.32) saturate(1.45) drop-shadow(0 0 3px #ffbc69) drop-shadow(0 0 13px #ff581c)}}
.gate-logo .laser-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:5;pointer-events:none;mix-blend-mode:screen}
html.intro.logo-develop .gate-logo .laser-canvas{opacity:0;transition:opacity 1.1s ease}
#gate .laser-reflection{
  position:fixed;left:0;top:0;width:290px;height:290px;z-index:1;pointer-events:none;opacity:0;
  background:radial-gradient(circle,rgba(255,235,188,.32) 0%,rgba(255,147,54,.15) 9%,rgba(230,104,31,.07) 27%,transparent 69%);
  -webkit-backdrop-filter:brightness(1.7) saturate(1.17);
  backdrop-filter:brightness(1.7) saturate(1.17);
  -webkit-mask-image:radial-gradient(circle,#000 0%,rgba(0,0,0,.7) 19%,transparent 71%);
  mask-image:radial-gradient(circle,#000 0%,rgba(0,0,0,.7) 19%,transparent 71%);
  mix-blend-mode:screen;will-change:transform,opacity;
}
#logo-traces path{
  stroke:#452b29;stroke-width:3;fill:none;stroke-linecap:round;stroke-linejoin:round;
  filter:drop-shadow(0 0 1px rgba(0,0,0,.8));
}
@media(max-width:640px){
  #gate::before{background-size:auto 100%;background-position:19% center}
  html.intro .gate-logo{width:min(94vw,760px)}
  .gate-present{top:calc(100% + 17px);letter-spacing:.19em;font-size:10px}
  #gate .laser-reflection{width:190px;height:190px}
  .sport-headphones{width:167%;left:-19%;top:-15px;clip-path:polygon(0 0,100% 0,100% 80%,0 80%)}
  .headphone-cord,.headphone-plug{width:106%;left:3%;top:12px;--plug-seat:-7%}
}
@media (min-width:500px) and (max-width:640px){
  .sport-headphones,.headphone-cord,.headphone-plug{width:108%;left:-9%;top:0}
  .sport-headphones{clip-path:polygon(0 0,84% 0,84% 78%,79% 78%,79% 100%,0 100%)}
  .headphone-cord,.headphone-plug{--plug-seat:-8%}
}
@media(prefers-reduced-motion:reduce){
  #gate::before{transition:none!important}
  #gate::after,.deck-scene,.sport-headphones,.headphone-cord,.headphone-plug,.walkman{transition:none!important}
  .headphone-cord,.headphone-plug,.jack-contact{animation:none!important}
  .headphone-cord,.headphone-plug{transform:translateX(var(--plug-seat))}
  .gate-logo .laser-canvas,#gate .laser-reflection{display:none}
  .gate-logo .logo-sheen{display:none}
  .gate-logo .cooling-face{display:none}
  .gate-logo .chrome-ting,.gate-logo .chrome-ting-mask{display:none}
  #gate .chrome-wall-sweep,#gate .chrome-wall-bounce{display:none}
  .gate-present .vapor-letter{animation:none!important;opacity:1}
  .gate-present .present-particles{display:none}
  #gate.heat-live .heat-wash,#gate.heat-live .gate-logo svg.logo-heat{animation:none}
  #gate-embers{display:none}
}
