/* ==========================================================================
   Hampton CSS Framework
   ========================================================================== */

/*
   Table of Contents:

   1.  Design Tokens
   2.  Reset / Base
   3.  Typography
   4.  Layout
   5.  Components
       5.1  Buttons
       5.2  Forms
       5.3  Badges
       5.4  Cards
       5.5  Alerts
       5.6  Icons
       5.7  Section Headers
   6.  Navigation
   7.  Sections
       7.1  Hero
       7.2  Departments
       7.3  Story
       7.4  Testimonials
       7.5  Footer
       7.6  School News
       7.7  Contact Page
   8.  Animations
   9.  Utilities
   10. Responsive
*/

/* ==========================================================================
   1. Design Tokens
   ========================================================================== */

:root {
  /* -- Gray Palette -- */
  --md-gray-50: #fafafa;
  --md-gray-100: #f5f5f5;
  --md-gray-200: #eeeeee;
  --md-gray-300: #e0e0e0;
  --md-gray-400: #bdbdbd;
  --md-gray-500: #9e9e9e;
  --md-gray-600: #757575;
  --md-gray-700: #616161;
  --md-gray-800: #424242;
  --md-gray-900: #212121;

  /* -- Green Palette -- */
  --md-green-50: #e8f5e9;
  --md-green-200: #a5d6a7;
  --md-green-500: #4caf50;
  --md-green-600: #43a047;
  --md-green-800: #2e7d32;

  /* -- Red Palette -- */
  --md-red-50: #ffebee;
  --md-red-200: #ef9a99;
  --md-red-500: #f44336;
  --md-red-600: #e53935;
  --md-red-800: #c62828;

  /* -- Yellow -- */
  --md-yellow-500: #ffeb3b;

  /* -- Semantic aliases -- */
  --black: #111827;
  --white: #ffffff;
  --muted: var(--md-gray-700);
  --border: var(--md-gray-200);
  --soft: var(--md-gray-50);

  /* -- Layout -- */
  --container-width: 1320px;
  --header-height: 90px;

  /* -- Radii -- */
  --radius-button: 1rem;
  --radius-card: 1rem;
  --radius-hero: 1.25rem;

  /* -- Section Header -- */
  --section-header-max: 58rem;
  --section-eyebrow-color: var(--md-green-600);
  --section-heading-color: var(--black);
  --section-lead-color: var(--md-gray-700);
  --section-rule-color: var(--md-yellow-500);
}

/* ==========================================================================
   2. Reset / Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--black);
  background: var(--white);
  font-family: "Poppins", sans-serif;
  line-height: 1.5;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--md-green-500);
  outline-offset: 3px;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--black);
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
}

/* ==========================================================================
   4. Layout
   ========================================================================== */

.container {
  width: min(100% - 2rem, var(--container-width));
  margin-inline: auto;
}

.container-fluid {
  width: 100%;
}

.container-narrow {
  width: min(100% - 2rem, 1120px);
  margin-inline: auto;
}

.section {
  padding-block: 1rem;
}

.columns {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.column {
  flex: 1 1 0;
  min-width: 0;
}

/* ==========================================================================
   5. Components
   ========================================================================== */

/* ---- 5.1 Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.85rem 1.7rem;
  color: var(--white);
  background: var(--md-green-500);
  border: 2px solid var(--md-green-500);
  border-radius: var(--radius-button);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  color: var(--white);
  background: var(--md-green-600);
  border-color: var(--md-green-600);
}

.btn:active {
  transform: translateY(1px);
}

.btn-outline {
  color: var(--md-green-500);
  background: transparent;
  border-color: var(--md-green-500);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  color: var(--white);
  background: var(--md-green-500);
  border-color: var(--md-green-500);
}

.btn-primary {
  color: var(--white);
  background: var(--md-green-500);
  border-color: var(--md-green-500);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  color: var(--white);
  background: var(--md-green-600);
  border-color: var(--md-green-600);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--md-green-500);
  font-weight: 600;
  text-decoration: none;
}
/* ---- 5.2 Button Groups ---- */

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.button-group .btn {
  flex: 0 0 auto;
}

/* Small screens: stack and fill parent */
@media (max-width: 640px) {
  .button-group {
    flex-direction: column;
    align-items: stretch;
  }

  .button-group .btn {
    width: 100%;
  }
}

/* ---- 5.2 Forms ---- */

.form-field {
  display: grid;
  gap: 0.4rem;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--black);
}

.form-field .required {
  color: var(--md-red-800);
}

.form-control,
.form-control-select,
.form-control-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  color: var(--black);
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 0.75rem;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.form-control::placeholder,
.form-control-textarea::placeholder {
  color: var(--md-gray-400);
}

.form-control:focus,
.form-control-select:focus,
.form-control-textarea:focus {
  border-color: var(--md-green-500);
  box-shadow: 0 0 0 3px var(--md-green-50);
  outline: none;
}

.form-control-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23757575' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-control-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-control.is-invalid,
.form-control-select.is-invalid,
.form-control-textarea.is-invalid {
  border-color: var(--md-red-500);
}

.form-control.is-invalid:focus,
.form-control-select.is-invalid:focus,
.form-control-textarea.is-invalid:focus {
  border-color: var(--md-red-500);
  box-shadow: 0 0 0 3px var(--md-red-50);
}

/* ---- 5.3 Badges ---- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}

.badge-green {
  color: var(--white);
  background: var(--md-green-500);
}

.badge-yellow {
  color: #2e2a00;
  background: var(--md-yellow-500);
}

.badge-outline {
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--black);
}

/* ---- 5.4 Cards ---- */

.card {
  padding: 2rem;
  background: var(--white);
  border: 0;
  border-radius: var(--radius-card);
  box-shadow: none;
}
.card-icon-header {
  text-align: center;
  margin: 0 auto;
}
/* ---- 5.5 Alerts ---- */

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-card);
  font-size: 0.95rem;
  font-weight: 500;
}

.alert-success {
  color: var(--md-green-800);
  background: var(--md-green-50);
  border: 1px solid var(--md-green-200);
}

.alert-error {
  color: var(--md-red-800);
  background: var(--md-red-50);
  border: 1px solid var(--md-red-200);
}

/* ---- 5.6 Icons ---- */

.icon,
.icon-sm,
.icon-lg,
.icon-xl {
  display: inline-block;
  flex-shrink: 0;
  object-fit: contain;
}

.icon-sm {
  width: 2rem !important;
  height: 2rem !important;
}

.icon {
  width: 4rem !important;
  height: 4rem !important;
}

.icon-lg {
  width: 6rem !important;
  height: 6rem !important;
}
.icon-xl {
  width: 8.25rem !important;
  height: 8.25rem !important;
}
/* ---- 5.7 Section Headers ---- */

.section-header {
  max-width: var(--section-header-max);
  margin-inline: auto;
  text-align: center;
}

.section-header .eyebrow {
  margin: 0;
  color: var(--section-eyebrow-color);
  font-size: clamp(0.85rem, 1vw, 0.95rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-header-rule {
  display: block;
  width: 5rem;
  height: 0.5rem;
  margin: 1rem auto 1.6rem;
  border-radius: 2rem;
  background: var(--section-rule-color);
}

.section-header h2 {
  font-size: clamp(1.6rem, 3.2vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.section-header p:not(.eyebrow) {
  max-width: 48rem;
  margin: clamp(1.25rem, 3vw, 2rem) auto 0;
  color: var(--section-lead-color);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 400;
  line-height: 1.75;
}

/* Left-aligned variation */
.section-header-start {
  margin-inline: 0;
  text-align: left;
}

.section-header-start .section-header-rule {
  margin-inline: 0;
}

.section-header-start h2,
.section-header-start p:not(.eyebrow) {
  margin-inline: 0;
}

/* Smaller variation */
.section-header-sm {
  --section-header-max: 46rem;
}

.section-header-sm h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.8rem);
}

.section-header-sm p:not(.eyebrow) {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
}

/* ==========================================================================
   6. Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--white);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 1rem;
}

.site-brand {
  color: var(--md-green-500);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-button);
  font-weight: 600;
  cursor: pointer;
}

.site-nav {
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  padding: 1rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.site-nav.is-open {
  display: flex;
}

.site-nav a {
  color: var(--black);
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-button);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:not(.btn):hover,
.site-nav a:not(.btn):focus-visible {
  color: var(--md-green-600);
}

.site-nav .btn {
  color: var(--white);
  margin-top: 0.25rem;
}

/* ==========================================================================
   7. Sections
   ========================================================================== */

/* ---- 7.1 Hero ---- */

.hero {
  width: 100%;
  padding: 20px;
}

.hero-media {
  position: relative;
  width: 100%;
  max-height: 620px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-hero);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 5%;
  z-index: 2;
  width: min(100% - 2rem);
  text-align: center;
  transform: translate(-50%, -2%);
}

.hero-content h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
  text-wrap: balance;
}

.hero-content p {
  margin: 0.7rem 0 0;
  color: var(--md-yellow-500);
  font-size: 2rem;
  font-weight: 700;
}

.hero-content .btn {
  margin-top: 1.6rem;
  min-width: 180px;
}

/* ---- 7.2 Departments ---- */

.departments-section {
  background: var(--white);
}

.departments-section .container,
.story-section .container {
  overflow: hidden;
}

.departments-section .columns {
  gap: 0;
}

.department-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 0;
  border-radius: 0;
}

.department-card + .department-card {
  border-top: 1px solid var(--border);
}

.department-icon {
  width: 6rem;
  height: 6rem;
}

/* department-card uses base h2 */

.department-card p {
  max-width: 280px;
  margin-inline: auto;
  color: var(--black);
}

.department-card .btn-outline {
  margin-top: auto;
}

/* ---- 7.3 Story ---- */

.story-section {
  background: var(--white);
}

.story-content {
  margin-inline: auto;
  padding: 2rem;
}

.story-content h2 {
  color: var(--md-green-500);
}

.story-content p {
  margin: 1rem auto 0;
  color: var(--black);
}

.story-content .eyebrow {
  margin: 0 0 0.75rem;
  color: var(--md-green-600);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-content .lead {
  color: var(--black);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 600;
  line-height: 1.45;
}

.story-cta {
  font-weight: 600;
}

/* ---- 7.4 Testimonials ---- */

.testimonials-section {
  background: var(--white);
  padding-block: clamp(3rem, 6vw, 5rem);
}

.testimonials-section .section-header {
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.testimonials-section .columns {
  gap: clamp(2.5rem, 4vw, 4rem);
  padding: 0;
}

.testimonial {
  padding: 0;
}

.testimonial-quote {
  display: block;
  color: var(--md-yellow-500);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 1.25rem;
}

.testimonial p {
  margin: 0 0 1.25rem;
  color: var(--black);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.7;
}

.testimonial-author {
  display: block;
  color: var(--md-green-500);
  font-size: 0.92rem;
  font-weight: 600;
}

/* ---- 7.5 Footer ----
   Footer V2 styles at end of file. ---- */

/* ---- 7.6 School News ---- */

.news-page {
  padding-block: clamp(2rem, 5vw, 4.5rem) 5rem;
  background: var(--white);
}

.news-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}

.news-heading-line {
  display: grid;
  gap: 0.55rem;
  max-width: 100%;
}

.news-intro h1 em {
  color: var(--md-green-600);
  font-style: normal;
}

.news-intro p {
  max-width: 100%;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.08rem);
  line-height: 1.5;
}

.year-card {
  min-width: 180px;
  padding: 1rem;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.year-card label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.year-card select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.7rem;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  font: inherit;
  font-weight: 700;
}

.news-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
  border-bottom: 1px solid var(--border);
}

.term-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.term-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.8rem;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.term-link:hover,
.term-link.is-active {
  color: var(--md-green-800);
  background: var(--md-green-50);
  border-color: var(--md-green-200);
}

.news-count,
.news-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.news-list {
  display: grid;
}

.news-item {
  display: block;
  padding-block: clamp(1.8rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border);
}

.news-item:last-child {
  border-bottom: 0;
}

.story-cover {
  width: 100%;
  max-height: 520px;
  margin: 0 0 clamp(1.35rem, 3vw, 2rem);
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: clamp(1rem, 2vw, 1.35rem);
  aspect-ratio: 16 / 8.5;
}

.story-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-body {
  display: grid;
  align-content: start;
  gap: 0.75rem;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.news-title {
  margin: 0;
  color: var(--black);
  font-size: clamp(1.65rem, 4vw, 2.65rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.news-summary {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.16rem);
  line-height: 1.65;
}

.news-copy {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

.news-copy p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.35vw, 1.08rem);
  line-height: 1.75;
}

.news-body .text-link {
  width: fit-content;
  margin-top: 0.2rem;
}

.news-inline-image {
  width: 100%;
  margin: clamp(1rem, 3vw, 1.6rem) 0;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.news-inline-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ---- Fee Detection Notice ---- */

.fee-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--soft);
  border-radius: var(--radius-card);
}

.fee-notice[hidden] {
  display: none;
}

.fee-notice svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--md-yellow-600);
}

.fee-notice p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--black);
}

.fee-notice a {
  color: var(--md-green-500);
  font-weight: 600;
  text-decoration: none;
}

.fee-notice a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* ---- 7.7 Contact Page ---- */

.campuses-section {
  padding-block: clamp(2rem, 5vw, 3.5rem);
}

.campuses-heading {
  margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
}

.campuses-heading h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
}

.campuses-grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.campus-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.campus-map {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--soft);
}

.campus-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.campus-details {
  padding: clamp(1.25rem, 2vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.campus-details h2 {
  margin: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  font-weight: 600;
  line-height: 1.3;
}

.campus-details p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.campus-address {
  font-style: normal;
}

.campus-phone {
  color: var(--md-green-600);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.campus-phone:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.campus-hours {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.contact-section {
  padding-block: clamp(2rem, 5vw, 3.5rem);
}

.contact-heading {
  margin: 0 0 1.5rem;
}

.contact-heading h2 {
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.contact-heading > p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.form-submit {
  width: 100%;
  margin-top: 0.5rem;
}

.reply-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.reply-notice svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--md-green-500);
}

.weekend-note {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
}

.form-email-fallback {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.form-email-fallback a {
  color: var(--md-green-600);
  font-weight: 600;
  text-decoration: none;
}

.form-email-fallback a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* ==========================================================================
   8. Animations
   ========================================================================== */

/* ---- 8.1 Count Up ---- */

.count-up {
  display: inline-block;
  color: var(--md-yellow-500);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition:
    transform 220ms ease,
    color 220ms ease;
}

.count-up.is-counting {
  transform: translateY(-0.08em) scale(1.08);
}

.count-up.has-counted {
  transform: none;
}

/* ---- 8.2 Lazy Load ---- */

.lazy-frame {
  position: relative;
  overflow: hidden;
  background: var(--md-gray-100);
}

.lazy-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.8) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: lazy-shimmer 1.2s ease-in-out infinite;
}

.lazy-frame.is-loaded::before {
  display: none;
}

.lazy-frame > img,
.lazy-frame > iframe,
.lazy-frame > .lazy-content {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
}

.lazy-frame img,
.lazy-frame iframe,
.lazy-frame .lazy-content {
  opacity: 0;
  transition: opacity 220ms ease;
}

.lazy-frame.is-loaded img,
.lazy-frame.is-loaded iframe,
.lazy-frame.is-loaded .lazy-content {
  opacity: 1;
}

@keyframes lazy-shimmer {
  to {
    transform: translateX(100%);
  }
}

/* ==========================================================================
   9. Utilities
   ========================================================================== */

/* ---- 9.1 Spacing ---- */

.m-0 {
  margin: 0 !important;
}
.m-1 {
  margin: 0.25rem !important;
}
.m-2 {
  margin: 0.5rem !important;
}
.m-3 {
  margin: 1rem !important;
}
.m-4 {
  margin: 1.5rem !important;
}
.m-5 {
  margin: 3rem !important;
}

.mt-0 {
  margin-top: 0 !important;
}
.mt-1 {
  margin-top: 0.25rem !important;
}
.mt-2 {
  margin-top: 0.5rem !important;
}
.mt-3 {
  margin-top: 1rem !important;
}
.mt-4 {
  margin-top: 1.5rem !important;
}
.mt-5 {
  margin-top: 3rem !important;
}

.mr-0 {
  margin-right: 0 !important;
}
.mr-1 {
  margin-right: 0.25rem !important;
}
.mr-2 {
  margin-right: 0.5rem !important;
}
.mr-3 {
  margin-right: 1rem !important;
}
.mr-4 {
  margin-right: 1.5rem !important;
}
.mr-5 {
  margin-right: 3rem !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}
.mb-1 {
  margin-bottom: 0.25rem !important;
}
.mb-2 {
  margin-bottom: 0.5rem !important;
}
.mb-3 {
  margin-bottom: 1rem !important;
}
.mb-4 {
  margin-bottom: 1.5rem !important;
}
.mb-5 {
  margin-bottom: 3rem !important;
}

.ml-0 {
  margin-left: 0 !important;
}
.ml-1 {
  margin-left: 0.25rem !important;
}
.ml-2 {
  margin-left: 0.5rem !important;
}
.ml-3 {
  margin-left: 1rem !important;
}
.ml-4 {
  margin-left: 1.5rem !important;
}
.ml-5 {
  margin-left: 3rem !important;
}

.mx-0 {
  margin-inline: 0 !important;
}
.mx-1 {
  margin-inline: 0.25rem !important;
}
.mx-2 {
  margin-inline: 0.5rem !important;
}
.mx-3 {
  margin-inline: 1rem !important;
}
.mx-4 {
  margin-inline: 1.5rem !important;
}
.mx-5 {
  margin-inline: 3rem !important;
}
.mx-auto {
  margin-inline: auto !important;
}

.my-0 {
  margin-block: 0 !important;
}
.my-1 {
  margin-block: 0.25rem !important;
}
.my-2 {
  margin-block: 0.5rem !important;
}
.my-3 {
  margin-block: 1rem !important;
}
.my-4 {
  margin-block: 1.5rem !important;
}
.my-5 {
  margin-block: 3rem !important;
}

.p-0 {
  padding: 0 !important;
}
.p-1 {
  padding: 0.25rem !important;
}
.p-2 {
  padding: 0.5rem !important;
}
.p-3 {
  padding: 1rem !important;
}
.p-4 {
  padding: 1.5rem !important;
}
.p-5 {
  padding: 3rem !important;
}

.pt-0 {
  padding-top: 0 !important;
}
.pt-1 {
  padding-top: 0.25rem !important;
}
.pt-2 {
  padding-top: 0.5rem !important;
}
.pt-3 {
  padding-top: 1rem !important;
}
.pt-4 {
  padding-top: 1.5rem !important;
}
.pt-5 {
  padding-top: 3rem !important;
}

.pr-0 {
  padding-right: 0 !important;
}
.pr-1 {
  padding-right: 0.25rem !important;
}
.pr-2 {
  padding-right: 0.5rem !important;
}
.pr-3 {
  padding-right: 1rem !important;
}
.pr-4 {
  padding-right: 1.5rem !important;
}
.pr-5 {
  padding-right: 3rem !important;
}

.pb-0 {
  padding-bottom: 0 !important;
}
.pb-1 {
  padding-bottom: 0.25rem !important;
}
.pb-2 {
  padding-bottom: 0.5rem !important;
}
.pb-3 {
  padding-bottom: 1rem !important;
}
.pb-4 {
  padding-bottom: 1.5rem !important;
}
.pb-5 {
  padding-bottom: 3rem !important;
}

.pl-0 {
  padding-left: 0 !important;
}
.pl-1 {
  padding-left: 0.25rem !important;
}
.pl-2 {
  padding-left: 0.5rem !important;
}
.pl-3 {
  padding-left: 1rem !important;
}
.pl-4 {
  padding-left: 1.5rem !important;
}
.pl-5 {
  padding-left: 3rem !important;
}

.px-0 {
  padding-inline: 0 !important;
}
.px-1 {
  padding-inline: 0.25rem !important;
}
.px-2 {
  padding-inline: 0.5rem !important;
}
.px-3 {
  padding-inline: 1rem !important;
}
.px-4 {
  padding-inline: 1.5rem !important;
}
.px-5 {
  padding-inline: 3rem !important;
}

.py-0 {
  padding-block: 0 !important;
}
.py-1 {
  padding-block: 0.25rem !important;
}
.py-2 {
  padding-block: 0.5rem !important;
}
.py-3 {
  padding-block: 1rem !important;
}
.py-4 {
  padding-block: 1.5rem !important;
}
.py-5 {
  padding-block: 3rem !important;
}

/* ---- 9.2 Text ---- */

.text-left {
  text-align: left !important;
}
.text-center {
  text-align: center !important;
}
.text-right {
  text-align: right !important;
}

.text-balance {
  text-wrap: balance;
}

.text-xs {
  font-size: 0.75rem !important;
}
.text-sm {
  font-size: 0.875rem !important;
}
.text-base {
  font-size: 1rem !important;
}
.text-lg {
  font-size: 1.125rem !important;
}
.text-xl {
  font-size: 1.25rem !important;
}
.text-2xl {
  font-size: 1.5rem !important;
}
.text-3xl {
  font-size: 1.875rem !important;
}
.text-4xl {
  font-size: 2.25rem !important;
}
.text-5xl {
  font-size: 3rem !important;
}

/* ---- 9.3 Font Weight ---- */

.fw-normal {
  font-weight: 400 !important;
}
.fw-medium {
  font-weight: 500 !important;
}
.fw-semibold {
  font-weight: 600 !important;
}
.fw-bold {
  font-weight: 700 !important;
}

/* ---- 9.4 Colors ---- */

.text-black {
  color: var(--black) !important;
}
.text-white {
  color: var(--white) !important;
}
.text-green {
  color: var(--md-green-500) !important;
}
.text-muted {
  color: var(--muted) !important;
}

/* ---- 9.5 Background ---- */

.bg-white {
  background: var(--white) !important;
}
.bg-soft {
  background: var(--soft) !important;
}
.bg-green {
  background: var(--md-green-500) !important;
}

/* ---- 9.6 Display / Flex ---- */

.d-flex {
  display: flex !important;
}
.flex-column {
  flex-direction: column !important;
}
.align-center {
  align-items: center !important;
}
.justify-center {
  justify-content: center !important;
}

/* ---- 9.7 Grid ---- */

.grid {
  display: grid !important;
}
.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}
.grid-auto-sm {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}
.grid-auto-lg {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.gap-0 {
  gap: 0 !important;
}
.gap-1 {
  gap: 0.5rem !important;
}
.gap-2 {
  gap: 1rem !important;
}
.gap-3 {
  gap: 1.5rem !important;
}
.gap-4 {
  gap: 2rem !important;
}

/* ---- 9.8 Accessibility ---- */

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

/* ==========================================================================
   10. Responsive
   ========================================================================== */

/* ---- 10.1 Breakpoint: 640px (contact form) ---- */

@media (min-width: 640px) {
  .contact-form {
    grid-template-columns: 1fr 1fr;
  }

  .form-field-full,
  .form-submit,
  .reply-notice,
  .weekend-note,
  .form-email-fallback,
  .alert {
    grid-column: 1 / -1;
  }
}

/* ---- 10.2 Breakpoint: 768px (columns, campuses) ---- */

@media (min-width: 768px) {
  .columns {
    flex-direction: row;
  }

  .department-card + .department-card {
    border-top: 0;
    border-left: 1px solid var(--border);
  }

  .campuses-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---- 10.3 Breakpoint: 1100px (desktop nav) ---- */

@media (min-width: 1100px) {
  .header-inner {
    padding-inline: 1.5rem;
  }

  .menu-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    padding: 0;
    background: transparent;
    border-bottom: 0;
  }

  .site-nav a {
    padding: 0;
  }

  .site-nav .btn {
    margin-top: 0;
    padding: 0.85rem 1.4rem;
  }
}

/* ---- 10.4 Breakpoint: max-width 820px ---- */

@media (max-width: 820px) {
  .news-intro {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .year-card {
    min-width: 0;
  }

  .news-filter-row {
    align-items: flex-start;
  }

  .story-cover {
    aspect-ratio: 16 / 10;
    max-height: none;
  }

  .news-body {
    max-width: none;
  }
}

/* ---- 10.5 Breakpoint: max-width 700px (hero) ---- */

@media (max-width: 700px) {
  :root {
    --radius-hero: 1.5rem;
  }

  .hero {
    padding: 12px;
  }

  .hero-media {
    aspect-ratio: auto;
    height: min(78vh, 620px);
    min-height: 520px;
  }

  .hero-content {
    bottom: 7%;
    width: min(100% - 1.5rem, 620px);
  }

  .hero-content h1 {
    font-size: clamp(2rem, 9vw, 3rem);
    line-height: 1.08;
  }

  .hero-content p {
    font-size: clamp(1.05rem, 5vw, 1.45rem);
    line-height: 1.2;
  }

  .hero-content .btn {
    min-width: 0;
    min-height: 2.85rem;
    margin-top: 1.15rem;
    padding: 0.8rem 1.4rem;
    font-size: 1rem;
  }
}

/* ---- 10.6 Breakpoint: max-width 520px ---- */

@media (max-width: 520px) {
  .container-narrow {
    width: min(100% - 1.25rem, 1120px);
  }

  .news-page {
    padding-block: 1.5rem 3.5rem;
  }

  .news-intro,
  .news-filter-row {
    padding-bottom: 0.9rem;
  }

  .term-link {
    min-height: 2.15rem;
    padding-inline: 0.7rem;
  }

  .story-cover {
    border-radius: 0.85rem;
  }

  .news-title {
    letter-spacing: -0.035em;
  }
}

/* ---- 10.7 Breakpoint: max-width 420px ---- */

@media (max-width: 420px) {
  .hero-media {
    min-height: 560px;
  }

  .hero-content h1 {
    font-size: clamp(1.85rem, 10vw, 2.45rem);
  }

  .hero-content p {
    font-size: 1.05rem;
  }
}

/* ---- 10.8 Breakpoint: max-width 640px (section headers) ---- */

@media (max-width: 40rem) {
  .section-header h2 {
    letter-spacing: -0.04em;
  }

  .section-header p:not(.eyebrow) {
    line-height: 1.65;
  }

  .section-header-rule {
    width: 4rem;
    height: 0.4rem;
  }
}

/* ---- 10.9 Reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }

  .count-up {
    transition: none;
  }

  .count-up.is-counting {
    transform: none;
  }

  .lazy-frame::before {
    animation: none;
  }
}

/* FAQ card */
.stack {
  display: grid;
}

.stack.gap-1 {
  gap: 1rem;
}

/* FAQ accordion boxes */
.stack.gap-1 > details {
  display: block;
  background: #fff;
  border: 1px solid var(--md-gray-100);
  border-radius: var(--radius-card);
  overflow: clip;

  transition:
    border-color 240ms cubic-bezier(0.2, 0, 0, 1),
    background-color 240ms cubic-bezier(0.2, 0, 0, 1);
}

/* Open FAQ item */
.stack.gap-1 > details[open] {
  border: 3px solid var(--md-green-500);
}

/* FAQ question */
.stack.gap-1 > details > summary {
  list-style: none;
  cursor: pointer;

  padding: 1rem;
  color: #000;

  font-size: clamp(1rem, 4vw, 1.15rem);
  font-weight: 700;
  line-height: 1.3;

  outline: none;
}

/* Remove browser default accordion icons */
.stack.gap-1 > details > summary::-webkit-details-marker {
  display: none;
}

.stack.gap-1 > details > summary::marker {
  content: "";
}

/* Keyboard focus */
.stack.gap-1 > details > summary:focus-visible {
  border-radius: calc(var(--radius-card) - 2px);
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--md-green-500) 28%, transparent);
}

/* FAQ answer */
.stack.gap-1 > details > p {
  margin: 0;
  padding: 0 1rem 1rem;

  color: #000;
  font-size: clamp(0.95rem, 3.7vw, 1.05rem);
  line-height: 1.65;
}

/* Smooth open / close animation */
.stack.gap-1 > details::details-content {
  block-size: 0;
  overflow: hidden;

  transition:
    block-size 260ms cubic-bezier(0.2, 0, 0, 1),
    content-visibility 260ms cubic-bezier(0.2, 0, 0, 1);

  transition-behavior: allow-discrete;
}

.stack.gap-1 > details[open]::details-content {
  block-size: auto;
}

/* Hover polish */
@media (hover: hover) {
  .stack.gap-1 > details:hover {
    border-color: var(--md-gray-100);
  }

  .stack.gap-1 > details[open]:hover {
    border-color: var(--md-green-500);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .stack.gap-1 > details,
  .stack.gap-1 > details::details-content {
    transition: none;
  }
}

/* ------------------------------------------------------------------ */
/*  Gallery Modal — Mixed ratio, responsive, animated dimmer          */
/* ------------------------------------------------------------------ */

.hs-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
  pointer-events: none;
}

.hs-gallery-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hs-gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: zoom-out;
}

.hs-gallery-box {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.hs-gallery-stage {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* THE FOUR LINES THAT HANDLE EVERY RATIO */
.hs-gallery-image {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
  border-radius: 4px;
}

.hs-gallery-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  padding: 0.5rem 1rem;
  font-family: inherit;
  transition: color 0.15s ease;
}

.hs-gallery-close:hover {
  color: #fff;
}

.hs-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 1rem;
  line-height: 1;
  font-family: inherit;
  user-select: none;
  transition: color 0.15s ease;
}

.hs-gallery-nav:hover {
  color: #fff;
}
.hs-gallery-prev {
  left: 1rem;
}
.hs-gallery-next {
  right: 1rem;
}

.hs-gallery-modal.is-single .hs-gallery-nav {
  display: none;
}

.hs-gallery-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

/* Mobile */
@media (max-width: 640px) {
  .hs-gallery-box {
    padding: 0.5rem;
  }
  .hs-gallery-image {
    max-width: calc(100vw - 1rem);
    max-height: 78vh;
  }
  .hs-gallery-nav {
    font-size: 2.5rem;
    padding: 0.5rem;
  }
  .hs-gallery-prev {
    left: 0.25rem;
  }
  .hs-gallery-next {
    right: 0.25rem;
  }
  .hs-gallery-close {
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.75rem;
  }
  .hs-gallery-counter {
    bottom: 1rem;
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   Visibility Utilities (Foundation-style)
   ========================================================================== */

/* ---- Show only on small (< 768px) ---- */
.show-for-small-only,
.show-for-small {
  display: block !important;
}

.hide-for-small-only,
.hide-for-small {
  display: none !important;
}

/* ---- Show only on medium (768px - 1099px) ---- */
.show-for-medium-only,
.show-for-medium {
  display: none !important;
}

.hide-for-medium-only,
.hide-for-medium {
  display: block !important;
}

/* ---- Show only on large (≥ 1100px) ---- */
.show-for-large-only,
.show-for-large {
  display: none !important;
}

.hide-for-large-only,
.hide-for-large {
  display: block !important;
}

/* ---- Breakpoint: 768px ---- */

@media (min-width: 768px) {
  .show-for-small-only,
  .show-for-small {
    display: none !important;
  }

  .hide-for-small-only,
  .hide-for-small {
    display: block !important;
  }

  .show-for-medium-only,
  .show-for-medium {
    display: block !important;
  }

  .hide-for-medium-only,
  .hide-for-medium {
    display: none !important;
  }
}

/* ---- Breakpoint: 1100px ---- */

@media (min-width: 1100px) {
  .show-for-medium-only {
    display: none !important;
  }

  .hide-for-medium-only {
    display: block !important;
  }

  .show-for-large-only,
  .show-for-large {
    display: block !important;
  }

  .hide-for-large-only,
  .hide-for-large {
    display: none !important;
  }
}

/* ==========================================================================
   Footer V2
   ========================================================================== */

.site-footer {
  padding-block: 0;
  background: #fafafa;
  border-top: 1px solid var(--border);
  text-align: left;
}

.footer-inner {
  padding: clamp(2.5rem, 5vw, 4rem) 1rem;
}

.footer-main {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}

/* Brand */

.footer-brand {
  max-width: 320px;
}

.footer-brand .site-brand {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: clamp(1.35rem, 3vw, 1.6rem);
}

.footer-brand p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* Columns */

.footer-columns {
  display: grid;
  gap: 2.5rem;
}

.footer-column h3 {
  margin: 0 0 1.1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
}

.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.footer-column a {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 150ms ease;
}

.footer-column a:hover {
  color: var(--md-green-600);
}

/* Contact info */

.footer-contact-info {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.footer-contact-info li {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.footer-contact-info a {
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms ease;
}

.footer-contact-info a:hover {
  color: var(--md-green-600);
}

.footer-contact-info .label {
  display: block;
  font-size: 0.78rem;
  color: var(--md-gray-400);
  margin-top: 0.15rem;
}

/* Social */

.footer-social-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.footer-social-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-social-list svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  color: var(--md-green-500);
}

/* Legal bar */

.footer-legal {
  padding: 1.25rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.footer-legal p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-legal nav {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.footer-legal a {
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--md-green-600);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.footer-legal .sep {
  color: var(--md-gray-300);
}

/* Mobile sticky CTA */

.footer-mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 0.75rem 1rem;
  background: var(--white);
  border-top: 1px solid var(--border);
}

.footer-mobile-cta .btn {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
}

/* Responsive */

@media (min-width: 768px) {
  .footer-main {
    grid-template-columns: minmax(0, 320px) 1fr;
    align-items: start;
  }

  .footer-columns {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .footer-mobile-cta {
    display: none;
  }

  .footer-legal {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
