/* ==========================================================================
   Seasonal theme · Halloween
   Every rule is scoped to html[data-seasonal="halloween"], so removing or
   disabling the season restores the normal site exactly. Add Christmas as a
   sibling file (assets/seasonal/christmas.css) later — do not edit this file.
   ========================================================================== */

/* Palette --------------------------------------------------------------- */
html[data-seasonal="halloween"] {
  --accent: #a94308;
  --accent-2: #7b2d8e;
  --accent-soft: rgba(169, 67, 8, 0.12);
  --highlight: #d98a1f;
  --on-accent: #fff8ee;
  --bg: #fdf6e9;
  --bg-alt: #f5e9d5;
  --surface: #fffaf1;
  --surface-2: #f8eedc;
  --text: #2a1a11;
  --muted: #6b5341;
  --border: rgba(42, 26, 17, 0.12);
  --border-strong: rgba(42, 26, 17, 0.24);
  --shadow: 0 20px 50px -24px rgba(74, 36, 12, 0.42);
  --shadow-soft: 0 10px 30px -18px rgba(74, 36, 12, 0.34);
}

html[data-seasonal="halloween"][data-theme="dark"] {
  --accent: #ff9a4d;
  --accent-2: #c084fc;
  --accent-soft: rgba(255, 154, 77, 0.16);
  --highlight: #ffd36e;
  --on-accent: #1c0e05;
  --bg: #0d0906;
  --bg-alt: #120c08;
  --surface: #1a120c;
  --surface-2: #231710;
  --text: #f8ecdd;
  --muted: #b9a58f;
  --border: rgba(248, 236, 221, 0.12);
  --border-strong: rgba(248, 236, 221, 0.24);
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.95);
  --shadow-soft: 0 12px 34px -20px rgba(0, 0, 0, 0.9);
}

/* Atmosphere ------------------------------------------------------------ */
/* One continuous night sky behind every section: the html layer is fixed so
   scrolling does not jump between flat section bands. Body and the alternate
   sections stay translucent so it shows through. */
html[data-seasonal="halloween"] {
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 720px at 8% 8%, rgba(255, 154, 77, 0.1), transparent 70%),
    radial-gradient(950px 700px at 95% 34%, rgba(192, 132, 252, 0.08), transparent 70%),
    radial-gradient(1050px 820px at 5% 70%, rgba(255, 154, 77, 0.07), transparent 70%),
    radial-gradient(950px 720px at 92% 95%, rgba(123, 45, 142, 0.08), transparent 70%);
  background-attachment: fixed;
}

html[data-seasonal="halloween"][data-theme="light"] {
  background-image:
    radial-gradient(1100px 720px at 8% 8%, rgba(169, 67, 8, 0.07), transparent 70%),
    radial-gradient(950px 700px at 95% 34%, rgba(123, 45, 142, 0.055), transparent 70%),
    radial-gradient(1050px 820px at 5% 70%, rgba(169, 67, 8, 0.05), transparent 70%),
    radial-gradient(950px 720px at 92% 95%, rgba(123, 45, 142, 0.045), transparent 70%);
}

html[data-seasonal="halloween"] body {
  isolation: isolate;
  background-color: transparent;
  background-image:
    radial-gradient(1000px 520px at 12% -10%, var(--accent-soft), transparent 70%),
    radial-gradient(900px 500px at 92% 2%, rgba(123, 45, 142, 0.1), transparent 74%);
}

html[data-seasonal="halloween"][data-theme="dark"] body {
  background-image:
    radial-gradient(1000px 560px at 14% -8%, rgba(255, 154, 77, 0.13), transparent 70%),
    radial-gradient(900px 520px at 92% 0%, rgba(192, 132, 252, 0.11), transparent 72%);
}

/* Alternate sections stay transparent so the fixed night sky runs through
   the whole page instead of restarting at flat section bands. */
html[data-seasonal="halloween"] .section-alt {
  background: transparent;
  border-block-color: transparent;
}

/* A faint gradient hairline separates sections without reading as a band. */
html[data-seasonal="halloween"] .section,
html[data-seasonal="halloween"] .legal {
  position: relative;
}

html[data-seasonal="halloween"] .section::before,
html[data-seasonal="halloween"] .legal::before,
html[data-seasonal="halloween"] .site-footer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(100% - 2.5rem, var(--maxw));
  height: 1px;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0.75;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--accent) 22%, var(--border-strong)) 18%,
    color-mix(in srgb, var(--accent) 22%, var(--border-strong)) 82%,
    transparent
  );
}

/* The scene has its own moon/fog glow; the base hero blobs would otherwise
   leave a visible warm band at the hero's clipped bottom edge. */
html[data-seasonal="halloween"] .hero::before,
html[data-seasonal="halloween"] .hero::after {
  display: none;
}

/* Cobwebs in the top corners, behind all content. */
html[data-seasonal="halloween"] body::before,
html[data-seasonal="halloween"] body::after {
  content: "";
  position: fixed;
  top: 0;
  z-index: -1;
  width: 230px;
  height: 230px;
  background: var(--accent);
  opacity: 0.16;
  pointer-events: none;
  -webkit-mask: url("web.svg") top left / 230px 230px no-repeat;
  mask: url("web.svg") top left / 230px 230px no-repeat;
}

html[data-seasonal="halloween"] body::before {
  left: 0;
}

html[data-seasonal="halloween"] body::after {
  right: 0;
  transform: scaleX(-1);
}

html[data-seasonal="halloween"][data-theme="dark"] body::before,
html[data-seasonal="halloween"][data-theme="dark"] body::after {
  opacity: 0.24;
}

html[data-seasonal="halloween"] ::selection {
  background: var(--accent);
  color: var(--on-accent);
}

html[data-seasonal="halloween"] .site-header.scrolled {
  border-bottom-color: color-mix(in srgb, var(--accent) 28%, var(--border));
  box-shadow: 0 16px 36px -26px color-mix(in srgb, var(--accent) 55%, transparent);
}

/* Pumpkin toggle -------------------------------------------------------- */
.seasonal-toggle {
  color: var(--muted);
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    transform 0.15s ease;
}

html:not([data-seasonal="halloween"]) .seasonal-toggle:hover {
  color: var(--text);
}

html[data-seasonal="halloween"] .seasonal-toggle {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--accent) 16%, transparent),
      color-mix(in srgb, var(--accent-2) 14%, transparent)
    ),
    var(--surface);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent),
    0 8px 22px -14px color-mix(in srgb, var(--accent) 80%, transparent);
}

.seasonal-icon {
  transition: transform 0.2s ease;
}

html[data-seasonal="halloween"] .seasonal-toggle .seasonal-icon {
  width: 21px;
  height: 21px;
  filter: drop-shadow(
    0 0 4px color-mix(in srgb, var(--accent) 55%, transparent)
  );
}

html[data-seasonal="halloween"] .seasonal-toggle:hover .seasonal-icon {
  transform: rotate(-7deg) scale(1.08);
}

/* Warm the few components that use fixed cool tones in the base sheet. */
html[data-seasonal="halloween"] .btn-primary {
  box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--accent) 72%, transparent);
}

html[data-seasonal="halloween"] .phone-shot {
  background: #1a100a;
  border-color: color-mix(in srgb, var(--accent) 22%, var(--border-strong));
}

html[data-seasonal="halloween"] .phone-shot figcaption {
  color: #dcc7b2;
}

html[data-seasonal="halloween"][data-theme="dark"] .shot {
  background: #150e09;
}

html[data-seasonal="halloween"][data-theme="dark"] .shot figcaption {
  color: #cbb49e;
}

html[data-seasonal="halloween"][data-theme="dark"] .chips .chip.active {
  color: var(--on-accent);
}

/* Keep the corner decorations subtle on small screens. */
@media (max-width: 760px) {
  html[data-seasonal="halloween"] body::before,
  html[data-seasonal="halloween"] body::after {
    width: 150px;
    height: 150px;
    -webkit-mask-size: 150px 150px;
    mask-size: 150px 150px;
    opacity: 0.11;
  }

  html[data-seasonal="halloween"][data-theme="dark"] body::before,
  html[data-seasonal="halloween"][data-theme="dark"] body::after {
    opacity: 0.16;
  }
}

/* Hero scene ------------------------------------------------------------ */
.halloween-scene {
  --ember: #e8812c;
  --jack-body: #d96a13;
  --jack-lobe: #be570c;
  --jack-center: #e8781f;
  --jack-face: #ffd36e;
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  overflow: hidden;
  pointer-events: none;
}

html[data-seasonal="halloween"] .halloween-scene {
  display: block;
}

/* The sky fades to transparent before the hero ends; the jack-o'-lanterns
   live outside this layer so they stay crisp instead of being clipped. */
.halloween-sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 82%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 82%,
    rgba(0, 0, 0, 0) 100%
  );
}

html[data-seasonal="halloween"] .page-hero {
  position: relative;
  overflow: hidden;
}

html[data-seasonal="halloween"] .hero-inner,
html[data-seasonal="halloween"] .page-hero .wrap {
  position: relative;
  z-index: 2;
}

.halloween-stars,
.halloween-moon,
.halloween-bats,
.halloween-spider,
.halloween-embers,
.halloween-jacks,
.halloween-fog {
  position: absolute;
}

/* Night sky ------------------------------------------------------------- */
.halloween-stars {
  inset: 0;
  z-index: 0;
  opacity: 0.7;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 242, 214, 0.85) 0 1.2px, transparent 1.7px),
    radial-gradient(circle at 28% 32%, rgba(255, 242, 214, 0.65) 0 1px, transparent 1.5px),
    radial-gradient(circle at 44% 12%, rgba(255, 242, 214, 0.8) 0 1.4px, transparent 1.9px),
    radial-gradient(circle at 61% 25%, rgba(255, 242, 214, 0.55) 0 1px, transparent 1.5px),
    radial-gradient(circle at 78% 16%, rgba(255, 242, 214, 0.8) 0 1.2px, transparent 1.7px),
    radial-gradient(circle at 88% 38%, rgba(255, 242, 214, 0.5) 0 1px, transparent 1.5px),
    radial-gradient(circle at 18% 47%, rgba(255, 242, 214, 0.7) 0 1.1px, transparent 1.6px),
    radial-gradient(circle at 36% 60%, rgba(255, 242, 214, 0.45) 0 1px, transparent 1.5px),
    radial-gradient(circle at 54% 44%, rgba(255, 242, 214, 0.6) 0 1px, transparent 1.5px),
    radial-gradient(circle at 70% 58%, rgba(255, 242, 214, 0.55) 0 1.2px, transparent 1.7px),
    radial-gradient(circle at 84% 68%, rgba(255, 242, 214, 0.7) 0 1px, transparent 1.5px),
    radial-gradient(circle at 24% 76%, rgba(255, 242, 214, 0.5) 0 1.1px, transparent 1.6px),
    radial-gradient(circle at 48% 84%, rgba(255, 242, 214, 0.65) 0 1px, transparent 1.5px),
    radial-gradient(circle at 66% 78%, rgba(255, 242, 214, 0.45) 0 1.2px, transparent 1.7px);
  background-repeat: no-repeat;
}

html[data-seasonal="halloween"][data-theme="light"] .halloween-stars {
  display: none;
}

.halloween-moon {
  z-index: 1;
  top: -14%;
  right: 0;
  width: min(44vw, 500px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0.9;
  background:
    radial-gradient(circle at 34% 30%, rgba(93, 48, 20, 0.13) 0 3.5%, transparent 4.1%),
    radial-gradient(circle at 63% 52%, rgba(93, 48, 20, 0.11) 0 5.5%, transparent 6.1%),
    radial-gradient(circle at 43% 70%, rgba(93, 48, 20, 0.09) 0 3%, transparent 3.6%),
    radial-gradient(circle at 73% 26%, rgba(93, 48, 20, 0.07) 0 2.2%, transparent 2.8%),
    radial-gradient(circle at 50% 50%, #fff3d6 0 48%, #ffdca4 68%, #f2a656 100%);
  box-shadow:
    0 0 60px 18px rgba(255, 154, 77, 0.18),
    0 0 170px 72px rgba(255, 154, 77, 0.1);
}

html[data-seasonal="halloween"][data-theme="light"] .halloween-moon {
  opacity: 0.38;
  box-shadow:
    0 0 46px 12px rgba(169, 67, 8, 0.12),
    0 0 130px 52px rgba(169, 67, 8, 0.07);
}

.halloween-scene--page .halloween-moon {
  top: -26%;
  right: -2%;
  width: min(34vw, 330px);
}

html[data-seasonal="halloween"][data-theme="light"]
  .halloween-scene--page
  .halloween-moon {
  opacity: 0.28;
}

/* Bats ------------------------------------------------------------------ */
.halloween-bats {
  inset: 0;
  z-index: 3;
}

.halloween-bat-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.halloween-bat {
  position: absolute;
  left: -14vw;
  top: var(--top, 30%);
  width: var(--size, 26px);
  color: #2b1409;
  opacity: var(--opacity, 0.55);
  animation: halloween-bat-cross var(--dur, 28s) linear infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform;
}

.halloween-bat svg {
  display: block;
  width: 100%;
  height: auto;
  fill: currentColor;
  animation: halloween-bat-flap 0.5s ease-in-out infinite alternate;
  transform-origin: 50% 50%;
}

html[data-seasonal="halloween"][data-theme="dark"] .halloween-bat {
  color: #7d3f1a;
  filter: drop-shadow(0 0 9px rgba(255, 154, 77, 0.62));
}

.bat-1 {
  --top: 17%;
  --size: 52px;
  --dur: 31s;
  --delay: -7s;
  --opacity: 0.55;
}

.bat-2 {
  --top: 31%;
  --size: 26px;
  --dur: 24s;
  --delay: -18s;
  --opacity: 0.45;
}

.bat-3 {
  --top: 46%;
  --size: 34px;
  --dur: 35s;
  --delay: -12s;
  --opacity: 0.5;
}

.bat-4 {
  --top: 12%;
  --size: 22px;
  --dur: 22s;
  --delay: -3s;
  --opacity: 0.45;
}

.bat-5 {
  --top: 58%;
  --size: 40px;
  --dur: 39s;
  --delay: -25s;
  --opacity: 0.4;
}

.bat-6 {
  --top: 25%;
  --size: 30px;
  --dur: 27s;
  --delay: -15s;
  --opacity: 0.45;
}

.halloween-scene--page .halloween-bat {
  opacity: calc(var(--opacity, 0.55) * 0.5);
}

/* Hanging spider -------------------------------------------------------- */
.halloween-spider {
  top: 0;
  right: 6%;
  z-index: 4;
  width: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #241006;
  transform-origin: top center;
  animation: halloween-spider-sway 9s ease-in-out infinite;
}

.halloween-spider-thread {
  width: 1px;
  height: 90px;
  background: linear-gradient(
    to bottom,
    transparent,
    color-mix(in srgb, var(--accent) 55%, transparent)
  );
}

.halloween-spider-svg {
  width: 38px;
  height: 38px;
  margin-top: -2px;
  filter: drop-shadow(0 0 6px rgba(255, 154, 77, 0.35));
}

.spider-legs {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.spider-body,
.spider-head {
  fill: currentColor;
}

.spider-eye {
  fill: #ffb347;
}

html[data-seasonal="halloween"][data-theme="dark"] .halloween-spider {
  color: #0b0603;
}

.halloween-scene--page .halloween-spider {
  right: 4%;
  width: 36px;
}

.halloween-scene--page .halloween-spider-thread {
  height: 58px;
}

.halloween-scene--page .halloween-spider-svg {
  width: 30px;
  height: 30px;
}

/* Embers ---------------------------------------------------------------- */
.halloween-embers {
  inset: 0;
  z-index: 2;
}

.halloween-embers span {
  position: absolute;
  bottom: -10px;
  left: var(--x, 50%);
  width: var(--size, 4px);
  height: var(--size, 4px);
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 10px 2px color-mix(in srgb, var(--ember) 60%, transparent);
  opacity: 0;
  animation: halloween-ember-rise var(--dur, 11s) linear infinite;
  animation-delay: var(--delay, 0s);
}

.halloween-embers span:nth-child(1) {
  --x: 5%;
  --size: 3px;
  --dur: 9s;
  --delay: -2s;
  --drift: 22px;
}

.halloween-embers span:nth-child(2) {
  --x: 13%;
  --size: 4px;
  --dur: 13s;
  --delay: -7s;
  --drift: -18px;
}

.halloween-embers span:nth-child(3) {
  --x: 21%;
  --size: 2px;
  --dur: 10s;
  --delay: -4s;
  --drift: 28px;
}

.halloween-embers span:nth-child(4) {
  --x: 30%;
  --size: 5px;
  --dur: 15s;
  --delay: -11s;
  --drift: -24px;
}

.halloween-embers span:nth-child(5) {
  --x: 38%;
  --size: 3px;
  --dur: 12s;
  --delay: -6s;
  --drift: 16px;
}

.halloween-embers span:nth-child(6) {
  --x: 46%;
  --size: 2px;
  --dur: 9.5s;
  --delay: -1s;
  --drift: -30px;
}

.halloween-embers span:nth-child(7) {
  --x: 55%;
  --size: 4px;
  --dur: 14s;
  --delay: -9s;
  --drift: 20px;
}

.halloween-embers span:nth-child(8) {
  --x: 63%;
  --size: 3px;
  --dur: 11s;
  --delay: -3s;
  --drift: -16px;
}

.halloween-embers span:nth-child(9) {
  --x: 71%;
  --size: 5px;
  --dur: 16s;
  --delay: -13s;
  --drift: 26px;
}

.halloween-embers span:nth-child(10) {
  --x: 79%;
  --size: 2px;
  --dur: 10.5s;
  --delay: -5s;
  --drift: -22px;
}

.halloween-embers span:nth-child(11) {
  --x: 87%;
  --size: 3px;
  --dur: 12.5s;
  --delay: -8s;
  --drift: 18px;
}

.halloween-embers span:nth-child(12) {
  --x: 95%;
  --size: 4px;
  --dur: 14.5s;
  --delay: -12s;
  --drift: -20px;
}

html[data-seasonal="halloween"][data-theme="dark"] .halloween-scene {
  --ember: #ffb35c;
  --jack-body: #e8781f;
  --jack-lobe: #c76110;
  --jack-center: #f28a27;
  --jack-face: #ffdc82;
}

/* Jack-o'-lanterns ------------------------------------------------------ */
.halloween-jacks {
  inset: 0;
  z-index: 3;
}

.halloween-jack {
  position: absolute;
  bottom: 0;
  width: 122px;
  opacity: 0.95;
  filter: drop-shadow(0 0 26px rgba(255, 154, 77, 0.3));
  animation: halloween-jack-bob 7s ease-in-out infinite;
}

.jack-left {
  left: 1.5%;
}

.jack-right {
  right: 1.5%;
  width: 94px;
  animation-delay: -3.5s;
}

.halloween-jack-svg {
  display: block;
  width: 100%;
  height: auto;
}

.jack-shadow {
  fill: rgba(0, 0, 0, 0.18);
}

.jack-stem {
  fill: #5a3316;
}

.jack-body {
  fill: var(--jack-body);
}

.jack-lobe {
  fill: var(--jack-lobe);
}

.jack-lobe-center {
  fill: var(--jack-center);
}

.jack-face {
  fill: var(--jack-face);
  filter: drop-shadow(0 0 5px rgba(255, 211, 110, 0.8));
}

.halloween-scene--page .halloween-jack {
  width: 76px;
  bottom: 0;
  opacity: 0.72;
}

.halloween-scene--page .jack-right {
  width: 62px;
}

/* Fog ------------------------------------------------------------------- */
.halloween-fog {
  z-index: 1;
  left: -25%;
  right: -25%;
  bottom: -30%;
  height: 62%;
  opacity: 0.68;
  filter: blur(30px);
  background:
    radial-gradient(ellipse at 30% 60%, rgba(255, 154, 77, 0.18), transparent 62%),
    radial-gradient(ellipse at 70% 40%, rgba(192, 132, 252, 0.15), transparent 60%);
  animation: halloween-fog-drift 27s ease-in-out infinite alternate;
}

.halloween-fog.fog-two {
  height: 50%;
  opacity: 0.48;
  animation-duration: 36s;
  animation-delay: -9s;
}

html[data-seasonal="halloween"][data-theme="light"] .halloween-fog {
  background:
    radial-gradient(ellipse at 30% 60%, rgba(169, 67, 8, 0.1), transparent 62%),
    radial-gradient(ellipse at 70% 40%, rgba(123, 45, 142, 0.08), transparent 60%);
}

/* Component polish ------------------------------------------------------ */
html[data-seasonal="halloween"] .grad {
  background-image: linear-gradient(
    100deg,
    var(--accent) 0%,
    var(--highlight) 28%,
    var(--accent-2) 55%,
    var(--accent) 82%,
    var(--highlight) 100%
  );
  background-size: 240% 100%;
  animation: halloween-text-shimmer 10s ease-in-out infinite;
  filter: drop-shadow(
    0 0 20px color-mix(in srgb, var(--accent) 22%, transparent)
  );
}

html[data-seasonal="halloween"] .logo img {
  filter: drop-shadow(
    0 0 8px color-mix(in srgb, var(--accent) 45%, transparent)
  );
}

html[data-seasonal="halloween"] .eyebrow::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 12px;
  margin-right: 0.45rem;
  vertical-align: -2px;
  background: currentColor;
  -webkit-mask: url("bat.svg") center / contain no-repeat;
  mask: url("bat.svg") center / contain no-repeat;
}

html[data-seasonal="halloween"] .btn-primary {
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--accent) 72%, transparent);
}

html[data-seasonal="halloween"] .btn-primary::after {
  content: "";
  position: absolute;
  top: -60%;
  bottom: -60%;
  left: -70%;
  width: 42%;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: skewX(-20deg);
  animation: halloween-btn-sheen 7s ease-in-out infinite;
}

html[data-seasonal="halloween"] .card:hover,
html[data-seasonal="halloween"] .tool-card:hover,
html[data-seasonal="halloween"] .term-card:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  box-shadow: 0 18px 46px -24px
    color-mix(in srgb, var(--accent) 58%, transparent);
}

html[data-seasonal="halloween"] .card-icon,
html[data-seasonal="halloween"] .tool-icon {
  box-shadow: 0 10px 24px -12px
    color-mix(in srgb, var(--accent) 70%, transparent);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

html[data-seasonal="halloween"] .card:hover .card-icon,
html[data-seasonal="halloween"] .tool-card:hover .tool-icon {
  transform: rotate(-4deg) scale(1.07);
}

html[data-seasonal="halloween"] .site-footer {
  position: relative;
  overflow: hidden;
  border-top-color: transparent;
  background: linear-gradient(
    180deg,
    transparent,
    color-mix(in srgb, var(--bg-alt) 72%, transparent)
  );
}

html[data-seasonal="halloween"] .site-footer::before {
  content: "";
  position: absolute;
  top: -90px;
  left: -10%;
  right: -10%;
  height: 180px;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 100%,
    color-mix(in srgb, var(--accent) 14%, transparent),
    transparent 70%
  );
}

html[data-seasonal="halloween"] {
  scrollbar-color: var(--accent) var(--bg);
}

html[data-seasonal="halloween"]::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

html[data-seasonal="halloween"]::-webkit-scrollbar-track {
  background: var(--bg);
}

html[data-seasonal="halloween"]::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 70%, var(--border));
  border: 3px solid var(--bg);
  border-radius: 999px;
}

/* Animations ------------------------------------------------------------ */
@keyframes halloween-bat-cross {
  0% {
    transform: translate3d(0, 0, 0) rotate(4deg) scale(0.9);
  }
  50% {
    transform: translate3d(55vw, -18px, 0) rotate(-4deg) scale(1);
  }
  100% {
    transform: translate3d(118vw, 10px, 0) rotate(3deg) scale(0.95);
  }
}

@keyframes halloween-bat-flap {
  from {
    transform: scaleY(1) translateY(0);
  }
  to {
    transform: scaleY(0.72) translateY(1px);
  }
}

@keyframes halloween-spider-sway {
  0%,
  100% {
    transform: rotate(-2.4deg);
  }
  50% {
    transform: rotate(2.4deg);
  }
}

@keyframes halloween-ember-rise {
  0% {
    transform: translate3d(0, 0, 0) scale(0.6);
    opacity: 0;
  }
  12% {
    opacity: 0.85;
  }
  70% {
    opacity: 0.45;
  }
  100% {
    transform: translate3d(var(--drift, 20px), -440px, 0) scale(1.15);
    opacity: 0;
  }
}

@keyframes halloween-jack-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-7px) rotate(1deg);
  }
}

@keyframes halloween-fog-drift {
  0% {
    transform: translate3d(-3%, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(3%, -2%, 0) scale(1.06);
  }
}

@keyframes halloween-text-shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes halloween-btn-sheen {
  0%,
  58% {
    transform: translateX(0) skewX(-20deg);
    opacity: 0;
  }
  64% {
    opacity: 0.9;
  }
  100% {
    transform: translateX(360%) skewX(-20deg);
    opacity: 0;
  }
}

/* Responsive scene ------------------------------------------------------ */
@media (max-width: 900px) {
  .halloween-jack {
    width: 96px;
  }

  .jack-right {
    width: 76px;
  }

  .halloween-scene--page .halloween-jack {
    width: 62px;
  }
}

@media (max-width: 760px) {
  .halloween-jack,
  .halloween-spider {
    display: none;
  }

  .halloween-moon {
    top: -8%;
    right: -22%;
    width: 82vw;
    opacity: 0.4;
  }

  html[data-seasonal="halloween"][data-theme="dark"] .halloween-moon {
    opacity: 0.55;
  }

  .halloween-scene--page .halloween-moon {
    top: -20%;
    right: -26%;
    width: 70vw;
  }

  .halloween-bat:nth-child(n + 4) {
    display: none;
  }

  .halloween-bat {
    --size: 24px;
    opacity: calc(var(--opacity, 0.55) * 0.7);
  }

  .bat-1 {
    --size: 38px;
  }

  .halloween-embers span:nth-child(n + 7) {
    display: none;
  }

  .halloween-fog {
    height: 55%;
    opacity: 0.5;
    filter: blur(18px);
  }

  .halloween-fog.fog-two {
    display: none;
  }

  html[data-seasonal="halloween"] .eyebrow::before {
    width: 14px;
    height: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .seasonal-toggle,
  .seasonal-icon {
    transition: none;
  }

  html[data-seasonal="halloween"] .seasonal-toggle:hover .seasonal-icon {
    transform: none;
  }

  .halloween-bat,
  .halloween-embers {
    display: none;
  }

  .halloween-fog,
  .halloween-spider,
  .halloween-jack {
    animation: none;
  }

  html[data-seasonal="halloween"] .grad {
    animation: none;
  }

  html[data-seasonal="halloween"] .btn-primary::after {
    display: none;
  }
}
