

/* === Halloween Core (auto-on through Oct 31) === */
:root {
  --hp-accent: #ff7b00; /* pumpkin orange */
  --hp-accent-2: #a259ff; /* witchy purple */
  --hp-bg-overlay: rgba(0,0,0,0.35);
}

body.halloween {
  box-shadow: inset 0 0 0 9999px var(--hp-bg-overlay);
}

/* Subtle web in the corner */
body.halloween::after {
  content: "";
  position: fixed;
  top: 0; right: 0;
  width: 240px; height: 240px;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,\
  <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'>\
    <defs><linearGradient id='g' x1='0' y1='0' x2='1' y2='1'>\
      <stop offset='0%' stop-color='%23ffffff' stop-opacity='0.35' />\
      <stop offset='100%' stop-color='%23ff7b00' stop-opacity='0.55' />\
    </linearGradient></defs>\
    <g stroke='url(/%23g)' fill='none' stroke-width='1.4'>\
      <path d='M200,0 C130,0 0,130 0,200' />\
      <path d='M200,0 C160,0 0,160 0,200' />\
      <path d='M200,0 C190,0 0,190 0,200' />\
      <path d='M200,20 C110,20 20,110 20,200' />\
      <path d='M180,0 C180,90 90,180 0,180' />\
      <path d='M200,60 C130,60 60,130 60,200' />\
    </g>\
  </svg>");
  background-size: cover;
  opacity: 0.7;
  z-index: 9999;
}

/* Headings/links glow */
body.halloween h1, body.halloween h2, body.halloween h3, body.halloween .heading {
  text-shadow: 0 0 12px rgba(255,123,0,0.18);
}
body.halloween a:hover {
  text-shadow: 0 0 8px rgba(162,89,255,0.25);
}

/* Bats */
.bat {
  position: fixed;
  top: -40px;
  font-size: 22px;
  user-select: none;
  pointer-events: none;
  opacity: 0.9;
  animation: bat-fall 9s linear infinite;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
@keyframes bat-fall {
  0%   { transform: translateY(-40px) translateX(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  50%  { transform: translateY(48vh) translateX(-20px) rotate(-12deg); }
  100% { transform: translateY(100vh) translateX(30px) rotate(12deg); opacity: 0; }
}
.bat.b1 { animation-duration: 8.5s; }
.bat.b2 { animation-duration: 10.2s; }
.bat.b3 { animation-duration: 9.7s; }
.bat.b4 { animation-duration: 11.1s; }
.bat.b5 { animation-duration: 8.9s; }

/* Leaves */
.leaf {
  position: fixed;
  top: -40px;
  font-size: 20px;
  user-select: none;
  pointer-events: none;
  opacity: 0.95;
  animation: leaf-fall 10s linear infinite;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}
@keyframes leaf-fall {
  0%   { transform: translateY(-40px) translateX(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  50%  { transform: translateY(48vh) translateX(30px) rotate(40deg); }
  100% { transform: translateY(100vh) translateX(-40px) rotate(120deg); opacity: 0; }
}
.leaf.l1 { animation-duration: 9.5s; }
.leaf.l2 { animation-duration: 11.2s; }
.leaf.l3 { animation-duration: 12.7s; }
.leaf.l4 { animation-duration: 10.1s; }
.leaf.l5 { animation-duration: 13.6s; }

/* Gentle jumpscare overlay */
.hp-spook {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  animation: spook-fade 140ms ease-out;
}
.hp-spook .inner { text-align: center; transform: scale(0.92); animation: spook-pop 200ms cubic-bezier(.2,1.1,.2,1.0); }
.hp-spook .ghost { font-size: 96px; line-height: 1; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4)); }
.hp-spook .boo { font-size: 42px; margin-top: 12px; letter-spacing: 2px; color: #fff; text-shadow: 0 0 16px rgba(255,123,0,0.35); }
.hp-spook .hint { font-size: 13px; opacity: 0.8; margin-top: 10px; color: #ddd; }

@keyframes spook-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spook-pop  { from { transform: scale(0.88); } to { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .hp-spook { animation: none; }
  .hp-spook .inner { animation: none; }
}



/* === Halloween Button Theme (site-wide while mode is active) === */
:root { --hp-accent: #ff7b00; --hp-accent-2: #a259ff; }

/* Common buttons + CTAs */
body.halloween button,
body.halloween .button,
body.halloween .btn,
body.halloween [role="button"],
body.halloween input[type="button"],
body.halloween input[type="submit"],
body.halloween .cta,
body.halloween .pill,
body.halloween .chip,
body.halloween .tag {
  border-radius: 12px;
  border: 2px solid var(--hp-accent) !important;
  box-shadow: 0 4px 14px rgba(255,123,0,0.12);
}

/* Primary-style buttons */
body.halloween .btn-primary,
body.halloween .button.primary,
body.halloween .button-primary,
body.halloween button.primary,
body.halloween input[type="submit"].primary,
body.halloween .cta.primary,
body.halloween .action-primary {
  background: var(--hp-accent) !important;
  color: #111 !important;
  border-color: var(--hp-accent) !important;
}

/* Hover/focus states */
body.halloween button:hover,
body.halloween .button:hover,
body.halloween .btn:hover,
body.halloween [role="button"]:hover,
body.halloween input[type="button"]:hover,
body.halloween input[type="submit"]:hover,
body.halloween .cta:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 18px rgba(255,123,0,0.18);
}

body.halloween button:focus-visible,
body.halloween .button:focus-visible,
body.halloween .btn:focus-visible,
body.halloween [role="button"]:focus-visible,
body.halloween input[type="button"]:focus-visible,
body.halloween input[type="submit"]:focus-visible {
  outline: 2px solid var(--hp-accent-2);
  outline-offset: 2px;
}

/* Links that look like buttons */
body.halloween a.button, body.halloween a.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

