/* ==========================================================================
   EAA SITE CHROME — shared header + footer (v2.6.28)
   Baseline is neutral and variable-driven; each theme gets a scoped block
   keyed off its body class so chrome matches the page it sits on.
   Mobile-first: nav collapses to a slide-down panel under 861px.
   ========================================================================== */

/* v2.10.0 GLOBAL CONTRAST REPAIR: the baseline header was translucent
   white — over the light surfaces most themes use (Foreman, Keystone,
   Foundry) it washed into grey-on-grey and the mobile dropdown floated
   grey links over white. Solid background + AA-checked link colour fixes
   every theme that has no chrome variant of its own, globally. */
.eaa-chrome-header {
	--chrome-bg: #ffffff;
	--chrome-text: #111827;
	--chrome-muted: #374151;
	--chrome-border: #d7dade;
	--chrome-accent: #1a56db;
	--chrome-accent-text: #ffffff;
	position: sticky;
	top: 0;
	z-index: 900;
	background: var(--chrome-bg);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--chrome-border);
	transition: box-shadow 0.25s ease;
}
.eaa-chrome-header.is-scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07); }

.eaa-chrome-inner {
	max-width: 1220px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 0.85rem clamp(1.25rem, 5vw, 3rem);
}

.eaa-chrome-brand {
	font-size: 1.06rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--chrome-text);
	text-decoration: none;
	white-space: nowrap;
}

.eaa-chrome-nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.eaa-chrome-link,
.eaa-chrome-phone {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--chrome-muted);
	text-decoration: none;
	transition: color 0.15s ease;
}
.eaa-chrome-link:hover, .eaa-chrome-phone:hover { color: var(--chrome-text); }
.eaa-chrome-phone { font-variant-numeric: tabular-nums; }

.eaa-chrome-cta {
	display: inline-flex;
	align-items: center;
	padding: 0.6rem 1.35rem;
	background: var(--chrome-accent);
	color: var(--chrome-accent-text);
	border-radius: 8px;
	font-size: 0.88rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: transform 0.15s ease, opacity 0.15s ease;
}
.eaa-chrome-cta:hover { transform: translateY(-1px); opacity: 0.92; color: var(--chrome-accent-text); }

/* v2.10.2 — social profile icons + marketplace buttons (Links & Profiles) */
.eaa-chrome-social { display: inline-flex; align-items: center; gap: 0.5rem; }
.eaa-chrome-social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--chrome-muted);
	transition: color 0.15s ease, transform 0.15s ease;
}
.eaa-chrome-social-icon:hover { color: var(--chrome-text); transform: translateY(-1px); }
.eaa-chrome-shops { display: inline-flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem; }
.eaa-chrome-shop-btn {
	display: inline-flex;
	align-items: center;
	padding: 0.4rem 0.85rem;
	border: 1px solid var(--chrome-border);
	border-radius: 999px;
	color: var(--chrome-text);
	font-size: 0.82rem;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease;
}
.eaa-chrome-shop-btn:hover { border-color: var(--chrome-accent); color: var(--chrome-accent); }
.eaa-chrome-footer-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 0.7rem; }

/* Hamburger — hidden on desktop */
.eaa-chrome-burger {
	display: none;
	width: 42px;
	height: 42px;
	padding: 10px;
	background: transparent;
	border: 0;
	cursor: pointer;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
}
.eaa-chrome-burger span {
	display: block;
	height: 2px;
	width: 100%;
	background: var(--chrome-text);
	border-radius: 2px;
	transition: transform 0.22s ease, opacity 0.22s ease;
}
.eaa-chrome-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.eaa-chrome-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.eaa-chrome-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
	.eaa-chrome-burger { display: flex; }
	.eaa-chrome-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: var(--chrome-bg);
		backdrop-filter: blur(14px);
		-webkit-backdrop-filter: blur(14px);
		border-bottom: 1px solid var(--chrome-border);
		padding: 0.5rem 1.25rem 1.1rem;
	}
	.eaa-chrome-nav.is-open { display: flex; }
	.eaa-chrome-link, .eaa-chrome-phone {
		padding: 0.85rem 0.25rem;
		font-size: 1rem;
		border-bottom: 1px solid var(--chrome-border);
	}
	.eaa-chrome-phone { border-bottom: 0; }
	.eaa-chrome-cta { justify-content: center; margin-top: 0.6rem; padding: 0.85rem 1.35rem; }
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.eaa-chrome-footer {
	--chrome-bg: #0f1117;
	--chrome-text: #f8fafc;
	--chrome-muted: rgba(248, 250, 252, 0.62);
	--chrome-border: rgba(255, 255, 255, 0.10);
	background: var(--chrome-bg);
	color: var(--chrome-text);
	margin-top: 0;
}
.eaa-chrome-footer .eaa-chrome-brand { color: var(--chrome-text); }
.eaa-chrome-footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	align-items: start;
	gap: 2rem;
	padding-top: clamp(2.25rem, 5vw, 3.5rem);
	padding-bottom: clamp(1.75rem, 4vw, 2.75rem);
}
.eaa-chrome-footer-brand p { margin: 0.6rem 0 0; color: var(--chrome-muted); font-size: 0.92rem; line-height: 1.6; max-width: 34ch; }
.eaa-chrome-footer-nav { display: flex; flex-direction: column; gap: 0.55rem; }
.eaa-chrome-footer-nav a,
.eaa-chrome-footer-contact a {
	color: var(--chrome-muted);
	text-decoration: none;
	font-size: 0.92rem;
	transition: color 0.15s ease;
}
.eaa-chrome-footer-nav a:hover, .eaa-chrome-footer-contact a:hover { color: var(--chrome-text); }
.eaa-chrome-copyright {
	border-top: 1px solid var(--chrome-border);
	padding-top: 1.1rem;
	padding-bottom: 1.4rem;
	color: var(--chrome-muted);
	font-size: 0.82rem;
}
@media (max-width: 860px) {
	.eaa-chrome-footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ==========================================================================
   THEME VARIANTS — Premium Suite (10)
   Each block only overrides the chrome custom properties + font family so
   the theme's own personality carries through. Palettes mirror each
   theme's *-core.css.
   ========================================================================== */

/* Ledger — deep navy, cyan accent */
body.eaa-ledger .eaa-chrome-header {
	--chrome-bg: rgba(11, 18, 32, 0.82); --chrome-text: #f8fafc;
	--chrome-muted: rgba(248, 250, 252, 0.62); --chrome-border: rgba(255, 255, 255, 0.09);
	--chrome-accent: #22d3ee; --chrome-accent-text: #06202a;
	font-family: 'DM Sans', system-ui, sans-serif;
}
body.eaa-ledger .eaa-chrome-footer {
	--chrome-bg: #0b1220; --chrome-border: rgba(255, 255, 255, 0.09);
	font-family: 'DM Sans', system-ui, sans-serif;
}

/* Zephyr — white, near-black, Apple blue */
body.eaa-zephyr .eaa-chrome-header {
	--chrome-bg: rgba(255, 255, 255, 0.85); --chrome-text: #1d1d1f;
	--chrome-muted: #6e6e73; --chrome-border: rgba(0, 0, 0, 0.08);
	--chrome-accent: #0071e3; --chrome-accent-text: #ffffff;
}
body.eaa-zephyr .eaa-chrome-footer { --chrome-bg: #1d1d1f; }
body.eaa-zephyr .eaa-chrome-cta { border-radius: 100px; }

/* Nomad — warm earth, handwritten spirit */
body.eaa-nomad .eaa-chrome-header {
	--chrome-bg: rgba(250, 244, 236, 0.88); --chrome-text: #2c1810;
	--chrome-muted: #6d5140; --chrome-border: rgba(44, 24, 16, 0.12);
	--chrome-accent: #e8956b; --chrome-accent-text: #2c1810;
}
body.eaa-nomad .eaa-chrome-footer { --chrome-bg: #2c1810; --chrome-border: rgba(232, 149, 107, 0.22); }

/* Signal — near-black, violet/blue dev-tool glow */
body.eaa-signal .eaa-chrome-header {
	--chrome-bg: rgba(9, 9, 11, 0.82); --chrome-text: #fafafa;
	--chrome-muted: rgba(250, 250, 250, 0.6); --chrome-border: rgba(255, 255, 255, 0.09);
	--chrome-accent: #a855f7; --chrome-accent-text: #ffffff;
}
body.eaa-signal .eaa-chrome-footer { --chrome-bg: #09090b; }
body.eaa-signal .eaa-chrome-cta { border-radius: 6px; }

/* Canvas — gallery bone white, ink, signal red */
body.eaa-canvas .eaa-chrome-header {
	--chrome-bg: rgba(239, 235, 228, 0.9); --chrome-text: #141414;
	--chrome-muted: #55524c; --chrome-border: rgba(20, 20, 20, 0.14);
	--chrome-accent: #f23000; --chrome-accent-text: #ffffff;
}
body.eaa-canvas .eaa-chrome-footer { --chrome-bg: #141414; }
body.eaa-canvas .eaa-chrome-cta { border-radius: 0; }

/* Hearth — letterpress warmth */
body.eaa-hearth .eaa-chrome-header {
	--chrome-bg: rgba(249, 245, 239, 0.9); --chrome-text: #2a2115;
	--chrome-muted: #6f5f49; --chrome-border: rgba(42, 33, 21, 0.12);
	--chrome-accent: #8a6f4f; --chrome-accent-text: #f9f5ef;
}
body.eaa-hearth .eaa-chrome-footer { --chrome-bg: #2a2115; --chrome-border: rgba(249, 245, 239, 0.14); }

/* Summit — midnight alpine, blaze orange */
body.eaa-summit .eaa-chrome-header {
	--chrome-bg: rgba(8, 20, 38, 0.84); --chrome-text: #e2f0fc;
	--chrome-muted: rgba(226, 240, 252, 0.62); --chrome-border: rgba(226, 240, 252, 0.1);
	--chrome-accent: #ff6b2c; --chrome-accent-text: #081426;
}
body.eaa-summit .eaa-chrome-footer { --chrome-bg: #081426; }

/* Chronicle — editorial paper, masthead red */
body.eaa-chronicle .eaa-chrome-header {
	--chrome-bg: rgba(251, 249, 245, 0.92); --chrome-text: #141414;
	--chrome-muted: #52504b; --chrome-border: rgba(20, 20, 20, 0.16);
	--chrome-accent: #d42a45; --chrome-accent-text: #ffffff;
}
body.eaa-chronicle .eaa-chrome-header .eaa-chrome-brand { font-family: Georgia, 'Times New Roman', serif; letter-spacing: 0; }
body.eaa-chronicle .eaa-chrome-footer { --chrome-bg: #141414; }

/* Harbor — enterprise navy, antique gold */
body.eaa-harbor .eaa-chrome-header {
	--chrome-bg: rgba(10, 24, 48, 0.86); --chrome-text: #f8f5ee;
	--chrome-muted: rgba(248, 245, 238, 0.62); --chrome-border: rgba(203, 169, 107, 0.24);
	--chrome-accent: #cba96b; --chrome-accent-text: #0a1830;
}
body.eaa-harbor .eaa-chrome-footer { --chrome-bg: #0a1830; --chrome-border: rgba(203, 169, 107, 0.24); }

/* Bloom — apothecary cream, terracotta */
body.eaa-bloom .eaa-chrome-header {
	--chrome-bg: rgba(255, 243, 232, 0.9); --chrome-text: #3a281c;
	--chrome-muted: #7c5f49; --chrome-border: rgba(58, 40, 28, 0.12);
	--chrome-accent: #c77e4a; --chrome-accent-text: #fff3e8;
}
body.eaa-bloom .eaa-chrome-footer { --chrome-bg: #3a281c; --chrome-border: rgba(255, 243, 232, 0.14); }
body.eaa-bloom .eaa-chrome-cta { border-radius: 100px; }

/* ==========================================================================
   FLAGSHIP SUITE THEMES — Foreman & Keystone (v1.8.0)
   These had NO chrome variant and fell to the neutral baseline; on their
   own surfaces the header washed grey-on-grey. Now each wears its theme's
   own palette, brand accent, and display font — and stays AA-legible.
   Brand vars resolve through the same host-sync chain as the sections, so
   Global Theme Sync recolours the chrome live too.
   ========================================================================== */
body.eaa-foreman .eaa-chrome-header {
	--chrome-bg: #14181D; --chrome-text: #F4F6F8;
	--chrome-muted: rgba(244,246,248,0.66); --chrome-border: rgba(255,255,255,0.10);
	--chrome-accent: var(--fm-brand, #F59E0B); --chrome-accent-text: #14181D;
}
body.eaa-foreman .eaa-chrome-header .eaa-chrome-brand { font-family: 'Archivo', system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.02em; }
body.eaa-foreman .eaa-chrome-footer { --chrome-bg: #14181D; --chrome-border: rgba(255,255,255,0.10); }
body.eaa-foreman .eaa-chrome-cta { border-radius: 6px; font-weight: 700; }

body.eaa-keystone .eaa-chrome-header {
	--chrome-bg: #FFFFFF; --chrome-text: #26221C;
	--chrome-muted: #6E675B; --chrome-border: #E7E2D6;
	--chrome-accent: var(--ks-brand, #2F6E4E); --chrome-accent-text: #FFFFFF;
}
body.eaa-keystone .eaa-chrome-header .eaa-chrome-brand { font-family: 'Marcellus', Georgia, serif; letter-spacing: 0; font-weight: 400; }
body.eaa-keystone .eaa-chrome-footer { --chrome-bg: #26221C; --chrome-border: rgba(255,255,255,0.12); }
body.eaa-keystone .eaa-chrome-cta { border-radius: 999px; }

/* ==========================================================================
   THEME VARIANTS — Classic Hub themes (7)
   ========================================================================== */

body.eaa-foundry .eaa-chrome-header {
	--chrome-bg: rgba(255, 255, 255, 0.92); --chrome-text: #16264a;
	--chrome-muted: #44506b; --chrome-border: rgba(22, 38, 74, 0.12);
	--chrome-accent: #d63b2c; --chrome-accent-text: #ffffff;
}
body.eaa-foundry .eaa-chrome-footer { --chrome-bg: #16264a; }

body.eaa-prestige .eaa-chrome-header {
	--chrome-bg: rgba(26, 25, 23, 0.88); --chrome-text: #f2f0eb;
	--chrome-muted: rgba(242, 240, 235, 0.6); --chrome-border: rgba(184, 145, 42, 0.28);
	--chrome-accent: #b8912a; --chrome-accent-text: #1a1917;
}
body.eaa-prestige .eaa-chrome-header .eaa-chrome-brand { font-family: Georgia, 'Times New Roman', serif; letter-spacing: 0.02em; }
body.eaa-prestige .eaa-chrome-footer { --chrome-bg: #1a1917; --chrome-border: rgba(184, 145, 42, 0.28); }

body.eaa-clinic .eaa-chrome-header {
	--chrome-bg: rgba(242, 247, 247, 0.92); --chrome-text: #0f2020;
	--chrome-muted: #3f5b5b; --chrome-border: rgba(13, 114, 114, 0.16);
	--chrome-accent: #0d7272; --chrome-accent-text: #ffffff;
}
body.eaa-clinic .eaa-chrome-footer { --chrome-bg: #0f2020; }

body.eaa-medici .eaa-chrome-header {
	--chrome-bg: rgba(242, 239, 230, 0.92); --chrome-text: #0f1c2e;
	--chrome-muted: #46536b; --chrome-border: rgba(15, 28, 46, 0.14);
	--chrome-accent: #a08540; --chrome-accent-text: #ffffff;
}
body.eaa-medici .eaa-chrome-footer { --chrome-bg: #0f1c2e; }

body.eaa-wayfarer .eaa-chrome-header {
	--chrome-bg: rgba(251, 246, 236, 0.9); --chrome-text: #3a2a22;
	--chrome-muted: #7a6252; --chrome-border: rgba(58, 42, 34, 0.12);
	--chrome-accent: #c1573a; --chrome-accent-text: #fbf6ec;
}
body.eaa-wayfarer .eaa-chrome-footer { --chrome-bg: #3a2a22; }

body.eaa-vertex .eaa-chrome-header {
	--chrome-bg: rgba(255, 255, 255, 0.9); --chrome-text: #14171c;
	--chrome-muted: #4a5262; --chrome-border: rgba(20, 23, 28, 0.1);
	--chrome-accent: #2451d9; --chrome-accent-text: #ffffff;
}
body.eaa-vertex .eaa-chrome-footer { --chrome-bg: #14171c; }
body.eaa-vertex .eaa-chrome-cta { border-radius: 6px; }

body.eaa-drift .eaa-chrome-header {
	--chrome-bg: rgba(12, 10, 8, 0.85); --chrome-text: #f5efe6;
	--chrome-muted: rgba(245, 239, 230, 0.6); --chrome-border: rgba(196, 123, 24, 0.24);
	--chrome-accent: #c47b18; --chrome-accent-text: #0c0a08;
}
body.eaa-drift .eaa-chrome-footer { --chrome-bg: #0c0a08; --chrome-border: rgba(196, 123, 24, 0.24); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.eaa-chrome-header, .eaa-chrome-cta, .eaa-chrome-burger span, .eaa-chrome-link { transition: none; }
}

/* ── v2.7.0 DROPDOWN NAVIGATION ─────────────────────────────────────────────
   Parent items with children render a dropdown: hover / keyboard focus on
   desktop, tap-to-expand accordion inside the burger menu on mobile. */
.eaa-chrome-item { position: relative; display: inline-flex; align-items: center; }
.eaa-chrome-parent { background: none; border: 0; font: inherit; color: inherit;
	cursor: pointer; display: inline-flex; align-items: center; gap: 5px; padding: 0; }
.eaa-chrome-caret { width: 8px; height: 8px; border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px);
	transition: transform .18s ease; opacity: .65; }
/* v2.10.3 — CONTRAST GUARD, all themes, no per-theme list. The dropdown
   always reuses ITS THEME'S OWN header bg/text pair (--chrome-bg /
   --chrome-text), which every theme block below already defines as a
   readable, checked pair for its own header text. Reusing that pair
   guarantees the dropdown can never go text-on-matching-background for
   ANY theme — including future ones — with zero per-theme maintenance. */
.eaa-chrome-dropdown { position: absolute; top: calc(100% + 10px); left: 50%;
	transform: translateX(-50%) translateY(6px); min-width: 210px;
	background: var(--chrome-bg, #ffffff); color: var(--chrome-text, #111827);
	border: 1px solid var(--chrome-border, rgba(0,0,0,.08));
	border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.14); padding: 8px;
	display: flex; flex-direction: column; gap: 2px; opacity: 0; visibility: hidden;
	transition: opacity .16s ease, transform .16s ease, visibility .16s; z-index: 60; }
.eaa-chrome-item:hover > .eaa-chrome-dropdown,
.eaa-chrome-item:focus-within > .eaa-chrome-dropdown,
.eaa-chrome-item.is-open > .eaa-chrome-dropdown {
	opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.eaa-chrome-item:hover > .eaa-chrome-parent .eaa-chrome-caret,
.eaa-chrome-item.is-open > .eaa-chrome-parent .eaa-chrome-caret {
	transform: rotate(225deg) translateY(-2px); }
.eaa-chrome-sublink { display: block; padding: 9px 12px; border-radius: 7px;
	font-size: .9em; text-decoration: none; color: inherit; white-space: nowrap; }

/* v2.10.3 — the old per-theme dark-dropdown list (Ledger/Signal/Harbor/
   Summit only) is retired: it silently missed Foreman, Prestige, and
   Drift, which is the class of bug that must never recur. The universal
   var(--chrome-bg)/var(--chrome-text) rule above now covers every theme,
   including these four and any future one, automatically. Hover state
   only needs a single theme-agnostic overlay that works on light or dark
   surfaces alike. */
.eaa-chrome-sublink:hover, .eaa-chrome-sublink:focus {
	background: color-mix(in srgb, var(--chrome-text, #111827) 8%, transparent); }

/* Mobile burger panel: dropdowns become accordions. */
@media (max-width: 860px) {
	.eaa-chrome-item { display: block; width: 100%; }
	.eaa-chrome-parent { width: 100%; justify-content: space-between; padding: 10px 0; }
	.eaa-chrome-dropdown { position: static; transform: none; min-width: 0;
		box-shadow: none; border: 0; border-left: 2px solid rgba(0,0,0,.12);
		border-radius: 0; padding: 0 0 0 14px; margin: 0 0 6px;
		max-height: 0; overflow: hidden; opacity: 1; visibility: visible;
		transition: max-height .22s ease; }
	.eaa-chrome-item.is-open > .eaa-chrome-dropdown { max-height: 480px; }
	.eaa-chrome-item:hover > .eaa-chrome-dropdown { max-height: 0; } /* hover means nothing on touch */
	.eaa-chrome-item.is-open:hover > .eaa-chrome-dropdown { max-height: 480px; }
	.eaa-chrome-sublink { white-space: normal; }
}
