/* Seasonal look: Halloween. Only applies when js/season.js adds html.season-halloween. */
html.season-halloween, html.season-halloween[data-theme] {
  --bg: #120B1C; --card: #1E1430; --ink: #F6EEE4; --muted: #CBBBD9; --line: #3B2A52;
  --sea: #FF8A1E; --sea-ink: #1A0E04; --sea-soft: #2C1B40; --sea-txt: #FFB062; --sea-sub: #FFD9B0;
  --sun: #FFB347; --sun-soft: #3A2412;
  --bar: #24163A; --bar-ink: #F6EEE4; --bar-btn: #FFB062;
  color-scheme: dark;
}
html.season-halloween body { background: radial-gradient(ellipse at 50% -10%, #2B1846 0%, #120B1C 60%) fixed, #120B1C; }
html.season-halloween #app { position: relative; z-index: 1; }
html.season-halloween .tile-ic, html.season-halloween .cat-ic { color: #FFB062; }
html.season-halloween .brand-mark.only-light { display: none; }
html.season-halloween .brand-mark.only-dark { display: inline-block; }

/* The search button becomes a pumpkin (the button and its label stay the same for screen readers) */
html.season-halloween .ask-go {
  width: 52px; height: 52px; border-radius: 50%; border: 0; color: transparent;
  background: center / 46px 46px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M30 14c0-5 3-9 8-10l2 3c-4 1-6 4-6 8z' fill='%234C7A2B'/%3E%3Cellipse cx='19' cy='38' rx='14' ry='19' fill='%23E8661A'/%3E%3Cellipse cx='45' cy='38' rx='14' ry='19' fill='%23E8661A'/%3E%3Cellipse cx='32' cy='38' rx='15' ry='21' fill='%23FF8A1E'/%3E%3Cpath d='M20 33l6-6 4 6zM44 33l-6-6-4 6z' fill='%231A0E04'/%3E%3Cpath d='M19 44q13 11 26 0l-3 4-3-2-3 3-4-3-3 3-3-2-3 2z' fill='%231A0E04'/%3E%3C/svg%3E");
  transition: transform .2s;
}
html.season-halloween .ask-go svg { opacity: 0; }
html.season-halloween .ask-go:hover, html.season-halloween .ask-go:focus-visible { transform: scale(1.08) rotate(-6deg); }
html.season-halloween .ask-go:focus-visible { outline: 3px solid #FFB062; outline-offset: 2px; }

/* Cobwebs in the top corners, behind the content */
#ax-season { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; color: rgba(236, 228, 245, .42); }
#ax-season .web { position: absolute; top: 0; width: 120px; height: 120px; }
#ax-season .web svg { width: 100%; height: 100%; }
#ax-season .web-tl { left: 0; }
#ax-season .web-tr { right: 0; transform: scaleX(-1); }
@media (min-width: 700px) { #ax-season .web { width: 170px; height: 170px; } }

/* A spider drops down on its thread from the right-hand web (behind the buttons), then climbs back up */
#ax-season .spider { display: block; width: 34px; height: 26px; color: #0B0612; filter: drop-shadow(0 0 2px rgba(255, 176, 98, .55)); }
#ax-season .spider svg { width: 100%; height: 100%; }
#ax-season .spider-drop { position: absolute; top: 0; right: 10px; display: flex; flex-direction: column; align-items: center; animation: ax-drop 16s ease-in-out infinite; }
#ax-season .spider-drop .thread { width: 1px; height: 60px; background: rgba(236, 228, 245, .5); }
@keyframes ax-drop { 0%, 12% { transform: translateY(-40px); } 30%, 55% { transform: translateY(140px); } 75%, 100% { transform: translateY(-40px); } }

/* Another scuttles across the bottom of the page, above the search bar, now and then */
#ax-season .spider-walk { position: absolute; left: 0; bottom: calc(92px + env(safe-area-inset-bottom)); animation: ax-walk 26s linear infinite; }
#ax-season .spider-walk .spider { transform: rotate(90deg); }
#ax-season .spider-walk .legs-a { animation: ax-legs .22s steps(2) infinite; }
#ax-season .spider-walk .legs-b { animation: ax-legs .22s steps(2) infinite reverse; }
@keyframes ax-walk { 0% { transform: translateX(-60px); } 40% { transform: translateX(calc(100vw + 60px)); } 100% { transform: translateX(calc(100vw + 60px)); } }
@keyframes ax-legs { from { transform: translateY(0); } to { transform: translateY(1.5px); } }

/* Respect "reduce motion": the spider just sits in its web */
@media (prefers-reduced-motion: reduce) {
  #ax-season .spider-drop, #ax-season .spider-walk .legs-a, #ax-season .spider-walk .legs-b { animation: none; }
  #ax-season .spider-walk { display: none; }
}
@media print { #ax-season { display: none; } }

/* "Coming up" card: pumpkin orange with dark text */
html.season-halloween .comingup { background: linear-gradient(135deg, #FF9A2E 0%, #E8601C 100%); color: #1A0E04; }
html.season-halloween .comingup .cu-row { color: #1A0E04; border-top-color: rgba(26, 14, 4, .18); }
html.season-halloween .comingup .cu-txt span { color: #3A1F08; }
