/* ==========================================================================
   Arma Tactical — global seasonal themes (v1.3.1: motion audit — compositor-only keyframes)
   Loaded only while a season is active. No clip-art: colour comes from the HUD custom
   properties (--accent, --accent-glow, --hud-bracket, see hud.css), and atmosphere is kept
   subtle, low-opacity, aria-hidden and pointer-events:none:
     Winter      fine snow + micro-bulb wire on the navbar HUD rule + cold frost vignette
     Halloween   drifting smoke + micro-embers under thermal amber lighting
     4th of July star-reticle ticks on the navbar rule + distant upper-sky spark bursts
     Remembrance slow crimson petals + candle-gold haze
   ========================================================================== */

.at-season-sky, .at-fx, .at-lights, .at-reticle, .at-smoke, .at-frost, .at-candle-haze, .at-footdecor { pointer-events: none !important; user-select: none; }
.at-season-sky { position: absolute; inset: 0; z-index: 2; overflow: hidden; contain: layout paint; }
.at-fx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.at-fx--snow { position: fixed; inset: 0; z-index: 95; opacity: .55; }
.at-pagehead .at-season-sky { z-index: 2; }
.at-footer { position: relative; }

/* ---------------------------------------------------------------- shared: status bar + navbar HUD rule */
body:not(.at-season-standard) .at-telemetry { border-bottom-color: rgba(var(--hud-bracket-rgb), .35); background: linear-gradient(90deg, rgba(var(--accent-glow-rgb), .06), #06080a 35%, #06080a 65%, rgba(var(--hud-bracket-rgb), .06)); }
body:not(.at-season-standard) .at-telemetry__status .at-mono { color: var(--accent-glow); text-shadow: 0 0 10px rgba(var(--accent-glow-rgb), .35); }
body:not(.at-season-standard) .at-telemetry__status .at-live-dot { animation: at-season-pulse 2.4s infinite; }
@keyframes at-season-pulse { 0% { box-shadow: 0 0 0 0 rgba(var(--accent-glow-rgb), .55); } 70% { box-shadow: 0 0 0 6px rgba(var(--accent-glow-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--accent-glow-rgb), 0); } }
body:not(.at-season-standard) .at-header { border-bottom-color: rgba(var(--hud-bracket-rgb), .35); }
body:not(.at-season-standard) .at-kicker__idx { background: rgba(var(--accent-glow-rgb), .14); color: var(--accent-glow); box-shadow: inset 0 0 0 1px rgba(var(--accent-glow-rgb), .45); }
body:not(.at-season-standard) .at-hero__motto { color: var(--accent-glow); }

/* ---------------------------------------------------------------- Christmas / Winter Ops (Arctic Night) */
.at-season-winter .at-hero { background: radial-gradient(ellipse 80% 55% at 50% 0%, rgba(125, 211, 252, .07), transparent 60%), var(--bg); }
.at-frost { position: absolute; inset: 0; background: radial-gradient(ellipse 120% 60% at 50% -10%, rgba(186, 230, 253, .06), transparent 60%), linear-gradient(180deg, transparent 70%, rgba(186, 230, 253, .035)); }

/* Thin dark wire with small glowing micro-bulbs, tucked under the navbar's bottom HUD rule */
.at-lights { position: absolute; left: 0; right: 0; top: 100%; height: 16px; margin-top: -2px; z-index: 6; opacity: .9; }
.at-lights__wire { position: absolute; left: 0; top: 0; width: 100%; height: 10px; overflow: visible; }
.at-bulb { position: absolute; top: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--c); box-shadow: 0 0 4px 1px rgba(var(--c-rgb), .75), 0 0 10px 2px rgba(var(--c-rgb), .3); opacity: .85; }
.at-bulb--odd { top: 7px; }
.at-bulb--gold { --c: #facc15; --c-rgb: 250, 204, 21; }
.at-bulb--emerald { --c: #34d399; --c-rgb: 52, 211, 153; }
.at-bulb--crimson { --c: #f43f5e; --c-rgb: 244, 63, 94; }
.at-bulb--ice { --c: #7dd3fc; --c-rgb: 125, 211, 252; }
/* Alternating twinkle: odd bulbs run half a cycle out of phase with even ones; scale carries the glow halo. */
@keyframes at-bulb { 0%, 100% { opacity: .95; transform: scale(1.15); } 45% { opacity: .35; transform: scale(.8); } 65% { opacity: .8; transform: scale(1); } }

/* ---------------------------------------------------------------- Halloween Ops (Blackout / Thermal) */
.at-season-halloween .at-hero { background: radial-gradient(ellipse 70% 50% at 50% 115%, rgba(249, 115, 22, .10), transparent 65%), radial-gradient(ellipse 60% 45% at 85% 0%, rgba(127, 29, 29, .12), transparent 70%), var(--bg); }
.at-smoke { position: absolute; left: -15%; right: -15%; bottom: -10%; height: 70%; opacity: .5; }
.at-smoke i { position: absolute; inset: 0;
	background:
		radial-gradient(ellipse 26% 46% at 18% 80%, rgba(60, 52, 50, .4), rgba(60, 52, 50, .16) 45%, transparent 78%),
		radial-gradient(ellipse 30% 52% at 46% 90%, rgba(48, 40, 38, .38), rgba(48, 40, 38, .15) 45%, transparent 80%),
		radial-gradient(ellipse 24% 42% at 74% 78%, rgba(58, 48, 44, .36), rgba(58, 48, 44, .14) 45%, transparent 78%),
		radial-gradient(ellipse 34% 34% at 50% 100%, rgba(194, 65, 12, .15), transparent 76%);
	/* Softness is built into the gradients: a CSS blur() on a moving layer is re-rasterised every frame. */
	will-change: transform, opacity; backface-visibility: hidden; }
.at-smoke i + i { opacity: .6; background-position: 0 0; transform: translate3d(0, 8%, 0); }
.at-smoke i + i { left: 8%; right: -8%; }
@keyframes at-smoke-rise { from { transform: translate3d(-3%, 6%, 0); opacity: .85; } to { transform: translate3d(3%, -10%, 0); opacity: .45; } }
/* Warm-amber candle / optic flicker washing up from the bottom of the hero. */
.at-season-halloween .at-season-sky::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60%; pointer-events: none;
	background: radial-gradient(ellipse 55% 70% at 50% 100%, rgba(249, 115, 22, .14), rgba(194, 65, 12, .05) 45%, transparent 72%); opacity: .8; }
@keyframes at-candle-flicker { 0%, 100% { opacity: .78; } 8% { opacity: .95; } 12% { opacity: .7; } 21% { opacity: 1; } 34% { opacity: .82; } 47% { opacity: .9; } 52% { opacity: .66; } 61% { opacity: .96; } 78% { opacity: .8; } 86% { opacity: .92; } }
.at-fx--embers { opacity: .7; }

/* ---------------------------------------------------------------- 4th of July (Allied Spec-Ops Night Watch) */
.at-season-july4 .at-hero { background: radial-gradient(ellipse 60% 45% at 20% 0%, rgba(59, 130, 246, .07), transparent 60%), radial-gradient(ellipse 60% 45% at 80% 0%, rgba(239, 68, 68, .06), transparent 60%), var(--bg); }
.at-season-july4 .at-btn--primary:hover { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.at-fx--fireworks { height: 46%; opacity: .5; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
.at-reticle { position: absolute; left: 0; right: 0; bottom: -1px; height: 12px; z-index: 6;
	background: repeating-linear-gradient(90deg, rgba(154, 164, 178, .45) 0 1px, transparent 1px 24px) left top / 100% 3px no-repeat; }
.at-reticle__star { position: absolute; top: 3px; width: 7px; height: 7px; margin-left: -3.5px; background: var(--c);
	clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
	filter: drop-shadow(0 0 3px var(--c)); opacity: .85; }
.at-reticle__star--r { --c: #ef4444; } .at-reticle__star--w { --c: #f8fafc; } .at-reticle__star--b { --c: #3b82f6; }
@keyframes at-reticle { 0%, 100% { opacity: .9; } 50% { opacity: .4; } }

/* ---------------------------------------------------------------- Remembrance / Memorial Ops (Lest We Forget) */
.at-season-remembrance .at-hero { background: radial-gradient(ellipse 70% 50% at 50% 115%, rgba(212, 175, 55, .08), transparent 60%), radial-gradient(ellipse 50% 40% at 50% 0%, rgba(127, 29, 29, .08), transparent 70%), var(--bg); }
.at-candle-haze { position: absolute; left: 0; right: 0; bottom: 0; height: 45%; background: radial-gradient(ellipse 45% 70% at 50% 100%, rgba(240, 182, 74, .09), transparent 70%); }
@keyframes at-haze { from { opacity: .7; transform: scale(1); } to { opacity: 1; transform: scale(1.06); } }
.at-candle-haze { transform-origin: 50% 100%; }
.at-fx--petals { opacity: .75; }
.at-footdecor { position: absolute; left: 0; right: 0; top: 0; height: 0; z-index: 2; }
.at-footdecor__line { position: absolute; top: 16px; left: 0; right: 0; margin: 0; text-align: center; font-size: 11px; letter-spacing: .5em; color: var(--accent); opacity: .8; }

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: no-preference) {
	.at-season-fx .at-bulb { animation: at-bulb var(--t, 3s) ease-in-out var(--d, 0s) infinite; }
	.at-season-fx .at-bulb--odd { animation-delay: calc(var(--d, 0s) + var(--t, 3s) / 2); }
	.at-season-fx.at-season-halloween .at-season-sky::before { animation: at-candle-flicker 3.4s steps(1, end) infinite; }
	.at-season-fx .at-smoke i { animation: at-smoke-rise 26s ease-in-out infinite alternate; }
	.at-season-fx .at-smoke i + i { animation-duration: 38s; animation-direction: alternate-reverse; }
	.at-season-fx .at-reticle__star { animation: at-reticle 3.2s ease-in-out var(--d, 0s) infinite; }
	.at-season-fx .at-candle-haze { animation: at-haze 6s ease-in-out infinite alternate; }
}
body:not(.at-season-fx) .at-fx { display: none; }
@media (prefers-reduced-motion: reduce) {
	.at-fx { display: none !important; }
	.at-bulb, .at-smoke i, .at-reticle__star, .at-candle-haze, .at-season-sky::before { animation: none !important; }
}
