/* KSAR Foundation — site styles
   Palette: forest, granite, birch, rescue orange */
:root {
  --forest: #1e3a2f;
  --forest-deep: #132820;
  --pine: #2f5944;
  --granite: #2a2d2b;
  --stone: #5d625e;
  --birch: #f5f1e8;
  --paper: #fffdf8;
  --line: #ddd5c4;
  --orange: #e2611f;
  --orange-dark: #c04e12;
  --radius: 10px;
  --max: 1120px;
  --head: "Oswald", "Arial Narrow", sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.075rem;
  line-height: 1.65;
  color: var(--granite);
  background: var(--birch);
}
img { max-width: 100%; display: block; }
a { color: var(--pine); text-underline-offset: 3px; }
a:hover { color: var(--orange-dark); }

h1, h2, h3 {
  font-family: var(--head);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--forest-deep);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); text-transform: uppercase; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); text-transform: uppercase; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.eyebrow {
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.85rem;
  color: var(--orange);
  margin-bottom: 0.6rem;
  display: block;
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 100; }

/* ---------- Header ---------- */
.site-header {
  background: var(--forest-deep);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--orange);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}
.brand:hover { color: #fff; }
.brand img { width: 56px; height: 56px; border-radius: 50%; background: #fff; object-fit: contain; }
.brand span {
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1rem;
  line-height: 1.15;
}
.brand small { display: block; font-size: 0.72rem; letter-spacing: 0.18em; opacity: 0.75; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: #e9efe9;
  text-decoration: none;
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.92rem;
  padding: 8px 12px;
  border-radius: 6px;
}
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,0.08); }
.nav a.btn { margin-left: 8px; }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  border-radius: 6px;
  padding: 8px 12px;
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--forest-deep);
    padding: 8px 20px 20px;
    border-bottom: 3px solid var(--orange);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .nav a.btn { margin: 12px 0 0; text-align: center; border-bottom: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--orange);
  color: #fff !important;
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 6px;
  border: 2px solid var(--orange);
  transition: background 0.15s ease;
}
.btn:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
button.btn { cursor: pointer; font-size: 1rem; line-height: inherit; }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,0.7); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.btn-dark { background: var(--forest); border-color: var(--forest); }
.btn-dark:hover { background: var(--forest-deep); border-color: var(--forest-deep); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  background: linear-gradient(180deg, #24493a 0%, #1a3329 55%, #132820 100%);
  overflow: hidden;
}
.hero.has-photo {
  background-size: cover;
  background-position: center;
}
.hero.has-photo::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(19,40,32,0.92) 0%, rgba(19,40,32,0.65) 55%, rgba(19,40,32,0.3) 100%);
}
.hero .ridges { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: auto; pointer-events: none; }
.hero .wrap { position: relative; padding-top: 96px; padding-bottom: 150px; }
.hero h1 { color: #fff; max-width: 20ch; }
.hero p.lead { font-size: 1.25rem; max-width: 40rem; color: #e3ebe5; margin-bottom: 1.6em; }

.page-hero .wrap { padding-top: 64px; padding-bottom: 110px; }
.page-hero h1 { max-width: 22ch; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-paper { background: var(--paper); }
.section-forest { background: var(--forest); color: #e7eee9; }
.section-forest h2, .section-forest h3 { color: #fff; }
.section-forest a:not(.btn) { color: #ffd2b8; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 28px; }
  section { padding: 56px 0; }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.section-paper .card { background: var(--birch); }
.card .icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.card .icon svg { width: 26px; height: 26px; }
.card p:last-child { margin-bottom: 0; }

/* Mission strip */
.mission {
  font-family: var(--head);
  font-size: clamp(1.4rem, 3vw, 2rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: #fff;
  margin: 8px 0 0;
}
.mission span::after { content: "›"; color: var(--orange); margin-left: 22px; }
.mission span:last-child::after { content: ""; margin: 0; }

/* Facts list */
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.facts li { padding-left: 34px; position: relative; }
.facts li::before {
  content: "";
  position: absolute; left: 0; top: 0.35em;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: inset 0 0 0 5px var(--orange), inset 0 0 0 9px #fff;
}

/* Photo frames */
.photo {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #cfd6cf;
  position: relative;
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--stone);
  background:
    repeating-linear-gradient(45deg, #e6e1d4 0 14px, #ece8dc 14px 28px);
  border: 2px dashed #bfb59f;
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  padding: 16px;
}
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery .photo:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gallery .photo:nth-child(2), .gallery .photo:nth-child(3) { aspect-ratio: auto; }
.gallery .photo { min-height: 0; }
.gallery .photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery .photo:first-child { grid-column: span 2; grid-row: auto; aspect-ratio: 16/10; }
  .gallery .photo:nth-child(2), .gallery .photo:nth-child(3) { aspect-ratio: 4/3; }
  .gallery .photo:last-child:nth-child(even) { grid-column: span 2; aspect-ratio: 16/10; }
}

/* Priority callout */
.priority {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
}
.priority .body { padding: 36px; }
.priority .photo { border-radius: 0; aspect-ratio: auto; min-height: 280px; }
.tag {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
}
@media (max-width: 860px) { .priority { grid-template-columns: 1fr; } .priority .photo { min-height: 220px; } }

/* Sponsors */
.sponsor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.sponsor {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 3 / 2;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  text-decoration: none;
  color: var(--granite);
  font-family: var(--head);
  letter-spacing: 0.04em;
}
.sponsor img { max-height: 80px; width: auto; object-fit: contain; }
.sponsor.placeholder { border-style: dashed; color: var(--stone); background: transparent; text-transform: uppercase; font-size: 0.85rem; }

/* Donate */
.donate-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .donate-options { grid-template-columns: 1fr; } }
.qr { width: 180px; height: 180px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 0 auto 12px; }
.qr-img { display: block; width: 100%; max-width: 280px; height: auto; margin: 0 auto 12px; }
.qr.placeholder { display: grid; place-items: center; border-style: dashed; font-family: var(--head); font-size: 0.8rem; color: var(--stone); text-transform: uppercase; text-align: center; }
.center { text-align: center; }
.fine { font-size: 0.92rem; color: var(--stone); }

/* CTA band */
.cta-band {
  background: var(--orange);
  color: #fff;
  padding: 56px 0;
}
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0; }
.cta-band p { margin: 6px 0 0; color: #fff3ea; }
.cta-band .btn { background: var(--forest-deep); border-color: var(--forest-deep); }
.cta-band .btn:hover { background: #000; border-color: #000; }

/* Footer */
.site-footer {
  background: var(--granite);
  color: #c9cec9;
  padding: 48px 0 28px;
  font-size: 0.95rem;
}
.site-footer a { color: #fff; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h3 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer address { font-style: normal; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 32px; padding-top: 20px; font-size: 0.85rem; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; } }
