/* ==========================================================================
   ElderSG design tokens (source: ElderSG Design System v1, 3 Oct 2026)
   ========================================================================== */
:root {
	--cream: #F7F2EA;
	--paper: #FFFFFF;
	--ink: #1E2A36;
	--ink-muted: #55616D;
	--navy: #1F3A5F;
	--navy-deep: #15283F;
	--sage: #6F9580;
	--sage-dark: #4A6E5A;
	--sage-light: #A9C4B3;
	--sage-tint: #E4EDE6;
	--terracotta: #C46A4A;
	--terracotta-dark: #A9533A;
	--terracotta-deep: #8F4330;
	--terracotta-tint: #F6E3DA;
	--line: #DDD5C8;
	--focus: #1F3A5F;
	--danger: #B3261E;

	--font-serif: "Lora", Georgia, "Times New Roman", serif;
	--font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--space-1: 4px;
	--space-2: 8px;
	--space-3: 16px;
	--space-4: 24px;
	--space-5: 40px;
	--space-6: 64px;
	--space-7: 96px;

	--radius-sm: 6px;
	--radius-md: 12px;
	--radius-lg: 20px;
	--radius-pill: 999px;

	--tap-min: 52px;
	--measure: 68ch;
	--container: 1200px;
	--shadow-card: 0 1px 2px rgba(30, 42, 54, 0.06), 0 4px 16px rgba(30, 42, 54, 0.06);
}

/* ==========================================================================
   Base
   ========================================================================== */
html { -webkit-text-size-adjust: 100%; }
body {
	background: var(--cream);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 18px;
	line-height: 1.6;
	margin: 0;
}
h1, h2, h3, h4,
.elementor-widget-heading .elementor-heading-title {
	font-family: var(--font-serif);
	font-weight: 600;
	color: var(--navy);
	letter-spacing: -0.005em;
}
h1 { font-size: 32px; line-height: 40px; }
h2 { font-size: 26px; line-height: 34px; }
h3 { font-size: 21px; line-height: 29px; }
@media (min-width: 768px) {
	h1 { font-size: 40px; line-height: 48px; }
	h2 { font-size: 30px; line-height: 38px; }
	h3 { font-size: 22px; line-height: 30px; }
}
p { margin: 0 0 1em; }
a { color: var(--sage-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
img { max-width: 100%; height: auto; }

:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 2px;
	border-radius: 4px;
}

.esg-skip {
	position: absolute; left: var(--space-3); top: -100px; z-index: 1000;
	background: var(--navy); color: var(--cream); padding: var(--space-2) var(--space-3);
	border-radius: var(--radius-md); font-weight: 600;
}
.esg-skip:focus { top: var(--space-2); color: var(--cream); }

.esg-container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-3); }
@media (min-width: 768px) { .esg-container { padding: 0 var(--space-4); } }

/* ==========================================================================
   Buttons
   ========================================================================== */
.esg-btn,
.elementor-button.esg-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
	min-height: var(--tap-min); padding: 0 var(--space-4);
	border-radius: var(--radius-md); border: 2px solid transparent;
	font-family: var(--font-sans); font-size: 18px; font-weight: 600; line-height: 1;
	text-decoration: none; cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.esg-btn--primary { background: var(--terracotta-dark); color: #fff; }
.esg-btn--primary:hover, .esg-btn--primary:focus-visible { background: var(--terracotta-deep); color: #fff; }
.esg-btn--secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.esg-btn--secondary:hover { background: var(--navy); color: var(--cream); }
.esg-btn--block { width: 100%; }

/* Elementor button widget mapped to brand when given class esg-cta / esg-cta-secondary */
.esg-cta .elementor-button { background: var(--terracotta-dark); color: #fff; min-height: var(--tap-min); border-radius: var(--radius-md); font-weight: 600; font-size: 18px; padding: 0 var(--space-4); display: inline-flex; align-items: center; }
.esg-cta .elementor-button:hover { background: var(--terracotta-deep); }
.esg-cta-secondary .elementor-button { background: transparent; color: var(--navy); border: 2px solid var(--navy); min-height: var(--tap-min); border-radius: var(--radius-md); font-weight: 600; font-size: 18px; padding: 0 var(--space-4); display: inline-flex; align-items: center; }
.esg-cta-secondary .elementor-button:hover { background: var(--navy); color: var(--cream); }

/* ==========================================================================
   Header
   ========================================================================== */
.esg-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(247, 242, 234, 0.96);
	border-bottom: 1px solid var(--line);
	backdrop-filter: saturate(140%) blur(6px);
}
.admin-bar .esg-header { top: 46px; }
@media (min-width: 783px) { .admin-bar .esg-header { top: 32px; } }
.esg-header__inner {
	max-width: var(--container); margin: 0 auto;
	display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
	min-height: 68px; padding: 0 var(--space-3);
}
.esg-header__logo { display: inline-flex; align-items: center; }
.esg-header__logo svg { height: 40px; width: auto; display: block; }
@media (min-width: 1024px) {
	.esg-header__inner { min-height: 80px; padding: 0 var(--space-4); }
	.esg-header__logo svg { height: 48px; }
}

.esg-menu-toggle {
	display: inline-flex; align-items: center; gap: var(--space-2);
	min-height: 48px; padding: 0 var(--space-3);
	background: transparent; color: var(--navy);
	border: 2px solid var(--line); border-radius: var(--radius-md);
	font: 600 16px/1 var(--font-sans); cursor: pointer;
}
.esg-menu-toggle .esg-icon-close { display: none; }
.esg-nav-open .esg-menu-toggle .esg-icon-open { display: none; }
.esg-nav-open .esg-menu-toggle .esg-icon-close { display: inline; }

.esg-nav { display: none; }
.esg-nav__list { list-style: none; margin: 0; padding: 0; }
.esg-nav__list a { color: var(--navy); font-weight: 600; text-decoration: none; }

/* Mobile menu: full-width panel under the header */
.esg-nav-open .esg-nav {
	display: flex; flex-direction: column; gap: var(--space-3);
	position: fixed; left: 0; right: 0; top: 69px; bottom: 0;
	background: var(--cream); padding: var(--space-3); overflow-y: auto;
	border-top: 1px solid var(--line);
}
.esg-nav-open .admin-bar .esg-nav { top: 115px; }
.esg-nav-open .esg-nav__list li { border-bottom: 1px solid var(--line); }
.esg-nav-open .esg-nav__list a { display: flex; align-items: center; min-height: 56px; font-size: 20px; }
.esg-nav-open body { overflow: hidden; }

@media (min-width: 1024px) {
	.esg-menu-toggle { display: none; }
	.esg-nav, .esg-nav-open .esg-nav {
		display: flex; flex-direction: row; align-items: center; gap: var(--space-4);
		position: static; padding: 0; background: none; border: 0; overflow: visible;
	}
	.esg-nav__list { display: flex; gap: var(--space-4); }
	.esg-nav__list li { border: 0; }
	.esg-nav__list a { font-size: 17px; padding: var(--space-2) 0; }
	.esg-nav__list a:hover, .esg-nav__list .current-menu-item > a { color: var(--terracotta-dark); }
	.esg-nav__cta { min-height: 48px; padding: 0 var(--space-3); font-size: 17px; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.esg-footer { background: var(--navy-deep); color: var(--cream); margin-top: var(--space-6); }
.esg-footer__inner { max-width: var(--container); margin: 0 auto; padding: var(--space-6) var(--space-3) var(--space-5); }
.esg-footer__brand svg { height: 72px; width: auto; display: block; }
.esg-footer__about { color: var(--sage-light); max-width: 40ch; margin-top: var(--space-3); font-size: 16px; }
.esg-footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5) var(--space-4); margin: var(--space-5) 0; }
@media (min-width: 768px) {
	.esg-footer__inner { padding: var(--space-7) var(--space-4) var(--space-5); }
	.esg-footer__cols { grid-template-columns: repeat(4, 1fr); }
}
.esg-footer__heading { font-family: var(--font-sans); font-size: 15px; line-height: 22px; letter-spacing: .04em; text-transform: uppercase; color: var(--sage-light); margin: 0 0 var(--space-3); }
.esg-footer__list { list-style: none; margin: 0; padding: 0; }
.esg-footer__list li { margin: 0 0 var(--space-2); }
.esg-footer__list a { color: var(--cream); text-decoration: none; font-size: 16px; display: inline-block; padding: 4px 0; }
.esg-footer__list a:hover { text-decoration: underline; color: #fff; }
.esg-footer__notes { border-top: 1px solid rgba(169, 196, 179, .3); padding-top: var(--space-4); font-size: 15px; line-height: 22px; color: var(--sage-light); }
.esg-footer__emergency { display: flex; gap: var(--space-2); align-items: flex-start; color: var(--cream); font-weight: 600; }
.esg-footer__emergency svg { flex: none; margin-top: 1px; color: var(--terracotta-tint); }

/* ==========================================================================
   Homepage / Elementor section helpers
   ========================================================================== */
.esg-section { padding: var(--space-6) var(--space-3); }
@media (min-width: 1024px) { .esg-section { padding: var(--space-7) var(--space-4); } }
.esg-band-tint { background: var(--sage-tint); }
.esg-band-navy { background: var(--navy-deep); color: var(--cream); }
.esg-band-navy h2, .esg-band-navy h3 { color: var(--cream); }
.esg-band-navy p { color: var(--sage-light); }
.esg-eyebrow { font: 600 15px/22px var(--font-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--sage-dark); margin: 0 0 var(--space-2); }
.esg-band-navy .esg-eyebrow { color: var(--sage-light); }
.esg-lead { font-size: 20px; line-height: 32px; color: var(--ink); }
.esg-muted { color: var(--ink-muted); font-size: 15px; line-height: 22px; }

/* Hero */
.esg-hero { display: grid; gap: var(--space-5); align-items: center; max-width: var(--container); margin: 0 auto; }
@media (min-width: 1024px) { .esg-hero { grid-template-columns: 1.05fr 1fr; gap: var(--space-6); } }
.esg-hero h1 { font-size: 36px; line-height: 44px; margin: 0 0 var(--space-3); }
@media (min-width: 768px) { .esg-hero h1 { font-size: 52px; line-height: 60px; } }
.esg-hero__media { aspect-ratio: 16 / 11; border-radius: var(--radius-lg); overflow: hidden; background: var(--sage-tint); }
.esg-hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Image placeholder until Gemini images are ready */
.esg-placeholder {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2);
	width: 100%; height: 100%; min-height: 220px; padding: var(--space-4); box-sizing: border-box; text-align: center;
	background: repeating-linear-gradient(135deg, var(--sage-tint) 0 14px, #dce7df 14px 28px);
	color: var(--sage-dark); font-size: 15px; line-height: 22px; border-radius: inherit;
}
.esg-placeholder strong { font-size: 16px; color: var(--navy); }

/* Search panel */
.esg-search {
	background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
	box-shadow: var(--shadow-card); padding: var(--space-4); display: grid; gap: var(--space-3);
}
@media (min-width: 768px) { .esg-search { grid-template-columns: 1fr 1fr auto; align-items: end; } }
.esg-field { display: grid; gap: var(--space-1); }
.esg-field label { font: 600 16px/22px var(--font-sans); color: var(--navy); }
.esg-field select, .esg-field input {
	min-height: var(--tap-min); width: 100%; box-sizing: border-box;
	padding: 0 var(--space-3); font: 400 18px/1.2 var(--font-sans); color: var(--ink);
	background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
	appearance: none; -webkit-appearance: none;
}
.esg-field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231F3A5F' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 14px center; padding-right: 44px;
}
.esg-field select:focus, .esg-field input:focus { border-color: var(--navy); outline: 3px solid var(--focus); outline-offset: 1px; }
.esg-search__note { grid-column: 1 / -1; margin: 0; }

/* Route tiles and care-type tiles */
.esg-grid { display: grid; gap: var(--space-3); max-width: var(--container); margin: 0 auto; }
@media (min-width: 600px) { .esg-grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .esg-grid--4 { grid-template-columns: repeat(4, 1fr); } .esg-grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 600px) and (max-width: 899px) { .esg-grid--4, .esg-grid--3 { grid-template-columns: repeat(2, 1fr); } }

.esg-card {
	display: flex; flex-direction: column; gap: var(--space-2);
	background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
	box-shadow: var(--shadow-card); padding: var(--space-4); text-decoration: none; color: var(--ink);
	transition: border-color .15s ease;
}
a.esg-card:hover { border-color: var(--navy); color: var(--ink); }
.esg-card h3 { margin: 0; font-size: 21px; line-height: 28px; }
.esg-card p { margin: 0; font-size: 16px; line-height: 25px; color: var(--ink-muted); }
.esg-card__icon { width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--sage-tint); color: var(--sage-dark); display: inline-flex; align-items: center; justify-content: center; }
.esg-card__icon svg { width: 28px; height: 28px; }
.esg-card__more { margin-top: auto; padding-top: var(--space-2); font-weight: 600; color: var(--terracotta-dark); font-size: 16px; }
.esg-card--route .esg-card__icon { background: var(--terracotta-tint); color: var(--terracotta-deep); }

/* Steps */
.esg-steps { counter-reset: step; display: grid; gap: var(--space-4); max-width: var(--container); margin: 0 auto; padding: 0; list-style: none; }
@media (min-width: 900px) { .esg-steps { grid-template-columns: repeat(3, 1fr); } }
.esg-steps li { counter-increment: step; position: relative; padding-top: 56px; }
.esg-steps li::before {
	content: counter(step); position: absolute; top: 0; left: 0;
	width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	background: var(--navy); color: var(--cream); font: 600 20px/1 var(--font-serif);
}
.esg-steps h3 { margin: 0 0 var(--space-2); }
.esg-steps p { margin: 0; color: var(--ink-muted); }

/* Region pills */
.esg-pills { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.esg-pills a {
	display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--space-4);
	border: 2px solid var(--navy); border-radius: var(--radius-pill);
	color: var(--navy); font-weight: 600; text-decoration: none; background: var(--paper);
}
.esg-pills a:hover { background: var(--navy); color: var(--cream); }

/* Region map */
.esg-map svg { width: 100%; height: auto; display: block; }
.esg-map a path { fill: var(--sage-tint); stroke: var(--paper); stroke-width: 3; transition: fill .15s ease; }
.esg-map a:hover path, .esg-map a:focus path { fill: var(--sage); }
.esg-map text { font: 600 15px var(--font-sans); fill: var(--navy); pointer-events: none; }

/* Checklist signup */
.esg-signup {
	max-width: 960px; margin: 0 auto; display: grid; gap: var(--space-4); align-items: center;
	background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5) var(--space-4);
}
@media (min-width: 900px) { .esg-signup { grid-template-columns: 1.1fr 1fr; padding: var(--space-5); } }

/* Money panel */
.esg-money { max-width: 960px; margin: 0 auto; }
.esg-money ul { margin: var(--space-3) 0 0; padding: 0; list-style: none; display: grid; gap: var(--space-3); }
.esg-money li { padding-left: 32px; position: relative; color: var(--cream); }
.esg-money li::before { content: ""; position: absolute; left: 0; top: 9px; width: 14px; height: 14px; border-radius: 50%; background: var(--sage); }

/* Trust strip */
.esg-trust { display: grid; gap: var(--space-4); max-width: var(--container); margin: 0 auto; }
@media (min-width: 900px) { .esg-trust { grid-template-columns: repeat(3, 1fr); } }
.esg-trust h3 { font-size: 20px; margin: 0 0 var(--space-2); }
.esg-trust p { margin: 0 0 var(--space-2); font-size: 16px; color: var(--ink-muted); }

/* Badges */
.esg-badge { display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px var(--space-2); border-radius: var(--radius-sm); font: 600 14px/20px var(--font-sans); }
.esg-badge--checked { background: var(--sage-tint); color: var(--sage-dark); }
.esg-badge--featured { background: var(--terracotta-tint); color: var(--terracotta-deep); }

/* Section header helper */
.esg-head { max-width: 760px; margin: 0 auto var(--space-5); text-align: center; }
.esg-head h2 { margin: 0 0 var(--space-2); }
.esg-head p { margin: 0; color: var(--ink-muted); }

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}
