/* Self-hosted project fonts. Grift includes wght 100–900 and ital 0–1. */
@font-face {
	font-family: "Grift Variable";
	src: url("../fonts/grift/Grift-Variable.ttf") format("truetype");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Grift Variable";
	src: url("../fonts/grift/Grift-Variable.ttf") format("truetype");
	font-weight: 100 900;
	font-style: italic;
	font-display: swap;
}

:root {
	--magna-font-sans: "Grift Variable", sans-serif;
	--magna-weight-regular: 400;
	--magna-weight-bold: 700;

	/* V18 working palette; page/section backgrounds may override these. */
	--magna-dark: #000000;
	--magna-ivory: #fdfcf9;
	--magna-signal-yellow: #fff84c;
	--magna-background: var(--magna-ivory);
	--magna-text: var(--magna-dark);

	/* Provisional foundation values, pending reference calibration.
	 * These do not define an editorial type scale or apply a page layout.
	 */
	--magna-body-size: 1rem;
	--magna-body-leading: 1.5;
	--magna-space-1: 0.25rem;
	--magna-space-2: 0.5rem;
	--magna-space-3: 1rem;
	--magna-space-4: 1.5rem;
	--magna-space-5: 2rem;
	--magna-space-6: 3rem;
	--magna-space-7: 4rem;
	/* 1rem mobile floor; fluid tablet ramp; 6.75% desktop/laptop margins. */
	--magna-page-gutter: clamp(1rem, calc(10.5vw - 2.5rem), 6.75vw);
	--magna-content-frame: calc(100% - var(--magna-page-gutter) - var(--magna-page-gutter));
	/* Provisional width limits; calibrate against approved references later. */
	--magna-content-max: 100rem;
	--magna-editorial-measure: 65ch;
	--magna-duration-fast: 150ms;
	--magna-duration-base: 250ms;
	--magna-ease: cubic-bezier(0.2, 0, 0.2, 1);
}

/* Mobile frame calibrated to the reference; tablet and larger retain the fluid rule. */
@media (max-width: 40rem) {
	:root {
		--magna-page-gutter: 2rem;
	}
}

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

body {
	margin: 0;
	background-color: var(--magna-background);
	color: var(--magna-text);
	font-family: var(--magna-font-sans);
	font-size: var(--magna-body-size);
	font-weight: var(--magna-weight-regular);
	line-height: var(--magna-body-leading);
	font-synthesis: none;
}

img,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Preserve native underlines and focus indication. */
a {
	color: inherit;
}

/*
 * Layout contract:
 * - Keep the site shell at the full available page width.
 * - Place content frames directly in the shell or a full-bleed wrapper.
 * - Do not nest frames: each frame applies the shared page gutters once.
 * - Place editorial measures inside a frame; alignment remains with the parent.
 * - Full-bleed wrappers belong outside frames, with framed content inside.
 *   They fill their parent without viewport-width breakout or overflow clipping.
 */
.magna-site-shell {
	inline-size: 100%;
	min-inline-size: 0;
}

.magna-content-frame {
	inline-size: max(0px, var(--magna-content-frame));
	max-inline-size: var(--magna-content-max);
	margin-inline: auto;
	min-inline-size: 0;
}

.magna-full-bleed {
	inline-size: 100%;
	min-inline-size: 0;
}

.magna-editorial-measure {
	inline-size: 100%;
	max-inline-size: var(--magna-editorial-measure);
	min-inline-size: 0;
}

/* Shared large CTA proportions on phones; desktop and tablet remain unchanged. */
@media (max-width: 639px) {
	body .magna-work-scope-cta,
	body .magna-home-final-cta a {
		min-block-size: 5.75rem;
		padding-block: .625rem;
	}
}

/* Future motion must respect this preference as well as these tokens. */
@media (prefers-reduced-motion: reduce) {
	:root {
		--magna-duration-fast: 0ms;
		--magna-duration-base: 0ms;
	}

	html {
		scroll-behavior: auto;
	}
}
