/* Public school website.
   Kept entirely separate from the portal's stylesheet so changes to the admin
   UI can never alter the school's public face. */

:root {
  --ink: #0d1526;
  --muted: #5b6b82;
  --faint: #8a98ab;
  --line: #e3e8ef;
  --line-soft: #eef2f6;
  --bg: #ffffff;
  --bg-alt: #f6f9fc;
  --brand: #1d4ed8;
  --brand-dark: #1e3a8a;
  --brand-soft: #eff4ff;
  --accent: #0d9488;
  --gold: #b45309;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(13, 21, 38, .06);
  --shadow: 0 4px 16px rgba(13, 21, 38, .07);
  --shadow-lg: 0 18px 48px rgba(13, 21, 38, .12);
  --wrap: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.muted { color: var(--muted); }
.center { text-align: center; }

h1, h2, h3, h4 { letter-spacing: -.022em; line-height: 1.2; margin: 0; }

/* ---------- Top bar ---------- */
.topline {
  background: var(--brand-dark);
  color: #c7d7f7;
  font-size: 13px;
}
.topline .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; padding-block: 8px; }
.topline span { display: inline-flex; align-items: center; gap: 6px; }
.topline svg { width: 14px; height: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 22px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; text-decoration: none; color: inherit; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .02em;
  box-shadow: var(--shadow-sm);
}
.brand strong { display: block; font-size: 16px; letter-spacing: -.01em; }
.brand small { display: block; color: var(--faint); font-size: 12px; }

#siteNav { display: flex; gap: 4px; flex-wrap: wrap; }
#siteNav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 8px;
  transition: background .14s ease, color .14s ease;
}
#siteNav a:hover { background: var(--brand-soft); color: var(--brand); }
#siteNav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

.nav-toggle { display: none; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.nav-toggle svg { width: 18px; height: 18px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .16s ease, background .16s ease;
  white-space: nowrap;
}
.btn:hover { box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .4); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 55%, #0f766e 100%);
  overflow: hidden;
}
.hero.has-image::after {
  content: "";
  position: absolute; inset: 0;
  background: inherit;
  opacity: .82;
}
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero .wrap { position: relative; z-index: 2; padding-block: clamp(64px, 9vw, 110px); }
.hero-eyebrow {
  display: inline-block;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(30px, 5.2vw, 56px); max-width: 16ch; }
.hero p { font-size: clamp(15px, 1.6vw, 19px); opacity: .92; max-width: 56ch; margin: 16px 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Quick info strip ---------- */
.quickbar { background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.quickbar .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; padding: 0 22px; }
.quick-item { display: flex; align-items: center; gap: 13px; padding: 22px 18px; }
.quick-item .ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); flex: none; }
.quick-item .ico svg { width: 19px; height: 19px; }
.quick-item strong { display: block; font-size: 14.5px; }
.quick-item small { color: var(--muted); font-size: 12.5px; }

/* ---------- Sections ---------- */
section.block { padding: clamp(48px, 6vw, 78px) 0; }
section.block.alt { background: var(--bg-alt); }
.section-head { max-width: 620px; margin-bottom: 34px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-bottom: 9px;
}
.section-head h2 { font-size: clamp(24px, 3.2vw, 34px); }
.section-head p { color: var(--muted); margin: 12px 0 0; font-size: 15.5px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat strong { display: block; font-size: clamp(26px, 3.6vw, 38px); font-weight: 750; color: var(--brand); letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: 13.5px; font-weight: 500; }

/* ---------- Feature cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 20px; }
.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); margin-bottom: 15px; }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 17px; margin-bottom: 7px; }
.feature p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* ---------- Article / news cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card > img { height: 186px; width: 100%; object-fit: cover; background: var(--bg-alt); }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card h3 { font-size: 16.5px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--brand); }
.card p { color: var(--muted); font-size: 14px; margin: 0; }
.tag {
  align-self: flex-start;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.meta { color: var(--faint); font-size: 12.5px; }

/* ---------- Notices ---------- */
.notice-list { display: grid; gap: 12px; }
.notice-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.notice-row.high { border-left-color: var(--gold); }
.notice-row.urgent { border-left-color: #dc2626; }
.notice-date {
  flex: none;
  text-align: center;
  background: var(--bg-alt);
  border-radius: 9px;
  padding: 7px 11px;
  min-width: 58px;
}
.notice-date b { display: block; font-size: 18px; line-height: 1.1; }
.notice-date span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.notice-row h4 { font-size: 15px; margin-bottom: 3px; }
.notice-row p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Faculty ---------- */
.faculty-card { text-align: center; padding: 24px 18px; }
.faculty-card .ph {
  width: 84px; height: 84px;
  margin: 0 auto 14px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--brand-soft), #e6f7f4);
  display: grid; place-items: center;
  color: var(--brand);
  font-weight: 700;
  font-size: 24px;
  border: 3px solid #fff;
  box-shadow: var(--shadow-sm);
}
.faculty-card h4 { font-size: 15.5px; margin-bottom: 2px; }
.faculty-card .role { color: var(--brand); font-size: 13px; font-weight: 600; }
.faculty-card .qual { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 14px; }
.gallery figure { margin: 0; border-radius: var(--radius-sm); overflow: hidden; position: relative; border: 1px solid var(--line); }
.gallery img, .gallery .ph { height: 168px; width: 100%; object-fit: cover; background: var(--bg-alt); }
.gallery figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 22px 13px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72));
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}

/* ---------- Testimonials ---------- */
.quote { padding: 26px 24px; }
.quote .mark { font-size: 40px; line-height: 1; color: var(--brand); opacity: .28; font-family: Georgia, serif; }
.quote p { font-size: 15px; color: var(--ink); margin: 4px 0 16px; }
.quote footer { display: flex; align-items: center; gap: 11px; }
.quote .av { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; object-fit: cover; }
.quote strong { display: block; font-size: 14px; }
.quote small { color: var(--muted); font-size: 12.5px; }

/* ---------- Tables (fees, routine, results) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 480px; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; }
th { background: var(--bg-alt); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td strong { font-variant-numeric: tabular-nums; }

/* ---------- CTA band ---------- */
.cta {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(32px, 4.4vw, 52px);
  text-align: center;
}
.cta h2 { font-size: clamp(22px, 3vw, 31px); }
.cta p { opacity: .92; margin: 12px auto 24px; max-width: 54ch; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.form-card label { display: block; margin-bottom: 14px; font-size: 13.5px; font-weight: 600; }
.form-card input, .form-card textarea, .form-card select {
  width: 100%;
  margin-top: 6px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.form-card input:focus, .form-card textarea:focus, .form-card select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .13);
}
.form-note { margin-top: 12px; font-size: 13.5px; }
.form-note.ok { color: #047857; }
.form-note.bad { color: #b91c1c; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }

/* ---------- Article page ---------- */
.article { max-width: 760px; padding-block: clamp(40px, 5vw, 64px); }
.article h1 { font-size: clamp(26px, 3.6vw, 40px); margin: 8px 0 10px; }
.article p { font-size: 16.5px; color: #2b3a51; }
.article-image { border-radius: var(--radius); margin: 22px 0; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); text-decoration: none; font-size: 14px; font-weight: 600; }
.back:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: #0d1526; color: #9fb0c8; margin-top: 0; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 34px; padding-block: 48px; }
.site-footer h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.site-footer a { color: #9fb0c8; text-decoration: none; font-size: 14px; display: block; padding: 3px 0; }
.site-footer a:hover { color: #fff; }
.site-footer p { font-size: 14px; margin: 0 0 8px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand strong { color: #fff; font-size: 16px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: 18px; font-size: 13px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ---------- Loading / empty ---------- */
.skeleton { color: var(--faint); padding: 60px 0; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  #siteNav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 10px 22px 16px;
    box-shadow: var(--shadow);
  }
  #siteNav.open { display: flex; }
  .header-inner { position: relative; flex-wrap: wrap; }
  .header-inner .btn-primary { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .topline .wrap { justify-content: center; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ---------- Built-in artwork ----------
   Illustrations used where a school has not uploaded its own photo. They are
   flat SVG, so `cover` cropping would cut the motif — contain keeps it whole. */
img.art { object-fit: contain; background: var(--bg-alt); }
.card > img.art { padding: 0; background: linear-gradient(135deg, #f1f5fb, #eef6f5); }
.gallery img.art { object-fit: cover; }
.article-image { width: 100%; max-height: 340px; object-fit: cover; }
.article-image.art { object-fit: contain; background: var(--bg-alt); }

/* The hero artwork sits behind a colour wash, so it reads as texture rather
   than a photo competing with the headline. */
.hero-bg { opacity: .55; }
.hero.has-image::after { opacity: .74; }

/* ============================================================
   Hero slider
   ============================================================ */
.hero { min-height: clamp(440px, 62vh, 640px); display: grid; }
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
  z-index: 1;
}
.hero-slide.active { opacity: 1; z-index: 2; }
.hero-slide .hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }

/* Slow drift so a still photo never feels frozen. */
.kenburns { animation: kenburns 22s ease-in-out infinite alternate; transform-origin: center; }
@keyframes kenburns {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to   { transform: scale(1.12) translate3d(-1.5%, -1.5%, 0); }
}

/* Colour wash over the photo keeps headline contrast readable. */
.hero-shade {
  position: absolute; inset: 0; z-index: 3;
  background:
    linear-gradient(105deg, rgba(15, 32, 84, .88) 0%, rgba(29, 78, 216, .66) 48%, rgba(13, 118, 110, .5) 100%),
    linear-gradient(to top, rgba(4, 10, 26, .55), transparent 45%);
}
.hero-content { position: relative; z-index: 4; align-self: center; }

/* Only the active caption is shown, and it eases in with its slide. */
.hero-text { display: none; }
.hero-text.active { display: block; animation: heroIn .75s cubic-bezier(.22, .8, .3, 1) both; }
@keyframes heroIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.hero-arrow {
  position: absolute; top: 50%; z-index: 5;
  transform: translateY(-50%);
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(10, 20, 45, .32);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background .16s ease, transform .16s ease;
}
.hero-arrow:hover { background: rgba(10, 20, 45, .6); }
.hero-arrow:active { transform: translateY(-50%) scale(.94); }
.hero-arrow svg { width: 20px; height: 20px; }
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }

.hero-dots { position: absolute; z-index: 5; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; gap: 9px; }
.hero-dots .dot {
  width: 9px; height: 9px; padding: 0;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, .45);
  cursor: pointer;
  transition: width .22s ease, background .22s ease;
}
.hero-dots .dot.active { width: 30px; background: #fff; }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.22, .8, .3, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Header condense on scroll
   ============================================================ */
.site-header { transition: box-shadow .2s ease, padding .2s ease; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(13, 21, 38, .1); }
.site-header.scrolled .header-inner { padding-block: 9px; }
.site-header.scrolled .brand-mark { width: 38px; height: 38px; font-size: 13px; }

/* ============================================================
   Gallery hover + lightbox
   ============================================================ */
.gallery figure { cursor: zoom-in; }
.gallery figure img { transition: transform .5s cubic-bezier(.22, .8, .3, 1); }
.gallery figure:hover img { transform: scale(1.07); }

.lightbox {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  padding: 28px;
  background: rgba(6, 11, 24, .9);
  backdrop-filter: blur(6px);
  /* The overlay itself is never animated. Animating opacity from 0 means an
     engine that pauses animations (background tab, hidden window) can leave a
     fully interactive overlay invisible - so only the inner figure moves. */
  opacity: 1;
}
.lightbox.closing { animation: lbOut .18s ease forwards; }
/* Transform-only entrance: if it never runs, the figure is still fully visible. */
.lightbox figure { animation: lbPop .22s cubic-bezier(.2,.8,.3,1); }
@keyframes lbPop { from { transform: scale(.94); } to { transform: none; } }
@keyframes lbOut { from { opacity: 1; } to { opacity: 0; } }
.lightbox figure { margin: 0; max-width: min(1000px, 92vw); }
.lightbox img { max-height: 78vh; width: auto; border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
.lightbox figcaption { color: #e2e8f0; text-align: center; margin-top: 14px; font-size: 14.5px; }
.lb-close {
  position: absolute; top: 20px; right: 24px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .1);
  color: #fff; font-size: 26px; line-height: 1;
  cursor: pointer;
}
.lb-close:hover { background: rgba(255, 255, 255, .2); }

/* Card lift already exists; make the image inside move a touch too. */
.card > img { transition: transform .5s cubic-bezier(.22, .8, .3, 1); }
.card:hover > img { transform: scale(1.04); }
.card { will-change: transform; }

@media (max-width: 640px) {
  .hero-arrow { display: none; }
}

/* Honour a reduced-motion preference across everything above. */
@media (prefers-reduced-motion: reduce) {
  .kenburns { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-text.active { animation: none; }
  .gallery figure:hover img, .card:hover > img { transform: none; }
}
