/* ==========================================================================
   William Carey Missions — design system
   Same visual language (type pairing, token structure, shadow/radius scale)
   as code4missions.nl (WCM's sister site), tuned to WCM's own blue + amber
   brand palette.
   ========================================================================== */

:root {
  --blue-950: #0c1f30;
  --blue-900: #123653;
  --blue-800: #16456b;
  --blue-700: #1a5885;
  --blue-600: #1e74a9;
  --blue-500: #2e8bc4;
  --blue-400: #5fa8d6;
  --blue-200: #bfe0f2;
  --blue-100: #e6f3fa;

  --amber-600: #c97f1f;
  --amber-500: #e8a33d;
  --amber-400: #f0b75f;
  --amber-100: #fbe8cc;

  --bg: #f7f9fb;
  --surface: #ffffff;
  --ink: #16202b;
  --ink-muted: #5b6b78;
  --border: #e2e8ee;

  --shadow-sm: 0 2px 8px rgba(13, 30, 46, 0.06);
  --shadow-md: 0 8px 24px rgba(13, 30, 46, 0.10);
  --shadow-lg: 0 20px 48px rgba(13, 30, 46, 0.18);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --container: 1180px;
  --font-heading: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  color-scheme: light;
}

/* Dark mode: follows the OS/browser preference by default, but a manual
   toggle (see main.js) can force either mode via [data-theme] on <html>,
   which always wins over the media query in both directions. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c141e;
    --surface: #141f2d;
    --ink: #eef2f6;
    --ink-muted: #93a3b3;
    --border: #223243;
    --blue-100: #17293b;
    --amber-100: #2e2412;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c141e;
  --surface: #141f2d;
  --ink: #eef2f6;
  --ink-muted: #93a3b3;
  --border: #223243;
  --blue-100: #17293b;
  --amber-100: #2e2412;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-header { background: rgba(20,31,45,0.9); }
  :root:not([data-theme="light"]) .card img, :root:not([data-theme="light"]) .footer-logo { opacity: 0.95; }
}
:root[data-theme="dark"] .site-header { background: rgba(20,31,45,0.9); }
:root[data-theme="dark"] .card img, :root[data-theme="dark"] .footer-logo { opacity: 0.95; }

/* Logo bust icon: dark navy ink on transparent PNG — flip to white ink
   whenever the page is in dark mode, exactly like the wordmark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-logo-icon { filter: brightness(0) invert(1); }
}
:root[data-theme="dark"] .site-logo-icon { filter: brightness(0) invert(1); }

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* The off-canvas mobile nav below sits at left:26% + translateX(100%), which
     Chromium still counts toward document scroll width even while visually
     off-screen — clip it here rather than fighting the transform math. */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.2vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--blue-600); color: #fff;
  padding: 0.75rem 1rem; z-index: 1000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Icons -------------------------------------------------------------------- */
.ico { width: 1.1em; height: 1.1em; flex-shrink: 0; }
.ico-lg { width: 1.6rem; height: 1.6rem; }
.ico-back { transform: scaleX(-1); }

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: var(--blue-950);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.btn .ico { transition: transform 0.2s ease; }
.btn:hover .ico { transform: translateX(3px); }

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.55);
  box-shadow: none;
}
.btn-outline:hover { background: rgba(255,255,255,0.14); border-color: #fff; }

.btn-light {
  background: var(--surface);
  color: var(--blue-700);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-light:hover { border-color: var(--blue-500); color: var(--blue-600); }

/* Eyebrow badge ------------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(232, 163, 61, 0.16); color: var(--amber-600);
  border: 1px solid rgba(232, 163, 61, 0.4);
  padding: 0.35rem 1rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.eyebrow .ico { color: var(--amber-500); }

/* Header / nav -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
}
.site-logo { display: inline-flex; align-items: center; gap: 0.65rem; }
.site-logo-icon { height: 42px; width: 42px; object-fit: contain; flex-shrink: 0; }
.site-logo-text { font-family: var(--font-heading); font-weight: 800; font-size: 1rem; line-height: 1.15; color: var(--ink); white-space: nowrap; }
.site-logo-text .logo-sub { display: block; font-family: var(--font-body); font-weight: 600; font-size: 0.7rem; color: var(--blue-600); letter-spacing: 0.03em; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink-muted); cursor: pointer; padding: 0;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { color: var(--amber-500); border-color: var(--amber-400); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
}

.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer; padding: 0.5rem;
  color: var(--ink);
}
.nav-toggle .icon-close { display: none; }
.nav-toggle.is-active .icon-open { display: none; }
.nav-toggle.is-active .icon-close { display: block; }

.has-dropdown > a .ico { width: 0.7em; height: 0.7em; opacity: 0.6; transition: transform 0.18s ease; }
.has-dropdown:hover > a .ico { transform: rotate(180deg); }

.lang-switcher .ico { color: var(--ink-muted); opacity: 0.7; margin-right: 2px; }

.site-nav { display: flex; align-items: center; gap: 1.25rem; flex: 1; justify-content: flex-end; }
.site-nav > ul { display: flex; align-items: center; gap: 1.15rem; flex-wrap: wrap; }
.site-nav > ul > li { position: relative; }
.site-nav > ul > li > a {
  color: var(--ink-muted); font-weight: 600; font-size: 0.95rem;
  padding: 0.5rem 0; display: inline-flex; align-items: center; gap: 4px;
  position: relative;
}
.site-nav > ul > li > a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0.2rem; height: 2px;
  background: var(--blue-600); transition: right 0.2s ease;
}
.site-nav > ul > li > a:hover, .site-nav > ul > li.is-active > a { color: var(--ink); text-decoration: none; }
.site-nav > ul > li > a:hover::after, .site-nav > ul > li.is-active > a::after { right: 0; }

.site-nav .nav-cta {
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: var(--blue-950) !important; padding: 0.55rem 1.1rem; border-radius: 999px;
  font-weight: 700; box-shadow: var(--shadow-sm);
}
.site-nav .nav-cta::after { display: none; }
.site-nav .nav-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.has-dropdown .dropdown {
  opacity: 0; visibility: hidden; transform: translateY(6px);
  position: absolute; top: 100%; left: -0.75rem; min-width: 230px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); padding: 0.6rem; margin-top: 0.6rem;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown li a { display: block; padding: 0.6rem 0.85rem; border-radius: 8px; color: var(--ink); font-weight: 500; }
.dropdown li a:hover { background: var(--blue-100); color: var(--blue-700); text-decoration: none; }

.lang-switcher { display: flex; align-items: center; gap: 0.3rem; padding-left: 0.5rem; border-left: 1px solid var(--border); }
.lang-switcher a {
  font-size: 0.75rem; font-weight: 700; color: var(--ink-muted);
  border-radius: 6px; padding: 0.3rem 0.5rem;
}
.lang-switcher a.is-active { background: var(--blue-600); color: #fff; text-decoration: none; }
.lang-switcher a:hover { text-decoration: none; color: var(--blue-600); }
.lang-switcher a.is-active:hover { color: #fff; }

/* Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  color: #fff;
  background: linear-gradient(150deg, var(--blue-950) 0%, var(--blue-900) 55%, var(--blue-700) 100%);
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.34;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(150deg, rgba(12,31,48,0.92) 0%, rgba(18,54,83,0.82) 55%, rgba(26,88,133,0.55) 100%);
}
.hero .container { position: relative; z-index: 2; padding: 5.5rem 1.5rem; text-align: center; }
.hero h1 { color: #fff; margin-bottom: 0.6rem; }
.hero p.hero-lead { font-size: 1.2rem; max-width: 680px; margin: 0 auto 2rem; color: rgba(255,255,255,0.92); }
.hero .hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero .eyebrow { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); color: var(--amber-400); }
.hero .eyebrow .ico { color: var(--amber-400); }

.page-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--blue-900) 0%, var(--blue-700) 100%);
  padding: 3.5rem 0;
  text-align: center;
  color: #fff;
}
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255,255,255,0.85); max-width: 700px; margin: 0.5rem auto 0; }

/* Sections ---------------------------------------------------------------- */
.section { padding: 4.5rem 0; }
.section--alt { background: var(--blue-100); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header p { color: var(--ink-muted); max-width: 620px; margin: 0.5rem auto 0; }

.content-body { max-width: 780px; margin: 0 auto; }
.content-body img { border-radius: var(--radius-md); margin: 1.5rem 0; }
.content-body figure { margin: 1.5rem 0; }
.content-body blockquote {
  border-left: 4px solid var(--amber-500); margin: 1.5rem 0; padding: 0.25rem 1.25rem;
  color: var(--ink-muted); font-style: italic;
}
.content-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.content-body table td, .content-body table th { padding: 0.6rem 0.8rem; border: 1px solid var(--border); text-align: left; }

.form-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 2.5rem; margin-top: 3rem;
}

/* Feature / icon cards ------------------------------------------------------- */
.feature-grid { display: grid; gap: 1.75rem; grid-template-columns: repeat(3, 1fr); }
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 2rem; box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-card .icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  background: var(--blue-100); color: var(--blue-600);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.1rem;
}
.feature-card .icon .ico { width: 26px; height: 26px; }
.feature-card h3 { margin-bottom: 0.4rem; }
.feature-card p { color: var(--ink-muted); margin: 0; }

/* Stats ---------------------------------------------------------------- */
.stat-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(4, 1fr); }
.stat-card { text-align: center; padding: 1.5rem 1rem; }
.stat-card .stat-number {
  font-family: var(--font-heading); font-weight: 800; font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--blue-700); line-height: 1;
}
.stat-card .stat-label { color: var(--ink-muted); font-size: 0.9rem; margin-top: 0.5rem; }

/* Card grids ---------------------------------------------------------------- */
.grid { display: grid; gap: 1.75rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .card-media { position: relative; }
.card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.card-badge {
  position: absolute; top: 0.85rem; left: 0.85rem;
  background: rgba(12,31,48,0.78); color: #fff; backdrop-filter: blur(4px);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  padding: 0.3rem 0.7rem; border-radius: 999px;
}
.card-body { padding: 1.4rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.card-meta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8rem; color: var(--ink-muted); font-weight: 600;
}
.card-meta .ico { color: var(--amber-500); }
.card h3 { margin-bottom: 0.1rem; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--blue-600); text-decoration: none; }
.card p { color: var(--ink-muted); flex: 1; margin-bottom: 0; }
.card .read-more {
  margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; color: var(--blue-600); padding-top: 0.4rem;
}
.card .read-more .ico { transition: transform 0.2s ease; }
.card .read-more:hover .ico { transform: translateX(3px); }

/* Workers ------------------------------------------------------------------ */
.worker-card { text-align: center; padding: 1.75rem 1.25rem; }
.worker-card img { border-radius: 50%; width: 140px; height: 140px; object-fit: cover; margin: 0 auto 1.1rem; box-shadow: var(--shadow-sm); border: 4px solid var(--surface); }
.worker-card h3 { margin-bottom: 0.15rem; }
.worker-card .role { color: var(--blue-600); font-weight: 700; font-size: 0.85rem; margin-bottom: 0.6rem; text-transform: uppercase; letter-spacing: 0.02em; }

/* News filter / pagination ------------------------------------------------- */
.news-filters { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-bottom: 3rem; }
.news-filters button {
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 0.5rem 1.2rem; cursor: pointer; font-size: 0.88rem; font-weight: 600; color: var(--ink-muted);
  transition: all 0.15s ease;
}
.news-filters button.is-active, .news-filters button:hover { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }

.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 3rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.4rem; height: 2.4rem; padding: 0 0.5rem;
  border-radius: 10px; border: 1px solid var(--border); color: var(--ink); font-weight: 600;
}
.pagination a:hover { border-color: var(--blue-600); color: var(--blue-600); text-decoration: none; }
.pagination .is-active { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }

/* Publications / downloads --------------------------------------------------- */
.doc-list { display: grid; gap: 1rem; }
.doc-card {
  display: flex; align-items: center; gap: 1.1rem; padding: 1.2rem 1.4rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.doc-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.doc-card .doc-icon {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: var(--radius-sm); background: var(--amber-100);
  display: flex; align-items: center; justify-content: center; color: var(--amber-600);
}
.doc-card .doc-info { flex: 1; }
.doc-card .doc-info h4 { margin: 0; font-family: var(--font-body); font-weight: 600; font-size: 1rem; }

/* Donation cards ------------------------------------------------------------ */
.donate-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2.5rem; text-align: center; box-shadow: var(--shadow-sm);
}
.donate-card h3 { margin-bottom: 0.6rem; }
.donate-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Forms ---------------------------------------------------------------- */
form .field { margin-bottom: 1.3rem; }
form label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.92rem; }
form input, form textarea, form select {
  width: 100%; padding: 0.75rem 0.95rem; border: 1px solid var(--border); border-radius: 10px;
  font: inherit; color: var(--ink); background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
form input:focus, form textarea:focus, form select:focus {
  outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px var(--blue-100);
}
.form-message { padding: 1rem 1.2rem; border-radius: 10px; margin-bottom: 1.5rem; font-weight: 500; }
.form-message--success { background: #e5f5ea; color: #1a6b34; }
.form-message--error { background: #fbe9e7; color: #a3352a; }

/* Footer ------------------------------------------------------------------ */
.site-footer { background: var(--blue-950); color: rgba(255,255,255,0.75); padding: 4rem 0 1.5rem; margin-top: 4rem; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1.4fr 1fr 1fr; margin-bottom: 2.5rem; }
.footer-logo {
  display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.1rem;
  font-family: var(--font-heading); font-weight: 800; font-size: 1rem; color: #fff;
}
.footer-logo img { height: 34px; width: 34px; filter: brightness(0) invert(1); opacity: 0.95; flex-shrink: 0; }
.footer-logo .logo-sub { display: block; font-family: var(--font-body); font-weight: 600; font-size: 0.68rem; color: var(--amber-400); letter-spacing: 0.03em; }
.footer-col h3 { color: #fff; font-family: var(--font-heading); font-size: 1rem; margin-bottom: 1.1rem; }
.footer-col ul li { margin-bottom: 0.7rem; }
.footer-col a { color: rgba(255,255,255,0.75); display: inline-flex; align-items: center; gap: 8px; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-col a .ico { color: var(--amber-400); flex-shrink: 0; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: 1.5rem; font-size: 0.85rem;
}
.footer-bottom a { color: rgba(255,255,255,0.75); }

/* Category chips ------------------------------------------------------------ */
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.5rem; }
.chip {
  display: inline-flex; align-items: center; padding: 0.35rem 0.9rem;
  border-radius: 999px; background: var(--blue-100); color: var(--blue-700);
  font-size: 0.8rem; font-weight: 700;
}
.chip:hover { background: var(--blue-600); color: #fff; text-decoration: none; }

/* Breadcrumb ------------------------------------------------------------- */
.breadcrumb { font-size: 0.85rem; color: var(--ink-muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--ink-muted); }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 900px) {
  .grid-3, .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; inset: 0 0 0 26%; top: 65px;
    background: var(--surface); flex-direction: column; align-items: stretch;
    padding: 1.5rem; gap: 1rem; box-shadow: var(--shadow-lg);
    transform: translateX(100%); transition: transform 0.25s ease, visibility 0.25s;
    overflow-y: auto;
    /* visibility (not just transform) keeps the closed panel out of the
       document's scrollable area — a fixed+translated element still counts
       toward scrollWidth in Chromium even while visually off-screen. */
    visibility: hidden;
  }
  .site-nav.is-open { transform: translateX(0); visibility: visible; }
  .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0.25rem; }
  .site-nav > ul > li > a::after { display: none; }
  .has-dropdown .dropdown { opacity: 1; visibility: visible; transform: none; display: block; position: static; box-shadow: none; border: none; margin: 0 0 0 1rem; padding: 0; min-width: 0; }
  .lang-switcher { justify-content: flex-start; margin-top: 1rem; padding-left: 0; border-left: none; }
  .grid-3, .grid-2, .feature-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero .container { padding: 4rem 1.25rem; }
  .form-card { padding: 1.5rem; }
}
