/* ==========================================================================
   Ernestorm Explores — homepage concept
   --------------------------------------------------------------------------
   Contents
     1.  Design tokens (light + dark)
     2.  Reset & base
     3.  Accessibility utilities
     4.  Backdrop (the woods)
     5.  Layout primitives: .wrap, .panel, .section
     6.  Header & navigation
     7.  Buttons & links
     8.  Hero
     9.  Cards / videos / regions
     10. About
     11. Newsletter form
     12. Footer
     13. Responsive
     14. Motion, forced-colors, print
   ========================================================================== */


/* ── 1. Design tokens ──────────────────────────────────────────────────── */

:root {
  /* Type */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;

  /* Spacing & shape */
  --wrap: 68rem;
  --radius: 14px;
  --radius-lg: 22px;
  --pad-panel: clamp(1.5rem, 4vw, 3.25rem);

  /* Light theme (default) */
  --bg: #eceadf;
  --panel-bg: rgba(253, 252, 248, 0.90);
  --panel-border: rgba(31, 51, 42, 0.14);
  --panel-shadow: 0 18px 48px -24px rgba(20, 38, 30, 0.55);

  /*
    Contrast is measured through the whole compositing chain, not against an
    assumed opaque panel:

      SVG pixel -> --scrim over it -> --backdrop-filter applied to that group
                -> --panel-bg over that -> --chip-bg over that -> text

    Checked at both extremes of the artwork (its white bloom and its darkest
    floor fill). --text-faint is the tight one: it sits on --chip-bg, a second
    translucent layer, in .video-meta and .region-note.

    Light theme, measured: text 13.7-16.1:1, muted-on-chip 6.4-7.4:1,
    faint-on-chip 4.8-5.6:1, field border 3.7-4.4:1 (needs 3:1).

    Re-measure these if --scrim or --backdrop-filter changes: a lighter
    scrim lets more of the artwork through and lowers every figure here.
  */
  --text: #16211c;
  --text-muted: #3d4d45;
  --text-faint: #4f5f57;

  --accent: #1c5238;        /*  8.6:1 on --panel-bg  */
  --accent-strong: #143d29;
  --on-accent: #ffffff;     /*  8.3:1 on --accent    */

  --chip-bg: rgba(28, 82, 56, 0.10);
  --hairline: rgba(31, 51, 42, 0.16);
  --focus: #0b3f8f;         /* high-contrast against parchment */

  /* Fully opaque surface, for panels nested inside another blurred panel
     (a backdrop-filter ancestor is a backdrop root, so a descendant's own
     backdrop-filter resolves to nothing and leaves it see-through). */
  --panel-solid: #fbfaf6;

  /* Form-control boundary. Separate from --hairline: WCAG 1.4.11 wants 3:1
     for the edge of an input, while decorative dividers have no such floor. */
  --field-border: #6b7a72;  /* 4.3:1 on --panel-bg */

  /* Scrim over the forest art: keeps it visible but hazy */
  --scrim: linear-gradient(
      180deg,
      rgba(240, 238, 228, 0.34) 0%,
      rgba(238, 236, 226, 0.20) 45%,
      rgba(228, 226, 214, 0.44) 100%);
  --backdrop-filter: saturate(1.05) brightness(1.0) blur(1px);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0d1411;
  --panel-bg: rgba(20, 30, 26, 0.88);
  --panel-border: rgba(180, 214, 197, 0.16);
  --panel-shadow: 0 18px 48px -24px rgba(0, 0, 0, 0.85);

  /* Measured the same way: text 13.7-15.0:1, muted-on-chip 6.4-7.0:1,
     faint-on-chip 4.6-5.1:1, field border 4.8-5.3:1. The 4.6 is the
     tightest figure on the page — do not darken these further. */
  --text: #e9f1ec;
  --text-muted: #b2c4ba;
  --text-faint: #94a89e;

  --accent: #86cca6;
  --accent-strong: #a7ddc0;
  --on-accent: #08160f;     /* 12.1:1 on --accent   */

  --chip-bg: rgba(134, 204, 166, 0.14);
  --hairline: rgba(180, 214, 197, 0.18);
  --focus: #9ad0ff;
  --panel-solid: #151f1b;
  --field-border: #7f938a;  /* 4.6:1 on --panel-bg */

  --scrim: linear-gradient(
      180deg,
      rgba(8, 16, 12, 0.58) 0%,
      rgba(10, 20, 15, 0.46) 45%,
      rgba(6, 13, 10, 0.68) 100%);
  --backdrop-filter: saturate(0.85) brightness(0.62) blur(1px);

  color-scheme: dark;
}

/* Follow the OS when the visitor has not chosen a theme.
   `[data-theme]` above always wins, so an explicit choice sticks. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1411;
    --panel-bg: rgba(20, 30, 26, 0.88);
    --panel-border: rgba(180, 214, 197, 0.16);
    --panel-shadow: 0 18px 48px -24px rgba(0, 0, 0, 0.85);

    --text: #e9f1ec;
    --text-muted: #b2c4ba;
    --text-faint: #94a89e;

    --accent: #86cca6;
    --accent-strong: #a7ddc0;
    --on-accent: #08160f;

    --chip-bg: rgba(134, 204, 166, 0.14);
    --hairline: rgba(180, 214, 197, 0.18);
    --focus: #9ad0ff;
    --panel-solid: #151f1b;
    --field-border: #7f938a;

    --scrim: linear-gradient(
        180deg,
        rgba(8, 16, 12, 0.58) 0%,
        rgba(10, 20, 15, 0.46) 45%,
        rgba(6, 13, 10, 0.68) 100%);
    --backdrop-filter: saturate(0.85) brightness(0.62) blur(1px);

    color-scheme: dark;
  }
}


/* ── 2. Reset & base ───────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor targets clear the sticky header instead of hiding under it */
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.4vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.005em; }

p { margin: 0 0 1rem; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

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

ul { margin: 0; padding: 0; }
li { list-style: none; }


/* ── 3. Accessibility utilities ────────────────────────────────────────── */

/* Visible only to assistive tech */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 650;
  text-decoration: none;
  transition: top 140ms ease-out;
}
.skip-link:focus { top: 0; }

/* One consistent, high-contrast focus ring everywhere.
   Double ring so it stays visible on both light and dark surfaces. */
:where(a, button, input, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

/* <main> is only focusable as the skip link's landing point. Ringing the
   whole page would be noise, and it is not an interactive control. */
main:focus,
main:focus-visible { outline: none; }

/* The theme toggle only does anything once main.js runs, so hide it when
   scripting is unavailable rather than leaving a dead control with a stale
   label and aria-pressed. theme-init.js adds .js to <html> before first paint.
   A <noscript><style> block is not an option here: the CSP forbids inline
   styles, which is deliberate.

   Specificity note: this must outrank the plain `.theme-toggle` display rule
   further down, hence :root:not(.js) rather than a bare class. */
:root:not(.js) .theme-toggle { display: none; }


/* ── 4. Backdrop: the woods ────────────────────────────────────────────── */

/*
  Two fixed layers behind everything:
    .backdrop        → the forest illustration
    .backdrop::after → a theme-coloured scrim that hazes it back

  Fixed positioning (rather than `background-attachment: fixed`) keeps the
  image steady while scrolling without the repaint jank iOS Safari has.
*/
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url("../images/forest-bg.svg");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  filter: var(--backdrop-filter);
  pointer-events: none;
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scrim);
}


/* ── 5. Layout primitives ──────────────────────────────────────────────── */

.wrap {
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
}

/*
  Frosted content panel. The blur is what lets the woods stay visible
  behind the text while keeping contrast ratios well above 4.5:1.
*/
.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--panel-shadow);
  padding: var(--pad-panel);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  backdrop-filter: blur(14px) saturate(1.25);
}

/* If the browser cannot blur, fall back to a near-opaque panel so text
   never sits on a busy image. */
@supports not (backdrop-filter: blur(4px)) {
  :root       { --panel-bg: rgba(253, 252, 248, 0.985); }
  :root[data-theme="dark"] { --panel-bg: rgba(20, 30, 26, 0.985); }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) { --panel-bg: rgba(20, 30, 26, 0.985); }
  }
}

.section { padding-block: clamp(1.75rem, 4vw, 3rem); }

.section-head { max-width: 46rem; margin-bottom: 2rem; }
.section-sub { color: var(--text-muted); font-size: 1.075rem; margin: 0; }
.section-foot { margin-top: 2rem; }

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.6rem;
}


/* ── 6. Header & navigation ────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--panel-bg);
  border-bottom: 1px solid var(--panel-border);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  backdrop-filter: blur(14px) saturate(1.25);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.brand-mark { width: 30px; height: 30px; color: var(--accent); flex: none; }
.brand-text { display: grid; line-height: 1.15; }
.brand-text strong { font-size: 0.98rem; font-weight: 700; }
.brand-text span { font-size: 0.8rem; color: var(--text-muted); }

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.primary-nav a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 550;
  text-decoration: none;
}
.primary-nav a:hover {
  color: var(--text);
  background: var(--chip-bg);
}

/* Theme toggle */
.theme-toggle,
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  /* 44px min target on every side — WCAG 2.5.8 */
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}
.theme-toggle:hover,
.nav-toggle:hover { background: var(--chip-bg); }

.theme-toggle svg,
.nav-toggle svg { width: 18px; height: 18px; flex: none; }

/* Show sun in dark mode (click = go light) and moon in light mode. */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.nav-toggle { display: none; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }


/* ── 7. Buttons & links ────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover { background: var(--accent-strong); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--hairline);
}
.btn-secondary:hover { background: var(--chip-bg); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-arrow svg { width: 18px; height: 18px; }
.link-arrow:hover { color: var(--accent-strong); }


/* ── 8. Hero ───────────────────────────────────────────────────────────── */

.hero { padding-block: clamp(2.5rem, 8vw, 5.5rem) clamp(1.75rem, 4vw, 3rem); }
.hero-panel { max-width: 54rem; }

.lede {
  font-size: clamp(1.075rem, 1.9vw, 1.25rem);
  color: var(--text-muted);
  max-width: 42rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 5vw, 3rem);
  margin: 2.25rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}
.stat dt {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.stat dd {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--text);
}


/* ── 9. Cards, videos, regions ─────────────────────────────────────────── */

/* Four cards: 2x2 rather than auto-fit, which strands the fourth card
   alone on a second row at common desktop widths. */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 40rem) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.card {
  padding: 1.5rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--chip-bg);
}
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--text-muted); font-size: 0.975rem; margin: 0; }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
}
.card-icon svg { width: 24px; height: 24px; }

/* Video cards */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
}
.video-card a {
  display: block;
  height: 100%;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--chip-bg);
  color: inherit;
  text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease;
}
.video-card a:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  color: var(--accent-strong);
}
/* Stand-in artwork until real thumbnails are self-hosted.
   Loosely keyed to each video's setting: forest, river, desert, granite. */
.thumb-1 { background: linear-gradient(140deg, #3f6f57, #7fa98e); }
.thumb-2 { background: linear-gradient(140deg, #5c6b3f, #9fb07e); }
.thumb-3 { background: linear-gradient(140deg, #3d6b7c, #86b3c4); }
.thumb-4 { background: linear-gradient(140deg, #8a5a3c, #d2a077); }
.thumb-5 { background: linear-gradient(140deg, #4a5c74, #93a6bd); }
.thumb-6 { background: linear-gradient(140deg, #6b5f43, #b3a37e); }
.thumb .play { width: 52px; height: 52px; color: rgba(12, 24, 18, 0.55); }

.video-body { display: block; padding: 1.1rem 1.25rem 1.35rem; }
.video-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.075rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}
.video-meta { display: block; font-size: 0.875rem; color: var(--text-faint); }

/* Regions */
.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem;
}
.region {
  display: block;
  height: 100%;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease;
}
.region:hover { background: var(--chip-bg); border-color: var(--accent); }
.region-name { display: block; font-weight: 650; margin-bottom: 0.15rem; }
.region-note { display: block; font-size: 0.875rem; color: var(--text-faint); }


/* ── 10. About ─────────────────────────────────────────────────────────── */

.about-panel {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.portrait {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
}
.caption {
  margin-top: 0.6rem;
  font-size: 0.8125rem;
  color: var(--text-faint);
}
.about-body p { color: var(--text-muted); }

.credentials {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}
.credentials li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.credentials li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}


/* ── 11. Newsletter form ───────────────────────────────────────────────── */

.newsletter-panel { max-width: 46rem; }

.signup {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem;
}
.field { flex: 1 1 18rem; }

.signup label {
  display: block;
  font-size: 0.875rem;
  font-weight: 650;
  margin-bottom: 0.35rem;
}
.signup input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--field-border);
  border-radius: 10px;
  background: var(--panel-bg);
  color: var(--text);
  font: inherit;
}
.signup input::placeholder { color: var(--text-faint); }
.signup input[aria-invalid="true"] { border-color: #b3261e; border-width: 2px; }
:root[data-theme="dark"] .signup input[aria-invalid="true"] { border-color: #ffb4ab; }

.hint { margin: 0.4rem 0 0; font-size: 0.8125rem; color: var(--text-faint); }

.form-status {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.4rem;
}
.form-status[data-state="error"] { color: #8c1d18; }
.form-status[data-state="ok"] { color: var(--accent); }
:root[data-theme="dark"] .form-status[data-state="error"] { color: #ffb4ab; }

.demo-note {
  margin-top: 1.5rem;
  padding: 0.85rem 1.1rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--chip-bg);
  font-size: 0.9rem;
  color: var(--text-muted);
}


/* ── 12. Footer ────────────────────────────────────────────────────────── */

.site-footer { padding-block: clamp(1.75rem, 4vw, 3rem) 2.5rem; }

.footer-cols {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  gap: 2rem;
}
.footer-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin: 0 0 0.25rem; }
.footer-sub { color: var(--text-muted); font-size: 0.925rem; margin: 0; }

.footer-heading {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 0.75rem;
}
.footer-nav ul, .footer-social ul { display: grid; gap: 0.4rem; }
.footer-nav a, .footer-social a {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-decoration: none;
}
.footer-nav a:hover, .footer-social a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.colophon {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.85rem;
  color: var(--text-faint);
}
.draft-flag { font-style: italic; }


/* ── 13. Responsive ────────────────────────────────────────────────────── */

@media (max-width: 62rem) {
  .about-panel { grid-template-columns: 1fr; }
  .about-media { max-width: 15rem; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 48rem) {
  .nav-toggle { display: inline-flex; }
  .theme-toggle .theme-toggle-text { display: none; }
  .theme-toggle { padding: 0.5rem; width: 44px; justify-content: center; }

  /* Collapsed menu: a full-width drop panel under the header.
     Opaque on purpose — see --panel-solid. */
  .primary-nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    padding: 0.75rem 1rem 1rem;
    background: var(--panel-solid);
    border-bottom: 1px solid var(--panel-border);
    box-shadow: 0 16px 32px -20px rgba(0, 0, 0, 0.6);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0.15rem; }
  .primary-nav a { padding: 0.8rem 0.75rem; font-size: 1rem; }

  .site-header { position: sticky; }
  .header-inner { position: relative; }

  /* Keep the brand on one line so the sticky header stays compact */
  .brand-mark { width: 26px; height: 26px; }
  .brand-text strong { font-size: 0.875rem; }
  .brand-text span { font-size: 0.72rem; }

  .footer-cols { grid-template-columns: 1fr; gap: 1.75rem; }
  .stats { gap: 1.25rem 2rem; }
}


/* ── 14. Motion, forced colors, print ──────────────────────────────────── */

@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;
  }
  .video-card a:hover { transform: none; }
}

/* Windows High Contrast / forced-colors: drop the decorative art and let the
   OS palette drive everything. */
@media (forced-colors: active) {
  .backdrop { display: none; }
  .panel, .card, .region, .video-card a, .signup input {
    border: 1px solid CanvasText;
  }
  .card-icon { background: Canvas; color: CanvasText; border: 1px solid CanvasText; }
  :where(a, button, input, [tabindex]):focus-visible { outline: 3px solid Highlight; }
}

@media print {
  .backdrop, .site-header, .theme-toggle, .nav-toggle { display: none !important; }
  .panel { box-shadow: none; border: 1px solid #999; background: #fff; }
  body { background: #fff; color: #000; }
}
