/* ============================================================
   AFRIGLOBAL LEGACY FOUNDATION
   Shared stylesheet. Edit tokens at top, whole site updates.
   ============================================================ */

:root {
  /* Palette — warm editorial */
  --ink:           #1a1a1a;
  --ink-soft:      #3a3a3a;
  --ink-muted:     #6b6b6b;
  --paper:         #f5f1ea;
  --paper-warm:    #ebe4d7;
  --cream:         #faf7f1;
  --terracotta:    #c5572b;
  --terracotta-dk: #9c4220;
  --moss:          #3d5a3a;
  --moss-deep:     #28401f;
  --gold:          #c89545;
  --gold-soft:     rgba(200, 149, 69, 0.12);
  --rule:          rgba(26, 26, 26, 0.12);
  --rule-light:    rgba(26, 26, 26, 0.06);

  /* Type */
  --display:       'Fraunces', Georgia, 'Times New Roman', serif;
  --body:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, h4, h5 {
  font-family: var(--display);
  letter-spacing: -0.018em;
  font-weight: 500;
}

/* ============ LAYOUT ============ */
.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) {
  .container, .container-narrow { padding: 0 22px; }
}

/* ============ NAVIGATION ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 241, 234, 0.88);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: 1240px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
  letter-spacing: -0.012em;
}
.logo-mark {
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 38px;
}
.nav-links > a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s;
}
.nav-links > a:hover { color: var(--terracotta); }
.nav-links > a.active { color: var(--terracotta); }
.nav-cta {
  background: var(--ink);
  color: var(--cream) !important;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
}
.nav-cta:hover {
  background: var(--terracotta) !important;
  color: var(--cream) !important;
  transform: translateY(-1px);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}
@media (max-width: 900px) {
  .nav-inner { padding: 14px 22px; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    padding: 20px 22px 28px;
    border-bottom: 1px solid var(--rule);
  }
  .nav-links.open > a {
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
    width: 100%;
    font-size: 16px;
  }
  .nav-links.open > a:last-child { border-bottom: none; }
  .nav-links.open .nav-cta { margin-top: 14px; text-align: center; }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  font-family: var(--body);
  text-align: center;
}
.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--terracotta);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px rgba(197, 87, 43, 0.5);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--cream);
  transform: translateY(-2px);
}
.btn-light {
  background: transparent;
  color: var(--cream);
  border: 1.5px solid rgba(245, 241, 234, 0.4);
}
.btn-light:hover {
  background: rgba(245, 241, 234, 0.1);
  border-color: var(--cream);
  transform: translateY(-2px);
}
.btn-gold {
  background: var(--gold);
  color: var(--moss-deep);
}
.btn-gold:hover {
  background: #d4a445;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px rgba(200, 149, 69, 0.5);
}
.btn-arrow {
  display: inline-block;
  transition: transform 0.2s;
}
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ============ EYEBROW ============ */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 24px;
  display: inline-block;
}
.eyebrow::before { content: '— '; color: var(--terracotta); }
.eyebrow.gold { color: var(--gold); }
.eyebrow.gold::before { color: var(--gold); }

/* ============ SECTION HEADERS ============ */
section { padding: 110px 0; position: relative; }
@media (max-width: 768px) { section { padding: 72px 0; } }

.section-header { max-width: 720px; margin-bottom: 64px; }
.section-header.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-header h2 {
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.04;
  margin-bottom: 22px;
  color: var(--ink);
}
.section-header h2 em {
  font-style: italic;
  color: var(--terracotta);
  font-weight: 400;
}
.section-header h2.on-dark { color: var(--cream); }
.section-header h2.on-dark em { color: var(--gold); }
.section-header p {
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 600px;
}
.section-header.center p { margin-left: auto; margin-right: auto; }
.section-header.on-dark p { color: rgba(245, 241, 234, 0.85); }

/* ============ HERO (interior pages) ============ */
.hero-page {
  padding: 110px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero-page::before {
  content: '';
  position: absolute;
  top: -180px; right: -180px;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(197, 87, 43, 0.07), transparent 70%);
  pointer-events: none;
}
.hero-page::after {
  content: '';
  position: absolute;
  bottom: -250px; left: -120px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(61, 90, 58, 0.06), transparent 70%);
  pointer-events: none;
}
.hero-page > .container { position: relative; z-index: 1; }
.hero-page h1 {
  font-size: clamp(44px, 6.5vw, 80px);
  line-height: 1.0;
  letter-spacing: -0.028em;
  margin-bottom: 32px;
  max-width: 920px;
  color: var(--ink);
}
.hero-page h1 em {
  font-style: italic;
  color: var(--terracotta);
  font-weight: 400;
}
.hero-page-sub {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 640px;
}
@media (max-width: 768px) { .hero-page { padding: 64px 0 50px; } }

/* ============ FOOTER ============ */
footer {
  background: var(--ink);
  color: var(--cream);
  padding: 90px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 64px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; gap: 36px; } }
.footer-brand {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 16px;
}
.footer-tagline {
  font-size: 14px;
  color: rgba(245, 241, 234, 0.7);
  line-height: 1.55;
  max-width: 280px;
}
.footer-col h5 {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 22px;
  color: var(--gold);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }
.footer-col a {
  font-size: 14px;
  color: rgba(245, 241, 234, 0.78);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(245, 241, 234, 0.12);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: rgba(245, 241, 234, 0.55);
  font-style: italic;
  font-family: var(--display);
}

/* ============ REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }
.delay-4 { transition-delay: 0.32s; }

/* ============ FORM PRIMITIVES ============ */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--cream);
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--terracotta);
}
.field textarea { resize: vertical; min-height: 110px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.field-help { font-size: 12.5px; color: var(--ink-muted); margin-top: 6px; }
