:root {
  --bg: #f7f4ee;
  --surface: #fffdf9;
  --text: #2b2f2c;
  --muted: #5f6862;
  --accent: #5f8b74;
  --accent-strong: #44705a;
  --accent-soft: #e3ece5;
  --border: #e4ded3;
  --shadow: 0 1px 2px rgba(43, 47, 44, 0.04), 0 8px 24px rgba(43, 47, 44, 0.06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161a18;
    --surface: #1e2320;
    --text: #e8ebe7;
    --muted: #a3ada6;
    --accent: #8fbba2;
    --accent-strong: #a9cfb9;
    --accent-soft: #24302a;
    --border: #2e3631;
    --shadow: none;
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-strong); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

.container { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}
.brand svg { width: 30px; height: 30px; }
.header-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.95rem; }
.lang {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}
.lang a {
  color: var(--muted);
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 999px;
}
.lang a:hover { color: var(--text); }
.lang a[aria-current="true"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

/* Hero */
.hero { padding: 96px 0 72px; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0 auto 20px; max-width: 16ch; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 40rem; margin: 0 auto; }

/* Sections */
section { padding: 56px 0; }
.section-title { font-size: 2rem; margin: 0 0 12px; text-align: center; }
.section-lead { color: var(--muted); text-align: center; max-width: 38rem; margin: 0 auto 40px; }

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 1.35rem; margin: 14px 0 8px; }
.card p { margin: 0; color: var(--muted); }
.icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
}
.icon svg { width: 22px; height: 22px; }

.mission {
  background: var(--accent-soft);
  border-radius: 24px;
  padding: 56px 32px;
  text-align: center;
}
.mission blockquote {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  line-height: 1.45;
  margin: 0 auto;
  max-width: 34ch;
}

.contact { text-align: center; }
.button {
  display: inline-block;
  background: var(--accent-strong);
  color: var(--bg);
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 500;
}
.button:hover { background: var(--accent); color: var(--bg); }

/* Legal / document pages */
.doc { padding: 56px 0 72px; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin: 0 0 8px; }
.doc .meta { color: var(--muted); margin: 0 0 32px; font-size: 0.95rem; }
.doc h2 { font-size: 1.5rem; margin: 44px 0 12px; padding-top: 8px; scroll-margin-top: 80px; }
.doc h3 { font-size: 1.15rem; margin: 24px 0 8px; font-family: var(--sans); font-weight: 600; }
.doc ul { padding-left: 1.25rem; }
.doc li { margin-bottom: 6px; }
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 8px;
}
.toc strong { display: block; margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 1.25rem; columns: 2; column-gap: 32px; }
.toc li { margin-bottom: 4px; break-inside: avoid; }
.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0;
}
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; margin: 16px 0; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { font-weight: 600; }
.caps { text-transform: uppercase; font-size: 0.92rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 64px 0 48px; }
  .toc ol { columns: 1; }
  .mission { padding: 40px 20px; }
  .site-header { position: static; }
  .site-header .container { padding-top: 12px; padding-bottom: 12px; }
  /* Phone: logo and language switch on the first row, menu on the second. */
  .site-header .container { row-gap: 8px; }
  .header-actions { display: contents; }
  .lang { order: 1; }
  .nav { order: 2; flex-basis: 100%; }
}
