/**
 * Seasonal dressing for the homepage hero panels.
 *
 * Scope: body.podxmas-season* only (classes come from inc/podxmas-christmas.php).
 * Layers are pure CSS on the existing panel element, so no markup changes and no
 * extra HTTP requests. Product shots (.pdx-hero__shot) render above the scene.
 *
 * Layer order inside each panel:
 *   background  - phase gradient + warm glow
 *   ::before    - falling snow + bokeh sparkle (animated, behind content)
 *   ::after     - garland scallop along the bottom edge
 *   .pdx-hero__copy / __art - untouched, sit above everything
 */

/* ── Scene container ─────────────────────────────────────────────── */

body.podxmas-season .pdx-hero__panel {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background-repeat: no-repeat;
	background-size: cover;
	transition: none;
}

body.podxmas-season .pdx-hero__panel > * {
	position: relative;
	z-index: 2;
}

/* Shared snow + sparkle layer. Two repeating radial gradients read as
   drifting flakes at different depths without an image request. */
body.podxmas-season .pdx-hero__panel::before {
	content: "";
	position: absolute;
	inset: -30% -10%;
	z-index: 1;
	pointer-events: none;
	background-image:
		radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.92) 0 1.4px, transparent 1.6px),
		radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.55) 0 1px, transparent 1.2px),
		radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.28) 0 2.2px, transparent 2.4px);
	background-size: 120px 120px, 74px 74px, 210px 210px;
	background-position: 0 0, 34px 22px, 90px 60px;
	opacity: 0.85;
	animation: podxmas-hero-snow 26s linear infinite;
	will-change: transform;
}

/* Garland scallop: repeating half-circles hugging the bottom edge. */
body.podxmas-season .pdx-hero__panel::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 14px;
	z-index: 1;
	pointer-events: none;
	background-repeat: repeat-x;
	background-size: 28px 14px;
	background-position: 0 100%;
}

@keyframes podxmas-hero-snow {
	from { transform: translate3d(0, 0, 0); }
	to   { transform: translate3d(-34px, 120px, 0); }
}

/* Slow warm shimmer so the panel is not a flat block of colour. */
body.podxmas-season .pdx-hero__panel {
	background-blend-mode: normal;
}

/* ── Winter: icy night ───────────────────────────────────────────── */

body.podxmas-season-winter .pdx-hero__panel--red {
	background-image:
		radial-gradient(115% 85% at 12% -10%, rgba(214, 236, 255, 0.42), transparent 58%),
		radial-gradient(95% 75% at 88% 108%, rgba(38, 82, 140, 0.62), transparent 62%),
		linear-gradient(158deg, #2b4f7d 0%, #1b3557 48%, #0e1e33 100%);
}

body.podxmas-season-winter .pdx-hero__panel::after {
	background-image: radial-gradient(circle at 50% 100%, #dceaff 0 7px, transparent 7.5px);
}

body.podxmas-season-winter .pdx-hero__panel--red .pdx-hero__btn {
	background: #eaf3ff;
	color: #14304f;
}

/* ── Christmas: red, forest green, gold ──────────────────────────── */

body.podxmas-season-christmas .pdx-hero__panel--red,
body.podxmas-season-winter .pdx-hero__panel--xmas {
	background-image:
		radial-gradient(120% 90% at 16% -8%, rgba(255, 214, 150, 0.46), transparent 55%),
		radial-gradient(100% 85% at 86% 112%, rgba(9, 84, 52, 0.72), transparent 62%),
		radial-gradient(70% 55% at 62% 30%, rgba(255, 240, 190, 0.16), transparent 70%),
		linear-gradient(158deg, #b3120c 0%, #8c0b08 46%, #37160d 100%);
}

/* Tree line + starfield along the bottom of the Christmas panel.
   Drawn with conic/linear gradients so there is no image request. */
body.podxmas-season-christmas .pdx-hero__panel--red::before {
	inset: -30% -10% -12%;
	background-image:
		/* stars */
		radial-gradient(circle at 50% 50%, rgba(255, 246, 214, 0.95) 0 1.3px, transparent 1.5px),
		radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.7) 0 1px, transparent 1.2px),
		radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.35) 0 2px, transparent 2.2px),
		/* fir tree row: triangles via conic gradients, seated on the bottom edge */
		conic-gradient(from 135deg at 50% 100%, transparent 0 90deg, #0d4a30 90deg 100deg, transparent 100deg),
		conic-gradient(from 135deg at 50% 100%, transparent 0 90deg, #12603e 90deg 103deg, transparent 103deg),
		conic-gradient(from 135deg at 50% 100%, transparent 0 90deg, #0a3d27 90deg 97deg, transparent 97deg);
	background-size:
		120px 120px, 74px 74px, 210px 210px,
		118px 76px, 86px 58px, 152px 96px;
	background-position:
		0 0, 34px 22px, 90px 60px,
		-18px 100%, 30px 100%, 96px 100%;
	background-repeat: repeat, repeat, repeat, repeat-x, repeat-x, repeat-x;
	opacity: 0.92;
	animation: podxmas-hero-snow 26s linear infinite;
}

/* Warm glow pool on the ground, above the tree row. */
body.podxmas-season-christmas .pdx-hero__panel--red {
	box-shadow: none;
}

body.podxmas-season-christmas .pdx-hero__panel--red::after {
	height: 18px;
	background-image:
		radial-gradient(circle at 50% 100%, #f6d98a 0 6px, transparent 6.5px),
		radial-gradient(circle at 50% 130%, #ffeec2 0 9px, transparent 9.5px);
	background-size: 28px 18px, 56px 18px;
	background-position: 0 100%, 14px 100%;
}

body.podxmas-season-christmas .pdx-hero__panel--red .pdx-hero__btn {
	background: #f6d98a;
	color: #4a1207;
	box-shadow: 0 6px 18px rgba(246, 217, 138, 0.35);
}

/* ── New Year: midnight gold ─────────────────────────────────────── */

body.podxmas-season-newyear .pdx-hero__panel--red {
	background-image:
		radial-gradient(120% 90% at 20% -10%, rgba(255, 232, 168, 0.52), transparent 58%),
		radial-gradient(95% 80% at 82% 112%, rgba(120, 74, 12, 0.66), transparent 62%),
		radial-gradient(60% 45% at 55% 35%, rgba(255, 246, 214, 0.18), transparent 70%),
		linear-gradient(158deg, #7a4a10 0%, #40260a 50%, #1a1106 100%);
}

body.podxmas-season-newyear .pdx-hero__panel::after {
	background-image: radial-gradient(circle at 50% 100%, #ffe9a8 0 7px, transparent 7.5px);
}

body.podxmas-season-newyear .pdx-hero__panel--red .pdx-hero__btn {
	background: #ffe9a8;
	color: #3a2606;
	box-shadow: 0 6px 18px rgba(255, 233, 168, 0.35);
}

/* ── Secondary panels (dark / green shop banner) ─────────────────── */

body.podxmas-season .pdx-hero__panel--dark {
	background-color: #10202f;
	background-image:
		radial-gradient(90% 70% at 20% 0%, rgba(150, 200, 255, 0.22), transparent 60%),
		radial-gradient(80% 70% at 85% 100%, rgba(20, 90, 60, 0.42), transparent 62%),
		radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1.2px);
	background-size: auto, auto, 16px 16px;
}

body.podxmas-season .pdx-hero__panel--shop {
	background-color: #0f3b2c;
	background-image:
		radial-gradient(90% 80% at 85% 0%, rgba(246, 217, 138, 0.22), transparent 60%),
		radial-gradient(70% 60% at 10% 100%, rgba(10, 70, 45, 0.55), transparent 62%);
}

/* ── Hero art geometry fix ──────────────────────────────────────────
   The base sheet sizes product shots as a share of the PANEL width (44%),
   which inside a 190px-tall art box produced 436px squares that overflowed
   by 226px and got clipped by overflow:hidden. Size them from the art box
   height instead, so both mockups sit fully inside the panel and the copy
   column keeps the left half to itself.
   ────────────────────────────────────────────────────────────────── */

body.podxmas-season .pdx-hero__panel--red {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	column-gap: 1rem;
}

body.podxmas-season .pdx-hero__panel--red .pdx-hero__art {
	height: 100%;
	min-height: 220px;
	margin-top: 0;
}

body.podxmas-season .pdx-hero__panel--red .pdx-hero__shot {
	width: auto;
	height: 88%;
	aspect-ratio: 1;
	top: 50%;
}

body.podxmas-season .pdx-hero__panel--red .pdx-hero__shot--1 {
	left: 2%;
	transform: translateY(-50%) rotate(-6deg);
}

body.podxmas-season .pdx-hero__panel--red .pdx-hero__shot--2 {
	right: 2%;
	transform: translateY(-50%) rotate(7deg);
}

@media (max-width: 849px) {
	body.podxmas-season .pdx-hero__panel--red {
		grid-template-columns: 1fr;
	}

	body.podxmas-season .pdx-hero__panel--red .pdx-hero__art {
		min-height: 170px;
	}
}

/* ── Copy readability over the busier backdrop ───────────────────── */

body.podxmas-season .pdx-hero__title {
	text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

/* The base rule caps the red panel title at 8ch, which shatters the seasonal
   headline into 5 short lines. Give it room while the season is on. */
body.podxmas-season .pdx-hero__panel--red .pdx-hero__title {
	max-width: 18ch;
	text-wrap: balance;
}

body.podxmas-season .pdx-hero__kicker {
	background: rgba(0, 0, 0, 0.28);
	backdrop-filter: blur(2px);
}

/* ── Motion & contrast preferences ───────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	body.podxmas-season .pdx-hero__panel::before {
		animation: none;
	}
}

@media (max-width: 849px) {
	/* Smaller viewport: fewer, calmer flakes, no scallop detail loss. */
	body.podxmas-season .pdx-hero__panel::before {
		background-size: 150px 150px, 96px 96px, 240px 240px;
		opacity: 0.7;
	}
}

@media (forced-colors: active) {
	body.podxmas-season .pdx-hero__panel::before,
	body.podxmas-season .pdx-hero__panel::after {
		display: none;
	}
}
