/* ============================================================
   MESSI & THE ALBICELESTE — WORLD CUP FEATURETTE
   Premium Editorial Design · RedSands Theme
   ============================================================ */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

/* ---- Theme Tokens (Albiceleste Blue & White Theme) ---- */
:root {
  --bg-color: #F4F8FB;
  --bg-darker: #FFFFFF;
  --bg-darkest: #EBF2F7;
  --text-primary: #0F2038;
  --text-secondary: #4A607A;
  --text-muted: rgba(15, 32, 56, 0.45);
  --accent-gold: #D4AF37;
  --accent-gold-hover: #B59428;
  --accent-gold-dim: rgba(212, 175, 55, 0.12);
  --albiceleste-blue: #75AADB;
  --albiceleste-light: #4D96D6;
  --border-glass: rgba(117, 170, 219, 0.25);
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-strong: rgba(255, 255, 255, 0.96);
  --shadow-premium: 0 24px 80px rgba(117, 170, 219, 0.12);
  --shadow-card: 0 12px 40px rgba(15, 32, 56, 0.08);
  --font-primary: 'Outfit', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
  overflow-x: hidden;
  width: 100%;
}

body {
  background-color: var(--bg-darkest);
  color: var(--text-primary);
  font-family: var(--font-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* ---- Hidden utility ---- */
.hidden-ui {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Hidden fabric canvases */
canvas[id^="fabric-canvas-"] {
  position: absolute;
  left: -9999px;
  top: -9999px;
  pointer-events: none;
}


/* ============================================================
   HERO INTRO SECTION
   ============================================================ */

.hero-intro {
  position: relative;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(117, 170, 219, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
    transparent;
}

.hero-intro::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 120px,
    rgba(117, 170, 219, 0.04) 120px,
    rgba(117, 170, 219, 0.04) 240px
  );
  pointer-events: none;
  opacity: 0.8;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 2rem;
  max-width: 800px;
  margin-bottom: 1rem;
  will-change: transform, opacity;
}

.hero-overline {
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeInUp 0.8s var(--transition-smooth) 0.3s forwards;
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1em;
  margin-bottom: 2rem;
}

.hero-title-line {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  opacity: 0;
  animation: fadeInUp 0.9s var(--transition-smooth) forwards;
}

.hero-title-line:nth-child(1) { animation-delay: 0.5s; }
.hero-title-line:nth-child(2) { animation-delay: 0.7s; }
.hero-title-line:nth-child(3) { animation-delay: 0.9s; }

.hero-title-line.accent {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--accent-gold);
  font-style: italic;
  font-weight: 400;
}

.hero-subtitle {
  font-family: var(--font-primary);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 550px;
  margin: 0 auto 3.5rem;
  opacity: 0;
  animation: fadeInUp 0.8s var(--transition-smooth) 1.2s forwards;
}

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  opacity: 1;
  animation: fadeInUp 0.8s var(--transition-smooth) 1.6s both;
  transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
  opacity: 0.7 !important;
}

.scroll-indicator span {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.scroll-arrow {
  animation: bounceDown 2s ease-in-out infinite;
  color: var(--accent-gold);
}

@keyframes bounceDown {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(8px); }
  60% { transform: translateY(4px); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ============================================================
   TIMELINE CONTAINER — SCROLLYTELLING LAYOUT
   ============================================================ */

.timeline-container {
  display: grid;
  grid-template-columns: 46% 54%;
  max-width: 1650px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

/* ---- Viewer Track (Sticky 3D) ---- */
.viewer-track {
  position: fixed;
  top: 0;
  left: calc(50% - 66px);
  width: 891px;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 1650px) {
  .viewer-track {
    left: 46vw;
    width: 54vw;
  }
}

.viewer-sticky {
  position: relative;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border-left: none;
}

.viewer-era-badge {
  position: absolute;
  top: 6.5rem; /* below sticky header (80px) */
  left: 73%;
  transform: translateX(-50%);
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  z-index: 10;
}

.badge-year {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  transition: all 0.5s var(--transition-smooth);
}

.badge-tournament {
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-gold);
  transition: all 0.5s var(--transition-smooth);
}

.viewer-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
}

.viewer-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Loading Overlay */
.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: transparent;
  backdrop-filter: none;
  z-index: 2000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(212, 175, 55, 0.2);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.viewer-hint {
  position: absolute;
  bottom: 1rem;
  left: 73%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  z-index: 10;
  pointer-events: none;
}

/* ---- Timeline Progress Bar ---- */
.timeline-progress {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 6rem);
  max-width: 400px;
  z-index: 9999 !important;
  pointer-events: auto !important;
}

.progress-track {
  width: 100%;
  height: 2px;
  background: rgba(15, 32, 56, 0.08);
  border-radius: 1px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-hover));
  border-radius: 1px;
  transition: width 0.6s var(--transition-smooth);
}

.progress-dots {
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: auto !important;
}

.progress-dots .dot {
  background: none;
  border: 1.5px solid rgba(15, 32, 56, 0.15);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s var(--transition-smooth);
  position: relative;
  pointer-events: auto !important;
}

.dot span {
  font-family: var(--font-primary);
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(15, 32, 56, 0.4);
  transition: color 0.3s ease;
}

.dot.passed {
  border-color: var(--accent-gold);
}

.dot.passed span {
  color: var(--accent-gold);
}

.dot.active {
  border-color: var(--accent-gold);
  background: var(--accent-gold);
  transform: scale(1.2);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.4);
}

.dot.active span {
  color: var(--bg-darkest);
  font-weight: 700;
}


/* ---- Narrative Track (Scrollable) ---- */
.narrative-track {
  order: 1;
  padding: 0;
}

.era-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 4rem 3rem;
  position: relative;
}

.era-number {
  position: absolute;
  top: 3rem;
  right: 3rem;
  font-family: var(--font-serif);
  font-size: 6rem;
  font-weight: 800;
  color: rgba(117, 170, 219, 0.15);
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.era-card {
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 3rem;
  transition: all 0.6s var(--transition-smooth);
  opacity: 0.4;
  transform: translateY(20px);
}

/* Messi Photo Container inside card */
.era-messi-image-container {
  width: 100%;
  height: 240px;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-glass);
  background: var(--bg-darker);
  position: relative;
}

.era-messi-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: grayscale(0.15) contrast(1.05);
  transition: transform 1.2s var(--transition-smooth);
}

.era-section.active .era-messi-image {
  transform: scale(1.05);
}

.era-section.active .era-card {
  opacity: 1;
  transform: translateY(0);
  box-shadow: var(--shadow-card);
}

/* Champion card glow */
.era-card.champion {
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow:
    var(--shadow-card),
    0 0 60px rgba(212, 175, 55, 0.08),
    inset 0 1px 0 rgba(212, 175, 55, 0.2);
}

.era-section.active .era-card.champion {
  box-shadow:
    var(--shadow-card),
    0 0 80px rgba(212, 175, 55, 0.12),
    inset 0 1px 0 rgba(212, 175, 55, 0.25);
}

.era-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.era-flag {
  font-size: 1.5rem;
}

.era-year-label {
  font-family: var(--font-primary);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-gold);
  background: var(--accent-gold-dim);
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
}

.era-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 0.25rem;
}

.trophy-icon {
  display: inline-block;
  animation: trophyPulse 2s ease-in-out infinite;
}

@keyframes trophyPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1) rotate(3deg); }
}

.era-tagline {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--albiceleste-light);
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.era-story {
  font-size: 0.9rem;
  font-weight: 350;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* ---- Stats Row ---- */
.era-stats {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.stat {
  flex: 1;
  text-align: center;
  padding: 0.75rem 0.5rem;
  background: rgba(117, 170, 219, 0.04);
  border: 1px solid rgba(117, 170, 219, 0.12);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.stat.highlight {
  background: var(--accent-gold-dim);
  border-color: rgba(212, 175, 55, 0.2);
}

.stat-value {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat.highlight .stat-value {
  color: var(--accent-gold);
}

.stat-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

/* ---- Jersey Detail Tag ---- */
.era-detail {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(117, 170, 219, 0.15);
}

.detail-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-gold);
  flex-shrink: 0;
}

.detail-value {
  font-size: 0.75rem;
  font-weight: 350;
  color: var(--text-muted);
  line-height: 1.5;
}


/* ============================================================
   CLOSING SECTION
   ============================================================ */

.closing-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 3rem;
}

.closing-card {
  text-align: center;
  max-width: 480px;
}

.closing-stars {
  font-size: 1.5rem;
  letter-spacing: 0.8em;
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
  animation: trophyPulse 3s ease-in-out infinite;
}

.closing-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-hover) 50%, var(--accent-gold) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s ease-in-out infinite;
  margin-bottom: 1.5rem;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.closing-text {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 2rem;
}

.closing-badge {
  opacity: 0.3;
}

.brand-logo-closing {
  filter: grayscale(0.5);
  transition: filter 0.3s ease;
}

.closing-badge:hover .brand-logo-closing {
  filter: grayscale(0);
}


/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

@media (max-width: 1024px) {
  .timeline-container {
    grid-template-columns: 1fr;
  }

  .viewer-track {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  /* When scrolled past creator section, fade/move the fixed viewer container away */
  .hide-viewer-mobile .viewer-track {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50px);
  }

  /* Force pointer-events none on the sticky container track completely on mobile when viewer is hidden */
  .hide-viewer-mobile .timeline-container {
    pointer-events: none !important;
  }

  .viewer-sticky {
    height: 100%;
    border-left: none;
    border-bottom: none;
    padding: 0;
    background: transparent;
  }

  .viewer-wrapper {
    max-width: none;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }

  .viewer-era-badge {
    position: absolute;
    top: 5.5rem;
    left: 50%;
    transform: translateX(-50%);
  }

  .viewer-hint {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0;
  }

  .timeline-progress {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 3rem);
  }

  .narrative-track {
    position: relative;
    z-index: 10;
    background-color: var(--bg-darkest);
    width: 100%;
  }

  .era-section {
    min-height: auto;
    padding: 3rem 1.5rem;
    background-color: var(--bg-darkest);
  }

  .era-card {
    max-width: none;
    margin-left: 0;
    padding: 1.5rem;
  }

  .stat-label {
    font-size: 0.7rem;
    color: rgb(54 135 236 / 70%) !important;
  }

  .stat-value {
    color: #000000 !important;
    font-weight: 600 !important;
  }

  .era-number {
    font-size: 3.5rem;
    top: 2rem;
    right: 1.5rem;
  }
}

@media (max-width: 640px) {
  .hero-subtitle {
    font-size: 0.9rem;
  }

  .era-stats {
    flex-wrap: wrap;
  }

  .stat {
    flex: 0 0 calc(50% - 0.25rem);
  }

  .progress-dots .dot {
    width: 26px;
    height: 26px;
  }

  .dot span {
    font-size: 0.55rem;
  }

  .era-section {
    padding: 2rem 1rem;
  }
}

/* ============================================================
   GLOBAL NAVIGATION HEADER
   ============================================================ */
.header {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(117, 170, 219, 0.06);
}

.header-content {
  max-width: 1650px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  height: 42px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.3));
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
}

.header-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

/* ============================================================
   HERO INSTAGRAM REELS (PINTEREST 3-ROW STYLE)
   ============================================================ */

.hero-reels-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem 0;
  position: relative;
  overflow: hidden;
  z-index: 2;
  margin-top: 2rem;
}

/* Edge Fades for Premium Bleed Effect */
.hero-reels-wrapper::before,
.hero-reels-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 150px;
  z-index: 5;
  pointer-events: none;
}

.hero-reels-wrapper::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-darkest) 0%, transparent 100%);
}

.hero-reels-wrapper::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg-darkest) 0%, transparent 100%);
}

.hero-reel-row {
  display: flex;
  width: 100%;
  overflow: hidden;
}

.hero-reel-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  will-change: transform;
}

/* Alternating directions and varying speeds */
.scroll-left .hero-reel-track {
  animation: marqueeLeft 45s linear infinite;
}

.scroll-right .hero-reel-track {
  animation: marqueeRight 45s linear infinite;
}

/* Row-specific speed adjustments for organic Pinterest feel */
.hero-reel-row:nth-child(2) .hero-reel-track {
  animation-duration: 55s;
}
.hero-reel-row:nth-child(3) .hero-reel-track {
  animation-duration: 40s;
}

/* Pause on hover */
.hero-reels-wrapper:hover .hero-reel-track {
  animation-play-state: paused;
}

/* ---- Card Design (Polaroid Style) ---- */
.hero-reel-card {
  width: 230px;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 0.75rem 0.75rem 0.9rem;
  box-shadow: 0 4px 20px rgba(15, 32, 56, 0.04);
  transition: all 0.4s var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex-shrink: 0;
  user-select: none;
}

.hero-reel-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(212, 175, 55, 0.35);
  box-shadow: 
    0 15px 30px rgba(15, 32, 56, 0.08),
    0 0 25px rgba(212, 175, 55, 0.12);
}

.hero-reel-img-container {
  width: 100%;
  height: 250px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #000;
}

.hero-reel-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.8s var(--transition-smooth), filter 0.4s ease;
  filter: grayscale(0.12) contrast(1.02);
}

.hero-reel-card:hover .hero-reel-img-container img {
  transform: scale(1.08);
  filter: grayscale(0) contrast(1.05);
}

/* ---- Double-Tap Heart Overlay ---- */
.double-tap-heart {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  color: #FFFFFF;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.3));
}

.double-tap-heart svg {
  width: 70px;
  height: 70px;
  fill: #FF3B30;
}

.double-tap-heart.active {
  animation: heartPopAnim 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes heartPopAnim {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  30% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.9;
  }
  50% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.9;
  }
  80% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.9;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0;
  }
}

/* ---- Card Footer Block ---- */
.hero-reel-card-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.1rem 0.25rem 0;
}

.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.action-btn svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease, fill 0.2s ease, stroke 0.2s ease;
}

.action-btn:hover svg {
  transform: scale(1.15);
  color: var(--accent-gold);
}

.like-btn:hover svg {
  color: #FF3B30;
}

.like-btn.pulse svg {
  animation: pulseLike 0.3s ease-out;
}

@keyframes pulseLike {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.likes-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-primary);
}

.hero-reel-year {
  margin-left: auto;
  font-family: var(--font-primary);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent-gold);
  background: var(--accent-gold-dim);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* ---- Marquee Animation Keyframes ---- */
@keyframes marqueeLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marqueeRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* ============================================================
   ACCESSIBILITY: REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================================
   INTERACTIVE FULL-SCREEN 3D BACKGROUND SYSTEM
   ============================================================ */

/* Pointer-events pass-through logic for overlay elements */
.hero-intro,
.timeline-container,
.header {
  pointer-events: none;
}

.header-content,
.hero-content,
.hero-reels-wrapper,
.era-card,
.viewer-era-badge,
.viewer-hint,
.timeline-progress,
.viewer-container,
.scroll-indicator,
.closing-card,
.creator-card,
.fan-zone-section,
.fan-modal-overlay {
  pointer-events: auto;
}

/* Visibility toggling based on timeline active state */
.viewer-era-badge,
.viewer-hint,
.timeline-progress {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--transition-smooth), visibility 0.5s var(--transition-smooth);
}

.timeline-active .viewer-era-badge,
.timeline-active .viewer-hint,
.timeline-active .timeline-progress {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   HERO SPLIT & REELS SECTION LAYOUT (DESKTOP FIRST)
   ============================================================ */

.hero-split {
  display: flex;
  width: 100%;
  max-width: 1650px;
  margin: 0 auto;
  height: 100%;
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

.hero-left-content {
  width: 46%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 4rem 0 3rem;
}

.hero-right-space {
  width: 54%;
  pointer-events: none;
}

/* Left-align hero elements */
.hero-content {
  text-align: left;
  max-width: 600px;
  margin-bottom: 0;
}

.hero-title {
  align-items: flex-start;
}

.scroll-indicator {
  align-items: flex-start;
  margin-left: 0;
  margin-top: 3rem;
  opacity: 1 !important;
  animation: fadeInUp 0.8s var(--transition-smooth) 1.6s both !important;
}

/* Reels section positioned below hero intro fold */
.hero-reels-section {
  position: relative;
  z-index: 2;
  background-color: var(--bg-color);
  padding: 6rem 0;
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
}

.hero-reels-title-block {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
  padding: 0 2rem;
}

.reels-section-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.reels-section-subtitle {
  font-family: var(--font-primary);
  font-size: 1.1rem;
  color: var(--text-secondary);
}

@media (max-width: 1024px) {
  .hero-intro {
    padding-top: 80px;
    height: 100vh;
    min-height: 100vh;
  }

  .hero-split {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 100vh;
    padding-bottom: 0;
  }
  
  .hero-left-content {
    position: absolute;
    inset: 0;
    width: 100%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 3rem 1.5rem 5rem 1.5rem;
    background: linear-gradient(to top, rgba(15, 32, 56, 0.95) 0%, rgba(15, 32, 56, 0.45) 60%, transparent 100%);
    text-align: center;
  }
  
  .hero-content {
    text-align: center;
    width: 100%;
    margin-bottom: 0;
  }
  
  .hero-title {
    align-items: center;
    margin-bottom: 1rem;
  }

  .hero-title-line {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: #FFFFFF !important; /* White for strong contrast on dark mobile backdrop */
  }

  .hero-title-line.accent {
    color: var(--accent-gold) !important;
  }

  .hero-subtitle {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    margin: 0 auto 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.85) !important; /* Soft white for readability */
  }

  .hero-stats {
    gap: 2rem;
    margin: 1.5rem 0 1rem -1rem;
  }

  .stat-number {
    font-size: 2.75rem;
    color: var(--accent-gold) !important;
  }

  .stat-label {
    font-size: 0.7rem;
    color: rgb(54 135 236 / 70%) !important; /* Lighter label text on mobile */
  }
  
  .scroll-indicator {
    align-items: center;
    margin: 1.5rem auto 0;
  }

  .scroll-indicator span,
  .scroll-indicator svg {
    color: rgba(255, 255, 255, 0.85) !important;
  }
  
  .hero-right-space {
    display: none;
  }
  
  .hero-reels-section {
    padding: 4rem 0;
  }
}

/* ---- Cinematic 2D to 3D Transition Overlay ---- */
.transition-image-overlay {
  position: absolute;
  inset: 0;
  z-index: 2010; /* Sits above the loading overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  overflow: hidden;
  border-radius: 0;
  width: 100%;
  height: 100%;
  transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1), transform 1.5s cubic-bezier(0.4, 0, 0.2, 1), filter 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform, filter;
  pointer-events: none; /* Let clicks pass through once fading */
}

.transition-source-img {
  /* width: 100%; */
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: drop-shadow(0 20px 50px rgba(0,0,0,0.35));
  /* Fade out left and right edges to blend with the background */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
}

/* Creator Overlay Image (Fade-in when creator section is active) */
.creator-image-overlay {
  position: absolute;
  inset: 0;
  z-index: 2005; /* Sits above Three.js canvas but below transition overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-darkest);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  overflow: hidden;
}

.creator-image-overlay.active {
  opacity: 1;
  visibility: visible;
}

.creator-overlay-img {
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: drop-shadow(0 20px 50px rgba(0,0,0,0.35));
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
}

/* ---- Hero Stats Counters ---- */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3.5rem;
  margin: 2.5rem 0 2.5rem -1.5rem; /* Shift slightly left for optical balance */
  opacity: 0;
  animation: fadeInUp 0.8s var(--transition-smooth) 1.0s forwards;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-family: var(--font-primary);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1;
  margin-bottom: 0.25rem;
  font-feature-settings: "tnum"; /* Tabular figures for stable counter digits width */
}

.stat-label {
  font-family: var(--font-primary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

/* ============================================================
   CREATOR SECTION
   ============================================================ */

.creator-section {
  min-height: 100vh;
  padding: 4rem 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.creator-card {
  width: 100%;
  max-width: 480px;
  text-align: left;
}

.creator-overline {
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
  display: block;
}

.creator-title-section {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2rem;
  line-height: 1.2;
}

.creator-title-section .creator-accent {
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.creator-box {
  background: var(--bg-darker);
  border: 1px solid var(--border-glass);
  padding: 2.5rem;
  border-radius: 24px;
  box-shadow: var(--shadow-premium);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.creator-box:hover {
  border-color: rgba(212, 175, 55, 0.4);
  transform: translateY(-4px);
}

.creator-box::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -60px;
  width: 120px;
  height: 120px;
  background: rgba(212, 175, 55, 0.04);
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
}

.creator-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.creator-avatar-img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(15, 32, 56, 0.08);
  border: 1px solid var(--border-glass);
  flex-shrink: 0;
}

.creator-info {
  display: flex;
  flex-direction: column;
}

.creator-name {
  font-family: var(--font-primary);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.creator-role {
  font-family: var(--font-primary);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  margin-top: 0.15rem;
}

.creator-bio {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.creator-bio-secondary {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.creator-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid var(--border-glass);
  padding-top: 1.5rem;
}

.creator-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.creator-btn.btn-secondary {
  background: transparent;
  border: 1px solid var(--text-secondary);
  color: var(--text-secondary);
}

.creator-btn.btn-secondary:hover {
  background: var(--bg-darkest);
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.creator-btn.btn-primary {
  background: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.25);
}

.creator-btn.btn-primary:hover {
  background: var(--accent-gold-hover);
  border-color: var(--accent-gold-hover);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
  transform: translateY(-1px);
}

.creator-gallery {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.gallery-item {
  flex: 1;
  aspect-ratio: 3 / 4; /* Portrait ratio for a longer/taller display */
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  box-shadow: 0 4px 12px rgba(15, 32, 56, 0.04);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:first-child img {
  transform: scale(1.2);
}

.gallery-item:first-child:hover img {
  transform: scale(1.3);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Make sure creator section is readable on mobile light background */
@media (max-width: 1024px) {
  .creator-section {
    background-color: var(--bg-darkest);
    padding: 3rem 1.5rem;
    min-height: 100vh;
    box-sizing: border-box;
  }

  .creator-box {
    background: var(--bg-darker);
    border-color: var(--border-glass);
    box-shadow: var(--shadow-premium);
  }
}

/* Hide the mobile impossible section on desktop viewports by default */
.impossible-mobile-section {
  display: none;
}

@media (max-width: 1024px) {
  .impossible-mobile-section {
    display: block;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    z-index: 10;
    padding: 0;
    margin: 0;
    background-color: #000;
    pointer-events: auto !important;
  }

  .impossible-mobile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
  }
}

/* ============================================================
   FAN ZONE: POLL & GENERATOR STYLES
   ============================================================ */

.fan-zone-section {
  padding: 6rem 3rem;
  background-color: var(--bg-darkest);
  border-top: 1px solid var(--border-glass);
  position: relative;
  z-index: 10;
}

.fan-zone-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.fan-card-wrapper {
  background: var(--bg-darker);
  border: 1px solid var(--border-glass);
  padding: 3rem;
  border-radius: 24px;
  box-shadow: var(--shadow-premium);
}

.fan-zone-overline {
  font-family: var(--font-primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
  display: block;
}

.fan-zone-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.fan-zone-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Poll Buttons */
.poll-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.poll-btn {
  background: var(--bg-color);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s var(--transition-smooth);
  width: 100%;
  text-align: left;
}

.poll-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.4);
}

.poll-btn-year {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-right: 1.25rem;
  z-index: 2;
}

.poll-btn-label {
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  z-index: 2;
}

.poll-percentage {
  margin-left: auto;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-gold);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.poll-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--accent-gold-dim);
  width: 0%;
  transition: width 0.8s cubic-bezier(0.1, 0.8, 0.25, 1);
  z-index: 1;
}

.voted .poll-percentage {
  opacity: 1;
}

.voted .poll-btn {
  pointer-events: none;
}

/* Generator Controls */
.generator-controls {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  background: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  outline: none;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.1);
}

.generator-btn {
  background: var(--text-primary);
  color: #FFFFFF;
  border: none;
  padding: 1.1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.generator-btn:hover {
  background: var(--accent-gold);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.2);
  transform: translateY(-1px);
}

/* Canvas Preview Container */
.canvas-preview-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

#fan-card-canvas {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(15, 32, 56, 0.12);
  border: 1px solid var(--border-glass);
  display: none;
}

.canvas-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: fadeInUp 0.5s ease forwards;
}

.action-btn-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
  text-align: center;
}

.action-btn-share svg {
  flex-shrink: 0;
}

.action-btn-share.download {
  background: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.25);
  font-weight: 800;
}

.action-btn-share.download:hover {
  background: var(--accent-gold-hover);
  border-color: var(--accent-gold-hover);
  transform: translateY(-1px);
}

.social-share-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.action-btn-share.twitter {
  background: #0F1419;
  color: #FFFFFF;
  border: 1px solid #0F1419;
}

.action-btn-share.twitter:hover {
  background: #272c30;
}

.action-btn-share.whatsapp {
  background: #25D366;
  color: #FFFFFF;
  border: 1px solid #25D366;
}

.action-btn-share.whatsapp:hover {
  background: #20ba59;
}

@media (max-width: 1024px) {
  .fan-zone-section {
    padding: 4rem 1.5rem;
  }

  .fan-zone-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .fan-card-wrapper {
    padding: 2rem 1.5rem;
  }
}

@media (min-width: 1025px) {
  .fan-zone-container {
    grid-template-columns: 1fr;
    max-width: 700px;
    margin: 0 auto;
    gap: 3rem;
  }

  .generator-card {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
}

/* ---- Fan Card Modal Popup ---- */
.fan-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 32, 56, 0.4);
  backdrop-filter: blur(12px);
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeIn 0.3s var(--transition-smooth) forwards;
}

.fan-modal-content {
  background: var(--bg-darker);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 2.25rem 1.75rem 1.75rem;
  max-width: 432px;
  width: 100%;
  position: relative;
  box-shadow: 0 30px 100px rgba(15, 32, 56, 0.25);
  animation: scaleUp 0.4s var(--transition-spring) forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.fan-modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 2.2rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
  line-height: 1;
}

.fan-modal-close:hover {
  color: var(--accent-gold);
}

.fan-modal-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.fan-modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ============================================================
   HORIZONTAL ACCORDION GALLERY
   ============================================================ */

.horizontal-gallery-section {
  padding: 6rem 3rem;
  background-color: var(--bg-darkest);
  border-top: 1px solid var(--border-glass);
  position: relative;
  z-index: 10;
}

.gallery-header {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
}

.gallery-overline {
  font-family: var(--font-primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
  display: block;
}

.gallery-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.gallery-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.gallery-container {
  display: flex;
  width: 100%;
  max-width: 1200px;
  height: 550px;
  margin: 0 auto;
  gap: 1rem;
}

.gallery-panel {
  flex: 1;
  overflow: hidden;
  position: relative;
  border-radius: 20px;
  cursor: pointer;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
  transition: all 0.7s cubic-bezier(0.25, 1, 0.3, 1);
}

.gallery-panel.active {
  flex: 4;
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: var(--shadow-premium);
}

.panel-background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.3, 1);
}

.gallery-panel:hover .panel-background {
  transform: scale(1.05);
}

.panel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 32, 56, 0.9) 0%, rgba(15, 32, 56, 0.3) 50%, rgba(15, 32, 56, 0.1) 100%);
  transition: opacity 0.5s ease;
}

.panel-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem;
  z-index: 2;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.3, 1), transform 0.5s cubic-bezier(0.25, 1, 0.3, 1);
}

.gallery-panel.active .panel-content {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

.panel-tag {
  font-family: var(--font-primary);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.panel-header {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.panel-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  max-width: 600px;
}

.panel-year-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
  letter-spacing: 0.1em;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-panel.active .panel-year-label {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8) rotate(-90deg);
}

.gallery-dots-indicator {
  display: none;
}

@media (max-width: 1024px) {
  .horizontal-gallery-section {
    padding: 3rem 1.5rem;
  }

  .gallery-container {
    flex-direction: row;
    height: auto;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-radius: 16px;
    box-shadow: var(--shadow-premium);
  }

  .gallery-container::-webkit-scrollbar {
    display: none;
  }

  .gallery-panel {
    flex: 0 0 100%;
    scroll-snap-align: center;
    height: auto;
    aspect-ratio: 4 / 5;
    position: relative;
    border-radius: 0;
    transform: none !important;
    opacity: 1 !important;
    transition: none;
  }

  .gallery-panel.active {
    flex: 0 0 100%;
    box-shadow: none;
    border-color: var(--border-glass);
  }

  .panel-background {
    opacity: 1 !important;
    transform: none !important;
  }

  .panel-overlay {
    opacity: 1 !important;
  }

  .panel-year-label {
    position: absolute;
    top: 1rem;
    right: 1rem;
    left: auto;
    transform: none !important;
    font-size: 0.95rem;
    font-weight: 800;
    color: #FFFFFF;
    background: rgba(15, 32, 56, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.3rem 0.65rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    pointer-events: none;
    opacity: 1 !important;
  }

  .panel-year-label::after {
    display: none;
  }

  .gallery-panel.active .panel-year-label {
    opacity: 1 !important;
    transform: none !important;
  }

  .panel-content {
    padding: 1.5rem;
    opacity: 1 !important;
    transform: none !important;
  }

  .gallery-panel.active .panel-content {
    opacity: 1 !important;
    transform: none !important;
  }

  .gallery-dots-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
  }

  .gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transition: background 0.3s ease, transform 0.3s ease;
  }

  .gallery-dot.active {
    background: var(--accent-gold);
    transform: scale(1.25);
  }
}

