/* Seasonal overlay (set by season.js on <html data-season>). Decorative only; text colours are not changed. */
.season-mark { display: inline-flex; width: 20px; height: 20px; margin-left: 2px; align-self: center; flex: none; }
.season-mark svg { width: 100%; height: 100%; }
.season-glow, .season-fx { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
[data-season] .hero-inner { position: relative; z-index: 1; }

/* ---------- header accent ---------- */
[data-season] .topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
[data-season="spooky"] .topbar::after { background: linear-gradient(90deg, transparent, #8e5bd6 20%, #f08a24 50%, #8e5bd6 80%, transparent); opacity: .85; }
[data-season="fall"] .topbar::after { background: linear-gradient(90deg, transparent, #c8641e 20%, #e8a33c 50%, #b5471b 80%, transparent); opacity: .9; }
[data-season="christmas"] .topbar::after { height: 7px; bottom: -6px; opacity: .95;
  background: radial-gradient(circle 2.6px, #ff5a5a 90%, transparent) 0 50%/48px 7px repeat-x,
              radial-gradient(circle 2.6px, #7be38f 90%, transparent) 16px 50%/48px 7px repeat-x,
              radial-gradient(circle 2.6px, #ffd76a 90%, transparent) 32px 50%/48px 7px repeat-x;
  animation: ss-twinkle 2.6s ease-in-out infinite alternate; }
@keyframes ss-twinkle { from { opacity: .55; filter: brightness(.85); } to { opacity: 1; filter: brightness(1.15) drop-shadow(0 0 2px rgba(255,230,160,.8)); } }

/* ---------- hero glow and static touches ---------- */
[data-season="spooky"] .season-glow { background: radial-gradient(60% 70% at 18% 100%, rgba(142,91,214,.28), transparent 70%), radial-gradient(40% 50% at 92% 0%, rgba(142,91,214,.16), transparent 70%); }
[data-season="fall"] .season-glow { background: radial-gradient(60% 70% at 15% 100%, rgba(232,163,60,.22), transparent 70%), radial-gradient(40% 50% at 95% 10%, rgba(200,100,30,.14), transparent 70%); }
[data-season="christmas"] .season-glow { background: radial-gradient(60% 60% at 80% 0%, rgba(190,220,255,.14), transparent 70%); }
.season-glow .pk { position: absolute; bottom: 10px; width: 46px; height: 46px; filter: drop-shadow(0 0 10px rgba(240,138,36,.45)); }
.season-glow .pk1 { right: 6%; } .season-glow .pk2 { right: calc(6% + 40px); width: 32px; height: 32px; }
.season-glow .pk svg { width: 100%; height: 100%; }
.season-glow .lights { position: absolute; top: 0; left: 0; right: 0; height: 14px;
  background: radial-gradient(circle 3.4px at 50% 8px, #ff6b6b 92%, transparent) 0 0/60px 14px repeat-x,
              radial-gradient(circle 3.4px at 50% 8px, #8be59a 92%, transparent) 20px 0/60px 14px repeat-x,
              radial-gradient(circle 3.4px at 50% 8px, #ffe08a 92%, transparent) 40px 0/60px 14px repeat-x;
  animation: ss-twinkle 3.2s ease-in-out infinite alternate; }

/* ---------- particles (a few elements, hero only) ---------- */
.sp { position: absolute; left: var(--x); top: -8%; transform: scale(var(--s)); animation: ss-fall var(--dur) linear var(--del) infinite; will-change: transform; }
.season-fx.paused .sp, .season-fx.paused + .x { animation-play-state: paused; }
@keyframes ss-fall { 0% { transform: translate3d(0, 0, 0) rotate(0) scale(var(--s)); } 50% { transform: translate3d(var(--sway), 220px, 0) rotate(160deg) scale(var(--s)); } 100% { transform: translate3d(0, 480px, 0) rotate(320deg) scale(var(--s)); } }
/* snow */
.sp-christmas { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.85); box-shadow: 0 0 6px rgba(255,255,255,.6); }
.sp-christmas.v1 { width: 4px; height: 4px; opacity: .7; } .sp-christmas.v2 { width: 8px; height: 8px; opacity: .55; filter: blur(.6px); }
/* leaves */
.sp-fall { width: 16px; height: 16px; opacity: .75; background: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23d9822b' d='M16 2l2.5 6 4-3-.8 6 6-1.5-3.5 5 4 2.5-6 1.5 1.5 4-5-2-.7 5.5-2-3-2 3-.7-5.5-5 2 1.5-4-6-1.5 4-2.5-3.5-5 6 1.5-.8-6 4 3z'/%3E%3C/svg%3E"); }
.sp-fall.v1 { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23b5471b' d='M16 2C8 8 6 18 16 30 26 18 24 8 16 2z'/%3E%3Cpath stroke='%23f5d2a0' stroke-width='1' d='M16 6v22'/%3E%3C/svg%3E"); }
.sp-fall.v2 { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23e8b03c' d='M16 2l2.5 6 4-3-.8 6 6-1.5-3.5 5 4 2.5-6 1.5 1.5 4-5-2-.7 5.5-2-3-2 3-.7-5.5-5 2 1.5-4-6-1.5 4-2.5-3.5-5 6 1.5-.8-6 4 3z'/%3E%3C/svg%3E"); }
/* bats: drift across the sky, wings flap */
.sp-spooky { top: var(--y); left: -6%; width: 26px; height: 12px; background: #3c2463; opacity: .85; filter: drop-shadow(0 0 4px rgba(170,120,255,.55));
  clip-path: polygon(50% 30%, 56% 10%, 60% 30%, 75% 5%, 100% 20%, 88% 45%, 78% 40%, 66% 70%, 50% 100%, 34% 70%, 22% 40%, 12% 45%, 0 20%, 25% 5%, 40% 30%, 44% 10%);
  animation: ss-bat var(--dur) linear var(--del) infinite, ss-flap .32s ease-in-out infinite alternate; }
[data-theme="dark"] .sp-spooky { background: #4a2d78; }
@keyframes ss-bat { 0% { transform: translate3d(0, 0, 0) scale(var(--s)); } 25% { transform: translate3d(28vw, -18px, 0) scale(var(--s)); } 50% { transform: translate3d(56vw, 10px, 0) scale(var(--s)); } 75% { transform: translate3d(84vw, -12px, 0) scale(var(--s)); } 100% { transform: translate3d(112vw, 0, 0) scale(var(--s)); } }
@keyframes ss-flap { from { height: 12px; } to { height: 6px; } }

/* ---------- cards: a seasonal top edge and a faint corner glyph ---------- */
[data-season] .card { background-repeat: no-repeat; background-position: right 12px bottom 12px; background-size: 18px 18px; }
[data-season="spooky"] .card { border-top: 2px solid rgba(142,91,214,.55);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg opacity='.22'%3E%3Cpath fill='%236b8f3a' d='M15 3c2 0 3 1 3 3l-1 4h-3l-1-4c0-1.5.7-3 2-3z'/%3E%3Cellipse cx='10' cy='19' rx='7' ry='9' fill='%23e07a1f'/%3E%3Cellipse cx='22' cy='19' rx='7' ry='9' fill='%23e07a1f'/%3E%3Cellipse cx='16' cy='19' rx='7' ry='10' fill='%23f0912e'/%3E%3C/g%3E%3C/svg%3E"); }
[data-season="fall"] .card { border-top: 2px solid rgba(200,100,30,.5);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath opacity='.22' fill='%23d9822b' d='M16 2l2.5 6 4-3-.8 6 6-1.5-3.5 5 4 2.5-6 1.5 1.5 4-5-2-.7 5.5-2-3-2 3-.7-5.5-5 2 1.5-4-6-1.5 4-2.5-3.5-5 6 1.5-.8-6 4 3z'/%3E%3C/svg%3E"); }
[data-season="christmas"] .card { border-top: 2px solid rgba(190,40,50,.45);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg opacity='.3' stroke='%237aa6c8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M16 3v26M4.7 9.5l22.6 13M4.7 22.5l22.6-13'/%3E%3C/g%3E%3C/svg%3E"); }
[data-theme="dark"][data-season="christmas"] .card { border-top-color: rgba(230,90,100,.5); }

/* ---------- motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  .season-fx { display: none; }
  [data-season="christmas"] .topbar::after, .season-glow .lights { animation: none; }
}
@media (max-width: 760px) { .season-glow .pk1 { right: 4%; } .sp-fall { width: 14px; height: 14px; } }
@media print {
  .season-mark, .season-glow, .season-fx { display: none !important; }
  [data-season] .topbar::after { display: none; }
  [data-season] .card { background-image: none !important; border-top: 1px solid #bbb !important; }
}
