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

/* ─── Variables ─── */
:root {
  --black:   #080808;
  --gold:    #c9a84c;
  --crimson: #8b1a1a;
  --cream:   #f0ece4;
  --muted:   #6b6460;
  --border:  rgba(255,255,255,0.06);

  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'Inter', sans-serif;

  --mx: 50%;
  --my: 50%;
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--cream);
  font-family: var(--sans);
  cursor: none;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ─── Film Grain ─── */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
  animation: grain 6s steps(10) infinite;
}
@keyframes grain {
  0%,100%{transform:translate(0,0)}10%{transform:translate(-2%,-3%)}
  20%{transform:translate(3%,2%)}30%{transform:translate(-1%,4%)}
  40%{transform:translate(4%,-1%)}50%{transform:translate(-3%,3%)}
  60%{transform:translate(2%,-4%)}70%{transform:translate(-4%,1%)}
  80%{transform:translate(1%,-2%)}90%{transform:translate(-2%,4%)}
}

/* ─── Custom Cursor ─── */
.cursor {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid rgba(201,168,76,0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%,-50%);
  transition: width .2s, height .2s, border-color .2s;
}
.cursor-dot {
  position: fixed;
  width: 5px; height: 5px;
  background: var(--gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  transform: translate(-50%,-50%);
}
body:has(button:hover) .cursor,
body:has(a:hover) .cursor,
body:has(textarea:hover) .cursor {
  width: 60px; height: 60px;
  border-color: rgba(201,168,76,0.9);
}

/* ─── Nav ─── */
.nav {
  position: relative;
  z-index: 20;
  padding: 2.25rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-wl-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: none;
  transition: color .2s;
}
.nav-wl-btn:hover { color: var(--cream); }
.nav-login-btn {
  background: none;
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: .45rem 1rem;
  border-radius: 2px;
  cursor: none;
  transition: background .2s, color .2s;
}
.nav-login-btn:hover { background: var(--gold); color: var(--black); }
.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.72rem;
  cursor: none;
  transition: color .2s;
}
.nav-user-btn:hover { color: var(--cream); }
.user-name { color: var(--cream); }
.nav-signout { font-size: 0.65rem; }

/* ─── Watchlist Panel ─── */
.panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
  backdrop-filter: blur(4px);
}
.panel-overlay.open { display: block; }

.watchlist-panel {
  position: fixed;
  top: 0; right: -420px;
  width: 380px;
  height: 100vh;
  background: #0d0b09;
  border-left: 1px solid var(--border);
  z-index: 200;
  transition: right .4s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
}
.watchlist-panel.open { right: 0; }

.wl-header {
  padding: 2rem 1.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wl-title-label {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--cream);
}
.wl-close {
  background: none; border: none;
  color: var(--muted);
  cursor: none;
  font-size: 0.8rem;
  transition: color .2s;
}
.wl-close:hover { color: var(--cream); }

.wl-body { flex: 1; overflow-y: auto; padding: 1.5rem 1.75rem; }
.wl-empty {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
  margin-top: 3rem;
}

.wl-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
}
.wl-poster {
  width: 42px;
  height: 62px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}
.wl-poster-placeholder {
  width: 42px; height: 62px;
  background: rgba(255,255,255,0.04);
  border-radius: 2px;
  flex-shrink: 0;
}
.wl-item-info { flex: 1; }
.wl-item-title {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--cream);
  margin-bottom: 0.2rem;
}
.wl-item-year { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.1em; }
.wl-remove {
  background: none; border: none;
  color: var(--muted);
  cursor: none;
  font-size: 0.7rem;
  transition: color .2s;
  flex-shrink: 0;
}
.wl-remove:hover { color: var(--cream); }

/* ─── Login Modal ─── */
.login-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 500;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
}
.login-box {
  background: #0d0b09;
  border: 1px solid rgba(201,168,76,0.12);
  border-radius: 4px;
  padding: 3rem;
  max-width: 380px;
  width: 90%;
  text-align: center;
  position: relative;
  animation: slideUp .4s cubic-bezier(.4,0,.2,1);
}
.login-close {
  position: absolute;
  top: 1rem; right: 1.25rem;
  background: none; border: none;
  color: var(--muted); cursor: none;
  font-size: 0.8rem; transition: color .2s;
}
.login-close:hover { color: var(--cream); }
.login-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.login-heading {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.15;
  color: var(--cream);
  margin-bottom: 0.8rem;
}
.login-heading em { font-style: italic; color: var(--gold); }
.login-sub {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 2rem;
}
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: .9rem 1.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 0.8rem;
  border-radius: 2px;
  cursor: none;
  transition: background .2s;
}
.google-btn:hover { background: rgba(255,255,255,0.09); }

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--black);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 100% 100% at center, transparent 40%, rgba(0,0,0,0.75) 100%);
  pointer-events: none;
}

/* ─── Hero Content ─── */
.hero-content {
  position: relative;
  z-index: 20;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 2rem 8rem;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}
.eyebrow {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp .9s ease .2s forwards;
}
.headline {
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 1.08;
  color: var(--cream);
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp .9s ease .4s forwards;
}
.headline em { font-style: italic; color: var(--gold); }

/* ─── Input ─── */
.input-wrap {
  width: 100%;
  max-width: 580px;
  opacity: 0;
  animation: fadeUp .9s ease .6s forwards;
}
textarea {
  width: 100%;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(201,168,76,0.35);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.65;
  padding: 1.25rem 1.5rem;
  resize: none;
  outline: none;
  border-radius: 2px;
  transition: border-color .3s, box-shadow .3s, background .3s;
  caret-color: var(--gold);
}
textarea::placeholder { color: rgba(240,236,228,0.2); font-style: italic; }
textarea:focus {
  border-color: rgba(201,168,76,0.5);
  border-bottom-color: var(--gold);
  background: rgba(201,168,76,0.025);
  box-shadow: 0 0 50px rgba(201,168,76,0.07);
}

.cta-btn {
  width: 100%;
  margin-top: 1rem;
  padding: 1.1rem 2rem;
  background: transparent;
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  transition: color .3s, box-shadow .3s;
}
.cta-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateX(-101%);
  transition: transform .45s cubic-bezier(.4,0,.2,1);
}
.cta-btn:hover::before { transform: translateX(0); }
.cta-btn:hover { color: var(--black); box-shadow: 0 0 40px rgba(201,168,76,0.2); }
.cta-btn span, .cta-btn svg { position: relative; z-index: 1; }
.cta-btn svg { width: 16px; height: 16px; }

/* ─── Scroll hint ─── */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: rgba(201,168,76,0.35);
  animation: bob 2s ease-in-out infinite;
  transition: color .2s;
}
.scroll-hint:hover { color: var(--gold); }
@keyframes bob {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

/* ─── About ─── */
.about-section {
  padding: 8rem 2rem;
  background:
    radial-gradient(ellipse 60% 60% at 50% 0%, rgba(139,26,26,0.08) 0%, transparent 70%),
    var(--black);
  border-top: 1px solid var(--border);
}
.about-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}
.about-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}
.about-heading {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--cream);
  margin-bottom: 1.75rem;
}
.about-heading em { font-style: italic; color: var(--gold); }
.about-sub {
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(240,236,228,0.5);
  max-width: 560px;
  margin: 0 auto 5rem;
}
.about-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: left;
}
.about-step {
  border-top: 1px solid rgba(201,168,76,0.2);
  padding-top: 1.5rem;
}
.step-num {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.step-label {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--cream);
  margin-bottom: 0.5rem;
}
.step-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.65; }

/* ─── Loading ─── */
.loading-section {
  display: none;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  background: var(--black);
}
.reel {
  width: 56px; height: 56px;
  border: 1px solid rgba(201,168,76,0.25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.dots::after {
  content: '';
  animation: dotcycle 1.5s steps(4,end) infinite;
}
@keyframes dotcycle {
  0%  { content: ''; } 25% { content: '.'; }
  50% { content: '..'; } 75% { content: '...'; }
}

/* ─── Result ─── */
.result-section {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  background:
    radial-gradient(ellipse 70% 50% at 50% 50%, rgba(139,26,26,0.09) 0%, transparent 70%),
    var(--black);
}
.result-card {
  display: flex;
  gap: 4.5rem;
  max-width: 900px;
  width: 100%;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(28px);
  animation: revealCard .9s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes revealCard { to { opacity:1; transform:translateY(0); } }

.poster-wrap { position: relative; flex-shrink: 0; width: 260px; }
#movie-poster {
  width: 100%;
  border-radius: 2px;
  display: block;
  box-shadow: 0 30px 80px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.04);
  transition: transform .12s ease;
}
.poster-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(ellipse at center, rgba(201,168,76,0.18) 0%, transparent 70%);
  z-index: -1;
  filter: blur(24px);
}

.movie-info { flex: 1; padding-top: .5rem; }
.movie-year {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.movie-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--cream);
  margin-bottom: 0.9rem;
}

/* Tagline (cinema poster vibe) */
.movie-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: rgba(201,168,76,0.85);
  letter-spacing: 0.01em;
  line-height: 1.4;
  margin-bottom: 1.2rem;
  max-width: 90%;
}

/* Meta row: runtime · genres · rating */
.movie-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(240,236,228,0.55);
  margin-bottom: 1.6rem;
}
.movie-meta .meta-item { white-space: nowrap; }
.movie-meta .meta-sep {
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(201,168,76,0.55);
  display: inline-block;
}

.movie-reason {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.75;
  color: rgba(240,236,228,0.7);
  border-left: 1px solid rgba(201,168,76,0.3);
  padding-left: 1.5rem;
  margin-bottom: 1.6rem;
}

/* Director + cast */
.movie-credits {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 300;
  color: rgba(240,236,228,0.55);
  letter-spacing: 0.02em;
  line-height: 1.6;
  margin-bottom: 1.8rem;
}
.movie-credits em {
  font-style: normal;
  color: rgba(240,236,228,0.85);
  font-weight: 400;
}

/* Mood match (the fun bit) */
.mood-match {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  margin-bottom: 1.8rem;
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 3px;
  background: linear-gradient(135deg, rgba(201,168,76,0.06), rgba(139,26,26,0.04));
  width: fit-content;
  position: relative;
  overflow: hidden;
}
.mood-match::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(201,168,76,0.12), transparent 60%);
  pointer-events: none;
}
.match-circle {
  position: relative;
  width: 56px; height: 56px;
  flex-shrink: 0;
}
.match-ring {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.match-track {
  fill: none;
  stroke: rgba(201,168,76,0.18);
  stroke-width: 3;
}
.match-fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(201,168,76,0.6));
  transition: stroke-dashoffset 1.4s cubic-bezier(.22,1,.36,1) .3s;
}
.match-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.02em;
}
.match-label {
  display: flex; flex-direction: column; gap: 0.2rem;
  position: relative;
}
.match-title {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}
.match-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(240,236,228,0.75);
}

/* Streaming providers */
.providers-wrap { margin-bottom: 1.5rem; }
.providers-label {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.65rem;
}
.providers-list { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.provider-logo {
  width: 32px; height: 32px;
  border-radius: 6px;
  object-fit: cover;
  opacity: 0.8;
  transition: opacity .2s;
}
.provider-logo:hover { opacity: 1; }

/* Trailer button */
.trailer-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(201,168,76,0.3);
  padding-bottom: 2px;
  transition: border-color .2s, opacity .2s;
}
.trailer-btn:hover { border-color: var(--gold); }

/* Result actions */
.result-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.watchlist-add-btn {
  background: transparent;
  border: 1px solid rgba(201,168,76,0.35);
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: .55rem 1.1rem;
  border-radius: 2px;
  cursor: none;
  transition: background .2s, color .2s;
}
.watchlist-add-btn:hover:not(:disabled) { background: var(--gold); color: var(--black); }
.watchlist-add-btn:disabled { opacity: 0.5; }
.reset-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: none;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(107,100,96,0.3);
  padding: 0;
  transition: color .2s;
}
.reset-btn:hover { color: var(--cream); }

/* ─── Before the film · ritual list ─── */
.ritual {
  margin: 1.8rem 0 2.2rem;
  padding: 1.4rem 1.6rem 1.6rem;
  border: 1px solid rgba(201,168,76,0.18);
  border-radius: 2px;
  background: linear-gradient(160deg, rgba(201,168,76,0.04), rgba(122,24,24,0.03));
  position: relative;
  max-width: 420px;
  opacity: 0;
  animation: ritualIn 0.9s 0.25s cubic-bezier(.22,1,.36,1) forwards;
}
.ritual::before {
  content: '';
  position: absolute;
  top: 0.35rem; left: 0.35rem; right: 0.35rem; bottom: 0.35rem;
  border: 1px solid rgba(201,168,76,0.08);
  pointer-events: none;
}
.ritual-label {
  font-family: var(--sans);
  font-size: 0.55rem;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(201,168,76,0.85);
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.7rem;
}
.ritual-label::before, .ritual-label::after {
  content: ''; flex: 0 0 24px; height: 1px; background: rgba(201,168,76,0.45);
}
.ritual-label::after { flex: 1; }
.ritual-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 0.55rem;
}
.ritual-list li {
  display: flex; align-items: baseline; gap: 0.9rem;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-style: italic;
  color: rgba(241,227,191,0.78);
  opacity: 0;
  animation: ritualLine 0.7s ease forwards;
}
.ritual-list li:nth-child(1) { animation-delay: 0.55s; }
.ritual-list li:nth-child(2) { animation-delay: 0.72s; }
.ritual-list li:nth-child(3) { animation-delay: 0.89s; }
.ritual-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  min-width: 26px;
  text-align: right;
  flex-shrink: 0;
}

@keyframes ritualIn  { to { opacity: 1; } }
@keyframes ritualLine { to { opacity: 1; } }

/* ─── Tonight's Ticket · Interactive 3D golden stub ─── */

/* 3D wrapper — gives the ticket perspective + mouse tilt */
.ticket-scene {
  perspective: 1200px;
  perspective-origin: 50% 60%;
  margin: 0.6rem 0 2.4rem;
  max-width: 500px;
}

/* The whole ticket is a 3D object that unfolds toward viewer */
.ticket-stub {
  position: relative;
  display: flex;
  transform-style: preserve-3d;
  will-change: transform;
  border-radius: 4px;
  overflow: visible;
  /* Start: folded shut, invisible */
  transform: rotateX(-90deg) translateY(-40px) scale(0.85);
  opacity: 0;
  transition: box-shadow 0.5s ease;
}
.ticket-stub.is-open {
  animation: ticketUnfold 1.6s 0.3s cubic-bezier(.22,1,.36,1) forwards;
}

/* Golden edge glow when open */
.ticket-stub.is-open::after {
  content: '';
  position: absolute; inset: -2px;
  border-radius: 5px;
  border: 1.5px solid rgba(201,168,76,0.55);
  box-shadow:
    0 0 30px rgba(201,168,76,0.2),
    0 0 80px rgba(201,168,76,0.08),
    inset 0 0 40px rgba(0,0,0,0.3);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  animation: glowEdge 0.8s 1.4s ease forwards;
}

/* Golden light sweep across surface */
.ticket-stub.is-open .ticket-main::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(201,168,76,0.22) 45%,
    rgba(255,240,180,0.15) 50%,
    rgba(201,168,76,0.22) 55%,
    transparent 65%
  );
  transform: translateX(-120%);
  animation: goldSweep 1.2s 1.5s ease-out forwards;
  pointer-events: none;
  z-index: 10;
  border-radius: 3px;
}

.ticket-main {
  flex: 0 0 72%;
  padding: 1.6rem 1.7rem 1.6rem;
  position: relative;
  border-right: 1.5px dashed rgba(201,168,76,0.32);
  background:
    radial-gradient(ellipse at top left, rgba(201,168,76,0.10), transparent 55%),
    linear-gradient(160deg, #1a0f08 0%, #0a0503 100%);
  border-radius: 4px 0 0 4px;
  overflow: hidden;
}
.ticket-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(201,168,76,0.22);
  margin-bottom: 1rem;
}
.ticket-brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--cream);
}
.ticket-admit {
  font-family: var(--sans);
  font-size: 0.48rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.6);
  padding: 0.28rem 0.6rem;
  border-radius: 1px;
  text-shadow: 0 0 8px rgba(201,168,76,0.3);
}
.ticket-feature {
  font-family: var(--sans);
  font-size: 0.48rem;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(241,227,191,0.5);
  margin-bottom: 0.45rem;
}
.ticket-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.08;
  color: var(--gold);
  margin: 0;
  letter-spacing: -0.005em;
  text-shadow: 0 0 30px rgba(201,168,76,0.25);
}
.ticket-year {
  font-family: var(--sans);
  font-size: 0.52rem;
  font-weight: 300;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(201,168,76,0.6);
  margin-top: 0.5rem;
}
.ticket-mood {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(241,227,191,0.68);
  margin: 1.1rem 0 1.2rem;
  padding: 0.65rem 0 0.65rem 0.8rem;
  border-top: 1px dashed rgba(201,168,76,0.18);
  border-bottom: 1px dashed rgba(201,168,76,0.18);
  position: relative;
}
.ticket-mood::before {
  content: '\201C';
  position: absolute;
  left: -0.1rem; top: 0.25rem;
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1;
}
.ticket-meta {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.tm-cell { display: flex; flex-direction: column; gap: 0.22rem; }
.tm-label {
  font-family: var(--sans);
  font-size: 0.42rem; font-weight: 400;
  letter-spacing: 0.38em; text-transform: uppercase;
  color: rgba(201,168,76,0.5);
}
.tm-value {
  font-family: var(--serif);
  font-style: italic; font-size: 0.8rem;
  color: var(--cream); letter-spacing: 0.02em;
}

.ticket-perforation { display: none; }

/* Perforation punches — three circles at the seam */
.ticket-stub .perf-hole {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #0a0503;
  border: 1px solid rgba(201,168,76,0.35);
  z-index: 4;
  left: calc(72% - 7px);
}
.ticket-stub .perf-hole:nth-child(1) { top: calc(50% - 28px); }
.ticket-stub .perf-hole:nth-child(2) { top: 50%; transform: translateY(-50%); }
.ticket-stub .perf-hole:nth-child(3) { top: calc(50% + 16px); }

.ticket-stub-end {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 1.2rem 0.9rem;
  background:
    repeating-linear-gradient(45deg,
      rgba(201,168,76,0.04) 0 6px,
      transparent 6px 12px),
    linear-gradient(160deg, #160c06 0%, #0a0503 100%);
  border-radius: 0 4px 4px 0;
  position: relative;
  gap: 0.45rem;
}
.stub-label {
  font-family: var(--sans);
  font-size: 0.42rem; font-weight: 400;
  letter-spacing: 0.38em; text-transform: uppercase;
  color: rgba(201,168,76,0.5);
}
.stub-num {
  font-family: var(--serif);
  font-style: italic; font-weight: 700;
  font-size: 2.6rem; color: var(--gold);
  line-height: 0.9;
  text-shadow: 0 0 24px rgba(201,168,76,0.4);
}
.stub-brand {
  font-family: var(--sans);
  font-size: 0.42rem; font-weight: 500;
  letter-spacing: 0.38em; text-transform: uppercase;
  color: rgba(241,227,191,0.45);
}

/* ── Keyframes ── */
@keyframes ticketUnfold {
  0%   { opacity: 0; transform: rotateX(-90deg) translateY(-40px) scale(0.85); }
  30%  { opacity: 1; }
  60%  { transform: rotateX(8deg) translateY(0) scale(1.02); }
  80%  { transform: rotateX(-3deg) translateY(0) scale(1); }
  100% { opacity: 1; transform: rotateX(0) translateY(0) scale(1) rotate(-0.4deg); }
}
@keyframes glowEdge {
  to { opacity: 1; }
}
@keyframes goldSweep {
  to { transform: translateX(120%); }
}

/* Hover tilt handled by JS — this is the resting state after animation */
.ticket-stub.is-open.tilt-ready {
  transition: transform 0.15s ease-out, box-shadow 0.4s ease;
}
.ticket-stub.is-open:hover {
  box-shadow:
    0 40px 80px rgba(0,0,0,0.7),
    0 0 60px rgba(201,168,76,0.18);
}

@media (max-width: 640px) {
  .ticket-scene { max-width: 100%; }
  .ticket-title { font-size: 1.3rem; }
  .ticket-meta { gap: 1rem; flex-wrap: wrap; }
}

/* ─── Tip Modal ─── */
.tip-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
  padding: 2rem;
  backdrop-filter: blur(10px);
  animation: fadeIn .3s ease forwards;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.tip-modal {
  background: rgba(14,12,10,0.97);
  border: 1px solid rgba(201,168,76,0.14);
  border-radius: 4px;
  padding: 2.75rem 3rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  position: relative;
  transform: translateY(24px);
  animation: slideUp .4s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes slideUp { to{transform:translateY(0)} }
.tip-close {
  position: absolute;
  top: 1rem; right: 1.25rem;
  background: none; border: none;
  color: var(--muted); cursor: none;
  font-size: 0.8rem; transition: color .2s;
}
.tip-close:hover { color: var(--cream); }
.tip-emoji { font-size: 2rem; margin-bottom: 1rem; }
.tip-title {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 0.6rem;
}
.tip-sub { font-size: 0.83rem; color: var(--muted); line-height: 1.65; margin-bottom: 1.75rem; }
.tip-btn {
  display: block;
  padding: .9rem 2rem;
  background: var(--gold);
  color: var(--black);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  margin-bottom: 1rem;
  transition: opacity .2s;
}
.tip-btn:hover { opacity: .85; }
.tip-skip {
  background: none; border: none;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.73rem;
  cursor: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
}
.tip-skip:hover { color: var(--cream); }

/* ─── Footer ─── */
.footer {
  padding: 1.75rem 3rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border-top: 1px solid var(--border);
}
.footer p { font-size: 0.68rem; color: var(--muted); }
.tmdb-logo { height: 11px; opacity: 0.45; filter: brightness(0) invert(1); }

/* ─── Animations ─── */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(18px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ─── Responsive ─── */
@media (max-width: 700px) {
  .nav { padding: 1.5rem; }
  .hero-content { padding: 0 1.5rem 5rem; }
  .about-steps { grid-template-columns: 1fr; }
  .result-card { flex-direction: column; gap: 2rem; }
  .poster-wrap { width: 100%; max-width: 240px; margin: 0 auto; }
  .footer { flex-direction: column; padding: 1.5rem; text-align: center; }
  .watchlist-panel { width: 100%; right: -100%; }
}
