/* ==========================================================================
   HERON THEME — DESIGN TOKENS
   Source: 01_BRAND_SYSTEM.md (Heron Navy/Teal/Blue + restrained Gold,
   executive/intelligent/calm/premium, generous spacing, premium cards,
   rounded corners). Hex values below are a specific implementation of
   those named colours — confirm against real brand guidelines/logo
   files if Fraser has exact approved hex codes already in use elsewhere.

   Type system: Fraunces (a warm, confident serif with real editorial
   weight) for display/section headings — signals "considered, senior,
   not a generic SaaS template" — paired with Inter for body/UI text
   and IBM Plex Mono for KPI numerals, where a tabular/instrument feel
   suits data ("74", "£486,000") better than a humanist sans.
   ========================================================================== */

:root {
	/* RC5 visual system — "Premium. Cinematic. Scottish. Intelligent."
	   Charcoal/slate/ivory/bronze, replacing the earlier navy/teal
	   palette. Existing variable NAMES are kept wherever possible so
	   the rest of this stylesheet (and the plugin's assessment.css,
	   which shares these tokens) doesn't need touching rule-by-rule —
	   only what each token resolves to has changed. */
	--heron-navy: #0A0A0B;        /* near-black charcoal — primary background */
	--heron-navy-2: #141519;      /* Scottish slate — secondary surface */
	--heron-surface: #1C1E23;     /* slate surface, cards/panels */
	--heron-teal: #B08D57;        /* restrained bronze/gold — primary accent (was bright teal) */
	--heron-blue: #6E93B3;        /* muted analytical blue-grey — data/chart accent only */
	--heron-gold: #B08D57;        /* bronze/gold, same value as --heron-teal for consistency */
	--heron-success: #6FA37A;     /* muted green — healthy/positive states */
	--heron-warning: #C9A227;
	--heron-critical: #C1666B;
	--heron-white: #F4EFE4;       /* warm ivory, not pure white */
	--heron-text: #F4EFE4;
	--heron-text-secondary: #B7AF9E;
	--heron-divider: rgba(244,239,228,0.10);
	--heron-navy-deep: #050506;
	--heron-teal-deep: #93713F;   /* darker bronze for hover states */
	--heron-grey: var(--heron-text-secondary);
	--heron-bg-light: var(--heron-surface);
	--heron-border: var(--heron-divider);

	/* Typography — premium editorial serif for display, readable sans
	   for interface/body/data, per the approved RC5 creative brief. */
	--heron-font-display: "Fraunces", Georgia, serif;
	--heron-font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
	--heron-font-mono: "IBM Plex Sans", -apple-system, sans-serif;

	/* Layout — 01_BRAND_SYSTEM.md v1.1 §5 */
	--heron-max-width: 1440px;
	--heron-radius-sm: 8px;
	--heron-radius-md: 18px;  /* Card radius: 16-18px per spec */
	--heron-radius-lg: 18px;
	--heron-radius-btn: 10px; /* Button radius: 10px per spec — NOT a pill */
	--heron-space-1: 8px;
	--heron-space-2: 16px;
	--heron-space-3: 24px;
	--heron-space-4: 32px;
	--heron-space-5: 48px;
	--heron-space-6: 96px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
	margin: 0;
	font-family: var(--heron-font-body);
	color: var(--heron-text);
	background: var(--heron-navy);
	line-height: 1.55;
	font-size: 17px;
}

h1, h2, h3, .heron-display {
	font-family: var(--heron-font-display);
	font-weight: 600;
	line-height: 1.12;
	color: var(--heron-text);
	margin: 0 0 var(--heron-space-2);
	letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.25rem, 4.5vw, 4.5rem); font-weight: 800; } /* Hero heading: Montserrat ExtraBold, ~72px desktop per spec */
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); } /* Section heading: Montserrat SemiBold */
h3 { font-size: 1.3rem; }

p { margin: 0 0 var(--heron-space-2); color: var(--heron-text-secondary); }
a { color: var(--heron-blue); }

.heron-eyebrow {
	display: inline-block;
	font-family: var(--heron-font-mono);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--heron-teal);
	margin-bottom: var(--heron-space-2);
}

.heron-kpi-number {
	font-family: var(--heron-font-mono);
	font-weight: 600;
}

/* Skip link */
.heron-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--heron-navy);
	color: #fff;
	padding: 12px 20px;
	z-index: 1000;
}
.heron-skip-link:focus {
	left: var(--heron-space-2);
	top: var(--heron-space-2);
}

/* Focus visibility everywhere */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
	outline: 3px solid var(--heron-gold);
	outline-offset: 2px;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.heron-container {
	max-width: var(--heron-max-width);
	margin: 0 auto;
	padding: 0 var(--heron-space-3);
}
.heron-section {
	padding: var(--heron-space-6) 0;
}
.heron-section--dark {
	background: var(--heron-navy-deep);
}
.heron-section--muted {
	background: var(--heron-surface);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.heron-header {
	position: sticky;
	top: 0;
	z-index: 500;
	background: transparent;
	transition: background 0.25s ease, backdrop-filter 0.25s ease;
}
.heron-header.is-scrolled {
	background: rgba(7, 17, 31, 0.86);
	backdrop-filter: blur(10px);
}
.heron-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--heron-space-2) 0;
}
.heron-header__brand {
	color: var(--heron-white);
	text-decoration: none;
	line-height: 1.1;
}
.heron-header__brand strong {
	display: block;
	font-family: var(--heron-font-display);
	font-size: 1.15rem;
	letter-spacing: 0.02em;
}
.heron-header__brand span {
	display: block;
	font-size: 0.72rem;
	color: var(--heron-grey-light);
	text-transform: uppercase;
	letter-spacing: 0.1em;
}
.heron-header__nav {
	display: flex;
	gap: var(--heron-space-3);
	list-style: none;
	margin: 0;
	padding: 0;
}
.heron-header__nav a {
	color: var(--heron-white);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.95rem;
}
.heron-header__nav a:hover { color: var(--heron-gold); }

.heron-header__toggle {
	display: none;
	background: none;
	border: none;
	color: var(--heron-white);
	font-size: 1.6rem;
	cursor: pointer;
	min-width: 44px;
	min-height: 44px;
}

@media (max-width: 900px) {
	.heron-header__nav { display: none; }
	.heron-header__toggle { display: block; }
	.heron-header.is-scrolled, .heron-header { background: var(--heron-navy); }
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.heron-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 15px 28px;
	border-radius: var(--heron-radius-btn);
	font-weight: 600;
	text-decoration: none;
	border: 2px solid transparent;
	cursor: pointer;
	font-size: 1rem;
	min-height: 44px;
	transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.heron-btn--primary { background: var(--heron-teal); color: var(--heron-white); }
.heron-btn--primary:hover { background: var(--heron-teal-deep); }
.heron-btn--secondary { background: transparent; border-color: currentColor; color: inherit; }
.heron-btn--secondary:hover { background: rgba(255,255,255,0.08); }
.heron-btn--text { background: none; border: none; padding: 0; color: var(--heron-teal-deep); font-weight: 600; }
.heron-btn:active { transform: translateY(1px); }

/* ==========================================================================
   HERO
   ========================================================================== */
.heron-hero {
	position: relative;
	color: var(--heron-white);
	background: linear-gradient(180deg, rgba(7,22,38,0.88) 0%, rgba(7,22,38,0.75) 55%, rgba(11,31,51,0.95) 100%),
		url('../images/hero-highlands.jpg') center/cover no-repeat;
	padding-top: calc(var(--heron-space-6) + 40px);
	padding-bottom: var(--heron-space-6);
}
.heron-hero__grid {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: var(--heron-space-5);
	align-items: center;
}
.heron-hero__body p { color: rgba(255,255,255,0.86); font-size: 1.15rem; max-width: 46ch; }
.heron-hero__actions { display: flex; flex-wrap: wrap; gap: var(--heron-space-2); margin: var(--heron-space-3) 0; }
.heron-hero__trust { font-weight: 600; color: var(--heron-gold); }

.heron-hero__dashboard {
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.16);
	border-radius: var(--heron-radius-lg);
	padding: var(--heron-space-3);
	backdrop-filter: blur(6px);
}
.heron-hero__dashboard-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 10px 0;
	border-bottom: 1px solid rgba(255,255,255,0.12);
}
.heron-hero__dashboard-row:last-child { border-bottom: none; }
.heron-hero__dashboard-label { color: var(--heron-grey-light); font-size: 0.85rem; }
.heron-hero__dashboard-value { font-family: var(--heron-font-mono); font-weight: 600; }
.heron-hero__dashboard-value--big { font-size: 2.6rem; color: var(--heron-white); }

@media (max-width: 900px) {
	.heron-hero__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   KPI PREVIEW CARDS
   ========================================================================== */
.heron-kpi-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--heron-space-3);
	margin-top: var(--heron-space-4);
}
.heron-kpi-card {
	background: rgba(19,38,59,0.72);
	backdrop-filter: blur(8px);
	border: 1px solid var(--heron-divider);
	border-radius: var(--heron-radius-md);
	padding: var(--heron-space-3);
}
.heron-kpi-card__value { font-size: 2.1rem; }
.heron-kpi-card__label { color: var(--heron-text-secondary); font-size: 0.9rem; margin-top: 4px; }

@media (max-width: 900px) {
	.heron-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
	.heron-kpi-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   LEAKAGE MODEL
   ========================================================================== */
.heron-leakage {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--heron-space-5);
	align-items: center;
}
.heron-leakage__model {
	list-style: none;
	margin: 0;
	padding: 0;
	border-left: 3px solid var(--heron-teal);
	padding-left: var(--heron-space-3);
}
.heron-leakage__model li {
	padding: 12px 0;
	font-weight: 600;
	color: var(--heron-blue);
}
@media (max-width: 900px) {
	.heron-leakage { grid-template-columns: 1fr; }
}

/* ==========================================================================
   FLIGHT PATH
   ========================================================================== */
.heron-flightpath {
	display: flex;
	gap: var(--heron-space-2);
	overflow-x: auto;
	padding-bottom: var(--heron-space-2);
	margin-top: var(--heron-space-4);
}
.heron-flightpath__stage {
	flex: 1 1 0;
	min-width: 180px;
	background: rgba(19,38,59,0.72);
	backdrop-filter: blur(8px);
	border: 1px solid var(--heron-divider);
	border-radius: var(--heron-radius-md);
	padding: var(--heron-space-3);
	cursor: pointer;
	transition: border-color 0.15s, transform 0.15s;
}
.heron-flightpath__stage:hover,
.heron-flightpath__stage:focus-visible,
.heron-flightpath__stage[aria-selected="true"] {
	border-color: var(--heron-teal);
	transform: translateY(-4px);
}
.heron-flightpath__stage-number {
	font-family: var(--heron-font-mono);
	color: var(--heron-teal);
	font-weight: 700;
}

@media (max-width: 900px) {
	.heron-flightpath { flex-direction: column; }
	.heron-flightpath__stage { min-width: 0; }
}

/* ==========================================================================
   FEATURE / CARD GRIDS
   ========================================================================== */
.heron-card-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--heron-space-3);
	margin-top: var(--heron-space-4);
}
.heron-card {
	background: rgba(19,38,59,0.72);
	backdrop-filter: blur(8px);
	border: 1px solid var(--heron-divider);
	border-radius: var(--heron-radius-md);
	padding: var(--heron-space-3);
}
.heron-card--dark {
	background: rgba(255,255,255,0.04);
	border-color: rgba(255,255,255,0.10);
}
@media (max-width: 1100px) {
	.heron-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.heron-card-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.heron-footer {
	background: var(--heron-navy-deep);
	color: rgba(255,255,255,0.8);
	padding: var(--heron-space-5) 0 var(--heron-space-3);
}
.heron-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: var(--heron-space-4);
}
.heron-footer h4 {
	color: var(--heron-white);
	font-family: var(--heron-font-body);
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: var(--heron-space-2);
}
.heron-footer ul { list-style: none; margin: 0; padding: 0; }
.heron-footer li { margin-bottom: 8px; }
.heron-footer a { color: rgba(255,255,255,0.75); text-decoration: none; }
.heron-footer a:hover { color: var(--heron-gold); }
.heron-footer__bottom {
	margin-top: var(--heron-space-4);
	padding-top: var(--heron-space-3);
	border-top: 1px solid rgba(255,255,255,0.12);
	font-size: 0.85rem;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
}
@media (max-width: 900px) {
	.heron-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
	.heron-footer__grid { grid-template-columns: 1fr; }
}

/* Minimum touch targets on mobile per spec */
@media (max-width: 600px) {
	.heron-btn, a, button { min-height: 44px; }
}
