/* ==========================================================================
   SpellAfrica.com - Pan-African Continental Hub & Gateway
   Visual Identity: Imperial Gold & Obsidian Black Palette
   Optimized for Cloudflare Pages (100% Static, Semantic HTML5, Fully Responsive)
   ========================================================================== */

:root {
  /* Rich Gold Spectrum */
  --gold-50:  #fffdf0;
  --gold-100: #fef9c3;
  --gold-200: #fef08a;
  --gold-300: #fde047;
  --gold-400: #fbbf24;
  --gold-500: #f59e0b;
  --gold-primary: #d4af37; /* Metallic Imperial Gold */
  --gold-600: #b45309;
  --gold-700: #92400e;
  --gold-800: #78350f;
  --gold-glow: rgba(212, 175, 55, 0.25);
  --gold-border: rgba(212, 175, 55, 0.35);

  /* Deep Obsidian & Charcoal Black Spectrum */
  --black-950: #0a0a0a; /* Obsidian Base */
  --black-900: #121212; /* Elevation 1 */
  --black-850: #171717; /* Elevation 2 */
  --black-800: #1f1f23; /* Card Surface */
  --black-700: #2a2a30; /* Borders & Dividers */
  --black-600: #3f3f46;

  /* Typography & High-Contrast Neutrals */
  --text-primary:   #ffffff;
  --text-secondary: #e2e8f0;
  --text-muted:     #94a3b8;
  --text-gold:      #fbbf24;
  --white:          #ffffff;

  /* Accent Signals */
  --success: #10b981;
  --danger:  #ef4444;

  /* Fonts & System Metrics */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.8);
  --shadow-gold: 0 8px 24px rgba(212, 175, 55, 0.2);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --max-w: 1200px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--text-secondary);
  background-color: var(--black-950);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--gold-400);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
  color: var(--gold-300);
  text-shadow: 0 0 8px var(--gold-glow);
}

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

button, input, select, textarea {
  font: inherit;
}

/* ==========================================================================
   Top Continental Ribbon
   ========================================================================== */
.official-ribbon {
  background: linear-gradient(90deg, #171203 0%, #291f04 50%, #171203 100%);
  color: var(--text-primary);
  padding: 9px 16px;
  font-size: 0.875rem;
  text-align: center;
  border-bottom: 1px solid var(--gold-border);
}

.official-ribbon .ribbon-content {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.official-ribbon .badge {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-500));
  color: var(--black-950);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.official-ribbon a {
  color: var(--gold-300);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.official-ribbon a:hover {
  color: var(--white);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  background-color: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--black-700);
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-badge {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--gold-600) 0%, var(--gold-primary) 50%, var(--gold-400) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black-950);
  font-weight: 900;
  font-size: 1.5rem;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
  border: 1px solid var(--gold-300);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.logo-title span {
  color: var(--gold-primary);
  background: linear-gradient(90deg, #d4af37, #fde047);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-subtitle {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.925rem;
  padding: 6px 0;
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-primary), var(--gold-400));
  border-radius: var(--radius-full);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.925rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

.btn-gold {
  background: linear-gradient(135deg, #d4af37 0%, #f59e0b 100%);
  color: var(--black-950);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: var(--black-950);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.45);
}

.btn-gold-outline {
  background-color: transparent;
  border: 1.5px solid var(--gold-primary);
  color: var(--gold-primary);
}

.btn-gold-outline:hover {
  background-color: rgba(212, 175, 55, 0.1);
  color: var(--gold-300);
  border-color: var(--gold-300);
  transform: translateY(-1px);
}

.btn-dark {
  background-color: var(--black-850);
  border: 1px solid var(--black-700);
  color: var(--text-primary);
}

.btn-dark:hover {
  background-color: var(--black-800);
  border-color: var(--gold-primary);
  color: var(--gold-400);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 30px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--gold-primary);
  cursor: pointer;
  padding: 4px;
}

/* ==========================================================================
   Layout Containers & Section Styles
   ========================================================================== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 70px 0;
}

.section-hero {
  background: radial-gradient(circle at 50% 20%, #201a08 0%, #121008 45%, var(--black-950) 80%);
  padding: 70px 0 90px;
  border-bottom: 1px solid var(--black-700);
  position: relative;
  overflow: hidden;
}

.section-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-title span {
  color: var(--gold-primary);
  background: linear-gradient(90deg, #d4af37, #fde047);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 760px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.text-center {
  text-align: center;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Cards & Grids
   ========================================================================== */
.grid {
  display: grid;
  gap: 24px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--black-900);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid var(--black-700);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-border);
  box-shadow: var(--shadow-gold);
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.card-badge.gold {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-300);
  border: 1px solid var(--gold-border);
}

.card-badge.green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   Team Nigeria Spotlight Banner
   ========================================================================== */
.team-nigeria-card {
  background: linear-gradient(135deg, #141208 0%, #1c1809 60%, #121008 100%);
  border: 2px solid var(--gold-primary);
  border-radius: var(--radius-xl);
  padding: 44px 36px;
  box-shadow: var(--shadow-gold);
  position: relative;
  overflow: hidden;
  margin-bottom: 50px;
}

.team-nigeria-card::after {
  content: '★';
  position: absolute;
  right: -25px;
  bottom: -40px;
  font-size: 16rem;
  color: rgba(212, 175, 55, 0.05);
  pointer-events: none;
  line-height: 1;
}

.tn-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.tn-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-500));
  color: var(--black-950);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tn-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 16px;
}

.tn-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

.tn-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
  padding: 20px 0;
  border-top: 1px solid var(--black-700);
  border-bottom: 1px solid var(--black-700);
}

.tn-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.tn-feature-icon {
  color: var(--gold-primary);
  font-size: 1.25rem;
  line-height: 1;
}

.tn-feature-text strong {
  display: block;
  color: var(--white);
  font-size: 0.95rem;
}

.tn-feature-text span {
  font-size: 0.825rem;
  color: var(--text-muted);
}

.tn-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Stat Counters Bar
   ========================================================================== */
.stats-strip {
  background: var(--black-900);
  border: 1px solid var(--black-700);
  border-radius: var(--radius-xl);
  padding: 30px 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  margin-top: -45px;
  position: relative;
  z-index: 10;
}

.stat-box .num {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--gold-primary);
  line-height: 1.1;
  margin-bottom: 6px;
}

.stat-box .lbl {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ==========================================================================
   Lead Capture Form (Google Sheets Integration)
   ========================================================================== */
.lead-section {
  background: radial-gradient(circle at center, #1b1606 0%, #121008 60%, var(--black-950) 100%);
  border-top: 1px solid var(--black-700);
  border-bottom: 1px solid var(--black-700);
}

.lead-box {
  background: var(--black-900);
  border-radius: var(--radius-xl);
  padding: 38px 32px;
  border: 1.5px solid var(--gold-border);
  box-shadow: var(--shadow-gold);
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--gold-300);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--black-700);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--white);
  background-color: var(--black-850);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.form-help {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-success-banner {
  display: none;
  background-color: rgba(212, 175, 55, 0.1);
  border: 2px solid var(--gold-primary);
  color: var(--white);
  padding: 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  text-align: center;
}

.form-success-banner h4 {
  font-size: 1.3rem;
  color: var(--gold-300);
  margin-bottom: 8px;
}

/* ==========================================================================
   Member Nations Flags & Cards
   ========================================================================== */
.country-card {
  background: var(--black-900);
  border: 1px solid var(--black-700);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.country-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-3px);
}

.country-card.featured {
  border: 2px solid var(--gold-primary);
  background: linear-gradient(135deg, #171305 0%, var(--black-900) 100%);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.15);
}

.country-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.country-flag {
  font-size: 2.2rem;
  line-height: 1;
}

.country-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
}

.country-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.country-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: #050505;
  color: var(--text-muted);
  padding: 70px 0 30px;
  margin-top: auto;
  border-top: 2px solid var(--gold-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h5 {
  color: var(--gold-primary);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-col ul a:hover {
  color: var(--gold-300);
}

.footer-badge-box {
  background-color: var(--black-900);
  border: 1px solid var(--black-700);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-top: 16px;
}

.footer-badge-box p {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--black-700);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: var(--gold-400);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 900px) {
  .stats-strip {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .header-cta .btn-gold {
    display: none;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--black-900);
    flex-direction: column;
    padding: 24px 20px;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--black-700);
    gap: 18px;
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .section-title {
    font-size: 1.9rem;
  }

  .tn-title {
    font-size: 1.8rem;
  }

  .stats-strip {
    grid-template-columns: 1fr 1fr;
    padding: 20px;
    margin-top: -30px;
  }

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