/*
 * NEG Management — design-system foundation.
 *
 * Tokens, self-hosted fonts, reset, typography, container, button primitive,
 * accessibility utilities, skip-link and the reveal primitive. Derived from the
 * approved Design 2 vocabulary (reference-site/assets/home.css + home-tweaks.css)
 * — translated, not copied wholesale, and with the dead Design 1 rules dropped.
 */

/* ---------- Self-hosted fonts (OFL, see assets/fonts/README.txt) ---------- */
@font-face {
	font-family: "Manrope";
	src: url("../fonts/manrope-500.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Manrope";
	src: url("../fonts/manrope-600.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Manrope";
	src: url("../fonts/manrope-700.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Manrope";
	src: url("../fonts/manrope-800.woff2") format("woff2");
	font-weight: 800;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "DM Sans";
	src: url("../fonts/dm-sans-400.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "DM Sans";
	src: url("../fonts/dm-sans-500.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "DM Sans";
	src: url("../fonts/dm-sans-700.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

:root {
	/* Brand palette (approved) */
	--neg-navy: #082b42;
	--neg-navy-deep: #061e2e;
	--neg-blue: #075b9d;
	--neg-blue-dark: #073750;
	--neg-teal: #00a59c;
	--neg-teal-light: #8ee1dc;
	--neg-teal-panel: #007c75; /* darker teal for panels carrying white text — brand teal fails WCAG AA behind white text (axe: ~3.06:1) */
	--neg-coral: #ff6d61;
	--neg-coral-text: #b24c44; /* darker coral for text on light backgrounds — brand coral fails WCAG AA as text (axe: ~2.6-2.8:1) */
	--neg-coral-panel: #ad4a42; /* darker coral for panels carrying white text — brand coral fails WCAG AA behind white text (axe: ~2.4-2.8:1) */
	--neg-ice: #eff9f8;
	--neg-paper: #fbfaf6;
	--neg-ink: #122c38;

	/* Supporting neutrals */
	--neg-muted: #5f7076; /* darkened slightly from #65777e for WCAG AA text contrast (axe: 4.35 -> 4.8+) */
	--neg-line: #cddbdc;

	/* Typography */
	--neg-font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--neg-font-display: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--neg-line-height: 1.65;

	/* Spacing scale */
	--neg-space-1: 0.25rem;
	--neg-space-2: 0.5rem;
	--neg-space-3: 1rem;
	--neg-space-4: 1.5rem;
	--neg-space-5: 2.5rem;
	--neg-space-6: 4rem;
	--neg-space-7: 7.5rem;

	/* Section rhythm (Design 2 uses ~130px desktop / ~85px mobile) */
	--neg-section-y: clamp(5rem, 9vw, 8.5rem);

	/* Layout */
	--neg-container: 1200px;
	--neg-container-gutter: clamp(1.0625rem, 4vw, 1.75rem);
	--neg-wrap: min(var(--neg-container), 100vw - 2 * var(--neg-container-gutter));
	--neg-header-h: 88px;
	--neg-topbar-h: 40px; /* slim contact strip above the main nav — desktop only, 0 on mobile (see components.css) */

	/* Misc */
	--neg-radius: 4px;
	--neg-focus-ring: 3px solid var(--neg-blue);
}

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

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

body {
	margin: 0;
	background: var(--neg-paper);
	color: var(--neg-ink);
	font-family: var(--neg-font-body);
	font-size: 1rem;
	line-height: var(--neg-line-height);
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}

body.nav-is-open {
	overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--neg-space-3);
	font-family: var(--neg-font-display);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.03em;
	color: var(--neg-navy);
}

p {
	margin: 0 0 var(--neg-space-3);
}

a {
	color: var(--neg-blue);
}

a:hover,
a:focus {
	color: var(--neg-blue-dark);
}

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

:focus-visible {
	outline: var(--neg-focus-ring);
	outline-offset: 2px;
}

/* Layout container */
.neg-container {
	width: 100%;
	max-width: var(--neg-container);
	margin-inline: auto;
	padding-inline: var(--neg-container-gutter);
}

/* Shared section eyebrow / index lockup (Design 2 .section-index) */
.neg-eyebrow {
	margin: 0;
	font-family: var(--neg-font-display);
	font-weight: 700;
	font-size: 0.6875rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--neg-coral);
}

.neg-index {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.neg-index__label {
	font-family: var(--neg-font-display);
	font-weight: 700;
	font-size: 0.5625rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--neg-muted);
}

.neg-index--on-dark .neg-index__label {
	color: rgba(255, 255, 255, 0.6);
}

/* Button primitives (Design 2 .primary / .secondary / .nav-button) */
.neg-button {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	min-width: 220px;
	padding: 1rem 1.25rem;
	font-family: var(--neg-font-display);
	font-weight: 700;
	font-size: 0.8125rem;
	line-height: 1;
	color: #fff;
	background: var(--neg-blue);
	border: 1px solid var(--neg-blue);
	border-radius: 0;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.neg-button__icon {
	color: var(--neg-teal-light);
}

.neg-button:hover,
.neg-button:focus-visible {
	color: #fff;
	background: var(--neg-blue-dark);
	border-color: var(--neg-blue-dark);
}

.neg-button--navy {
	background: var(--neg-navy);
	border-color: var(--neg-navy);
}

.neg-button--navy:hover,
.neg-button--navy:focus-visible {
	background: var(--neg-navy-deep);
	border-color: var(--neg-navy-deep);
}

.neg-link {
	display: inline-flex;
	align-items: baseline;
	gap: 0.55rem;
	font-family: var(--neg-font-display);
	font-weight: 700;
	font-size: 0.8125rem;
	color: currentColor;
	text-decoration: underline;
	text-underline-offset: 6px;
}

.neg-link__icon {
	color: var(--neg-coral);
	text-decoration: none;
}

/* Screen-reader-only text */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	position: fixed !important;
	top: var(--neg-space-2);
	left: var(--neg-space-2);
	width: auto;
	height: auto;
	padding: var(--neg-space-2) var(--neg-space-3);
	clip: auto;
	white-space: normal;
	background: var(--neg-navy);
	color: #fff;
	z-index: 100000;
}

/* Skip link */
.skip-link {
	position: fixed;
	top: var(--neg-space-2);
	left: var(--neg-space-2);
	z-index: 100001;
	padding: 0.65rem 0.9rem;
	background: var(--neg-coral);
	color: #fff;
	text-decoration: none;
	border-radius: var(--neg-radius);
	transform: translateY(-160%);
	transition: transform 0.2s ease;
}

.skip-link:focus {
	transform: none;
}

/* Reveal-on-scroll primitive (restrained, Design 2 behaviour) */
.reveal {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 0.6s ease, transform 0.6s ease;
	will-change: opacity, transform;
}

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

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

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}

	.reveal {
		opacity: 1;
		transform: none;
	}
}
