/* ==========================================================================
   Mr. Midnight's Halloween Party: coming-soon page (/halloween-party/).
   Loaded only on that page, on top of site.css (theme tokens live there).
   An invitation to a party with no lights: near-black, plum glow, gold leaf, wax red.
   ========================================================================== */

.theme-halloween-party {
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  background:
    radial-gradient(60% 40% at 85% 0%, rgba(42, 18, 64, 0.85), transparent 70%),
    var(--bg);
}

.hp-display {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 900;
  color: var(--primary);
  font-size: clamp(2.35rem, 4.4vw + 1rem, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
  text-shadow: 0 2px 40px rgba(233, 185, 73, 0.18);
}
.hp-display--md { font-size: clamp(2.1rem, 3.6vw + 1rem, 3.4rem); }
.hp-serif { font-family: var(--serif); font-style: italic; font-weight: 900; color: var(--accent-2); letter-spacing: 0; }
.hp-kicker { color: var(--primary); letter-spacing: 0.2em; margin-bottom: 18px; }

/* Hero -------------------------------------------------------------------- */
.hp-hero {
  position: relative; isolation: isolate; overflow: clip;
  padding: 32px 0 72px;
  background:
    radial-gradient(70% 50% at 20% 10%, rgba(42, 18, 64, 0.9), transparent 70%),
    radial-gradient(50% 45% at 80% 55%, rgba(42, 18, 64, 0.75), transparent 70%);
}
.hp-hero__sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hp-hero__grid { display: grid; gap: 44px; align-items: center; }
.hp-hero__copy { max-width: 44rem; }
.hp-hero::after { content: ''; position: absolute; inset: auto 0 0; height: 90px; z-index: -1; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.hp-hero__sub { margin-top: 20px; font-size: 1.15rem; line-height: 1.6; color: var(--muted); max-width: 34ch; }
.hp-hero__sub em { font-family: var(--serif); font-style: italic; font-weight: 900; color: var(--accent-2); }
.hp-hero .hero__ctas { margin-top: 30px; }

/* The invitation: cover card, candle glow, wax seal */
.hp-invite { position: relative; justify-self: center; width: min(64vw, 300px); margin: 0 0 8px; }
.hp-invite__card {
  position: relative; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(233, 185, 73, 0.35);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9), 0 0 60px -10px rgba(42, 18, 64, 0.9);
  transform: rotate(-3deg);
}
.hp-invite__card img { width: 100%; height: 100%; object-fit: cover; }
.hp-invite__seal { position: absolute; width: 46%; right: -18%; top: -5%; transform: rotate(14deg); filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.6)); }
.hp-candle {
  position: absolute; z-index: -1; inset: 10% -30% 0;
  background: radial-gradient(closest-side, rgba(255, 168, 70, 0.32), rgba(233, 185, 73, 0.1) 55%, transparent);
  filter: blur(8px);
}

.seal { display: block; overflow: visible; }
.seal__drip { transform-box: fill-box; transform-origin: 50% 0; }

/* Fog and bats (decor only) */
.hp-fog {
  position: absolute; left: -50%; width: 200%; bottom: -8%; height: 46%;
  background:
    radial-gradient(28% 55% at 18% 70%, rgba(150, 128, 190, 0.16), transparent 70%),
    radial-gradient(24% 45% at 46% 80%, rgba(150, 128, 190, 0.13), transparent 70%),
    radial-gradient(30% 60% at 74% 72%, rgba(150, 128, 190, 0.15), transparent 70%);
  filter: blur(18px);
}
.hp-fog--front { bottom: -14%; opacity: 0.8; }
.hp-bat { position: absolute; left: 0; display: block; color: #0d0814; filter: drop-shadow(0 0 5px rgba(233, 185, 73, 0.35)); opacity: 0; }
.hp-bat svg { width: 100%; height: auto; }
.hp-bat--1 { top: 9%; width: 38px; }
.hp-bat--2 { top: 20%; width: 26px; }
.hp-bat--3 { top: 5%; width: 18px; }

@media (prefers-reduced-motion: no-preference) {
  .hp-fog--back { animation: hp-drift 70s linear infinite alternate; }
  .hp-fog--front { animation: hp-drift 48s linear infinite alternate-reverse; }
  .hp-bat { opacity: 1; animation: hp-fly 26s linear infinite; }
  .hp-bat--2 { animation-duration: 34s; animation-delay: -12s; }
  .hp-bat--3 { animation-duration: 41s; animation-delay: -27s; }
  .hp-candle { animation: hp-flicker 3.4s steps(1, end) infinite; }
  .hp-invite__seal .seal__drip { animation: hp-drip 1.6s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: calc(0.6s + var(--d)); }
  .hp-hero__copy > * { animation: rise 0.8s var(--ease) both; }
  .hp-hero__copy > :nth-child(2) { animation-delay: 0.06s; }
  .hp-hero__copy > :nth-child(3) { animation-delay: 0.14s; }
  .hp-hero__copy > :nth-child(4) { animation-delay: 0.22s; }
  .hp-invite { animation: hp-invite-in 1.1s var(--ease) 0.1s both; }
}
@keyframes hp-drift { from { transform: translateX(0); } to { transform: translateX(25%); } }
@keyframes hp-fly {
  0% { transform: translate(-60px, 0); }
  25% { transform: translate(25vw, 14px); }
  50% { transform: translate(50vw, -6px); }
  75% { transform: translate(75vw, 12px); }
  100% { transform: translate(calc(100vw + 60px), -4px); }
}
@keyframes hp-flicker {
  0% { opacity: 0.85; } 12% { opacity: 1; } 21% { opacity: 0.78; } 34% { opacity: 0.95; }
  47% { opacity: 0.82; } 61% { opacity: 1; } 73% { opacity: 0.88; } 86% { opacity: 0.96; }
}
@keyframes hp-drip { from { transform: scaleY(0.15); } to { transform: scaleY(1); } }
@keyframes hp-invite-in { from { opacity: 0; transform: translateY(30px) rotate(4deg); } to { opacity: 1; transform: none; } }

@media (min-width: 900px) {
  .hp-hero { padding: 56px 0 96px; min-height: min(86dvh, 820px); display: flex; align-items: center; }
  .hp-hero__grid { grid-template-columns: 1.4fr 0.6fr; gap: 48px; }
  .hp-invite { width: min(100%, 330px); }
  .hp-hero .hero__ctas { display: flex; flex-wrap: wrap; }
}

/* Premise: three beats ----------------------------------------------------- */
.beats { list-style: none; padding: 0; margin-top: 36px; display: grid; gap: 28px; position: relative; }
.beat { display: grid; grid-template-columns: 52px 1fr; gap: 18px; align-items: start; position: relative; }
.beat:not(:last-child)::after { content: ''; position: absolute; left: 25px; top: 60px; bottom: -22px; width: 1.5px; background: linear-gradient(var(--line-strong), transparent); }
.beat__icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: var(--primary); border: 1.5px solid var(--line-strong); background: var(--surface); }
.beat p { font-weight: 800; font-size: clamp(1.3rem, 2.4vw + 0.8rem, 2rem); line-height: 1.22; letter-spacing: -0.02em; text-wrap: balance; padding-top: 8px; max-width: 30ch; }
.beat--payoff .beat__icon { background: var(--wax); border-color: var(--wax); color: var(--primary); }
.beat--payoff .hp-serif { display: block; margin-top: 8px; font-size: 1.12em; line-height: 1.15; }
@media (min-width: 900px) {
  .beats { gap: 40px; }
  .beat:nth-child(2) { margin-left: 9%; }
  .beat:nth-child(3) { margin-left: 18%; }
  .beat:not(:last-child)::after { display: none; }
}

/* How it works (reuses .how/.steps) */
.hp-how .step:last-child .step__n { background: var(--primary); color: var(--on-primary); }
.hp-schedule { margin-top: 36px; font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--primary); }

/* Cast -------------------------------------------------------------------- */
.cast-grid {
  list-style: none; padding: 4px var(--gutter) 16px; margin: 32px calc(var(--gutter) * -1) 0;
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.cast-grid::-webkit-scrollbar { display: none; }
.cast {
  flex: 0 0 min(78vw, 320px); scroll-snap-align: start;
  border-radius: var(--r); overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.cast__media { aspect-ratio: 4 / 5; overflow: hidden; background: var(--plum); }
.cast__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.cast__body { padding: 18px 18px 20px; display: grid; gap: 8px; }
.cast__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.cast__name > span:first-child { font-weight: 900; font-size: 1.45rem; letter-spacing: -0.02em; line-height: 1.1; }
.cast__role { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); }
.cast__line { color: var(--muted); line-height: 1.5; }
.cast--host:hover, .cast--host:focus-within { border-color: rgba(233, 185, 73, 0.55); box-shadow: 0 0 36px -4px rgba(233, 185, 73, 0.35); }
.cast--host .cast__name > span:first-child { font-family: var(--serif); font-style: italic; color: var(--primary); letter-spacing: 0; }
@media (min-width: 760px) {
  .cast-grid { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; margin-inline: 0; padding: 0; gap: 18px; }
  .cast--host:hover { transform: translateY(-4px); }
}

/* What's inside: the locked tabs ------------------------------------------- */
.hp-inside { padding-block: 8px clamp(64px, 9vw, 120px); }
.hp-tabs { margin-top: 28px; }
.hp-lock {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; gap: 4px; align-content: start; text-align: left; text-decoration: none;
  min-height: 0; padding: 16px;
  border-radius: 16px; border: 1.5px solid var(--line-strong); background: var(--surface);
  transition: border-color 0.3s var(--ease);
}
.hp-lock:hover { border-color: var(--primary); }
.hp-lock .tabs__label { font-size: clamp(1.02rem, 1.4vw + 0.7rem, 1.6rem); }
.hp-lock__soon { margin-top: 4px; color: var(--muted); font-weight: 600; }
.hp-lock__veil {
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(125deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 9px),
    linear-gradient(160deg, rgba(42, 18, 64, 0.35), rgba(7, 6, 11, 0.55));
}
.hp-lock__badge {
  justify-self: start; margin-top: 10px;
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px;
  background: rgba(7, 6, 11, 0.8); border: 1px solid var(--line-strong);
  font-family: var(--mono); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary);
}
.hp-lock__badge svg { flex: none; width: 15px; height: 15px; }
.hp-lock > :not(.hp-lock__veil) { position: relative; z-index: 2; }
@media (min-width: 640px) { .hp-lock { padding: 20px 24px; } }
@media (min-width: 900px) { .hp-lock { border-radius: 20px; padding: 26px 28px; } }

/* Guest list ---------------------------------------------------------------- */
.hp-guest {
  position: relative; isolation: isolate;
  background:
    radial-gradient(60% 60% at 15% 30%, rgba(42, 18, 64, 0.9), transparent 70%),
    radial-gradient(40% 50% at 90% 90%, rgba(179, 18, 42, 0.16), transparent 70%),
    var(--surface);
  border-block: 1px solid var(--line);
}
.hp-guest__inner { display: grid; gap: 30px; }
.hp-guest__sub { margin-top: 16px; font-size: 1.12rem; color: var(--muted); max-width: 36ch; }
.hp-guest__form { display: grid; gap: 16px; }
.hp-guest__form .optional { font-weight: 400; color: var(--faint); }
.hp-guest__form input { background: rgba(7, 6, 11, 0.7); }
.hp-guest .form-success.hp-stamped {
  display: grid; justify-items: center; gap: 18px; text-align: center;
  padding: 28px 24px 32px; border-radius: var(--r-lg);
  background: rgba(7, 6, 11, 0.7); border: 1px solid var(--line-strong); color: var(--ink);
}
.hp-stamped[hidden] { display: none !important; }
.hp-stamped .form-success__title { font-family: var(--serif); font-style: italic; font-weight: 900; color: var(--primary); font-size: 1.6rem; line-height: 1.2; max-width: 20ch; margin: 0; }
.hp-stamp { width: 132px; }
@media (prefers-reduced-motion: no-preference) {
  .hp-stamped:not([hidden]) .hp-stamp { animation: hp-stamp 0.7s var(--ease) both; }
  .hp-stamped:not([hidden]) .seal__drip { animation: hp-drip 1.4s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: calc(0.55s + var(--d)); }
  .hp-stamped:not([hidden]) .form-success__title { animation: rise 0.6s var(--ease) 0.45s both; }
}
@keyframes hp-stamp {
  0% { opacity: 0; transform: scale(2.3) rotate(-28deg); }
  55% { opacity: 1; transform: scale(0.9) rotate(-6deg); }
  75% { transform: scale(1.04) rotate(-9deg); }
  100% { opacity: 1; transform: scale(1) rotate(-8deg); }
}
@media (min-width: 900px) {
  .hp-guest__inner { grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
}

/* Episode tracker ----------------------------------------------------------- */
.episodes { list-style: none; padding: 0; margin-top: 28px; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.episode { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--bg); }
.episode__n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-weight: 500; border: 1.5px solid var(--line-strong); color: var(--primary); }
.episode:first-child .episode__n { background: var(--wax); border-color: var(--wax); color: var(--primary); }
.episode__body { min-width: 0; }
.episode__title { font-weight: 800; font-size: 1.1rem; line-height: 1.3; }
.episode__note { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.95rem; }
.episode__note svg { width: 15px; height: 15px; }
.episode__watch { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 600; font-size: 0.92rem; color: var(--primary); text-decoration: none; }
.episode__watch svg { width: 18px; height: 18px; }
a.episode__watch:hover { text-decoration: underline; text-underline-offset: 3px; }
.episode__watch[aria-disabled='true'] { color: var(--faint); cursor: not-allowed; }
.episode--locked .episode__title { color: var(--muted); }
.episode--locked .episode__n { color: var(--faint); }
@media (max-width: 479px) { .episode__watch .w-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
@media (min-width: 640px) { .episode { padding: 14px 18px; gap: 14px; } }

/* FAQ + closing band ---------------------------------------------------------- */
.hp-faq .accordion summary { font-weight: 700; }
.hp-band { padding-block: clamp(56px, 8vw, 96px); background: radial-gradient(80% 120% at 50% 100%, var(--plum), transparent 75%); border-top: 1px solid var(--line); }
.hp-band__inner { display: grid; gap: 22px; justify-items: start; }
.hp-band__line { font-family: var(--serif); font-style: italic; font-weight: 900; color: var(--primary); font-size: clamp(2rem, 4vw + 1rem, 3.6rem); line-height: 1.05; text-wrap: balance; }
@media (min-width: 900px) { .hp-band__inner { grid-template-columns: 1fr auto; align-items: center; } }

.hp-sticky .sticky-bar__inner { grid-template-columns: 1fr; }
