/* =====================================================================
   YLI4Africa — Design System
   Couleurs issues du logo : bleu marine, bleu ciel, rouge, vert, or
   Typo : Lexend (titres) + Source Sans 3 (corps)
   ===================================================================== */

:root {
  /* Brand (logo) */
  --blue:        #00498F;  /* "Youth Leaders" navy */
  --blue-700:    #003A73;
  --blue-900:    #002A54;
  --sky:         #0072BC;  /* "Initiative 4 Africa" */
  --red:         #E0231C;
  --green:       #1E924C;
  --green-700:   #16713A;
  --gold:        #F4B223;
  --gold-600:    #D9990B;

  /* Neutrals */
  --ink:         #0E2540;  /* primary text */
  --muted:       #4B5C72;  /* secondary text */
  --line:        #E2E9F1;
  --surface:     #FFFFFF;
  --surface-2:   #F2F7FC;  /* soft blue-tinted background */

  --radius:      18px;
  --shadow-sm:   0 1px 2px rgba(14,37,64,.06), 0 1px 3px rgba(14,37,64,.08);
  --shadow-md:   0 10px 30px -12px rgba(14,37,64,.22);
  --shadow-lg:   0 24px 60px -20px rgba(0,73,143,.30);
}

* { -webkit-font-smoothing: antialiased; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  color: var(--ink);
  background: #F6FAFE;
  line-height: 1.65;
  position: relative;
}

/* Liquid-glass ambient backdrop — soft colored halos behind translucent surfaces */
body::before {
  content: '';
  position: fixed;
  inset: -15%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 38% at 14% 18%, rgba(0,114,188,.16), transparent 70%),
    radial-gradient(34% 34% at 86% 12%, rgba(244,178,35,.14), transparent 70%),
    radial-gradient(46% 46% at 82% 86%, rgba(30,146,76,.12), transparent 70%),
    radial-gradient(40% 40% at 8% 92%, rgba(224,35,28,.08), transparent 70%);
  filter: blur(26px);
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(0,-2.5%,0) scale(1.06); }
}

h1, h2, h3, h4, .font-head {
  font-family: 'Lexend', system-ui, sans-serif;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

/* Accessible focus ring (logo style §1) */
a, button, input, textarea, select, [tabindex] { outline: none; }
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Skip link */
.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--blue); color: #fff; padding: 10px 16px;
  border-radius: 10px; z-index: 100; transition: top .2s ease; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: 'Lexend', sans-serif; font-weight: 600; font-size: .98rem;
  padding: .8rem 1.5rem; border-radius: 999px; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
  border: 2px solid transparent; line-height: 1; min-height: 48px;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--blue-700); }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 10px 24px -10px rgba(244,178,35,.7); }
.btn-gold:hover { background: var(--gold-600); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.55); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,.22); }
.btn-outline { background: #fff; color: var(--blue); border-color: var(--line); }
.btn-outline:hover { border-color: var(--blue); background: var(--surface-2); }
.btn-wave { background: linear-gradient(135deg, var(--sky), var(--blue)); color:#fff; width:100%; box-shadow: var(--shadow-md); justify-content: space-between; }
.btn-wave:hover { filter: brightness(1.06); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease, background .25s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); background: rgba(255,255,255,.95); }
.nav-link { position: relative; font-weight: 500; color: var(--ink); padding: .35rem 0; transition: color .18s; }
.nav-link:hover { color: var(--blue); }
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: -4px; height: 3px; width: 0;
  background: var(--gold); border-radius: 3px; transition: width .22s ease;
}
.nav-link:hover::after { width: 100%; }
.nav-link[aria-current="page"] { color: var(--blue); font-weight: 600; }
.nav-link[aria-current="page"]::after { width: 100%; }

/* ---------- Hero ---------- */
.hero-gradient {
  background:
    linear-gradient(115deg, rgba(0,42,84,.92) 0%, rgba(0,73,143,.82) 45%, rgba(0,114,188,.62) 100%);
}

/* Light inner-page header (no blue) */
.page-head {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.65), rgba(242,247,252,.45));
  border-bottom: 1px solid rgba(255,255,255,.7);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}

/* ---------- Liquid-glass cards ---------- */
.card {
  background: linear-gradient(135deg, rgba(255,255,255,.74), rgba(255,255,255,.52));
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 10px 34px -16px rgba(14,37,64,.28), inset 0 1px 0 rgba(255,255,255,.65);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card-hover:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.7); border-color: rgba(255,255,255,.9); }

.icon-badge {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  flex: none;
}

/* ---------- Section helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; font-family: 'Lexend', sans-serif;
  font-weight: 600; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue); background: var(--surface-2); border: 1px solid var(--line);
  padding: .4rem .85rem; border-radius: 999px;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Prose for program detail blocks */
.prose-yli h3 { font-size: 1.15rem; color: var(--blue); margin: 1.4rem 0 .5rem; }
.prose-yli p { color: var(--muted); margin-bottom: .85rem; }
.prose-yli ul { margin: .25rem 0 1rem 1.1rem; }
.prose-yli li { color: var(--muted); margin-bottom: .4rem; position: relative; padding-left: .35rem; }
.prose-yli li::marker { color: var(--gold); }
.prose-yli strong { color: var(--ink); }

/* Footer */
.footer-link { color: rgba(255,255,255,.8); transition: color .18s, padding-left .18s; }
.footer-link:hover { color: #fff; padding-left: 4px; }

/* Mobile menu */
#mobile-menu { transition: opacity .25s ease, transform .25s ease; }
#mobile-menu.hidden { opacity: 0; pointer-events: none; transform: translateY(-8px); }
