/*
 * Shared design tokens + primitives for the Zenas landing page.
 * One breakpoint: <= 768px is mobile (the default here), >= 769px is tablet.
 * Type is fluid on tablet (design is 1366px wide); letter-spacing is em.
 */
:root {
	/* Colours are defined once, in the theme.json palette. */
	--zenas-burgundy: var(--wp--preset--color--burgundy);
	--zenas-light-blue: var(--wp--preset--color--light-blue);
	--zenas-light-gray: var(--wp--preset--color--light-gray);
	--zenas-white: var(--wp--preset--color--white);
	--zenas-error: var(--wp--preset--color--error);
	--zenas-burgundy-30: color-mix(in srgb, var(--zenas-burgundy) 30%, transparent);
	--zenas-light-blue-30: color-mix(in srgb, var(--zenas-light-blue) 30%, transparent);
	--zenas-font: Polymath, system-ui, sans-serif;

	--zenas-pad-x: 1.25rem;

	/* Mobile type (Figma "Mobile/*") */
	--zenas-fs-display: 3.25rem;
	--zenas-lh-display: 1;
	--zenas-fs-subhead: 1.375rem;
	--zenas-lh-subhead: 1.2727;
	--zenas-ls-subhead: 0;
	--zenas-fs-body: 1.125rem;
	--zenas-lh-body: 1.2222;
	--zenas-ls-body: -0.01em;
	--zenas-fs-card-title: 2.75rem;
	--zenas-fs-card-body: 1.125rem;
	--zenas-lh-card-body: 1.2222;
	--zenas-ls-card-body: -0.01em;
	--zenas-fs-label: 1.375rem;
	--zenas-fs-small: 0.875rem;
	--zenas-fs-legal: 0.6875rem;
	--zenas-fs-eyebrow: 0.625rem;
	--zenas-lh-legal: 1.2;
	--zenas-fs-button: 0.9375rem;
	--zenas-lh-button: 1.4667;
	--zenas-ls-button: 0.05em;
}

@media (min-width: 769px) {
	:root {
		--zenas-pad-x: 5rem;

		/* Tablet type (Figma "Tablet/*"), fluid between 769px and 1366px */
		--zenas-fs-display: clamp(3.5rem, 7.32vw, 6.25rem);
		--zenas-fs-subhead: clamp(1.5rem, 2.343vw, 2rem);
		--zenas-lh-subhead: 1.3125;
		--zenas-ls-subhead: -0.02em;
		--zenas-fs-body: clamp(1.125rem, 1.61vw, 1.375rem);
		--zenas-lh-body: 1.3636;
		--zenas-ls-body: 0;
		--zenas-fs-card-title: clamp(2.5rem, 3.66vw, 3.125rem);
		--zenas-fs-card-body: clamp(1.25rem, 1.757vw, 1.5rem);
		--zenas-lh-card-body: 1.3333;
		--zenas-ls-card-body: 0;
		--zenas-fs-legal: 0.625rem;
		--zenas-lh-legal: 1.2;
	}
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

/* Cross-fade between pages (form submit -> thank-you -> return home). Ignored by browsers without support. */
@media (prefers-reduced-motion: no-preference) {
	@view-transition {
		navigation: auto;
	}

	::view-transition-old(root),
	::view-transition-new(root) {
		animation-duration: 0.4s;
	}
}

/* Section wrappers: full width, no default block margins. */
.zenas-section {
	box-sizing: border-box;
	margin: 0;
	max-width: none;
	font-family: var(--zenas-font);
}

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

.zenas-section p {
	margin: 0;
}

/* Bold from the editor's formatting menu: Bold (700), also inside the light headlines (otherwise "bolder" only reaches Regular). */
.zenas-section strong,
.zenas-section b {
	font-weight: 700;
}

.zenas-section sup,
.zenas-section sub {
	line-height: 0;
}

/* Headlines/subheads use Polymath's capital-I character variant. */
.zenas-cv01 {
	font-feature-settings: "cv01" 1;
}

/* Pill button (hero CTA, form submit, return to home). */
.zenas-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.625rem 2.5rem;
	border: 0;
	border-radius: 50px;
	background: var(--zenas-burgundy);
	color: var(--zenas-white);
	font: 700 var(--zenas-fs-button) / var(--zenas-lh-button) var(--zenas-font);
	letter-spacing: var(--zenas-ls-button);
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

/* Figma button states: hover, focus (3px burgundy-30 ring), pressed. */
.zenas-button:hover {
	background: var(--zenas-light-blue);
	color: var(--zenas-burgundy);
}

.zenas-section .zenas-button:focus-visible {
	outline: 3px solid var(--zenas-burgundy-30);
	outline-offset: 0;
}

.zenas-button:active,
.zenas-section .zenas-button:active:focus-visible {
	background: var(--zenas-light-blue);
	color: var(--zenas-burgundy);
	outline: 3px solid var(--zenas-light-blue-30);
	outline-offset: 0;
}

.zenas-section a:focus-visible,
.zenas-section button:focus-visible,
.zenas-section [tabindex]:focus-visible {
	outline: 3px solid var(--zenas-burgundy);
	outline-offset: 3px;
}

.zenas-footer a:focus-visible {
	outline-color: var(--zenas-white);
}

.zenas-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}
