/* Jupe Hills Pre & Primary School — one stylesheet, no framework.
   Tokens come from the school's own logo and uniform (see DESIGN.md). */

/* ---------- fonts (self-hosted, latin subsets) ---------- */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-var.woff2") format("woff2");
  font-weight: 700 800;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* ---------- tokens ---------- */

:root {
  --maroon: #7c2130; /* uniform shirts, logo lettering */
  --maroon-dark: #611a26;
  --navy: #1f2c47; /* logo ring — body ink */
  --sky: #5babd9; /* tracksuits — accents only, never text on light */
  --sky-wash: #eaf4fa; /* section background */
  --gold: #f2a93b; /* logo sunburst */
  --paper: #fbfaf7;
  --link: #1d6fa5; /* sky darkened to pass 4.5:1 on paper */
  --on-navy-soft: #d6e4f0; /* lede text on navy */
  --on-navy-mute: #c9d6e4; /* footer body on navy */
  --caption: #5b6b80; /* figcaptions on sky-wash, 4.88:1 */

  --font-display: "Bricolage Grotesque", system-ui, "Segoe UI", sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, "Segoe UI", sans-serif;

  --shell: 1100px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-pad: clamp(2.25rem, 6vw, 4.25rem);

  /* the uniform stripe: sky / white / sky, like the tracksuit sleeve */
  --stripe: linear-gradient(
    to bottom,
    var(--sky) 0 33.4%,
    #fff 33.4% 66.7%,
    var(--sky) 66.7% 100%
  );
}

/* ---------- reset-ish ---------- */

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.6;
  color: var(--navy);
  background: var(--paper);
  text-size-adjust: 100%;
}

body,
a,
p,
address,
td,
th {
  overflow-wrap: anywhere;
}

img {
  max-inline-size: 100%;
  block-size: auto;
  display: block;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  margin-block: 0 0.6em;
  text-wrap: balance;
}

p {
  margin-block: 0 1em;
}

a {
  color: var(--link);
}

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
  border-radius: 2px;
}

.on-dark :focus-visible,
.hero :focus-visible {
  outline-color: var(--gold);
}

.skip-link {
  position: absolute;
  inset-block-start: -3rem;
  inset-inline-start: 1rem;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 6px 6px;
}

.skip-link:focus {
  inset-block-start: 0;
}

.shell {
  max-inline-size: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-pad);
}

.section--wash {
  background: var(--sky-wash);
}

/* the uniform stripe as a section-heading underline */
.section-title::after {
  content: "";
  display: block;
  inline-size: 4.5rem;
  block-size: 9px;
  margin-block-start: 0.5rem;
  background: var(--stripe);
  border-radius: 2px;
}

.section-kicker {
  font-weight: 700;
  color: var(--maroon);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-block-end: 0.4rem;
}

.measure {
  max-inline-size: 68ch;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-block-size: 48px;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.btn svg {
  flex: none;
}

.btn--solid {
  background: var(--maroon);
  color: #fff;
}

.btn--solid:hover {
  background: var(--maroon-dark);
}

/* outline pair for dark surfaces (hero scrim, footer) */
.btn--ghost {
  border-color: #fff;
  color: #fff;
}

.btn--ghost:hover {
  background: rgb(255 255 255 / 0.12);
}

/* outline pair for light surfaces */
.btn--outline {
  border-color: var(--maroon);
  color: var(--maroon);
}

.btn--outline:hover {
  background: rgb(124 33 48 / 0.08);
}

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

.btn[disabled],
.btn.is-disabled,
.btn.is-loading {
  cursor: not-allowed;
  opacity: 0.62;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  inline-size: 1em;
  block-size: 1em;
  border: 2px solid currentcolor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: button-spin 0.7s linear infinite;
}

@keyframes button-spin {
  to {
    transform: rotate(1turn);
  }
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  background: #fff;
  border-block-end: 1px solid rgb(31 44 71 / 0.1);
}

.site-header::after {
  /* the uniform stripe under the header */
  content: "";
  display: block;
  block-size: 6px;
  background: var(--stripe);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  block-size: 70px;
  gap: 0.5rem;
  padding-block: 0;
}

.site-header.is-scrolled .header-bar {
  padding-block: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 0 0 auto;
  min-inline-size: max-content;
  text-decoration: none;
  color: var(--navy);
}

.brand img {
  flex: 0 0 auto;
  block-size: 44px;
  inline-size: auto;
  transition: block-size 0.2s ease;
}

.site-header.is-scrolled .brand img {
  block-size: 36px;
}

.brand-name {
  display: block;
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.2;
  color: var(--navy);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-inline-start: auto;
  gap: 0.75rem;
  white-space: nowrap;
}

.site-nav a {
  flex: 0 0 auto;
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.5rem 0.05rem;
  white-space: nowrap;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  color: #1e6fba;
  box-shadow: 0 3px 0 #1e6fba;
}

.menu-toggle {
  display: none;
  inline-size: 44px;
  block-size: 44px;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  block-size: 2px;
  background: currentcolor;
  margin-block: 5px;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (width >= 1200px) {
  .header-bar {
    max-inline-size: 1320px;
    gap: 0.75rem;
  }

  .brand-name {
    font-size: 0.95rem;
  }

  .site-nav {
    gap: 1rem;
  }

  .site-nav a {
    font-size: 0.925rem;
  }
}

@media (width <= 1120px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    z-index: 53;
    inset: 76px 0 auto;
    display: none;
    padding: 1rem max(var(--gutter), env(safe-area-inset-left))
      max(1.5rem, env(safe-area-inset-bottom))
      max(var(--gutter), env(safe-area-inset-right));
    background: #fff;
    border-block-end: 6px solid var(--sky);
    box-shadow: 0 12px 24px rgb(31 44 71 / 0.18);
    max-block-size: calc(100dvh - 76px);
    overflow-y: auto;
    margin-inline-start: 0;
    white-space: normal;
  }

  .site-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-nav a {
    min-block-size: 44px;
    padding: 0.7rem;
    border-radius: 6px;
    white-space: normal;
  }

  body.menu-open {
    overflow: hidden;
  }

  .menu-backdrop {
    position: fixed;
    z-index: 52;
    inset: 76px 0 0;
    display: none;
    background: rgb(10 25 47 / 0.58);
  }

  .menu-backdrop.is-open {
    display: block;
  }
}

@media (width >= 1121px) {
  .menu-backdrop {
    display: none !important;
  }
}

@media (width <= 520px) {
  .site-nav.is-open {
    grid-template-columns: 1fr;
  }
}

@media (width <= 768px) {
  .brand-name {
    display: none; /* logo only on mobile; link keeps its aria-label for screen readers */
  }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  display: grid;
  min-block-size: clamp(500px, 88svh, 760px);
  background: var(--navy);
}

.hero picture,
.hero-photo {
  position: absolute;
  inset: 0;
}

.hero-photo {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-content {
  position: relative;
  align-self: end;
  inline-size: 100%;
  padding-block: 5rem 2.5rem;
  background: linear-gradient(
    to top,
    rgb(31 44 71 / 0.96) 0%,
    rgb(31 44 71 / 0.82) 55%,
    rgb(31 44 71 / 0) 100%
  );
  color: #fff;
}

.hero h1 {
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.9rem, 1.3rem + 3.2vw, 3.2rem);
  margin-block-end: 0.2em;
}

.hero-motto {
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 1rem + 0.6vw, 1.35rem);
  margin-block-end: 0.5rem;
}

.hero-lede {
  color: var(--on-navy-soft);
  max-inline-size: 46ch;
  margin-block-end: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (height <= 500px) and (orientation: landscape) {
  .hero {
    min-block-size: calc(100svh - 76px);
  }

  .hero-content {
    padding-block: 1.5rem 0.75rem;
  }

  .hero-motto {
    display: none;
  }

  .hero h1 {
    font-size: clamp(1.45rem, 5vw, 2rem);
  }

  .hero-lede {
    margin-block-end: 0.6rem;
  }

  .hero .btn {
    min-block-size: 44px;
    padding-block: 0.4rem;
  }
}

/* ---------- at a glance ---------- */

.glance {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem var(--gutter);
}

.glance div {
  border-block-start: 3px solid var(--sky);
  padding-block-start: 0.6rem;
}

.glance dt {
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.glance dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.8rem);
  color: var(--maroon);
}

@media (width >= 720px) {
  .glance {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ---------- about / split ---------- */

.split {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.split figure {
  margin: 0;
}

.split img {
  border-radius: 10px;
}

figcaption {
  font-size: 0.9rem;
  color: var(--caption);
  padding-block-start: 0.5rem;
}

@media (width >= 820px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

/* ---------- motto band (once) ---------- */

.motto-band {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
  text-align: center;
  padding-block: clamp(3rem, 8vw, 5rem);
}

.motto-band .sunburst {
  position: absolute;
  inset-inline-start: 50%;
  inset-block-start: 50%;
  inline-size: min(140vw, 1100px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  opacity: 0.1;
  pointer-events: none;
}

.motto-band p {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 1.2rem + 4vw, 3.4rem);
  line-height: 1.15;
  text-wrap: balance;
}

.motto-band .gold {
  color: var(--gold);
}

.motto-band .attribution {
  position: relative;
  margin-block-start: 1rem;
  color: var(--on-navy-soft);
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 400;
}

/* ---------- programmes ---------- */

.cards {
  display: grid;
  gap: 1.25rem;
}

.card {
  background: #fff;
  border-radius: 10px;
  border-block-start: 4px solid var(--maroon);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgb(31 44 71 / 0.08);
}

.card h3 {
  margin-block-end: 0.2em;
}

.card .ages {
  color: var(--maroon);
  font-weight: 700;
  margin-block-end: 0.75rem;
}

.card p:last-child {
  margin-block-end: 0;
}

@media (width >= 720px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .cards--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- uniforms ---------- */

.uniform-grid {
  display: grid;
  gap: 1.5rem;
  margin-block: 2rem 1rem;
}

.uniform-card {
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 16px rgb(31 44 71 / 0.09);
}

.uniform-card img {
  inline-size: 100%;
  block-size: clamp(300px, 45vw, 520px);
  object-fit: contain;
  background: var(--sky-wash);
}

.uniform-card__body {
  padding: 1.4rem;
}

.uniform-card__body p:last-child {
  margin-block-end: 0;
}

@media (width >= 760px) {
  .uniform-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- photo strip ---------- */

.strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;

  /* full-bleed: let the strip run edge to edge while text stays in the shell */
  margin-inline: calc(50% - 50vw);
  padding-inline: calc(50vw - 50%);
  padding-block-end: 1rem;
}

.strip figure {
  flex: 0 0 min(78vw, 340px);
  margin: 0;
  scroll-snap-align: center;
}

.strip img {
  inline-size: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 8px;
}

.strip .is-tall img {
  aspect-ratio: 2 / 3;
}

.strip .is-tall {
  flex-basis: min(52vw, 226px);
}

.strip-more {
  font-weight: 700;
}

/* ---------- visit ---------- */

.visit-grid {
  display: grid;
  gap: 2rem;
}

.visit-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.visit-list li {
  padding-block: 0.55rem;
  border-block-end: 1px solid rgb(31 44 71 / 0.12);
}

.visit-list strong {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.map-frame {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--sky-wash);
  min-block-size: 300px;
}

.map-frame iframe {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  border: 0;
}

.location-pending {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  max-inline-size: 760px;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid rgb(31 44 71 / 0.14);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(31 44 71 / 0.08);
}

.location-pending__icon {
  color: var(--link);
}

.location-pending address {
  margin-block-end: 1rem;
  font-style: normal;
  font-weight: 700;
}

.map-link {
  display: inline-block;
  margin-block-start: 0.5rem;
}

@media (width >= 820px) {
  .visit-grid {
    grid-template-columns: 2fr 3fr;
  }
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--navy);
  color: var(--on-navy-mute);
  margin-block-start: var(--section-pad);
}

.home-page .site-footer {
  margin-block-start: 0;
}

.site-footer::before {
  /* the uniform stripe as the footer's top edge */
  content: "";
  display: block;
  block-size: 9px;
  background: var(--stripe);
}

.break-anywhere {
  overflow-wrap: anywhere;
}

/* upper contact row */
.footer-contact-row {
  display: flex;
  flex-direction: column;
  padding-block: 1.75rem;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-block: 1.25rem;
  min-inline-size: 0;
}

.footer-contact-item + .footer-contact-item {
  border-block-start: 1px solid rgb(255 255 255 / 0.12);
}

.footer-contact-icon {
  display: grid;
  place-items: center;
  inline-size: 3rem;
  block-size: 3rem;
  flex-shrink: 0;
  border: 1px solid rgb(255 255 255 / 0.4);
  border-radius: 50%;
  color: #fff;
}

.footer-contact-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-inline-size: 0;
}

.footer-contact-label {
  font-size: 0.8rem;
  color: var(--on-navy-mute);
}

.footer-contact-value {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  text-decoration: none;
}

a.footer-contact-value:hover {
  text-decoration: underline;
}

.footer-contact-value:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (width >= 720px) {
  .footer-contact-row {
    flex-direction: row;
  }

  .footer-contact-item {
    flex: 1;
    justify-content: center;
    padding-block: 0.5rem;
    padding-inline: 2rem;
  }

  .footer-contact-item + .footer-contact-item {
    border-block-start: none;
    border-inline-start: 1px solid rgb(255 255 255 / 0.15);
  }
}

/* lower copyright bar */
.footer-legal {
  background: rgb(0 0 0 / 0.22);
  text-align: center;
  padding-block: 1rem;
  font-size: 0.85rem;
}

.footer-legal p {
  margin: 0;
}

/* ---------- gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  grid-auto-flow: dense;
  container-type: inline-size;
}

.gallery-grid > div {
  min-inline-size: 0;
}

.gallery-grid a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: var(--sky-wash);
  box-shadow: 0 3px 14px rgb(31 44 71 / 0.12);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.gallery-grid a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgb(31 44 71 / 0.18);
}

.gallery-grid a:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 3px;
}

.gallery-grid img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.gallery-grid .is-tall img {
  aspect-ratio: auto;
}

@media (width >= 720px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: calc((100cqi - 1rem) / 3);
    gap: 1rem;
  }

  .gallery-grid .is-large {
    grid-column: span 2;
    grid-row: span 2;
  }

  .gallery-grid .is-tall {
    grid-row: span 2;
  }

  .gallery-grid a,
  .gallery-grid img {
    block-size: 100%;
  }
}

@media (width >= 1080px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: calc((100cqi - 3rem) / 6);
  }
}

/* ---------- lightbox ---------- */

.lightbox {
  border: 0;
  padding: 0;
  inline-size: 100%;
  block-size: 100%;
  max-inline-size: 100vw;
  max-block-size: 100vh;
  background: rgb(15 21 35 / 0.95);
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox[open] {
  display: flex;
}

.lightbox img {
  max-inline-size: min(92vw, 1100px);
  max-block-size: 82vh;
  object-fit: contain;
}

.lightbox figure {
  margin: 0;
}

.lightbox figcaption {
  color: var(--on-navy-soft);
  text-align: center;
}

.lightbox button {
  position: absolute;
  background: rgb(255 255 255 / 0.1);
  color: #fff;
  border: 2px solid rgb(255 255 255 / 0.4);
  border-radius: 50%;
  inline-size: 48px;
  block-size: 48px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox button:hover {
  background: rgb(255 255 255 / 0.25);
}

.lightbox .lb-close {
  inset-block-start: 1rem;
  inset-inline-end: 1rem;
}

.lightbox .lb-prev {
  inset-inline-start: 0.75rem;
}

.lightbox .lb-next {
  inset-inline-end: 0.75rem;
}

/* ---------- admissions ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  max-inline-size: 68ch;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-inline-start: 3.5rem;
  padding-block-end: 1.5rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  border-radius: 50%;
  background: var(--maroon);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.callout {
  background: var(--sky-wash);
  border-inline-start: 4px solid var(--sky);
  border-radius: 0 10px 10px 0;
  padding: 1.25rem 1.5rem;
  max-inline-size: 68ch;
}

.callout--contact {
  background: var(--navy);
  color: var(--on-navy-soft);
  border-inline-start-color: var(--gold);
}

.callout--contact h2,
.callout--contact h3 {
  color: #fff;
}

.callout--contact a {
  color: #fff;
}

.checklist {
  max-inline-size: 68ch;
  padding-inline-start: 1.25rem;
}

.checklist li {
  padding-block: 0.25rem;
}

.page-head {
  background: var(--sky-wash);
  padding-block: clamp(2rem, 5vw, 3.25rem);
}

.page-head h1 {
  margin-block-end: 0.2em;
}

.page-head p {
  margin: 0;
  max-inline-size: 60ch;
}

/* ---------- shared inner-page components ---------- */

.breadcrumbs {
  margin-block-end: 1rem;
  font-size: 0.95rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-inline-end: 0.4rem;
  color: var(--caption);
}

.eyebrow {
  color: var(--maroon);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

.intro {
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  max-inline-size: 62ch;
}

.stack > * + * {
  margin-block-start: 1.25rem;
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.center {
  text-align: center;
}

.center .section-title::after {
  margin-inline: auto;
}

.feature-grid,
.resource-grid,
.values-grid {
  display: grid;
  gap: 1.25rem;
}

.feature-card,
.resource-card,
.value-card {
  padding: 1.4rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 16px rgb(31 44 71 / 0.09);
  overflow: hidden;
}

.feature-card h3,
.resource-card h3,
.value-card h3 {
  margin-block-end: 0.35rem;
}

.feature-card p:last-child,
.resource-card p:last-child,
.value-card p:last-child {
  margin-block-end: 0;
}

.feature-icon {
  inline-size: 48px;
  block-size: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sky-wash);
  color: var(--maroon);
  font-family: var(--font-display);
  font-weight: 800;
  margin-block-end: 1rem;
}

.cta-banner {
  background: var(--maroon);
  color: #fff;
  border-radius: 16px;
  padding: clamp(1.5rem, 5vw, 3rem);
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.cta-banner h2 {
  color: #fff;
  margin-block-end: 0.25rem;
}

.cta-banner p {
  color: #f4dce1;
  margin: 0;
}

.form-help {
  color: var(--caption);
  font-size: 0.9rem;
}

.table-wrap {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

table {
  inline-size: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 0.8rem;
  border: 1px solid #c7d4df;
  text-align: start;
  vertical-align: top;
}

th {
  background: var(--navy);
  color: #fff;
}

caption {
  text-align: start;
  font-weight: 700;
  padding-block-end: 0.6rem;
}

.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  padding: 0 0 2rem 2rem;
  border-inline-start: 3px solid var(--sky);
}

.timeline li::before {
  content: "";
  position: absolute;
  inline-size: 13px;
  block-size: 13px;
  border-radius: 50%;
  background: var(--maroon);
  inset-inline-start: -8px;
  inset-block-start: 0.3rem;
}

.timeline li:last-child {
  padding-block-end: 0;
}

.role {
  color: var(--maroon);
  font-weight: 700;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--sky-wash);
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 700;
}

details {
  border-block-end: 1px solid #bdcbd8;
  padding-block: 0.25rem;
}

summary {
  position: relative;
  display: flex;
  align-items: center;
  min-block-size: 48px;
  padding: 0.6rem 2.5rem 0.6rem 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  position: absolute;
  inset-inline-end: 0.5rem;
  display: grid;
  place-items: center;
  inline-size: 1.75rem;
  block-size: 1.75rem;
  border-radius: 50%;
  background: var(--sky-wash);
  color: var(--maroon);
  font-size: 1.25rem;
}

details[open] summary::after {
  content: "−";
}

summary:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
}

details p {
  margin-block: 0.75rem 0;
  max-inline-size: 68ch;
}

.back-to-top {
  position: fixed;
  z-index: 40;
  inset-inline-end: max(1rem, env(safe-area-inset-right));
  inset-block-end: max(1rem, env(safe-area-inset-bottom));
  inline-size: 48px;
  block-size: 48px;
  border-radius: 50%;
  background: var(--maroon);
  color: #fff;
  text-decoration: none;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgb(31 44 71 / 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.back-to-top__label {
  position: absolute;
  inset-inline-end: 0;
  inset-block-end: calc(100% + 0.5rem);
  padding: 0.35rem 0.55rem;
  border-radius: 5px;
  background: var(--navy);
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: 0.15s ease;
}

.back-to-top:hover .back-to-top__label,
.back-to-top:focus-visible .back-to-top__label {
  opacity: 1;
  visibility: visible;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition:
      opacity 0.55s ease,
      transform 0.55s ease;
  }

  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (width >= 680px) {
  .feature-grid,
  .values-grid,
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cta-banner {
    grid-template-columns: 1fr auto;
  }
}

@media (width <= 520px) {
  .calendar-table,
  .calendar-table tbody,
  .calendar-table tr,
  .calendar-table th,
  .calendar-table td {
    display: block;
    inline-size: 100%;
  }

  .calendar-table thead {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .calendar-table tbody {
    display: grid;
    gap: 0.75rem;
  }

  .calendar-table tr {
    border: 1px solid #c7d4df;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
  }

  .calendar-table th,
  .calendar-table td {
    border: 0;
  }

  .calendar-table th {
    background: var(--navy);
  }
}

@media (width >= 920px) {
  .feature-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- contact page ---------- */

.contact-page {
  --contact-blue: #1e6fba;
  --contact-navy: #0a192f;
  --contact-maroon: #8b2635;
  --contact-gray: #333;
  --contact-wash: #e8f4f8;
  --contact-border: #e9ecef;
  color: var(--contact-navy);
}

.contact-label {
  color: var(--contact-maroon);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-heading {
  color: var(--contact-navy);
  font-size: 2rem;
  font-weight: 700;
}

.contact-subtitle {
  color: var(--contact-gray);
  font-size: 1rem;
}

.contact-card {
  padding: 1.5rem;
  border: 1px solid var(--contact-border);
  border-radius: 12px;
  background: #fff;
}

.contact-card-icon {
  color: var(--contact-blue);
}

.contact-card-label,
.address-label {
  color: var(--contact-maroon);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.contact-card-value {
  color: var(--contact-navy);
  font-size: 1.1rem;
  font-weight: 700;
}

.contact-card-link {
  color: var(--contact-blue);
  font-size: 0.9rem;
  text-decoration: none;
}

.contact-card-link:hover {
  text-decoration: underline;
}

.address-value {
  color: var(--contact-navy);
  font-size: 1rem;
  line-height: 1.6;
}

.contact-hero {
  background: var(--contact-wash);
  border-block-end: 1px solid var(--contact-border);
}

.contact-hero h1 {
  color: var(--contact-navy);
  font-size: clamp(2.5rem, 2rem + 3vw, 4.5rem);
}

.contact-hero .intro {
  color: var(--contact-navy);
  font-size: clamp(1.15rem, 1rem + 0.75vw, 1.5rem);
}

.contact-section {
  padding-block: 3rem;
  background: var(--contact-wash);
}

.contact-panel {
  padding: 0;
}

.contact-panel__heading {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-block-end: 2rem;
  max-inline-size: 64ch;
}

.contact-panel__heading h2 {
  color: var(--contact-navy);
  font-size: clamp(2rem, 1.7rem + 1vw, 2.6rem);
  font-weight: 700;
  margin-block-end: 0.25rem;
}

.contact-panel__heading p:last-child {
  margin: 0;
  color: var(--contact-gray);
}

.contact-panel__mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  inline-size: 3.5rem;
  block-size: 3.5rem;
  border-radius: 10px;
  background: #fff;
  color: var(--contact-blue);
  font-size: 1.5rem;
}

.contact-methods-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.contact-methods-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-method {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-inline-size: 0;
  min-block-size: 270px;
  margin: 0;
  padding: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--contact-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.contact-method:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgb(10 25 47 / 0.07);
}

.contact-method__icon {
  display: grid;
  place-items: center;
  inline-size: 3.75rem;
  block-size: 3.75rem;
  margin-block-end: 1.25rem;
  border-radius: 15px;
  background: var(--contact-wash);
  color: var(--contact-blue);
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
}

.contact-method h3,
.contact-address h3 {
  color: var(--contact-maroon);
  font-size: 0.82rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.contact-method__detail {
  display: block;
  margin-block: 0 1.25rem;
  color: var(--contact-navy);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.45vw, 1.4rem);
  font-weight: 700;
  line-height: 1.35;
}

.contact-method__detail a {
  color: inherit;
  text-decoration: none;
}

.contact-method__detail a:hover {
  color: var(--contact-blue);
  text-decoration: underline;
}

.contact-method__detail--email {
  font-family: var(--font-body);
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.contact-number-list {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.35;
}

.contact-number-list a {
  color: var(--contact-navy);
  text-decoration: none;
}

.contact-number-list a:hover {
  color: var(--contact-blue);
  text-decoration: underline;
}

.contact-method__action {
  display: inline-flex;
  align-items: center;
  margin-block-start: auto;
  color: var(--contact-blue);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.contact-method__action:hover {
  text-decoration: underline;
}

.contact-method__actions {
  display: grid;
  gap: 0.5rem;
  margin-block-start: auto;
}

.contact-address-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-block-start: 1.5rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid var(--contact-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.contact-address {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  margin: 0;
  padding-inline: 0 2rem;
  color: var(--contact-navy);
  font-style: normal;
}

.contact-address + .contact-address {
  padding-inline: 2rem 0;
  border-inline-start: 1px solid var(--contact-border);
}

.contact-address__icon {
  display: grid;
  place-items: center;
  inline-size: 3rem;
  block-size: 3rem;
  border-radius: 12px;
  background: var(--contact-wash);
  color: var(--contact-blue);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
}

.contact-address p {
  margin: 0;
  color: var(--contact-navy);
  line-height: 1.6;
}

.contact-address strong {
  color: var(--contact-navy);
  font-family: var(--font-display);
}

.visit-section {
  background: #fff;
}

.visit-section__heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  margin-block-end: 1.5rem;
}

.visit-section__heading p:last-child {
  max-inline-size: 32ch;
  margin: 0;
  color: var(--contact-gray);
  font-size: 1.15rem;
  font-weight: 700;
}

.map-frame--contact {
  min-block-size: clamp(340px, 52vw, 520px);
  border: 6px solid #fff;
  border-radius: 16px;
  box-shadow: 0 14px 34px rgb(10 25 47 / 0.13);
}

.map-link--button {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--contact-blue);
  font-weight: 700;
  text-decoration: none;
}

.map-link--button:hover {
  background: rgb(30 111 186 / 0.09);
  text-decoration: underline;
}

.contact-page .site-footer {
  background: var(--contact-navy);
  margin-block-start: 0;
}

.contact-page .breadcrumbs a {
  color: var(--contact-blue);
}

.contact-page .breadcrumbs li + li::before {
  color: var(--contact-gray);
}

.contact-page .eyebrow,
.contact-page .section-kicker {
  color: var(--contact-maroon);
}

.contact-page .back-to-top {
  background: var(--contact-maroon);
}

.contact-page .site-header::after,
.contact-page .site-footer::before,
.contact-page .section-title::after {
  background: var(--contact-blue);
}

@media (width <= 679px) {
  .contact-methods-grid,
  .contact-address-panel {
    grid-template-columns: 1fr;
  }

  .contact-method {
    min-block-size: 0;
  }

  .contact-address {
    padding: 0 0 1.5rem;
  }

  .contact-address + .contact-address {
    padding: 1.5rem 0 0;
    border-block-start: 1px solid var(--contact-border);
    border-inline-start: 0;
  }

  .visit-section__heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (width <= 420px) {
  .contact-panel__heading {
    display: block;
  }

  .contact-panel__mark {
    margin-block-end: 1rem;
  }
}

@media (width >= 680px) and (width <= 980px) {
  .contact-methods-grid,
  .contact-methods-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- motion ---------- */

html {
  scroll-behavior: smooth;
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
