/* ══════════════════════════════════════════════════════════
   IBARA — Landing Page Styles
   Mobile-first responsive design
   Fonts: Fraunces (display) + Source Sans 3 (body)
   ══════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  /* Palette */
  --clr-cream:      #FBF7F0;
  --clr-sand:       #F1EADE;
  --clr-sand-dark:  #E4D9C8;
  --clr-warm:       #D9A45B;
  --clr-amber:      #C8842A;
  --clr-teal:       #3D8B84;
  --clr-teal-dark:  #2D6B65;
  --clr-teal-light: #E8F4F2;
  --clr-ink:        #2A2522;
  --clr-ink-soft:   #5C554E;
  --clr-ink-faint:  #8A837C;
  --clr-white:      #FFFFFF;
  --clr-rust:       #B85C38;

  /* Typography */
  --ff-display: 'Fraunces', Georgia, serif;
  --ff-body:    'Source Sans 3', 'Source Sans Pro', system-ui, sans-serif;

  /* Spacing */
  --sp-xs:  0.5rem;
  --sp-sm:  1rem;
  --sp-md:  1.5rem;
  --sp-lg:  2.5rem;
  --sp-xl:  4rem;
  --sp-2xl: 6rem;

  /* Misc */
  --radius:     12px;
  --radius-lg:  20px;
  --shadow-sm:  0 1px 3px rgba(42,37,34,.06);
  --shadow-md:  0 4px 16px rgba(42,37,34,.08);
  --shadow-lg:  0 8px 32px rgba(42,37,34,.1);
  --transition: 0.3s cubic-bezier(.4,0,.2,1);
}


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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--ff-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--clr-ink);
  background: var(--clr-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--clr-teal); text-decoration: none; }
a:hover { color: var(--clr-teal-dark); }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--sp-md);
}


/* ── Section shared styles ───────────────────────────── */
section {
  padding: var(--sp-xl) 0;
}

.section-label {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-teal);
  margin-bottom: var(--sp-sm);
}

.section-intro {
  font-size: 1.2rem;
  color: var(--clr-ink-soft);
  max-width: 640px;
  margin-bottom: var(--sp-lg);
  line-height: 1.7;
}


/* ── Scroll reveal ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--transition), transform 0.7s var(--transition);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.75rem;
  border-radius: 50px;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--clr-teal);
  color: var(--clr-white);
  border-color: var(--clr-teal);
}
.btn-primary:hover {
  background: var(--clr-teal-dark);
  border-color: var(--clr-teal-dark);
  color: var(--clr-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--clr-teal);
  border-color: var(--clr-teal);
}
.btn-secondary:hover {
  background: var(--clr-teal-light);
  color: var(--clr-teal-dark);
  transform: translateY(-2px);
}


/* ══════════════════════════════════════════════════════
   NAV
   ══════════════════════════════════════════════════════ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(251,247,240,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.site-nav.scrolled {
  border-bottom-color: var(--clr-sand-dark);
  box-shadow: var(--shadow-sm);
}

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

.nav-logo {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--clr-ink);
}
.nav-logo:hover { color: var(--clr-teal); }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-ink-soft);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--clr-teal); }
.nav-cta {
  background: var(--clr-teal);
  color: var(--clr-white) !important;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-weight: 600;
}
.nav-cta:hover {
  background: var(--clr-teal-dark) !important;
  color: var(--clr-white) !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--clr-ink);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all var(--transition);
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 9px; }
.nav-toggle span:nth-child(3) { top: 18px; }

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  top: 9px; transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  top: 9px; transform: rotate(-45deg);
}


/* ══════════════════════════════════════════════════════
   1. HERO
   ══════════════════════════════════════════════════════ */
.hero {
  padding-top: calc(64px + var(--sp-xl));
  padding-bottom: var(--sp-xl);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  background: var(--clr-cream);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-xl);
  align-items: center;
}

.hero-name {
  display: block;
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: clamp(3rem, 6vw, 4.8rem);
  line-height: 1.05;
  color: var(--clr-ink);
  letter-spacing: -0.03em;
}

.hero-tagline {
  display: block;
  font-family: var(--ff-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  line-height: 1.35;
  color: var(--clr-teal);
  margin-top: var(--sp-xs);
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--clr-ink-soft);
  max-width: 520px;
  margin-top: var(--sp-md);
  line-height: 1.75;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  margin-top: var(--sp-lg);
}

.hero-disclaimer {
  margin-top: var(--sp-sm);
  font-size: 0.85rem;
  color: var(--clr-ink-faint);
}

/* Hero visual — abstract shapes */
.hero-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 480px;
  justify-self: center;
}

.hero-shapes {
  position: relative;
  width: 100%;
  height: 100%;
}

.shape {
  position: absolute;
  border-radius: 50%;
}

.shape-circle {
  width: 65%;
  height: 65%;
  top: 15%;
  left: 18%;
  background: var(--clr-teal-light);
  animation: float 8s ease-in-out infinite;
}

.shape-ring {
  width: 45%;
  height: 45%;
  top: 5%;
  right: 5%;
  border: 3px solid var(--clr-warm);
  opacity: 0.5;
  animation: float 6s ease-in-out infinite reverse;
}

.shape-dots {
  width: 30%;
  height: 30%;
  bottom: 10%;
  left: 8%;
  background-image: radial-gradient(var(--clr-amber) 2px, transparent 2px);
  background-size: 12px 12px;
  opacity: 0.4;
  animation: float 10s ease-in-out infinite;
}

.shape-wave {
  position: absolute;
  bottom: 25%;
  right: 0%;
  width: 55%;
  color: var(--clr-teal);
  opacity: 0.3;
  animation: float 7s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}


/* ══════════════════════════════════════════════════════
   2. PROBLEM
   ══════════════════════════════════════════════════════ */
.problem {
  background: var(--clr-sand);
  padding: var(--sp-2xl) 0;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
  margin-bottom: var(--sp-lg);
}

.stat-card {
  background: var(--clr-white);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg) var(--sp-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat-figure {
  display: block;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--clr-rust);
  line-height: 1.1;
  margin-bottom: var(--sp-sm);
}

.stat-text {
  font-size: 0.95rem;
  color: var(--clr-ink-soft);
  line-height: 1.65;
}
.stat-text strong {
  color: var(--clr-ink);
}

.problem-coda {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--clr-ink-soft);
  max-width: 480px;
}


/* ══════════════════════════════════════════════════════
   3. WHAT WE DO
   ══════════════════════════════════════════════════════ */
.what {
  padding: var(--sp-2xl) 0;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
  margin-top: var(--sp-md);
}

.pillar {
  text-align: center;
}

.pillar-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--sp-md);
  color: var(--clr-teal);
}

.pillar-title {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--clr-ink);
  margin-bottom: var(--sp-xs);
}

.pillar p {
  font-size: 0.95rem;
  color: var(--clr-ink-soft);
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.7;
}


/* ══════════════════════════════════════════════════════
   4. HOW IT WORKS
   ══════════════════════════════════════════════════════ */
.how {
  background: var(--clr-teal-light);
  padding: var(--sp-2xl) 0;
}

.steps {
  list-style: none;
  max-width: 640px;
  margin: 0 auto;
  counter-reset: none;
}

.step {
  display: flex;
  gap: var(--sp-md);
  align-items: flex-start;
  margin-bottom: var(--sp-lg);
  position: relative;
}
.step:last-child { margin-bottom: 0; }

/* Connector line between steps */
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 23px;
  top: 52px;
  bottom: calc(-1 * var(--sp-lg) + 4px);
  width: 2px;
  background: var(--clr-teal);
  opacity: 0.2;
}

.step-num {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--clr-teal);
  color: var(--clr-white);
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.2rem;
}

.step h3 {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--clr-ink);
  margin-bottom: 0.25rem;
}

.step p {
  font-size: 0.95rem;
  color: var(--clr-ink-soft);
  line-height: 1.65;
}

.how-cta {
  text-align: center;
  margin-top: var(--sp-xl);
}


/* ══════════════════════════════════════════════════════
   5. FOR SCHOOLS
   ══════════════════════════════════════════════════════ */
.schools {
  padding: var(--sp-2xl) 0;
}

.schools-inner {
  background: var(--clr-sand);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl) var(--sp-lg);
  max-width: 800px;
  margin: 0 auto;
}

.schools-inner .section-label {
  margin-bottom: var(--sp-sm);
}

.schools-lead {
  font-size: 1.15rem;
  color: var(--clr-ink);
  font-weight: 500;
  line-height: 1.7;
  margin-bottom: var(--sp-sm);
}

.schools-inner > p {
  color: var(--clr-ink-soft);
  margin-bottom: var(--sp-md);
  line-height: 1.7;
}

.schools-offers {
  list-style: none;
  margin-bottom: var(--sp-lg);
}
.schools-offers li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.6rem;
  color: var(--clr-ink-soft);
  line-height: 1.6;
}
.schools-offers li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--clr-teal);
}


/* ══════════════════════════════════════════════════════
   6. IMPACT
   ══════════════════════════════════════════════════════ */
.impact {
  background: var(--clr-teal);
  color: var(--clr-white);
  padding: var(--sp-2xl) 0;
  text-align: center;
}
.impact .section-label {
  color: var(--clr-sand);
}
.impact .section-intro {
  color: rgba(255,255,255,.75);
  margin-left: auto;
  margin-right: auto;
}

.impact-counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
  margin-bottom: var(--sp-lg);
}

.counter-num {
  display: block;
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 3.5rem;
  line-height: 1.1;
  color: var(--clr-white);
  margin-bottom: var(--sp-xs);
}

.counter-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.impact-note {
  font-size: 0.85rem;
  color: rgba(255,255,255,.5);
  font-style: italic;
}

.impact-link {
  margin-top: var(--sp-md);
}

.impact-detail-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.impact-detail-link:hover {
  color: #fff;
}


/* ══════════════════════════════════════════════════════
   7. ABOUT
   ══════════════════════════════════════════════════════ */
.about {
  padding: var(--sp-2xl) 0;
}

.about-body {
  max-width: 700px;
}

.about-body p {
  color: var(--clr-ink-soft);
  margin-bottom: var(--sp-md);
  font-size: 1.05rem;
  line-height: 1.8;
}
.about-body p:last-child { margin-bottom: 0; }


/* ══════════════════════════════════════════════════════
   8. FOOTER
   ══════════════════════════════════════════════════════ */
.site-footer {
  background: var(--clr-ink);
  color: rgba(255,255,255,.7);
  padding-top: var(--sp-xl);
  padding-bottom: var(--sp-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-lg);
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-logo {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--clr-white);
}

.footer-mission {
  margin-top: var(--sp-xs);
  font-style: italic;
  color: rgba(255,255,255,.5);
}

.footer-links h4,
.footer-contact h4 {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,.4);
  margin-bottom: var(--sp-sm);
}

.footer-links ul {
  list-style: none;
}
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a {
  color: rgba(255,255,255,.7);
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--clr-white); }

.footer-contact a {
  color: var(--clr-warm);
  font-size: 0.9rem;
}
.footer-contact a:hover { color: var(--clr-white); }

.footer-bottom {
  padding-top: var(--sp-md);
  text-align: center;
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: rgba(255,255,255,.35);
  max-width: 680px;
  margin: 0 auto var(--sp-sm);
  line-height: 1.65;
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,.3);
}


/* ══════════════════════════════════════════════════════
   RESPONSIVE — Tablet (≤ 900px)
   ══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-visual { max-width: 320px; margin: var(--sp-lg) auto 0; }

  .stat-cards {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .pillars {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  .impact-counters {
    grid-template-columns: 1fr;
    gap: var(--sp-md);
  }

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


/* ══════════════════════════════════════════════════════
   RESPONSIVE — Mobile (≤ 640px)
   ══════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  :root {
    --sp-xl: 3rem;
    --sp-2xl: 4rem;
  }

  /* Mobile nav */
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--clr-cream);
    padding: var(--sp-md);
    border-bottom: 1px solid var(--clr-sand-dark);
    box-shadow: var(--shadow-md);
    gap: var(--sp-xs);
  }
  .nav-links.open { display: flex; }
  .nav-links li { text-align: center; }
  .nav-cta { width: 100%; display: block; }

  .hero { min-height: auto; padding-top: calc(64px + var(--sp-lg)); padding-bottom: var(--sp-lg); }
  .hero-name { font-size: 2.6rem; }
  .hero-tagline { font-size: 1.15rem; }
  .hero-desc { font-size: 1rem; }
  .hero-visual { display: none; }

  .hero-ctas {
    flex-direction: column;
  }
  .hero-ctas .btn { width: 100%; }

  .stat-figure { font-size: 2rem; }

  .schools-inner {
    padding: var(--sp-lg) var(--sp-md);
  }

  .counter-num { font-size: 2.5rem; }

  .step { gap: var(--sp-sm); }
  .step-num { width: 40px; height: 40px; font-size: 1rem; }
  .step:not(:last-child)::after { left: 19px; top: 44px; }
}


/* ══════════════════════════════════════════════════════
   Reduced motion
   ══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .shape { animation: none !important; }
}
