
/* FLARE HALLOWEEN — temporary cinematic intro */

body.halloween-active .hero {
  background: #080402;
}

body.halloween-active .hero-media img {
  filter: brightness(.55) contrast(1.15) saturate(.82);
}

body.halloween-active .hero-vignette {
  background:
    linear-gradient(90deg, rgba(8,3,1,.62), transparent 90%),
    linear-gradient(180deg, rgba(0,0,0,.45), transparent 32%, #080402 100%);
}

body.halloween-active .hero-flare {
  background: radial-gradient(circle, rgba(255,75,0,.35), transparent 68%);
}

/* Opening overlay */
.halloween-intro {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #050302;
  color: #fff;
  isolation: isolate;
}

body.halloween-active .halloween-intro.is-playing {
  display: flex;
}

.halloween-intro.is-finished {
  display: none !important;
  pointer-events: none;
}

.halloween-intro__backdrop {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse at 50% 68%, rgba(176,53,0,.34), transparent 45%),
    radial-gradient(ellipse at 20% 50%, rgba(255,90,0,.12), transparent 38%),
    linear-gradient(180deg, #030303 0%, #100703 60%, #030303 100%);
  animation: halloween-atmosphere 7s ease-in-out infinite alternate;
}

.halloween-intro__glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(ellipse at 50% 65%, rgba(255,83,0,.4), transparent 60%);
  animation: halloween-glow 5s 1.2s ease-in-out infinite;
  pointer-events: none;
}

.halloween-intro__logo {
  position: relative;
  z-index: 4;
  width: min(58vw, 340px);
  opacity: 0;
  transform: scale(.88);
  filter: drop-shadow(0 0 28px rgba(255,105,35,.2));
  animation: halloween-logo-in 1.1s .2s cubic-bezier(.16,1,.3,1) forwards;
}

.halloween-intro__logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.halloween-intro__tagline {
  position: absolute;
  z-index: 4;
  bottom: 15%;
  left: 16px;
  right: 16px;
  text-align: center;
  font: 10px/1.6 'DM Mono', monospace;
  letter-spacing: .24em;
  color: #c8bdb3;
  opacity: 0;
  animation: halloween-tagline-in .8s 1.3s ease forwards;
}

.halloween-intro__tagline strong {
  display: block;
  margin-top: 12px;
  color: #ff8a3d;
  font-weight: 400;
  letter-spacing: .2em;
}

/* Web in the upper corners */
.halloween-web {
  position: absolute;
  z-index: 3;
  top: -4%;
  width: min(48vw, 460px);
  height: auto;
  opacity: 0;
  fill: none;
  stroke: rgba(201,161,145,.55);
  stroke-width: 1.2;
  animation: halloween-web-in 1.8s .9s ease forwards;
  pointer-events: none;
}

.halloween-web--left {
  left: -4%;
}

.halloween-web--right {
  right: -4%;
  transform: scaleX(-1);
}

/* Hanging spider */
.halloween-spider {
  position: absolute;
  z-index: 5;
  top: -110px;
  left: 50%;
  width: 2px;
  height: 150px;
  background: linear-gradient(#9b8372, #5a4539);
  transform-origin: top center;
  animation: halloween-spider-drop 2.4s .7s cubic-bezier(.22,.8,.3,1) forwards,
             halloween-spider-sway 3s 3.1s ease-in-out infinite;
}

.halloween-spider::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: -10px;
  width: 22px;
  height: 22px;
  border-radius: 48% 52% 45% 55%;
  background: radial-gradient(circle at 35% 30%, #5a4a40, #090807 65%);
  box-shadow: 0 0 14px rgba(255,95,25,.18);
}

.halloween-spider::before {
  content: '';
  position: absolute;
  bottom: -13px;
  left: -17px;
  width: 36px;
  height: 26px;
  background:
    linear-gradient(65deg, transparent 42%, #17110e 44%, #17110e 49%, transparent 51%),
    linear-gradient(115deg, transparent 42%, #17110e 44%, #17110e 49%, transparent 51%),
    linear-gradient(25deg, transparent 42%, #17110e 44%, #17110e 49%, transparent 51%),
    linear-gradient(155deg, transparent 42%, #17110e 44%, #17110e 49%, transparent 51%);
}

/* Ghost silhouettes */
.halloween-ghost {
  position: absolute;
  z-index: 2;
  bottom: -35%;
  width: clamp(48px, 9vw, 110px);
  height: clamp(85px, 18vw, 190px);
  border-radius: 48% 48% 12% 12%;
  opacity: 0;
  background: linear-gradient(180deg, rgba(227,215,202,.15), rgba(134,119,109,.035));
  filter: blur(2px);
  animation: halloween-ghost-rise 8s ease-in-out infinite;
  pointer-events: none;
}

.halloween-ghost::before {
  content: '';
  position: absolute;
  top: 24%;
  left: 24%;
  width: 7px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,105,53,.45);
  box-shadow: 20px 0 rgba(255,105,53,.45);
}

.halloween-ghost--left {
  left: 9%;
  animation-delay: 2.4s;
}

.halloween-ghost--right {
  right: 10%;
  transform: scale(.8);
  animation-delay: 4.1s;
}

.halloween-intro__grain {
  position: absolute;
  z-index: 6;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0,
    rgba(255,255,255,.06) 1px,
    transparent 2px,
    transparent 4px
  );
}

.halloween-intro__skip {
  position: absolute;
  z-index: 10;
  right: 22px;
  bottom: 22px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.24);
  color: #e7d8ce;
  background: rgba(0,0,0,.35);
  font: 9px 'DM Mono', monospace;
  letter-spacing: .15em;
  cursor: pointer;
}

.halloween-intro.is-leaving {
  animation: halloween-intro-out .9s ease forwards;
  pointer-events: none;
}

@keyframes halloween-atmosphere {
  from { transform: scale(1); }
  to { transform: scale(1.12) translateY(-2%); }
}

@keyframes halloween-glow {
  0%, 100% { opacity: .08; }
  50% { opacity: .65; }
}

@keyframes halloween-logo-in {
  to { opacity: 1; transform: scale(1); }
}

@keyframes halloween-tagline-in {
  to { opacity: 1; }
}

@keyframes halloween-web-in {
  to { opacity: 1; }
}

@keyframes halloween-spider-drop {
  to { top: 0; }
}

@keyframes halloween-spider-sway {
  0%, 100% { margin-left: 0; }
  50% { margin-left: 8px; }
}

@keyframes halloween-ghost-rise {
  0% { opacity: 0; transform: translateY(0) scale(.8); }
  25% { opacity: .7; }
  75% { opacity: .35; }
  100% { opacity: 0; transform: translateY(-125vh) scale(1.1); }
}

@keyframes halloween-intro-out {
  to { opacity: 0; visibility: hidden; }
}

@media (max-width: 600px) {
  .halloween-intro__logo { width: min(68vw, 290px); }
  .halloween-web { width: 62vw; }
  .halloween-intro__tagline { bottom: 17%; font-size: 8px; letter-spacing: .16em; }
  .halloween-intro__skip { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .halloween-intro *,
  .halloween-intro::before {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ===== HALLOWEEN LAYOUT FIX ===== */

/* Keep the hero image inside its own section */
body.halloween-active .hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

body.halloween-active .hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transform: none !important;
}

body.halloween-active .hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none !important;
}

/* Prevent the next section from covering or clipping content */
body.halloween-active .halloween-banner {
  display: block !important;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  padding: 90px 24px;
  margin: 0;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255,75,0,.2), transparent 55%),
    #080604;
}

body.halloween-active .halloween-banner-inner {
  display: flex;
  position: relative;
  width: 100%;
  max-width: 900px;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
}

body.halloween-active .halloween-banner h2 {
  display: block;
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  font-size: clamp(42px, 8vw, 100px);
  line-height: .95;
  letter-spacing: -.055em;
  text-align: center;
  overflow-wrap: anywhere;
}

body.halloween-active .halloween-banner p {
  max-width: 100%;
  margin: 0;
  text-align: center;
}

body.halloween-active .halloween-decor {
  margin: 18px 0;
}

body.halloween-active .halloween-date,
body.halloween-active .halloween-coming {
  text-align: center;
  width: 100%;
}

/* Don't let the sticky header change its normal layout */
body.halloween-active .nav {
  z-index: 100;
}

/* Mobile */
@media (max-width: 600px) {
  body.halloween-active .halloween-banner {
    padding: 64px 20px;
  }

  body.halloween-active .halloween-banner h2 {
    font-size: clamp(38px, 11vw, 60px);
  }
}
body.halloween-active .hero {
  min-height: 100svh;
  overflow: hidden;
  position: relative;
}

body.halloween-active .hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

body.halloween-active .hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(.72) contrast(1.08) saturate(1.15);
}

body.halloween-active .hero-vignette {
  z-index: 1;
}

body.halloween-active .hero-grid,
body.halloween-active .hero-topline,
body.halloween-active .hero-content,
body.halloween-active .hero-bottom,
body.halloween-active .hero-flare {
  z-index: 2;
}
