/* ===================================
   ASESMA Design System
   Visual identity drawn from the logo:
   interlocking ribbons (navy, coral, amber, green)
   woven around Africa — connection, warmth, knowledge
   =================================== */

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

:root {
  /* Logo ribbon colors */
  --navy: #1B4F72;
  --navy-dark: #153D58;
  --navy-light: #2874A6;
  --coral: #E05A3A;
  --amber: #E8B73A;
  --green: #4CAF6A;

  /* Warm neutrals */
  --bg: #FDFBF7;
  --bg-alt: #F5F2EC;
  --surface: #FFFFFF;
  --fg: #2A2520;
  --fg-secondary: #5C554D;
  --fg-muted: #9C9488;
  --border: #E5E0D8;

  /* Fonts */
  --font-display: 'Nunito', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --container: 1140px;
  --section-pad: 96px;
  --section-pad-sm: 56px;
  --radius: 12px;
  --radius-sm: 8px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 250ms;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  overflow-x: hidden;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .container { padding: 0 40px; } }

/* Woven bar — the 4-color stripe from the logo ribbons */
.woven-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--navy) 25%, var(--coral) 25% 50%, var(--amber) 50% 75%, var(--green) 75%);
  border-radius: 2px;
}

/* ===================================
   Navigation
   =================================== */

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(253, 251, 247, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur) var(--ease);
}
.site-header.scrolled { box-shadow: 0 1px 8px rgba(42, 37, 32, 0.06); }

.nav-container {
  max-width: var(--container); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 72px;
}
@media (min-width: 768px) { .nav-container { padding: 0 40px; } }

.nav-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.logo-img { height: 52px; width: auto; }
@media (min-width: 768px) { .logo-img { height: 58px; } }

.nav-links { display: none; list-style: none; gap: 2px; }
@media (min-width: 1024px) { .nav-links { display: flex; align-items: center; } }

.nav-links a {
  display: block; padding: 6px 14px; font-size: 14px; font-weight: 500;
  color: var(--fg-secondary); text-decoration: none; border-radius: var(--radius-sm);
  transition: all var(--dur) var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--navy); background: rgba(27, 79, 114, 0.05); }

.nav-cta {
  display: none; padding: 7px 18px; font-size: 13px; font-weight: 700;
  color: #fff; background: var(--navy); text-decoration: none;
  border-radius: 9999px; transition: background var(--dur) var(--ease);
}
@media (min-width: 1024px) { .nav-cta { display: inline-flex; } }
.nav-cta:hover { background: var(--navy-dark); }

.mobile-toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
@media (min-width: 1024px) { .mobile-toggle { display: none; } }
.mobile-toggle span { display: block; width: 20px; height: 2px; background: var(--fg); border-radius: 1px; transition: all var(--dur) var(--ease); }
.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-links.mobile-open {
  display: flex; flex-direction: column; position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
  background: var(--bg); padding: 24px; gap: 4px;
}
.nav-links.mobile-open a { font-size: 16px; padding: 14px 16px; }

/* ===================================
   Hero
   =================================== */

.hero {
  position: relative;
  padding: calc(72px + 56px) 0 0;
  background: var(--navy-dark);
  color: #fff;
}

@media (min-width: 768px) { .hero { padding: calc(72px + 72px) 0 0; } }

.hero-bg {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}

.hero-bg-logo {
  position: absolute; right: -40px; top: 50%; transform: translateY(-55%);
  height: 550px; width: auto; opacity: 0.08;
  filter: brightness(0) invert(1); user-select: none;
}
@media (min-width: 768px) { .hero-bg-logo { height: 750px; right: 0; opacity: 0.1; } }
@media (min-width: 1024px) { .hero-bg-logo { height: 900px; right: 40px; opacity: 0.11; } }

.hero-content {
  position: relative; max-width: 720px; padding-bottom: 64px;
}
@media (min-width: 768px) { .hero-content { padding-bottom: 80px; } }

.hero-badge {
  display: inline-block; font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.7); letter-spacing: 0.02em; margin-bottom: 24px;
  background: rgba(255,255,255,0.08); padding: 6px 16px; border-radius: 9999px;
}

.hero-title {
  font-family: var(--font-display); font-size: clamp(30px, 5.5vw, 52px);
  font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; margin-bottom: 20px;
}

.hero-subtitle {
  font-size: clamp(16px, 2.2vw, 18px); line-height: 1.7;
  color: rgba(255,255,255,0.7); max-width: 560px; margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; padding: 12px 28px;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  text-decoration: none; border-radius: 9999px; border: none; cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.btn-primary { background: var(--coral); color: #fff; }
.btn-primary:hover { background: #C94E30; }
.btn-outline { background: transparent; color: rgba(255,255,255,0.85); border: 1.5px solid rgba(255,255,255,0.25); }
.btn-outline:hover { border-color: rgba(255,255,255,0.5); color: #fff; }

.hero-stats {
  background: rgba(0,0,0,0.15); border-top: 1px solid rgba(255,255,255,0.08);
}
.stats-row {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  padding: 28px 0;
}
@media (min-width: 768px) { .stats-row { gap: 32px; justify-content: flex-start; } }

.stat { display: flex; flex-direction: column; align-items: center; min-width: 70px; }
@media (min-width: 768px) { .stat { align-items: flex-start; } }

.stat-number { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: #fff; line-height: 1; }
.stat-label { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 4px; }

/* ===================================
   Sections
   =================================== */

.section { padding: var(--section-pad-sm) 0; }
@media (min-width: 768px) { .section { padding: var(--section-pad) 0; } }

.section-alt { background: var(--bg-alt); }

.section-header { max-width: 640px; margin-bottom: 40px; }
@media (min-width: 768px) { .section-header { margin-bottom: 56px; } }

.section-tag {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--coral); margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display); font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 700; line-height: 1.2; color: var(--fg); margin-bottom: 14px;
}

.section-desc { font-size: 16px; line-height: 1.75; color: var(--fg-secondary); }

/* ===================================
   About
   =================================== */

.about-lead {
  max-width: 720px; margin-bottom: 40px;
  padding-left: 20px; border-left: 3px solid var(--navy); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.about-lead p { font-size: 17px; line-height: 1.8; color: var(--fg-secondary); }

.about-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .about-grid { grid-template-columns: repeat(3, 1fr); } }

.about-card {
  background: var(--surface); padding: 28px; border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease);
}
.about-card:hover { border-color: var(--navy); }
.about-card h3 { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--fg); }
.about-card p { font-size: 14px; line-height: 1.7; color: var(--fg-secondary); }

/* ===================================
   History
   =================================== */

.history-content { display: grid; grid-template-columns: 1fr; gap: 48px; }
@media (min-width: 768px) { .history-content { grid-template-columns: 1.4fr 1fr; gap: 64px; } }

.history-text p { font-size: 15px; line-height: 1.85; color: var(--fg-secondary); margin-bottom: 18px; }
.history-text p:last-child { margin-bottom: 0; }

.history-timeline { display: flex; flex-direction: column; }

.timeline-item {
  display: flex; gap: 20px; padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }

.timeline-year { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--navy); min-width: 52px; }
.timeline-desc { font-size: 15px; color: var(--fg-secondary); line-height: 1.5; }

.timeline-item-current { background: rgba(27, 79, 114, 0.04); margin: 0 -16px; padding: 16px; border-radius: var(--radius-sm); border-bottom: none; }
.timeline-item-current .timeline-year { color: var(--coral); }

/* ===================================
   Topics
   =================================== */

.topics-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .topics-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .topics-grid { grid-template-columns: repeat(4, 1fr); } }

.topic-card {
  padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease);
}
.topic-card:hover { border-color: var(--navy); }

.topic-card h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--fg); margin-bottom: 6px; }
.topic-card p { font-size: 13px; color: var(--fg-muted); line-height: 1.6; }

.topics-note {
  margin-top: 24px; font-size: 14px; color: var(--fg-muted); font-style: italic;
}

/* ===================================
   Galaxy
   =================================== */

.galaxy-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 40px; }
@media (min-width: 640px) { .galaxy-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .galaxy-grid { grid-template-columns: repeat(3, 1fr); } }

.galaxy-card {
  padding: 28px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease);
}
.galaxy-card:hover { border-color: var(--navy); }

.galaxy-card-featured { border-left: 3px solid var(--coral); border-top-left-radius: 0; border-bottom-left-radius: 0; }
@media (min-width: 1024px) { .galaxy-card-featured { grid-column: 1 / -1; } }

.galaxy-label {
  display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-muted); margin-bottom: 8px;
}
.galaxy-card h3 { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 6px; color: var(--fg); }
.galaxy-card p { font-size: 14px; line-height: 1.7; color: var(--fg-secondary); }

.galaxy-schools { border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; background: var(--surface); }
.galaxy-schools h3 { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 16px; color: var(--fg); }

.school-list { display: flex; flex-direction: column; }
.school-item {
  display: grid; grid-template-columns: 1fr; gap: 2px; padding: 12px 0;
  border-bottom: 1px solid var(--border); font-size: 14px;
}
@media (min-width: 640px) { .school-item { grid-template-columns: 200px 1fr 60px; gap: 16px; align-items: center; } }
.school-item:last-child { border-bottom: none; }

.school-loc { font-weight: 600; color: var(--fg); }
.school-topic { color: var(--fg-secondary); }
.school-year { font-weight: 600; color: var(--navy); }

/* ===================================
   Events
   =================================== */

.events-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 768px) { .events-grid { grid-template-columns: repeat(2, 1fr); } }

.event-card {
  border: 1px solid var(--border); background: var(--surface); overflow: hidden; border-radius: var(--radius);
  display: flex; flex-direction: column;
  transition: border-color var(--dur) var(--ease);
}
.event-card:hover { border-color: var(--navy); }

.event-card-featured { border-top: 3px solid var(--coral); border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }

.event-date-block {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; background: var(--navy); color: #fff;
}
.event-date-ongoing { background: var(--green); }

.event-month { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; }
.event-day { font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 1.1; }
.event-year { font-size: 13px; opacity: 0.6; }

.event-info { padding: 24px; flex: 1; }

.event-tag {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--coral); margin-bottom: 8px;
}

.event-info h3 { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--fg); }
.event-info p { font-size: 14px; line-height: 1.65; color: var(--fg-secondary); margin-bottom: 14px; }

.event-details { display: flex; flex-direction: column; gap: 6px; }
.event-detail { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg-muted); }
.event-detail svg { flex-shrink: 0; }

/* ===================================
   Committee
   =================================== */

.committee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

.member-card {
  padding: 24px; text-align: center; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease);
}
.member-card:hover { border-color: var(--navy); }

.member-card-chair { border-top: 3px solid var(--navy); }

.member-avatar {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px; background: var(--navy); color: #fff;
  font-family: var(--font-body); font-size: 15px; font-weight: 600; border-radius: 50%;
}

.member-role {
  display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--coral); margin-bottom: 6px;
}

.member-card h3 { font-family: var(--font-display); font-size: 15px; font-weight: 700; margin-bottom: 4px; color: var(--fg); }
.member-card p { font-size: 12px; line-height: 1.5; color: var(--fg-muted); }

/* ===================================
   Sponsors
   =================================== */

.sponsors-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.sponsor-card {
  padding: 12px 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
  color: var(--fg-secondary); text-align: center;
  transition: border-color var(--dur) var(--ease);
}
.sponsor-card:hover { border-color: var(--navy); color: var(--fg); }

.sponsor-tier-1 { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--navy); padding: 16px 28px; border-width: 2px; }
.sponsor-tier-2 { font-weight: 600; font-size: 14px; color: var(--fg); }

/* ===================================
   Opportunities
   =================================== */

.opportunities-grid { max-width: 720px; }

.opportunity-card {
  padding: 32px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius);
  border-left: 3px solid var(--green);
}

.opp-type {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--green); margin-bottom: 10px;
}
.opportunity-card h3 { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--fg); }
.opportunity-card > p { font-size: 15px; line-height: 1.7; color: var(--fg-secondary); margin-bottom: 20px; }

.opp-details { display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.opp-details span { font-size: 14px; color: var(--fg-muted); }

.opp-footer { display: flex; flex-direction: column; gap: 4px; }
@media (min-width: 640px) { .opp-footer { flex-direction: row; justify-content: space-between; } }
.opp-deadline { font-size: 14px; font-weight: 600; color: var(--coral); }
.opp-contact { font-size: 14px; color: var(--fg-muted); }

/* ===================================
   News
   =================================== */

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.news-card {
  padding: 24px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease);
}
.news-card:hover { border-color: var(--navy); }

.news-tag {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--coral); margin-bottom: 10px;
}
.news-card h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin-bottom: 6px; color: var(--fg); line-height: 1.3; }
.news-card p { font-size: 14px; color: var(--fg-secondary); line-height: 1.65; margin-bottom: 10px; }
.news-date { font-size: 13px; color: var(--fg-muted); }

.loading-text { text-align: center; color: var(--fg-muted); padding: 40px; grid-column: 1 / -1; font-size: 14px; }
.empty-text { text-align: center; color: var(--fg-muted); padding: 40px; grid-column: 1 / -1; }
.empty-text a { color: var(--navy); text-decoration: none; }
.empty-text a:hover { text-decoration: underline; }

/* ===================================
   Footer
   =================================== */

.site-footer { background: var(--fg); color: rgba(255,255,255,0.65); }
.site-footer .woven-bar { height: 3px; }

.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 36px; padding: 56px 0 40px;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; } }

.footer-logo { height: 56px; width: auto; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; line-height: 1.6; margin-bottom: 6px; }
.footer-muted { font-size: 13px; color: rgba(255,255,255,0.35); }

.footer-links-col h4 { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.9); margin-bottom: 14px; letter-spacing: 0.02em; }
.footer-links-col ul { list-style: none; }
.footer-links-col li { margin-bottom: 8px; }
.footer-links-col a { font-size: 14px; color: rgba(255,255,255,0.5); text-decoration: none; transition: color var(--dur) var(--ease); }
.footer-links-col a:hover { color: #fff; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 20px 0; font-size: 13px; color: rgba(255,255,255,0.3); }

/* ===================================
   Scroll Reveal
   =================================== */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

.stagger > * { opacity: 0; transform: translateY(12px); transition: opacity 400ms var(--ease), transform 400ms var(--ease); }
.stagger.visible > * { opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger.visible > *:nth-child(2) { transition-delay: 60ms; }
.stagger.visible > *:nth-child(3) { transition-delay: 120ms; }
.stagger.visible > *:nth-child(4) { transition-delay: 180ms; }
.stagger.visible > *:nth-child(5) { transition-delay: 240ms; }
.stagger.visible > *:nth-child(6) { transition-delay: 300ms; }
.stagger.visible > *:nth-child(7) { transition-delay: 360ms; }
.stagger.visible > *:nth-child(8) { transition-delay: 420ms; }

/* ===================================
   Collection/Entry Pages
   =================================== */

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-decoration: none; color: inherit; }
.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card p { color: var(--fg-muted); font-size: 0.875rem; }
.card .meta { margin-top: 1rem; font-size: 0.75rem; color: var(--fg-muted); }

.entry-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-decoration: none; color: inherit; display: flex; gap: 20px; }
.entry-card .thumbnail { width: 120px; height: 80px; object-fit: cover; flex-shrink: 0; }
.entry-card .content { flex: 1; }
.entry-card h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin-bottom: 6px; color: var(--fg); }
.entry-card .excerpt { color: var(--fg-muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.entry-card .meta { margin-top: 10px; font-size: 12px; color: var(--fg-muted); }

.entry-content h1 { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin-bottom: 12px; color: var(--fg); }
.entry-content .entry-meta { color: var(--fg-muted); font-size: 14px; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.entry-content .field { margin-bottom: 24px; }
.entry-content .field-label { font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-muted); margin-bottom: 6px; }
.entry-content .field-value { font-size: 15px; line-height: 1.7; color: var(--fg-secondary); }
.entry-content .field-value img { max-width: 100%; height: auto; }
.entry-content .rich-text { line-height: 1.8; }

/* ===================================
   Responsive
   =================================== */

@media (max-width: 640px) {
  .hero-title { font-size: 28px; }
}

@media print {
  .site-header, .hero-bg, .hero-actions, .nav-cta, .mobile-toggle, .woven-bar { display: none; }
  .hero { padding-top: 40px; background: none; color: var(--fg); }
  .section { padding: 32px 0; }
}
