/*
 * Super Clean Christmas Banner.
 *
 * The layout is the handoff mock: the photograph is the background of the whole
 * banner, a brand bar sits on it, the copy sits in the left third under a
 * gradient, and the countdown strip is below.
 *
 * Modern CSS is used where it earns its place: container queries so the banner
 * adapts to the width it is given (not just the viewport), color-mix() for the
 * gradient so one colour drives it, clamp() for every size, aspect-ratio for the
 * inset, text-wrap: balance on the headline.
 *
 * Everything is scoped under .scsb so the theme cannot leak in.
 */

.scsb {
	--scsb-ink: #0a0c0c;
	--scsb-yellow: #e8bb3a;
	--scsb-paper: #f1f1f1;
	--scsb-white: #fff;
	--scsb-radius: 20px;
	--scsb-ring: #ffffff;

	box-sizing: border-box;
	width: 100%;
	max-width: min(1720px, calc(100% - 20px));
	margin: 24px auto;
	background: var(--scsb-white);
	color: var(--scsb-ink);
	border-radius: var(--scsb-radius);
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	text-align: left;
	-webkit-font-smoothing: antialiased;
	container-type: inline-size;
}

/* Full bleed: break out of the theme's content column and sit 10px from the
   window edge. 100% is the container, 100vw the window, so the difference is
   exactly the container's own gutter. Capped at 1720px on very wide screens. */
.scsb--bleed {
	/* !important because the theme's content-column rules also target direct
	   children of the content area, and they win on order without it. This is
	   scoped to the plugin's own element and overrides nothing else. */
	width: auto !important;
	max-width: min(1720px, 100vw) !important;
	margin-left: calc((100% - min(100vw, 1720px)) / 2 + 10px) !important;
	margin-right: calc((100% - min(100vw, 1720px)) / 2 + 10px) !important;
	margin-block: 20px !important;
}

.scsb *,
.scsb *::before,
.scsb *::after { box-sizing: border-box; }

.scsb img { max-width: 100%; height: auto; border: 0; border-radius: 0; box-shadow: none; }

/* :where() keeps the reset at zero specificity, so a component rule such as
   .scsb__cd-label always beats it. With plain .scsb p (0,1,1) this reset was
   silently wiping the label's padding. */
:where(.scsb) :where(p, ul, li, h2, figure, figcaption, nav) {
	margin: 0;
	padding: 0;
	list-style: none;
	font-family: inherit;
}

/* ---- Stage: gradient forward, photograph behind -------------------------- */

/* One background declaration, three layers, drawn nearest first:
   the top scrim, the left shade, then the photograph. This is the answer on
   https://stackoverflow.com/questions/47001581 — a gradient and an image are
   both background layers, and the one written first is the one in front.
   The image URL arrives as --scsb-image from PHP. */
.scsb__stage {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: clamp(480px, 40vw, 660px);
	overflow: hidden;
	isolation: isolate;
	background-color: var(--scsb-ink);
	background-image:
		linear-gradient(180deg, rgba(10, 12, 12, 0.78) 0%, rgba(10, 12, 12, 0.34) 14%, rgba(10, 12, 12, 0) 30%),
		linear-gradient(96deg, rgba(10, 12, 12, 0.97) 0%, rgba(10, 12, 12, 0.94) 26%, rgba(10, 12, 12, 0.74) 46%, rgba(10, 12, 12, 0.3) 62%, rgba(10, 12, 12, 0) 78%),
		var(--scsb-image, none);
	background-repeat: no-repeat;
	background-size: cover, cover, cover;
	background-position: center top, center, 50% 42%;
}

@supports (background: color-mix(in srgb, #000 50%, transparent)) {
	.scsb__stage {
		background-image:
			linear-gradient(180deg, color-mix(in srgb, var(--scsb-ink) 62%, transparent) 0%, color-mix(in srgb, var(--scsb-ink) 18%, transparent) 16%, transparent 32%),
			linear-gradient(96deg, color-mix(in srgb, var(--scsb-ink) 96%, transparent) 0%, color-mix(in srgb, var(--scsb-ink) 90%, transparent) 24%, color-mix(in srgb, var(--scsb-ink) 60%, transparent) 44%, color-mix(in srgb, var(--scsb-ink) 12%, transparent) 64%, transparent 78%),
			var(--scsb-image, none);
	}
}

/* ---- The brand bar ------------------------------------------------------ */

.scsb__bar {
	position: relative;
	z-index: 3;
	display: flex;
	align-items: center;
	gap: clamp(14px, 2vw, 26px);
	padding: 16px clamp(18px, 2.4vw, 30px);
}

.scsb__brand { display: inline-flex; align-items: center; text-decoration: none; border: 0; flex: 0 0 auto; }
.scsb__brand img { display: block; height: clamp(40px, 3.4vw, 54px); width: auto; }
.scsb__brand--text { color: var(--scsb-white); font-weight: 900; letter-spacing: -0.02em; }

.scsb__nav {
	display: flex;
	align-items: center;
	gap: clamp(14px, 1.7vw, 26px);
	flex: 1 1 auto;
	justify-content: center;
	flex-wrap: wrap;
}

.scsb__nav a {
	position: relative;
	color: rgba(255, 255, 255, 0.9);
	text-decoration: none;
	font-size: clamp(13px, 0.95vw, 15px);
	font-weight: 600;
	letter-spacing: 0.01em;
	white-space: nowrap;
	padding: 6px 0;
}

.scsb__nav a:hover,
.scsb__nav a:focus { color: var(--scsb-white); }

.scsb__nav a[aria-current="page"]::after,
.scsb__nav a:hover::after,
.scsb__nav a:focus-visible::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	border-radius: 3px;
	background: var(--scsb-yellow);
}

.scsb__call {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	flex: 0 0 auto;
	background: var(--scsb-yellow);
	color: var(--scsb-ink);
	text-decoration: none;
	font-weight: 800;
	font-size: clamp(13px, 0.95vw, 15px);
	line-height: 1;
	padding: 13px 18px;
	border-radius: 11px;
	transition: background-color 140ms ease, transform 140ms ease;
}

/* Yellow on yellow was no state at all. The pill inverts to ink on hover, and a
   1px white ring draws outside the box so nothing moves. White is brand; the
   colour is one variable — --scsb-ring — if it ever needs to change. */
.scsb__call:hover,
.scsb__call:focus-visible {
	background: var(--scsb-ink);
	color: var(--scsb-yellow);
	box-shadow: 0 0 0 1px var(--scsb-ring), 0 8px 20px rgba(0, 0, 0, 0.28);
	transform: translateY(-1px);
}

.scsb__call:active { transform: translateY(0); }
.scsb__call .scsb__svg { width: 16px; height: 16px; }

/* ---- The copy ----------------------------------------------------------- */

.scsb__content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	max-width: min(860px, 68%);
	padding: clamp(10px, 1.4vw, 18px) clamp(20px, 3.6vw, 56px) clamp(34px, 3.4vw, 52px);
}

.scsb__eyebrow {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--scsb-yellow);
	margin: 0 0 12px;
}

.scsb__headline {
	font-size: clamp(34px, 5vw, 76px);
	font-weight: 900;
	font-style: italic;
	line-height: 0.9;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	color: var(--scsb-white);
	text-wrap: balance;
	margin: 0 0 14px;
}

.scsb--upright .scsb__headline { font-style: normal; }

.scsb__line { display: block; }

.scsb__line--mark {
	display: inline-block;
	background: var(--scsb-yellow);
	color: var(--scsb-ink);
	padding: 0.02em 0.14em 0.08em;
	margin-top: 0.08em;
	font-style: inherit;
}

.scsb__support {
	font-size: clamp(16px, 1.4vw, 20px);
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.9);
	max-width: 38ch;
	margin: 0 0 clamp(16px, 1.8vw, 24px);
}

.scsb__list {
	display: grid;
	gap: clamp(8px, 0.9vw, 12px);
	margin: 0 0 clamp(20px, 2.2vw, 30px);
}

.scsb__list li {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: clamp(15px, 1.25vw, 18px);
	font-weight: 700;
	line-height: 1.25;
	color: var(--scsb-white);
}

.scsb__ico {
	display: inline-grid;
	place-items: center;
	flex: 0 0 auto;
	width: clamp(26px, 2.2vw, 32px);
	height: clamp(26px, 2.2vw, 32px);
	border-radius: 50%;
	border: 2px solid var(--scsb-yellow);
	color: var(--scsb-yellow);
}

.scsb__ico .scsb__svg { width: 55%; height: 55%; }
.scsb__amount { color: var(--scsb-yellow); font-weight: 900; }

.scsb__actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: clamp(16px, 1.8vw, 26px);
	margin: 0;
}

.scsb__button {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	background: var(--scsb-yellow);
	color: var(--scsb-ink) !important;
	text-decoration: none !important;
	font-weight: 900;
	font-size: clamp(16px, 1.25vw, 18px);
	line-height: 1;
	padding: clamp(15px, 1.3vw, 18px) clamp(22px, 1.8vw, 28px);
	border-radius: 13px;
	transition: background-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.scsb__button:hover,
.scsb__button:focus-visible {
	background: var(--scsb-ink);
	color: var(--scsb-yellow) !important;
	transform: translateY(-2px);
	box-shadow: 0 0 0 1px var(--scsb-yellow), 0 12px 26px rgba(0, 0, 0, 0.32);
}

.scsb__arrow { font-size: 1.1em; line-height: 0.7; }

.scsb__link {
	color: var(--scsb-white) !important;
	font-weight: 700;
	font-size: clamp(14px, 1.05vw, 16px);
	text-decoration: underline !important;
	text-underline-offset: 5px;
	text-decoration-thickness: 2px;
}

.scsb__link:hover,
.scsb__link:focus { color: var(--scsb-yellow) !important; }

/* The video sits in the copy column, under the buttons, so it never fights the
   before/after inset for the same corner. */
.scsb__play {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: clamp(14px, 1.6vw, 20px) 0 0;
	padding: 8px 14px 8px 8px;
	background: rgba(10, 12, 12, 0.45);
	color: var(--scsb-white);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 999px;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background-color 140ms ease, border-color 140ms ease;
}

.scsb__play:hover,
.scsb__play:focus { background: rgba(10, 12, 12, 0.72); border-color: var(--scsb-yellow); }

.scsb__play-icon {
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--scsb-yellow);
	color: var(--scsb-ink);
	font-size: 10px;
	padding-left: 2px;
}

/* ---- The before/after inset -------------------------------------------- */

.scsb__ba {
	position: absolute;
	z-index: 2;
	right: clamp(18px, 2.4vw, 32px);
	bottom: clamp(18px, 2.4vw, 30px);
	width: clamp(220px, 25vw, 380px);
	border-radius: 16px;
	overflow: hidden;
	border: 3px solid rgba(255, 255, 255, 0.92);
	box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
	background: #111;
}

.scsb__ba img {
	display: block;
	width: 100%;
	aspect-ratio: 380 / 150;
	object-fit: cover;
	object-position: 50% 55%;
}

.scsb__ba figcaption {
	position: absolute;
	inset: auto 0 0 0;
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 10px;
	background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
}

.scsb__ba-label {
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 6px 10px;
	border-radius: 6px;
}

.scsb__ba-label--before { background: rgba(10, 12, 12, 0.85); color: var(--scsb-white); }
.scsb__ba-label--after { background: var(--scsb-yellow); color: var(--scsb-ink); }

/* ---- The countdown strip ------------------------------------------------ */

.scsb__countdown {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
	align-items: stretch;
	margin: clamp(12px, 1.4vw, 18px) clamp(6px, 0.9vw, 12px) clamp(16px, 1.8vw, 24px);
	border-radius: 15px;
	overflow: hidden;
	gap: 0;
}

.scsb__cd-label {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--scsb-yellow);
	color: var(--scsb-ink);
	font-size: clamp(15px, 1.5vw, 21px);
	font-weight: 800;
	line-height: 1.25;
	margin: 0;
	padding: clamp(16px, 1.5vw, 24px) clamp(18px, 1.8vw, 28px);
	/* The icon sat too close to the panel's edge: 24px reads right at every width. */
	padding-left: 24px;
}

.scsb__cd-label .scsb__svg { width: clamp(20px, 1.7vw, 26px); height: auto; flex: 0 0 auto; }

.scsb__clock {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	align-items: center;
	background: var(--scsb-ink);
	color: var(--scsb-white);
}

.scsb__unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: clamp(14px, 1.2vw, 20px) 8px;
	border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.scsb__unit:first-child { border-left: 0; }

.scsb__num {
	font-size: clamp(26px, 3vw, 44px);
	font-weight: 900;
	line-height: 1;
	letter-spacing: 0.01em;
	font-variant-numeric: tabular-nums;
}

.scsb__lab {
	font-size: clamp(9px, 0.75vw, 11px);
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.6);
}

/* ---- Video dialog ------------------------------------------------------- */

.scsb__dialog {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: 24px;
	background: rgba(6, 7, 7, 0.92);
	backdrop-filter: blur(6px);
}

.scsb__dialog[hidden] { display: none; }

.scsb__dialog-inner { position: relative; width: min(960px, 100%); }

.scsb__dialog-frame {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 14px;
	overflow: hidden;
}

.scsb__dialog-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.scsb__dialog-close {
	position: absolute;
	top: -48px;
	right: 0;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 50%;
	background: transparent;
	color: var(--scsb-white);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.scsb__dialog-close:hover,
.scsb__dialog-close:focus { border-color: var(--scsb-yellow); color: var(--scsb-yellow); }

/* ---- Closed note -------------------------------------------------------- */

.scsb--closed {
	background: var(--scsb-paper);
	color: var(--scsb-ink);
	border-left: 6px solid var(--scsb-yellow);
	border-radius: 12px;
}

.scsb__closed { padding: 22px 26px; font-size: 16px; line-height: 1.5; max-width: 70ch; }

/* ---- Focus, motion ------------------------------------------------------ */

.scsb a:focus-visible,
.scsb button:focus-visible {
	outline: 3px solid var(--scsb-white);
	outline-offset: 3px;
	border-radius: 8px;
}

/* The keyboard focus ring sits outside the inverted hover fill; it must not
   repaint the button yellow again. */
.scsb__button:focus-visible,
.scsb__call:focus-visible { outline-color: var(--scsb-white); outline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
	.scsb * { transition: none !important; animation: none !important; }
}

/* ---- Narrow: the banner adapts to the column it is given, not just the
   viewport, so it behaves the same inside a page builder ------------------ */

@container (max-width: 900px) {
	/* Stacked, the copy is the height of the banner, so the stage grows with it
	   and the photograph stays behind the whole block. */
	.scsb__stage { min-height: auto; }
	.scsb__nav { display: none; }
	.scsb__content { max-width: 100%; padding: clamp(96px, 26cqw, 150px) 22px 30px; align-self: stretch; }
	.scsb__headline { font-size: clamp(32px, 8.6cqw, 56px); }
	.scsb__ba { display: none; }
	.scsb__countdown { grid-template-columns: minmax(0, 1fr); }
	.scsb__cd-label { font-size: 15px; padding: 14px 18px; padding-left: 24px; }
	.scsb__stage {
		background-image:
			linear-gradient(180deg, rgba(10, 12, 12, 0.66) 0%, rgba(10, 12, 12, 0.28) 14%, rgba(10, 12, 12, 0) 26%),
			linear-gradient(180deg, rgba(10, 12, 12, 0.12) 26%, rgba(10, 12, 12, 0.62) 46%, rgba(10, 12, 12, 0.93) 66%, rgba(10, 12, 12, 0.97) 100%),
			var(--scsb-image, none);
		background-position: center top, center, 52% 34%;
	}
}

@container (max-width: 560px) {
	.scsb { border-radius: 14px; }
	.scsb__stage { min-height: auto; }
	.scsb__bar { padding: 12px 16px; }
	.scsb__brand img { height: 38px; }
	.scsb__call { padding: 11px 14px; }
	.scsb__content { padding: clamp(84px, 24cqw, 120px) 18px 24px; }
	.scsb__eyebrow { font-size: 11px; margin-bottom: 8px; }
	.scsb__headline { font-size: clamp(30px, 9.6cqw, 42px); }
	.scsb__list li { gap: 11px; font-size: 15px; }
	.scsb__actions { gap: 14px; }
	.scsb__button { width: 100%; justify-content: center; }
	.scsb__unit { padding: 12px 4px; }
	.scsb__num { font-size: 24px; }
	.scsb__lab { font-size: 9px; letter-spacing: 0.12em; }
}

/* Browsers without container queries get the viewport breakpoint instead. */
@supports not (container-type: inline-size) {
	@media (max-width: 900px) {
		.scsb__stage { min-height: 600px; }
		.scsb__nav { display: none; }
		.scsb__content { max-width: 100%; padding: 18px 24px 34px; }
		.scsb__ba { display: none; }
		.scsb__countdown { grid-template-columns: minmax(0, 1fr); }
	}
}

@media print {
	.scsb__dialog, .scsb__play { display: none !important; }
}
