/* TosaadecWorld Foundation — public landing page
   Brand tokens sourced from TWF Asset/TWF brand fonts & colours.pdf */

:root {
  /* Primary palette — exact values from TWF Asset/TWF brand fonts & colours.pdf:
     Black #000000 (50%), Midnight blue #003366 (25%), Cobalt blue #0366FF (25%). */
  --black: #000000;
  --midnight: #003366;
  --cobalt: #0366ff;
  --cobalt-dark: #024fc7; /* derived: darkened cobalt for hover states, not in the brand doc */

  /* Tertiary accent — the brand doc lists Gold on its own, separate from the
     weighted primary triad above, so it's used sparingly (CTAs, highlights). */
  --gold: #d8b767;
  --gold-dark: #c2a052; /* derived: darkened gold for hover states, not in the brand doc */
  --gold-ink: #8a6c23; /* derived: gold darkened further to 4.9:1 on white — for gold text on light backgrounds, where --gold/--gold-dark don't have enough contrast to be legible body copy */

  /* Programme colours — the brand doc names these (Children's education: Red,
     Women's empowerment: Purple, Food security: Orange, Water: Sky blue,
     Environment: Green) without hex values. These hexes are my own pick: chosen
     to read unambiguously as the named colour while sitting well alongside the
     primary palette above. */
  --focus-education: #e63946; /* Red */
  --focus-family: #8e44ad; /* Purple */
  --focus-food: #f2994a; /* Orange */
  --focus-water: #4fc3f7; /* Sky blue */
  --focus-environment: #43a047; /* Green */

  /* Neutrals — not specified in the brand doc; my own choices for page
     surfaces and secondary/meta text. */
  --ash: #67676e;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --border: #e2e6ee;

  /* Typography — all five roles from the brand doc. Proxima Nova and Cortado
     are commercially licensed fonts with no free/Google Fonts distribution;
     Mulish and Yellowtail substitute as the closest free equivalents (swap
     them out first if a licensed copy of Proxima Nova / Cortado is added). */
  --font-display: "Bebas Neue", Impact, "Arial Narrow", sans-serif; /* brand display font */
  --font-sans: "Proxima Nova", "Mulish", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif; /* brand sans font */
  --font-serif: Georgia, "Times New Roman", serif; /* brand serif font */
  --font-hand: "Caveat", cursive; /* brand handwriting font */
  --font-script: "Yellowtail", cursive; /* brand script font (Cortado substitute) */

  --container: 1160px;
  --radius: 18px;
  --shadow-soft: 0 20px 50px -25px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--black);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--cobalt);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--midnight);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

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

/* ---------- Scroll-reveal (progressive enhancement, see main.js) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.21, 0.6, 0.35, 1),
    transform 0.7s cubic-bezier(0.21, 0.6, 0.35, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1.is-visible {
  transition-delay: 0.15s;
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.09s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.18s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.27s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.36s; }

/* JS gates the .reveal/.reveal-stagger *initial* hidden state behind a
   prefers-reduced-motion check (see main.js), but this belt-and-braces media
   query guarantees full visibility even if that check is ever removed. */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 12px 30px -22px rgba(0, 0, 0, 0.45);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.85rem;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--midnight);
}

.brand img {
  height: 34px;
  width: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  font-size: 0.95rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  line-height: 1;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--gold {
  background: var(--gold);
  color: var(--midnight);
  box-shadow: 0 10px 25px -12px rgba(216, 183, 103, 0.7);
}

.btn--gold:hover {
  background: var(--gold-dark);
}

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(circle at 15% 20%, rgba(3, 102, 255, 0.22), transparent 45%),
    var(--midnight);
  color: #fff;
  overflow: clip;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  padding-block: 4rem 3.5rem;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  letter-spacing: 0.14em;
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.6rem);
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin: 0 0 1rem;
}

.hero__lede {
  font-size: 1.15rem;
  color: #dfe6f2;
  margin: 0 0 1.5rem;
  max-width: 46ch;
}

.hero p {
  color: #c7d2e3;
  margin: 0 0 1.1rem;
  max-width: 56ch;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.75rem;
}

.hero__cta-note {
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--gold);
}

.hero__figure {
  position: relative;
}

.hero__figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
  height: auto;
}

.stat-badge {
  position: absolute;
  left: -1.25rem;
  bottom: -1.25rem;
  background: var(--gold);
  color: var(--midnight);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-soft);
  max-width: 220px;
}

.stat-badge strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing: 0.02em;
  line-height: 1;
}

.stat-badge__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ---------- Sections ---------- */
section {
  padding-block: 4rem;
}

.section-head {
  max-width: 62ch;
  margin-bottom: 2.25rem;
}

.section-head .eyebrow {
  color: var(--cobalt);
}

h2 {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  color: var(--midnight);
  margin: 0 0 0.75rem;
}

.mission {
  background: var(--surface);
}

.mission__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.mission blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--midnight);
  border-left: 4px solid var(--gold);
  padding-left: 1.25rem;
  margin: 0 0 1.5rem;
}

.mission blockquote cite {
  display: block;
  font-family: var(--font-hand);
  font-style: normal;
  font-size: 1.4rem;
  color: var(--gold-ink);
  margin-top: 0.6rem;
}

.mission p {
  margin: 0 0 1.1rem;
  color: #3b4453;
}

.mission__media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.mission__media figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--ash);
}

.focus-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: 1.75rem 0 2rem;
}

.focus-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.9rem 0.45rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--midnight);
}

.focus-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.download-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem 1.15rem;
  text-decoration: none;
  color: var(--midnight);
  flex: 1 1 240px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.download-card:hover,
.download-card:focus-visible {
  border-color: var(--cobalt);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -20px rgba(3, 102, 255, 0.4);
}

.download-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: var(--cobalt);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.download-card__title {
  font-weight: 800;
  display: block;
  font-size: 0.95rem;
}

.download-card__meta {
  font-size: 0.78rem;
  color: var(--ash);
}

/* ---------- Coming-soon notice (no-JS fallback only — see .welcome-modal) ---------- */
.notice {
  background: var(--surface);
  padding-block: 2rem 0;
}

.notice__card {
  background: linear-gradient(135deg, #fff8e6, #fff);
  border: 1px solid #f0dca6;
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.notice__card svg {
  flex-shrink: 0;
  color: var(--gold-dark);
  margin-top: 0.2rem;
}

.notice__card p {
  margin: 0;
  color: #4a3d1f;
  font-size: 1rem;
}

.notice__card strong {
  color: var(--midnight);
}

/* ---------- Welcome modal ---------- */
.welcome-modal {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: 420px;
  width: calc(100vw - 2.5rem);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.5);
  background: var(--surface);
}

.welcome-modal::backdrop {
  background: rgba(0, 17, 34, 0.6);
  backdrop-filter: blur(3px);
}

.welcome-modal[open] {
  animation: welcome-modal-in 0.35s cubic-bezier(0.21, 0.6, 0.35, 1);
}

.welcome-modal[open]::backdrop {
  animation: welcome-modal-backdrop-in 0.35s ease;
}

@keyframes welcome-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes welcome-modal-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.welcome-modal__inner {
  position: relative;
  padding: 2.25rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.welcome-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--ash);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.welcome-modal__close:hover {
  background: var(--bg);
  color: var(--midnight);
}

.welcome-modal__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--bg);
  color: var(--cobalt);
  margin-bottom: 1.1rem;
}

.welcome-modal__inner h2 {
  font-size: 1.5rem;
  margin: 0 0 0.6rem;
}

.welcome-modal__inner p {
  color: #3b4453;
  margin: 0 0 1.5rem;
  font-size: 0.98rem;
  line-height: 1.6;
}

.welcome-modal__inner .btn {
  align-self: stretch;
}

@media (prefers-reduced-motion: reduce) {
  .welcome-modal[open],
  .welcome-modal[open]::backdrop {
    animation: none;
  }
}

/* ---------- Focus gallery ---------- */
.gallery {
  background: var(--bg);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.gallery__item {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.gallery__item:hover,
.gallery__item:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 26px 50px -20px rgba(0, 51, 102, 0.35);
}

.gallery__item img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery__item:hover img,
.gallery__item:focus-within img {
  transform: scale(1.06);
}

.gallery__item figcaption {
  padding: 1rem 1.15rem 1.25rem;
  font-size: 0.9rem;
  color: #3b4453;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--black);
  color: #cbd6e8;
  padding-block: 3.5rem 2rem;
}

.footer__brand img {
  height: 30px;
  width: auto;
  margin-bottom: 1rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  gap: 2.5rem;
}

.footer h3 {
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  font-size: 1rem;
  color: var(--gold);
  margin: 0 0 0.9rem;
}

.footer address,
.footer p {
  font-style: normal;
  margin: 0 0 0.6rem;
  font-size: 0.92rem;
  line-height: 1.55;
}

.footer a {
  color: #e9f0fb;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.bank-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.bank-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
}

.bank-list .bank-name {
  color: #9fb0c9;
}

.bank-list .acct-number {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #fff;
}

.copy-btn {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #cbd6e8;
  border-radius: 8px;
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.15s ease, color 0.15s ease;
}

.copy-btn:hover {
  background: var(--cobalt);
  color: #fff;
  border-color: var(--cobalt);
}

.copy-btn[data-copied="true"] {
  background: var(--gold);
  color: var(--midnight);
  border-color: var(--gold);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: #9fb0c9;
}

.footer__bottom p {
  max-width: 90ch;
  font-size: 0.8rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    padding-block: 2.75rem 2.5rem;
  }

  .hero__figure {
    order: -1;
    max-width: 380px;
    margin-inline: auto;
  }

  .mission__grid {
    grid-template-columns: 1fr;
  }

  .mission__media {
    order: -1;
  }

  .gallery__grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

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

  .stat-badge {
    left: 0.75rem;
    bottom: -1rem;
  }

  .notice__card {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn:hover {
    transform: none;
  }
}
