/*!
 * jQuery ClassyCountdown
 * vox.SPACE
 *
 * Written by voxspace AT riseup.net
 * Licensed under the MIT license https://vox.SPACE/LICENSE-MIT
 * Version 1.1.0
 *
 */

/* Customized version of the jquery.classycountdown.css. */

/* Revised: November 27, 2026 3:00 PM */

/* index.cfm only loads Montserrat 400; the countdown needs the heavier weights. */

@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&display=swap");

/* Countdown element.

index.js appends div.countdown to div.header-banner, which has 20px of side padding and holds
two banners in a table (10px of padding on each side of the gap), so the left banner is
"50% - 30px" wide and starts 20px in. The box is placed as a fraction of that banner, using the
mockups (which were drawn at the art's native size), so it stays over the same spot at any width.

All sizes inside the box are in container query units (cqw = 1% of the box's width), so the
text scales with the box. */

div.countdown {
	--cd-banner: (50% - 30px);			/* Width of the left banner. */
	--cd-left: 0.547;					/* Box left edge, as a fraction of the banner. */
	--cd-width: 0.416;					/* Box width, as a fraction of the banner. */
	--cd-shift: -2px;					/* Nudge to center on the image (its margins aren't symmetric). */
	--cd-columns: 4;
	--cd-pitch: 22.7cqw;				/* Distance between the centers of the numbers. */
	--cd-number: 7.4cqw;
	--cd-label: 4cqw;
	--cd-label-gap: 3cqw;
	--cd-row-gap: 0;
	--cd-message: 4.5cqw;
	--cd-message-gap: 3.3cqw;
	--cd-radius: 1.6cqw;
	--cd-nudge: 0.6cqw;					/* Lifts the text slightly above center, as in the mockups. */
	
	display: none;						/* index.js shows it. */
	position: absolute;
	top: calc(50% + var(--cd-shift));
	left: calc(20px + var(--cd-banner) * var(--cd-left));
	-webkit-transform: translateY(-50%);
	transform: translateY(-50%);
	width: calc(var(--cd-banner) * var(--cd-width));
	aspect-ratio: 321 / 85;
	container-type: inline-size;
	z-index: 1;
	pointer-events: none;				/* Let clicks reach the banner link underneath. */
}

div.countdown .ClassyCountdown-wrapper {
	box-sizing: border-box;
	display: -webkit-box;
	display: flex;
	-webkit-box-orient: vertical;
	flex-direction: column;
	-webkit-box-align: center;
	align-items: center;
	-webkit-box-pack: center;
	justify-content: center;
	height: 100%;
	background: #f2f7f9;
	border: 1px solid #dfe1e2;
	border-radius: var(--cd-radius);
	padding-bottom: var(--cd-nudge);
	font-family: "Montserrat", sans-serif;
	line-height: 1;
}

div.countdown .ClassyCountdown-units {
	display: grid;
	grid-template-columns: repeat(var(--cd-columns), var(--cd-pitch));
	row-gap: var(--cd-row-gap);
}

div.countdown .ClassyCountdown-unit {
	display: -webkit-box;
	display: flex;
	-webkit-box-orient: vertical;
	flex-direction: column;
	-webkit-box-align: center;
	align-items: center;
}

/* The numbers (e.g. "01"). */

div.countdown .ClassyCountdown-value {
	color: #3d7a99;
	font-size: var(--cd-number);
	font-weight: 700;
	font-variant-numeric: tabular-nums;		/* Keeps the digits from shifting as they change. */
}

/* The labels (e.g. "HRS."). The left padding balances the letter-spacing after the last letter. */

div.countdown .ClassyCountdown-label {
	margin-top: var(--cd-label-gap);
	padding-left: 0.12em;
	color: #848787;
	font-size: var(--cd-label);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* "Limited Time Offer!" (desktop only; the phone art already has it). */

div.countdown .ClassyCountdown-message {
	margin-top: var(--cd-message-gap);
	color: #f03340;
	font-size: var(--cd-message);
	font-weight: 600;
	letter-spacing: 0.05em;
	white-space: nowrap;
}

/* Tablets and small desktops: the banner image's top margin drops from 14px to 4px. */

@media (max-width: 1024px) {
	
	div.countdown {
		--cd-shift: -4px;
	}
	
}

/* Phone (landscape art): 4 across, no message. */

@media (orientation: landscape) {
	
	div.countdown.ClassyCountdown-phone {
		--cd-left: 0.561;
		--cd-width: 0.404;
		--cd-pitch: 24.6cqw;
		--cd-number: 10cqw;
		--cd-label: 5.4cqw;
		--cd-label-gap: 4.4cqw;
		--cd-radius: 2cqw;
		--cd-nudge: 2.3cqw;
		
		aspect-ratio: 175 / 57;
	}
	
	div.countdown.ClassyCountdown-phone .ClassyCountdown-message {
		display: none;
	}
	
}

/* Phone (portrait art): 2 x 2, no message. */

@media (orientation: portrait) {
	
	div.countdown.ClassyCountdown-phone {
		--cd-left: 0.563;
		--cd-width: 0.391;
		--cd-columns: 2;
		--cd-pitch: 37.6cqw;
		--cd-number: 15.4cqw;
		--cd-label: 7.6cqw;
		--cd-label-gap: 2cqw;
		--cd-row-gap: 7.2cqw;
		--cd-radius: 4cqw;
		--cd-nudge: 2.2cqw;
		
		aspect-ratio: 93 / 70;
	}
	
	div.countdown.ClassyCountdown-phone .ClassyCountdown-message {
		display: none;
	}
	
}

/* Phones narrower than 512px: the banner image has no top margin. */

@media (max-width: 512px) {
	
	div.countdown {
		--cd-shift: -6px;
	}
	
}
