/* ============================================================
   AFRICAN YOUTH NETWORK — DESIGN SYSTEM (main.css)
   Shared across all pages: tokens, reset, typography, buttons,
   header/nav, mobile drawer, footer, reveal motion, marquee,
   toast, utilities.
   ============================================================ */

:root {
  /* Brand palette — built on the AYN blue identity */
  --navy-950: #003366;          /* AYN deep blue — hero/footer bases  */
  --navy-900: #003366;          /* same as primary, kept for compat   */
  --primary:  #003366;          /* AYN primary blue                   */
  --blue-700: #00457f;
  --blue-600: #005b9f;          /* AYN secondary blue                 */
  --sky-500:  #2f9be8;          /* sky-blue highlight                 */
  --sky-100:  #e6f2ff;          /* light sky tint                     */
  --blue-100: #e6f2ff;          /* tint (alias)                       */
  --gold:     #c9a227;          /* premium gold accent                */
  --gold-500: #e6a23c;          /* warm gold (CTA energy)             */

  /* Neutrals */
  --paper:    #f8f7f2;          /* warm off-white section background  */
  --white:    #ffffff;
  --ink:      #1d222d;          /* near-black text                    */
  --muted:    #ffffffbf;
  --line:     #e3e1d8;          /* hairline dividers                  */
  --line-dark: rgba(255,255,255,.14);

  /* Typography */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Montserrat', 'Calibri', sans-serif;

  /* Radius (editorial: restrained) */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  /* Shadows */
  --sh-sm: 0 1px 2px rgba(6,22,45,.06), 0 2px 8px rgba(6,22,45,.06);
  --sh-md: 0 8px 28px rgba(6,22,45,.12);
  --sh-lg: 0 24px 64px rgba(6,22,45,.18);

  /* Layout */
  --container: 1200px;
  --nav-h: 76px;
  --pad-x: clamp(20px, 5vw, 56px);
  --section-y: clamp(64px, 10vw, 120px);

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--navy-950); }

/* Focus visibility (accessibility) */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--blue-600);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--navy-950); color: #fff; padding: 12px 20px;
  font-weight: 600; font-size: .9rem;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ─── Typography ─── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--navy-950);
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6.2vw, 4.9rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3.1rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.7rem); }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; letter-spacing: 0; }
p  { color: var(#1d222d); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--blue-600);
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--gold); }
.eyebrow.on-dark { color: var(--gold-500); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--pad-x); }
.section { padding: var(--section-y) 0; }
.section-paper { background: var(--paper); }
.section-navy { background: var(--navy-950); color: #fff; }
.section-navy h2, .section-navy h3, .section-navy h4 { color: #fff; }
.section-navy p { color: rgba(255,255,255,.72); }

.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .eyebrow::after { content: ""; width: 34px; height: 1px; background: var(--gold); }
.section-head h2 { margin: 16px 0 14px; }
.section-head p { font-size: 1.06rem; }

/* ─── Buttons — dual-layer text-swap hover ─── */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 17px 34px;
  font-weight: 600; font-size: .92rem; letter-spacing: .02em;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  overflow: hidden;
  transition: background .35s var(--ease), border-color .35s var(--ease),
              color .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
  white-space: nowrap;
}
.btn .btn-swap { position: relative; display: inline-block; overflow: hidden; height: 1.3em; line-height: 1.3em; }
.btn .btn-swap > span { display: block; transition: transform .45s var(--ease); }
.btn .btn-swap > span::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 100%;
  white-space: nowrap;
}
.btn:hover .btn-swap > span { transform: translateY(-100%); }
.btn i { transition: transform .35s var(--ease); }
.btn:hover i.fa-arrow-right, .btn:hover i.fa-arrow-up { transform: translateX(4px); }

.btn-primary { background: var(--blue-600); color: #fff; }
.btn-primary:hover { background: var(--primary); }
.btn-gold { background: var(--gold-500); color: var(--navy-950); box-shadow: 0 10px 30px rgba(230,162,60,.35); }
.btn-gold:hover { background: var(--gold); box-shadow: 0 14px 36px rgba(201,162,39,.4); }
.btn-outline { border-color: rgba(255,255,255,.4); color: #fff; background: transparent; }
.btn-outline:hover { background: #fff; color: var(--navy-950); border-color: #fff; }
.btn-outline-dark { border-color: var(--navy-950); color: var(--navy-950); background: transparent; }
.btn-outline-dark:hover { background: var(--navy-950); color: #fff; }
.btn-lg { padding: 20px 44px; font-size: 1rem; }
.btn-sm { padding: 12px 22px; font-size: .82rem; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ─── Header / Navigation ─── */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 900;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .4s var(--ease), box-shadow .4s var(--ease),
              border-color .4s var(--ease), backdrop-filter .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled, .site-header.solid {
  background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  box-shadow: var(--sh-sm);
}
.nav-inner {
  width: 100%; max-width: 1360px; margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { width: 46px; height: 46px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text .t1 {
  font-family: var(--font-display); font-weight: 600; font-size: 1.06rem;
  letter-spacing: .01em; color: var(--navy-950);
}
.brand-text .t2 {
  font-size: .6rem; font-weight: 700; letter-spacing: .3em;
  text-transform: uppercase; color: var(--blue-600); margin-top: 3px;
}
/* transparent-over-hero state: light text until scrolled */
.site-header.over-hero:not(.scrolled) .brand-text .t1 { color: #fff; }
.site-header.over-hero:not(.scrolled) .brand-text .t2 { color: var(--gold-500); }
.site-header.over-hero:not(.scrolled) .nav-link { color: rgba(255,255,255,.88); }
.site-header.over-hero:not(.scrolled) .nav-link:hover,
.site-header.over-hero:not(.scrolled) .nav-link.active { color: #fff; }
.site-header.over-hero:not(.scrolled) .hamburger span { background: #fff; }

.nav-desktop { display: flex; align-items: center; gap: 6px; }
.nav-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  font-size: .88rem; font-weight: 600; letter-spacing: .01em;
  color: var(--ink);
  border-radius: var(--r-sm);
  transition: color .25s;
}
.nav-link i { font-size: .62rem; transition: transform .3s var(--ease); }
.nav-link::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px;
  height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--blue-600); }
.site-header.over-hero:not(.scrolled) .nav-link.active { color: #fff; }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 240px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-md); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown:hover .dropdown-toggle i { transform: rotate(180deg); }
.dropdown-menu a {
  display: block; padding: 11px 14px; font-size: .88rem; font-weight: 500;
  color: var(--ink); border-radius: var(--r-sm);
  transition: background .2s, color .2s;
}
.dropdown-menu a:hover { background: var(--blue-100); color: var(--blue-600); }
.dropdown-menu a.active { color: var(--blue-600); font-weight: 600; }

.nav-cta { margin-left: 14px; }
.nav-cta .btn { padding: 12px 24px; font-size: .84rem; }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 10px; z-index: 1001; }
.hamburger span { width: 24px; height: 2px; background: var(--navy-950); transition: .35s var(--ease); }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 990;
  background: rgba(6,22,45,.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: .35s;
}
.drawer-overlay.active { opacity: 1; visibility: visible; }
.mobile-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1000;
  width: min(360px, 88vw);
  background: var(--navy-950); color: #fff;
  padding: 28px 30px 40px;
  transform: translateX(100%);
  transition: transform .45s var(--ease);
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.mobile-drawer.active { transform: translateX(0); }
.drawer-close {
  align-self: flex-end; font-size: 1.3rem; color: rgba(255,255,255,.7);
  padding: 6px; transition: color .2s;
}
.drawer-close:hover { color: #fff; }
.drawer-nav { display: flex; flex-direction: column; margin-top: 12px; }
.drawer-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 4px; font-size: 1.05rem; font-weight: 600;
  border-bottom: 1px solid var(--line-dark); color: #fff;
}
.drawer-link.active { color: var(--gold-500); }
.drawer-link i { font-size: .7rem; transition: transform .3s; }
.drawer-link.open i { transform: rotate(180deg); }
.drawer-submenu { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.drawer-submenu.open { max-height: 200px; }
.drawer-submenu a {
  display: block; padding: 12px 4px 12px 20px;
  font-size: .95rem; color: rgba(255,255,255,.72);
  border-bottom: 1px solid var(--line-dark);
}
.drawer-submenu a.active { color: var(--gold-500); }
.drawer-cta { margin-top: 26px; }
.drawer-cta .btn { width: 100%; }

/* ─── Footer — light, so the transparent AYN logo blends in ─── */
.footer {
  background: var(--navy-950); color: var(--ink);
  border-top: 3px solid var(--blue-600);
  padding: clamp(56px,8vw,88px) 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: clamp(32px, 5vw, 64px);
  padding-bottom: clamp(40px, 6vw, 64px);
}
/* transparent logo sits directly on the footer — no white badge */
.footer-brand .brand-badge {
  display: inline-flex; background: transparent; border-radius: 0;
  padding: 0; margin-bottom: 20px;
}
.footer-brand .brand-badge img { width: 64px; height: 64px; object-fit: contain; }
.footer-brand p { color: var(--muted); font-size: .94rem; max-width: 320px; }
.footer-social { display: flex; gap: 10px; margin-top: 22px; }
.footer-social a {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid #c8d6e4; border-radius: 50%;
  color: var(--blue-600); font-size: .9rem;
  transition: background .3s, color .3s, border-color .3s, transform .3s;
}
.footer-social a:hover { background: var(--blue-600); border-color: var(--blue-600); color: #fff; transform: translateY(-3px); }
.footer-title {
  font-family: var(--font-body); font-size: 1.125rem; font-weight: 700;
  letter-spacing: .2em;  color: var(--white);
  margin-bottom: 22px;
}
.footer-links li, .footer-contact li { margin-bottom: 12px; }
.footer-links a { color: var(--muted); font-size: .94rem; transition: color .2s, padding-left .25s; }
.footer-links a:hover { color: var(--white); padding-left: 6px; }
.footer-contact li { display: flex; gap: 12px; align-items: flex-start; color: var(--white); font-size: .92rem; }
.footer-contact i { color: var(--gold-500); margin-top: 4px; font-size: .85rem; }
.footer-contact a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 24px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.footer-bottom p { color: var(--muted); font-size: .82rem; }
.footer-bottom .motto { color: var(--muted); letter-spacing: .12em; text-transform: uppercase; font-size: 1.125rem; font-weight: 700; }

/* ─── Reveal motion (replaces AOS) ─── */
[data-reveal] {
  opacity: 0; transform: translateY(34px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
[data-reveal="left"]  { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="zoom"]  { transform: scale(.94); }
[data-reveal].revealed { opacity: 1; transform: none; }

/* ─── Counters ─── */
.stat-number, .counter { font-variant-numeric: tabular-nums; }

/* ─── Partner marquee ─── */
.marquee {
  overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; align-items: center; gap: clamp(48px, 6vw, 88px); width: max-content; will-change: transform; }
.marquee:hover .marquee-track { animation-play-state: paused; }
/* Partner strip — logos themselves move; no boxes, borders or shadows */
.partner-tile {
  flex-shrink: 0;
  display: grid; place-items: center;
  height: 250px; padding: 0 6px;
  background: transparent; border: 0; border-radius: 0;
  transition: opacity .3s, transform .3s;
}
.partner-tile:hover { opacity: .82; transform: translateY(-2px); }
.partner-tile img { max-width: 300px; max-height: 200px; width: auto; height: auto; object-fit: contain; }

/* ─── Toast ─── */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 90px);
  z-index: 1500; display: flex; align-items: center; gap: 12px;
  background: var(--navy-950); color: #fff;
  padding: 15px 24px; border-radius: var(--r-md); box-shadow: var(--sh-lg);
  font-size: .92rem; font-weight: 500; max-width: min(92vw, 460px);
  opacity: 0; transition: transform .45s var(--ease), opacity .45s var(--ease);
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast .toast-icon { color: var(--gold-500); }

/* ─── Scroll-to-top ─── */
.scroll-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 800;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--navy-950); color: #fff; box-shadow: var(--sh-md);
  display: grid; place-items: center; font-size: .9rem;
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: .35s var(--ease);
}
.scroll-top.visible { opacity: 1; visibility: visible; transform: none; }
.scroll-top:hover { background: var(--blue-600); }

/* ─── Utilities ─── */
.mt-40 { margin-top: 40px; } .mt-60 { margin-top: 60px; } .mt-80 { margin-top: 80px; }
.text-gold { color: var(--gold-500); }
.hairline-top { border-top: 1px solid var(--line); }

/* ─── Responsive: nav ─── */
@media (max-width: 1024px) {
  .nav-desktop { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
  .brand-text .t1 { font-size: .95rem; }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .marquee-track { animation: none !important; }
}

/* ============================================================
   FORM CONTROLS — shared by the registration wizard and the
   contact form. Keep generic so any future form is styled.
   ============================================================ */
fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
legend { padding: 0; }

.form-group { margin-bottom: 22px; }
.form-group > label,
.form-group > .group-label {
  display: block;
  font-size: .82rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 10px;
}
.form-group .req { color: #b3261e; }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  background: var(--white);
  border: 1px solid #cfcabb;
  border-radius: var(--r-sm);
  font-size: 1rem; line-height: 1.45; color: var(--ink);
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none; appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #9aa0ad; }

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover { border-color: #a9a291; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(0,91,159,.16);
}

.form-group select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%235a6272' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}
.form-group textarea { min-height: 128px; resize: vertical; }
.form-group input[type="date"] { min-height: 50px; }

@media (prefers-reduced-motion: reduce) {
  .form-group input, .form-group select, .form-group textarea { transition: none; }
}
