/* ---------------- Seasonal: Halloween ----------------
   Loaded after styles.css. Replaces the dark palette with a Halloween one,
   and styles the decorations that halloween.js scatters over the page.
   To turn the season off, remove the halloween.css / halloween.js tags and
   the .seasonal-* markup in index.html (or just restore main). */

[data-theme="dark"] {
  --bg: #150e22;
  --bg-alt: #100a1a;
  --surface: rgba(255, 240, 225, 0.05);
  --surface-hover: rgba(255, 240, 225, 0.09);
  --border: rgba(255, 220, 190, 0.12);
  --border-strong: rgba(255, 220, 190, 0.22);
  --text: #fbf3ea;
  --text-muted: #cdbfd8;
  --text-faint: #8f80a6;
  --nav-bg: rgba(21, 14, 34, 0.8);

  --accent: #ff8a24;         /* pumpkin orange */
  --accent-2: #a874ff;       /* witchy purple */
  --accent-strong: color-mix(in srgb, var(--accent) 84%, white);
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-text: #1a0d03;

  --hw-ink: #d9cdf2;         /* webs, threads, spiders, bats */
  --hw-opacity: 0.55;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #150e22;
    --bg-alt: #100a1a;
    --surface: rgba(255, 240, 225, 0.05);
    --surface-hover: rgba(255, 240, 225, 0.09);
    --border: rgba(255, 220, 190, 0.12);
    --border-strong: rgba(255, 220, 190, 0.22);
    --text: #fbf3ea;
    --text-muted: #cdbfd8;
    --text-faint: #8f80a6;
    --nav-bg: rgba(21, 14, 34, 0.8);

    --accent: #ff8a24;
    --accent-2: #a874ff;
    --accent-strong: color-mix(in srgb, var(--accent) 84%, white);
    --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
    --accent-text: #1a0d03;

    --hw-ink: #d9cdf2;
    --hw-opacity: 0.55;
  }
}

/* Light mode keeps its look, with seasonal accents */
:root[data-theme="light"] {
  --accent: #d9620a;
  --accent-2: #7b3fd6;
  --hw-ink: #3b2a55;
  --hw-opacity: 0.4;
}

/* ---------- Scattered decorations ---------- */

/* Content sits above the decoration layer; section backgrounds sit below it */
.wrap { position: relative; z-index: 2; }

.hw-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hw-item {
  position: absolute;
  color: var(--hw-ink);
}

.hw-item svg { display: block; width: 100%; height: 100%; overflow: visible; }

.hw-spider {
  animation: hw-dangle 5s ease-in-out infinite alternate;
  transform-origin: top center;
}

.hw-float {
  animation: hw-float 10s ease-in-out infinite;
}

@keyframes hw-float {
  0%   { transform: translate(0, 0) rotate(0deg); }
  25%  { transform: translate(4px, -9px) rotate(4deg); }
  50%  { transform: translate(0, -14px) rotate(0deg); }
  75%  { transform: translate(-4px, -7px) rotate(-4deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes hw-dangle {
  from { transform: translateY(0); }
  to   { transform: translateY(14px); }
}

@media (prefers-reduced-motion: reduce) {
  .hw-spider, .hw-float { animation: none; }
}

/* ---------- Pumpkins in the logo and on the signature ---------- */

.seasonal-pumpkin {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  margin-left: 0.4em;
  vertical-align: -0.2em;
}

.studio-note-sig .name { position: relative; display: inline-block; }

.name-pumpkin {
  position: absolute;
  left: 50%;
  bottom: 88%;
  width: 1.5rem;
  height: 1.3rem;
  transform: translateX(-50%) rotate(-8deg);
}
