/* ==========================================================================
   Homepage V3 — Christmas dress. Loaded only while CC Settings → Homepage →
   Seasonal theme is "Christmas" (cc_homepage_season()).

   The world is the Celebration Box (CheeseClub_Box L 2026): one navy ink
   engraved on white paper. V3's composition stays; its tokens are re-inked,
   and the month is set in the box's market scene with its name lettered into
   the blank ribbon.
   Scoped under .hv3--christmas. What follows the photo menu onto every page
   (the menu, the footer's garland, the pointer sparkles) is css/christmas.css.
   ========================================================================== */

.hv3--christmas {
	/* The box's ink, matched to the print: #1F205E solid, #33346D in hatching. */
	--leaf: #1f205e;
	--leaf-deep: #13143f;
	--leaf-soft: #ededf6;
	--ink: #1f205e;
	--mute: #5a5b88;
	--line: #d9dae9;
	--well: #f4f4f9;
	--rule: #b9bbd8;
	--radius: 0.5rem;
	--float: 0 10px 24px -14px rgb(19 20 63 / 0.5);
	--script: 'Pinyon Script', 'Snell Roundhand', cursive;
	/* Beside the ink: the shop's festive red (the live menu's seasonal
	   pills, style.css li.christmas-special) and a touch of gold. */
	--holly: #b81818;
	--holly-deep: #961313;
	--gold: #e6c477;

	/* Scene geometry, as shares of the panel: its aspect, and the blank
	   ribbon's left edge, width and height (the height as a share of the
	   width, for the lettering's size). The same in every box panel. */
	--scene-ar: 2.3571;
	--rb-x: 33.68;
	--rb-w: 32.17;
	--rb-hw: 3.695;
}

/* Phones get each panel recomposed narrower (2038 × 1344), frame closed. */
@media (max-width: 640px) {
	.hv3--christmas {
		--scene-ar: 1.5164;
		--rb-x: 24.63;
		--rb-w: 50;
		--rb-hw: 5.744;
	}
}

.hv3--christmas .hv3-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Engraved scenes ----------
   A scene is a whole box panel, never cropped: its window always takes the
   panel's aspect, so the garland frame stays closed. The lettering is
   positioned as a share of the panel and scales with it. */

.hv3--christmas .hv3-scene {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	aspect-ratio: var(--scene-ar);
	container-type: inline-size;
	transition: transform 0.5s ease;
}

.hv3--christmas .hv3-scene picture {
	display: contents;
}

.hv3--christmas .hv3-scene__art {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.hv3--christmas .hv3-ribbon {
	position: absolute;
	left: calc(var(--rb-x) * 1%);
	top: 11.83%;
	width: calc(var(--rb-w) * 1%);
	height: 8.71%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0.14em 0 0;
	border: 0;
	/* As tall as the box's own lettering, shrunk for long names (--chars set
	   inline; Pinyon averages 0.36em a letter) to fill four fifths of it. */
	font-family: var(--script);
	font-size: min(calc(var(--rb-hw) * 1.62cqw), calc(var(--rb-w) * 0.8cqw / (var(--chars, 12) * 0.36)));
	font-style: normal;
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0;
	text-align: center;
	text-transform: none;
	white-space: nowrap;
	color: var(--ink);
}

/* ---------- The market's tree, lit (template-parts/homepage-v3-christmas-tree.php) ----------
   The tint is multiplied into the engraving (white paper takes the colour,
   the ink keeps its lines); the glow is screened over it (it lights the dark
   tree and leaves the paper white), twinkling out of step. */

.hv3--christmas .hv3-tree {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.hv3--christmas .hv3-tree--tint {
	mix-blend-mode: multiply;
}

.hv3--christmas .hv3-tree--glow {
	mix-blend-mode: screen;
}

.hv3--christmas .hv3-tree__star,
.hv3--christmas .hv3-tree .is-gold {
	fill: #e5b13a;
}

.hv3--christmas .hv3-tree .is-red {
	fill: #d23a32;
}

.hv3--christmas .hv3-tree .is-green {
	fill: #4e9a52;
}

.hv3--christmas .hv3-tree--glow circle {
	opacity: 0.6;
	transform-box: fill-box;
	transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
	.hv3--christmas .hv3-tree--glow circle {
		animation: hv3-glint var(--t, 2.6s) ease-in-out var(--d, 0s) infinite alternate;
	}
}

@keyframes hv3-glint {
	from {
		opacity: 0.12;
		transform: scale(0.7);
	}

	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Phones get the narrow recomposition, which cuts the tree away. */
@media (max-width: 640px) {
	.hv3--christmas .hv3-tree {
		display: none;
	}
}

/* ---------- The month, in the market scene ---------- */

.hv3--christmas .hv3-month--scene {
	display: block;
	min-height: 0;
	padding: 0;
	aspect-ratio: var(--scene-ar);
	background: #fff;
	container-type: inline-size;
}

/* The box's shipping label: white, a navy double rule. It stands inside the
   garland's inner rule (4.17% in from the panel's left, 10.7% up from its
   bottom) with a clear margin, and scales with the scene. */
.hv3--christmas .hv3-month--scene .hv3-month__card {
	position: absolute;
	left: calc(4.17% + 1.6em);
	bottom: calc(10.7% + 1.6em);
	/* Wide enough that the line under the clock keeps to two or three lines. */
	width: 27em;
	max-width: 46%;
	padding: 0.95em 1.4em 1.05em;
	font-size: clamp(0.8125rem, 1.32cqw, 1rem);
	border: 1.5px solid var(--ink);
	border-radius: 0.2rem;
	background: #fff;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px var(--ink), var(--float);
}

.hv3--christmas .hv3-month__status {
	margin: 0 0 0.4em;
	font-family: var(--display);
	font-size: 1.35em;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-wrap: balance;
	color: var(--ink);
}

/* Three gold sparkles on the label's rule, twinkling out of step. */
.hv3--christmas .hv3-twinkle {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.hv3--christmas .hv3-twinkle i {
	position: absolute;
	width: var(--s);
	aspect-ratio: 1;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5C12.9 8.4 15.6 11.1 22.5 12 15.6 12.9 12.9 15.6 12 22.5 11.1 15.6 8.4 12.9 1.5 12 8.4 11.1 11.1 8.4 12 1.5Z' fill='%23e6c477' stroke='%231f205e' stroke-width='1.1' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.hv3--christmas .hv3-twinkle i:nth-child(1) {
	--s: 1.35em;
	top: -0.7em;
	right: 1.5em;
}

.hv3--christmas .hv3-twinkle i:nth-child(2) {
	--s: 0.75em;
	top: 0.55em;
	right: 0.55em;
}

.hv3--christmas .hv3-twinkle i:nth-child(3) {
	--s: 0.95em;
	bottom: -0.5em;
	left: 1.9em;
}

@media (prefers-reduced-motion: no-preference) {
	.hv3--christmas .hv3-twinkle i {
		animation: hv3-twinkle 3.2s ease-in-out infinite;
	}

	.hv3--christmas .hv3-twinkle i:nth-child(2) {
		animation-delay: -1.1s;
	}

	.hv3--christmas .hv3-twinkle i:nth-child(3) {
		animation-delay: -2.2s;
	}
}

@keyframes hv3-twinkle {
	0%,
	100% {
		opacity: 1;
		transform: scale(1) rotate(0deg);
	}

	50% {
		opacity: 0.55;
		transform: scale(0.7) rotate(18deg);
	}
}

.hv3--christmas .hv3-countdown {
	display: inline-block;
	padding: 0.12em 0.5em 0.16em;
	border-radius: 0.2rem;
	background: var(--ink);
	font-family: var(--body);
	font-size: 0.82em;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: #fff;
	white-space: nowrap;
}

.hv3--christmas .hv3-countdown:empty {
	display: none;
}

/* The clock: four figures on cranberry plates, each ruled in the garland's
   gold. homepage-v3.js fills them and drops a changed figure in. */
.hv3--christmas .hv3-clock {
	display: flex;
	gap: 0.4em;
	margin: 0 0 0.75em;
	padding: 0;
	border-radius: 0;
	background: none;
	font-family: var(--display);
	font-size: 1em;
	letter-spacing: 0;
	color: #fff;
}

.hv3--christmas .hv3-clock__unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 3.7em;
	padding: 0.45em 0.45em 0.4em;
	border-radius: 0.25em;
	background: var(--holly);
	box-shadow: inset 0 0 0 2px var(--holly), inset 0 0 0 3px var(--gold), 0 6px 12px -7px rgb(120 14 14 / 0.55);
}

.hv3--christmas .hv3-clock__n {
	display: block;
	min-height: 1em;
	font-size: 1.85em;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.01em;
	font-variant-numeric: tabular-nums;
}

.hv3--christmas .hv3-clock__u {
	margin-top: 0.45em;
	font-family: var(--body);
	font-size: 0.66em;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #fbe7c2;
}

@media (prefers-reduced-motion: no-preference) {
	.hv3--christmas .hv3-clock__n.is-new {
		animation: hv3-tick 0.45s cubic-bezier(0.16, 1, 0.3, 1);
	}
}

@keyframes hv3-tick {
	from {
		opacity: 0.25;
		transform: translateY(-0.22em);
	}
}

.hv3--christmas .hv3-month__text {
	margin: 0 0 0.8em;
	font-size: 0.95em;
	line-height: 1.4;
	text-wrap: balance;
}

.hv3--christmas .hv3-month--scene .hv3-btn {
	padding: 0.65em 1.2em;
	font-size: 0.95em;
}

.hv3--christmas .hv3-month--scene .hv3-stamp {
	top: 7%;
	right: 4.5%;
}

/* The lettering inks itself into the ribbon once, as if by pen. */
@media (prefers-reduced-motion: no-preference) {
	.hv3--christmas .hv3-month--scene .hv3-ribbon {
		animation: hv3-ink 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
	}
}

@keyframes hv3-ink {
	from {
		clip-path: inset(-40% 104% -40% -4%);
	}

	to {
		clip-path: inset(-40% -4% -40% -4%);
	}
}

/* ---------- Aisle chips: engraved medallions ---------- */

.hv3--christmas .hv3-chip__photo {
	box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ink), var(--float);
}

/* ---------- Lanes: an engraved double rule runs to the arrows ---------- */

/* The shop's product card stays exactly as everywhere else: its text keeps
   the everyday ink it inherits, not the season's navy. */
.hv3--christmas .hv3-lane__track {
	color: #1c1f1a;
}

.hv3--christmas .hv3-lane__title {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex: 1;
	min-width: 0;
}

.hv3--christmas .hv3-lane__title::after {
	content: '';
	flex: 1;
	min-width: 2rem;
	border-top: 4px double var(--rule);
}

.hv3--christmas .hv3-lane__arrow:hover {
	border-color: var(--ink) !important;
	background: var(--leaf-soft) !important;
}

/* ---------- Why Cheese Club: inside the box lid's garland ---------- */

@media (min-width: 901px) {
	.hv3--christmas .hv3-panel--well {
		border-style: solid;
		border-color: transparent;
		border-width: clamp(42px, 4.8vw, 58px) clamp(35px, 4vw, 48px) clamp(38px, 4.4vw, 53px) clamp(35px, 4vw, 49px);
		border-image: url('../assets/images/homepage-v3/christmas/lid-frame.webp') 121 100 111 102 stretch;
		border-radius: 0;
		background: #fff;
	}

	.hv3--christmas .hv3-panel--well .hv2-elementor .elementor-top-section {
		padding: 1.25rem 1rem 1.5rem !important;
	}
}

@media (max-width: 900px) {
	.hv3--christmas .hv3-panel--well {
		border: 4px double var(--ink);
		background: #fff;
	}
}

/* Elementor inks the four value icons black; the box has one ink. */
.hv3--christmas .hv3-panel--well .elementor-icon,
.hv3--christmas .hv3-panel--well .elementor-icon i {
	color: var(--ink) !important;
}

.hv3--christmas .hv3-panel--well .elementor-icon svg {
	fill: var(--ink) !important;
}

/* ---------- Testimonials: a solid navy plate, the label's inverse ---------- */

.hv3--christmas .hv3-panel--leaf {
	/* Re-inked for the dark field: every V3 rule inside reads these. */
	--ink: #fff;
	--leaf: #c9cbe8;
	--leaf-deep: #dfe0f2;

	background: #1f205e;
	color: #fff;
}

.hv3--christmas .hv3-panel--leaf .swiper-pagination-bullet {
	background: #fff !important;
}

/* ---------- Narrow screens: the label card follows the scene ---------- */

@media (max-width: 900px) {
	/* The whole scene on top, the label card below it, lapping its edge. */
	.hv3--christmas .hv3-month--scene {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		min-height: 0;
		padding: calc(100% / var(--scene-ar)) 0 0;
		aspect-ratio: auto;
		background: none;
	}

	.hv3--christmas .hv3-month--scene .hv3-month__card {
		position: relative;
		left: auto;
		bottom: auto;
		width: auto;
		max-width: none;
		margin: -1.75rem 0.75rem 0;
		font-size: 1rem;
		box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px var(--ink);
	}

	/* Low right in the scene, clear of the ribbon and the card. */
	.hv3--christmas .hv3-month--scene .hv3-stamp {
		top: calc(100cqw / var(--scene-ar) - 8.5rem);
		right: 0.9rem;
	}
}
