/* KØS SEJL — css/halloween.css: the temporary Halloween event (js/ui/season.js).
   html.season-halloween-deco  = decorative art (24-31 Oct 2026): painted backgrounds, title tint, bats, cobwebs, hub map props.
   html.season-halloween       = the event level + its hub promo banner (24 Oct - 9 Nov 2026); the banner is self-contained.
   Outside both windows nothing here matches, so the game looks exactly as without this file. */

/* ------------------------------------------------------------------ painted backgrounds (Halloween edits of the originals) */
html.season-halloween-deco .mbg-photo { background-image: url("../assets/bg/title-port-halloween.jpg"); }
@media (orientation: landscape) { html.season-halloween-deco .mbg-photo { background-image: url("../assets/bg/title-land-halloween.jpg"); } }
html.season-halloween-deco body[data-screen="hub"] .mbg-photo, html.season-halloween-deco body[data-screen="area"] .mbg-photo { background-image: url("../assets/bg/hub-port-halloween.jpg"); }
@media (orientation: landscape) { html.season-halloween-deco body[data-screen="hub"] .mbg-photo, html.season-halloween-deco body[data-screen="area"] .mbg-photo { background-image: url("../assets/bg/hub-land-halloween.jpg"); } }
html.season-halloween-deco body[data-area="club"] .mbg-photo, html.season-halloween-deco body[data-screen="garage"] .mbg-photo,
html.season-halloween-deco body[data-screen="boatcard"] .mbg-photo, html.season-halloween-deco body[data-screen="profile"] .mbg-photo { background-image: url("../assets/bg/club-halloween.jpg") !important; }
html.season-halloween-deco body[data-screen="results"] .mbg-photo { background-image: url("../assets/bg/results-halloween.jpg") !important; }

/* title: a subtle orange/purple tint, glowing logo, a few bats drifting across the moon */
html.season-halloween-deco body[data-screen="title"] .mbg-vignette { background:
  radial-gradient(110% 75% at 50% 38%, transparent 30%, rgba(30, 8, 50, .55) 100%),
  linear-gradient(180deg, rgba(60, 20, 90, .38), rgba(90, 40, 110, .12) 45%, rgba(255, 110, 30, .10) 70%, rgba(10, 6, 28, .7)); }
html.season-halloween-deco .title-logo svg { filter: drop-shadow(0 0 22px rgba(255, 122, 40, .45)) drop-shadow(0 0 40px rgba(140, 70, 220, .35)); }
html.season-halloween-deco .tagline span { color: #ffa040; }
html.season-halloween-deco body[data-screen="title"] #menu-bg::after {
  content: ""; position: absolute; left: 0; right: 0; top: 6%; height: 22%; pointer-events: none; opacity: .85;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 160'%3E%3Cg fill='%231d1430'%3E%3Cpath id='b' d='M0-4c3 0 4 2 4 4 4-6 10-9 18-8-4 3-4 6-2 9-4-2-8-1-10 2-2-3-5-4-8-3-1 2-1 4-2 5-1-1-1-3-2-5-3-1-6 0-8 3-2-3-6-4-10-2 2-3 2-6-2-9 8-1 14 2 18 8 0-2 1-4 4-4z'/%3E%3Cuse href='%23b' transform='translate(90 40) scale(1.4)'/%3E%3Cuse href='%23b' transform='translate(170 22) scale(.9)'/%3E%3Cuse href='%23b' transform='translate(420 60) scale(1.2)'/%3E%3Cuse href='%23b' transform='translate(500 30) scale(.8)'/%3E%3Cuse href='%23b' transform='translate(300 110) scale(.7)'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  animation: hwBats 14s ease-in-out infinite alternate;
}
@keyframes hwBats { from { transform: translate(-3%, 0); } to { transform: translate(3%, 12px); } }

/* cobweb in the corner of menu panels and the results card */
html.season-halloween-deco .results-card::before, html.season-halloween-deco body[data-screen="area"] .act-grid::before {
  content: ""; position: absolute; top: 0; right: 0; width: 64px; height: 64px; pointer-events: none; z-index: 1; opacity: .7;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Cg fill='none' stroke='%23e8e6ff' stroke-opacity='.6' stroke-width='1'%3E%3Cpath d='M60 0L0 60M60 0L0 24M60 0L36 60M60 0L0 0M60 0L60 60'/%3E%3Cpath d='M46 0q-1 10 14 14M32 0q0 22 28 28M16 0q-2 38 44 44M0 8q20 40 60 52'/%3E%3C/g%3E%3C/svg%3E") no-repeat;
}
html.season-halloween-deco body[data-screen="area"] .act-grid { position: relative; }
html.season-halloween-deco .results-card::before { right: auto; left: 0; transform: scaleX(-1); border-top-right-radius: inherit; }
html.season-halloween-deco .results-card { box-shadow: 0 0 0 1px rgba(255, 140, 50, .25), 0 10px 40px rgba(110, 40, 180, .35); }

/* ------------------------------------------------------------------ hub map props (static; scale with the map, no animation) */
.hub-deco { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.hub-deco .hd { position: absolute; transform: translate(-50%, -60%); display: block; }
.hub-deco .hd svg { display: block; width: 100%; height: auto; }
.hub-deco .hd-pumpkin svg { filter: drop-shadow(0 0 6px rgba(255, 150, 40, .9)); }
.hub-deco .hd-ghost { opacity: .8; }
.hub-deco .hd-bat { opacity: .9; }
.hub-lite .hub-deco .hd-pumpkin svg { filter: none; }

/* ------------------------------------------------------------------ hub promo pin (event window; self-contained, fine without the deco)
   a normal .hub-pin (counter-scaled, kept clear of the top bar and bottom card by hub.js fit()) dressed as a jack-o'-lantern */
.hub-pin-event { z-index: 2; }
.hub-pin-ev-halloween .hub-pin-badge {
  background: radial-gradient(circle at 40% 35%, #5b2a8c 0%, #2c1250 70%, #1a0a33 100%); border-color: #ffb547;
  box-shadow: 0 0 0 4px rgba(255, 138, 26, .35), 0 10px 22px rgba(4, 10, 25, .5), 0 0 28px rgba(255, 138, 26, .75);
}
.hub-pin-ev-halloween .hub-pin-badge svg { width: 44px; height: 44px; margin-top: 2px; }
.hub-pin-ev-halloween .hub-pin-label { background: linear-gradient(180deg, rgba(52, 20, 86, .95), rgba(26, 10, 48, .95)); border-color: rgba(255, 160, 70, .6); }
.hub-pin-ev-halloween .hub-pin-name { color: #ffb547; }
.hub-pin-ev-halloween .hub-pin-stars { color: #e4d2ff; }
.hub-place-ev-halloween .hub-place-badge svg { width: 30px; height: 30px; }

/* ------------------------------------------------------------------ the level: ghost-hit flash */
.hw-boo { position: absolute; inset: 0; pointer-events: none; z-index: 3; opacity: 0; background: radial-gradient(circle at 50% 50%, rgba(170, 110, 255, 0) 30%, rgba(120, 60, 220, .55) 100%); }
.hw-boo.on { animation: hwBoo .9s ease-out both; }
@keyframes hwBoo { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }

/* reduced motion: still bats, no glow pulse, a soft static flash */
.reduce-motion body[data-screen="title"] #menu-bg::after { animation: none !important; }
.reduce-motion .hw-boo.on { animation: none !important; opacity: .5; }
@media (prefers-reduced-motion: reduce) {
  html.season-halloween-deco body[data-screen="title"] #menu-bg::after { animation: none !important; }
  .hw-boo.on { animation: none; opacity: .6; transition: opacity .6s; }
}
