/*
 * The public website. Every colour here comes from a custom property that
 * api/v1/site/theme.css.php sets from the school's theme, so changing the colours in
 * Admin → Website → Theme repaints the site without touching this file.
 *
 * The fallbacks are the shipped colours, so the site still looks right if the theme
 * stylesheet fails to load.
 */
.site-page {
  color: var(--site-body-text, #212529);
  background: var(--site-section-alt-bg, #fff);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-site {
  border-radius: var(--site-btn-radius, 6px);
  background: var(--site-btn-bg, #123a5e);
  border: 1px solid var(--site-btn-border, #123a5e);
  color: var(--site-btn-text, #fff);
  font-weight: 600;
  padding: .625rem 1.25rem;
}
.btn-site:hover, .btn-site:focus-visible {
  background: var(--site-primary-dark, #0d2b46);
  border-color: var(--site-primary-dark, #0d2b46);
  color: #fff;
}
.btn-site-cta {
  border-radius: var(--site-btn-radius, 6px);
  background: var(--site-cta-bg, #c8873b);
  border: 1px solid var(--site-cta-border, #c8873b);
  color: var(--site-cta-text, #1b1b1b);
  font-weight: 600;
  padding: .625rem 1.25rem;
}
.btn-site-cta:hover, .btn-site-cta:focus-visible { filter: brightness(.94); color: var(--site-cta-text, #1b1b1b); }
.btn-site-ghost {
  border-radius: var(--site-btn-radius, 6px);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .7);
  color: #fff;
  font-weight: 600;
  padding: .625rem 1.25rem;
}
.btn-site-ghost:hover, .btn-site-ghost:focus-visible { background: rgba(255, 255, 255, .14); color: #fff; }

/* ── Sections ────────────────────────────────────────────────────────────── */
.site-section { padding: clamp(2.5rem, 5vw, 4.5rem) 0; background: var(--site-section-alt-bg, #fff); }
.site-section.tone-tint { background: var(--site-section-bg, #f6f7f9); }
.site-section.tone-dark {
  background: linear-gradient(135deg, var(--site-primary, #123a5e) 0%, var(--site-primary-dark, #0d2b46) 100%);
  color: #fff;
}
.site-section.tone-dark .site-lead { color: rgba(255, 255, 255, .85); }
.site-section-head { max-width: 46rem; margin-bottom: 2rem; }
.site-section h2 { font-weight: 700; letter-spacing: -.01em; }
.site-lead { color: #5b6673; font-size: 1.0625rem; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.site-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 30rem;
  padding: clamp(3rem, 7vw, 6rem) 0;
  color: #fff;
  background: linear-gradient(135deg, var(--site-primary, #123a5e) 0%, var(--site-primary-dark, #0d2b46) 100%);
}
.site-hero.is-compact { min-height: 16rem; padding: clamp(2.5rem, 5vw, 4rem) 0; }
/* The photograph sits behind the text, darkened by the amount the school chose. */
.site-hero-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.site-hero-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--site-primary, #123a5e), var(--site-primary-dark, #0d2b46));
  opacity: var(--site-hero-overlay, .55);
}
.site-hero .container { position: relative; z-index: 1; }
.site-hero h1 {
  font-weight: 700;
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  text-wrap: balance;
  margin-bottom: 1rem;
}
.site-hero p { font-size: clamp(1rem, 1.5vw, 1.25rem); color: rgba(255, 255, 255, .88); max-width: 40rem; margin-bottom: 1.75rem; }
.site-hero.align-center { text-align: center; }
.site-hero.align-center p { margin-left: auto; margin-right: auto; }
.site-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.site-hero.align-center .site-hero-actions { justify-content: center; }

/* ── Statistics band ─────────────────────────────────────────────────────── */
.site-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 768px) { .site-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.site-stat {
  padding: 1.5rem 1rem;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, .07);
  border-radius: calc(var(--site-btn-radius, 6px) + 2px);
  background: var(--site-section-alt-bg, #fff);
}
.tone-dark .site-stat { border-color: rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .07); }
.site-stat-value {
  display: block;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--site-primary, #123a5e);
}
.tone-dark .site-stat-value { color: var(--site-accent, #c8873b); }
.site-stat-label { display: block; margin-top: .5rem; font-size: .875rem; color: #5b6673; }
.tone-dark .site-stat-label { color: rgba(255, 255, 255, .8); }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.site-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem; }
/* News: auto-fill, so one item stays a card rather than stretching across the row. */
.site-cards-fill { grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); }
.site-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: calc(var(--site-btn-radius, 6px) + 2px);
  background: var(--site-section-alt-bg, #fff);
  overflow: hidden;
  transition: box-shadow .15s ease, transform .15s ease;
}
.site-card:hover { box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .08); transform: translateY(-2px); }
.site-card-img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--site-section-bg, #f6f7f9); }
.site-card-body { padding: 1.5rem; flex: 1 1 auto; display: flex; flex-direction: column; }
.site-card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: .5rem; color: var(--site-primary, #123a5e); }
.site-card p { color: #5b6673; margin-bottom: 1rem; }
.site-card .site-card-link { margin-top: auto; font-weight: 600; color: var(--site-primary, #123a5e); text-decoration: none; }
.site-card .site-card-link:hover { text-decoration: underline; }
.site-card-tag {
  display: inline-block;
  align-self: flex-start;      /* the card body is a flex column, which would stretch it */
  margin-bottom: .5rem;
  padding: .15rem .6rem;
  border-radius: 999px;
  background: var(--site-section-bg, #f6f7f9);
  color: var(--site-primary, #123a5e);
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Rich text ───────────────────────────────────────────────────────────── */
.site-prose { max-width: 46rem; font-size: 1.0625rem; line-height: 1.7; }
.site-prose p { margin-bottom: 1.25rem; }
.site-prose p:last-child { margin-bottom: 0; }

/* ── Gallery ─────────────────────────────────────────────────────────────── */
.site-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; }
.site-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: calc(var(--site-btn-radius, 6px) + 2px);
  background: var(--site-section-bg, #f6f7f9);
}

/* ── Call to action ──────────────────────────────────────────────────────── */
.site-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.75rem, 3vw, 2.75rem);
  border-radius: calc(var(--site-btn-radius, 6px) + 4px);
  background: linear-gradient(135deg, var(--site-primary, #123a5e) 0%, var(--site-primary-dark, #0d2b46) 100%);
  color: #fff;
}
.site-cta h2 { margin-bottom: .25rem; }
.site-cta p { margin: 0; color: rgba(255, 255, 255, .85); }

/* ── Contact block ───────────────────────────────────────────────────────── */
.site-contact { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin: 0; }
.site-contact dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: #6c757d; }
.site-contact dd { margin: .25rem 0 0; font-size: 1.0625rem; }

/* ── News ────────────────────────────────────────────────────────────────── */
.site-news-meta { font-size: .8125rem; color: #6c757d; }
.site-article { max-width: 46rem; }
.site-article-hero { width: 100%; border-radius: calc(var(--site-btn-radius, 6px) + 2px); margin-bottom: 2rem; }

/* ── Header and footer ───────────────────────────────────────────────────── */
.navbar-school { background: var(--site-primary, #123a5e); }
footer.site-footer { background: var(--site-footer-bg, #0d2b46); }
.site-footer-brand { font-size: 1.125rem; font-weight: 600; color: #fff; }

/* A page still being written: only the office sees this, and only in a draft. */
.site-empty { padding: 4rem 0; text-align: center; color: #6c757d; }
