/* Christmas mode (inc/christmas-mode.php). Remove with the "Christmas mode on" MR.
   Oda's designs 2026-11-26: "Julehero D" (baubles), "Julefooter L" (trees),
   "2a · CTA med små snøkrystaller" and "Julete skjema D" (snow crystals).
   Nothing here moves, so there is nothing to switch off for reduced motion. */

/* --- Homepage hero: baubles hanging from the header edge ----------------- */

/* Three sizes, one per mockup (01_hero_desktop, 02_hero_nettbrett,
   03_hero_mobil). The hero is a size container and only goes two-column at a
   1024px CONTENT width (style.css), so the switch follows the same container
   queries (600px / 1024px), not the viewport. Strings start at the hero's top
   edge, i.e. the header line. */
.cq-christmas.home .cq-hero > .wp-block-columns {
	position: relative;
}

.cq-christmas.home .cq-hero > .wp-block-columns::before {
	background: url("../images/christmas/baubles-mobile.svg") no-repeat right top / 100% 100%;
	content: "";
	height: 66px;
	pointer-events: none;
	position: absolute;
	right: -4px;
	top: calc(-1 * clamp(56px, 8vw, 120px)); /* the hero's padding-top */
	width: 100px;
	z-index: 1;
}

@container (min-width: 600px) {
	.cq-christmas.home .cq-hero > .wp-block-columns::before {
		background-image: url("../images/christmas/baubles-tablet.svg");
		height: 138px;
		right: 0;
		width: 140px;
	}
}

/* Desktop: drawn on the 1200px content box; 100% width keeps each bauble on
   the same column edge at every width. */
@container (min-width: 1024px) {
	.cq-christmas.home .cq-hero > .wp-block-columns::before {
		aspect-ratio: 1200 / 166;
		background: url("../images/christmas/baubles.svg") no-repeat left top / 100% auto;
		height: auto;
		left: 0;
		width: auto;
	}
}

/* --- Footer: small pine trees standing on the line above the copyright --- */

/* 10_footer_desktop / 11_footer_nettbrett / 12_footer_mobil: the same three
   trees, scaled to about 80% on tablet and 65% on phone. */
.cq-christmas .cq-footer__legalrow {
	position: relative;
}

.cq-christmas .cq-footer__legalrow::before {
	background: url("../images/christmas/trees.svg") no-repeat center bottom / contain;
	bottom: 100%;
	content: "";
	height: 84px;
	pointer-events: none;
	position: absolute;
	right: 22px;
	width: 122px;
}

@media (max-width: 1023.98px) {
	.cq-christmas .cq-footer__legalrow::before {
		height: 67px;
		right: 9px;
		width: 98px;
	}
}

@media (max-width: 599.98px) {
	.cq-christmas .cq-footer__legalrow::before {
		height: 55px;
		right: 0;
		width: 80px;
	}
}

/* --- Snow crystals on dark CTA and form bands ---------------------------- */

/* assets/js/christmas.js marks dark CTA/contact bands with .cq-xmas-snow
   (+ --form when the band holds a form card) and the pseudo-element the band
   leaves free, and draws the mockup's crystals for the current size into
   --cq-xmas-snow, leaving out any that would land on content. They sit
   behind the content (z-index -1 inside an isolated band). */
.cq-xmas-snow {
	isolation: isolate;
}

.cq-xmas-snow--pos {
	position: relative;
}

.cq-xmas-snow--before::before,
.cq-xmas-snow--after::after {
	background: var(--cq-xmas-snow, none) no-repeat 0 0 / 100% 100%;
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
	z-index: -1;
}

@media print {
	.cq-christmas.home .cq-hero > .wp-block-columns::before,
	.cq-christmas .cq-footer__legalrow::before,
	.cq-xmas-snow--before::before,
	.cq-xmas-snow--after::after {
		display: none;
	}
}
