/* v2 world: stage, layers, sprites, grounds, festival widgets */
* { box-sizing: border-box; }
html, body { margin: 0; background: #72c6ee; color: #22325a; font-family: 'DM Sans', system-ui, sans-serif; overscroll-behavior: none; }
#scroller { width: 1px; }
#stage { position: fixed; inset: 0; overflow: hidden; }
#sky { position: absolute; inset: 0; background: linear-gradient(#72c6ee, #d6f1fd); }
.layer { position: absolute; left: 0; bottom: 0; width: 0; height: 0; transform-origin: 0 100%; will-change: transform; }
#stage .layer > * { position: absolute; }
.hang { height: 0; }
#stage .layer > .hang > * { position: absolute; top: 0; left: 0; }
.hang.out { animation: hangOut .35s ease-in forwards; }
@keyframes hangOut { to { translate: 0 -700px; opacity: 0; } }

/* night festival sky */
#night { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
#night .stars { position: absolute; inset: 0 0 35% 0; animation: twinkle 3s ease-in-out infinite alternate;
  background: radial-gradient(1.5px 1.5px at 20px 30px, #fff 50%, transparent 52%), radial-gradient(1px 1px at 95px 85px, #fff 50%, transparent 52%),
    radial-gradient(2px 2px at 160px 22px, #fff4c8 50%, transparent 52%), radial-gradient(1px 1px at 60px 140px, #fff 50%, transparent 52%);
  background-size: 210px 170px; }
#night .beam { position: absolute; bottom: 18%; width: 200px; height: 130vh; transform-origin: 50% 100%;
  background: linear-gradient(to top, rgba(255,214,120,.32), rgba(255,214,120,0) 85%); clip-path: polygon(42% 100%, 58% 100%, 100% 0, 0 0);
  animation: sweep 7s ease-in-out infinite alternate; }
#night .b1 { left: 8%; }
#night .b2 { left: 46%; animation-delay: -2.4s; background: linear-gradient(to top, rgba(255,120,190,.28), transparent 85%); }
#night .b3 { left: 82%; animation-delay: -4.8s; }
@keyframes sweep { from { transform: rotate(-26deg); } to { transform: rotate(26deg); } }
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }

/* sprites */
.sp { transform: translateX(-50%); pointer-events: none; }
.sp img { display: block; width: auto; }
/* flip the wrapper, not the image, so image animations (bob, sway) can't spin a flipped sprite around its axis */
.sp.flip { transform: translateX(-50%) scaleX(-1); }
.bob img { animation: bob 2.6s ease-in-out infinite; }
.sway img { transform-origin: 50% 100%; animation: sway 4s ease-in-out infinite; }
.drift { animation: drift 10s ease-in-out infinite alternate; }
.thump img { transform-origin: 50% 100%; animation: thump .47s ease-in-out infinite; }
.fan.in img { animation: cheer .95s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes bob { 50% { transform: translateY(-14px); } }
@keyframes sway { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(2.5deg); } }
@keyframes drift { to { margin-left: 80px; } }
@keyframes thump { 50% { transform: scale(1.035, .98); } }
@keyframes cheer { 0%,100% { transform: translateY(0); } 40% { transform: translateY(-28px); } }

/* reveals */
.pop { opacity: 0; }
.pop.in { opacity: 1; animation: popIn .55s cubic-bezier(.2,1.6,.4,1) both; }
.rise { opacity: 0; }
.rise.in { opacity: 1; animation: riseUp .95s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes popIn { from { opacity: 0; scale: .4; } to { opacity: 1; scale: 1; } }
@keyframes riseUp { 0% { translate: 0 105%; } 70% { translate: 0 -3%; } 100% { translate: 0 0; } }
.d1.in { animation-delay: .12s; } .d2.in { animation-delay: .24s; } .d3.in { animation-delay: .36s; } .d4.in { animation-delay: .48s; }

/* hero */
#hero { position: absolute; left: 0; bottom: 0; width: 0; height: 0; z-index: 3; will-change: transform; }
.hero-inner { position: absolute; left: 0; bottom: 0; }
.hero-inner img.frame { position: absolute; bottom: 0; left: 0; display: none; }
.hero-inner img.frame.on { display: block; }

/* grounds (appended last so rising objects emerge from behind the grass) */
.ground { z-index: 2; }
.ground::before { content: ''; position: absolute; left: 0; right: 0; top: -16px; height: 18px; background: radial-gradient(circle at 18px 18px, var(--g1) 17px, transparent 18px) 0 0 / 36px 36px repeat-x; }
.ground-day { --g1: #8fd053; --g2: #62a83a; --z: #7a4f2a; background:
  linear-gradient(var(--g1) 0 34px, var(--g2) 34px 44px, transparent 44px),
  linear-gradient(135deg, var(--z) 25%, transparent 25%) -40px 44px / 80px 80px, linear-gradient(225deg, var(--z) 25%, transparent 25%) -40px 44px / 80px 80px,
  linear-gradient(315deg, var(--z) 25%, transparent 25%) 0 44px / 80px 80px, linear-gradient(45deg, var(--z) 25%, transparent 25%) 0 44px / 80px 80px, #9c6a3c; }
.ground-night { --g1: #5a9e44; --g2: #3f7c30; --z: #3f2a1c; background:
  linear-gradient(var(--g1) 0 34px, var(--g2) 34px 44px, transparent 44px),
  linear-gradient(135deg, var(--z) 25%, transparent 25%) -40px 44px / 80px 80px, linear-gradient(225deg, var(--z) 25%, transparent 25%) -40px 44px / 80px 80px,
  linear-gradient(315deg, var(--z) 25%, transparent 25%) 0 44px / 80px 80px, linear-gradient(45deg, var(--z) 25%, transparent 25%) 0 44px / 80px 80px, #5a3d29; }

/* intro block extras */
.intro .tag, .mini-tag { display: inline-block; font-family: var(--display); font-size: 19px; text-transform: uppercase; color: #fff; background: var(--red);
  padding: 9px 20px 6px; transform: rotate(-2.5deg); box-shadow: 5px 5px 0 var(--red-d); white-space: nowrap; }
.mini-tag { font-size: 16px; padding: 7px 14px 5px; translate: -50% 0; }
.intro .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.fact.small strong { font-size: 26px; }
.fact.small span { font-size: 17px; }
.csign.encore .mail { font-family: var(--grotesk); font-weight: 600; font-size: 18px; margin-top: 14px; opacity: .8; }

/* EMPIRE */
.arcade-score { transform: translateX(-50%); width: 90px; text-align: center; font-family: var(--display); font-size: 10px; line-height: 1.1; color: #b8ffef; text-shadow: 0 0 6px #5fffe0; }
.arcade-score b { display: block; font-weight: 400; font-size: 22px; color: #fff; }

/* Deezer */
.eqbars { display: flex; gap: 44px; align-items: flex-end; height: 210px; transform: translateX(-50%); }
.eqbars i { width: 80px; height: 90px; background: linear-gradient(var(--gold), var(--red)); box-shadow: 7px 0 0 rgba(0,0,0,.2); animation: eqbar var(--dur) ease-in-out var(--del) infinite alternate; }
@keyframes eqbar { from { height: 55px; } to { height: 200px; } }
.cover { width: 180px; height: 180px; transform: translateX(-50%); }
.cover .vinyl { position: absolute; top: 8px; left: 8px; width: 164px; height: 164px; border-radius: 50%; transition: translate 1s cubic-bezier(.2,1.2,.4,1) .35s;
  background: radial-gradient(circle, var(--c2) 0 13%, #111 14% 16%, transparent 17%), conic-gradient(#1b1b1f, #454552 8%, #1b1b1f 18%, #1b1b1f 50%, #454552 58%, #1b1b1f 68%); }
.cover.in .vinyl { translate: 78px 0; animation: spinr 2.4s linear infinite; }
@keyframes spinr { to { rotate: 360deg; } }
.cover .sleeve { position: absolute; inset: 0; padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff;
  background: linear-gradient(135deg, var(--c1) 0 58%, var(--c2) 58%); box-shadow: 8px 8px 0 rgba(0,0,0,.28); }
.cover .sleeve b { font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1; }
.cover .sleeve span { font-family: var(--grotesk); font-weight: 700; font-size: 15px; margin-top: 4px; }

/* Print */
.sheets, .hearts, .rings { width: 0; height: 0; }
.sheets i { position: absolute; width: 46px; height: 34px; background: #fff; box-shadow: 3px 3px 0 rgba(0,0,0,.2); opacity: 0; animation: sheet 2.4s ease-out infinite; }
.sheets i:nth-child(2) { animation-delay: .8s; } .sheets i:nth-child(3) { animation-delay: 1.6s; }
@keyframes sheet { 0% { opacity: 1; transform: translate(0,0) rotate(0); } 100% { opacity: 0; transform: translate(170px,-230px) rotate(200deg); } }
.hearts i { position: absolute; font-style: normal; font-size: 36px; line-height: 1; color: var(--red); opacity: 0; animation: heart 2.2s ease-out infinite; }
.hearts i::before { content: '♥'; }
.hearts i:nth-child(2) { animation-delay: .7s; color: #ff8fa3; } .hearts i:nth-child(3) { animation-delay: 1.4s; }
@keyframes heart { 0% { opacity: 1; transform: translate(0,0) scale(.6); } 100% { opacity: 0; transform: translate(100px,-210px) scale(1.3); } }

/* Radio */
.rings i { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border: 5px solid var(--gold); border-radius: 50%; opacity: 0; animation: ring 2.4s ease-out infinite; }
.rings i:nth-child(2) { animation-delay: .8s; } .rings i:nth-child(3) { animation-delay: 1.6s; }
@keyframes ring { 0% { opacity: .95; transform: scale(.3); } 100% { opacity: 0; transform: scale(4.5); } }
.onair { transform: translateX(-50%); font-family: var(--display); font-size: 20px; color: #fff; background: var(--red); padding: 6px 12px 4px; border: 3px solid #fff;
  box-shadow: 0 0 24px rgba(226,71,75,.85); animation: onair 1.6s steps(1) infinite; white-space: nowrap; }
@keyframes onair { 50% { background: #7a2224; box-shadow: none; } }
.tuner { transform: translateX(-50%); width: 440px; background: #1d1f27; padding: 12px 16px 10px; box-shadow: 8px 8px 0 rgba(0,0,0,.25); }
.tuner .band { display: flex; justify-content: space-between; font-family: var(--display); font-size: 15px; color: #6b7080; border-bottom: 3px solid #3a3e4c; padding-bottom: 8px; }
.tuner .band span.on { color: var(--gold); text-shadow: 0 0 10px rgba(255,198,41,.8); }
.tuner .needle { position: absolute; top: 6px; height: 40px; width: 4px; background: var(--red); left: 4%; }
.tuner .cap { font-family: var(--grotesk); font-weight: 600; font-size: 14px; color: #fff; margin-top: 6px; text-align: center; }

/* Build */
.truss { height: 36px; transform: translateX(-50%); border-top: 6px solid #2a2d36; border-bottom: 6px solid #2a2d36;
  background: repeating-linear-gradient(45deg, transparent 0 14px, #2a2d36 14px 19px), repeating-linear-gradient(-45deg, transparent 0 14px, #2a2d36 14px 19px); }

/* Encore */
.spotlight { width: 560px; height: 1500px; transform: translateX(-50%); pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(to top, rgba(255,236,170,.5), rgba(255,236,170,.05)); clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%); }

/* fx overlay */
#fx { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
#fx .scan { position: absolute; inset: 0; background: radial-gradient(circle at 30% 72%, rgba(255,230,150,.95), rgba(255,255,255,0) 62%); animation: fadeOut .9s ease-out forwards; }
@keyframes fadeOut { to { opacity: 0; } }
#fx .confetti { position: absolute; top: -24px; width: 10px; height: 16px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx), 112vh) rotate(var(--rot)); } }

/* night contrast */
body.is-night .csign { color: var(--paper); }
body.is-night .csign h2 { text-shadow: 0 7px 0 rgba(0,0,0,.35); }
body.is-night .csign .btn:not(.red) { background: var(--paper); color: var(--navy); box-shadow: 5px 5px 0 rgba(0,0,0,.35); }
body.is-night .logo, body.is-night .hud-link:not(.hire) { color: var(--paper); }
body.is-night .chapters button { border-color: var(--paper); }

/* HUD extras */
.hud-link.hire { font-family: var(--grotesk); color: #fff; background: var(--red); border: 0; padding: 9px 16px 8px; box-shadow: 4px 4px 0 var(--red-d); cursor: pointer; }
.hud-progress { position: absolute; left: 0; right: 0; top: 0; height: 5px; background: rgba(0,0,0,.12); }
.hud-progress i { display: block; height: 100%; width: 0; background: var(--gold); }
#hint { position: fixed; left: 50%; bottom: 3.5%; transform: translateX(-50%); z-index: 9; display: flex; align-items: center; gap: 12px; background: var(--navy); color: #fff;
  font-family: var(--grotesk); font-weight: 600; font-size: 17px; padding: 8px 18px 8px 8px; transition: opacity .4s; white-space: nowrap; }
#hint.gone { opacity: 0; pointer-events: none; }
.hint-key { width: 32px; height: 32px; background: #fff; color: var(--navy); display: grid; place-items: center; font-size: 18px; animation: bob 1s ease-in-out infinite; }
.hint-touch { display: none; }
@media (hover: none) { .hint-desk { display: none; } .hint-touch { display: inline; } }
#loader { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: #72c6ee; transition: opacity .5s; font-family: var(--display); font-size: 40px; color: var(--navy); }
#loader.done { opacity: 0; pointer-events: none; }

@media (max-width: 760px) {
  #hint { bottom: 76px; font-size: 15px; }
  .now-playing { font-size: 13px; left: 14px; bottom: 16px; }
  .chapters { top: auto; bottom: 18px; right: 14px; transform: none; flex-direction: row; gap: 8px; }
  .chapters button { width: 14px; height: 14px; border-width: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
