/* ===========================================================================
   Per-slide layout + the small shared components (brandbar, badge, chips).
   Slides share the same vertical rhythm: a top strip, a body, and the footer.
   =========================================================================== */

/* --- Shared chrome ------------------------------------------------------- */

.brandbar {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: clamp(1.2rem, 3vmin, 3rem);
  display: flex;
  align-items: center;
  gap: 0.8em;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.04em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.brandbar__name { color: var(--text-dim); font-weight: 700; }
.brandbar__dot { color: var(--accent); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.35em 0.9em;
  border-radius: 999px;
  font-size: var(--fs-eyebrow);
  font-weight: 800;
  letter-spacing: 0.12em;
  border: 1px solid var(--border);
  background: var(--surface);
}
.badge__pip {
  width: 0.7em; height: 0.7em; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0.8em currentColor;
}
.badge--live { color: var(--live); }
.badge--sample { color: var(--sample); }
.badge--live .badge__pip { animation: pulse 1.8s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.82); }
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.chips { display: flex; flex-wrap: wrap; gap: 0.6em; }
.chip {
  padding: 0.4em 1em;
  border-radius: 999px;
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* --- Entrance animation helpers ----------------------------------------- */
/* Children fade-up in sequence when the slide gets `.is-entering`. */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(1.4em); }
  to   { opacity: 1; transform: translateY(0); }
}
.is-entering [data-anim],
.is-entering .intro__title,
.is-entering .intro__eyebrow,
.is-entering .intro__lead,
.is-entering .intro__sub,
.is-entering .section-title,
.is-entering .spotlight__title,
.is-entering .spotlight__tagline,
.is-entering .spotlight__desc,
.is-entering .spotlight__pct,
.is-entering .chips,
.is-entering .ending__title,
.is-entering .ending__eyebrow,
.is-entering .ending__recap,
.is-entering .ending__sub {
  animation: fade-up 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.is-entering .intro__eyebrow,
.is-entering .spotlight__tagline,
.is-entering .ending__eyebrow { animation-delay: 80ms; }
.is-entering .intro__lead,
.is-entering .spotlight__desc { animation-delay: 260ms; }
.is-entering .intro__sub,
.is-entering .chips { animation-delay: 380ms; }
.is-entering .spotlight__pct,
.is-entering .ending__recap { animation-delay: 480ms; }

/* --- Slide 1: Intro ------------------------------------------------------ */
.slide-intro { grid-template-rows: auto 1fr auto; }
.slide-intro__top { display: flex; justify-content: flex-end; }
.slide-intro__body {
  align-self: center;
  max-width: 90%;
  display: grid;
  gap: var(--gap);
}
.intro__eyebrow {
  font-size: var(--fs-lead);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.intro__title {
  font-size: var(--fs-h1);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.intro__lead { font-size: var(--fs-lead); color: var(--text-dim); }
.intro__count {
  font-weight: 900;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.intro__count-label { color: var(--text-dim); }
.intro__sub { font-size: var(--fs-body); color: var(--text-faint); }

/* --- Slide 2: Ranking ---------------------------------------------------- */
.slide-ranking { grid-template-rows: auto 1fr auto; gap: var(--gap); }
.slide-ranking__top {
  display: flex; align-items: center; justify-content: space-between;
}
.rank-list {
  align-self: center;
  display: grid;
  gap: clamp(1rem, 2.6vmin, 2.6rem);
  width: 100%;
}
.rank-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(1rem, 2.5vmin, 2.4rem);
  padding: clamp(0.8rem, 2vmin, 1.8rem) clamp(1rem, 2.6vmin, 2.4rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.rank-row--1 {
  background: linear-gradient(90deg, rgba(230, 184, 0, 0.14), var(--surface));
  border-color: rgba(230, 184, 0, 0.35);
}
.rank-row__pos {
  font-size: var(--fs-h2);
  font-weight: 900;
  color: var(--text-faint);
  min-width: 1.4em;
  text-align: center;
}
.rank-row--1 .rank-row__pos { color: var(--gold); }
.rank-row__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1em; margin-bottom: 0.5em;
}
.rank-row__name {
  font-size: var(--fs-lead);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.rank-row__count { font-size: var(--fs-body); color: var(--text-faint); }
.rank-row__track {
  height: clamp(0.8rem, 1.8vmin, 1.6rem);
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.rank-row__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, white));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1100ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.rank-row.is-filled .rank-row__fill { transform: scaleX(calc(var(--pct) / 100)); }
.rank-row__scorewrap {
  display: grid;
  justify-items: end;
  gap: 0.1em;
  min-width: 3.2em;
}
.rank-row__pct {
  font-size: var(--fs-h2);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  text-align: right;
  line-height: 1;
}
.rank-row__scorelabel {
  font-size: var(--fs-eyebrow);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- Slide 3: Spotlight -------------------------------------------------- */
.slide-spotlight { grid-template-rows: auto 1fr auto; gap: var(--gap); }
.slide-spotlight__top {
  display: flex; align-items: center; justify-content: space-between;
}
.spotlight__crown {
  font-size: var(--fs-lead);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
}
.spotlight__grid {
  align-self: center;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(2rem, 6vmin, 6rem);
  width: 100%;
}
.spotlight__art {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 120% at 30% 10%,
      color-mix(in srgb, var(--accent) 55%, transparent),
      transparent 60%),
    var(--bg-elev);
  border: 1px solid var(--border);
  box-shadow: 0 0 8vmin color-mix(in srgb, var(--accent) 30%, transparent);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.spotlight__img { width: 100%; height: 100%; object-fit: cover; }
.spotlight__body { display: grid; gap: var(--gap); align-content: center; }
.spotlight__tagline {
  font-size: var(--fs-lead);
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.spotlight__title {
  font-size: var(--fs-h1);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.spotlight__desc {
  font-size: var(--fs-lead);
  color: var(--text-dim);
  max-width: 26ch;
}
.spotlight__pct {
  display: flex; align-items: baseline; gap: 0.5em; margin-top: 0.3em;
}
.spotlight__pct-star {
  font-size: var(--fs-mega);
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
}
.spotlight__pct-num {
  font-size: var(--fs-mega);
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 6vmin color-mix(in srgb, var(--accent) 45%, transparent);
}
.spotlight__pct-label { font-size: var(--fs-body); color: var(--text-faint); }

/* --- Slide 4: Ending ----------------------------------------------------- */
.slide-ending { grid-template-rows: 1fr auto; place-items: center; }
.slide-ending__body {
  align-self: center;
  display: grid;
  gap: var(--gap);
  justify-items: center;
  text-align: center;
}
.ending__eyebrow {
  font-size: var(--fs-lead);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.ending__title {
  font-size: var(--fs-mega);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.ending__recap {
  display: flex;
  gap: clamp(2rem, 8vmin, 8rem);
  margin-top: var(--gap);
}
.recap-stat { display: grid; gap: 0.2em; justify-items: center; }
.recap-stat__value {
  font-size: var(--fs-h2);
  font-weight: 900;
  color: var(--text);
}
.recap-stat__label {
  font-size: var(--fs-body);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ending__sub { font-size: var(--fs-body); color: var(--text-dim); margin-top: var(--gap); }

/* Portrait screens: stack the spotlight + relax the ranking row sizing. */
@media (orientation: portrait) {
  .spotlight__grid { grid-template-columns: 1fr; gap: var(--gap); }
  .spotlight__art { aspect-ratio: 16 / 9; max-height: 38vh; }
}
