/* ===================================================================
   Terra Alta — Research & Policy for Early Childhood Development
   Palette: warm earth (terracotta), deep canopy green, sand, cream, ink
   =================================================================== */

:root {
  --terracotta: #B5623C;
  --terracotta-dark: #94492A;
  --canopy: #2F4A3E;
  --canopy-deep: #22372E;
  --sand: #E7DBC7;
  --sand-light: #F3ECDF;
  --cream: #FBF7F0;
  --ink: #2A2621;
  --ink-soft: #5A5349;
  --line: rgba(42, 38, 33, 0.12);
  --shadow: 0 18px 48px rgba(42, 38, 33, 0.10);

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1140px;
  --radius: 16px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 780px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; margin: 0; }

a { color: var(--terracotta-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--terracotta); color: #fff; box-shadow: 0 8px 20px rgba(181, 98, 60, .28); }
.btn-primary:hover { background: var(--terracotta-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 10px 20px; font-size: 15px; }
.btn-lg { padding: 18px 40px; font-size: 19px; }

/* ---------- Brand mark ---------- */
.brand-mark {
  display: inline-block; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--terracotta), var(--terracotta-dark) 70%);
  position: relative; flex: none;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 6px 0 0 6px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--sand-light);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 247, 240, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(42,38,33,.06); border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-text { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--ink); letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: 16px; }
.nav-links a:hover { color: var(--terracotta-dark); text-decoration: none; }
.nav-links a.btn-primary { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 128px 0 116px;
  background:
    linear-gradient(105deg, rgba(251,247,240,.97) 0%, rgba(251,247,240,.86) 36%, rgba(251,247,240,.42) 66%, rgba(47,74,62,.18) 100%),
    url("assets/hero-andes.jpg") center 30% / cover no-repeat;
  overflow: hidden;
}
.hero-inner { max-width: 880px; }
.eyebrow {
  font-family: var(--sans); font-weight: 600; font-size: 14px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--terracotta-dark); margin: 0 0 18px;
}
.eyebrow.light { color: var(--sand); }
.hero-title { font-size: clamp(2.6rem, 6vw, 4.5rem); margin-bottom: 26px; max-width: 15ch; }
.hero-lead { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--ink-soft); max-width: 60ch; margin: 0 0 36px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-tint { background: var(--canopy); color: var(--sand-light); }
.section-tint .section-title, .section-tint .eyebrow { color: #fff; }
.section-tint .eyebrow { color: var(--sand); }
.section-head { margin-bottom: 56px; max-width: 720px; }
.section-title { font-size: clamp(1.8rem, 3.6vw, 2.9rem); margin-bottom: 20px; }
.lede { font-size: 1.2rem; color: var(--ink-soft); }
.section-tint .lede { color: rgba(243, 236, 223, .85); }

/* ---------- Focus cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--cream); color: var(--ink);
  border-radius: var(--radius); padding: 34px 30px;
  box-shadow: var(--shadow); transition: transform .2s ease;
}
.card:hover { transform: translateY(-4px); }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; font-size: 24px; color: var(--terracotta);
  background: var(--sand-light); margin-bottom: 18px;
}
.card h3 { font-size: 1.35rem; margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: 1rem; margin: 0; }

/* ---------- Founder ---------- */
.founder-grid { display: grid; grid-template-columns: 380px 1fr; gap: 64px; align-items: center; }
.founder-photo { text-align: center; }
.photo-placeholder {
  position: relative; overflow: hidden;
  width: 100%; aspect-ratio: 4/5; border-radius: var(--radius);
  background: linear-gradient(150deg, var(--terracotta), var(--canopy));
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.photo-placeholder span { font-family: var(--serif); font-size: 5rem; color: rgba(255,255,255,.92); letter-spacing: .05em; }
.photo-placeholder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.photo-caption { margin-top: 16px; font-weight: 600; color: var(--ink); }
.founder-body p { color: var(--ink-soft); margin: 0 0 18px; }
.founder-body .section-title { margin-bottom: 24px; }
.credentials { list-style: none; padding: 0; margin: 28px 0 0; display: flex; gap: 32px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 24px; }
.credentials li { font-size: .98rem; color: var(--ink-soft); max-width: 15ch; }
.credentials span { display: block; font-family: var(--serif); font-size: 2.2rem; color: var(--terracotta); line-height: 1; margin-bottom: 4px; }

/* ---------- Vision / quote ---------- */
.quote-section {
  color: var(--sand-light);
  background:
    linear-gradient(rgba(34,55,46,.85), rgba(34,55,46,.93)),
    url("assets/vision-andes.jpg") center / cover no-repeat;
  background-attachment: scroll;
}
.pull-quote {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.25rem, 2.6vw, 1.8rem); line-height: 1.36;
  margin: 38px auto 16px; max-width: 60ch; color: rgba(255,255,255,.92);
  padding-top: 34px; border-top: 1px solid rgba(231,219,199,.25);
}
.quote-attrib { font-weight: 600; color: var(--sand); margin: 0; }
.vision-body { color: rgba(243, 236, 223, .82); font-size: 1.15rem; max-width: 62ch; margin: 0 auto; }

/* ---------- CTA ---------- */
.cta-section { background: var(--sand-light); }
.cta-section .lede { margin-bottom: 34px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--sand); padding: 56px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer-brand .brand-text { color: #fff; }
.footer-tag { flex-basis: 100%; margin: 8px 0 0; color: rgba(231, 219, 199, .7); font-size: .95rem; }
.footer-meta { text-align: right; }
.footer-meta a { color: #fff; font-weight: 600; }
.footer-meta p { margin: 8px 0 0; color: rgba(231, 219, 199, .6); font-size: .9rem; }

/* ---------- Approach / Principles ---------- */
.principle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.principle .num { font-family: var(--serif); font-size: 1.7rem; color: var(--terracotta); line-height: 1; margin-bottom: 14px; display: block; }
.principle h3 { font-size: 1.2rem; margin-bottom: 8px; }
.principle p { color: var(--ink-soft); font-size: .98rem; margin: 0; }

/* ---------- Partners ---------- */
.partners-head { margin-bottom: 44px; max-width: 720px; }
.partner-card {
  display: grid; grid-template-columns: 88px 1fr; gap: 26px; align-items: start;
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 34px; box-shadow: var(--shadow); max-width: 760px;
}
.partner-avatar {
  width: 88px; height: 88px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(150deg, var(--canopy), var(--terracotta));
  display: grid; place-items: center; font-family: var(--serif); font-size: 1.9rem; color: #fff;
}
.partner-avatar img { width: 100%; height: 100%; object-fit: cover; }
.partner-card h3 { font-size: 1.35rem; margin-bottom: 4px; }
.partner-role { font-weight: 600; color: var(--terracotta-dark); font-size: .98rem; margin: 0 0 12px; }
.partner-card p { color: var(--ink-soft); font-size: 1rem; margin: 0; }
.partners-note { margin-top: 30px; color: var(--ink-soft); font-style: italic; max-width: 720px; }

/* ---------- Vision lead ---------- */
.vision-lead { font-size: clamp(1.7rem, 3.4vw, 2.6rem); color: #fff; margin-bottom: 22px; line-height: 1.16; }
.section-sand { background: var(--sand-light); }

/* ---------- Team / Principals ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.team-card {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 30px; box-shadow: var(--shadow);
}
.team-avatar {
  position: relative; overflow: hidden;
  width: 96px; height: 96px; border-radius: 50%; margin-bottom: 22px;
  background: linear-gradient(150deg, var(--terracotta), var(--canopy));
  display: grid; place-items: center; font-family: var(--serif); font-size: 2.1rem; color: #fff;
}
.team-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.team-card h3 { font-size: 1.35rem; margin-bottom: 4px; }
.team-role { font-weight: 600; color: var(--terracotta-dark); font-size: .95rem; margin: 0 0 14px; }
.team-card .bio { color: var(--ink-soft); font-size: .98rem; margin: 0; }

/* ---------- Selected work / portfolio ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.work-card { background: var(--cream); border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow); }
.work-tag {
  display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 12px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--canopy);
  background: var(--sand); padding: 5px 13px; border-radius: 999px; margin-bottom: 15px;
}
.work-card h3 { font-size: 1.22rem; margin-bottom: 8px; }
.work-card p { color: var(--ink-soft); font-size: .98rem; margin: 0; }

/* ---------- Impact stats ---------- */
.stat-row { list-style: none; padding: 0; margin: 0 auto 8px; display: flex; gap: 48px; flex-wrap: wrap; justify-content: center; }
.stat-row li { text-align: center; }
.stat-row .stat-num { display: block; font-family: var(--serif); font-size: 2.7rem; color: var(--terracotta); line-height: 1; margin-bottom: 6px; }
.stat-row .stat-label { color: var(--ink-soft); font-size: .98rem; }

/* ---------- Institution / partner strip ---------- */
.inst-strip { margin-top: 52px; text-align: center; }
.inst-label { font-family: var(--sans); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 20px; }
.inst-list { display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: center; }
.inst-list span { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); opacity: .72; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .principle-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .founder-grid { grid-template-columns: 1fr; gap: 36px; }
  .founder-photo { max-width: 320px; margin: 0 auto; }
}
@media (max-width: 680px) {
  body { font-size: 17px; }
  .section { padding: 68px 0; }
  .hero { padding: 72px 0 64px; }
  .card-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--cream); padding: 16px 28px 24px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; }
  .nav-links a.btn-primary { text-align: center; margin-top: 8px; }
  .footer-inner { flex-direction: column; }
  .footer-meta { text-align: left; }
  .credentials { gap: 24px; }
  .principle-grid { grid-template-columns: 1fr; }
  .partner-card { grid-template-columns: 1fr; gap: 16px; }
  .work-grid { grid-template-columns: 1fr; }
  .stat-row { gap: 32px; }
}
