:root {
  --color-bg: #ffffff;
  --color-surface: #f5f3ee;
  --color-text: #1f2421;
  --color-muted: #5a615c;
  --color-primary: #2f6b4f;
  --color-primary-hover: #265a42;
  --color-border: #d9d6cf;
  --max-width: 1100px;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --space: 1rem;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); }
a:hover { color: var(--color-primary-hover); }

h1, h2, h3 { line-height: 1.2; margin-top: 0; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.muted { color: var(--color-muted); }

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  z-index: 10;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}
.brand {
  font-weight: 700;
  text-decoration: none;
  color: var(--color-text);
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.nav-list a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
}
.nav-list a:hover { color: var(--color-primary); }

/* Hero */
.hero {
  position: relative;
  min-height: min(70vh, 640px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  background-color: #2a3530;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.55)),
    url("../assets/images/hero.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 4rem 0;
}
.hero h1 { color: #ffffff; }
.hero .tagline {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0.5rem 0 1.75rem;
}

/* Sections */
.section {
  padding: 4rem 0;
}
.section-alt {
  background: var(--color-surface);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}
.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  color: #ffffff;
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Gallery */
.gallery {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
  margin: 1.5rem 0;
}
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--color-border);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 600px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

.video-wrap {
  margin-top: 1.5rem;
  background: var(--color-border);
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-placeholder {
  color: var(--color-muted);
  margin: 0;
}

/* Donate */
.donate-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: 1.5rem;
}
@media (min-width: 700px) {
  .donate-grid { grid-template-columns: repeat(3, 1fr); }
}
.donate-card {
  display: block;
  padding: 1.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.donate-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--color-text);
}
.donate-card h3 { margin-bottom: 0.25rem; color: var(--color-primary); }
.donate-card p { margin: 0; color: var(--color-muted); }

/* Books list */
.book-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.book-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}
.book-list li:last-child { border-bottom: none; }

/* Contact form */
.contact-form {
  display: grid;
  gap: 1rem;
  max-width: 600px;
  margin-top: 1.5rem;
}
.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 500;
}
.contact-form input,
.contact-form textarea {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}
.contact-form textarea { resize: vertical; min-height: 120px; }

/* Honeypot — visually hidden but still in DOM */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.status {
  min-height: 1.5em;
  font-weight: 500;
}
.status.success { color: var(--color-primary); }
.status.error { color: #b3261e; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.95rem;
}
.site-footer p { margin: 0.25rem 0; }

@media (max-width: 540px) {
  .nav-list { gap: 0.85rem; }
  .nav-row { flex-wrap: wrap; height: auto; padding-top: 0.5rem; padding-bottom: 0.5rem; }
}
