/* ==========================================================================
   Neribo Foundation
   Palette:  adire indigo #22336B, deep ink #141B34, zobo crimson #B3203F,
             pale indigo #EEF1F8, white, palm green #0F7A40 (WhatsApp only)
   Type:     Epilogue (headings, numerals), Nunito Sans (body)
   ========================================================================== */

:root {
  --indigo: #22336b;
  --ink: #141b34;
  --crimson: #b3203f;
  --crimson-dark: #921933;
  --tint: #eef1f8;
  --paper: #ffffff;
  --green: #0f7a40;
  --green-dark: #0b6132;
  --text: #1c2238;
  --muted: #4c556e;
  --line: #d6dcea;
  --ph-1: #d9deea;
  --ph-2: #edeff6;

  --font-head: "Epilogue", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Nunito Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --radius: 5px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
p { margin: 0 0 1rem; max-width: 62ch; }
h1, h2, h3, h4 { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
figure { margin: 0; }

a { color: var(--indigo); text-underline-offset: 0.2em; }
a:hover { color: var(--crimson); }

:focus-visible {
  outline: 3px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-dark :focus-visible { outline-color: #ffd0da; }

.wrap {
  width: min(100% - 2.5rem, 72rem);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 50;
  background: var(--indigo);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; outline-color: #ffd0da; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.6rem 1.4rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-crimson { background: var(--crimson); color: #fff; }
.btn-crimson:hover { background: var(--crimson-dark); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); color: #fff; }
.btn-outline { border-color: var(--indigo); color: var(--indigo); }
.btn-outline:hover { background: var(--indigo); color: #fff; }
.btn-outline-light { border-color: rgba(255, 255, 255, 0.8); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--indigo); border-color: #fff; }
.btn-lg { min-height: 3.3rem; padding-inline: 1.6rem; font-size: 1.02rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--indigo);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--indigo); }
.brand-mark { flex: none; width: auto; height: 2.75rem; }
.brand-mark-footer {
  background: #fff;
  padding: 0.3rem 0.4rem;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
}
.site-nav a {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--crimson); color: var(--indigo); }

.bar-cta { min-height: 2.75rem; padding-inline: 1.15rem; white-space: nowrap; }

.menu-toggle {
  display: none;
  width: 2.75rem; height: 2.75rem;
  padding: 0;
  background: transparent;
  border: 2px solid var(--indigo);
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 1.15rem; height: 2px;
  background: var(--indigo);
  content: "";
  position: relative;
}
.menu-icon::before { position: absolute; top: -6px; }
.menu-icon::after { position: absolute; top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 34rem) {
  .bar { gap: 0.5rem; }
  .brand { font-size: 0.95rem; gap: 0.45rem; }
  .brand span { white-space: normal; line-height: 1.1; max-width: 6.4rem; }
  .brand-mark { height: 2.4rem; }
  .bar-cta { padding-inline: 0.8rem; font-size: 0.92rem; min-height: 2.6rem; }
  .menu-toggle { width: 2.6rem; height: 2.6rem; }
}
@media (max-width: 24rem) {
  .brand { font-size: 0.85rem; gap: 0.35rem; }
  .brand span { max-width: 5.2rem; }
  .brand-mark { height: 2rem; }
  .bar-cta { white-space: normal; line-height: 1.1; padding-inline: 0.6rem; }
  .menu-toggle { width: 2.4rem; height: 2.4rem; }
}

@media (max-width: 56rem) {
  .bar-cta { margin-left: auto; }
  .site-nav { margin-left: 0; }

  .js .menu-toggle { display: inline-flex; }
  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1rem;
  }
  .js .site-nav.is-open { display: flex; }
  .js .site-nav a {
    padding: 0.9rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--line);
  }
  .js .site-nav a:hover { border-bottom-color: var(--line); }

  /* Without JavaScript the links simply wrap under the logo */
  html:not(.js) .bar { flex-wrap: wrap; padding-block: 0.5rem; }
  html:not(.js) .site-nav { order: 3; width: 100%; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
}

/* ---------- Photo placeholder ---------- */
.photo {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ph-1), var(--ph-2));
  border-radius: var(--radius);
}
.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ph-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--muted);
}
.photo-fill { position: absolute; inset: 0; border-radius: 0; }
.photo-portrait { aspect-ratio: 4 / 5; }

/* ---------- Hero: photo with an adire-patterned message panel ---------- */
.hero { position: relative; }
.hero-photo {
  position: relative;
  height: clamp(20rem, 52vh, 34rem);
  overflow: hidden;
}
.hero-photo .photo img { animation: settle 1.6s ease-out both; object-position: center 20%; }

@keyframes settle {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}

.hero-panel-wrap { position: relative; z-index: 2; margin-top: -3.5rem; }
.hero-panel {
  max-width: 44rem;
  padding: 2rem 1.5rem 2.25rem;
  color: #fff;
  background-color: var(--indigo);
  /* faint concentric rings, echoing adire tie-resist cloth */
  background-image: radial-gradient(
    circle at 50% 50%,
    transparent 0 9px,
    rgba(255, 255, 255, 0.075) 9px 11px,
    transparent 11px 19px,
    rgba(255, 255, 255, 0.075) 19px 21px,
    transparent 21px 29px,
    rgba(255, 255, 255, 0.075) 29px 31px,
    transparent 31px
  );
  background-size: 64px 64px;
  border-radius: var(--radius);
}
.hero-panel h1 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);
  line-height: 1.07;
  letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
  text-wrap: balance;
}
.hero-panel p { font-size: 1.15rem; color: #e3e8f6; margin-bottom: 1.75rem; max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

@media (min-width: 56rem) {
  .hero-photo { height: clamp(26rem, 60vh, 36rem); }
  .hero-panel-wrap { margin-top: -10rem; }
  .hero-panel { padding: 2.75rem 3rem 3rem; }
}

/* ---------- Shared section styles ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-tint { background: var(--tint); }

.h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--indigo);
  margin-bottom: 0.9rem;
  text-wrap: balance;
}
.section-head { margin-bottom: 2.5rem; max-width: 40rem; }
.section-head .h2 { margin-bottom: 0.75rem; }
.section-intro { font-size: 1.15rem; color: var(--muted); margin: 0 0 1.5rem; max-width: 40rem; }
.section-head .section-intro { margin: 0; }

.text-link { font-weight: 700; font-size: 1rem; color: var(--indigo); }
.text-link:hover { color: var(--crimson); }

/* ---------- Mission ---------- */
.mission { display: grid; gap: 1.5rem; }
.mission .h2 { position: relative; padding-top: 1rem; }
.mission .h2::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3rem; height: 4px;
  background: var(--crimson);
}
.mission-lead {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.3rem, 1.05rem + 1vw, 1.75rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 1.5rem;
  max-width: 36rem;
}
@media (min-width: 58rem) {
  .mission { grid-template-columns: 4fr 8fr; gap: 4rem; }
}

/* ---------- Impact ---------- */
.impact { display: grid; gap: 2.5rem; }

.stats {
  display: grid;
  gap: 1.75rem 2rem;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 1.25rem;
}
.stat {
  display: flex;
  flex-direction: column;
  border-top: 3px solid var(--indigo);
  padding-top: 0.75rem;
}
.stat .num {
  order: 1;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--indigo);
  margin-bottom: 0.5rem;
}
.stat .desc {
  order: 2;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--text);
}
.fine { font-size: 0.95rem; color: var(--muted); margin: 0; }

@media (max-width: 26rem) {
  .stats { grid-template-columns: 1fr; }
}
@media (min-width: 58rem) {
  .impact { grid-template-columns: 5fr 6fr; gap: 4.5rem; align-items: center; }
}

/* ---------- Programs: alternating editorial rows ---------- */
.program {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}
.program + .program { margin-top: 3.5rem; }
.program-media { aspect-ratio: 4 / 3; }
.program h3 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.4rem, 1.1rem + 1.1vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--indigo);
  margin-bottom: 0.75rem;
}
.program p { font-size: 1.1rem; margin-bottom: 1.1rem; }

@media (min-width: 52rem) {
  .program { grid-template-columns: 6fr 5fr; gap: 3.5rem; }
  .program:nth-of-type(even) { grid-template-columns: 5fr 6fr; }
  .program:nth-of-type(even) .program-media { order: 2; }
}

/* ---------- Get involved ---------- */
.options { display: grid; gap: 1.5rem; }
.option { padding: 1.75rem 1.5rem 2rem; border-radius: var(--radius); }
.option h3 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 0.75rem;
}
.option p { font-size: 1.1rem; }
.option-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.option { display: flex; flex-direction: column; }
.option .option-actions { margin-top: auto; padding-top: 1.5rem; }
.option-volunteer { background: var(--indigo); color: #fff; }
.ways { list-style: none; margin: 0.25rem 0 0; }
.ways li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 1.05rem;
}
.ways li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.05rem;
  width: 0.65rem; height: 0.65rem;
  border-radius: 50%;
  border: 2px solid #ffd0da;
}
.option-volunteer p { color: #e3e8f6; }

.option-donate {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 6px solid var(--crimson);
}
.option-donate h3 { color: var(--ink); }

.bank {
  margin: 1.25rem 0 0;
  padding: 1rem 1.15rem;
  background: var(--tint);
  border: 1px solid #c3cbe2;
  border-left: 5px solid var(--indigo);
  border-radius: var(--radius);
}
.bank-flag {
  margin: 0 0 0.75rem;
  font-size: 0.92rem !important;
  font-weight: 700;
  color: var(--crimson-dark);
}
.bank dl { display: grid; gap: 0.5rem; }
.bank dl div { display: flex; flex-wrap: wrap; gap: 0.15rem 1rem; }
.bank dt { flex: 0 0 8.5rem; font-size: 0.98rem; color: var(--muted); }
.bank dd { font-weight: 700; color: var(--ink); }
.bank dl div:last-child dd { font-family: var(--font-head); font-size: 1.3rem; letter-spacing: 0.06em; }

@media (min-width: 58rem) {
  .options { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .option { padding: 2.5rem 2.25rem 2.75rem; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #d5dbee;
  border-top: 4px solid var(--crimson);
  padding-top: 3rem;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: #ffd0da; }
.site-footer .brand { color: #fff; }
.site-footer .brand:hover { color: #fff; }

.footer-grid { display: grid; gap: 2rem; }
.footer-brand p { margin-top: 1rem; max-width: 26rem; }
.site-footer h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffd0da;
  margin-bottom: 0.75rem;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.4rem; }

.footer-base {
  margin-top: 2.5rem;
  padding-block: 1.25rem 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.95rem;
}
.footer-base p { margin: 0 0 0.35rem; max-width: none; }

@media (min-width: 52rem) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-photo .photo img { animation: none; }
  .btn { transition: none; }
}
