/* HUG Foundation: hand-written stylesheet. No framework, no build step. */

:root {
  --bg: #fdf9f4;
  --bg-alt: #f6ead9;
  --fg: #2b241d;
  --muted: #7a6f61;
  --accent: #dd6b28;
  --accent-dark: #b6531c;
  --secondary: #1f6f6b;
  --border: #ecdfcb;
  --card-bg: #ffffff;
  --shadow: 0 2px 14px rgba(43, 36, 29, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.6em;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* -- buttons -------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { text-decoration: none; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; border-color: currentColor; color: inherit; }
.btn-outline:hover { background: rgba(0,0,0,0.05); }
.link-more { font-weight: 600; }
.link-more::after { content: " →"; }
.link-back { font-weight: 600; }
.link-back::before { content: "← "; }

/* -- masthead --------------------------------------------------------- */

.masthead {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.masthead__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.masthead__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--fg);
  margin-right: auto;
}
.masthead__brand img { width: 36px; height: 36px; border-radius: 8px; }
.masthead__brand:hover { text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--fg);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--fg);
  font-weight: 600;
  font-size: 0.96rem;
}
.nav-links a.active { color: var(--accent-dark); }
.nav-links a:hover { text-decoration: none; color: var(--accent-dark); }
.nav-donate {
  background: var(--accent);
  color: #fff !important;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
}
.nav-donate:hover { background: var(--accent-dark); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 20px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 8px 0; width: 100%; }
  .nav-donate { display: inline-block; margin-top: 6px; }
}

/* -- hero --------------------------------------------------------- */

.hero {
  background: var(--bg-alt);
  background-size: cover;
  background-position: center;
  text-align: center;
  padding: 70px 20px;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(30, 22, 12, 0.45);
}
.hero.has-image { color: #fff; }
.hero:not(.has-image)::before { display: none; }
.hero__inner { position: relative; max-width: 720px; margin: 0 auto; }
.hero h1, .hero h2 { margin-bottom: 0.3em; }
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.6em;
}
.hero .eyebrow { opacity: 0.85; }
.hero-plain {
  background: var(--bg-alt);
  padding: 56px 20px;
  text-align: center;
}

/* -- sections ------------------------------------------------------- */

.section { padding: 60px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head p { color: var(--muted); }

/* -- stat + intro row ------------------------------------------------ */

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.stat-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-box__number {
  font-family: "Poppins", sans-serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent-dark);
}
.stat-box__label { color: var(--muted); margin-top: 6px; }

@media (max-width: 760px) {
  .intro-grid { grid-template-columns: 1fr; }
}

/* -- icon cards (mission / donate / volunteer) ------------------------ */

.icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.icon-card { text-align: center; }
.icon-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  color: var(--accent);
}
.icon-card__icon svg { width: 100%; height: 100%; }

@media (max-width: 760px) {
  .icon-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* -- card grid (projects / stories) ----------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card__img { aspect-ratio: 4 / 3; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.card__body h3 { margin-bottom: 0.3em; }
.card__body h3 a { color: var(--fg); }
.card__meta { color: var(--muted); font-size: 0.88rem; margin-bottom: 0.6em; }
.card__body p { color: var(--muted); flex: 1; }

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

/* -- team grid --------------------------------------------------------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.team-card { text-align: center; }
.team-card img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
}
.team-card h3 { margin-bottom: 0.15em; font-size: 1.05rem; }
.team-card__role { color: var(--accent-dark); font-weight: 600; font-size: 0.9rem; }
.team-card__bio { color: var(--muted); font-size: 0.92rem; margin-top: 8px; text-align: left; }

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

/* -- split feature (image + text) --------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.split img { border-radius: 12px; }
.split.reverse .split__media { order: 2; }
.split.split--top { align-items: start; }

@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse .split__media { order: 0; }
}

/* -- forms -------------------------------------------------------------- */

.form-field {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--card-bg);
  color: var(--fg);
  margin-bottom: 14px;
}
textarea.form-field { resize: vertical; }
.form-note { font-size: 0.88rem; color: var(--muted); }
/* honeypot: off-screen, not display:none, since some bots skip hidden fields specifically */
.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* -- gallery / lightbox --------------------------------------------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.gallery-grid a {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  position: relative;
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gallery-grid a:hover img { transform: scale(1.05); }

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

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 5, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 40px 20px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 6px; }
.lightbox figcaption { color: #eee; text-align: center; margin-top: 14px; }
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}
.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover { background: rgba(255,255,255,0.25); }

/* -- article / story body ------------------------------------------------ */

.article {
  max-width: 720px;
  margin: 0 auto;
}
.article__meta { color: var(--muted); margin-bottom: 1.6em; }
.article figure { margin: 1.6em 0; }
.article figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 0.4em; }
.article blockquote {
  border-left: 4px solid var(--accent);
  margin: 1.6em 0;
  padding: 0.4em 0 0.4em 1.2em;
  font-style: italic;
  color: var(--muted);
}
.article .back-link { display: inline-block; margin-top: 2em; padding-top: 1.4em; border-top: 1px solid var(--border); width: 100%; }
.article h2 { margin-top: 1.6em; }
.article address { font-style: normal; color: var(--muted); }

/* -- pagination ----------------------------------------------------------- */

.pagination { display: flex; justify-content: center; gap: 14px; margin-top: 40px; }

/* -- footer ----------------------------------------------------------------- */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 50px 0 24px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-grid h4 { font-size: 1rem; margin-bottom: 0.8em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.5em; color: var(--muted); }
.footer-grid a { color: var(--fg); }
.footer-social { display: flex; gap: 12px; margin-top: 14px; }
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
}
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}
.footer-bottom a { color: var(--muted); text-decoration: underline; }

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* -- skip link / a11y -------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  z-index: 200;
}
.skip-link:focus { left: 16px; top: 16px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
