/* ============================================
   The Benter Foundation — Modern Design System
   ============================================ */

/* ==============================================
   COLOR SCHEME
   ==============================================
   To change the site's color scheme, edit ONLY
   the variables below. Everything else adapts
   automatically.

   --color-primary       Main brand color (nav buttons, links, stats bar)
   --color-primary-light  Hover/lighter variant
   --color-primary-dark   Headings, hero backgrounds, page heroes
   --color-accent         CTA buttons, labels, highlights
   --color-accent-light   Accent hover / footer icons
   --color-accent-dark    Accent pressed state
   --color-text           Body text
   --color-text-light     Secondary/muted text
   --color-text-inverse   Text on dark backgrounds
   --color-bg             Page background
   --color-bg-alt         Alternating section background
   --color-bg-dark        Footer / dark sections
   --color-border         Card & input borders
   --color-success        Success indicators

   The *-rgb variants hold the R,G,B channels
   so they can be used with rgba() for opacity.
   ============================================== */

:root {
  /* Primary palette */
  --color-primary: #1a3a5c;
  --color-primary-rgb: 26, 58, 92;
  --color-primary-light: #2a5a8c;
  --color-primary-light-rgb: 42, 90, 140;
  --color-primary-dark: #0f2640;
  --color-primary-dark-rgb: 15, 38, 64;

  /* Accent palette */
  --color-accent: #c4873b;
  --color-accent-rgb: 196, 135, 59;
  --color-accent-light: #d4a05b;
  --color-accent-dark: #a06a28;

  /* Text */
  --color-text: #2d3748;
  --color-text-light: #718096;
  --color-text-inverse: #ffffff;
  --color-text-inverse-rgb: 255, 255, 255;

  /* Backgrounds */
  --color-bg: #ffffff;
  --color-bg-alt: #f7f8fa;
  --color-bg-dark: #1a2332;
  --color-bg-dark-rgb: 26, 35, 50;

  /* Utility */
  --color-border: #e2e8f0;
  --color-success: #38a169;

  /* Typography */
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Motion */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary-dark);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==================
   Utility Classes
   ================== */
.text-center { text-align: center; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==================
   Navigation
   ================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(var(--color-text-inverse-rgb), 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.site-nav.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo img {
  height: 48px;
  width: auto;
}

.nav-logo .logo-dark {
  display: block;
  filter: var(--logo-filter, brightness(0));
}

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

.nav-links > li {
  position: relative;
}

.nav-links > li > a {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links > li > a:hover {
  color: var(--color-primary);
  background: var(--color-bg-alt);
}

.nav-links > li > a .caret {
  width: 12px;
  height: 12px;
  transition: transform var(--transition);
}

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  list-style: none;
  z-index: 100;
}

.nav-links > li:hover .dropdown-menu,
.nav-links > li:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.dropdown-menu a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

/* Contact button in nav */
.nav-cta {
  background: var(--color-primary) !important;
  color: var(--color-text-inverse) !important;
  padding: 8px 20px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--color-primary-light) !important;
  color: var(--color-text-inverse) !important;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 6px 0;
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ==================
   Hero Section
   ================== */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-primary-dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  background-size: cover;
  background-position: center;
}

.hero-bg .slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px;
}

.hero-badge {
  display: inline-block;
  background: rgba(var(--color-text-inverse-rgb), 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--color-text-inverse-rgb), 0.2);
  padding: 6px 20px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-inverse);
  margin-bottom: 24px;
  letter-spacing: 0.05em;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--color-text-inverse);
  margin-bottom: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.2rem;
  color: rgba(var(--color-text-inverse-rgb), 0.85);
  margin-bottom: 36px;
  line-height: 1.7;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(var(--color-accent-rgb), 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--color-text-inverse);
  border: 2px solid rgba(var(--color-text-inverse-rgb), 0.4);
}

.btn-outline:hover {
  background: rgba(var(--color-text-inverse-rgb), 0.1);
  border-color: rgba(var(--color-text-inverse-rgb), 0.7);
}

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

.btn-outline-dark:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn-sm {
  padding: 10px 22px;
  font-size: 0.88rem;
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* ==================
   Section Styles
   ================== */
.section {
  padding: 100px 0;
}

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

.section-dark {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
}

.section-dark h2,
.section-dark h3 {
  color: var(--color-text-inverse);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

.section-header p + p {
  margin-top: 16px;
}

.section-dark .section-header p {
  color: rgba(var(--color-text-inverse-rgb), 0.7);
}

/* ==================
   Stats Bar
   ================== */
.stats-bar {
  background: var(--color-primary);
  padding: 48px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.5rem;
  color: var(--color-accent-light);
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-item p {
  font-size: 0.9rem;
  color: rgba(var(--color-text-inverse-rgb), 0.7);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==================
   Initiative Cards
   ================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--color-bg-alt);
  background-size: cover;
  background-position: center;
}

.card-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.card-body h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  line-height: 1.35;
}

.card-body p {
  font-size: 0.92rem;
  color: var(--color-text-light);
  line-height: 1.6;
  flex: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 16px;
  transition: gap var(--transition);
}

.card-link:hover {
  gap: 10px;
  color: var(--color-accent);
}

.card-link svg {
  width: 16px;
  height: 16px;
}

/* ==================
   Feature Blocks (alternating)
   ================== */
.feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 80px 0;
}

.feature-block + .feature-block {
  border-top: 1px solid var(--color-border);
}

.feature-block.reverse .feature-img {
  order: 2;
}

.feature-block.reverse .feature-text {
  order: 1;
}

.feature-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.feature-img img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.feature-text h3 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.feature-text p {
  font-size: 1.05rem;
  color: var(--color-text-light);
  margin-bottom: 24px;
  line-height: 1.7;
}

/* Sticky variant — image tracks alongside a longer text column */
.feature-block.feature-sticky {
  align-items: start;
}

.feature-block.feature-sticky .feature-img {
  position: sticky;
  top: 110px;
}

.feature-block.feature-sticky .feature-img img {
  height: 480px;
}

.feature-block.feature-sticky .feature-text > *:last-child {
  margin-bottom: 0;
}

/* ==================
   CTA Banners
   ================== */
.cta-banner {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(var(--color-primary-dark-rgb), 0.9), rgba(var(--color-primary-rgb), 0.85));
}

.cta-banner .container {
  position: relative;
  z-index: 1;
}

.cta-content {
  max-width: 600px;
}

.cta-content h2 {
  font-size: 2.5rem;
  color: var(--color-text-inverse);
  margin-bottom: 16px;
}

.cta-content p {
  font-size: 1.1rem;
  color: rgba(var(--color-text-inverse-rgb), 0.8);
  margin-bottom: 32px;
}

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

.cta-center .cta-content {
  margin: 0 auto;
}

/* ==================
   Footer
   ================== */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(var(--color-text-inverse-rgb), 0.7);
  padding: 80px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(var(--color-text-inverse-rgb), 0.1);
}

.footer-brand img {
  height: 60px;
  margin-bottom: 20px;
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 300px;
}

.footer-col h4 {
  color: var(--color-text-inverse);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

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

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

.footer-col ul a {
  font-size: 0.92rem;
  color: rgba(var(--color-text-inverse-rgb), 0.6);
  transition: all var(--transition);
}

.footer-col ul a:hover {
  color: var(--color-accent-light);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.92rem;
}

.footer-contact-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--color-accent-light);
}

.footer-bottom {
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(var(--color-text-inverse-rgb), 0.4);
}

/* Map */
.footer-map {
  width: 100%;
  height: 300px;
  border: 0;
  filter: grayscale(0.8) contrast(1.1);
  transition: filter var(--transition);
}

.footer-map:hover {
  filter: grayscale(0) contrast(1);
}

/* ==================
   Animations
   ================== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.2s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.3s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.35s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.4s; }

.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ==================
   Responsive
   ================== */
@media (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-block {
    gap: 40px;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 24px;
    gap: 4px;
    z-index: 999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  }

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

  .nav-links > li > a {
    padding: 14px 16px;
    font-size: 1rem;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 16px;
    display: none;
  }

  .nav-links > li.dropdown-open .dropdown-menu {
    display: block;
  }

  .nav-toggle {
    display: block;
    z-index: 1001;
  }

  .hero {
    min-height: 70vh;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .section {
    padding: 64px 0;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-block {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 48px 0;
  }

  .feature-block.reverse .feature-img,
  .feature-block.reverse .feature-text {
    order: unset;
  }

  .feature-img img {
    height: 280px;
  }

  .feature-block.feature-sticky .feature-img {
    position: static;
  }

  .feature-block.feature-sticky .feature-img img {
    height: 280px;
  }

  .cta-content h2 {
    font-size: 1.8rem;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .stat-item h3 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 60vh;
  }

  .hero-content {
    padding: 24px 16px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==================
   Page-specific (subpages)
   ================== */
.page-hero {
  background: var(--color-primary-dark);
  padding: 120px 0 60px;
  text-align: center;
  background-size: cover;
  background-position: center 30%;
  position: relative;
}

.page-hero.has-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(var(--color-bg-dark-rgb), 0.6);
}

.page-hero.has-bg > * {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  color: var(--color-text-inverse);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 12px;
}

.page-hero p {
  color: rgba(var(--color-text-inverse-rgb), 0.7);
  font-size: 1.1rem;
}

.page-content {
  padding: 64px 0;
}

.page-content .prose {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
}

.page-content .prose p {
  margin-bottom: 1.5em;
}

.page-content .prose img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 0;
  padding: 1.5em 0;
}

.page-content .prose img + img {
  padding-top: 0.5em;
}

.page-content .prose h2 {
  margin-top: 2em;
  margin-bottom: 0.75em;
}

/* Hero buttons container */
.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
