/*
  SciOly Prep — site layout: header, footer, and page section patterns.
  Hero is centered; every other section is left-aligned.
  Sections are separated by whitespace only.
*/

/* ---------- skip link ---------- */
.skip {
  position: absolute;
  left: var(--space-4);
  top: -4rem;
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  background: var(--color-ink);
  color: var(--color-cream);
  font-family: var(--font-ui);
  border-radius: var(--radius-input);
}
.skip:focus { top: var(--space-4); color: var(--color-cream); }

/* ---------- header ---------- */
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
  padding-block: var(--space-5);
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-ink);
  text-decoration: none;
}
.brand-link:hover { color: var(--color-ink); }
.wordmark {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  line-height: 1;
  font-variation-settings: "opsz" 36;
}
/* header logo: the SciOly Prep seal */
.site-logo {
  display: block;
  width: auto;
  height: 3rem;
  flex: none;
}
/* empty logo slot (still used on the brand guide page) */
.logo-slot {
  width: 2.25rem;
  height: 2.25rem;
  border: var(--border-width) dashed var(--color-kraft);
  border-radius: var(--radius-input);
}

.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-6); }
.site-nav ul { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); margin: 0; padding: 0; list-style: none; }
.site-nav ul a {
  display: inline-block;
  padding-block: var(--space-2);
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: var(--weight-ui);
  text-decoration: none;
}
.site-nav ul a:hover { color: var(--color-sage); }
.site-nav ul a[aria-current="page"] {
  color: var(--color-sage);
  text-decoration: underline;
  text-decoration-thickness: var(--border-width);
  text-underline-offset: 0.4em;
}

/* ---------- hero (centered) ---------- */
.hero {
  text-align: center;
  padding-block: var(--space-7) var(--space-6);
}
.hero h1,
.hero p { margin-inline: auto; }
.hero h1 { max-width: 20ch; }
.hero .actions { justify-content: center; }
.hero-photo { margin-top: var(--space-6); }
/* SciOly Prep Program seal above the home headline */
.hero-seal {
  display: block;
  width: min(15rem, 60vw);
  height: auto;
  margin: 0 auto var(--space-5, 2rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  margin-top: var(--space-5);
}

/* ---------- section heading ---------- */
.section-head { margin-bottom: var(--space-6); }
.section-head p { margin-bottom: 0; }

/* ---------- impact numbers ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
  margin: 0;
}
.stats dd {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  line-height: 1;
  color: var(--color-kraft);         /* large text only */
}
.stats dt {
  margin-top: var(--space-2);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--weight-ui);
  color: var(--color-muted);
}
.stats > div { display: flex; flex-direction: column-reverse; }

/* ---------- split: text + photo ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-7);
  align-items: center;
}
.split.reverse > :first-child { order: 2; }

/* ---------- columns ---------- */
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-7); }
.cols-3 h3, .cols-2 h3 { margin-bottom: var(--space-3); }

/* ---------- large statement (mission) ---------- */
.statement {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  line-height: 1.25;
  max-width: 30ch;
  margin: 0;
}

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.timeline li {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-5);
  padding-block: var(--space-4);
}
.timeline .year {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-kraft);
  line-height: 1.2;
}

/* ---------- people (team) ---------- */
.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: var(--space-7) var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}
.people.small { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: var(--space-6) var(--space-5); }
.person h3 { font-size: var(--text-lg); margin: var(--space-4) 0 var(--space-1); }
.person .label { display: block; margin-bottom: var(--space-2); }
.person p { font-size: var(--text-sm); margin: 0; }

/* ---------- contact ---------- */
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-2);
}
.contact-list .icon { color: var(--color-sage); }
.checklist { margin: 0 0 var(--space-5); padding-left: 1.2rem; }
.checklist li { margin-bottom: var(--space-2); }
.checklist li::marker { color: var(--color-kraft); }

/* ---------- FAQ ---------- */
.faq { max-width: 46rem; }
.faq details { padding-block: var(--space-3); }
.faq summary {
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  list-style-position: inside;
}
.faq summary::marker { color: var(--color-sage); }
.faq details p { margin: var(--space-3) 0 0; }

/* ---------- footer: sage band, cream text ---------- */
.site-footer {
  margin-top: var(--space-section);
  padding-block: var(--space-7) var(--space-6);
  background: var(--color-sage);
  color: var(--color-cream);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-5) var(--space-7);
}
.site-footer .brand-link,
.site-footer .brand-link:hover { color: var(--color-cream); }
.site-footer .tagline { margin: var(--space-2) 0 0; font-size: var(--text-sm); color: var(--color-cream); }
.site-footer nav ul { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); margin: 0; padding: 0; list-style: none; }
.site-footer nav a { color: var(--color-cream); text-decoration: none; font-size: var(--text-sm); font-weight: var(--weight-ui); display: inline-block; padding-block: var(--space-2); }
.site-footer nav a:hover { color: var(--color-cream); text-decoration: underline; text-underline-offset: 0.3em; }
.site-footer :focus-visible { outline-color: var(--color-cream); }
.site-footer .copy { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-5); max-width: none; flex-basis: 100%; margin: var(--space-5) 0 0; font-size: var(--text-sm); color: var(--color-cream); font-family: var(--font-ui); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .split, .cols-2 { grid-template-columns: 1fr; gap: var(--space-6); }
  .split.reverse > :first-child { order: 0; }
  .cols-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .site-header .container { padding-block: var(--space-4); }
  .site-nav { width: 100%; justify-content: space-between; }
  .timeline li { grid-template-columns: 1fr; gap: var(--space-1); }
}

/* ---------- sticky header: stays on screen, turns sage once you scroll ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-cream);
  transition:
    background-color var(--duration-base) var(--ease-out),
    color var(--duration-base) var(--ease-out);
}
.site-header .container { transition: padding var(--duration-base) var(--ease-out); }

.site-header.is-scrolled { background: var(--color-sage); }
.site-header.is-scrolled .container { padding-block: var(--space-3); }
.site-header.is-scrolled .brand-link,
.site-header.is-scrolled .brand-link:hover,
.site-header.is-scrolled .site-nav ul a { color: var(--color-cream); }
.site-header.is-scrolled .site-nav ul a:hover,
.site-header.is-scrolled .site-nav ul a[aria-current="page"] {
  color: var(--color-cream);
  text-decoration: underline;
  text-decoration-thickness: var(--border-width);
  text-underline-offset: 0.4em;
}
.site-header.is-scrolled .logo-slot { border-color: var(--color-cream); }
.site-header.is-scrolled .button { color: var(--color-cream); border-color: var(--color-cream); }
.site-header.is-scrolled .button:hover,
.site-header.is-scrolled .button:focus-visible { background: var(--color-cream); color: var(--color-sage); }
.site-header.is-scrolled :focus-visible { outline-color: var(--color-cream); }

/* jump links (e.g. /contact#join) land below the sticky header */
[id] { scroll-margin-top: 6rem; }

.skip { z-index: 200; }

@media (max-width: 520px) {
  /* keep the pinned bar short on phones: drop the button once scrolled */
  .site-header.is-scrolled .site-nav .button { display: none; }
  .site-header.is-scrolled .container { padding-block: var(--space-2); gap: var(--space-1); }
  [id] { scroll-margin-top: 7.5rem; }
}

/* ---------- real photos: same shapes as the placeholders they replace ---------- */
.media {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-photo);
}
.media.wide { aspect-ratio: 16 / 7; }
.media.landscape { aspect-ratio: 4 / 3; }
.media.portrait { aspect-ratio: 4 / 5; }
@media (max-width: 520px) {
  .media.wide { aspect-ratio: 4 / 3; }
}

/* ---------- team: five leaders in one row, tutor names under the team photo ---------- */
/* leadership: three across, then two (left-aligned) */
/* six columns, each card spans two: three on the first row, the last two centered below */
.people.five { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-7) var(--space-6); }
.people.five > li { grid-column: span 2; }
.people.five > li:nth-child(4) { grid-column: 2 / span 2; }
.people.five > li:nth-child(5) { grid-column: 4 / span 2; }
.people.five .person h3 { font-size: var(--text-xl); margin-top: var(--space-4); }
.people.five .person p { font-size: var(--text-base); }
.people.five .person .label { font-size: var(--text-sm); }
/* tutors: small rectangular headshots in a dense grid, name under each */
.tutors {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-5) var(--space-4);
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none;
  text-align: center;
}
.tutors .tutor { font-family: var(--font-heading); font-size: var(--text-sm); line-height: 1.3; }
.tutors .tutor-face {
  width: 5.5rem;
  aspect-ratio: 4 / 5;
  height: auto;
  margin: 0 auto var(--space-2);
  padding: 0;
  border-radius: var(--radius-photo);
  object-fit: cover;
}
@media (max-width: 960px) {
  .tutors { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .people.five { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6) var(--space-4); }
  .people.five > li, .people.five > li:nth-child(4), .people.five > li:nth-child(5) { grid-column: auto; }
  .tutors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* footer credit: quieter than the copyright line (regular weight, softer color, a size smaller) */
.site-footer .copy span:last-child {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-xs);
  color: #e3e7dc;                        /* 4.5:1 on the sage band */
}
