/* ============================================================
   The UK Missing Pet Atlas — styles.css
   Dark-first, warm amber + coral accent, editorial typography.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --ink: #f5efe6;
  --ink-dim: #c9c0b0;
  --ink-mute: #8f867a;
  --bg: #0e0e10;
  --bg-2: #16161a;
  --bg-3: #1e1e24;
  --line: #2a2a32;
  --amber: #e8a33d;
  --amber-deep: #c98522;
  --coral: #f26d5b;
  --cream: #f5efe6;
  --slate: #6b7280;
  --success: #5bd49a;

  /* Waggel client brand */
  --waggel-blue: #00bdff;
  --waggel-ink: #161414;
  --waggel-cream: #f6f1e9;

  --serif: 'Fraunces', 'Playfair Display', ui-serif, Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, 'Courier New', monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 6px 24px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 20px 60px rgba(0, 0, 0, 0.45);

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);

  --t-fast: 160ms cubic-bezier(.2, .8, .2, 1);
  --t-mid: 420ms cubic-bezier(.2, .8, .2, 1);
  --t-slow: 760ms cubic-bezier(.2, .8, .2, 1);
}

/* Light theme = Waggel brand palette: warm cream page with cyan-blue accent */
[data-theme='light'] {
  --ink: #161414;
  --ink-dim: #3d3a36;
  --ink-mute: #6c665e;
  --bg: #f6f1e9;
  --bg-2: #ffffff;
  --bg-3: #ece5d6;
  --line: #d8cfbc;
  --amber: #00bdff;       /* becomes Waggel cyan in light mode */
  --amber-deep: #0092c6;
  --coral: #f26d5b;
  --cream: #161414;
  --slate: #596273;
  --shadow-1: 0 1px 0 rgba(0, 0, 0, 0.03) inset, 0 6px 18px rgba(20, 15, 5, 0.08);
  --shadow-2: 0 1px 0 rgba(0, 0, 0, 0.04) inset, 0 24px 48px rgba(20, 15, 5, 0.12);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1, 'ss01' 1;
  overflow-x: hidden;
  transition: background-color var(--t-mid), color var(--t-mid);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--amber) 60%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--amber); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Numbers everywhere should be tabular */
.stat-value, .num, tbody td.num, .chart-box text, svg text,
.tnum, [data-counter] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1, 'kern' 1;
}

/* ---------- Layout primitives ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding: clamp(64px, 9vw, 140px) 0;
  position: relative;
}
.section + .section { border-top: 1px solid var(--line); }

.section-header {
  max-width: 780px;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.kicker {
  font-family: var(--mono), monospace;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--amber);
  margin: 0 0 18px;
  font-weight: 600;
}
.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  font-style: normal;
}
.section-title em { font-style: italic; color: var(--amber); }
.section-dek {
  font-size: clamp(16px, 1.2vw, 19px);
  color: var(--ink-dim);
  max-width: 64ch;
  margin: 0;
}
.subsection-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(22px, 2.2vw, 32px);
  margin: 60px 0 22px;
  letter-spacing: -0.015em;
}

/* ---------- Top nav ---------- */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  transition: background-color var(--t-mid);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-mark { font-size: 20px; filter: saturate(1.1); }

.brand-divider {
  display: inline-block;
  width: 1px;
  height: 22px;
  background: var(--line);
  margin: 0 6px;
}
.brand-waggel {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-dim);
  transition: color var(--t-fast);
}
.brand-waggel:hover { color: var(--ink); }
.brand-partner-label {
  font-family: var(--mono), monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
}
.waggel-logo {
  display: block;
  height: 22px;
  width: auto;
  color: var(--ink);
  /* Inline SVG uses fill="currentColor" so it tracks theme via color */
}
svg.waggel-logo { width: auto; }
[data-theme='light'] .waggel-logo { color: var(--waggel-ink); }
@media (max-width: 900px) {
  .brand-divider, .brand-waggel .brand-partner-label { display: none; }
  .brand-waggel { margin-left: 0; }
  .waggel-logo { height: 18px; }
}

.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
  margin-right: 8px;
}
.nav-links a {
  font-family: var(--mono), monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-dim);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.nav-links a:hover { color: var(--ink); border-bottom-color: var(--amber); }

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.theme-toggle:hover { border-color: var(--amber); transform: translateY(-1px); }
.theme-toggle .icon-moon { display: none; }
[data-theme='light'] .theme-toggle .icon-moon { display: block; }
[data-theme='light'] .theme-toggle .icon-sun { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 120px 0 60px;
}
.hero-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-grain {
  position: absolute; inset: -10%;
  background:
    radial-gradient(ellipse at 20% 30%, color-mix(in srgb, var(--amber) 14%, transparent), transparent 55%),
    radial-gradient(ellipse at 80% 70%, color-mix(in srgb, var(--coral) 10%, transparent), transparent 60%);
  filter: blur(60px);
  opacity: 0.75;
}
.hero-glow {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(1100px, 95vw);
  height: min(1100px, 95vw);
  background:
    radial-gradient(circle at center,
      color-mix(in srgb, var(--amber) 5%, transparent) 0%,
      transparent 70%);
  opacity: 0.6;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}
.eyebrow {
  font-family: var(--mono), monospace;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--amber);
  margin: 0 0 32px;
  font-weight: 600;
}
.eyebrow-link {
  color: var(--waggel-blue);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid color-mix(in srgb, var(--waggel-blue) 40%, transparent);
  padding-bottom: 1px;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.eyebrow-link:hover {
  border-bottom-color: var(--waggel-blue);
}
[data-theme='light'] .eyebrow-link { color: var(--amber-deep); border-bottom-color: color-mix(in srgb, var(--amber-deep) 40%, transparent); }
.hero-headline {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(58px, 10vw, 160px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0 0 40px;
  max-width: 13ch;
}
.headline-line {
  display: block;
  overflow: hidden;
}
.hero-headline em {
  font-style: italic;
  color: var(--amber);
  font-weight: 400;
}
.hero-lede {
  max-width: 56ch;
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.55;
  color: var(--ink-dim);
  margin: 0 0 60px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 72px;
}
.stat {
  padding: 22px 24px 20px;
  background: color-mix(in srgb, var(--bg-2) 85%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  transition: transform var(--t-fast), border-color var(--t-fast);
}
.stat:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--amber) 50%, var(--line)); }
.stat-value {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 4.4vw, 62px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.stat-value .stat-colon {
  color: var(--ink-mute);
  font-weight: 300;
  margin: 0 4px;
}
.stat-label {
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.hero-scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-mute);
  font-family: var(--mono), monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0;
}
.scroll-arrow {
  display: inline-block;
  animation: scroll-bounce 1800ms ease-in-out infinite;
}
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---------- Chart boxes ---------- */
.chart-box {
  position: relative;
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px 16px;
  min-height: 340px;
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.chart-box.tall { min-height: 480px; }
.chart-box svg { width: 100%; height: 100%; display: block; }
.chart-box .axis path, .chart-box .axis line { stroke: var(--line); }
.chart-box .axis text { fill: var(--ink-mute); font-family: var(--mono), monospace; font-size: 11px; letter-spacing: 0.04em; }
.chart-box .grid line { stroke: var(--line); stroke-dasharray: 2 4; }
.chart-box .grid path { stroke: transparent; }

.chart-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 0 4px;
  font-size: 13px;
  color: var(--ink-dim);
}
.chart-legend .swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: middle;
}

.caption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-mute);
  font-style: italic;
}

/* ---------- Map ---------- */
.map-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.chip {
  padding: 9px 16px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-dim);
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.chip:hover { color: var(--ink); border-color: color-mix(in srgb, var(--amber) 50%, var(--line)); transform: translateY(-1px); }
.chip.is-active {
  background: var(--amber);
  border-color: var(--amber);
  color: #15110a;
  font-weight: 600;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: stretch;
}
.map-svg {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 560px;
  padding: 12px;
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.map-svg svg { width: 100%; height: 100%; min-height: 540px; }
.map-svg .lad {
  stroke: color-mix(in srgb, var(--bg) 65%, transparent);
  stroke-width: 0.4;
  cursor: pointer;
  transition: fill var(--t-fast), stroke var(--t-fast), stroke-width var(--t-fast);
}
.map-svg .lad:hover {
  stroke: var(--amber);
  stroke-width: 1.4;
}
.map-svg .lad.is-pinned {
  stroke: var(--waggel-blue);
  stroke-width: 2.2;
}
[data-theme='light'] .map-svg .lad.is-pinned { stroke: var(--waggel-ink); }
.map-svg .lad.is-nodata { fill: var(--bg-3); }

.map-detail {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  min-height: 560px;
}
.detail-hint {
  color: var(--ink-mute);
  font-style: italic;
  margin: auto 0;
  text-align: center;
}
.map-detail h4 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  margin: 0 0 4px;
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.map-detail .detail-sub {
  color: var(--ink-mute);
  font-size: 12px;
  font-family: var(--mono), monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  margin-bottom: 18px;
}
.detail-grid .dg-row { display: flex; flex-direction: column; }
.detail-grid .dg-label {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--mono), monospace;
}
.detail-grid .dg-value {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.1;
}
.detail-grid .dg-value.accent { color: var(--amber); }
.detail-sparkline {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.detail-sparkline h5 {
  margin: 0 0 8px;
  font-size: 11px;
  font-family: var(--mono), monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.sparkline-box { height: 64px; }
.map-legend {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--ink-mute);
  font-family: var(--mono), monospace;
  letter-spacing: 0.06em;
}
.legend-bar {
  height: 10px;
  flex: 1;
  max-width: 360px;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.legend-note { font-style: italic; color: var(--ink-mute); }

/* ---------- Tooltip ---------- */
.tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 200;
  background: #0a0a0c;
  color: var(--cream);
  border: 1px solid var(--amber);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  min-width: 180px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: translate(-50%, calc(-100% - 14px));
  opacity: 0;
  transition: opacity 120ms ease-out;
  font-feature-settings: 'tnum' 1;
}
.tooltip.is-visible { opacity: 1; }
.tooltip .tt-title {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--cream);
  font-weight: 500;
  margin-bottom: 6px;
}
.tooltip .tt-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: #d5cdbc;
}
.tooltip .tt-row strong { color: var(--amber); font-weight: 600; }

/* ---------- Rankings ---------- */
.table-wrap {
  max-height: 540px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  box-shadow: var(--shadow-1);
}
.ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ranking-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-3);
  color: var(--ink-dim);
  text-align: left;
  font-family: var(--mono), monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--line);
  z-index: 1;
}
.ranking-table thead th.num { text-align: right; }
.ranking-table thead th[aria-sort='ascending']::after  { content: ' ▲'; color: var(--amber); }
.ranking-table thead th[aria-sort='descending']::after { content: ' ▼'; color: var(--amber); }
.ranking-table tbody td {
  padding: 12px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  color: var(--ink);
}
.ranking-table tbody tr:hover { background: color-mix(in srgb, var(--amber) 8%, transparent); }
.ranking-table tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ranking-table td:first-child { color: var(--ink-mute); font-family: var(--mono), monospace; }

/* ---------- Correlation scatter annotations ---------- */
.chart-box .scatter-annotation {
  font-family: var(--serif);
  font-size: 14px;
  fill: var(--amber);
  font-style: italic;
}
.chart-box .scatter-annotation-line { stroke: var(--amber); stroke-width: 1; stroke-dasharray: 2 3; }

/* ---------- Breeds ---------- */
.breed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.breed-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

/* ---------- Methodology ---------- */
.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.method-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow-1);
}
.method-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  color: var(--amber);
}
.method-card p, .method-card li {
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.65;
}
.method-card ul {
  padding-left: 20px;
  margin: 0;
}
.method-card li + li { margin-top: 6px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 60px;
  background: color-mix(in srgb, var(--bg) 96%, #000 4%);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-partner {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-decoration: none;
  margin-bottom: 18px;
  color: var(--ink);
}
.footer-partner:hover .waggel-logo-lg { transform: scale(1.02); }
.footer-partner-label {
  font-family: var(--mono), monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
}
.waggel-logo-lg {
  display: block;
  height: 38px;
  width: auto;
  color: var(--ink);
  transition: transform var(--t-fast);
}
svg.waggel-logo-lg { width: auto; }
[data-theme='light'] .waggel-logo-lg { color: var(--waggel-ink); }

.footer-title {
  font-family: var(--serif);
  font-size: 20px;
  margin: 0 0 2px;
  font-weight: 500;
}
.footer-sub {
  margin: 0;
  color: var(--ink-mute);
  font-size: 13px;
}
.footer-share {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-dim);
  background: var(--bg-2);
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.share-btn:hover {
  color: var(--ink);
  background: var(--bg-3);
  border-color: var(--amber);
}

/* ---------- Scroll reveal starting state ---------- */
.section-header, .stat, .chart-box, .map-layout, .method-card, .chart-legend, .caption, .subsection-title, .table-wrap {
  opacity: 0;
  transform: translateY(24px);
  will-change: transform, opacity;
}
body.ready .section-header,
body.ready .stat,
body.ready .chart-box,
body.ready .map-layout,
body.ready .method-card,
body.ready .chart-legend,
body.ready .caption,
body.ready .subsection-title,
body.ready .table-wrap { /* GSAP will set inline styles on entry */ }
/* hero headline lines enter via GSAP */
.headline-line > span { display: block; transform: translateY(102%); will-change: transform; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .map-layout { grid-template-columns: 1fr; }
  .map-detail { min-height: 340px; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .section { padding: 64px 0; }
  .method-grid { grid-template-columns: 1fr; }
  .breed-grid { grid-template-columns: 1fr; }
  .map-svg { min-height: 420px; }
  .map-svg svg { min-height: 400px; }
  .chart-box { padding: 18px 14px 10px; }
  .chart-box.tall { min-height: 400px; }
  .hero { padding: 100px 0 40px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 14px; }
  .stat { padding: 16px 18px 14px; }
  .stat-value { font-size: 32px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .scroll-arrow { animation: none; }
  .section-header, .stat, .chart-box, .map-layout, .method-card,
  .chart-legend, .caption, .subsection-title, .table-wrap {
    opacity: 1;
    transform: none;
  }
  .headline-line > span { transform: none; }
}
