/*
 * Global reset and design tokens.
 *
 * Only truly global rules belong here: custom properties, box-sizing reset,
 * base typography and focus styles. Layout and component rules live in
 * layout.css / components.css (added in later phases) so this file stays
 * small and cacheable independently.
 */

:root {
	/* Brand colors — overridable later via the Customizer/theme settings (Phase 3/7). */
	--color-primary: #d71920;
	--color-primary-dark: #a81319;
	--color-secondary: #111111;
	--color-text: #17181a;
	--color-text-muted: #5f6470;
	--color-background: #ffffff;
	--color-surface: #f6f7f9;
	--color-surface-alt: #eef0f3;
	--color-border: #e5e7eb;
	/* Meets WCAG 1.4.11 non-text contrast (3:1 against white) — used for
	   actual interactive control boundaries (inputs, buttons), not the
	   decorative dividers --color-border is for. Verified: #949494 on
	   #ffffff = 3.03:1. */
	--color-border-strong: #949494;
	--color-link: var(--color-primary);
	--color-focus: #0b63ce;

	/* Typography — body/UI stays on the system stack for performance (spec
	   §38); headings use one editorial display serif (enqueued in
	   inc/enqueue.php) with the same system stack as a fallback, so text
	   is never invisible/blocked on the webfont. This "serif headline /
	   sans body" pairing mirrors BBC News, the New York Times and other
	   large newsrooms rather than a generic single-sans template look. */
	--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--font-heading: "Source Serif 4", Georgia, "Times New Roman", var(--font-body);
	--font-size-base: 16px;
	--line-height-base: 1.65;

	/* Layout. Sharper corners than a typical SaaS template — closer to the
	   hairline/near-square treatment used by serious editorial sites. */
	--container-width: 1240px;
	--gutter: 1rem;
	--radius: 4px;
	--radius-sm: 3px;
	--radius-pill: 999px;

	/* Elevation + motion — used consistently on cards/buttons/inputs so the
	   whole theme reads as one system rather than ad hoc per-component values. */
	--shadow-sm: 0 1px 2px rgb(15 23 42 / 6%);
	--shadow-md: 0 6px 16px -4px rgb(15 23 42 / 12%), 0 2px 4px -2px rgb(15 23 42 / 8%);
	--shadow-lg: 0 20px 40px -12px rgb(15 23 42 / 20%);
	--transition-base: 180ms ease;
}

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--font-size-base);
	line-height: var(--line-height-base);
	color: var(--color-text);
	background-color: var(--color-background);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -0.005em;
	margin: 0 0 0.6em;
	color: var(--color-text);
}

p {
	margin: 0 0 1em;
}

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

a {
	color: var(--color-link);
	transition: color var(--transition-base);
}

/* Visible keyboard focus indicator everywhere (spec §42 accessibility). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--color-focus);
	outline-offset: 2px;
}

/* Skip-to-content link: hidden until focused (target element added with header.php in Phase 3). */
.skip-link {
	position: absolute;
	top: -100%;
	left: 0;
	z-index: 10000;
	padding: 0.75em 1.25em;
	background: var(--color-background);
	color: var(--color-text);
	border: 2px solid var(--color-focus);
}

.skip-link:focus {
	top: 0;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	overflow: hidden;
	position: absolute !important;
	word-wrap: normal !important;
}
