/* ==========================================================================
   San Juan Hills Academic Foundation — design mockup
   Editorial / institutional system built from the Foundation crest palette.
   ========================================================================== */

:root {
  --navy-900: #0B1D3A;
  --navy-800: #112A55;
  --navy-700: #1C3766;

  --parchment-100: #F6EFE1;
  --parchment-300: #DFC9A0;
  --gold-600: #A67C3D;
  --gold-700: #8A6530;

  --bg: #FAF8F4;
  --surface: #FFFFFF;
  --text: #16233D;
  --muted: #5B6B85;
  --border: #E1DACB;
  --border-cool: #DBE0EA;

  --radius: 3px;

  --font-head: "Merriweather", Georgia, serif;
  --font-body: "Open Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--navy-800);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.65rem, 3vw, 2.15rem); }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; color: var(--text); }

a { color: var(--gold-700); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible {
  outline: 2px solid var(--gold-700);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
  text-decoration: none;
  min-height: 44px;
  line-height: 1;
}
.btn:hover { text-decoration: none; }

.btn--gold { background: var(--gold-700); color: #fff; }
.btn--gold:hover { background: #714f24; color: #fff; }

.btn--navy { background: var(--navy-800); color: #fff; }
.btn--navy:hover { background: var(--navy-700); color: #fff; }

.btn--navy-outline { background: transparent; color: var(--navy-800); border-color: var(--navy-800); }
.btn--navy-outline:hover { background: var(--navy-800); color: #fff; }

.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn--outline-light:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: #fff; }

.btn--sm { padding: 10px 18px; font-size: 0.88rem; }
.btn--lg { padding: 15px 30px; font-size: 1.02rem; }
.btn--block { width: 100%; }

/* ---------- Link-arrow ---------- */
.link-arrow { font-weight: 700; white-space: nowrap; position: relative; }
.link-arrow::after { content: "\2192"; margin-left: 6px; }
.link-arrow--lg { font-size: 1.02rem; }

/* ---------- Topbar ---------- */
.topbar { background: var(--navy-900); color: #fff; font-size: 0.85rem; border-bottom: 1px solid var(--gold-700); }
.topbar__inner {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  flex-wrap: wrap; padding: 9px 24px; text-align: center;
}
.topbar p { margin: 0; color: #E7ECF6; }
.topbar__link { color: var(--parchment-300); font-weight: 700; white-space: nowrap; text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border-cool);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand__logo { height: 30px; width: auto; flex-shrink: 0; }

.nav { display: flex; align-items: center; gap: 24px; }
.nav a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--gold-700); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--navy-800); border-bottom-color: var(--gold-700); }

.site-header__cta { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-cool);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--navy-800); margin: 0 auto; transition: transform 150ms ease, opacity 150ms ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background: var(--navy-900);
  color: #fff;
  padding: 68px 0 84px;
  border-bottom: 3px solid var(--gold-700);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: start;
}

.hero h1 { color: #fff; max-width: 14ch; }
.hero__lede { color: #C9D5EA; font-size: 1.08rem; max-width: 46ch; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0 28px; }

.hero__trust {
  font-size: 0.85rem;
  color: #93A4C4;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

/* Goal card (inside hero) */
.goal-card {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border-cool);
  border-radius: var(--radius);
  padding: 28px;
}
.goal-card h2 { font-size: 1.05rem; margin-bottom: 16px; }
.goal-card__amounts { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.goal-card__raised { font-family: var(--font-head); font-size: 1.9rem; font-weight: 900; color: var(--navy-800); }
.goal-card__of { color: var(--muted); font-size: 0.88rem; }

.progress {
  height: 8px;
  background: var(--parchment-100);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 20px;
}
.progress__fill {
  height: 100%;
  background: var(--gold-700);
  transition: width 600ms ease;
}

.goal-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 22px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.goal-card__stats div { text-align: center; }
.goal-card__stats dt { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.goal-card__stats dd { margin: 0; font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; color: var(--navy-800); }

.goal-card--inline { margin-bottom: 36px; }
.goal-card--inline .goal-card__stats { margin-bottom: 0; }

/* ---------- Page header (subpages) ---------- */
.page-header {
  background: var(--navy-900);
  color: #fff;
  padding: 52px 0;
  border-bottom: 3px solid var(--gold-700);
}
.page-header h1 { color: #fff; margin-bottom: 10px; }
.page-header p { color: #C9D5EA; max-width: 60ch; margin: 0; font-size: 1.05rem; }

/* ---------- Section basics ---------- */
.section { padding: 84px 0; }
.section--muted { background: var(--parchment-100); }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 44px; flex-wrap: wrap; padding-top: 20px; border-top: 2px solid var(--gold-700); }
.section-head--stack { flex-direction: column; align-items: flex-start; }
.section-head h2 { margin: 0; }
.section-head__lede { max-width: 62ch; color: var(--muted); margin-top: 10px; }

/* ---------- Donate section ---------- */
.donate__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
  padding-top: 20px;
  border-top: 2px solid var(--gold-700);
}
.donate__intro h2 { max-width: 16ch; }
.donate__intro > p { color: var(--muted); max-width: 48ch; }

.donate__why { list-style: none; margin: 26px 0; padding: 0; }
.donate__why li {
  font-size: 0.95rem;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.donate__why li:last-child { border-bottom: 1px solid var(--border); }

.pull-quote {
  margin: 32px 0 0;
  padding: 0;
}
.pull-quote p {
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--navy-800);
  line-height: 1.4;
  margin: 0 0 10px;
}
.pull-quote p::before { content: "\201C"; color: var(--gold-600); }
.pull-quote p::after { content: "\201D"; color: var(--gold-600); }
.pull-quote cite { font-style: normal; font-size: 0.82rem; color: var(--muted); }
.pull-quote cite::before { content: "\2014 "; }

.pull-quote--center { text-align: center; max-width: 52ch; margin-left: auto; margin-right: auto; }
.pull-quote--center p { font-size: 1.7rem; }
.pull-quote__cta { text-align: center; margin: 28px 0 0; }

.donate-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--border-cool);
}

.donate-card__toggle {
  display: flex;
  border: 1px solid var(--border-cool);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 26px;
}
.freq-btn {
  flex: 1;
  border: none;
  background: #fff;
  padding: 11px 12px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--muted);
  transition: background-color 150ms ease, color 150ms ease;
  min-height: 42px;
}
.freq-btn + .freq-btn { border-left: 1px solid var(--border-cool); }
.freq-btn.is-active { background: var(--navy-800); color: #fff; }

.donate-card__label { font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 10px; }

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.amount-btn {
  min-height: 52px;
  border-radius: var(--radius);
  border: 1px solid var(--border-cool);
  background: #fff;
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--navy-800);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}
.amount-btn:hover { border-color: var(--navy-800); }
.amount-btn.is-selected { border-color: var(--navy-800); background: var(--navy-800); color: #fff; }
.amount-btn--custom { font-size: 0.9rem; font-weight: 700; }

.custom-amount { margin-bottom: 20px; }
.custom-amount label { display: block; font-size: 0.8rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.custom-amount__field {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-cool);
  border-radius: var(--radius);
  overflow: hidden;
}
.custom-amount__field:focus-within { border-color: var(--navy-800); }
.custom-amount__field span { padding: 0 0 0 14px; font-weight: 800; color: var(--muted); }
.custom-amount__field input {
  border: none; outline: none; padding: 13px 14px; font-size: 1.05rem; font-weight: 700; width: 100%; font-family: var(--font-body); color: var(--text);
}

.donate-card__field { margin-bottom: 18px; }
.donate-card__field label { display: block; font-size: 0.8rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.donate-card__field input {
  width: 100%; padding: 13px 14px; border: 1px solid var(--border-cool); border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.98rem; outline: none; transition: border-color 150ms ease;
}
.donate-card__field input:focus { border-color: var(--navy-800); }

.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.85rem; color: var(--muted); margin-bottom: 22px; cursor: pointer; }
.checkbox-row input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--navy-800); flex-shrink: 0; }

.donate-card__trust {
  font-size: 0.78rem; color: var(--muted);
  margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--border);
}

.donate-card__fine { font-size: 0.76rem; color: var(--muted); margin: 10px 0 0; }

/* ---------- News list ---------- */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.news-item:first-child { border-top: 1px solid var(--border); }
.news-item--pinned { background: var(--surface); margin: 0 -28px; padding: 28px; border: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.news-item--pinned + .news-item { border-top: none; }

.news-item__label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-700);
}
.news-item__date { font-size: 0.8rem; color: var(--muted); font-weight: 700; margin: 0 0 6px; }
.news-item__body h3 { font-size: 1.15rem; margin-bottom: 8px; }
.news-item__body p:not(.news-item__date) { color: var(--muted); max-width: 60ch; }

/* ---------- Stats band ---------- */
.stats-band { background: var(--navy-900); color: #fff; padding: 56px 0; }
.stats-band__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 0 24px;
  border-left: 1px solid rgba(255,255,255,0.18);
}
.stat:first-child { border-left: none; padding-left: 0; }
.stat strong { display: block; font-family: var(--font-head); font-size: clamp(1.7rem, 3vw, 2.3rem); color: var(--parchment-300); font-weight: 700; }
.stat span { font-size: 0.85rem; color: #93A4C4; }

/* ---------- Programs ---------- */
.program-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 56px;
}
.program-list li {
  padding: 26px 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 4px 18px;
  align-items: start;
}
.program-list__num {
  grid-row: 1 / span 2;
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--parchment-300);
}
.program-list h3 { margin: 0 0 6px; }
.program-list p { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* ---------- Split / About ---------- */
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.media-block {
  aspect-ratio: 4/3;
  background: var(--navy-800);
  display: flex; align-items: flex-end;
  padding: 18px;
}
.media-block span { color: #93A4C4; font-size: 0.78rem; }
.split__content p { color: var(--muted); max-width: 54ch; }

/* ---------- Get Involved ---------- */
.involved-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.involved-item {
  padding: 0 24px;
  border-left: 1px solid var(--border);
}
.involved-item:first-child { border-left: none; padding-left: 0; }
.involved-item p { color: var(--muted); font-size: 0.92rem; }
.involved-row--3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- CTA banner ---------- */
.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  padding: 36px 40px;
}
.cta-banner h2 { margin-bottom: 6px; font-size: 1.4rem; }
.cta-banner p { margin: 0; color: var(--muted); max-width: 46ch; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #C9D5EA; }

.footer-top {
  display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  padding: 44px 24px 36px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.footer-mast { font-family: var(--font-head); font-weight: 700; color: #fff; font-size: 1.2rem; margin: 0; }
.footer-subscribe label { display: block; font-size: 0.82rem; color: #93A4C4; margin-bottom: 8px; }
.footer-subscribe__field { display: flex; }
.footer-subscribe__field input {
  padding: 11px 14px; border: 1px solid rgba(255,255,255,0.3); border-right: none; border-radius: var(--radius) 0 0 var(--radius);
  font-family: var(--font-body); font-size: 0.92rem; min-width: 220px; outline: none; background: rgba(255,255,255,0.06); color: #fff;
}
.footer-subscribe__field input::placeholder { color: #93A4C4; }
.footer-subscribe__field input:focus { border-color: var(--parchment-300); }
.footer-subscribe__field button {
  padding: 11px 18px; border: 1px solid var(--gold-700); background: var(--gold-700); color: #fff; font-weight: 700;
  border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; font-family: var(--font-body); font-size: 0.9rem;
}
.footer-subscribe__field button:hover { background: #714f24; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 36px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 { color: #fff; font-family: var(--font-body); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 4px; }
.footer-col a, .footer-col span { color: #AEBEDB; font-size: 0.92rem; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 20px 24px; font-size: 0.8rem; color: #7E8FB3;
}
.footer-bottom p { margin: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; }
  .donate__inner { grid-template-columns: 1fr; }
  .donate__intro { order: 2; }
  .program-list { grid-template-columns: 1fr; }
  .involved-row { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .involved-item:nth-child(3) { border-left: none; padding-left: 0; }
  .stats-band__row { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .stat:nth-child(3) { border-left: none; padding-left: 0; }
  .split { grid-template-columns: 1fr; }
  .split__media { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .brand__logo { height: 26px; }

  .site-header.nav-open .nav {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 20px;
    border-bottom: 1px solid var(--border-cool);
    gap: 16px;
  }

  .section { padding: 56px 0; }
  .news-item { grid-template-columns: 1fr; gap: 8px; }
  .news-item--pinned { margin: 0; }
  .involved-row { grid-template-columns: 1fr; }
  .involved-item { border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 20px; }
  .involved-item:first-child { border-top: none; padding-top: 0; }
  .stats-band__row { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-top { flex-direction: column; align-items: flex-start; }
  .amount-grid { grid-template-columns: repeat(3, 1fr); }
  .section-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .amount-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}
