@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Instrument+Serif:ital@0;1&display=swap");

:root {
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --bg: #f8f7f4;
  --bg-elevated: #ffffff;
  --bg-muted: #efede8;
  --text: #1a1a1f;
  --text-muted: #5c5c66;
  --text-subtle: #8a8a96;
  --heading: #0f0f14;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-soft: #dbeafe;
  --border: #e4e2dc;
  --border-strong: #cac7bf;
  --shadow: 0 1px 2px rgba(15, 15, 20, 0.04), 0 8px 24px rgba(15, 15, 20, 0.06);
  --shadow-lg: 0 4px 12px rgba(15, 15, 20, 0.06), 0 24px 48px rgba(15, 15, 20, 0.08);
  --radius: 12px;
  --radius-lg: 18px;
  --max-width: 1120px;
  --header-height: 72px;
}

html.dark-theme {
  --bg: #0f1117;
  --bg-elevated: #171923;
  --bg-muted: #1f2330;
  --text: #ececf1;
  --text-muted: #a8a8b3;
  --text-subtle: #737380;
  --heading: #ffffff;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --accent-soft: #1e293b;
  --border: #2a2f3d;
  --border-strong: #3a4050;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.25), 0 24px 48px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.15;
  color: var(--heading);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-top: 2.5rem; }
h3 { font-size: 1.35rem; margin-top: 1.75rem; }

p { margin: 0 0 1rem; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; }

.container {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--heading);
  min-width: 0;
}

.site-brand strong {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-brand span {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.nav-trigger { display: none; }

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.125rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  flex: 0 0 auto;
}

.nav-menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.4375rem 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--heading);
  background: var(--bg-muted);
}

.site-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  background: var(--bg-muted);
}

main { flex: 1; }

.hero {
  padding: 4.5rem 0 3.5rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}

.hero-lead {
  max-width: 42rem;
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.35rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--heading);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-muted);
  color: var(--heading);
}

.section {
  padding: 3rem 0;
}

.section-header {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.card p:last-child { margin-bottom: 0; }

.card-muted {
  background: var(--bg-muted);
  box-shadow: none;
}

.stat-card {
  text-align: left;
}

.stat-value {
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--heading);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.callout {
  padding: 1.5rem 1.75rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-elevated);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2rem 0;
}

.callout strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--heading);
}

.module-grid {
  display: grid;
  gap: 1rem;
}

.module {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.module-id {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 0.2rem;
}

.module h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.module p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.975rem;
}

.module ul {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.violation-card .tag {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}

.page-header {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.page-header p {
  max-width: 42rem;
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0;
}

.prose {
  max-width: 46rem;
}

.prose ul, .prose ol {
  padding-left: 1.25rem;
  margin: 0 0 1.25rem;
}

.prose li { margin-bottom: 0.35rem; }

.partner-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 100%;
}

.partner-card .region {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.donation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.donation-box {
  padding: 1.5rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-muted);
  text-align: center;
}

.donation-box stripe-buy-button {
  display: block;
  margin-top: 1rem;
}

.qr-placeholder {
  width: 140px;
  height: 140px;
  margin: 1rem auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
  font-size: 0.8125rem;
}

.site-footer {
  margin-top: 4rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover { color: var(--heading); }

.founder-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin: 0 0 0.5rem;
}

.card ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
}

.card li { margin-bottom: 0.4rem; }

@media (max-width: 1100px) {
  .site-brand span { display: none; }
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-2, .donation-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .nav-trigger-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    gap: 5px;
  }

  .nav-trigger-label span,
  .nav-trigger-label span::before,
  .nav-trigger-label span::after {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: transform 0.2s;
  }

  .nav-trigger-label span::before,
  .nav-trigger-label span::after {
    content: "";
  }

  .nav-trigger-label span::before { transform: translateY(-7px); }
  .nav-trigger-label span::after { transform: translateY(5px); }

  .nav-trigger { display: none; }

  .nav-menu {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
  }

  .nav-trigger:checked ~ .nav-menu { display: flex; }

  .site-nav { position: relative; }

  .grid-3 { grid-template-columns: 1fr; }

  .hero { padding-top: 3rem; }

  .module { grid-template-columns: 1fr; }
}
