@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap');

/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/*
  WCAG AA Accessibility — contrast ratios on #0a0a0a background
  ─────────────────────────────────────────────────────────────
  --white    #f0ede6  →  16.9:1  ✓
  --gold     #c9991a  →   7.6:1  ✓  (darkened from #d4af37 for more depth;
                                      still passes at large AND normal size)
  --green    #4caf50  →   7.1:1  ✓
  --muted    #b8b4ac  →   9.6:1  ✓  (replaces 0.55 opacity gray — was borderline)
  --muted-2  #8a8780  →   5.5:1  ✓  (replaces 0.35/0.30 opacity — were FAILING)
  --ui-text  #d0cdc6  →  12.5:1  ✓  (button/outline text — was fine, now explicit)
  Borders remain decorative (non-text) so 3:1 threshold applies —
  kept as-is since they're structural, not conveying info by color alone.
*/

:root {
  --black:      #0a0a0a;
  --white:      #f0ede6;
  --gold:       #c9991a;   /* AA: 7.6:1 — darkened from #d4af37, richer tone */
  --gold-light: #e8c547;   /* AA: 11.8:1 — for hover/highlight moments */
  --green:      #4caf50;   /* AA: 7.1:1 — unchanged, already passing */
  --muted:      #b8b4ac;   /* AA: 9.6:1 — replaces rgba(240,237,230,0.55) */
  --muted-2:    #8a8780;   /* AA: 5.5:1 — replaces rgba(240,237,230,0.30/.35) */
  --ui-text:    #d0cdc6;   /* AA: 12.5:1 — explicit value for button/outline text */
  --border:     rgba(201,153,26,0.22);   /* gold-tinted, decorative */
  --border-dim: rgba(201,153,26,0.12);   /* subtle gold, decorative */
  --card-bg:    rgba(255,255,255,0.03);
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;  /* readable body font */
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ─── Kente Background Pattern ─────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,153,26,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,153,26,0.04) 1px, transparent 1px),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 20px,
      rgba(76,175,80,0.015) 20px,
      rgba(76,175,80,0.015) 21px
    );
  background-size: 40px 40px, 40px 40px, 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ─── Typography — Outfit for headings, DM Sans for body ───── */
h1, h2, h3, h4, h5, h6,
.nav-logo-name,
.pillar-title,
.section-title,
.page-header h1,
.card-title,
.btn-primary,
.btn-outline,
.nav-cta {
  font-family: 'Outfit', sans-serif;
}

/* ─── Layout ────────────────────────────────────────────────── */
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ─── Navigation ────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

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

.nav-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: invert(1) sepia(0.6) saturate(2) hue-rotate(5deg) brightness(1.1);
}

.nav-logo-text { display: flex; flex-direction: column; line-height: 1; }

.nav-logo-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--white);         /* 16.9:1 ✓ */
}
.nav-logo-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 8px;
  letter-spacing: 0.06em;
  color: var(--gold);          /* 7.6:1 ✓ */
  text-transform: uppercase;
  margin-top: 3px;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  color: var(--muted);         /* 9.6:1 ✓ — was 0.55 opacity (borderline) */
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);          /* 7.6:1 ✓ */
  border-bottom-color: var(--gold);
}

/* Focus ring — visible keyboard navigation indicator */
.nav-links a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.nav-cta {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: none;
  border: 2px solid var(--green);  /* thicker border — easier to see */
  color: var(--green);             /* 7.1:1 ✓ */
  padding: 8px 18px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.nav-cta:hover { background: var(--green); color: var(--black); }
.nav-cta:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ─── Page Header (inner pages) ────────────────────────────── */
.page-header {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border-dim);
  margin-bottom: 48px;
}

.page-header-tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--green);         /* 7.1:1 ✓ */
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-header-tag::before { content: ''; width: 20px; height: 1px; background: var(--green); }

.page-header h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 14px;
  color: var(--white);         /* 16.9:1 ✓ */
}
.page-header h1 span { color: var(--gold); }   /* 7.6:1 ✓ */

.page-header p {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);         /* 9.6:1 ✓ — was var(--muted) which was ok but now explicit */
  max-width: 580px;
}

/* ─── Dividers ──────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), rgba(76,175,80,0.2), transparent);
  margin: 0;
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn-primary {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--gold);
  border: 2px solid var(--gold);
  color: var(--black);         /* dark text on gold bg — very high contrast */
  padding: 13px 26px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, border-color 0.2s;
}
.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
}
.btn-primary:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

.btn-outline {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: none;
  border: 2px solid var(--muted-2);  /* was 0.25 opacity — was FAILING (2.0:1) */
  color: var(--ui-text);             /* 12.5:1 ✓ — was 0.75 opacity (ok but now explicit) */
  padding: 13px 26px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: border-color 0.2s, color 0.2s;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-outline:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ─── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-dim);
  padding: 24px;
  position: relative;
  transition: border-color 0.25s;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--gold);
  opacity: 0;
  transition: opacity 0.25s;
}
.card:hover { border-color: var(--border); }
.card:hover::before { opacity: 1; }

.card-tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--green);         /* 7.1:1 ✓ */
  text-transform: uppercase;
  margin-bottom: 8px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);         /* 16.9:1 ✓ */
  margin-bottom: 8px;
  line-height: 1.35;
}

.card-body {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  line-height: 1.75;
  color: var(--muted);         /* 9.6:1 ✓ */
}

/* ─── Footer ────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 72px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  color: var(--muted-2);       /* 5.5:1 ✓ — was 0.30 opacity (2.4:1, FAILING) */
  letter-spacing: 0.08em;
}
.footer-text a {
  color: var(--gold);          /* 7.6:1 ✓ */
  text-decoration: underline;  /* underline on links for non-color accessibility */
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}
.footer-links a {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  color: var(--muted-2);       /* 5.5:1 ✓ — was 0.30 opacity (2.4:1, FAILING) */
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold); }
.footer-links a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ─── Section Labels ────────────────────────────────────────── */
.section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--green);         /* 7.1:1 ✓ */
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::before {
  content: '//';
  color: var(--muted-2);       /* 5.5:1 ✓ — was 0.5 opacity on green (too dim) */
}

.section-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--white);         /* 16.9:1 ✓ */
  margin-bottom: 6px;
}

/* ─── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 1px solid var(--muted-2);
  color: var(--muted);         /* 9.6:1 ✓ — was var(--muted) rgba which was ok */
}
.badge.gold  { border-color: var(--gold);  color: var(--gold);  }  /* 7.6:1 ✓ */
.badge.green { border-color: var(--green); color: var(--green); }  /* 7.1:1 ✓ */

/* ─── Skip to content link (screen readers + keyboard nav) ─── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--gold);
  color: var(--black);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 20px;
  z-index: 9999;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .page-header h1 { font-size: 28px; }
  .page-wrap { padding: 0 20px; }
  .nav-inner { padding: 0 20px; }
}

/* ─── Reduced motion — respect user preference ──────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
