/* Color scene (template-parts/home/color-scene.php), ported from the guardrail
   sections/color-scene.liquid stylesheet. By default (no JavaScript, reduced motion, pinning
   off or a screen under 500px tall) the colours are a grid of captioned images.
   assets/js/home-color-scene.js adds .is-live: the track grows by one scroll length per colour
   and the stage sticks to the viewport while the background, image stack and outlined names
   follow the scroll. Per-instance values arrive as inline --hg-scene-* properties; the script
   also sets the active colour's --hg-scene-ink and --hg-scene-btn-text, and .is-light on a
   light stage (a colour whose text is darker than its swatch). */

.hg-scene {
	position: relative;
	background: var(--hg-scene-bg0, #33523d);
	color: var(--hg-scene-ink, #f2ede4);
}
/* Outlined names and dot rings: white, or the text colour on a light stage. */
.hg-scene.is-light { --hg-scene-line: var(--hg-scene-ink, #231f1b); }
.hg-scene__stage { padding: 56px 20px; }
.hg-scene__bg,
.hg-scene__words,
.hg-scene__dots,
.hg-scene__count,
.hg-scene__name { display: none; }
.hg-scene__eyebrow {
	margin: 0 0 10px;
	font-family: var(--hg-font-body);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.3em;
	line-height: 1.6;
	text-transform: uppercase;
	opacity: 0.8;
	overflow-wrap: anywhere;
}
.hg-scene .hg-scene__title {
	margin: 0;
	color: var(--hg-scene-ink, #f2ede4);
	font-size: 23.4px;
	letter-spacing: -0.025em;
	line-height: 0.95;
	overflow-wrap: anywhere;
}
.hg-scene__cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 50px;
	margin-top: 20px;
	padding: 0 24px;
	border-radius: 999px;
	background: var(--hg-scene-ink, #f2ede4);
	color: var(--hg-scene-btn-text, #0b0b0b);
	font-family: var(--hg-font-body);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.16em;
	line-height: 1.6;
	text-transform: uppercase;
	text-decoration: none;
	transition: none;
}
/* Ecomus recolours a:hover / a:active; the pill keeps its colours. */
.hg-scene__cta:hover,
.hg-scene__cta:active,
.hg-scene__cta:focus {
	color: var(--hg-scene-btn-text, #0b0b0b);
	text-decoration: none;
}
.hg-scene__cta:focus-visible,
.hg-scene__dot:focus-visible,
.hg-scene__link:focus-visible {
	outline: 2px solid var(--hg-scene-ink, #f2ede4);
	outline-offset: 3px;
}
.hg-scene__media {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin-top: 24px;
}
.hg-scene__img {
	position: relative;
	min-width: 0;
	margin: 0;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	border-radius: 16px;
	background: rgb(255 255 255 / 0.06);
}
.hg-scene__link {
	display: block;
	width: 100%;
	height: 100%;
	color: inherit;
}
.hg-scene__img img,
.hg-scene__placeholder {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	border-radius: 0;
	object-fit: cover;
}
.hg-scene__placeholder { background: currentColor; opacity: 0.35; }
.hg-scene__img figcaption {
	position: absolute;
	inset-inline-start: 12px;
	bottom: 10px;
	color: #fff;
	font-family: var(--hg-font-body);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.16em;
	line-height: 1.6;
	text-transform: uppercase;
	text-shadow: 0 1px 6px rgb(0 0 0 / 0.5);
	pointer-events: none;
}

/* Pinned scene: the track adds one scroll length per colour and the stage sticks for its height,
   below the sticky header so the dots, counter and photo stay in view. */
.hg-scene.is-live .hg-scene__track { height: calc(100svh + var(--hg-scene-n, 4) * var(--hg-scene-len, 80vh)); }
.hg-scene.is-live .hg-scene__stage {
	position: sticky;
	top: var(--hg-sticky-top, 0px);
	display: block;
	height: calc(100svh - var(--hg-sticky-top, 0px));
	padding: 0;
	overflow: hidden;
}
.hg-scene.is-live .hg-scene__bg {
	position: absolute;
	inset: 0;
	display: block;
	background: var(--hg-scene-bg, var(--hg-scene-bg0, #33523d));
	transition: background-color 0.8s;
}
.hg-scene.is-live .hg-scene__bg::after {
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at 50% 45%, rgb(255 255 255 / 0.14), rgb(0 0 0 / 0.45) 70%);
	content: "";
	transition: opacity 0.8s;
}
/* A light stage keeps its swatch to the edges: the shading would grey a white print and take the
   dark text there under 4.5:1. */
.hg-scene.is-live.is-light .hg-scene__bg::after { opacity: 0; }
.hg-scene--flat.is-live .hg-scene__bg::after { content: none; }
.hg-scene.is-live .hg-scene__words {
	position: absolute;
	inset: 0;
	display: block;
	pointer-events: none;
}
.hg-scene.is-live .hg-scene__word {
	position: absolute;
	top: 50%;
	left: 50%;
	color: transparent;
	font-family: var(--hg-font-heading);
	font-size: clamp(var(--hg-scene-word-min, 90px), var(--hg-scene-word-fluid, 26vw), var(--hg-scene-word-max, 420px));
	font-weight: 900;
	letter-spacing: -0.02em;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
	-webkit-text-stroke: var(--hg-scene-word-stroke, 2px) color-mix(in srgb, var(--hg-scene-line, #fff) var(--hg-scene-word-alpha, 55%), transparent);
	opacity: 0;
	transform: translate(-50%, -50%);
}
.hg-scene.is-live .hg-scene__media {
	position: absolute;
	top: 46%;
	left: 50%;
	display: block;
	width: min(var(--hg-scene-media-w-m, 70vw), var(--hg-scene-media-h-m, 52vh));
	margin: 0;
	aspect-ratio: 4 / 5;
	translate: -50% -50%;
}
.hg-scene.is-live .hg-scene__img {
	position: absolute;
	inset: 0;
	border-radius: var(--hg-scene-radius, 22px);
	box-shadow: 0 40px 80px rgb(0 0 0 / 0.45);
}
/* Own layers only while the stage is on or near the screen (.is-near, set by the script), so the
   rest of the page does not hold a stack of stage-sized layers. */
.hg-scene.is-live.is-near .hg-scene__word,
.hg-scene.is-live.is-near .hg-scene__img { will-change: transform, opacity; }
.hg-scene.is-live .hg-scene__img figcaption { display: none; }
/* The cookie notice (assets/css/newsletter.css) sits in the same bottom-start corner as the copy
   and would hide the button until it is answered. While it is open, newsletter.js sets
   --hg-cookie-offset (its height + 10px) and the copy rises 12px clear of it: the notice is 10px
   from the foot under 768px (above the dock when it shows), 20px from 768px up. */
.hg-scene.is-live { --hg-scene-lift: max(0px, var(--hg-cookie-offset, 0px) - 6px); }
.hg-scene.is-live .hg-scene__copy {
	position: absolute;
	inset-inline: 20px;
	bottom: calc(28px + var(--hg-scene-lift));
	z-index: 3;
}
.hg-scene.is-live .hg-scene__title { font-size: clamp(28px, 7vw, var(--hg-scene-title-max, 64px)); }
.hg-scene.is-live .hg-scene__name {
	display: block;
	margin: 6px 0 0;
	font-family: var(--hg-font-body);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.24em;
	line-height: 1.6;
	text-transform: uppercase;
	opacity: 0.85;
}
.hg-scene.is-live .hg-scene__count {
	position: absolute;
	top: 24px;
	inset-inline-end: 20px;
	z-index: 3;
	display: block;
	margin: 0;
	font-family: var(--hg-font-body);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.2em;
	line-height: 1.6;
}
.hg-scene.is-live .hg-scene__dots {
	position: absolute;
	top: 22px;
	inset-inline-start: 20px;
	z-index: 3;
	display: flex;
	gap: 10px;
}
/* Reset the Ecomus button look (padding, hover colours, shine pseudo-element). */
.hg-scene__dot {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 2px solid color-mix(in srgb, var(--hg-scene-line, #fff) 50%, transparent);
	border-radius: 50%;
	line-height: 1;
	cursor: pointer;
	transition: transform 0.3s, border-color 0.3s;
	appearance: none;
}
.hg-scene__dot:hover,
.hg-scene__dot:active { border-color: color-mix(in srgb, var(--hg-scene-line, #fff) 50%, transparent); }
.hg-scene__dot::after { content: none; }
.hg-scene__dot[aria-current="true"] {
	border-color: var(--hg-scene-line, #fff);
	transform: scale(1.2);
}
/* Below 768px the Ecomus mobile dock (67px, assets/css/drawers.css) covers the foot of the
   pinned stage: keep the copy and its button above it. */
@media (max-width: 767px) {
	.hg-scene.is-live { --hg-scene-lift: max(0px, var(--hg-cookie-offset, 0px) - 16px); }
	.ecomus-navigation-bar-show .hg-scene.is-live { --hg-scene-dock: calc(67px + env(safe-area-inset-bottom, 0px)); }
	.ecomus-navigation-bar-show .hg-scene.is-live .hg-scene__copy { bottom: calc(28px + var(--hg-scene-dock) + var(--hg-scene-lift)); }
}
/* Under 360px the back-to-top button (.hg-to-top, 40px, 20px from the edge) would cover the end
   of a long label such as "Build the Nutcracker set"; tighter tracking keeps it clear. */
@media (max-width: 359px) {
	.hg-scene__cta {
		padding: 0 18px;
		letter-spacing: 0.08em;
	}
}
/* Until the desktop layout, the photo is centred, and on short screens shrunk, in the space
   between the dots (60px) and the copy with its gap (--hg-scene-copy-space). The merchant's
   width and height settings stay the upper limits. */
@media (max-width: 989px) {
	.hg-scene.is-live { --hg-scene-copy-space: calc(220px + var(--hg-scene-lift)); }
	.hg-scene.is-live .hg-scene__media {
		top: calc(60px + (100% - var(--hg-scene-dock, 0px) - 60px - var(--hg-scene-copy-space)) / 2);
		width: min(
			var(--hg-scene-media-w-m, 70vw),
			var(--hg-scene-media-h-m, 52vh),
			max(120px, (100svh - var(--hg-sticky-top, 0px) - var(--hg-scene-dock, 0px) - 80px - var(--hg-scene-copy-space)) * 0.8)
		);
	}
}
@media (min-width: 768px) and (max-width: 989px) {
	.hg-scene.is-live { --hg-scene-copy-space: calc(270px + var(--hg-scene-lift)); }
}
@media (min-width: 768px) {
	.hg-scene .hg-scene__title { font-size: 34.5px; }
}
@media (min-width: 990px) {
	.hg-scene__stage { padding: 80px 40px; }
	.hg-scene__media { grid-template-columns: repeat(var(--hg-scene-cols, 4), minmax(0, 1fr)); }
	.hg-scene.is-live .hg-scene__media {
		top: 50%;
		width: min(var(--hg-scene-media-w, 36vw), var(--hg-scene-media-h, 58vh));
	}
	.hg-scene.is-live .hg-scene__copy {
		inset-inline: 48px auto;
		bottom: max(56px, calc(28px + var(--hg-scene-lift)));
		max-width: 360px;
	}
	/* Under the dot column rather than at the foot (the reference's bottom: 62px), where the
	   Ecomus back-to-top button sits and hides the total. */
	.hg-scene.is-live .hg-scene__count {
		top: calc(50% + (var(--hg-scene-n, 4) * 36px - 10px) / 2 + 20px);
		inset-inline-end: 48px;
		font-size: 14px;
	}
	.hg-scene.is-live .hg-scene__dots {
		top: 50%;
		inset-inline: auto 48px;
		flex-direction: column;
		translate: 0 -50%;
	}
}
@media (min-width: 1200px) {
	.hg-scene .hg-scene__title { font-size: 39.1px; }
}
@media (prefers-reduced-motion: reduce) {
	.hg-scene__dot,
	.hg-scene.is-live .hg-scene__bg,
	.hg-scene.is-live .hg-scene__bg::after { transition: none; }
}
