/* ==========================================================================
   Nhs Robin — base: design tokens, reset-lite, typography, focus
   Tokens are overridden at runtime from Appearance → Customize → Design.
   ========================================================================== */

:root {
	/* Colour */
	--color-primary: #2f5bff;
	--color-secondary: #7c5cff;
	--color-text: #0b1b3f;
	--color-muted: #56627f;
	--color-background: #ffffff;
	--color-surface: #ffffff;
	--color-soft: #f5f7fc;
	--color-border: #e4e9f4;
	--color-navy: #0b1b3f;
	--color-on-primary: #ffffff;

	/* Layout */
	--container-width: 1200px;
	--gutter: clamp(20px, 4vw, 40px);
	--section-space: clamp(56px, 8vw, 96px);
	--grid-gap: clamp(16px, 2vw, 24px);
	--header-height: 76px;

	/* Shape + motion */
	--radius-card: 18px;
	--radius-button: 12px;
	--radius-media: 14px;
	--motion-duration: 220ms;
	--motion-ease: cubic-bezier(.2, .7, .2, 1);

	/* Type */
	--font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--font-hand: "Segoe Script", "Bradley Hand", "Brush Script MT", "Comic Sans MS", cursive;
	--heading-weight: 700;

	/* Shadows */
	--shadow-sm: 0 1px 2px rgba(11, 27, 63, .04), 0 1px 1px rgba(11, 27, 63, .03);
	--shadow-md: 0 10px 30px -12px rgba(11, 27, 63, .16);
	--shadow-lg: 0 24px 60px -24px rgba(31, 60, 160, .28);
}

/* Optional appearance toggle (see Customizer → Header). Token-driven only. */
:root[data-theme="dark"] {
	--color-text: #e9edf9;
	--color-muted: #a6b0cc;
	--color-background: #0a1020;
	--color-surface: #111a31;
	--color-soft: #0d1530;
	--color-border: #233052;
	--color-navy: #e9edf9;
	--shadow-md: 0 10px 30px -12px rgba(0, 0, 0, .6);
	color-scheme: dark;
}

/* Map Elementor's global colours/fonts to theme tokens so untouched widgets match the design. */
body[class*="elementor-kit-"] {
	--e-global-color-primary: var(--color-text);
	--e-global-color-secondary: var(--color-muted);
	--e-global-color-text: var(--color-muted);
	--e-global-color-accent: var(--color-primary);
	--e-global-typography-primary-font-family: var(--font-sans);
	--e-global-typography-secondary-font-family: var(--font-sans);
	--e-global-typography-text-font-family: var(--font-sans);
	--e-global-typography-accent-font-family: var(--font-sans);
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
	margin: 0;
	background: var(--color-background);
	color: var(--color-text);
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: clip; /* guards against stray horizontal scroll from decorative shapes */
}

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

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .5em;
	color: var(--color-text);
	font-family: var(--font-sans);
	font-weight: var(--heading-weight);
	line-height: 1.15;
	letter-spacing: -.02em;
	text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5vw + 1rem, 4.5rem); }
h2 { font-size: clamp(1.7rem, 2.2vw + 1rem, 2.5rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

a {
	color: var(--color-primary);
	text-decoration-thickness: .08em;
	text-underline-offset: .18em;
	transition: color var(--motion-duration) var(--motion-ease);
}
a:hover { color: color-mix(in srgb, var(--color-primary) 80%, #000); }

:focus { outline: none; }
:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--color-primary) 70%, #fff);
	outline-offset: 3px;
	border-radius: 6px;
}

.screen-reader-text,
.sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link {
	position: fixed; left: 16px; top: -100px; z-index: 1000;
	padding: 10px 16px;
	background: var(--color-navy); color: #fff;
	border-radius: 8px; text-decoration: none;
	transition: top var(--motion-duration) var(--motion-ease);
}
.skip-link:focus { top: 16px; color: #fff; }

::selection { background: color-mix(in srgb, var(--color-primary) 22%, transparent); }

.nhs-icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.17em; }
