/*
 * Affront Capital Consulting Limited — site styles.
 *
 * Palette is taken from the company's own letterhead and logo artwork
 * (public/img/letterhead-header.png): deep navy and vivid orange are the
 * corporate primaries; the softer slate/apricot pair comes from the logo
 * lockup and is used for tints and accents.
 */

:root {
  /* Light canvas is cool navy-mist, not pure white — white is reserved for
     cards and inputs so they lift off the page the way they do in dark mode. */
  --navy: #13306b;
  --navy-800: #1b3f86;
  --navy-700: #24509f;
  --orange: #f47c20;
  --orange-600: #e06d16;
  --slate: #7a97bc;
  --apricot: #f5b183;

  --ink: #14213d;
  --body: #46536b;
  --muted: #6b7890;
  --line: #d7e0ee;
  --bg: #f3f5fa;
  --bg-tint: #e8eef7;
  --bg-navy: var(--navy);
  --input-bg: #ffffff;

  --wrap: 1140px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(19, 48, 107, .05), 0 12px 32px rgba(19, 48, 107, .08);

  --accent-text: var(--navy);
  --header-bg: rgba(255, 255, 255, .72);
  --header-blur: 16px;
  --header-shadow: 0 1px 0 rgba(19, 48, 107, .06);
  --card-bg: #ffffff;
  --card-highlight: inset 0 1px 0 #fff;
  --card-hover-border: rgba(244, 124, 32, .38);
  --card-shadow-hover: 0 14px 36px rgba(19, 48, 107, .10);
  --card-num-bg: rgba(244, 124, 32, .12);
  --panel-from: var(--navy);
  --panel-to: #0d2450;
  --panel-line: rgba(255, 255, 255, .10);
  --panel-shadow: 0 18px 40px rgba(19, 48, 107, .16);
  --page-glow:
    radial-gradient(1100px 560px at 92% -12%, rgba(244, 124, 32, .10), transparent 58%),
    radial-gradient(900px 640px at -14% 8%, rgba(19, 48, 107, .07), transparent 62%);
  --focus-ring: rgba(244, 124, 32, .45);
  --field-focus-glow: 0 0 0 4px rgba(244, 124, 32, .12);
  --selection-bg: rgba(19, 48, 107, .14);
  --toggle-bg: #ffffff;
  --toggle-hover: rgba(244, 124, 32, .10);

  --hero-from: var(--navy);
  --hero-mid: #0e2551;
  --hero-to: #0b1d40;
  --hero-glow: rgba(244, 124, 32, .34);
  --hero-glow-2: rgba(122, 151, 188, .22);
  --cta-from: var(--navy);
  --cta-mid: #14306d;
  --cta-to: var(--orange-600);
  --cta-end: 155%;
  --cta-shadow: 0 18px 44px rgba(19, 48, 107, .16);

  --btn-navy-bg: var(--navy);
  --btn-navy-hover: var(--navy-800);
  --btn-navy-fg: #fff;
  --btn-primary-shadow: 0 8px 18px rgba(244, 124, 32, .22);

  --footer-bg: #0c1f45;
  --footer-fg: rgba(255, 255, 255, .68);
  --footer-muted: rgba(255, 255, 255, .50);
  --footer-line: rgba(255, 255, 255, .12);
  --footer-glow: rgba(36, 80, 159, .22);
  --footer-link: rgba(255, 255, 255, .72);
  --footer-link-hover: #fff;
  --footer-heading: #fff;
  --disclaimer: rgba(255, 255, 255, .62);

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  color-scheme: light;
  accent-color: var(--orange);
}

/*
 * Dark theme — the DEFAULT.
 *
 * Only the tokens change; every rule below keeps referencing the same names.
 * The theme is driven purely by the data-theme attribute, with no
 * prefers-color-scheme anywhere: the site is dark for everyone unless a visitor
 * explicitly picks light, so the OS setting is deliberately not consulted. The
 * :not([data-theme="light"]) half is what makes dark apply before the head
 * script runs and for anyone with JavaScript disabled.
 *
 * Surfaces are navy-ink, not flat charcoal: a cool near-black canvas, then
 * clearly stepped tints and cards, with luminous hairlines and orange as the
 * only loud accent. Brand navy stays on hero, panels and CTA so dark mode
 * still reads as Affront Capital rather than a generic grey app.
 */

/*
 * Dark is the DEFAULT, so this matches an explicit choice of dark AND the
 * no-attribute case — a visitor with JavaScript disabled, or the instant
 * before the head script runs, must still get the dark site rather than a
 * white flash. Only an explicit data-theme="light" opts out.
 */
:root[data-theme="dark"],
:root:not([data-theme="light"]) {
  --ink: #f4f7fc;
  --body: #c5cfe0;
  --muted: #93a0b8;
  --line: rgba(176, 198, 232, .14);
  --bg: #070b14;
  --bg-tint: #0d1422;
  --header-bg: rgba(7, 11, 20, .72);
  --header-blur: 18px;
  --header-shadow: 0 10px 40px rgba(0, 0, 0, .28);
  --card-bg: #121a2c;
  --input-bg: #0c1322;
  --panel-from: #1a3c76;
  --panel-to: #10244e;
  --panel-line: rgba(176, 198, 232, .16);
  --panel-shadow: 0 18px 44px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .06);
  --navy-700: #9bb8e8;
  --accent-text: #c9d8f4;
  --shadow: 0 0 0 1px rgba(165, 190, 230, .05), 0 18px 44px rgba(0, 0, 0, .48);
  --card-highlight: inset 0 1px 0 rgba(255, 255, 255, .06);
  --card-hover-border: rgba(244, 124, 32, .42);
  --card-shadow-hover: 0 0 0 1px rgba(244, 124, 32, .22), 0 20px 48px rgba(0, 0, 0, .5);
  --card-num-bg: rgba(244, 124, 32, .18);
  --page-glow:
    radial-gradient(1100px 560px at 92% -12%, rgba(244, 124, 32, .11), transparent 58%),
    radial-gradient(900px 640px at -14% 6%, rgba(36, 80, 159, .26), transparent 62%);
  --focus-ring: rgba(244, 124, 32, .55);
  --field-focus-glow: 0 0 0 4px rgba(244, 124, 32, .14);
  --selection-bg: rgba(244, 124, 32, .28);
  --toggle-bg: rgba(255, 255, 255, .04);
  --toggle-hover: rgba(244, 124, 32, .12);

  --hero-from: #0c1834;
  --hero-mid: #0a152c;
  --hero-to: #070b14;
  --hero-glow: rgba(244, 124, 32, .38);
  --hero-glow-2: rgba(36, 80, 159, .32);
  --cta-from: #16366f;
  --cta-mid: #1e4a8c;
  --cta-to: #f47c20;
  --cta-end: 128%;
  --cta-shadow: 0 0 0 1px rgba(244, 124, 32, .22), 0 24px 56px rgba(0, 0, 0, .42);

  --btn-navy-bg: #1e4a8c;
  --btn-navy-hover: #2b5aa8;
  --btn-navy-fg: #fff;
  --btn-primary-shadow: 0 8px 22px rgba(244, 124, 32, .24);

  --footer-bg: #050810;
  --footer-fg: rgba(226, 232, 244, .72);
  --footer-muted: rgba(226, 232, 244, .48);
  --footer-line: rgba(176, 198, 232, .12);
  --footer-glow: rgba(36, 80, 159, .20);
  --footer-link: rgba(226, 232, 244, .74);
  --footer-link-hover: #fff;
  --footer-heading: #fff;
  --disclaimer: rgba(226, 232, 244, .78);

  color-scheme: dark;
}

:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Keep in-page anchors (/#who-we-work-with) clear of the sticky header. */
  scroll-padding-top: 74px;
  background: var(--bg);
  scrollbar-color: var(--muted) var(--bg);
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--body);
  background-color: var(--bg);
  background-image: var(--page-glow);
  background-attachment: fixed;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--selection-bg);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.18;
  margin: 0 0 .6em;
  font-weight: 700;
  letter-spacing: -.02em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.16rem; }

p { margin: 0 0 1.1em; }
a { color: var(--navy-700); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ── header ─────────────────────────────────────────────────────────── */

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

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 74px;
}

.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; }
.brand-mark img {
  grid-area: 1 / 1;
  height: 46px;
  width: auto;
}
/* Dark is the default, so the dark-ground logo shows unless light is chosen. */
.logo-light { display: none; }
.logo-dark { display: block; }
:root[data-theme="light"] .logo-light { display: block; }
:root[data-theme="light"] .logo-dark { display: none; }

.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-name { font-weight: 800; color: var(--accent-text); font-size: 1.02rem; letter-spacing: -.01em; }
.brand-sub {
  font-size: .63rem;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--muted);
}

.nav { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.nav a {
  color: var(--body);
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.nav a:hover { color: var(--accent-text); text-decoration: none; }
/* `.nav a` outranks `.btn-*`, so the header buttons restate their own text
   colour. The orange button uses dark navy, not white: white on #f47c20 is
   only 2.7:1 (and the inherited grey was 1.7:1); #14213d is 5.9:1 and stays
   readable at the menu's small uppercase size. Fixed hex, not --ink, because
   --ink turns near-white in the dark theme. */
.nav a.btn-primary,
.nav a.btn-primary:hover { color: #14213d; }
.nav .btn { white-space: nowrap; }
.nav a.btn-outline { color: var(--navy-700); }
.nav a.btn-outline:hover { color: var(--accent-text); }
.nav a[aria-current="page"] {
  color: var(--accent-text);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 9px;
  cursor: pointer;
  color: var(--ink);
}

/*
 * Theme toggle. Both icons are in the DOM and CSS picks which one shows, so
 * there is no flash of the wrong glyph before JS runs and no icon swapping in
 * script. The moon shows in light mode (tap for dark) and vice versa.
 */
.theme-toggle {
  /* .nav's margin-left:auto already pushes this group right; a second auto
     margin here would split the free space and strand the button mid-header. */
  margin-left: 4px;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  background: var(--toggle-bg);
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  color: var(--ink);
  flex-shrink: 0;
  transition: border-color .16s, background .16s, color .16s;
}
.theme-toggle:hover {
  border-color: var(--orange);
  background: var(--toggle-hover);
  color: var(--orange);
}
.theme-toggle svg { width: 17px; height: 17px; display: block; }

/* Dark by default, so the sun (tap for light) is what shows. */
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ── buttons ────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .16s, color .16s, border-color .16s, transform .16s, box-shadow .16s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: var(--btn-primary-shadow);
}
.btn-primary:hover { background: var(--orange-600); color: #fff; }

.btn-navy {
  background: var(--btn-navy-bg);
  color: var(--btn-navy-fg);
}
.btn-navy:hover {
  background: var(--btn-navy-hover);
  color: var(--btn-navy-fg);
}

.btn-ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.btn-outline { border-color: var(--line); color: var(--navy-700); background: var(--card-bg); }
.btn-outline:hover { border-color: var(--card-hover-border); }

/* ── hero ───────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  /*
   * The photograph sits UNDER the gradients, never over them. Hero text is
   * white, so the brand gradient has to keep doing the contrast work and the
   * image only adds depth behind it. The opaque --hero-from underneath means a
   * failed image load degrades to the original flat gradient rather than to
   * white text on white.
   */
  background:
    radial-gradient(1100px 520px at 88% -10%, var(--hero-glow), transparent 62%),
    radial-gradient(800px 480px at 6% 110%, var(--hero-glow-2), transparent 60%),
    linear-gradient(150deg,
      color-mix(in srgb, var(--hero-from) 86%, transparent) 0%,
      color-mix(in srgb, var(--hero-mid) 82%, transparent) 62%,
      color-mix(in srgb, var(--hero-to) 90%, transparent) 100%),
    url("/img/hero.jpg") center / cover no-repeat,
    var(--hero-from);
  color: #fff;
  overflow: hidden;
}
.hero::after {
  /* The diagonal cut echoes the letterhead's angled banner. */
  content: "";
  position: absolute;
  right: -12%;
  top: 0;
  width: 46%;
  height: 100%;
  background: linear-gradient(105deg, transparent 46%, rgba(244, 124, 32, .16) 46%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; padding-block: clamp(68px, 11vw, 116px); }
.hero h1 { color: #fff; max-width: 17ch; }
.hero-kicker {
  display: inline-block;
  font-size: .73rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  font-weight: 700;
  color: var(--apricot);
  margin-bottom: 18px;
}
.hero-lead {
  font-size: clamp(1.02rem, 1.7vw, 1.2rem);
  color: rgba(255, 255, 255, .84);
  max-width: 60ch;
  margin-bottom: 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; }

/* ── sections ───────────────────────────────────────────────────────── */

.section { padding-block: clamp(56px, 8vw, 92px); }
.section-tint { background: var(--bg-tint); }

.section-head { max-width: 62ch; margin-bottom: 42px; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker {
  display: block;
  font-size: .73rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 11px;
}
.lead { font-size: 1.04rem; color: var(--muted); }

/* ── grid + cards ───────────────────────────────────────────────────── */

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--card-highlight);
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.card:hover {
  border-color: var(--card-hover-border);
  box-shadow: var(--card-highlight), var(--card-shadow-hover);
  transform: translateY(-2px);
}
.card h3 { margin-bottom: .45em; }
.card p { margin-bottom: 0; font-size: .945rem; }

.card-num {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--card-num-bg);
  color: var(--orange);
  font-weight: 800;
  font-size: .95rem;
  margin-bottom: 15px;
}

/* ── stats ──────────────────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  border-block: 1px solid var(--line);
  padding-block: 34px;
}
.stat-v {
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  font-weight: 800;
  color: var(--accent-text);
  letter-spacing: -.025em;
  line-height: 1.1;
}
.stat-l {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  margin-top: 5px;
  font-weight: 600;
}

/* ── split ──────────────────────────────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.panel {
  background: linear-gradient(155deg, var(--panel-from) 0%, var(--panel-to) 100%);
  color: #fff;
  border-radius: 18px;
  padding: 34px;
  border: 1px solid var(--panel-line);
  box-shadow: var(--panel-shadow);
}
.panel h3 { color: #fff; }
.panel ul { margin: 0; padding-left: 0; list-style: none; }
.panel li {
  padding: 11px 0 11px 27px;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, .11);
  color: rgba(255, 255, 255, .88);
  font-size: .94rem;
}
.panel li:last-child { border-bottom: 0; }
.panel li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 19px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--orange);
}

/* ── checklist ──────────────────────────────────────────────────────── */

.checks { list-style: none; margin: 0; padding: 0; }
.checks li {
  position: relative;
  padding: 9px 0 9px 31px;
  font-size: .96rem;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 17px;
  width: 15px;
  height: 8px;
  border-left: 2.4px solid var(--orange);
  border-bottom: 2.4px solid var(--orange);
  transform: rotate(-45deg);
}

/* ── CTA ────────────────────────────────────────────────────────────── */

.cta {
  background: linear-gradient(120deg, var(--cta-from) 0%, var(--cta-mid) 55%, var(--cta-to) var(--cta-end));
  color: #fff;
  border-radius: 18px;
  padding: clamp(34px, 5vw, 56px);
  text-align: center;
  box-shadow: var(--cta-shadow);
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .85); max-width: 56ch; margin-inline: auto; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 13px; justify-content: center; margin-top: 26px; }

/* ── contact ────────────────────────────────────────────────────────── */

.field { margin-bottom: 17px; }
.field label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  font-size: .94rem;
  color: var(--ink);
  background: var(--input-bg);
  transition: border-color .16s, box-shadow .16s;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: .85;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
  border-color: var(--orange);
  box-shadow: var(--field-focus-glow);
}
.field textarea { min-height: 128px; resize: vertical; }

.form-note { font-size: .82rem; color: var(--muted); }

.info-row {
  display: flex;
  gap: 13px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.info-row:last-child { border-bottom: 0; }
.info-k {
  font-size: .73rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  font-weight: 700;
  min-width: 108px;
  padding-top: 2px;
}
.info-v { color: var(--ink); font-size: .95rem; }

/* Case-study tables. Wrapped so a wide table scrolls inside its card rather
   than pushing the page sideways on a phone. */
.table-wrap { overflow-x: auto; margin: 6px 0 4px; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th,
.data-table td {
  text-align: left;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  font-weight: 700;
}
.data-table td.num, .data-table th.num { text-align: right; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.case-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 18px; color: var(--muted); font-size: .88rem; }
.case-flag {
  border-left: 3px solid var(--orange);
  padding: 10px 14px;
  margin: 18px 0 0;
  font-size: .88rem;
  color: var(--muted);
}

/* ── footer ─────────────────────────────────────────────────────────── */

.site-footer {
  background:
    radial-gradient(900px 220px at 50% 0%, var(--footer-glow), transparent 70%),
    var(--footer-bg);
  color: var(--footer-fg);
  padding-block: 54px 30px;
  font-size: .9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--footer-line);
}
.site-footer h4 {
  color: var(--footer-heading);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 15px;
}
.site-footer a { color: var(--footer-link); display: block; padding: 5px 0; }
.site-footer a:hover { color: var(--footer-link-hover); text-decoration: none; }
.footer-logo {
  display: inline-block;
  margin-bottom: 15px;
  line-height: 0;
}
.footer-logo img {
  /* Artwork is a stacked lockup (~1.58:1). Do not force a wide/short box.
     Footer is always a dark band, so this is the reverse (white + orange) mark. */
  width: 148px;
  height: auto;
  max-width: 100%;
}
.footer-blurb {
  color: var(--footer-fg);
  max-width: 44ch;
}
.footer-bottom {
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
  font-size: .82rem;
  color: var(--footer-muted);
}

.powered {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--footer-muted);
}
/* Override the blanket `.site-footer a { display:block }` — this sits inline. */
.site-footer a.powered-link {
  display: inline;
  padding: 0;
  color: var(--footer-link);
  font-weight: 600;
}
.site-footer a.powered-link:hover { color: var(--footer-link-hover); text-decoration: underline; }

.disclaimer {
  margin-top: 18px;
  font-size: .78rem;
  line-height: 1.6;
  /* Legal text people must actually be able to read — not decorative. */
  color: var(--disclaimer);
  max-width: 78ch;
}

/* ── responsive ─────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Six links plus two buttons stop fitting inline below ~1180px (the full 1140px wrap plus gutters), so the menu
   collapses into the toggle there rather than at phone width. */
@media (max-width: 1180px) {
  .nav {
    display: none;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    /* Solid, not the glass header — otherwise hero copy shows through the menu. */
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 16px;
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 12px; }
  .nav-toggle { display: block; }
  /* The nav is pulled out of flow here, so the toggle takes over the push. */
  .theme-toggle { margin-left: auto; }
}

@media (max-width: 640px) {
  body { background-attachment: scroll; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}

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

/* ── imagery ────────────────────────────────────────────────────────────── */

/*
 * Section photography. Fixed aspect so the grid does not reflow as images
 * load, and object-fit so a different crop can be swapped in without touching
 * the layout. Decorative only — every one of these carries alt="" and the
 * surrounding copy already says what the section is about.
 */
.figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--bg-tint);
}
.figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}
/* Photographs are shot bright; damp them slightly on the dark ground (the
   default) so they do not glare against a near-black page. */
.figure img { filter: brightness(.88) saturate(1.02); }
:root[data-theme="light"] .figure img { filter: none; }
