/* =========================================================
   Afri Black Community — main stylesheet
   Colours draw on The Gambia's flag (red, blue, green)
   with warm earth and gold accents.
   ========================================================= */

:root {
  --green: #1f5c3d;
  --green-dark: #143f2a;
  --red: #c4452c;
  --blue: #1d3f72;
  --gold: #e3a833;
  --cream: #f8f3ea;
  --sand: #efe5d3;
  --ink: #1d1a17;
  --muted: #5d564e;
  --white: #ffffff;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(29, 26, 23, 0.08);
  --font-head: "DM Serif Display", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.6em; }
h1, h2 { font-family: var(--font-head); font-weight: 400; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 0.9rem;
}
.eyebrow-light { color: var(--gold); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); }
.btn-accent { background: var(--gold); color: var(--ink); }
.btn-accent:hover { background: #d29720; }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-small { padding: 0.55rem 1.2rem; font-size: 0.95rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 243, 234, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled { border-color: rgba(0,0,0,0.06); box-shadow: 0 4px 20px rgba(0,0,0,0.04); }

.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }

.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand-logo { height: 60px; width: auto; }
.footer-logo { height: 110px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--font-head); font-weight: 400; font-size: 1.35rem; }
.brand-text small { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }

.site-nav { display: flex; align-items: center; gap: 1.8rem; }
.site-nav a:not(.btn) {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.97rem;
  position: relative;
}
.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--red);
  transition: width 0.25s ease;
}
.site-nav a:not(.btn):hover::after,
.site-nav a.active::after { width: 100%; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px; height: 44px;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3.5rem; align-items: center; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

.hero-art { position: relative; }
.pattern-card {
  aspect-ratio: 4 / 5;
  border-radius: 200px 200px var(--radius) var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-rows: 2fr 0.25fr 1.6fr 0.25fr 2fr;
  box-shadow: var(--shadow);
}
.stripe { position: relative; }
.s1 { background: var(--red); }
.s2, .s4 { background: var(--cream); }
.s3 { background: var(--blue); }
.s5 { background: var(--green); }
/* Woven, kente-inspired texture on top of the flag colours */
.s1::before, .s3::before, .s5::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(227,168,51,0.55) 0 10px, transparent 10px 34px),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.12) 0 6px, transparent 6px 22px);
}
.s3::before {
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.14) 0 8px, transparent 8px 24px),
    repeating-linear-gradient(-45deg, rgba(227,168,51,0.35) 0 4px, transparent 4px 24px);
}

.hero-badge {
  position: absolute;
  left: -1.5rem;
  bottom: 2rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  box-shadow: var(--shadow);
}
.badge-num { font-family: var(--font-head); font-size: 2.2rem; color: var(--green); }
.badge-label { font-size: 0.85rem; font-weight: 600; line-height: 1.3; color: var(--muted); }

/* ---------- Facts strip ---------- */
.facts { background: var(--green); color: var(--white); padding: 2rem 0; }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.fact { display: flex; flex-direction: column; padding-left: 1rem; border-left: 3px solid var(--gold); }
.fact-title { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.8; }
.fact-text { font-weight: 600; font-size: 1.05rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-tint { background: var(--sand); }
.section-dark { background: var(--ink); color: #eae4da; }
.section-dark h2 { color: var(--white); }
.section-head { max-width: 680px; margin-bottom: 3rem; }
.section-sub { color: var(--muted); font-size: 1.1rem; }

.two-col { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 4rem; align-items: start; }

.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 2rem; }
.mv-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.6rem;
  border-top: 4px solid var(--red);
  box-shadow: var(--shadow);
}
.mv-card:nth-child(2) { border-top-color: var(--blue); }
.mv-card p { margin: 0; color: var(--muted); font-size: 0.98rem; }

/* ---------- Programme cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(29,26,23,0.12); }
.card p { color: var(--muted); margin: 0; font-size: 0.98rem; }
.card-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(31, 92, 61, 0.1);
  margin-bottom: 1.3rem;
}
.card-icon svg { width: 28px; height: 28px; fill: var(--green); }
.card:nth-child(3n+2) .card-icon { background: rgba(196, 69, 44, 0.1); }
.card:nth-child(3n+2) .card-icon svg { fill: var(--red); }
.card:nth-child(3n) .card-icon { background: rgba(29, 63, 114, 0.1); }
.card:nth-child(3n) .card-icon svg { fill: var(--blue); }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: none; }
.step { position: relative; padding-top: 1.5rem; border-top: 2px solid var(--ink); }
.step-num { font-family: var(--font-head); font-size: 2.6rem; color: var(--gold); display: block; line-height: 1; margin-bottom: 0.8rem; }
.step p { color: var(--muted); font-size: 0.98rem; margin: 0; }

/* ---------- Leadership ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.person-card {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--green);
}
.person-avatar {
  width: 76px; height: 76px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 1.8rem;
  box-shadow: 0 0 0 4px var(--gold);
}
.person-info h3 { margin: 0 0 0.2rem; font-size: 1.25rem; }
.person-role { margin: 0 0 0.6rem; color: var(--muted); font-weight: 600; }
.person-info { min-width: 0; }
.person-email {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.7rem;
  color: var(--green);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  overflow-wrap: normal;
}
.person-email svg { width: 18px; height: 18px; fill: var(--gold); flex-shrink: 0; }
.person-email:hover { text-decoration: underline; }
.person-badge { display: table;
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(31, 92, 61, 0.1);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- Quote band ---------- */
.quote-band {
  background: var(--red);
  color: var(--white);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  background-image: repeating-linear-gradient(90deg, rgba(0,0,0,0.06) 0 2px, transparent 2px 40px);
}
.quote-band blockquote {
  margin: 0 auto;
  max-width: 880px;
  text-align: center;
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.25;
}
.quote-band cite { display: block; margin-top: 1.2rem; font-family: var(--font-body); font-style: normal; font-size: 1rem; opacity: 0.85; }

/* ---------- Get involved ---------- */
.involve-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.involve-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,0.06);
}
.involve-card p { color: var(--muted); font-size: 0.97rem; flex: 1; }
.involve-card#donate { background: var(--green); color: var(--white); border: 0; }
.involve-card#donate p { color: rgba(255,255,255,0.82); }
.involve-card#donate .link-arrow { color: var(--gold); }

.link-arrow { font-weight: 600; text-decoration: none; color: var(--red); display: inline-flex; align-items: center; gap: 0.4rem; }
.link-arrow::after { content: "→"; transition: transform 0.2s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Contact ---------- */
.contact-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; }
.contact-list li { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.cl-label { color: var(--gold); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; }
.contact-list a { color: var(--white); }

.contact-form {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 2.2rem;
}
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.4rem; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid #d9d2c5;
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  background: var(--cream);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 92, 61, 0.15);
}
.field.invalid input, .field.invalid textarea { border-color: var(--red); }
.form-note { margin: 1rem 0 0; font-size: 0.92rem; min-height: 1.4em; }
.form-note.error { color: var(--red); }
.form-note.success { color: var(--green); }

/* ---------- Footer ---------- */
.site-footer { background: #141210; color: #b9b1a5; padding: 4rem 0 2rem; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
.brand-footer .brand-text strong { color: var(--white); }
.brand-footer .brand-text small { color: #b9b1a5; }
.footer-about { margin-top: 1.2rem; max-width: 30em; }
.footer-email {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 0.9rem;
  margin: 0.4rem 0 1.2rem;
  padding: 0.9rem 1.4rem 0.9rem 1rem;
  background: var(--gold);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(227, 168, 51, 0.25);
  transition: transform 0.2s ease, background 0.2s ease;
}
.footer-email:hover { transform: translateY(-2px); background: #f0b941; }
.footer-email svg {
  width: 40px; height: 40px;
  padding: 9px;
  border-radius: 50%;
  background: var(--ink);
  fill: var(--gold);
  flex-shrink: 0;
}
.fe-text { display: flex; flex-direction: column; line-height: 1.2; }
.fe-text small { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.75; }
.fe-text strong { font-size: clamp(1.25rem, 3vw, 1.55rem); font-weight: 700; word-break: break-all; }
.footer-bottom a { color: var(--gold); }
.footer-reg {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  margin: 0.4rem 0 0;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(227, 168, 51, 0.4);
  border-radius: 999px;
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
}
.footer-reg span { color: var(--gold); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; }
.site-footer h4 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.site-footer a { text-decoration: none; }
.site-footer ul a:hover { color: var(--gold); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.85rem;
}
.footer-bottom p { margin: 0; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .involve-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 76px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    padding: 0.5rem 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 20px 30px rgba(0,0,0,0.06);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 0.9rem 0; border-bottom: 1px solid rgba(0,0,0,0.06); }
  .site-nav a:not(.btn)::after { display: none; }
  .site-nav .btn { margin-top: 1rem; }

  .hero-grid, .two-col { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-art { max-width: 380px; margin-inline: auto; width: 100%; }
  .hero-badge { left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .container { width: calc(100% - 2rem); }
  .cards, .involve-grid, .mv-grid, .steps, .facts-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 1.5rem; }
  .contact-list li { grid-template-columns: 1fr; gap: 0.2rem; }
  .hero-actions .btn { flex: 1; }
}
