/* ==========================================================================
   The Honest Miles V2: global styles
   Tokens, base, typography, layout, header, mobile menu, footer, buttons,
   forms, cards, sections and every legacy class used by the public pages.
   Signature components live in components.css. Behavior lives in js/site.js.
   ========================================================================== */

/* ---- 1. Tokens ---------------------------------------------------------- */
:root {
  /* Palette */
  --hm-sage: #6e8257;
  --hm-sage-deep: #3f4d31;
  --hm-sage-ink: #26301d;
  --hm-cream: #f5efe0;
  --hm-sand: #e4d5b7;
  --hm-paper: #fbf8f1;
  --hm-ink: #2c2a24;
  --hm-ink-soft: #5b574b;
  --hm-sun: #d9793f;
  --hm-sun-deep: #b9612d;
  --hm-sun-soft: #f3d8c2;
  --hm-white: #ffffff;
  --hm-danger: #a8362f;
  --hm-success: #3f6b35;

  /* Derived tints */
  --hm-line: rgba(63, 77, 49, 0.16);
  --hm-line-strong: rgba(63, 77, 49, 0.32);
  --hm-sage-tint: rgba(110, 130, 87, 0.12);
  --hm-on-dark: #f5efe0;
  --hm-on-dark-soft: rgba(245, 239, 224, 0.76);

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fs-xs: 0.78rem;
  --fs-sm: 0.9rem;
  --fs-base: 1.0625rem;
  --fs-lg: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  --fs-h4: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  --fs-h3: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem);
  --fs-h2: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
  --fs-h1: clamp(2.6rem, 1.6rem + 4.6vw, 5.4rem);
  --fs-display: clamp(3rem, 1.6rem + 6.8vw, 7.5rem);
  --tracking-tight: -0.022em;
  --tracking-eyebrow: 0.16em;

  /* Space and layout */
  --container: 1180px;
  --container-narrow: 760px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(72px, 9vw, 136px);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Shape and depth */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(38, 48, 29, 0.06), 0 2px 8px rgba(38, 48, 29, 0.05);
  --shadow: 0 1px 2px rgba(38, 48, 29, 0.06), 0 8px 24px -6px rgba(38, 48, 29, 0.12), 0 24px 48px -24px rgba(38, 48, 29, 0.14);
  --shadow-lg: 0 2px 4px rgba(38, 48, 29, 0.06), 0 18px 40px -12px rgba(38, 48, 29, 0.22), 0 48px 96px -32px rgba(38, 48, 29, 0.24);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 200ms;
  --dur: 320ms;
  --dur-slow: 450ms;

  --header-h: 76px;

  /* Legacy aliases (V1 names). Keep these working for every page style block. */
  --hmb-green: var(--hm-sage);
  --hmb-green-dark: var(--hm-sage-deep);
  --hmb-cream: var(--hm-sand);
  --hmb-cream-light: var(--hm-cream);
  --hmb-ink: var(--hm-ink);
  --hmb-white: var(--hm-white);
}

/* ---- 2. Base ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--hm-ink);
  background: var(--hm-cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
hr { border: 0; height: 1px; background: var(--hm-line); margin: var(--space-7) 0; }
::selection { background: var(--hm-sun-soft); color: var(--hm-ink); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: var(--tracking-tight);
  font-optical-sizing: auto;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.15; }
h4 { font-size: var(--fs-h4); line-height: 1.2; }
p { text-wrap: pretty; }

/* Focus: visible, warm, consistent */
:focus-visible {
  outline: 3px solid var(--hm-sun);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible, .site-footer :focus-visible, .menu-sheet :focus-visible,
.section--sage :focus-visible, .section--dark :focus-visible { outline-color: var(--hm-sand); }

/* Skip link */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 1000;
  background: var(--hm-sage-ink);
  color: var(--hm-cream);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  text-decoration: none;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 12px; }
main:focus { outline: none; }

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

/* ---- 3. Layout ---------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap--narrow { max-width: calc(var(--container-narrow) + var(--gutter) * 2); }
.wrap--wide { max-width: calc(1400px + var(--gutter) * 2); }

section { padding: var(--section-y) 0; position: relative; overflow-x: clip; }
section.alt, .section--sand { background: var(--hm-sand); }
.section--paper { background: var(--hm-paper); }
.section--cream { background: var(--hm-cream); }
.section--sage, .section--dark { background: var(--hm-sage-ink); color: var(--hm-on-dark); }
.section--sage-deep { background: var(--hm-sage-deep); color: var(--hm-on-dark); }
.section--tight { padding: clamp(48px, 6vw, 80px) 0; }
.section--flush-top { padding-top: 0; }

/* Dark section inheritance for legacy classes */
.section--sage .section-eyebrow, .section--dark .section-eyebrow, .section--sage-deep .section-eyebrow,
.on-dark .section-eyebrow { color: var(--hm-sand); }
.section--sage .section-intro, .section--dark .section-intro, .section--sage-deep .section-intro,
.on-dark .section-intro,
.section--sage .pullquote-sub, .section--dark .pullquote-sub, .on-dark .pullquote-sub { color: var(--hm-on-dark-soft); }
.section--sage .pullquote, .section--dark .pullquote, .on-dark .pullquote { color: var(--hm-sand); }

.stack > * + * { margin-top: var(--space-4); }
.center { text-align: center; }
.muted { color: var(--hm-ink-soft); }

/* ---- 4. Header ---------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 239, 224, 0.94);
  border-bottom: 1px solid transparent;
  transition: background var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header { background: rgba(245, 239, 224, 0.72); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); }
  .site-header.is-scrolled { background: rgba(251, 248, 241, 0.8); }
}
.site-header.is-scrolled {
  border-bottom-color: var(--hm-line);
  box-shadow: 0 10px 30px -18px rgba(38, 48, 29, 0.35);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  transition: min-height var(--dur) var(--ease-out);
}
.site-header.is-compact .wrap { min-height: 60px; }
.site-header .brand { display: inline-flex; align-items: center; border-radius: 8px; flex: none; }
.site-header img.logo { height: 44px; width: auto; transition: height var(--dur) var(--ease-out); }
.site-header.is-compact img.logo { height: 34px; }
.site-header .header-right { display: flex; align-items: center; gap: 10px; }

.site-header nav { display: flex; align-items: center; gap: 2px; }
.site-header nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--hm-ink);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.site-header nav a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px; bottom: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--hm-sun);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}
.site-header nav a:not(.btn):hover::after,
.site-header nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-header nav a[aria-current="page"] { color: var(--hm-sage-deep); }
.site-header nav a.btn { margin-left: 10px; padding: 0 24px; }

.header-cta { display: none !important; }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--hm-paper);
  border: 1px solid var(--hm-line);
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--hm-sage-deep);
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.nav-toggle:hover { background: var(--hm-white); }
.nav-toggle:active { transform: scale(0.96); }
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 1100px) {
  .site-header nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-cta { display: inline-flex !important; }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .site-header img.logo { height: 34px; }
  .site-header.is-compact img.logo { height: 30px; }
  .site-header.is-compact .wrap { min-height: 56px; }
  .header-cta.btn { min-height: 44px; padding: 0 18px; font-size: 0.78rem; }
}

/* ---- 5. Mobile menu sheet ---------------------------------------------- */
.menu-sheet {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  background: var(--hm-sage-ink);
  color: var(--hm-on-dark);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 var(--gutter) calc(24px + env(safe-area-inset-bottom));
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.menu-sheet[hidden] { display: none; }
.menu-sheet.is-open { opacity: 1; transform: none; }
.menu-sheet::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 90% 0%, rgba(217, 121, 63, 0.22), transparent 70%),
    radial-gradient(70% 60% at 0% 100%, rgba(110, 130, 87, 0.35), transparent 70%);
}
.menu-sheet > * { position: relative; }
.menu-sheet-top { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }
.menu-sheet-top img { height: 34px; width: auto; }
.menu-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(245, 239, 224, 0.25);
  background: rgba(245, 239, 224, 0.08);
  color: var(--hm-cream);
  cursor: pointer;
}
.menu-close svg { width: 22px; height: 22px; }
.menu-primary { list-style: none; margin: 16px 0 0; padding: 0; }
.menu-primary li { border-bottom: 1px solid rgba(245, 239, 224, 0.12); }
.menu-primary a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 7vw, 2.6rem);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  line-height: 1.1;
  text-decoration: none;
  color: var(--hm-cream);
}
.menu-primary a .menu-num { font-family: var(--font-body); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; color: var(--hm-on-dark-soft); }
.menu-primary a[aria-current="page"] { color: var(--hm-sun-soft); }
.menu-primary a:hover { color: var(--hm-white); }
.menu-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}
.menu-secondary a {
  display: flex; align-items: center; min-height: 44px;
  color: var(--hm-on-dark-soft);
  font-weight: 700;
  text-decoration: none;
}
.menu-secondary a:hover, .menu-secondary a[aria-current="page"] { color: var(--hm-cream); }
.menu-sheet-cta { margin-top: auto; padding-top: 32px; display: grid; gap: 10px; }
.menu-sheet-cta .btn { width: 100%; }
.menu-sheet.is-open .menu-primary li,
.menu-sheet.is-open .menu-secondary,
.menu-sheet.is-open .menu-sheet-cta {
  animation: menu-in var(--dur-slow) var(--ease-out) both;
  animation-delay: calc(60ms + var(--i, 0) * 45ms);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
html.menu-open, html.menu-open body { overflow: hidden; }

/* ---- 6. Buttons --------------------------------------------------------- */
.btn {
  --btn-bg: var(--hm-sage-deep);
  --btn-fg: var(--hm-cream);
  --btn-border: var(--hm-sage-deep);
  --btn-bg-hover: var(--hm-sage-ink);
  --btn-fg-hover: var(--hm-cream);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 30px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  border: 2px solid var(--btn-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 6px 16px -8px rgba(38, 48, 29, 0.45);
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-fg-hover);
  border-color: var(--btn-bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 14px 28px -12px rgba(38, 48, 29, 0.55);
  text-decoration: none;
}
.btn:active { transform: translateY(0) scale(0.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Primary CTA: warm sun with dark ink text (ink on sun passes 4.5:1, white does not) */
.btn--sun, .btn-primary {
  --btn-bg: var(--hm-sun);
  --btn-fg: var(--hm-ink);
  --btn-border: var(--hm-sun);
  --btn-bg-hover: #e48a53;
  --btn-fg-hover: var(--hm-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 8px 20px -8px rgba(185, 97, 45, 0.6);
}
.btn--sun:hover, .btn-primary:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 16px 32px -12px rgba(185, 97, 45, 0.7); }

.btn-outline, .btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--hm-sage-deep);
  --btn-border: var(--hm-sage-deep);
  --btn-bg-hover: var(--hm-sage-deep);
  --btn-fg-hover: var(--hm-cream);
  box-shadow: none;
}
.btn-outline:hover, .btn--outline:hover { border-color: var(--hm-sage-deep); }

.btn--light {
  --btn-bg: var(--hm-cream);
  --btn-fg: var(--hm-sage-ink);
  --btn-border: var(--hm-cream);
  --btn-bg-hover: var(--hm-white);
  --btn-fg-hover: var(--hm-sage-ink);
}
.btn--ghost-light {
  --btn-bg: transparent;
  --btn-fg: var(--hm-cream);
  --btn-border: rgba(245, 239, 224, 0.5);
  --btn-bg-hover: var(--hm-cream);
  --btn-fg-hover: var(--hm-sage-ink);
  box-shadow: none;
}
.btn--ghost-light:hover { border-color: var(--hm-cream); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 0.78rem; }
.btn--lg { min-height: 60px; padding: 0 38px; font-size: 0.92rem; }
.btn--block { width: 100%; }

/* Outline buttons on dark sections flip automatically */
.section--sage .btn-outline, .section--dark .btn-outline, .on-dark .btn-outline, .final-cta .btn-outline {
  --btn-fg: var(--hm-cream);
  --btn-border: rgba(245, 239, 224, 0.55);
  --btn-bg-hover: var(--hm-cream);
  --btn-fg-hover: var(--hm-sage-ink);
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
  font-weight: 800; color: var(--hm-sage-deep); text-decoration: none;
}
.link-arrow svg { width: 18px; height: 18px; transition: transform var(--dur) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }
.on-dark .link-arrow, .section--sage .link-arrow, .section--dark .link-arrow { color: var(--hm-sand); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.center .btn-row, .btn-row.center { justify-content: center; }

/* ---- 7. Forms (global defaults; page style blocks may refine) ---------- */
input, select, textarea { font: inherit; color: var(--hm-ink); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"],
input[type="password"], input[type="search"], input[type="url"], select, textarea {
  min-height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hm-line-strong);
  background-color: var(--hm-white);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
textarea { min-height: 96px; }
input:hover, select:hover, textarea:hover { border-color: var(--hm-sage); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--hm-sage-deep);
  box-shadow: 0 0 0 4px rgba(110, 130, 87, 0.24);
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--hm-sage-deep); width: 18px; height: 18px; min-height: 0; }
input[type="checkbox"]:focus, input[type="radio"]:focus { box-shadow: none; }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 3px solid var(--hm-sun); outline-offset: 2px; }
::placeholder { color: #8a8574; opacity: 1; }
select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233f4d31' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}
select[multiple] { background-image: none; padding-right: 14px !important; }

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hm-sage-deep);
}
.input { width: 100%; padding: 12px 16px; }
.form-msg { font-size: 0.92rem; min-height: 1.4em; }
.form-msg.is-error { color: var(--hm-danger); }
.form-msg.is-success { color: var(--hm-success); }

/* Honeypot fallback (pages also define this) */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- 8. Legacy hero (index V1 markup) ---------------------------------- */
.hero { padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 6vw, 80px); text-align: center; }
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  font-size: var(--fs-xs);
  color: var(--hm-sage-deep);
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--hm-ink);
  line-height: 0.98;
}
.hero .tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.3rem, 1rem + 1.2vw, 1.9rem);
  color: var(--hm-sage-deep);
  margin-bottom: 22px;
}
.hero p.lede { max-width: 640px; margin: 0 auto 28px; font-size: var(--fs-lg); color: var(--hm-ink-soft); }
.hero .meta {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--hm-sage-deep);
  margin-bottom: 30px;
}
.hero .meta span {
  display: inline-flex; align-items: center;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--hm-paper);
  border: 1px solid var(--hm-line);
}
.hero .photo-placeholder, .hero .photo-real { margin-top: 48px; }

.photo-placeholder {
  background: var(--hm-sand);
  border: 2px dashed var(--hm-sage);
  border-radius: var(--radius-lg);
  aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center;
  color: var(--hm-sage-deep);
  font-size: 0.9rem;
  font-style: italic;
  text-align: center;
  padding: 20px;
}
.photo-real {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
  box-shadow: var(--shadow-lg);
}

/* ---- 9. Section heading styles (legacy) -------------------------------- */
.section-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  font-size: var(--fs-xs);
  color: var(--hm-sage-deep);
  text-align: center;
  margin-bottom: 14px;
}
.section-eyebrow::before, .section-eyebrow::after {
  content: '';
  flex: none;
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 600;
  text-align: center;
  margin: 0 auto 20px;
  max-width: 20ch;
}
.section-title em { font-style: italic; font-weight: 400; color: var(--hm-sage); }
.section--sage .section-title em, .section--dark .section-title em, .on-dark .section-title em { color: var(--hm-sand); }
.section-intro {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
  color: var(--hm-ink-soft);
  font-size: var(--fs-lg);
}
.pullquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
  max-width: 760px;
  margin: 40px auto 20px;
  color: var(--hm-sage-deep);
  text-wrap: balance;
}
.pullquote-sub { text-align: center; max-width: 580px; margin: 0 auto; color: var(--hm-ink-soft); font-size: 1rem; }

/* ---- 10. Legacy mile course timeline ----------------------------------- */
.course-timeline { position: relative; display: flex; flex-direction: column; max-width: 760px; margin: 0 auto; }
.mile-step { position: relative; display: flex; gap: 24px; align-items: center; padding: 14px 0; }
.mile-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 35px;
  top: 50%;
  height: 100%;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--hm-sage) 0 6px, transparent 6px 12px);
  opacity: 0.6;
}
.mile-badge {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--hm-sage-deep);
  color: var(--hm-cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  line-height: 1.05;
  box-shadow: 0 0 0 6px var(--hm-cream), var(--shadow);
  position: relative;
  z-index: 1;
}
section.alt .mile-badge { box-shadow: 0 0 0 6px var(--hm-sand), var(--shadow); }
.mile-badge .label { font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }
.mile-badge .num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.mile-step.finish .mile-badge { background: var(--hm-sun); color: var(--hm-ink); }
.mile-step.finish .mile-badge .num { font-size: 0.78rem; font-family: var(--font-body); font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.mile-content {
  flex: 1;
  min-width: 0;
  background: var(--hm-paper);
  border: 1px solid var(--hm-line);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
}
.mile-content h3 {
  margin: 0 0 4px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--hm-sage-deep);
}
.mile-content p { margin: 0; font-family: var(--font-display); font-style: italic; font-size: 1.2rem; line-height: 1.35; color: var(--hm-ink); }

/* ---- 11. Cards ---------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.card {
  position: relative;
  background: var(--hm-paper);
  border-radius: var(--radius);
  padding: 30px 26px;
  border: 1px solid var(--hm-line);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .card-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hm-sage-deep);
  margin-bottom: 10px;
}
.card h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: var(--fs-h4); }
.card p { margin: 0; color: var(--hm-ink-soft); font-size: 0.98rem; }
.card--dark { background: var(--hm-sage-ink); color: var(--hm-on-dark); border-color: transparent; }
.card--dark p { color: var(--hm-on-dark-soft); }
.card--dark .card-eyebrow { color: var(--hm-sand); }

.icon-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--hm-sage-tint); color: var(--hm-sage-deep);
  margin-bottom: 18px;
}
.icon-badge svg { width: 24px; height: 24px; }

/* Honest card prompts */
.prompt-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; max-width: 860px; margin: 0 auto; }
.prompt {
  position: relative;
  background: var(--hm-paper);
  border: 1px solid var(--hm-line);
  border-radius: var(--radius);
  padding: 24px 26px 24px 30px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.35;
  color: var(--hm-ink);
  box-shadow: var(--shadow-sm);
}
.prompt::before {
  content: '';
  position: absolute;
  left: 0; top: 22px; bottom: 22px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--hm-sun);
}

/* Feeling word wall */
.wall { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; max-width: 780px; margin: 0 auto 20px; }
.wall-col {
  flex: 1 1 260px;
  text-align: center;
  background: var(--hm-paper);
  border: 1px solid var(--hm-line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}
.wall-col h4 {
  font-family: var(--font-body);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--hm-sage-deep);
  margin: 0 0 16px;
}
.wall-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.wall-col li {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: var(--hm-cream);
}
.wall-col.arrived li { color: #6a5d44; }
.wall-col.left li { color: var(--hm-sage-deep); font-weight: 600; background: rgba(110, 130, 87, 0.16); }

/* Medal */
.medal-block { text-align: center; }
.medal-placeholder {
  width: 220px; height: 220px;
  border-radius: 50%;
  margin: 0 auto 24px;
  background: var(--hm-sand);
  border: 3px dashed var(--hm-sage);
  display: flex; align-items: center; justify-content: center;
  color: var(--hm-sage-deep);
  font-size: 0.85rem;
  font-style: italic;
  text-align: center;
  padding: 16px;
}
.medal-real {
  max-width: 380px;
  width: 100%;
  height: auto;
  margin: 8px auto 32px;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* Final CTA */
.final-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  background: var(--hm-sage-ink);
  color: var(--hm-cream);
  border-radius: var(--radius-lg);
  padding: clamp(48px, 7vw, 88px) clamp(22px, 5vw, 64px);
  box-shadow: var(--shadow-lg);
}
.final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(50% 60% at 85% 10%, rgba(217, 121, 63, 0.28), transparent 70%),
    radial-gradient(60% 70% at 10% 100%, rgba(110, 130, 87, 0.5), transparent 70%);
}
.final-cta h2 { font-family: var(--font-display); font-size: var(--fs-h2); margin: 0 0 14px; color: var(--hm-cream); }
.final-cta p { max-width: 520px; margin: 0 auto 28px; color: var(--hm-on-dark-soft); font-size: var(--fs-lg); }
.final-cta .btn:not(.btn-outline) {
  --btn-bg: var(--hm-sun);
  --btn-fg: var(--hm-ink);
  --btn-border: var(--hm-sun);
  --btn-bg-hover: #e48a53;
  --btn-fg-hover: var(--hm-ink);
}
.final-cta .meta { margin-top: 20px; font-size: 0.9rem; color: var(--hm-on-dark-soft); font-weight: 700; }

.email-capture {
  margin: 36px auto 0;
  max-width: 480px;
  padding-top: 28px;
  border-top: 1px solid rgba(245, 239, 224, 0.16);
}
.email-capture p { font-size: 0.92rem; color: var(--hm-on-dark-soft); margin: 0 0 14px; }
.email-capture form { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.email-capture input[type=email] {
  flex: 1;
  min-width: 200px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(245, 239, 224, 0.3);
  background: var(--hm-paper);
  font-size: 0.95rem;
}
.email-capture .btn { min-height: 52px; padding: 0 24px; }
.email-capture .cf-turnstile { flex-basis: 100%; display: flex; justify-content: center; }

/* ---- 12. Footer --------------------------------------------------------- */
.site-footer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--hm-sage-ink);
  color: var(--hm-on-dark);
  font-size: 0.95rem;
  padding: clamp(64px, 8vw, 104px) 0 calc(28px + env(safe-area-inset-bottom));
  text-align: left;
}
.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40% 50% at 100% 0%, rgba(217, 121, 63, 0.16), transparent 70%),
    radial-gradient(50% 60% at 0% 0%, rgba(110, 130, 87, 0.28), transparent 70%);
}
.site-footer .wrap { display: block; }
.site-footer a { color: var(--hm-on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--hm-white); text-decoration: underline; }

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: end;
  padding-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid rgba(245, 239, 224, 0.14);
}
.footer-statement {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 1.4rem + 3.4vw, 4.2rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: var(--tracking-tight);
  color: var(--hm-cream);
}
.footer-statement em { display: block; font-style: italic; font-weight: 400; color: var(--hm-sand); }
.footer-top .btn-row { margin-top: 28px; }

.footer-news-title {
  margin: 0 0 6px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--hm-sand);
}
.footer-news p { margin: 0 0 14px; color: var(--hm-on-dark-soft); font-size: 0.95rem; }
.footer-news-row {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: var(--radius-pill);
  background: rgba(245, 239, 224, 0.08);
  border: 1px solid rgba(245, 239, 224, 0.2);
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.footer-news-row:focus-within { border-color: var(--hm-sand); background: rgba(245, 239, 224, 0.12); }
.footer-news-row input[type="email"] {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--hm-cream);
  box-shadow: none;
}
.footer-news-row input[type="email"]::placeholder { color: rgba(245, 239, 224, 0.66); }
.footer-news-row input[type="email"]:focus { box-shadow: none; }
.footer-news-row .btn { min-height: 44px; padding: 0 20px; font-size: 0.78rem; flex: none; }
.footer-news .cf-turnstile { margin: 12px 0 0 !important; }
.footer-news .form-msg { margin: 10px 0 0; color: var(--hm-on-dark-soft); font-size: 0.9rem; }
.footer-news .form-msg.is-error { color: #f6c2b0; }
.footer-news .form-msg.is-success { color: var(--hm-sand); }

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding: clamp(40px, 5vw, 64px) 0;
}
.footer-brand img { height: 44px; width: auto; margin-bottom: 16px; }
.footer-brand .tagline { font-size: 1.3rem; margin-bottom: 8px; }
.footer-brand p { margin: 0; color: var(--hm-on-dark-soft); max-width: 34ch; font-size: 0.95rem; }
.footer-col h3 {
  margin: 0 0 10px;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--hm-sand);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col a { display: inline-flex; align-items: center; min-height: 40px; color: var(--hm-on-dark-soft); }
.footer-col a:hover { color: var(--hm-cream); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(245, 239, 224, 0.14);
  font-size: 0.85rem;
  color: var(--hm-on-dark-soft);
}
.footer-bottom p { margin: 0; }
.site-footer .tagline { font-family: var(--font-display); font-style: italic; color: var(--hm-sand); }
.site-footer .credit { font-size: 0.82rem; margin: 0; }
.site-footer .credit a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--hm-on-dark-soft); text-decoration: none; }
.site-footer .credit a:hover { color: var(--hm-cream); }
.site-footer .credit-logo { height: 28px; width: auto; padding: 3px 7px; border-radius: 6px; background: var(--hm-paper); vertical-align: middle; }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr; align-items: start; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .footer-news-row { flex-direction: column; border-radius: var(--radius); }
  .footer-news-row input[type="email"] { min-height: 48px; }
  .footer-news-row .btn { width: 100%; }
}

/* ---- 13. Music toggle (index) ------------------------------------------ */
#music-toggle {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  right: 20px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  background: var(--hm-sage-ink);
  color: var(--hm-cream);
  border: 1px solid rgba(245, 239, 224, 0.18);
  border-radius: var(--radius-pill);
  padding: 0 18px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform var(--dur-fast) var(--ease-out), bottom var(--dur) var(--ease-out);
}
#music-toggle:hover { transform: translateY(-2px); }
#music-toggle #music-icon { font-size: 1rem; }
#music-toggle.playing #music-icon { animation: music-pulse 1s ease-in-out infinite; }
@keyframes music-pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
body.sticky-cta-visible #music-toggle { bottom: calc(92px + env(safe-area-inset-bottom)); }

/* ---- 14. Small-screen legacy adjustments ------------------------------- */
@media (max-width: 640px) {
  .btn { padding: 0 24px; font-size: 0.8rem; }
  .mile-step { gap: 16px; }
  .mile-badge { width: 60px; height: 60px; }
  .mile-step:not(:last-child)::after { left: 29px; }
  .mile-badge .num { font-size: 1.25rem; }
  .mile-content { padding: 14px 16px; }
  .mile-content p { font-size: 1.05rem; }
  .wall { gap: 14px; }
}

/* ---- 15. Reduced motion ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.hero .eyebrow::after { content: ''; width: 32px; height: 2px; border-radius: 2px; background: var(--hm-sun); flex: none; }
/* Leave room so fixed widgets (sticky CTA, music toggle) never cover the credit line */
@media (max-width: 767px) {
  .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
