/*
 * WDE Blocks, design tokens and component styles.
 *
 * Every value here is MEASURED off the design frame (pixel scan with PIL), never
 * estimated. Replace the token values below with the project's own on day one.
 *
 * After any bulk edit: python3 scripts/css-dedupe.py && python3 scripts/css-unshadow.py
 * (always both, in that order), then bump WDE_BLOCKS_VERSION.
 */

:root {
	/* Colour. Placeholders until the design lands. */
	--wde-brand: #1F2A44;
	--wde-brand-dark: #141B2D;
	--wde-accent: #E53935;
	--wde-accent-dark: #B71C1C;
	--wde-ink: #1A1A1A;
	--wde-grey: #5A6472;
	--wde-wash: #F5F7FA;
	--wde-line: #DDE3EA;
	--wde-white: #FFFFFF;

	/* Type. Only set a font here once the design names one. */
	--fs-h1: clamp(32px, 3.6vw, 56px);
	--fs-h2: clamp(26px, 2.4vw, 40px);
	--fs-h3: clamp(20px, 1.4vw, 24px);
	--fs-lead: 18px;
	--fs-body: 16px;

	/* Shape and layout */
	--wde-radius: 20px;
	--wde-radius-sm: 12px;
	--wde-container: 1200px;
	--wde-gutter: 15px;
	--wde-section-y: clamp(56px, 6vw, 100px);
}

/* ---------------------------------------------------------------- layout */

.wde-container {
	width: 100%;
	max-width: calc(var(--wde-container) + 2 * var(--wde-gutter));
	margin: 0 auto;
	padding: 0 var(--wde-gutter);
}

.wde-band--white { background: var(--wde-white); }
.wde-band--wash  { background: var(--wde-wash); }
.wde-band--brand { background: var(--wde-brand); color: var(--wde-white); }

/* ---------------------------------------------------------------- buttons */

.wde-buttons { display: flex; flex-wrap: wrap; gap: 14px; }

.wde-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 0 28px;
	border-radius: 999px;
	font-weight: 600;
	text-decoration: none;
	transition: transform .15s ease, background-color .15s ease;
}
.wde-btn:hover { transform: translateY(-1px); }
.wde-btn--primary { background: var(--wde-maint-accent, var(--wde-accent)); color: var(--wde-white); }
.wde-btn--primary:hover { background: var(--wde-accent-dark); color: var(--wde-white); }
.wde-btn--plain { background: transparent; color: inherit; border: 1px solid currentColor; }

/* ---------------------------------------------------------------- maintenance */

.wde-maint {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 24px 64px;
	background:
		radial-gradient(900px 420px at 50% 112%, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 70%),
		var(--wde-maint-bg, var(--wde-brand));
	color: var(--wde-white);
	text-align: center;
}
.wde-maint__inner { max-width: 620px; width: 100%; }
/* A white plate behind the logo, so a logo drawn for a light ground still reads. Remove
   the background if the logo supplied is a white version. */
.wde-maint__logo-plate {
	display: inline-block;
	margin: 0 auto 32px;
	padding: 22px 30px;
	border-radius: var(--wde-radius);
	background: var(--wde-white);
}
.wde-maint__logo { display: block; width: min(280px, 64vw); height: auto; }
.wde-maint__title { margin: 0 0 14px; font-size: clamp(28px, 5vw, 44px); line-height: 1.2; color: var(--wde-white); }
.wde-maint__text { margin: 0 0 30px; font-size: var(--fs-lead); line-height: 1.6; opacity: .85; }
.wde-maint__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.wde-maint .wde-btn--plain { color: var(--wde-white); }

@media (max-width: 549px) {
	.wde-maint__actions .wde-btn { flex: 1 1 100%; }
}

/* ============================================ reveal on scroll */
/*
 * Start states only exist once the script says it is running, so the page is fully
 * visible without JavaScript and to crawlers. transform and opacity only.
 */
.wde-anim-ready [data-wde-anim] {
	opacity: 0;
	transition:
		opacity .8s cubic-bezier(.22, .61, .36, 1) var(--wde-anim-delay, 0ms),
		transform .9s cubic-bezier(.22, .61, .36, 1) var(--wde-anim-delay, 0ms);
	will-change: opacity, transform;
}
.wde-anim-ready [data-wde-anim="fade-up"]    { transform: translateY(40px); }
.wde-anim-ready [data-wde-anim="fade-down"]  { transform: translateY(-40px); }
.wde-anim-ready [data-wde-anim="fade-left"]  { transform: translateX(90px); }
.wde-anim-ready [data-wde-anim="fade-right"] { transform: translateX(-90px); }
.wde-anim-ready [data-wde-anim="zoom"]       { transform: scale(.94); }
.wde-anim-ready [data-wde-anim].is-in { opacity: 1; transform: none; will-change: auto; }

.ux-builder-iframe [data-wde-anim] { opacity: 1 !important; transform: none !important; }

@media (prefers-reduced-motion: reduce) {
	.wde-anim-ready [data-wde-anim] { opacity: 1; transform: none; transition: none; }
}
