@import "./typography.css";

:root {
  color-scheme: light;
  font-family: "Poppins", Helvetica, Arial, sans-serif;
  color: #24302a;
  background: #f7f4ec;
  --content: 74rem;
  --green: #2f694d;
  --green-dark: #244b3a;
  --green-soft: #e2ece2;
  --navy: #213b5b;
  --cream: #f7f4ec;
  --paper: #fffdf8;
  --gold: #d9a441;
  --line: #d9dfd7;
  --muted: #647069;
  --radius: 10px;
  --shadow-ink: 36 48 42;
  --shadow-subtle:
    0 1px 2px rgb(var(--shadow-ink) / 5%),
    0 8px 24px rgb(var(--shadow-ink) / 4%);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--cream);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--cream);
  line-height: 1.65;
}

body,
button,
input {
  font-family: "Poppins", Helvetica, Arial, sans-serif;
}

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

a {
  color: inherit;
}

a:focus-visible,
summary:focus-visible,
.category-tabs:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.button,
.desktop-nav,
.mobile-nav nav,
.category-tabs,
.school-brand strong {
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
}

h1,
h2,
h3 {
  color: var(--green-dark);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.15rem, 9vw, 4.25rem);
}

h2 {
  font-size: clamp(1.7rem, 5.5vw, 2.6rem);
}

h3 {
  font-size: 1.18rem;
}

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

.section-shell {
  padding-block: clamp(3.5rem, 9vw, 7rem);
}

.eyebrow {
  margin-bottom: 0.65rem;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.2rem;
  border: 1px solid var(--green);
  border-radius: var(--radius);
  background: var(--green);
  color: #ffffff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.button--secondary {
  border-color: var(--line);
  background: var(--paper);
  color: var(--green-dark);
}

.text-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.4rem;
  color: var(--green-dark);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
}

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgb(36 75 58 / 12%);
  background: rgb(255 253 248 / 96%);
}

.header-inner {
  display: flex;
  min-height: 5.3rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.school-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.school-brand img {
  width: 2.65rem;
  height: 3.3rem;
  border-radius: var(--radius);
  object-fit: cover;
}

.school-brand span {
  display: grid;
  line-height: 1.2;
}

.school-brand strong {
  color: var(--green-dark);
  font-size: clamp(0.8rem, 3.5vw, 1.05rem);
}

.school-brand small {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.desktop-nav {
  display: none;
}

.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.panel-button {
  display: inline-flex;
  min-width: 2.75rem;
  min-height: 2.75rem;
  appearance: none;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.72rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--green);
  color: #ffffff;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.panel-button:hover {
  background: var(--green-dark);
}

.mobile-nav {
  position: relative;
}

.mobile-nav summary {
  display: grid;
  width: 2.85rem;
  height: 2.85rem;
  cursor: pointer;
  list-style: none;
  place-content: center;
  gap: 0.28rem;
  border-radius: var(--radius);
  background: var(--green-dark);
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav summary span {
  width: 1.25rem;
  height: 2px;
  background: #ffffff;
}

.mobile-nav nav {
  position: absolute;
  top: calc(100% + 0.7rem);
  right: 0;
  display: grid;
  width: min(18rem, calc(100vw - 2rem));
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.mobile-nav nav a {
  display: flex;
  min-height: 3rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  line-height: 1.2;
  text-decoration: none;
}

.mobile-nav nav a.is-active {
  background: var(--green-soft);
  color: var(--green-dark);
}

.home-hero {
  display: grid;
  gap: 2rem;
  padding-block: clamp(2.5rem, 7vw, 5.5rem);
}

.hero-copy {
  align-self: center;
}

.hero-copy h1 {
  max-width: 13ch;
  margin-bottom: 1.25rem;
}

.hero-lead {
  max-width: 39rem;
  margin-bottom: 1.5rem;
  color: #4c5a53;
  font-size: 1.05rem;
}

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

.hero-photo {
  position: relative;
}

.hero-photo picture {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
}

.hero-photo picture img,
.hero-photo > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-note {
  position: relative;
  width: calc(100% - 1.5rem);
  margin: -2.4rem auto 0;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: var(--green-dark);
  color: #ffffff;
}

.hero-note strong,
.hero-note span {
  display: block;
}

.hero-note strong {
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
}

.hero-note span {
  margin-top: 0.2rem;
  color: #d8e7df;
  font-size: 0.78rem;
}

.quick-links {
  display: grid;
  gap: 0.75rem;
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.quick-links > a {
  display: grid;
  min-height: 5.5rem;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  text-decoration: none;
}

.quick-links strong,
.quick-links small {
  display: block;
}

.quick-links strong {
  color: var(--green-dark);
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
}

.quick-links small {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.quick-icon,
.hub-icon {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-content: center;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 1.1rem;
  font-weight: 700;
}

.news-section {
  border-radius: var(--radius);
  background: transparent;
}

.news-section.shell {
  width: min(100% - 1rem, calc(var(--content) + 2rem));
  padding-inline: 0.5rem;
}

.section-heading {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.section-heading h2,
.page-heading h1 {
  margin-bottom: 0;
}

.category-tabs {
  display: flex;
  max-width: 100%;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.2rem 0.1rem 0.5rem;
  scrollbar-width: thin;
}

.category-tabs a {
  flex: 0 0 auto;
  min-height: 2.75rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--green-dark);
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.category-tabs a.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.home-news-grid,
.home-news-side,
.post-grid {
  display: grid;
  gap: 1rem;
}

.home-news-grid,
.post-grid {
  align-items: stretch;
}

.post-grid {
  margin-top: 1rem;
}

.post-card {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.post-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.post-card__image picture {
  width: 100%;
  height: 100%;
}

.post-card__image picture img,
.post-card__image > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.15rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.post-meta span {
  color: var(--green);
  font-weight: 700;
}

.post-card h2,
.post-card h3 {
  margin-bottom: 0.7rem;
}

.post-card h2 a,
.post-card h3 a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  text-decoration: none;
}

.post-card p {
  display: -webkit-box;
  overflow: hidden;
  color: #58645e;
  font-size: 0.88rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.post-card .text-link {
  margin-top: auto;
  font-size: 0.8rem;
}

.section-cta {
  margin-top: 1.5rem;
}

.school-intro,
.help-section,
.document-info {
  background: var(--green-soft);
}

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

.school-intro picture {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
}

.school-intro img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.school-intro h2 {
  margin-bottom: 1rem;
}

.school-intro p:not(.eyebrow) {
  color: #4e5d55;
}

.page-heading {
  padding-block: clamp(3.2rem, 8vw, 6rem) clamp(2rem, 5vw, 3.5rem);
}

.page-heading > p:last-child {
  max-width: 44rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.listing-section,
.documents-section {
  padding-bottom: clamp(4rem, 10vw, 7rem);
}

.listing-section > .category-tabs {
  margin-bottom: 1.4rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.breadcrumbs a {
  display: inline-flex;
  min-width: 2.75rem;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
}

.article {
  max-width: 54rem;
  padding-block: clamp(2.5rem, 7vw, 5rem);
}

.article-header {
  margin-bottom: 2rem;
}

.article-header h1 {
  margin-bottom: 1rem;
  font-size: clamp(1.95rem, 7vw, 3.6rem);
}

.article-header > p {
  color: var(--muted);
  font-size: 1.05rem;
}

.article-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
}

.article-media picture,
.article-media img {
  width: 100%;
  height: 100%;
}

.article-media img {
  object-fit: cover;
}

.article-body {
  margin: 2rem auto 0;
  color: #3f4c45;
  font-size: 1rem;
}

.article-body p + p {
  margin-top: 1.25rem;
}

.related {
  border-top: 1px solid var(--line);
}

.subpage-hero {
  display: grid;
  gap: 2rem;
  padding-block: clamp(3rem, 8vw, 6rem);
  align-items: center;
}

.subpage-hero h1 {
  margin-bottom: 1rem;
}

.subpage-hero p:not(.eyebrow) {
  max-width: 42rem;
  color: var(--muted);
}

.subpage-hero picture {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
}

.subpage-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spd-story,
.document-info__grid {
  display: grid;
  gap: 1.5rem;
}

.story-copy {
  color: #4c5a53;
}

.help-grid {
  display: grid;
  gap: 1rem;
}

.help-grid article {
  padding: 1.35rem;
  border-radius: var(--radius);
  background: var(--paper);
}

.help-grid article > span {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.1rem;
  place-content: center;
  border-radius: var(--radius);
  background: var(--green);
  color: #ffffff;
}

.help-grid h3 {
  margin-bottom: 0.5rem;
}

.help-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.spd-photo {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.spd-photo picture {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
}

.spd-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-grid {
  display: grid;
  gap: 1rem;
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.contact-card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.3rem, 5vw, 2.25rem);
  border: 1px solid var(--line);
  border-top: 5px solid var(--green);
  border-radius: var(--radius);
  background: var(--paper);
}

.contact-card .contact-actions {
  margin-top: auto;
}

.contact-card--preschool {
  border-top-color: var(--gold);
}

.contact-label {
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-card h2 {
  margin: 0.5rem 0 1.3rem;
}

address {
  font-style: normal;
}

.contact-card address p {
  margin-bottom: 1rem;
  color: #4d5953;
}

.contact-card address strong {
  color: var(--green-dark);
}

.map-section {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  border-top: 1px solid var(--line);
}

.map-placeholder {
  display: grid;
  min-height: 16rem;
  place-content: center;
  gap: 0.35rem;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green-dark);
  text-align: center;
  text-decoration: none;
}

.map-placeholder > span {
  font-size: 2.5rem;
}

.map-placeholder small {
  color: #56625b;
}

.document-hubs {
  display: grid;
  gap: 1rem;
  padding-bottom: clamp(4rem, 10vw, 7rem);
}

.document-hubs > a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 1rem;
  padding: clamp(1.3rem, 5vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  text-decoration: none;
}

.document-hubs small,
.document-hubs strong {
  display: block;
}

.document-hubs small {
  margin-bottom: 0.35rem;
  color: var(--green);
  font-weight: 700;
  text-transform: uppercase;
}

.document-hubs strong {
  color: var(--green-dark);
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
  font-size: 1.4rem;
}

.document-hubs p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.document-info__grid {
  align-items: center;
}

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

.document-list a {
  display: grid;
  min-height: 5.2rem;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  text-decoration: none;
}

.document-icon {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-content: center;
  border-radius: var(--radius);
  background: var(--green);
  color: #ffffff;
  font-weight: 700;
}

.document-copy strong,
.document-copy small {
  display: block;
}

.document-copy strong {
  color: var(--green-dark);
  font-size: 0.85rem;
}

.document-copy small {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.hero-photo picture,
.hero-note,
.quick-links > a,
.post-card,
.school-intro picture,
.article-media,
.subpage-hero picture,
.help-grid article,
.spd-photo picture,
.contact-card,
.map-placeholder,
.document-hubs > a,
.document-list a {
  box-shadow: var(--shadow-subtle);
}

.site-footer {
  margin: 0 0.75rem max(0.75rem, env(safe-area-inset-bottom, 0px));
  border-radius: var(--radius);
  background: var(--green-dark);
  color: #dce9e2;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  padding-block: 2.5rem;
}

.site-footer h2 {
  margin-bottom: 0.65rem;
  color: #ffffff;
  font-size: 0.95rem;
  letter-spacing: 0;
}

.site-footer p,
.site-footer address {
  margin: 0;
  font-size: 0.8rem;
}

.site-footer address a {
  display: inline-flex;
  min-width: 2.75rem;
  min-height: 2.75rem;
  align-items: center;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.2rem;
  border-top: 1px solid rgb(255 255 255 / 16%);
  font-size: 0.7rem;
}

.lk-link {
  display: inline-flex;
  min-width: 2.75rem;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

.lk-link img {
  width: 2rem;
  height: auto;
}

@media (min-width: 44rem) {
  .shell {
    width: min(100% - 3rem, var(--content));
  }

  .quick-links,
  .help-grid,
  .post-grid,
  .contact-grid,
  .document-hubs,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-links > a:last-child,
  .help-grid article:last-child {
    grid-column: 1 / -1;
  }

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

  .footer-grid section:first-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 56rem) {
  .mobile-header-actions {
    display: none;
  }

  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 0.1rem;
  }

  .desktop-nav a {
    display: inline-flex;
    min-width: 2.75rem;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.72rem;
    border-radius: var(--radius);
    color: #4d5953;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
  }

  .desktop-nav a.is-active {
    background: var(--green-soft);
    color: var(--green-dark);
  }

  .desktop-nav .timetable-link {
    margin-left: 0.4rem;
    background: var(--green);
    color: #ffffff;
  }

  .desktop-nav .panel-button {
    margin-left: 0.4rem;
    background: var(--green);
    color: #ffffff;
    font-size: 0.78rem;
  }

  .desktop-nav .panel-button:hover {
    background: var(--green-dark);
  }

  .home-hero,
  .subpage-hero,
  .school-intro__grid,
  .spd-photo,
  .map-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .hero-copy,
  .subpage-hero > div,
  .school-intro__grid > div,
  .spd-photo > div,
  .map-section > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero-photo {
    display: flex;
    flex-direction: column;
  }

  .hero-photo picture {
    height: 100%;
    min-height: 22rem;
    flex: none;
    aspect-ratio: auto;
  }

  .hero-photo .hero-note {
    position: absolute;
    right: 0.75rem;
    bottom: -1.5rem;
    left: 0.75rem;
    width: auto;
    margin: 0;
  }

  .subpage-hero picture,
  .school-intro picture,
  .spd-photo picture {
    height: 100%;
    min-height: 22rem;
    aspect-ratio: auto;
  }

  .quick-links,
  .help-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-links > a:last-child,
  .help-grid article:last-child {
    grid-column: auto;
  }

  .section-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .home-news-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 0.8fr);
  }

  .home-news-side {
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }

  .home-news-side .post-card {
    display: grid;
    height: 100%;
    grid-template-columns: 9rem 1fr;
  }

  .home-news-side .post-card__image {
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
  }

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

  .post-grid--home {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .post-card--featured .post-card__image {
    aspect-ratio: 16 / 9;
  }

  .spd-story,
  .document-info__grid {
    grid-template-columns: minmax(18rem, 0.8fr) minmax(0, 1.2fr);
  }

  .document-hubs,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }

  .footer-grid section:first-child {
    grid-column: auto;
  }
}

@media (min-width: 76rem) {
  .news-section.shell {
    padding-inline: 1.5rem;
  }

  .school-brand img {
    width: 3rem;
    height: 3.75rem;
  }

  .school-brand small {
    font-size: 0.72rem;
  }
}

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