:root {
  --bg: #0a0a0b;
  --bg-soft: #101012;
  --text: #f2f0eb;
  --text-dim: rgba(242, 240, 235, 0.55);
  --gold: #f8dc2f;
  --font-display: "Clash Display", sans-serif;
  --font-body: "Satoshi", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: #0a0a0b; }

.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, 2%); }
  100% { transform: translate(2%, -1%); }
}

/* ---------- Loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: opacity 0.7s ease, visibility 0.7s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.3rem);
  letter-spacing: 0.35em;
  color: var(--text);
}
.loader-bar {
  width: min(320px, 60vw);
  height: 1px;
  background: rgba(242, 240, 235, 0.15);
  overflow: hidden;
}
.loader-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 0.3s ease;
}
.loader-pct {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* ---------- Topbar ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px clamp(20px, 4vw, 56px);
  mix-blend-mode: difference;
}
.topbar-brand, .topbar-year {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 0 clamp(20px, 6vw, 96px);
  background: var(--bg);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 38%;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 10, 11, 0.88) 0%, rgba(10, 10, 11, 0.55) 38%, rgba(10, 10, 11, 0.08) 66%, rgba(10, 10, 11, 0.6) 100%),
    linear-gradient(to top, rgba(10, 10, 11, 0.85), transparent 30%),
    linear-gradient(to bottom, rgba(10, 10, 11, 0.5), transparent 22%);
}
.hero-inner { position: relative; }
.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: clamp(16px, 3vh, 32px);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.2rem, 11.5vw, 11rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-shadow: 0 6px 90px rgba(10, 10, 11, 0.6);
}
.hero-title .line {
  display: block;
  overflow: hidden;
}
.hero-title .line > span { display: inline-block; }
.hero-title-accent {
  color: transparent;
  -webkit-text-stroke: 2px var(--text);
}
.hero-sub {
  margin-top: clamp(20px, 4vh, 40px);
  max-width: 34ch;
  font-size: clamp(1.05rem, 1.5vw, 1.4rem);
  line-height: 1.55;
  color: rgba(242, 240, 235, 0.78);
}
.hero-names {
  position: absolute;
  bottom: clamp(24px, 5vh, 48px);
  left: clamp(20px, 6vw, 96px);
  right: clamp(20px, 6vw, 96px);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-top: 1px solid rgba(242, 240, 235, 0.12);
  padding-top: 18px;
}

.reveal-load {
  opacity: 0;
  transform: translateY(60px);
  animation: rise 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--d, 0s);
  animation-play-state: paused;
}
body.loaded .reveal-load { animation-play-state: running; }
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Acts ---------- */
.act {
  position: relative;
  height: 620vh;
}
.act-sticky {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: hidden;
}
.act-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: var(--bg);
}
.act-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(10, 10, 11, 0.65), transparent 22%, transparent 72%, rgba(10, 10, 11, 0.75)),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 55%, rgba(10, 10, 11, 0.55));
}

.beat {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(20px, 6vw, 96px);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.beat-country {
  align-items: center;
  justify-content: center;
}
.beat-country-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 14vw, 15rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent, var(--gold));
  opacity: 0.9;
  white-space: nowrap;
}

.beat-name { justify-content: flex-end; padding-bottom: clamp(48px, 10vh, 110px); }
.beat-act-no {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.8rem, 1.1vw, 1rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent, var(--gold));
  margin-bottom: 14px;
}
.beat-name h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 9vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  text-shadow: 0 4px 60px rgba(10, 10, 11, 0.8);
}

.beat-phrase p {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(1.55rem, 3.3vw, 3rem);
  line-height: 1.3;
  max-width: 22ch;
  text-shadow: 0 2px 40px rgba(10, 10, 11, 0.9);
}
.beat-left { align-items: flex-start; }
.beat-right { align-items: flex-end; text-align: right; }
.beat-phrase::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(10, 10, 11, 0.72), rgba(10, 10, 11, 0.3) 45%, transparent 72%);
}
.beat-right::before {
  background: linear-gradient(270deg, rgba(10, 10, 11, 0.72), rgba(10, 10, 11, 0.3) 45%, transparent 72%);
}
.beat-phrase { z-index: 1; }
.beat-thanks::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(10, 10, 11, 0.6), transparent 75%);
}
.beat-thanks { z-index: 1; }

.beat-thanks {
  align-items: center;
  justify-content: center;
  text-align: center;
}
.thanks-small {
  font-size: clamp(1rem, 1.8vw, 1.5rem);
  color: var(--text);
  opacity: 0.85;
  margin-bottom: 10px;
  text-shadow: 0 2px 30px rgba(10, 10, 11, 0.9);
}
.thanks-big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 13vw, 13rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--accent, var(--gold));
  text-shadow: 0 6px 80px rgba(10, 10, 11, 0.85);
  padding-bottom: 0.08em;
}

/* ---------- Interludes ---------- */
.interlude {
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15vh clamp(20px, 8vw, 120px);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.interlude::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#interlude-1::before {
  background:
    radial-gradient(ellipse 70% 55% at 50% 115%, rgba(230, 57, 70, 0.20), transparent 68%),
    radial-gradient(ellipse 55% 40% at 12% -15%, rgba(248, 220, 47, 0.10), transparent 62%);
}
#interlude-2::before {
  background:
    radial-gradient(ellipse 70% 55% at 50% 115%, rgba(126, 200, 227, 0.18), transparent 68%),
    radial-gradient(ellipse 55% 40% at 88% -15%, rgba(230, 57, 70, 0.10), transparent 62%);
}
.interlude-text { position: relative; }
.interlude-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4.6vw, 4.2rem);
  line-height: 1.18;
  max-width: 22ch;
  text-align: center;
  letter-spacing: -0.01em;
}
.interlude-text .w {
  display: inline-block;
  opacity: 0.12;
  transition: opacity 0.5s ease;
}
.interlude-text .w.on { opacity: 1; }
.interlude-text .em { font-style: italic; padding-bottom: 4px; }

/* ---------- Finale ---------- */
.finale {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20vh clamp(20px, 6vw, 96px) 14vh;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
.finale-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 30%;
  filter: grayscale(0.35) brightness(0.52) contrast(1.05);
}
.finale-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 85% 75% at 50% 50%, rgba(10, 10, 11, 0.55), rgba(10, 10, 11, 0.92)),
    linear-gradient(to bottom, rgba(10, 10, 11, 0.9), transparent 30%, transparent 70%, rgba(10, 10, 11, 0.9));
}
.finale-inner { position: relative; }
.finale-kicker {
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: clamp(24px, 4vh, 44px);
}
.finale-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.6rem, 11vw, 11rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin-bottom: clamp(36px, 7vh, 72px);
}
.finale-title-em {
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 2px var(--text);
  display: inline-block;
  line-height: 1.1;
  padding-bottom: 0.12em;
}
.finale-names {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(14px, 3vw, 36px);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.8rem, 1.2vw, 1rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: clamp(40px, 8vh, 80px);
}
.finale-sep {
  width: 40px;
  height: 1px;
  background: rgba(242, 240, 235, 0.25);
}
.finale-foot {
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-dim);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].on {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .hero { padding-bottom: 140px; }
  .hero-bg { object-position: 60% 30%; }
}
@media (max-width: 767px) {
  .act { height: 420vh; }
  .beat-phrase p { max-width: 18ch; }
  .beat-country-name { white-space: normal; text-align: center; }

  /* Hero */
  .hero {
    padding: 0 22px 132px;
    justify-content: flex-start;
    padding-top: 24vh;
  }
  .hero-bg { object-position: 50% 26%; }
  .hero-scrim {
    background:
      linear-gradient(to bottom, rgba(10, 10, 11, 0.86) 0%, rgba(10, 10, 11, 0.66) 34%, rgba(10, 10, 11, 0.28) 56%, rgba(10, 10, 11, 0.72) 84%, rgba(10, 10, 11, 0.94) 100%);
  }
  .hero-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
  }
  .hero-title {
    font-size: clamp(2.5rem, 11.2vw, 3.2rem);
    line-height: 0.96;
    letter-spacing: -0.005em;
  }
  .hero-title-accent { -webkit-text-stroke-width: 1.5px; }
  .hero-sub {
    max-width: 28ch;
    font-size: 1rem;
    line-height: 1.5;
    margin-top: 22px;
  }
  .hero-names {
    left: 22px;
    right: 22px;
    bottom: 26px;
    flex-direction: column;
    gap: 7px;
    align-items: flex-start;
    font-size: 0.66rem;
    letter-spacing: 0.22em;
    padding-top: 14px;
  }

  /* Finale */
  .finale { padding: 15vh 22px 12vh; }
  .finale-bg { object-position: 50% 26%; }
  .finale-kicker {
    font-size: 0.9rem;
    max-width: 26ch;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 26px;
    line-height: 1.45;
  }
  .finale-title {
    font-size: clamp(2.6rem, 12vw, 3.6rem);
    line-height: 1.02;
    margin-bottom: 34px;
  }
  .finale-title-em {
    -webkit-text-stroke-width: 1.5px;
    letter-spacing: 0.015em;
    padding-bottom: 0.16em;
  }
  .finale-names {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 12px;
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    margin-bottom: 40px;
  }
  .finale-sep { width: 26px; }
  .finale-foot { font-size: 0.72rem; letter-spacing: 0.2em; }
}

@media (max-width: 767px) and (max-height: 700px) {
  .hero { padding-top: 19vh; padding-bottom: 118px; }
  .finale { padding: 11vh 22px 9vh; }
  .finale-kicker { margin-bottom: 20px; }
  .finale-title { margin-bottom: 26px; }
  .finale-names { gap: 9px; margin-bottom: 28px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .reveal-load { animation-duration: 0.01s; animation-delay: 0s; }
  [data-reveal] { transition: none; opacity: 1; transform: none; }
  .interlude-text .w { opacity: 1; transition: none; }
}
