/* ===========================================================
   Educate Every Child — Design System
   Warm/hopeful palette: deep teal + sky blue + warm gold on sage-white
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Karla:wght@400;500;600;700&display=swap');

:root {
  /* Color tokens */
  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --surface-alt: #E4E9F0;
  --ink: #1E2E2B;
  --ink-soft: #4A5A56;
  --teal-deep: #0D2D5C;
  --teal-mid: #3D6FB0;
  --sky: #A9C6E8;
  --sky-pale: #E6EEF8;
  --gold: #E0714A;
  --gold-deep: #B84F2E;
  --border: rgba(30, 46, 43, 0.12);

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Karla', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --radius: 14px;
  --max-width: 1180px;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 var(--space-2);
  color: var(--teal-deep);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 600; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }

p { margin: 0 0 var(--space-2); color: var(--ink-soft); }

a { color: var(--teal-deep); }

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

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--teal-deep);
  color: #fff;
  box-shadow: 0 6px 18px rgba(31, 92, 86, 0.25);
}
.btn-primary:hover { background: #0A234A; }

.btn-secondary {
  background: transparent;
  color: var(--teal-deep);
  border-color: var(--teal-deep);
}
.btn-secondary:hover { background: var(--teal-deep); color: #fff; }

.btn-gold {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 6px 18px rgba(224, 113, 74, 0.35);
}
.btn-gold:hover { background: var(--gold-deep); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 246, 240, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--space-3);
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--teal-deep);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--teal-deep);
  border-bottom-color: var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.open { max-height: 320px; }
  .nav-links li { border-top: 1px solid var(--border); }
  .nav-links a { display: block; padding: 1rem var(--space-3); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: var(--space-6) 0 var(--space-5);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-5);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .hero-visual { order: -1; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-mid);
  background: var(--sky-pale);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: var(--space-2);
}

.hero h1 { margin-bottom: var(--space-2); }
.hero-sub {
  font-size: 1.15rem;
  max-width: 46ch;
  margin-bottom: var(--space-3);
}
.hero-ctas { display: flex; gap: var(--space-2); flex-wrap: wrap; }

.hero-visual { width: 100%; }

/* Globe animation */
.globe-dot {
  animation: pulse 2.6s ease-in-out infinite;
}
.globe-dot:nth-child(2) { animation-delay: 0.4s; }
.globe-dot:nth-child(3) { animation-delay: 0.9s; }
.globe-dot:nth-child(4) { animation-delay: 1.3s; }

@keyframes pulse {
  0%, 100% { opacity: 0.55; r: 4; }
  50% { opacity: 1; r: 6; }
}

.globe-path {
  stroke-dasharray: 6 7;
  animation: flow 3.4s linear infinite;
}
@keyframes flow {
  to { stroke-dashoffset: -130; }
}

/* ---------- Sections ---------- */
section { padding: var(--space-5) 0; }
.section-alt { background: var(--surface); }

.section-head {
  max-width: 60ch;
  margin: 0 auto var(--space-4);
  text-align: center;
}
.section-head p { font-size: 1.08rem; }

/* Mission strip */
.mission-strip {
  background: var(--teal-deep);
  color: #fff;
  padding: var(--space-5) 0;
}
.mission-strip p {
  color: #EAF3F1;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 500;
  max-width: 42ch;
  margin: 0 auto;
  text-align: center;
  line-height: 1.4;
}

/* Program cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(31, 46, 43, 0.08);
}
.card-icon {
  width: 52px;
  height: 52px;
  margin-bottom: var(--space-2);
}
.card h3 { margin-bottom: 0.5rem; }
.card p { margin-bottom: 0; font-size: 0.98rem; }

/* Steps (real sequence — numbering justified) */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  counter-reset: step;
}
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
}
.step {
  position: relative;
  padding-left: 3.2rem;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--sky-pale);
  color: var(--teal-deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* CTA band */
.cta-band {
  background: var(--sky-pale);
  border-radius: 22px;
  padding: var(--space-5) var(--space-4);
  text-align: center;
  margin: 0 var(--space-3);
}
.cta-band h2 { margin-bottom: var(--space-2); }
.cta-band .btn-row { display: flex; gap: var(--space-2); justify-content: center; flex-wrap: wrap; }

/* ---------- Page header (interior pages) ---------- */
.page-header {
  padding: var(--space-5) 0 var(--space-4);
  text-align: center;
}
.page-header .eyebrow { margin-bottom: var(--space-2); }
.page-header p { max-width: 56ch; margin: 0 auto; font-size: 1.1rem; }

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
@media (max-width: 860px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
.team-card { text-align: center; }
.team-avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--sky-pale);
  color: var(--teal-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  margin: 0 auto var(--space-2);
}
.team-card h3 { font-size: 1.1rem; margin-bottom: 0.15rem; }
.team-role { color: var(--gold-deep); font-weight: 700; font-size: 0.9rem; margin-bottom: 0.4rem; }
.team-card p { font-size: 0.92rem; }

/* ---------- Values list ---------- */
.values-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
@media (max-width: 700px) { .values-list { grid-template-columns: 1fr; } }
.value-item {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
}
.value-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 10px;
  background: var(--sky-pale);
  display: flex; align-items: center; justify-content: center;
}
.value-icon svg { width: 22px; height: 22px; }

/* ---------- Forms (mailto-based / static for now) ---------- */
.contact-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.contact-panel h3 { margin-bottom: 0.4rem; }
.contact-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--border);
}
.contact-row:first-of-type { border-top: none; }
.contact-row svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--teal-mid); }

.involve-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
@media (max-width: 860px) { .involve-grid { grid-template-columns: 1fr; } }

/* ---------- Initiative tiles ---------- */
.initiative-tile {
  position: relative;
  padding-top: calc(var(--space-4) + 6px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.initiative-tile-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: #E0714A;
  border-radius: var(--radius) var(--radius) 0 0;
}
.initiative-tile-location {
  font-size: 0.82rem;
  font-weight: 700;
  color: #B84F2E;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}
.initiative-tile-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-weight: 700;
  color: var(--teal-deep);
  font-size: 0.95rem;
}
.initiative-tile:hover .initiative-tile-link { color: #B84F2E; }

.rhl-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}
@media (max-width: 860px) { .rhl-gallery { grid-template-columns: repeat(2, 1fr); } }
.rhl-gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}
@media (max-width: 860px) { .rhl-gallery img { height: 180px; } }

.note-banner {
  background: #FBF3E4;
  border: 1px solid #EAD3A0;
  border-radius: 12px;
  padding: var(--space-2) var(--space-3);
  font-size: 0.95rem;
  color: #6B4E17;
  margin-bottom: var(--space-4);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #C9D6D2;
  padding: var(--space-5) 0 var(--space-3);
  margin-top: var(--space-6);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.site-footer h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}
.site-footer a { color: #C9D6D2; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-logo { font-family: var(--font-display); font-size: 1.3rem; color: #fff; margin-bottom: 0.6rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: var(--space-3);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #93A6A1;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--teal-deep);
  color: #fff;
  padding: 0.8rem 1.2rem;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
