:root {
  --blue-900: #063a78;
  --blue-800: #0b4e99;
  --blue-700: #1267b3;
  --blue-100: #eaf5ff;
  --gold: #f7c948;
  --coral: #df5b4f;
  --green: #2f8f5b;
  --ink: #10233f;
  --muted: #52677f;
  --paper: #ffffff;
  --soft: #f7fbff;
  --line: rgba(6, 58, 120, 0.16);
  --shadow: 0 18px 45px rgba(6, 58, 120, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Times New Roman", Times, serif;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 64px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(6, 58, 120, 0.08);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--blue-900);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand span {
  overflow-wrap: anywhere;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.5vw, 22px);
  color: var(--blue-900);
  font-size: clamp(0.98rem, 1.2vw, 1.05rem);
  font-weight: 700;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"] {
  color: var(--coral);
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-button {
  display: none;
}

.portal-button {
  min-height: 42px;
  padding: 9px 18px;
  border-radius: 8px;
  color: var(--blue-900);
  background: var(--gold);
  box-shadow: 0 10px 22px rgba(247, 201, 72, 0.28);
}

.nav-links .portal-button:hover,
.nav-links .portal-button:focus-visible {
  color: var(--blue-900);
  background: #ffd95f;
}

.hero {
  position: relative;
  min-height: 82vh;
  display: grid;
  align-items: center;
  padding: 120px clamp(20px, 6vw, 96px) 80px;
  color: var(--paper);
  background: var(--blue-900);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 12px;
  background: linear-gradient(90deg, var(--gold), var(--blue-700), var(--coral), var(--green));
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 37, 78, 0.86), rgba(4, 37, 78, 0.58) 48%, rgba(4, 37, 78, 0.18)),
    linear-gradient(0deg, rgba(4, 37, 78, 0.4), rgba(4, 37, 78, 0.08));
}

.hero-carousel {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  animation: heroFade 25s infinite;
  animation-delay: calc(var(--slide-index) * 5s);
}

.hero-slide:first-child {
  opacity: 1;
}

@keyframes heroFade {
  0%,
  16% {
    opacity: 1;
  }

  20%,
  96% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(780px, 100%);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--gold);
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(3rem, 9vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 14px;
  color: var(--blue-900);
  font-size: clamp(2rem, 4.8vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  color: var(--blue-900);
  font-size: 1.45rem;
  line-height: 1.1;
}

.hero-copy {
  width: min(660px, 100%);
  margin-bottom: 30px;
  font-size: clamp(1.18rem, 2vw, 1.45rem);
}

.hero-actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.contact-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  color: var(--blue-900);
  background: var(--gold);
}

.button.secondary {
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.72);
}

.notice-band {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 24px;
  color: var(--paper);
  background: var(--blue-900);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  text-align: center;
}

.welcome-preview {
  background:
    linear-gradient(180deg, rgba(234, 245, 255, 0.9), rgba(255, 255, 255, 0.86)),
    var(--paper);
}

.welcome-card {
  width: min(920px, 100%);
  padding-left: clamp(18px, 4vw, 42px);
  border-left: 6px solid var(--gold);
}

.welcome-card p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.16rem;
}

.page-hero {
  position: relative;
  min-height: 48vh;
  display: grid;
  align-items: end;
  padding: 120px clamp(20px, 6vw, 96px) 62px;
  color: var(--paper);
  background:
    linear-gradient(90deg, rgba(6, 58, 120, 0.94), rgba(11, 78, 153, 0.8)),
    url("IMG_9601.jpeg") center / cover;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 10px;
  background: linear-gradient(90deg, var(--gold), var(--blue-700), var(--coral), var(--green));
}

.page-hero > div {
  position: relative;
  z-index: 1;
  width: min(900px, 100%);
}

.page-hero h1 {
  margin-bottom: 16px;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
}

.page-hero p:not(.eyebrow) {
  width: min(760px, 100%);
  font-size: clamp(1.16rem, 2vw, 1.35rem);
}

.section {
  padding: clamp(58px, 8vw, 104px) clamp(20px, 6vw, 96px);
}

.section-heading {
  width: min(820px, 100%);
  margin-bottom: 34px;
}

.section-heading p {
  color: var(--muted);
  font-size: 1.15rem;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.about-copy {
  color: var(--muted);
  font-size: 1.16rem;
}

.text-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--blue-800);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.content-section {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.prose {
  width: min(920px, 100%);
  color: var(--muted);
  font-size: 1.16rem;
}

.prose h2 {
  color: var(--blue-900);
}

.signature {
  color: var(--blue-900);
  font-weight: 700;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.contact-panel address {
  color: var(--ink);
}

.contact-panel .contact-links a {
  border-color: var(--line);
  box-shadow: 0 10px 24px rgba(6, 58, 120, 0.08);
}

.image-frame {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.image-frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.image-frame figcaption {
  padding: 14px 18px;
  color: var(--blue-900);
  font-weight: 700;
}

.logo-frame img {
  padding: clamp(24px, 5vw, 56px);
  object-fit: contain;
  background: var(--paper);
}

.identity-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  background: var(--soft);
  border-block: 1px solid var(--line);
}

.identity-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.17rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stats-row div,
.class-card,
.values-section article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 14px 34px rgba(6, 58, 120, 0.1);
}

.stats-row div {
  min-height: 142px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  text-align: center;
}

.stats-row strong {
  color: var(--blue-800);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1;
}

.stats-row span {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

.admission-section {
  background:
    linear-gradient(180deg, rgba(234, 245, 255, 0.7), rgba(255, 255, 255, 0)),
    var(--paper);
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.class-card {
  min-height: 220px;
  padding: 24px;
}

.class-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 20px;
  border-radius: 50%;
  color: var(--paper);
  background: var(--blue-700);
  font-weight: 700;
}

.class-card:nth-child(2) .class-icon {
  background: var(--coral);
}

.class-card:nth-child(3) .class-icon {
  color: var(--blue-900);
  background: var(--gold);
}

.class-card:nth-child(4) .class-icon {
  background: var(--green);
}

.class-card p {
  color: var(--muted);
  font-size: 1.08rem;
}

.photo-band {
  height: clamp(260px, 46vw, 520px);
  overflow: hidden;
}

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

.gallery-preview-section {
  background: var(--soft);
  border-block: 1px solid var(--line);
}

.gallery-preview-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.gallery-preview-heading > div {
  width: min(820px, 100%);
}

.gallery-preview-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.15rem;
}

.gallery-preview-heading .button {
  flex: 0 0 auto;
}

.gallery-preview-grid,
.gallery-grid {
  display: grid;
  gap: 16px;
}

.gallery-preview-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.gallery-preview-item,
.gallery-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 14px 34px rgba(6, 58, 120, 0.1);
}

.gallery-preview-item {
  display: block;
  min-height: 160px;
}

.gallery-preview-item img,
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.gallery-preview-item:hover img,
.gallery-preview-item:focus-visible img,
.gallery-card:hover img {
  transform: scale(1.04);
}

.gallery-page-hero {
  background:
    linear-gradient(90deg, rgba(6, 58, 120, 0.94), rgba(11, 78, 153, 0.72)),
    url("gallery-09.jpeg") center / cover;
}

.gallery-section {
  background:
    linear-gradient(180deg, rgba(234, 245, 255, 0.78), rgba(255, 255, 255, 0)),
    var(--paper);
}

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

.gallery-card {
  min-height: 260px;
  margin: 0;
}

.gallery-card img {
  aspect-ratio: 4 / 3;
}

.values-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  background: var(--blue-100);
}

.values-section article {
  padding: clamp(24px, 4vw, 38px);
}

.values-section article.wide {
  grid-column: 1 / -1;
}

.values-section p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.14rem;
}

.contact-section {
  padding: clamp(64px, 9vw, 110px) clamp(20px, 6vw, 96px);
  color: var(--paper);
  background:
    linear-gradient(90deg, rgba(6, 58, 120, 0.96), rgba(11, 78, 153, 0.92)),
    var(--blue-900);
}

.contact-content {
  width: min(820px, 100%);
}

.contact-section h2 {
  color: var(--paper);
}

address {
  margin-bottom: 24px;
  font-style: normal;
  font-size: 1.25rem;
}

.contact-links a {
  color: var(--blue-900);
  background: var(--paper);
}

.contact-links a:nth-child(2) {
  background: var(--gold);
}

.site-footer {
  color: var(--paper);
  background: #031f42;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(180px, 0.8fr));
  gap: clamp(28px, 5vw, 64px);
  padding: 42px clamp(20px, 6vw, 96px);
}

.footer-brand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer-brand img {
  width: 72px;
  height: 72px;
  padding: 6px;
  border-radius: 8px;
  background: var(--paper);
  object-fit: contain;
}

.footer-brand strong,
.footer-column strong {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 1.18rem;
  line-height: 1.2;
}

.footer-brand span,
.footer-column a,
.footer-bottom {
  color: rgba(255, 255, 255, 0.82);
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.footer-column a {
  width: fit-content;
  text-decoration: none;
}

.footer-column a:hover,
.footer-column a:focus-visible {
  color: var(--gold);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(20px, 6vw, 96px);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.98rem;
  font-weight: 700;
}

@media (max-width: 900px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
  }

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

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 8px 0 4px;
    border-top: 1px solid var(--line);
    background: var(--paper);
    overflow: visible;
  }

  .nav-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    cursor: pointer;
  }

  .nav-toggle-button span {
    width: 22px;
    height: 2px;
    border-radius: 99px;
    background: var(--blue-900);
  }

  .nav-toggle:focus-visible + .nav-toggle-button {
    outline: 3px solid rgba(247, 201, 72, 0.7);
    outline-offset: 3px;
  }

  .nav-toggle:checked ~ .nav-links {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 4px;
  }

  .nav-links .portal-button {
    justify-content: center;
    width: 100%;
    margin-top: 8px;
    padding: 12px 18px;
  }

  .hero {
    min-height: 76vh;
  }

  .about-grid,
  .identity-section,
  .split-section,
  .values-section {
    grid-template-columns: 1fr;
  }

  .class-grid,
  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-preview-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  .site-header {
    padding: 12px 16px;
  }

  .brand img {
    width: 46px;
    height: 46px;
  }

  .nav-links {
    font-size: 1rem;
  }

  .hero {
    min-height: 74vh;
    padding: 92px 18px 64px;
  }

  .page-hero {
    min-height: 42vh;
    padding: 86px 18px 44px;
  }

  .hero-overlay {
    background: linear-gradient(90deg, rgba(4, 37, 78, 0.88), rgba(4, 37, 78, 0.64));
  }

  .hero-actions,
  .contact-links {
    flex-direction: column;
  }

  .button,
  .contact-links a {
    width: 100%;
  }

  .class-grid,
  .stats-row {
    grid-template-columns: 1fr;
  }

  .gallery-preview-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-preview-item,
  .gallery-card {
    min-height: 240px;
  }

  .section,
  .contact-section {
    padding-inline: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    animation: none;
  }

  .hero-slide:not(:first-child) {
    opacity: 0;
  }

  .gallery-preview-item img,
  .gallery-card img {
    transition: none;
  }
}
