/* ============================================================
   Finance For Movement — stylesheet
   Navy + white, classic editorial look (system fonts).
   Edit the variables below to tweak colors site-wide.
   ============================================================ */
:root {
  --navy:      #0a1c3f;   /* primary brand navy */
  --navy-deep: #071430;
  --navy-mid:  #14315e;
  --ink:       #1c2536;
  --muted:     #5a6675;
  --soft:      #f5f7fa;
  --line:      #d9dee8;
  --white:     #ffffff;
  --maxw:      1100px;
  --font-head: Georgia, 'Times New Roman', 'Playfair Display', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }  /* anchor targets clear the fixed header; jumps are instant */
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 780px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; color: var(--navy); }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1rem; }

.text-white { color: #fff !important; }
.tm { font-size: .5em; vertical-align: super; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  padding: .7rem 1.4rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  text-align: center;
}
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-mid); }
.btn--light { background: #fff; color: var(--navy); border-color: #fff; }
.btn--light:hover { background: transparent; color: #fff; }
.btn--outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--ghost:hover { background: rgba(255,255,255,.12); }

/* ---------------- Navbar ---------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 1.2rem; height: 66px; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--navy); }
.brand__logo { width: 42px; height: 42px; flex: 0 0 auto; }
.brand__logo img { width: 100%; height: 100%; object-fit: contain; }
.brand__text { font-family: var(--font-head); font-size: .8rem; line-height: 1.1; letter-spacing: .02em; }
.brand__text strong { font-size: .95rem; }

.nav__links { display: flex; gap: 1.5rem; margin-left: auto; }
.nav__links a { font-size: .93rem; font-weight: 500; color: var(--ink); padding: 4px 0; border-bottom: 2px solid transparent; }
.nav__links a:hover { color: var(--navy); }
.nav__links a.active { color: var(--navy); font-weight: 700; border-bottom-color: var(--navy); }

.nav__actions { display: flex; align-items: center; gap: .8rem; }

/* Search (extreme right) */
.search { position: relative; }
.search__bar { display: flex; align-items: center; gap: .4rem; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: .4rem .6rem; }
.search__bar:focus-within { border-color: var(--navy); }
.search__icon { width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: var(--muted); stroke-width: 2; }
.search__bar input { border: 0; outline: none; background: none; font: inherit; font-size: .88rem; width: 140px; color: var(--ink); }
.search__bar input::placeholder { color: var(--muted); }
.search__results { position: absolute; right: 0; top: 44px; width: min(360px, 88vw); list-style: none; margin: 0; padding: .35rem; background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 8px 24px rgba(10,28,63,.12); max-height: 360px; overflow: auto; z-index: 20; }
.search__results[hidden] { display: none; }
.search__results a { display: block; padding: .5rem .6rem; border-radius: 3px; font-size: .88rem; color: var(--ink); }
.search__results a:hover, .search__results a.sel { background: var(--soft); }
.search__results .sr-title { font-weight: 700; color: var(--navy); }
.search__results .sr-snippet { color: var(--muted); font-size: .8rem; display: block; margin-top: 2px; }
.search__results mark { background: #ffe9a8; padding: 0 1px; }
.search__empty { padding: .5rem .6rem; color: var(--muted); font-size: .85rem; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--navy); }

/* ---------------- Hero ---------------- */
.hero { position: relative; min-height: 88vh; display: flex; align-items: center; background: var(--navy); overflow: hidden; }
.hero--page { min-height: 0; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: .5; }
.hero__content { position: relative; z-index: 2; padding: 120px 24px 90px; max-width: 700px; }
.hero--page .hero__content { padding: 120px 24px 48px; }
.hero__eyebrow { color: rgba(255,255,255,.75); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1rem; }
.hero__title { color: #fff; font-size: clamp(2.3rem, 5.5vw, 3.8rem); margin-bottom: 1rem; }
.hero--page .hero__title { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.hero__lede { color: rgba(255,255,255,.85); font-size: 1.08rem; max-width: 580px; margin-bottom: 1.8rem; }
.hero__cta { display: flex; gap: .9rem; flex-wrap: wrap; }

/* ---------------- Stats ---------------- */
.stats { background: var(--navy-deep); color: #fff; border-top: 1px solid rgba(255,255,255,.1); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { text-align: center; padding: 2.4rem 1rem; }
.stat + .stat { border-left: 1px solid rgba(255,255,255,.1); }
.stat__num { display: block; font-family: var(--font-head); font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; color: #fff; }
.stat__label { color: rgba(255,255,255,.7); font-size: .9rem; }
/* "Floating" stats — numbers count up on scroll, cards gently bob */
.stat--float { animation: stat-bob 4.5s ease-in-out infinite; animation-delay: var(--float-delay, 0s); }
@keyframes stat-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ---------------- Sections ---------------- */
.section { padding: 76px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section--navy { background: var(--navy); border-top: 0 !important; }
.section--soft { background: var(--soft); }
.section__head { max-width: 700px; margin: 0 auto 2.6rem; text-align: center; }
.section__head p { color: var(--muted); }
.kicker { display: block; color: var(--muted); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .5rem; }
.section--navy .kicker { color: rgba(255,255,255,.65); }
.section--navy p { color: rgba(255,255,255,.8); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.about__media img { border: 1px solid var(--line); border-radius: 4px; }

/* About sub-sections: Mission / SDG */
.about__pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 3rem; }
.about__pillars--one { grid-template-columns: 1fr; max-width: 760px; }

/* UN SDG alignment graphic (official goal tiles) */
.sdg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; max-width: 860px; margin: 0 auto; }
.sdg-grid img { width: 100%; border-radius: 4px; box-shadow: 0 6px 18px rgba(10,28,63,.12); }
.pillar { border: 1px solid var(--line); border-radius: 4px; padding: 1.6rem 1.5rem; background: #fff; border-top: 3px solid var(--navy); }
.pillar h3 { margin-bottom: .5rem; }
.pillar p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Partners & sponsors */
.partners-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.4rem; max-width: 900px; margin: 0 auto; }
.partner { border: 1px solid var(--line); border-radius: 4px; background: #fff; min-height: 130px; padding: 1.6rem; display: flex; align-items: center; justify-content: center; text-align: center; }
.partner img { max-height: 72px; width: auto; }
.partner__name { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; color: var(--navy); }
a.partner:hover { border-color: var(--navy); }

/* Why It Matters */
.problem__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.problem__card { border: 1px solid rgba(255,255,255,.22); border-radius: 4px; padding: 1.5rem 1.2rem; }
.problem__big { font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; color: #fff; display: block; margin-bottom: .3rem; }
.problem__card p { color: rgba(255,255,255,.8); margin: 0; font-size: .93rem; }

/* What we do */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.feature { border: 1px solid var(--line); border-radius: 4px; padding: 1.7rem 1.5rem; background: #fff; }
.feature h3 { margin-bottom: .5rem; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

.resourcehub { margin-top: 2.2rem; background: var(--navy); color: #fff; border-radius: 4px; padding: 2rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.resourcehub h3 { color: #fff; }
.resourcehub p { color: rgba(255,255,255,.8); margin: 0; max-width: 620px; font-size: .95rem; }

/* Testimonials */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.testi { border-left: 3px solid var(--navy); padding: .4rem 0 .4rem 1.2rem; margin: 0; }
.testi blockquote { margin: 0 0 .7rem; font-family: var(--font-head); font-style: italic; font-size: 1.02rem; color: var(--ink); }
.testi figcaption { color: var(--muted); font-size: .88rem; }
.testi figcaption strong { color: var(--navy); }

/* 2x2 social grid: two Instagram posts, then the two posters */
.socialgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 420px));
  justify-content: center;
  gap: 1.8rem;
  margin-top: 2.4rem;
}
.socialgrid__cell { display: flex; justify-content: center; align-items: flex-start; }
.socialgrid .instagram-media { width: 100% !important; min-width: 0 !important; max-width: 420px !important; margin: 0 !important; }
.socialgrid img { max-width: 100%; max-height: 460px; width: auto; border: 1px solid var(--line); border-radius: 4px; }
.socialgrid a { display: block; }
.insta-follow { text-align: center; margin-top: 1.8rem; }

/* Gallery — plain photos, no captions */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.gallery img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; }

/* Events */
.events-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; max-width: 820px; margin: 0 auto; }
.event { display: flex; align-items: center; gap: 1.4rem; margin: 0; border: 1px solid var(--line); border-radius: 4px; padding: 1.4rem 1.6rem; background: #fff; }
.event__date { flex: 0 0 auto; width: 74px; height: 74px; border-radius: 4px; background: var(--navy); color: #fff; display: grid; place-content: center; text-align: center; }
.event__month { font-size: .78rem; letter-spacing: .08em; }
.event__day { font-family: var(--font-head); font-weight: 700; font-size: 1.7rem; line-height: 1; }
.event__body h3 { margin-bottom: .2rem; }
.event__body p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Join */
.join__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; max-width: 860px; margin: 0 auto; }
.join__card { border: 1px solid rgba(255,255,255,.25); border-radius: 4px; padding: 1.8rem; text-align: center; }
.join__card h3 { color: #fff; }
.join__meta { list-style: none; padding: 0; margin: 1rem 0 1.4rem; }
.join__meta li { color: rgba(255,255,255,.85); padding: .35rem 0; border-top: 1px solid rgba(255,255,255,.12); font-size: .92rem; }
.join__meta li span { display: block; color: rgba(255,255,255,.6); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.join__note { text-align: center; color: rgba(255,255,255,.8); margin-top: 1.8rem; }
.join__note a { color: #fff; text-decoration: underline; }

/* CTA band */
.ctaband { text-align: center; }
.ctaband__inner { background: var(--navy); border-radius: 4px; padding: 2.6rem 2rem; color: #fff; }
.ctaband__inner h2 { color: #fff; }
.ctaband__inner p { color: rgba(255,255,255,.8); max-width: 540px; margin: 0 auto 1.4rem; }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: 4px; padding: 1rem 1.2rem; margin-bottom: .8rem; background: #fff; }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; color: var(--navy); display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.3rem; color: var(--muted); }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: .8rem 0 0; color: var(--muted); }
.faq__more { text-align: center; margin-top: 2rem; color: var(--muted); }
.faq__more a { color: var(--navy); font-weight: 600; text-decoration: underline; }

/* ---------------- Literacy Kits page ---------------- */
.kit-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.kit-includes { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: .7rem; }
.kit-includes li { position: relative; padding-left: 1.9rem; color: var(--ink); }
.kit-includes li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--navy); font-weight: 700; }
.kit-request { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: #fff; }
.kit-request__head { background: var(--navy); color: #fff; padding: 1rem 1.3rem; }
.kit-request__head h3 { color: #fff; margin: 0; }
.kit-request__head p { margin: .2rem 0 0; color: rgba(255,255,255,.75); font-size: .88rem; }
.kit-request__body { padding: 1.6rem; }
.kit-request__body p { color: var(--muted); }
.kit-iframe { width: 100%; height: 720px; border: 0; display: block; background: #fff; }

/* ---------------- Contact page ---------------- */
.contact-single { text-align: center; }
.contact__email { display: inline-block; font-family: var(--font-head); font-size: 1.25rem; color: var(--navy); font-weight: 700; margin: .4rem 0 1.4rem; text-decoration: underline; }
.contact-single .contact__socials { justify-content: center; }
.contact__socials { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ---------------- Footer ---------------- */
.footer { background: var(--navy-deep); color: rgba(255,255,255,.8); padding: 3rem 0 1.4rem; }
.footer__inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; align-items: center; }
.footer__brand { display: flex; align-items: center; gap: .9rem; }
.footer__logo { width: 52px; height: 52px; flex: 0 0 auto; background: #fff; border-radius: 50%; padding: 5px; }
.footer__logo img { width: 100%; height: 100%; object-fit: contain; }
.footer__brand p { margin: 0; font-size: .9rem; }
.footer__links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer__links a { font-size: .9rem; }
.footer__links a:hover { text-decoration: underline; }
.footer__social { display: flex; gap: .6rem; }
.footer__social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); color: #fff; }
.footer__social svg { width: 17px; height: 17px; fill: currentColor; }
.footer__social a:hover { background: #fff; color: var(--navy); }
.footer__base { max-width: var(--maxw); margin: 2.2rem auto 0; padding: 1.2rem 24px 0; border-top: 1px solid rgba(255,255,255,.14); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .84rem; }

/* ---------------- Responsive ---------------- */
@media (max-width: 920px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  /* Push actions (Join Us + search) to the right, next to the menu button,
     leaving open space after the logo */
  .nav__actions { margin-left: auto; }
  .nav.open .nav__links {
    display: flex; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column;
    background: #fff; padding: .8rem 24px 1.2rem; gap: .2rem; border-bottom: 1px solid var(--line);
  }
  .nav.open .nav__links a { padding: .65rem 0; border-bottom: 1px solid var(--line); }
  .search__bar input { width: 100px; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat + .stat { border-left: 0; }
  .grid-2, .join__grid, .kit-layout, .events-list { grid-template-columns: 1fr; }
  .about__media { order: -1; }
  .about__pillars, .about__pillars--one { grid-template-columns: 1fr; }
  .sdg-grid { grid-template-columns: repeat(2, 1fr); }
  .problem__grid { grid-template-columns: repeat(2, 1fr); }
  .cards-3, .testi-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .socialgrid { grid-template-columns: minmax(0, 420px); }
}
@media (max-width: 520px) {
  .section { padding: 56px 0; }
  /* Keep the Join Us button visible on phones — compact the header to fit */
  .nav__inner { gap: .6rem; }
  .brand__text { display: none; }
  .brand__logo { width: 38px; height: 38px; }
  .nav__cta { padding: .5rem .85rem; font-size: .85rem; }
  .search__bar { padding: .35rem .5rem; }
  .search__bar input { width: 72px; font-size: .85rem; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
}
