/* ==========================================================================
   MOSTLY MOVIES - CINEMATIC EXPERIENCE SYSTEM
   Art Direction: The Luminescent Dark Cinema & Celluloid Halation
   ========================================================================== */

/* 1. TOKENS & CINEMATIC VARIABLES */
:root {
  --cinema-black: #050608;
  --cinema-surface: rgba(15, 17, 23, 0.72);
  --cinema-surface-solid: #0d0f15;
  --cinema-border: rgba(255, 255, 255, 0.08);
  --cinema-border-hover: rgba(255, 255, 255, 0.22);
  
  --kodak-red: #ff4d26;
  --kodak-red-glow: rgba(255, 77, 38, 0.35);
  --anamorphic-gold: #ffd700;
  --anamorphic-gold-glow: rgba(255, 215, 0, 0.3);
  --technicolor-cyan: #00f2fe;
  --technicolor-cyan-glow: rgba(0, 242, 254, 0.3);
  --celluloid-purple: #7b61ff;
  --celluloid-purple-glow: rgba(123, 97, 255, 0.35);
  --chronos-emerald: #10b981;
  --chronos-emerald-glow: rgba(16, 185, 129, 0.35);

  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Dank Mono', ui-monospace, monospace;
}

html {
  scroll-behavior: smooth;
}

[hidden] {
  display: none !important;
}

main {
  display: block !important;
  width: 100% !important;
  flex-grow: 1;
}

/* 2. 35MM FILM GRAIN & ATMOSPHERIC DUST */
#projector-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

.film-grain-overlay {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200vw;
  height: 200vh;
  pointer-events: none;
  z-index: 2;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  animation: filmGrainJitter 0.5s steps(5) infinite;
}

@keyframes filmGrainJitter {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-2%, -2%); }
  40% { transform: translate(2%, 1%); }
  60% { transform: translate(-1%, 2%); }
  80% { transform: translate(1%, -1%); }
  100% { transform: translate(0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .film-grain-overlay {
    animation: none;
  }
}

/* 5. CINEMATIC HERO SECTION */
.cinema-hero {
  position: relative;
  z-index: 10;
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 77, 38, 0.1);
  border: 1px solid rgba(255, 77, 38, 0.35);
  border-radius: 50px;
  padding: 0.45rem 1.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff7e60;
  margin-bottom: 2rem;
  box-shadow: 0 0 25px var(--kodak-red-glow);
}

.hero-pill .pill-dot {
  width: 6px;
  height: 6px;
  background-color: var(--kodak-red);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--kodak-red);
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #f3f4f6;
  margin-bottom: 1.8rem;
  text-wrap: balance;
}

.hero-title .glow-word {
  background: linear-gradient(135deg, #ffffff 0%, #ffd700 50%, #ff4d26 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(255, 215, 0, 0.25);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.6;
  color: #9ca3af;
  max-width: 720px;
  margin: 0 auto 3rem;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 3.5rem;
}

.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #ff4d26 0%, #e63914 100%);
  color: #ffffff;
  padding: 1rem 2.25rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 0 35px var(--kodak-red-glow), 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 50px rgba(255, 77, 38, 0.6), 0 8px 25px rgba(0, 0, 0, 0.5);
}

.hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  color: #f3f4f6;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  border: 1px solid var(--cinema-border);
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.hero-ticker {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: #6b7280;
  font-family: var(--font-mono);
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ticker-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* 6. SECTION TITLES & NARRATIVE HEADERS */
.cinema-section {
  position: relative;
  z-index: 10;
  padding: 7rem 1.5rem;
  max-width: 1240px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-act {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--kodak-red);
  margin-bottom: 0.75rem;
  display: block;
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f3f4f6;
  margin-bottom: 1.2rem;
}

.section-desc {
  font-size: 1.1rem;
  color: #9ca3af;
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
}

/* 7. DAILY GAUNTLET (GAME MATRIX) */
.gauntlet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (min-width: 841px) {
  .gauntlet-grid > .cinema-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 580px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 840px) {
  .gauntlet-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.cinema-card {
  position: relative;
  background: var(--cinema-surface);
  border: 1px solid var(--cinema-border);
  border-radius: 24px;
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  cursor: pointer;
}

.cinema-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  height: 3px;
  background: transparent;
  transition: background 0.4s ease;
  z-index: 2;
}

.cinema-card:hover {
  transform: translateY(-6px);
  border-color: var(--cinema-border-hover);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Card Themes */
.cinema-card.theme-cinedegrees::before {
  background: var(--celluloid-purple);
}
.cinema-card.theme-cinedegrees:hover {
  box-shadow: 0 20px 45px var(--celluloid-purple-glow);
}

.cinema-card.theme-keyframe::before {
  background: var(--kodak-red);
}
.cinema-card.theme-keyframe:hover {
  box-shadow: 0 20px 45px var(--kodak-red-glow);
}

.cinema-card.theme-plotlines::before {
  background: var(--technicolor-cyan);
}
.cinema-card.theme-plotlines:hover {
  box-shadow: 0 20px 45px var(--technicolor-cyan-glow);
}

.cinema-card.theme-cineclues::before {
  background: var(--anamorphic-gold);
}
.cinema-card.theme-cineclues:hover {
  box-shadow: 0 20px 45px var(--anamorphic-gold-glow);
}

.cinema-card.theme-chronos::before {
  background: #10b981;
  background: var(--chronos-emerald);
}
.cinema-card.theme-chronos:hover {
  box-shadow: 0 20px 45px rgba(16, 185, 129, 0.3);
  box-shadow: 0 20px 45px var(--chronos-emerald-glow);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.card-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  color: #d1d5db;
}

.card-difficulty {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: #9ca3af;
}

.diff-pips {
  display: flex;
  gap: 3px;
}

.diff-pip {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
}

.diff-pip.filled {
  background: #f3f4f6;
}

.cinema-card.theme-cinedegrees .diff-pip.filled { background: var(--celluloid-purple); }
.cinema-card.theme-keyframe .diff-pip.filled { background: var(--kodak-red); }
.cinema-card.theme-plotlines .diff-pip.filled { background: var(--technicolor-cyan); }
.cinema-card.theme-cineclues .diff-pip.filled { background: var(--anamorphic-gold); }
.cinema-card.theme-chronos .diff-pip.filled { background: #10b981; }

.card-icon-box {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08), 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s ease,
              background 0.35s ease;
}

.card-icon-box .emblem-svg {
  width: 32px;
  height: 32px;
  display: block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.35s ease;
}

.theme-cinedegrees .card-icon-box {
  background: rgba(123, 97, 255, 0.10);
  border-color: rgba(123, 97, 255, 0.22);
  color: var(--celluloid-purple);
}
.theme-keyframe .card-icon-box {
  background: rgba(255, 77, 38, 0.10);
  border-color: rgba(255, 77, 38, 0.22);
  color: var(--kodak-red);
}
.theme-plotlines .card-icon-box {
  background: rgba(0, 242, 254, 0.10);
  border-color: rgba(0, 242, 254, 0.22);
  color: var(--technicolor-cyan);
}
.theme-cineclues .card-icon-box {
  background: rgba(255, 215, 0, 0.10);
  border-color: rgba(255, 215, 0, 0.22);
  color: var(--anamorphic-gold);
}
.theme-chronos .card-icon-box {
  background: rgba(16, 185, 129, 0.10);
  border-color: rgba(16, 185, 129, 0.22);
  color: #10b981;
}

/* Emblem Hover Glow Effects */
.cinema-card:hover .card-icon-box {
  transform: translateY(-3px) scale(1.04);
}

.cinema-card:hover .card-icon-box .emblem-svg {
  transform: scale(1.06);
}

.cinema-card.theme-cinedegrees:hover .card-icon-box {
  background: rgba(123, 97, 255, 0.18);
  border-color: rgba(123, 97, 255, 0.5);
  box-shadow: 0 0 25px rgba(123, 97, 255, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.25);
}
.cinema-card.theme-cinedegrees:hover .card-icon-box .emblem-svg {
  filter: drop-shadow(0 0 10px rgba(123, 97, 255, 0.7));
}

.cinema-card.theme-keyframe:hover .card-icon-box {
  background: rgba(255, 77, 38, 0.18);
  border-color: rgba(255, 77, 38, 0.5);
  box-shadow: 0 0 25px rgba(255, 77, 38, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.25);
}
.cinema-card.theme-keyframe:hover .card-icon-box .emblem-svg {
  filter: drop-shadow(0 0 10px rgba(255, 77, 38, 0.7));
}

.cinema-card.theme-plotlines:hover .card-icon-box {
  background: rgba(0, 242, 254, 0.18);
  border-color: rgba(0, 242, 254, 0.5);
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.25);
}
.cinema-card.theme-plotlines:hover .card-icon-box .emblem-svg {
  filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.7));
}

.cinema-card.theme-cineclues:hover .card-icon-box {
  background: rgba(255, 215, 0, 0.18);
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.25);
}
.cinema-card.theme-cineclues:hover .card-icon-box .emblem-svg {
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.7));
}

.cinema-card.theme-chronos:hover .card-icon-box {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.25);
}
.cinema-card.theme-chronos:hover .card-icon-box .emblem-svg {
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.7));
}

.card-name {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f3f4f6;
  margin-bottom: 0.75rem;
}

.card-summary {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #9ca3af;
  margin-bottom: 1.75rem;
  flex-grow: 1;
}

.card-mechanic-preview {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #9496a1;
  margin-bottom: 2rem;
}

.card-action-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.9rem 1.4rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  color: #f3f4f6;
  border: 1px solid var(--cinema-border);
  transition: all 0.2s ease;
}

.card-action-btn:hover,
.cinema-card:hover .card-action-btn {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.card-action-btn.is-completed {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.12);
  color: #a7f3d0;
}

.card-action-btn.is-completed:hover,
.cinema-card:hover .card-action-btn.is-completed {
  background: #10b981;
  color: #000000;
  border-color: #10b981;
}

/* Stretches the action link over the entire card surface */
.card-action-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 24px;
}

.card-btn-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.btn-badge-new {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 77, 38, 0.18);
  color: #ff5e36;
  border: 1px solid rgba(255, 77, 38, 0.45);
  box-shadow: 0 0 10px rgba(255, 77, 38, 0.25);
  text-transform: uppercase;
  transition: all 0.2s ease;
  line-height: 1.2;
}

.card-action-btn:hover .btn-badge-new,
.cinema-card:hover .btn-badge-new,
.hero-btn-secondary:hover .btn-badge-new {
  background: #ff4d26;
  color: #ffffff;
  border-color: #ff4d26;
  box-shadow: 0 0 12px rgba(255, 77, 38, 0.6);
}

/* 12. CURTAIN CALL & FINAL CTA (STAGE 7) */
.curtain-call-box {
  background: radial-gradient(circle at 50% 50%, rgba(255, 77, 38, 0.12) 0%, rgba(5, 6, 8, 0.95) 75%);
  border: 1px solid var(--cinema-border);
  border-radius: 32px;
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8);
}

.curtain-call-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff4d26, transparent);
}

.curtain-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  margin-bottom: 1.25rem;
}

.curtain-desc {
  font-size: 1.15rem;
  color: #9ca3af;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

/* 13. CINEMATIC FOOTER */
.cinema-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--cinema-border);
  background: var(--cinema-black);
  padding: 3.5rem 2rem 4rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-brand {
  font-weight: 700;
  color: #f3f4f6;
  font-size: 1.1rem;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
}

/* 14. RESPONSIVE BREAKPOINTS */
@media (max-width: 1040px) {
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: 1.75rem;
  }

  .footer-left {
    align-items: center;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
    text-align: center;
    gap: 1rem 1.5rem;
  }
}

@media (max-width: 768px) {
  .cinema-hero {
    padding: 4rem 1rem 3rem;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-btn-primary,
  .hero-btn-secondary {
    width: 100%;
    justify-content: center;
  }
}
