/* ===================== TOKENS ===================== */
:root {
  --navy: #0E2841;
  --navy-2: #11324f;
  --teal: #156082;
  --teal-dark: #0f4a66;
  --orange: #E97132;
  --orange-dark: #d15d22;
  --cream: #f7f5f0;
  --sand: #efeae0;
  --ink: #1b2430;
  --muted: #5c6673;
  --white: #ffffff;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --maxw: 1140px;
  --radius: 16px;
  --shadow: 0 18px 50px -20px rgba(14, 40, 65, 0.35);
  --shadow-sm: 0 8px 24px -12px rgba(14, 40, 65, 0.25);
}

/* ===================== BASE ===================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); line-height: 1.08; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); letter-spacing: -0.01em; color: var(--navy); }
h3 { font-size: 1.25rem; color: var(--navy); }
p { margin: 0 0 1rem; hyphens: none; -webkit-hyphens: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Justified copy only in the wide reading column, where lines are long
   enough to justify cleanly without breaking words. */
.narrow p:not(.section-lead):not(.pillar p),
.split-text p {
  text-align: justify;
  text-justify: inter-word;
}
.pillar p { text-align: left; }

.container { width: min(100% - 3rem, var(--maxw)); margin-inline: auto; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.center.narrow, .narrow.center { margin-inline: auto; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--orange);
  margin: 0 0 .8rem;
}
.eyebrow.center { text-align: center; }
.eyebrow.light { color: #ffd9c2; }

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; }
.center .section-lead, .section-lead.center { margin-inline: auto; }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-ghost.light { border-color: rgba(255,255,255,.6); }

/* ===================== HEADER ===================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 240, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(14,40,65,.08);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: .6rem; font-size: 1.05rem; color: var(--navy); }
.brand-mark { color: var(--orange); font-size: 1.4rem; line-height: 1; display: inline-block; transform: translateY(-4px); }
.brand-text strong { font-family: var(--serif); font-weight: 800; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { font-size: 0.95rem; font-weight: 500; color: var(--navy); opacity: .85; transition: opacity .15s; }
.nav a:hover { opacity: 1; }
.nav-cta { background: var(--navy); color: #fff !important; padding: .5rem 1.1rem; border-radius: 999px; opacity: 1 !important; }
.nav-cta:hover { background: var(--teal); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: .25s; }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: flex; align-items: center;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(14,40,65,.78) 0%, rgba(21,96,130,.5) 50%, rgba(14,40,65,.4) 100%),
    url("santiago.jpeg") center/cover no-repeat;
  /* Hero photo: Santiago skyline with the Andes. Swap the filename to change it. */
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(14,40,65,.55), transparent 45%);
}
.hero-content { position: relative; max-width: 760px; padding: 5rem 0; }
.hero-content .eyebrow { color: #ffd9c2; }
.hero h1 { color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,.25); }
.hero h1 .accent { color: var(--orange); }
.hero-lead { font-size: 1.25rem; max-width: 560px; margin: 1.2rem 0 2rem; color: rgba(255,255,255,.94); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ===================== STATS ===================== */
.stats { background: var(--navy); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 2.4rem 0; }
.stat { text-align: center; padding: .5rem; }
.stat-num { display: block; font-family: var(--serif); font-size: 2.4rem; font-weight: 800; color: var(--orange); }
.stat-label { font-size: .9rem; letter-spacing: .04em; color: rgba(255,255,255,.82); }

/* ===================== PILLARS ===================== */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 3rem; }
.pillar {
  background: #fff; border-radius: var(--radius); padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(14,40,65,.06);
}
.pillar h3 { color: var(--teal); }
.pillar p { color: var(--muted); margin: 0; }

/* ===================== FOCUS AREAS ===================== */
.focus { background: var(--sand); }
.focus-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem; margin-top: 3rem;
}
.focus-card {
  flex: 0 1 calc(33.333% - .8rem); min-width: 220px;
  background: #fff; border-radius: var(--radius); padding: 1.6rem 1.4rem;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(14,40,65,.05);
  transition: transform .2s ease, box-shadow .2s ease;
}
.focus-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.focus-icon { font-size: 2rem; display: block; margin-bottom: .6rem; }
.focus-card h3 { margin-bottom: .3rem; }
.focus-card p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ===================== FIELDS ===================== */
.fields-grid {
  list-style: none; padding: 0; margin: 3rem 0 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem;
}
.fields-grid li {
  flex: 0 1 calc(33.333% - .6rem); min-width: 200px;
  background: #fff; border-left: 4px solid var(--orange);
  padding: 1rem 1.2rem; border-radius: 10px; font-weight: 600; color: var(--navy);
  box-shadow: var(--shadow-sm);
}

/* ===================== EXPERIENCE ===================== */
.experience { background: var(--navy); color: #fff; }
.experience h2 { color: #fff; }
.exp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; margin-top: 3rem; }
.exp-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 2rem;
}
.exp-card h3 { color: #ffd9c2; }
.exp-card p { color: rgba(255,255,255,.88); margin: 0; }

/* Photo gallery */
.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2.4rem;
}
.gallery-item {
  margin: 0; overflow: hidden; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid rgba(255,255,255,.12);
  aspect-ratio: 4 / 3;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.06); }

/* ===================== TESTIMONIALS ===================== */
.testimonials { background: var(--cream); padding-bottom: clamp(1.75rem, 4vw, 3.25rem); }
.housing { padding-top: clamp(1.75rem, 4vw, 3.25rem); }
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 3rem; }
.quote {
  margin: 0; background: #fff; border-radius: var(--radius); padding: 2rem 1.8rem;
  box-shadow: var(--shadow-sm); border-top: 4px solid var(--teal);
  display: flex; flex-direction: column;
}
.quote blockquote {
  margin: 0 0 1.2rem; font-family: var(--serif); font-size: 1.08rem;
  font-style: italic; color: var(--ink); flex: 1;
}
.quote figcaption { color: var(--muted); font-size: .92rem; }
.quote figcaption strong { display: block; color: var(--navy); font-family: var(--sans); }
.quote figcaption span { display: block; font-size: .85rem; }

/* ===================== HOUSING ===================== */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.split-text h2 { color: var(--navy); }
.split-text p { color: var(--muted); }
.checklist { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.checklist li { position: relative; padding-left: 1.9rem; margin-bottom: .7rem; font-weight: 500; color: var(--navy); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: #fff; background: var(--orange); width: 1.3rem; height: 1.3rem;
  border-radius: 50%; display: grid; place-items: center; font-size: .8rem;
}
.split-media {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem;
  min-height: 360px; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.split-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===================== ELIGIBILITY ===================== */
.eligibility { background: var(--sand); }
.elig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2.6rem; }
.elig-card { background: #fff; border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm); }
.elig-card h3 { color: var(--teal); }
.elig-card p { color: var(--muted); margin: 0; }

/* ===================== APPLY ===================== */
.apply {
  background:
    linear-gradient(135deg, rgba(14,40,65,.92), rgba(21,96,130,.9)),
    url("apply.jpg") center/cover fixed no-repeat;
  color: #fff;
}
.apply h2, .light { color: #fff; }
.apply .section-lead.light { color: rgba(255,255,255,.9); }
.contact-card {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius); padding: 2.2rem; margin-top: 2.2rem; display: inline-block;
}
.contact-name { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; margin: 0; }
.contact-role { color: rgba(255,255,255,.82); margin: .2rem 0 1.4rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* ===================== FOOTER ===================== */
.site-footer { background: var(--navy); color: rgba(255,255,255,.8); padding: 2.6rem 0; }
.footer-inner { text-align: center; display: grid; gap: .5rem; }
.footer-brand { display: inline-flex; gap: .5rem; align-items: center; justify-content: center; color: #fff; }
.footer-brand strong { font-family: var(--serif); }
.footer-tag { font-family: var(--serif); font-style: italic; color: #ffd9c2; margin: 0; }
.footer-legal { font-size: .85rem; color: rgba(255,255,255,.55); margin: .4rem 0 0; }

/* ===================== MODAL ===================== */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 1.5rem;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(14, 40, 65, 0.55); backdrop-filter: blur(3px);
}
.modal-box {
  position: relative; z-index: 1;
  background: #fff; color: var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 2.6rem 2.2rem 2.4rem; max-width: 440px; width: 100%;
  text-align: center;
  animation: modal-in .22s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-icon { font-size: 2.6rem; display: block; margin-bottom: .6rem; }
.modal-box h3 { font-size: 1.5rem; margin-bottom: .5rem; }
.modal-box p { color: var(--muted); margin: 0 0 1.6rem; }
.modal-close {
  position: absolute; top: .7rem; right: .9rem;
  background: none; border: 0; cursor: pointer;
  font-size: 1.7rem; line-height: 1; color: var(--muted);
  padding: .2rem .4rem; border-radius: 8px; transition: color .15s, background .15s;
}
.modal-close:hover { color: var(--navy); background: rgba(14,40,65,.06); }
@media (prefers-reduced-motion: reduce) { .modal-box { animation: none; } }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .site-header.open .nav {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--cream); padding: 1.2rem 1.5rem; gap: 1rem;
    box-shadow: var(--shadow-sm); border-bottom: 1px solid rgba(14,40,65,.08);
  }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .pillars, .exp-grid, .quote-grid, .elig-grid { grid-template-columns: 1fr; }
  .focus-card { flex-basis: calc(50% - .6rem); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .fields-grid li { flex-basis: calc(50% - .45rem); }
  .split { grid-template-columns: 1fr; }
  .split-media { min-height: 260px; order: -1; }
  .apply { background-attachment: scroll; }
}
@media (max-width: 520px) {
  .fields-grid li { flex-basis: 100%; }
  .focus-card { flex-basis: 100%; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { text-align: center; }
}
