/* ═══════════════════════════════════════════════════════
   CUMPLE 18 — El Partido de tu Vida
   Design: Dark Luxury Football
   Fonts: Bebas Neue (display) + Outfit (body) + Playfair (accent)
══════════════════════════════════════════════════════ */

/* ─── TOKENS ─────────────────────────────────────────── */
:root {
  --bg: #070a08;
  --bg2: #0d1510;
  --bg3: #111c14;
  --gold: #d4a843;
  --gold-light: #f0cc6e;
  --gold-dim: #7a5f26;
  --green: #1a6b2a;
  --green-light: #27ae60;
  --green-pitch: #0e3d18;
  --white: #f0ede8;
  --white-dim: #9c968e;
  --black: #020302;

  --font-display: "Bebas Neue", sans-serif;
  --font-body: "Outfit", sans-serif;
  --font-accent: "Playfair Display", serif;

  --radius: 12px;
  --radius-lg: 24px;
  --trans: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── RESET ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto;
}

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

img {
  display: block;
  max-width: 100%;
}

/* ─── LOADER ─────────────────────────────────────────── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.loader-ball {
  font-size: 5rem;
  animation: spin 0.8s linear infinite;
}
.loader-text {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: var(--white-dim);
  text-transform: uppercase;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── PROGRESS NAV ────────────────────────────────────── */
.progress-nav {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity var(--trans);
}
.progress-nav.visible {
  opacity: 1;
}

.progress-track {
  width: 3px;
  height: 120px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(to bottom, var(--gold), var(--green-light));
  border-radius: 99px;
  transition: height 0.1s;
}
.progress-year-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}
.progress-year-display span {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--gold);
  line-height: 1;
}
.progress-year-display small {
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  margin-right: -0.15em;
  color: var(--white-dim);
  text-transform: uppercase;
}

/* ─── HERO ───────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--black);
}

/* Pitch lines background */
.hero-pitch-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(
    ellipse 80% 80% at 50% 50%,
    black 30%,
    transparent 100%
  );
}

/* Stadium glow */
.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 60% 50% at 50% 50%,
      rgba(212, 168, 67, 0.08) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 40% 40% at 20% 80%,
      rgba(26, 107, 42, 0.12) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 40% 40% at 80% 20%,
      rgba(26, 107, 42, 0.08) 0%,
      transparent 60%
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 0.25rem;
}

.hero-tag {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.4em;
  margin-right: -0.4em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  opacity: 0;
}

.hero-number-wrap {
  overflow: hidden;
  width: 100%;
  text-align: center;
}
.hero-number {
  font-family: var(--font-display);
  font-size: clamp(8rem, 22vw, 18rem);
  line-height: 1;
  background: linear-gradient(160deg, var(--white) 30%, var(--gold-dim) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  /* opacity and transform are set exclusively by GSAP */
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 5rem);
  letter-spacing: 0.5em;
  margin-right: -0.5em;
  color: var(--gold);
  opacity: 0;
}

.hero-desc {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: clamp(0.9rem, 2vw, 1.3rem);
  color: var(--white-dim);
  letter-spacing: 0.05em;
  margin-right: -0.05em;
  margin-top: 0.75rem;
  opacity: 0;
}

.hero-ball-wrap {
  position: absolute;
  /* Below the hero-content block, above the CTA */
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  opacity: 0;
}
.hero-ball {
  font-size: 3.5rem;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.hero-cta {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
}
.hero-cta span {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  margin-right: -0.25em;
  text-transform: uppercase;
  color: var(--white-dim);
}
.hero-arrow {
  font-size: 1.2rem;
  color: var(--gold);
  animation: bounce 1.5s ease-in-out infinite;
}
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

/* ─── EPOCH SECTIONS ─────────────────────────────────── */
.epoch {
  position: relative;
  padding: 7rem 2rem 5rem;
  overflow: hidden;
}
.epoch--alt {
  background: var(--bg2);
}
.epoch--dark {
  background: var(--bg3);
}

/* Giant background year number */
.epoch-bg-num {
  position: absolute;
  top: -0.15em;
  left: -0.05em;
  font-family: var(--font-display);
  font-size: clamp(10rem, 30vw, 22rem);
  line-height: 1;
  color: rgba(255, 255, 255, 0.025);
  pointer-events: none;
  user-select: none;
}

.epoch-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
}

/* Epoch header */
.epoch-header {
  margin-bottom: 3.5rem;
}
.epoch-range {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.epoch-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.9;
  color: var(--white);
  margin-bottom: 1rem;
}
.epoch-body {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--white-dim);
  max-width: 500px;
  line-height: 1.7;
}

/* Connector between epochs */
.epoch-connector {
  display: flex;
  justify-content: center;
  margin-top: 4rem;
  position: relative;
  z-index: 2;
}
.epoch-connector span {
  font-size: 2rem;
  animation: float 2.5s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(212, 168, 67, 0.4));
}

/* ─── PHOTO GRID ─────────────────────────────────────── */
.photo-grid {
  display: grid;
  gap: 1.5rem;
}
.photo-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.photo-grid--filmstrip {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .photo-grid--3,
  .photo-grid--filmstrip {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 580px) {
  .photo-grid--3,
  .photo-grid--filmstrip {
    grid-template-columns: 1fr;
  }
}

/* ─── PHOTO CARD ─────────────────────────────────────── */
.photo-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(40px);
}
.photo-card--featured {
  transform: translateY(40px) scale(1.02);
}

/* Photo frame — beautiful placeholder built-in via CSS */
.photo-frame {
  position: relative;
  aspect-ratio: 3/4;
  background: linear-gradient(
    135deg,
    var(--green-pitch) 0%,
    var(--bg2) 60%,
    #1a0f0a 100%
  );
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

/* Gold corner accents */
.photo-frame::before,
.photo-frame::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--gold-dim);
  border-style: solid;
  z-index: 3;
}
.photo-frame::before {
  top: 10px;
  left: 10px;
  border-width: 2px 0 0 2px;
}
.photo-frame::after {
  bottom: 10px;
  right: 10px;
  border-width: 0 2px 2px 0;
}

/* Year number shown as placeholder */
.photo-frame .year-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
}
.photo-frame .year-placeholder .yr-big {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  color: rgba(212, 168, 67, 0.2);
  line-height: 1;
}
.photo-frame .year-placeholder .yr-label {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(212, 168, 67, 0.15);
}

/* Actual image */
.photo-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  transition:
    opacity 0.4s,
    transform 0.6s var(--trans);
}
.photo-frame:hover img {
  transform: scale(1.04);
}

/* If image broken/missing — show placeholder (handled by JS) */
.photo-frame img.broken {
  display: none;
}

/* Prevent native broken-image icon from showing */
.photo-frame img:-moz-broken {
  visibility: hidden;
}
.photo-frame img[src=""],
.photo-frame img:not([src]) {
  display: none;
}

/* Hide broken images universally via JS-set class */
img.broken {
  visibility: hidden;
}

/* Pitch lines overlay on photo */
.photo-frame .pitch-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

.photo-caption {
  font-size: 0.85rem;
  color: var(--white-dim);
  text-align: center;
  font-style: italic;
  font-family: var(--font-accent);
}

/* Featured card is taller */
.photo-card--featured .photo-frame {
  aspect-ratio: 3/5;
}

/* Final photo card — NOT animated by initEpochs, so must start visible.
   The parent #finalPhoto wrapper handles the entrance animation. */
.photo-card--final {
  opacity: 1 !important;
  transform: none !important;
}


/* ─── GRAND FINALE ───────────────────────────────────── */
.final {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #010801;
  padding: 4rem 2rem 6rem;
}

#confettiCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.final-stadium-lights {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 50% 40% at 20% 0%,
      rgba(212, 168, 67, 0.15) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 50% 40% at 80% 0%,
      rgba(212, 168, 67, 0.12) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 80% 50% at 50% 100%,
      rgba(14, 61, 24, 0.3) 0%,
      transparent 70%
    );
  animation: stadiumPulse 4s ease-in-out infinite;
}
@keyframes stadiumPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.final-pitch-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(39, 174, 96, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(39, 174, 96, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

.final-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.final-pre {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--white-dim);
  opacity: 0;
  letter-spacing: 0.05em;
  margin-right: -0.05em;
}

.final-number-wrap {
  position: relative;
  width: clamp(220px, 40vw, 340px);
  height: clamp(220px, 40vw, 340px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--gold-dim);
  border-radius: 50%;
  box-shadow:
    0 0 80px rgba(212, 168, 67, 0.15),
    inset 0 0 40px rgba(212, 168, 67, 0.05);
  /* opacity + scale set by gsap.set() in initFinale — NOT in CSS */
}
.final-number {
  font-family: var(--font-display);
  font-size: clamp(5rem, 14vw, 11rem);
  line-height: 1;
  background: linear-gradient(
    160deg,
    var(--gold-light) 0%,
    var(--gold) 50%,
    var(--gold-dim) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(212, 168, 67, 0.5));
  /* Bebas Neue sits slightly low — push up with margin */
  margin-bottom: 0.08em;
}
.final-number-ring {
  position: absolute;
  inset: -14px;
  border: 1px solid rgba(212, 168, 67, 0.25);
  border-radius: 50%;
  animation: ringPulse 2.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ringPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.15;
  }
}

.final-messages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  opacity: 0;
}

.final-congrats {
  font-family: var(--font-accent);
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--white);
  text-shadow: 0 0 40px rgba(212, 168, 67, 0.3);
}

.final-unlock {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(
    135deg,
    rgba(212, 168, 67, 0.15),
    rgba(212, 168, 67, 0.05)
  );
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: var(--radius-lg);
  padding: 0.75rem 2rem;
  backdrop-filter: blur(10px);
}
.unlock-icon {
  font-size: 1.5rem;
}
.unlock-text {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 4vw, 2.2rem);
  letter-spacing: 0.1em;
  margin-right: -0.1em;
  color: var(--gold-light);
}

.final-tagline {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--white-dim);
}

.final-photo-wrap {
  opacity: 0;
  transform: translateY(40px);
  max-width: 280px;
  width: 100%;
}
.photo-card--final .photo-frame {
  aspect-ratio: 2/3;
}

.final-footer {
  position: relative;
  z-index: 10;
  margin-top: 3rem;
  text-align: center;
  opacity: 0;
}
.final-footer p {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--white-dim);
  letter-spacing: 0.05em;
  margin-right: -0.05em;
}

/* ─── UTILS ──────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--gold-dim);
  border-radius: 99px;
}

/* ─── LIGHTBOX MODAL ──────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
}
.lightbox.is-open {
  pointer-events: all;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 3, 2, 0.94);
  cursor: zoom-out;
  backdrop-filter: blur(4px);
}
.lightbox-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: min(88vw, 720px);
  max-height: 92vh;
}
.lightbox-img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(212, 168, 67, 0.2);
  opacity: 0;
  transform: scale(0.82);
}
.lightbox-caption {
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--white-dim);
  font-size: 1rem;
  text-align: center;
  opacity: 0;
}
.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 3;
  background: rgba(212, 168, 67, 0.12);
  border: 1px solid rgba(212, 168, 67, 0.35);
  color: var(--gold);
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0;
  transition:
    background var(--trans),
    transform 0.2s;
  line-height: 1;
}
.lightbox-close:hover {
  background: rgba(212, 168, 67, 0.28);
  transform: scale(1.1);
}
/* Zoom-in cursor for clickable frames */
.photo-frame.clickable {
  cursor: zoom-in;
}

/* ─────────────────────────────────────────────────────
   ÁLBUM SORPRESA — La Película de tu Vida
───────────────────────────────────────────────────── */

/* ── Section wrapper ── */
.album-section {
  position: relative;
  background: #020504;
  overflow: hidden;
  padding-bottom: 8rem;
}

/* Grain film-texture overlay */
.album-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  mix-blend-mode: overlay;
}

/* ── Intro reveal block ── */
.album-intro {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 4rem 2rem;
  text-align: center;

  /* Stadium-light glow from top */
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(212, 168, 67, 0.09) 0%, transparent 65%),
    radial-gradient(ellipse 50% 35% at 15% 50%, rgba(26, 107, 42, 0.08) 0%, transparent 65%),
    radial-gradient(ellipse 50% 35% at 85% 50%, rgba(26, 107, 42, 0.06) 0%, transparent 65%);
}

.album-intro-inner {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Animated horizontal rule that grows */
.album-pre-line {
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 99px;
  margin-bottom: 0.5rem;
}

.album-eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0;
}

.album-title {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 14vw, 10rem);
  line-height: 0.9;
  color: var(--white);
  opacity: 0;
  transform: translateY(60px);
}
.album-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 60%, var(--gold-dim) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(212, 168, 67, 0.35));
}

.album-subtitle {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  color: var(--white-dim);
  line-height: 1.7;
  max-width: 520px;
  opacity: 0;
}

/* ── Polaroid grid ── */
.album-grid {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;

  /* CSS columns — masonry-like layout */
  columns: 5 220px;
  column-gap: 1.6rem;
}

@media (max-width: 1100px) {
  .album-grid { columns: 4 200px; }
}
@media (max-width: 800px) {
  .album-grid { columns: 3 160px; }
}
@media (max-width: 560px) {
  .album-grid { columns: 2 140px; }
}

/* ── Individual polaroid ── */
.polaroid {
  break-inside: avoid;
  display: inline-block;  /* required for CSS columns */
  width: 100%;
  margin-bottom: 1.6rem;
  opacity: 0;
  transform: translateY(-120px) rotate(0deg);
  transform-origin: center bottom;
  cursor: zoom-in;
  will-change: transform, opacity;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s;
}

.polaroid:hover {
  transform: translateY(-8px) rotate(0deg) scale(1.06) !important;
  z-index: 10;
  position: relative;
}

/* The polaroid card body */
.polaroid-frame {
  background: #f2ede3;
  padding: 0.6rem 0.6rem 2.6rem;
  border-radius: 3px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.5),
    0 16px 50px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  position: relative;
  transition: box-shadow 0.35s;
}
.polaroid:hover .polaroid-frame {
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.6),
    0 32px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Photo inside polaroid */
.polaroid-img-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, #1a2e1d 0%, #0a120c 100%);
  position: relative;
}

/* Alternate aspect ratios for visual variety — all portrait-biased to avoid head crops */
.polaroid:nth-child(3n)   .polaroid-img-wrap { aspect-ratio: 3/4; }
.polaroid:nth-child(5n)   .polaroid-img-wrap { aspect-ratio: 2/3; }
.polaroid:nth-child(7n)   .polaroid-img-wrap { aspect-ratio: 4/5; }

.polaroid-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;  /* keep faces visible, don't cut heads */
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.polaroid:hover .polaroid-img-wrap img {
  transform: scale(1.08);
}

/* Placeholder shown only when image is missing — hidden by default */
.polaroid-placeholder {
  position: absolute;
  inset: 0;
  display: none;              /* JS adds .visible class on image error */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  pointer-events: none;
}
.polaroid-placeholder.visible {
  display: flex;
}
.polaroid-placeholder .ph-num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  color: rgba(212, 168, 67, 0.25);
  line-height: 1;
}
.polaroid-placeholder .ph-label {
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(212, 168, 67, 0.15);
  font-family: var(--font-body);
}

/* Shimmer stripe on placeholder */
.polaroid-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 60%
  );
  background-size: 200% 100%;
  animation: shimmer 3s infinite linear;
  pointer-events: none;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Caption at the bottom of polaroid */
.polaroid-caption {
  text-align: center;
  font-family: 'Caveat', var(--font-accent), cursive;
  font-size: 0.78rem;
  color: #3a3028;
  padding-top: 0.4rem;
  letter-spacing: 0.01em;
  line-height: 1.3;
  user-select: none;
}

/* Small paper fold effect bottom-right */
.polaroid-frame::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background: linear-gradient(225deg, rgba(0,0,0,0.12) 50%, transparent 50%);
  border-radius: 0 0 3px 0;
}

/* Tape strips on some polaroids */
.polaroid-tape {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 50px;
  height: 20px;
  background: rgba(240, 204, 110, 0.45);
  border-radius: 2px;
  pointer-events: none;
  backdrop-filter: blur(2px);
}

/* ── Album section end outro ── */
.album-end {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5rem 2rem 6rem;
  text-align: center;
  gap: 1.2rem;
  opacity: 0;
}

.album-end-orb {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 168, 67, 0.25) 0%, transparent 70%);
  border: 1px solid rgba(212, 168, 67, 0.2);
  margin-bottom: 0.5rem;
  animation: orbPulse 3s ease-in-out infinite;
}
@keyframes orbPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%       { transform: scale(1.1); opacity: 1; }
}

.album-end-text {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  color: var(--gold);
  letter-spacing: 0.08em;
  line-height: 1;
  text-shadow: 0 0 60px rgba(212, 168, 67, 0.35);
}

.album-end-emoji {
  font-size: 2.5rem;
  filter: drop-shadow(0 0 12px rgba(212, 168, 67, 0.4));
  letter-spacing: 0.3em;
}

.album-end-sub {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--white-dim);
  max-width: 480px;
}

/* ── Lightbox gallery nav arrows & counter ── */
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(212, 168, 67, 0.1);
  border: 1px solid rgba(212, 168, 67, 0.3);
  color: var(--gold);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: none;   /* shown only in album gallery mode */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
  opacity: 0;
  transition: background var(--trans), transform 0.2s, opacity 0.3s;
  padding: 0;
}
.lightbox-nav--prev { left: 1.2rem; }
.lightbox-nav--next { right: 1.2rem; }

.lightbox.album-mode .lightbox-nav {
  display: flex;
}
.lightbox-nav:hover {
  background: rgba(212, 168, 67, 0.28);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-counter {
  position: fixed;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--white-dim);
  background: rgba(7, 10, 8, 0.7);
  padding: 0.35rem 1rem;
  border-radius: 99px;
  display: none;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.07);
}
.lightbox.album-mode .lightbox-counter {
  display: block;
}

/* ─────────────────────────────────────────────────────
   SORPRESA FINAL — La Copa
───────────────────────────────────────────────────── */
.trophy-reveal {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #010200;
  /* Separator line at top — thin golden rule */
  border-top: 1px solid rgba(212, 168, 67, 0.12);
}

/* Full-screen golden flash on trigger */
.trophy-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 40%,
    rgba(240, 204, 110, 0.55) 0%,
    rgba(212, 168, 67, 0.15) 40%,
    transparent 70%
  );
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

/* Pitch lines on black bg */
.trophy-reveal::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(39, 174, 96, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(39, 174, 96, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.trophy-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 5rem 2rem 6rem;
  gap: 2rem;
  max-width: 860px;
}

/* "…pero espera" */
.trophy-eyebrow {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--white-dim);
  opacity: 0;
  letter-spacing: 0.04em;
}

/* "¡Y por fin la ansiada copa!" */
.trophy-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 11vw, 8.5rem);
  line-height: 0.92;
  color: var(--white);
  opacity: 0;
  transform: scale(0.75);
  text-shadow: 0 0 80px rgba(212, 168, 67, 0.15);
}
.trophy-title em {
  font-style: normal;
  background: linear-gradient(
    135deg,
    var(--gold-light) 0%,
    var(--gold) 55%,
    var(--gold-dim) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(212, 168, 67, 0.5));
  display: block;
}

/* Photo container */
.trophy-photo-wrap {
  position: relative;
  width: min(480px, 90vw);
  opacity: 0;
  transform: translateY(60px);
}

/* Glow halo behind the photo */
.trophy-photo-glow {
  position: absolute;
  inset: -30px;
  border-radius: 20px;
  background: radial-gradient(
    ellipse 80% 70% at 50% 50%,
    rgba(212, 168, 67, 0.22) 0%,
    transparent 70%
  );
  animation: trophyGlow 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes trophyGlow {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.05); }
}

/* The big photo */
.trophy-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  position: relative;
  z-index: 1;
  border: 2px solid rgba(212, 168, 67, 0.35);
  box-shadow:
    0 0 0 1px rgba(212, 168, 67, 0.1),
    0 20px 80px rgba(0, 0, 0, 0.7),
    0 0 120px rgba(212, 168, 67, 0.12);
  object-fit: cover;
  max-height: 70vh;
}
.trophy-photo.broken { display: none; }

/* Placeholder when no photo */
.trophy-placeholder {
  display: none;  /* shown by JS if image missing */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--green-pitch) 0%, var(--bg2) 100%);
  border: 2px solid rgba(212, 168, 67, 0.2);
}
.trophy-placeholder.visible { display: flex; }
.trophy-cup {
  font-size: 5rem;
  filter: drop-shadow(0 0 20px rgba(212, 168, 67, 0.4));
}
.trophy-placeholder p {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  text-transform: uppercase;
}

/* Sub caption */
.trophy-sub {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.45rem);
  color: var(--white-dim);
  opacity: 0;
  max-width: 400px;
  line-height: 1.6;
}
