.school-main {
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Nunito", "Helvetica Neue", Arial, sans-serif;
  --sun: #fdf4dc;
  font-family: var(--sans);
}

.school-main h1,
.school-main h2,
.school-main h3,
.school-main h4 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.school-main :focus-visible {
  outline-color: var(--royal);
}

.btn-gold {
  background: var(--gold-light);
  color: var(--navy-deep);
  font-weight: 700;
}

.btn-gold:hover {
  background: var(--white);
}

.s-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: max(600px, calc(100vh - var(--header-h)));
  min-height: max(600px, calc(100svh - var(--header-h)));
  max-height: 980px;
  padding: 4rem 0 7rem;
  overflow: hidden;
  background: var(--navy-deep);
  color: var(--white);
}

.s-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.s-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background:
    radial-gradient(900px 560px at 20% 30%, rgba(27, 74, 140, 0.55), transparent 70%),
    linear-gradient(135deg, var(--navy), var(--navy-deep));
  transition: opacity 1.2s ease;
}

.s-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.s-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s-slide.is-active img {
  animation: s-settle 12s ease-out;
}

.s-slide img.is-missing {
  visibility: hidden;
}

@keyframes s-settle {
  from {
    transform: scale(1.1);
  }
}

.s-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(0deg, rgba(3, 27, 59, 0.94) 0%, rgba(3, 27, 59, 0.6) 42%, rgba(3, 27, 59, 0.2) 100%),
    linear-gradient(90deg, rgba(3, 27, 59, 0.45), rgba(3, 27, 59, 0) 70%);
}

.s-hero-inner {
  position: relative;
  z-index: 2;
}

.s-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 0 1.25rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.s-eyebrow::before {
  content: "";
  width: 40px;
  height: 2px;
  background: var(--gold-line);
}

.s-typed,
.s-sub {
  position: relative;
  margin: 0;
}

.s-ghost {
  display: block;
  visibility: hidden;
}

.s-layer {
  position: absolute;
  inset: 0;
}

.s-typed {
  max-width: 16ch;
  margin-bottom: 1.1rem;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 6.2vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.s-sub {
  max-width: 34rem;
  margin-bottom: 2.25rem;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
}

.s-caret {
  display: none;
  width: 0.09em;
  height: 0.95em;
  margin-left: 0.08em;
  vertical-align: -0.1em;
  background: var(--gold-light);
  animation: s-blink 0.9s steps(1) infinite;
}

.s-sub .s-caret {
  width: 2px;
  height: 1.05em;
}

[data-typing="title"] .s-typed .s-caret,
[data-typing="sub"] .s-sub .s-caret,
[data-typing="done"] .s-sub .s-caret {
  display: inline-block;
}

@keyframes s-blink {
  50% {
    opacity: 0;
  }
}

.s-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.s-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.75rem;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.js .s-controls {
  display: flex;
}

.s-nums {
  display: flex;
  gap: 0.5rem;
}

.s-nums button,
.s-arrows button {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(3, 27, 59, 0.25);
  color: var(--white);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.s-nums button {
  width: 38px;
  height: 38px;
}

.s-nums button:hover {
  border-color: var(--white);
}

.s-nums button.is-active {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--navy-deep);
}

.s-arrows {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.s-arrows button {
  width: 44px;
  height: 44px;
}

.s-arrows button:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--navy);
}

.s-arrows button::before {
  content: "";
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.s-prev::before {
  margin-left: 3px;
  transform: rotate(-45deg);
}

.s-next::before {
  margin-right: 3px;
  transform: rotate(135deg);
}

.s-toggle::before {
  width: 10px !important;
  height: 12px !important;
  border-top: 0 !important;
  border-left: 3px solid currentColor !important;
  border-right: 3px solid currentColor;
  transform: none !important;
  margin: 0 !important;
}

.s-toggle[data-paused="true"]::before {
  width: 0 !important;
  height: 0 !important;
  border-left: 10px solid currentColor !important;
  border-right: 0;
  border-top: 6px solid transparent !important;
  border-bottom: 6px solid transparent;
  margin-left: 3px !important;
}

.s-section {
  padding: 6rem 0;
}

.hl {
  padding: 0 0.1em;
  background: linear-gradient(transparent 62%, rgba(240, 195, 90, 0.65) 62%, rgba(240, 195, 90, 0.65) 92%, transparent 92%);
}

.s-intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: end;
}

.s-intro h2 {
  margin: 0;
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  line-height: 1.1;
}

.s-intro-text p {
  margin-bottom: 1.5rem;
  font-size: 1.15rem;
  color: var(--muted);
}

.s-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 3.5rem;
}

.pillar {
  padding: 2.25rem 2rem 2.5rem;
  border-radius: 22px;
  background: var(--mist);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.pillar:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 40px -28px rgba(3, 27, 59, 0.45);
}

.pillar:nth-child(2) {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.88);
}

.pillar:nth-child(3) {
  background: var(--sun);
}

.pillar-num {
  display: block;
  margin-bottom: 1.5rem;
  font-family: var(--serif);
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--gold-deep);
}

.pillar:nth-child(2) .pillar-num {
  color: var(--gold-light);
}

.pillar h3 {
  margin-bottom: 0.6rem;
  font-size: 1.7rem;
}

.pillar:nth-child(2) h3 {
  color: var(--white);
}

.pillar p {
  margin: 0;
}

.s-gallery {
  background: var(--mist);
}

.s-gallery-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.s-gallery-head h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.s-gallery-head p {
  margin: 0;
  color: var(--muted);
}

.s-gallery-nav {
  display: flex;
  flex: none;
  gap: 0.6rem;
}

.s-gallery-nav button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(6, 42, 87, 0.25);
  border-radius: 50%;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

.s-gallery-nav button:hover:not(:disabled) {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.s-gallery-nav button:disabled {
  opacity: 0.35;
  cursor: default;
}

.s-gallery-nav button::before {
  content: "";
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.s-gallery-nav .s-g-prev::before {
  margin-left: 3px;
  transform: rotate(-45deg);
}

.s-gallery-nav .s-g-next::before {
  margin-right: 3px;
  transform: rotate(135deg);
}

.s-scroller {
  overflow-x: auto;
  padding-bottom: 1.25rem;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(6, 42, 87, 0.3) transparent;
  cursor: grab;
}

.s-scroller.is-drag {
  scroll-snap-type: none;
  scroll-behavior: auto;
  cursor: grabbing;
  user-select: none;
}

.s-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}

.s-card {
  position: relative;
  flex: 0 0 clamp(220px, 26vw, 300px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(160deg, var(--mist-deep), var(--mist));
  scroll-snap-align: start;
}

.s-card button {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.s-card button:focus-visible {
  outline: 3px solid var(--royal);
  outline-offset: -3px;
  border-radius: 20px;
}

.s-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: transform 0.7s var(--ease);
}

.s-card img.is-missing {
  visibility: hidden;
}

.s-card:hover img {
  transform: scale(1.06);
}

.s-enquire {
  background: var(--sun);
}

.s-enquire-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.s-enquire h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.s-enquire p {
  max-width: 30rem;
  margin: 0;
  font-size: 1.15rem;
}

.s-contact {
  display: grid;
  gap: 1rem;
}

.s-contact a {
  display: block;
  padding: 1.25rem 1.5rem;
  border-radius: 18px;
  background: var(--white);
  text-decoration: none;
  box-shadow: 0 22px 34px -26px rgba(3, 27, 59, 0.5);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.s-contact a:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 40px -26px rgba(3, 27, 59, 0.55);
}

.s-contact small {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
}

.s-contact strong {
  display: block;
  overflow-wrap: anywhere;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
}

.s-support {
  background:
    radial-gradient(700px 400px at 90% 0%, rgba(27, 74, 140, 0.5), transparent 70%),
    var(--navy-deep);
  color: var(--white);
}

.s-support .container::before {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  margin-bottom: 1.5rem;
  background: var(--gold-line);
}

.s-support h2 {
  max-width: 16ch;
  margin-bottom: 1rem;
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  color: var(--white);
}

.s-support p {
  max-width: 30rem;
  margin-bottom: 2rem;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.86);
}

.s-support :focus-visible {
  outline-color: var(--gold-light);
}

.others-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.others-head h2 {
  margin-bottom: 0;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.programmes--compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 3.5rem;
}

.programmes--compact .programme {
  padding: 1.5rem 0.5rem;
}

.programmes--compact h3 {
  margin: 0;
  font-size: 1.6rem;
}

body.lb-open {
  overflow: hidden;
}

.s-lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.97);
  color: var(--navy);
}

.s-lightbox::backdrop {
  background: rgba(255, 255, 255, 0.9);
}

.s-lightbox[open] {
  display: grid;
  animation: s-fade 0.25s ease both;
}

@keyframes s-fade {
  from {
    opacity: 0;
  }
}

.s-lb-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 4.5rem 6rem;
}

.s-lb-figure {
  display: grid;
  justify-items: center;
  gap: 0.9rem;
  max-width: 100%;
  margin: 0;
}

.s-lb-figure img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 10rem);
  max-height: calc(100svh - 10rem);
  border-radius: 12px;
  box-shadow: 0 30px 60px -30px rgba(3, 27, 59, 0.4);
}

.s-lb-figure img.is-missing {
  visibility: hidden;
  min-height: 40vh;
}

.s-lb-count {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
}

.s-lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.s-lb-btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.s-lb-btn[hidden] {
  display: none;
}

.s-lb-close {
  top: 1.25rem;
  right: 1.25rem;
}

.s-lb-close::before,
.s-lb-close::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.s-lb-close::before {
  transform: rotate(45deg);
}

.s-lb-close::after {
  transform: rotate(-45deg);
}

.s-lb-prev,
.s-lb-next {
  top: 50%;
  margin-top: -23px;
}

.s-lb-prev {
  left: 1.25rem;
}

.s-lb-next {
  right: 1.25rem;
}

.s-lb-prev::before,
.s-lb-next::before {
  content: "";
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.s-lb-prev::before {
  margin-left: 4px;
  transform: rotate(-45deg);
}

.s-lb-next::before {
  margin-right: 4px;
  transform: rotate(135deg);
}

@media (max-width: 900px) {
  .s-section {
    padding: 4.5rem 0;
  }

  .s-hero {
    padding: 3rem 0 6.5rem;
  }

  .s-intro-grid,
  .s-enquire-card {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .s-pillars {
    grid-template-columns: 1fr;
  }

  .programmes--compact {
    grid-template-columns: 1fr;
  }

  .s-lb-stage {
    padding: 4.5rem 1rem 6rem;
  }

  .s-lb-prev,
  .s-lb-next {
    top: auto;
    bottom: 1.25rem;
    margin-top: 0;
  }

  .s-lb-prev {
    left: calc(50% - 58px);
  }

  .s-lb-next {
    right: calc(50% - 58px);
  }
}

@media (max-width: 600px) {
  .s-actions .btn {
    flex: 1 1 100%;
    text-align: center;
  }

  .s-nums {
    gap: 0.35rem;
  }

  .s-nums button {
    width: 34px;
    height: 34px;
  }

  .s-arrows .s-prev,
  .s-arrows .s-next {
    display: none;
  }

  .s-gallery-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .s-gallery-nav {
    display: none;
  }
}
