/*
 * Base styles.
 *
 * theme.json supplies the design tokens as --wp--preset--* custom properties.
 * This file covers only what sits underneath every page: fonts, document
 * defaults, focus visibility, long-form prose and the contact form.
 *
 * Site chrome lives in chrome.css; page sections live in sections.css.
 */

/* ---------------------------------------------------------------- fonts -- */
/*
 * The developer's pairing: Poppins for headings, Inter for body text, at the
 * weights their layout.js loads (Poppins 400-700, Inter 400-600). Self-hosted
 * latin subsets from Fontsource (OFL-1.1), so the site makes no third-party
 * requests. Heavier requests (font-extrabold / font-black) resolve to the
 * heaviest face shipped, exactly as they do on the reference site.
 */
@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/poppins-400.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../fonts/poppins-500.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/poppins-600.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/poppins-700.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* One variable file covers every Inter weight the site uses. */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url("../fonts/inter-variable.woff2") format("woff2-variations"),
		url("../fonts/inter-variable.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------- tokens -- */
/*
 * Shorthands for the theme.json palette plus the values every stylesheet
 * needs that a palette cannot express (RGB triplets for alpha tints, the
 * fixed-header offset). Use these instead of literal hex values:
 *
 *   var(--gvd-accent)        #0A78B1   brand accent
 *   var(--gvd-accent-hover)  #086190   accent hover / Tailwind blue-700
 *   var(--gvd-accent-rgb)    10,120,177  →  rgba(var(--gvd-accent-rgb), .2)
 *   var(--gvd-abyss)         #070E20   darker-than-primary hero navy
 *   var(--gvd-primary)       #0B1B3D
 *   var(--gvd-font-mono)     "font-mono" eyebrow pills (renders as the body face)
 *   var(--gvd-header-offset) height of the fixed header (chrome.css sets it)
 */
:root {
	--gvd-primary: var(--wp--preset--color--primary, #0B1B3D);
	--gvd-accent: var(--wp--preset--color--accent, #0A78B1);
	--gvd-accent-hover: var(--wp--preset--color--accent-hover, #086190);
	--gvd-accent-rgb: 10, 120, 177;
	--gvd-accent-hover-rgb: 8, 97, 144;
	--gvd-abyss: var(--wp--preset--color--abyss, #070E20);
	--gvd-abyss-rgb: 7, 14, 32;
	/*
	 * The WT's `font-mono` points at an undefined Geist Mono variable, so
	 * their pills actually render in the body face. Match what ships.
	 */
	--gvd-font-mono: var(--wp--preset--font-family--body, "Inter", sans-serif);
	--gvd-header-offset: 100px;
}

/* --------------------------------------------------------------- basics -- */

/*
 * Border-box everywhere. WordPress's block reset does not set this globally,
 * and the layout relies on padding sitting inside declared widths.
 */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

/*
 * Tailwind's preflight base: 16px / 24px at every width. theme.json's fluid
 * "medium" preset (14-16px) shrank every inherited size on phones.
 */
html body {
	font-size: 1rem;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

/*
 * Form controls ignore the page font by default (the language switcher
 * rendered in Arial). Tailwind's preflight makes them inherit; match it.
 */
button, input, select, textarea { font-family: inherit; }

/* Keyboard users must always be able to see where they are. */
:where(a, button, input, textarea, select, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Inline SVG icons inherit their colour from the element around them. */
.gvd-svg { flex-shrink: 0; }

/* -------------------------------------------------------- scroll reveal -- */
/*
 * Progressive enhancement: elements only start hidden once theme.js confirms
 * scripting is available, so a JS failure can never leave content invisible.
 */
.gvd-js .gvd-reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.gvd-js .gvd-reveal.is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.gvd-js .gvd-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ------------------------------------------------------------------ form -- */

.gvd-form__row {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: 1fr;
}

@media (min-width: 640px) {
	.gvd-form__row { grid-template-columns: 1fr 1fr; }
}

.gvd-form__field {
	display: grid;
	gap: 0.5rem;
	margin: 0 0 1.25rem;
}

.gvd-form__field label {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--wp--preset--color--text);
}

.gvd-form__field input,
.gvd-form__field textarea {
	width: 100%;
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.625rem;
	background: #fff;
	font: inherit;
	font-size: 0.95rem;
	color: var(--wp--preset--color--text);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gvd-form__field input:focus,
.gvd-form__field textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--accent);
	box-shadow: 0 0 0 3px rgba(var(--gvd-accent-rgb), 0.15);
}

.gvd-form__field textarea { resize: vertical; min-height: 8rem; }

.gvd-form__actions button { width: 100%; }

/*
 * The honeypot must be unreachable for humans but not display:none, which
 * some bots detect. Position it out of the viewport instead.
 */
.gvd-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.gvd-form__notice {
	margin-bottom: 1.5rem;
	padding: 0.9rem 1rem;
	border: 1px solid;
	border-radius: 0.625rem;
	font-size: 0.9rem;
}


.gvd-form__notice--error {
	background: #fef2f2;
	border-color: #fecaca;
	color: #991b1b;
}

/* ------------------------------------------------------------ thank you -- */

.gvd-thanks {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-block: 1.5rem;
	text-align: center;
}

.gvd-thanks__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.5rem;
	height: 3.5rem;
	margin-bottom: 1.25rem;
	border-radius: 9999px;
	background: #ecfdf5;
	color: #059669;
}

.gvd-thanks__title {
	margin: 0 0 0.75rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--wp--preset--color--text);
}

.gvd-thanks__text {
	max-width: 26rem;
	margin: 0 0 0.75rem;
	color: var(--wp--preset--color--text-muted);
	font-size: 0.9375rem;
	line-height: 1.65;
}

.gvd-thanks__text--muted { font-size: 0.875rem; }

.gvd-thanks__actions { margin: 1.25rem 0 0; }

/* ----------------------------------------------------------------- prose -- */

.gvd-prose :where(h2) { margin-top: 2.5rem; }

.gvd-prose :where(p, li) { color: var(--wp--preset--color--text-muted); }

.gvd-prose :where(table) {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.925rem;
}

.gvd-prose :where(th, td) {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
	text-align: left;
}

.gvd-prose :where(th) {
	background: var(--wp--preset--color--secondary);
	font-weight: 600;
	color: var(--wp--preset--color--text);
}

/* Wide content must scroll inside itself, never the page body. */
.gvd-prose :where(table, pre) {
	display: block;
	overflow-x: auto;
	max-width: 100%;
}
