/* ==========================================================
   Dheeran Institutions — single shared stylesheet
   Sections: TOKENS · BASE · LAYOUT · BUTTONS · LOADER · HEADER ·
   HERO · COMPONENTS · CONTENT · GALLERY · FOOTER · UTILITIES · MOTION
========================================================== */

/* ==========================================================
   TOKENS
========================================================== */
:root {
  --red: #d42a32;
  --red-strong: #ad1f27;
  --red-soft: rgba(212, 42, 50, 0.09);
  --sky: #1ba1e2;
  --blue: #0a6aa6;
  --gold: #f2b134;
  --gold-ink: #8a5800;
  --green: #2b8a43;
  --navy: #0b1a33;
  --navy-2: #14305a;

  --primary: var(--red);
  --primary-strong: var(--red-strong);
  --on-primary: #ffffff;
  --accent-text: #b3222a;
  --link: #0a6aa6;

  --bg: #faf8f4;
  --bg-alt: #f2eee6;
  --card: #ffffff;
  --card-2: #f7f4ee;
  --text: #13213b;
  --muted: #4b5563;
  --line: rgba(19, 33, 59, 0.11);
  --chip: rgba(19, 33, 59, 0.06);

  --shadow-soft: 0 12px 32px -16px rgba(11, 26, 51, 0.22);
  --shadow-lift: 0 26px 54px -22px rgba(11, 26, 51, 0.38);
  --radius: 20px;
  --radius-sm: 12px;
  --header-h: 76px;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --accent-text: #ff8a8f;
  --link: #74c7f2;
  --gold-ink: #f5c463;
  --bg: #0a1424;
  --bg-alt: #0d1a2e;
  --card: #112039;
  --card-2: #0f1c32;
  --text: #e9eff8;
  --muted: #aab8cc;
  --line: rgba(255, 255, 255, 0.1);
  --chip: rgba(255, 255, 255, 0.07);
  --shadow-soft: 0 12px 32px -16px rgba(0, 0, 0, 0.6);
  --shadow-lift: 0 26px 54px -22px rgba(0, 0, 0, 0.75);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  color: var(--text);
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(2.2rem, 1.4rem + 3.6vw, 4rem);
}

h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.7rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

strong {
  font-weight: 700;
}

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

::selection {
  background: var(--gold);
  color: var(--navy);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 1200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ==========================================================
   LAYOUT
========================================================== */
.shell {
  width: min(1200px, 92vw);
  margin-inline: auto;
}

.section {
  padding: clamp(64px, 8vw, 104px) 0;
  position: relative;
}

.section.tight {
  padding: clamp(48px, 6vw, 72px) 0;
}

.section.alt {
  background: var(--bg-alt);
}

/* Follows a same-coloured section: avoid doubling the vertical rhythm */
.section.flush-top {
  padding-top: 0;
}

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(36px, 5vw, 56px);
  text-align: center;
}

.section-head.left {
  margin-inline: 0;
  text-align: left;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--accent-text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(242, 177, 52, 0.25);
}

.lede {
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.22rem);
  color: var(--muted);
}

.grid-2 {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================================
   BUTTONS
========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: 14px;
  font: 600 0.98rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s ease,
    color 0.25s ease, border-color 0.25s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--red), var(--red-strong));
  color: var(--on-primary);
  box-shadow: 0 10px 24px -10px rgba(212, 42, 50, 0.65);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -12px rgba(212, 42, 50, 0.75);
}

.btn.ghost {
  border-color: var(--line);
  color: var(--text);
  background: var(--card);
}

.btn.ghost:hover {
  border-color: var(--primary);
  color: var(--accent-text);
  transform: translateY(-2px);
}

.btn.light {
  background: #ffffff;
  color: #0b1a33;
}

.btn.light:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.6);
}

.btn.outline-light {
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
}

.btn.outline-light:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.btn-sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: 12px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

@media (max-width: 480px) {
  .cta-row .btn {
    flex: 1 1 100%;
  }
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--primary);
  color: var(--accent-text);
}

/* ==========================================================
   LOADER — an open book whose pages turn
========================================================== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 38%, #18325c 0%, #0b1a33 62%);
  transition: opacity 0.6s ease, visibility 0.6s ease, transform 0.7s var(--ease);
}

.loader.is-done {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3%);
}

.no-js .loader {
  display: none;
}

.is-returning .loader {
  background: rgba(11, 26, 51, 0.96);
}

.loader-stage {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
  color: #ffffff;
}

/* ---- Emblem (bulb rising from an open book) ---- */
.emblem {
  display: block;
  overflow: visible;
}

.loader-emblem {
  width: 210px;
  height: auto;
  margin-bottom: 4px;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35));
  transition: transform 0.6s var(--ease), opacity 0.6s ease;
}

.loader.is-done .loader-emblem {
  transform: translateY(-10px) scale(0.9);
}

.emblem-glow {
  transform-box: fill-box;
  transform-origin: center;
  animation: emblem-glow 2.6s ease-in-out infinite;
}

.emblem-rays line {
  animation: emblem-ray 2.6s ease-in-out infinite;
}

.emblem-rays line:nth-child(2),
.emblem-rays line:nth-child(3) {
  animation-delay: 0.2s;
}

.emblem-rays line:nth-child(4),
.emblem-rays line:nth-child(5) {
  animation-delay: 0.4s;
}

.emblem-bulb {
  animation: emblem-bob 2.6s ease-in-out infinite;
}

.emblem-filament {
  stroke: #b4530a;
  animation: emblem-filament 2.6s ease-in-out infinite;
}

.emblem-flip {
  transform-box: view-box;
  transform-origin: 100px 150px;
  animation: emblem-flip 2.6s var(--ease) infinite;
}

.emblem-flip.late {
  animation-delay: 1.3s;
}

@keyframes emblem-glow {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes emblem-ray {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

@keyframes emblem-bob {
  0%,
  100% {
    transform: translateY(3px);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes emblem-filament {
  0%,
  100% {
    stroke: #b4530a;
  }
  50% {
    stroke: #ff7a00;
  }
}

/* The flip page is the right page (left-page path mirrored about the spine,
   x = 100). Scaling X from -1 to 1 around the spine swings it over to land
   exactly on the left page; it passes through scaleX(0), like a turning leaf. */
@keyframes emblem-flip {
  0%,
  10% {
    transform: scaleX(-1);
    filter: brightness(1);
  }
  35% {
    filter: brightness(0.82);
  }
  60%,
  100% {
    transform: scaleX(1);
    filter: brightness(1);
  }
}

.loader-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.loader-name span {
  color: var(--gold);
  font-weight: 500;
}

.loader-motto {
  position: relative;
  height: 1.4em;
  width: 220px;
  margin: -8px 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #b9cbe6;
}

.loader-motto span {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: motto 3.6s ease-in-out infinite;
}

.loader-motto span:nth-child(2) {
  animation-delay: 1.2s;
}

.loader-motto span:nth-child(3) {
  animation-delay: 2.4s;
}

@keyframes motto {
  0%,
  100% {
    opacity: 0;
    transform: translateY(6px);
  }
  8%,
  30% {
    opacity: 1;
    transform: none;
  }
  38% {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.loader-bar {
  width: 160px;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
}

.loader-bar span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--red));
  animation: bar 1.3s ease-in-out infinite;
}

@keyframes bar {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(260%);
  }
}

.is-returning .loader-name,
.is-returning .loader-motto,
.is-returning .loader-bar {
  display: none;
}

/* ==========================================================
   HEADER & NAVIGATION
========================================================== */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1100;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--red));
}

.topbar {
  background: var(--navy);
  color: #c9d6ea;
  font-size: 0.84rem;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 40px;
}

.topbar p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 22px;
  margin: 0;
}

.topbar a {
  color: #e7eef9;
  text-decoration: none;
}

.topbar a:hover {
  color: var(--gold);
}

.topbar i {
  margin-right: 6px;
  color: var(--gold);
}

.topbar strong {
  color: #ffffff;
}

.topbar-links a {
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(242, 177, 52, 0.16);
  color: #ffd98a;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .topbar-place,
  .topbar-links span {
    display: none;
  }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Blur lives on a pseudo-element: backdrop-filter on the header itself would
   become the containing block for the fixed mobile drawer. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 10px 30px -22px rgba(11, 26, 51, 0.5);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.brand-crest {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 6px 16px -8px rgba(11, 26, 51, 0.45);
}

.brand-text {
  display: grid;
  line-height: 1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-text);
  letter-spacing: 0.01em;
}

[data-theme="dark"] .brand-name {
  color: #ff5a60;
}

.brand-sub {
  margin-top: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list > li {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 13px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text);
  font: 600 0.95rem/1.2 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link i {
  font-size: 0.7rem;
  transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link[aria-current="page"],
.has-menu.is-current > .nav-link {
  color: var(--accent-text);
  background: var(--red-soft);
}

.nav-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gold);
  color: #3a2600;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 270px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-lift);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s var(--ease), visibility 0.22s;
}

.menu::before {
  content: "";
  position: absolute;
  inset: -12px 0 auto;
  height: 12px;
}

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

.menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text);
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.menu a small {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.menu a:hover,
.menu a[aria-current="page"] {
  background: var(--red-soft);
  color: var(--accent-text);
}

.menu.mega {
  left: 50%;
  display: grid;
  grid-template-columns: 1.15fr repeat(4, 1fr);
  gap: 6px;
  width: min(1120px, 94vw);
  padding: 18px;
  transform: translate(-50%, 8px);
}

.mega-intro {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(160deg, #0b1a33, #14305a);
  color: #dbe6f6;
}

.mega-crest {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.mega-intro-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
}

.mega-intro-text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
}

.mega-intro .btn {
  justify-self: start;
  margin-top: 4px;
}

.mega-col {
  padding: 8px 4px;
}

.mega-title {
  margin: 0 0 6px;
  padding: 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.mega-title i {
  margin-right: 4px;
}

.mega-col a {
  font-size: 0.9rem;
  padding: 8px 12px;
}

@media (min-width: 1240px) {
  .has-menu:hover > .menu,
  .has-menu:focus-within > .menu,
  .has-menu.open > .menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .has-mega:hover > .menu,
  .has-mega:focus-within > .menu,
  .has-mega.open > .menu {
    transform: translate(-50%, 0);
  }

  .has-menu:hover > .nav-link i,
  .has-menu.open > .nav-link i {
    transform: rotate(180deg);
  }

  .has-mega {
    position: static !important;
  }

  .nav-drawer-footer,
  .menu-toggle {
    display: none !important;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mobile drawer */
.menu-toggle .bars,
.menu-toggle .bars::before,
.menu-toggle .bars::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease), background-color 0.2s ease;
}

.menu-toggle .bars {
  position: relative;
}

.menu-toggle .bars::before,
.menu-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle .bars::before {
  top: -6px;
}

.menu-toggle .bars::after {
  top: 6px;
}

.menu-toggle[aria-expanded="true"] .bars {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .bars::before {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 1239px) {
  .nav {
    position: fixed;
    inset: var(--drawer-top, var(--header-h)) 0 0 auto;
    z-index: 990;
    width: min(420px, 100vw);
    margin: 0;
    padding: 16px 18px 28px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--card);
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow-lift);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.35s var(--ease), visibility 0.35s;
  }

  .nav.open {
    transform: none;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 13px 14px;
    font-size: 1rem;
  }

  .menu,
  .menu.mega {
    position: static;
    display: none;
    width: auto;
    min-width: 0;
    margin: 4px 0 8px;
    padding: 6px;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: var(--card-2);
  }

  .has-menu.open > .menu {
    display: block;
  }

  .has-menu.open > .nav-link i {
    transform: rotate(180deg);
  }

  .mega-intro {
    display: none;
  }

  .mega-col {
    padding: 6px 0;
  }

  .nav-drawer-footer {
    display: grid;
    gap: 10px;
    margin-top: 18px;
  }

  .header-actions {
    margin-left: auto;
  }

  .header-cta {
    display: none;
  }

  body.nav-open {
    overflow: hidden;
  }
}

@media (max-width: 420px) {
  .brand-name {
    font-size: 1.3rem;
  }

  .brand-crest {
    width: 42px;
    height: 42px;
  }

  .header-inner {
    gap: 10px;
  }
}

/* ==========================================================
   HERO (home)
========================================================== */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(88vh, 820px);
  display: flex;
  align-items: center;
  padding: clamp(72px, 10vw, 120px) 0 clamp(120px, 14vw, 170px);
  color: #ffffff;
  overflow: hidden;
  background: #0b1a33;
}

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

.hero-slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.4s ease, transform 7s linear;
}

.hero-slides img.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(8, 19, 38, 0.94) 0%, rgba(8, 19, 38, 0.78) 45%, rgba(8, 19, 38, 0.35) 100%),
    linear-gradient(0deg, rgba(8, 19, 38, 0.85) 0%, transparent 40%);
}

.hero-content {
  max-width: 720px;
}

.hero .eyebrow {
  background: rgba(255, 255, 255, 0.1);
  color: #ffe2a6;
  backdrop-filter: blur(6px);
}

.hero h1 {
  color: #ffffff;
  font-weight: 600;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero .lede {
  color: #d5e0f0;
  max-width: 600px;
  margin-bottom: 30px;
}

.hero-dots {
  position: absolute;
  right: 4vw;
  bottom: clamp(130px, 15vw, 180px);
  display: flex;
  gap: 8px;
}

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

.hero-dots button {
  width: 28px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.hero-dots button[aria-current="true"] {
  width: 48px;
  background: var(--gold);
}

/* Schools strip overlapping the hero */
.schools {
  position: relative;
  z-index: 2;
  margin-top: clamp(-120px, -10vw, -90px);
}

.school-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .school-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.school-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.3s ease;
}

.school-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 42, 50, 0.4);
}

.school-card::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 177, 52, 0.22), transparent 70%);
  pointer-events: none;
}

.school-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.school-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--red), var(--red-strong));
  color: #ffffff;
  font-size: 1.4rem;
}

.school-card.soon .school-icon {
  background: linear-gradient(135deg, #1ba1e2, #0a6aa6);
}

.school-card h2,
.school-card h3 {
  margin: 0;
  font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem);
}

.school-card p {
  margin: 0;
  color: var(--muted);
}

.school-tag {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
}

.chip i {
  color: var(--green);
}

[data-theme="dark"] .chip i {
  color: #6fd38a;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--accent-text);
  text-decoration: none;
}

.link-arrow i {
  transition: transform 0.25s var(--ease);
}

.link-arrow:hover i {
  transform: translateX(4px);
}

.soon-ribbon {
  position: absolute;
  top: 22px;
  right: -44px;
  z-index: 1;
  width: 170px;
  padding: 6px 0;
  transform: rotate(45deg);
  background: var(--gold);
  color: #3a2600;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.4);
}

/* Marquee of activities */
.marquee {
  overflow: hidden;
  padding: 18px 0;
  border-block: 1px solid var(--line);
  background: var(--card);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 44px;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: marquee 38s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
}

.marquee-track i {
  color: var(--primary);
  font-size: 1rem;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ==========================================================
   PAGE HERO (inner pages)
========================================================== */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(48px, 7vw, 88px) 0 clamp(52px, 7vw, 84px);
  background: linear-gradient(135deg, #0b1a33 0%, #14305a 70%, #1b3d70 100%);
  color: #dce6f5;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.08;
  background: url("../assets/pattern-doodle.svg") 0 0 / 240px 240px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, #000 75%);
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, #000 75%);
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -140px;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 177, 52, 0.22), transparent 65%);
}

.page-hero h1 {
  max-width: 860px;
  margin-bottom: 14px;
  color: #ffffff;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.3rem);
}

.page-hero .lede {
  max-width: 720px;
  margin: 0;
  color: #c8d6eb;
}

.page-hero .eyebrow {
  background: rgba(255, 255, 255, 0.1);
  color: #ffe2a6;
}

.breadcrumbs ol {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  line-height: 1.7;
}

.breadcrumbs li {
  display: inline;
}

.breadcrumbs li + li::before {
  content: "/";
  margin: 0 10px;
  color: rgba(255, 255, 255, 0.4);
}

.breadcrumbs a {
  color: #ffd98a;
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs [aria-current] {
  color: #ffffff;
}

/* ==========================================================
   COMPONENTS
========================================================== */
.card {
  position: relative;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.3s ease;
}

a.card {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.card h3 {
  transition: color 0.2s ease;
}

a.card:hover h3 {
  color: var(--accent-text);
}

.card h3 + .check-list {
  margin-top: 16px;
}

.card-foot {
  margin-top: auto;
  padding-top: 20px;
}

.label-caps {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.card.fill {
  display: flex;
  flex-direction: column;
}

.card.lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(212, 42, 50, 0.35);
}

.card h3 {
  margin-bottom: 8px;
}

.card p:last-child,
.card > :last-child,
.card > :last-child > :last-child {
  margin-bottom: 0;
}

.card p {
  color: var(--muted);
}

.icon-blob {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: var(--red-soft);
  color: var(--accent-text);
  font-size: 1.35rem;
}

.icon-blob.gold {
  background: rgba(242, 177, 52, 0.16);
  color: var(--gold-ink);
}

.icon-blob.blue {
  background: rgba(27, 161, 226, 0.13);
  color: var(--link);
}

.icon-blob.green {
  background: rgba(43, 138, 67, 0.13);
  color: var(--green);
}

[data-theme="dark"] .icon-blob.green {
  color: #6fd38a;
}

.card-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.card-grid.three {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

/* Stats */
.stat-band {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: clamp(28px, 4vw, 48px);
  background: linear-gradient(135deg, #0b1a33, #14305a);
  color: #ffffff;
}

.stat-band::after {
  content: "";
  position: absolute;
  right: -100px;
  top: -100px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 42, 50, 0.35), transparent 65%);
}

.stat-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 900px) {
  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  padding-left: 18px;
  border-left: 3px solid var(--gold);
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
}

.stat-label {
  display: block;
  margin-top: 6px;
  color: #c3d2e8;
  font-size: 0.92rem;
}

/* Pillars (motto) */
.pillar {
  overflow: hidden;
}

.pillar-num {
  position: absolute;
  right: 18px;
  top: 6px;
  font-family: var(--font-display);
  font-size: 4.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--chip);
  pointer-events: none;
}

/* Learning journey */
.journey {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.journey li {
  position: relative;
  padding: 20px 22px 20px 78px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.journey li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 20px;
  top: 20px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--navy);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
}

[data-theme="dark"] .journey li::before {
  background: #1d3b69;
}

.journey h3 {
  margin-bottom: 4px;
  font-size: 1.12rem;
}

.journey p {
  margin: 0;
  color: var(--muted);
}

.journey .grade {
  display: inline-block;
  margin-left: 6px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-ink);
}

.journey + p {
  margin: 28px 0 0;
}

/* Framed photo */
.photo-frame {
  position: relative;
  border-radius: 24px;
}

.photo-frame img {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--shadow-lift);
  object-fit: cover;
}

.photo-frame::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  z-index: -1;
  border-radius: 24px;
  border: 2px dashed rgba(242, 177, 52, 0.7);
}

@media (max-width: 700px) {
  .photo-frame::before {
    inset: 10px 0 -10px 10px;
  }
}

.photo-badge {
  position: absolute;
  left: -14px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-lift);
  font-weight: 700;
}

.photo-badge i {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--red-soft);
  color: var(--accent-text);
}

.photo-badge small {
  display: block;
  font-weight: 500;
  color: var(--muted);
}

/* Bento facilities */
.bento {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 180px;
}

@media (min-width: 900px) {
  .bento {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 210px;
  }

  .bento .tile:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }

  .bento .tile:nth-child(4) {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .bento {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }
}

.bento + p {
  margin: 36px 0 0;
}

.tile {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--navy);
  color: #ffffff;
  text-decoration: none;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 19, 38, 0.85), rgba(8, 19, 38, 0) 60%);
}

.tile:hover img {
  transform: scale(1.06);
}

.tile-label {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}

.tile-label i {
  font-size: 0.9rem;
  color: var(--gold);
}

/* Messages */
.message-card {
  display: grid;
  gap: 20px;
  grid-template-columns: 96px 1fr;
  align-items: start;
}

.message-card img {
  width: 96px;
  height: 116px;
  object-fit: cover;
  border-radius: 16px;
}

.message-card blockquote {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--text);
}

.message-card .who {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.message-card .who strong {
  display: block;
  color: var(--text);
}

@media (max-width: 480px) {
  .message-card {
    grid-template-columns: 1fr;
  }
}

/* Testimonials */
.quote-card {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.quote-card::before {
  content: "\201C";
  display: block;
  height: 44px;
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  color: var(--primary);
}

.quote-card blockquote {
  flex: 1;
  margin: 0;
}

.quote-card figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #e08a1e);
  color: #3a2600;
  font-weight: 800;
}

.quote-card cite {
  font-style: normal;
  font-weight: 700;
}

.quote-card cite small {
  display: block;
  font-weight: 500;
  color: var(--muted);
}

/* CTA band */
.cta-band {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 22px;
  align-items: center;
  padding: clamp(30px, 5vw, 56px);
  border-radius: 28px;
  background: linear-gradient(120deg, #9f1b22 0%, #c4252d 60%, #b8361c 100%);
  color: #ffffff;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background: url("../assets/pattern-doodle.svg") 0 0 / 220px 220px;
  mask-image: linear-gradient(100deg, rgba(0, 0, 0, 0.45) 0%, #000 70%);
  -webkit-mask-image: linear-gradient(100deg, rgba(0, 0, 0, 0.45) 0%, #000 70%);
}

.cta-band > * {
  position: relative;
}

.cta-band h2 {
  margin: 0 0 8px;
  color: #ffffff;
}

.cta-band p {
  margin: 0;
  color: #ffffff;
}

@media (min-width: 900px) {
  .cta-band {
    grid-template-columns: 1.4fr auto;
  }

  .page-main .cta-band {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   CONTENT (inner pages)
========================================================== */
.page-layout {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 1000px) {
  .page-layout {
    grid-template-columns: 290px minmax(0, 1fr);
  }
}

.page-main {
  min-width: 0;
}

.side-nav {
  display: grid;
  gap: 18px;
}

@media (min-width: 1000px) {
  .side-nav {
    position: sticky;
    top: calc(var(--header-h) + 20px);
  }
}

.side-nav-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.side-nav-box summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

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

.side-nav-box summary small {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.side-nav-box summary i {
  transition: transform 0.25s ease;
}

.side-nav-box[open] summary i {
  transform: rotate(180deg);
}

@media (min-width: 1000px) {
  .side-nav-box summary {
    pointer-events: none;
  }

  .side-nav-box summary i {
    display: none;
  }
}

.side-nav-body {
  padding: 0 12px 14px;
}

.side-title {
  margin: 10px 8px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.side-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-nav ul a {
  display: block;
  padding: 7px 10px;
  border-left: 3px solid transparent;
  border-radius: 0 10px 10px 0;
  color: var(--text);
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.side-nav ul a:hover {
  background: var(--chip);
}

.side-nav ul a[aria-current="page"] {
  border-left-color: var(--primary);
  background: var(--red-soft);
  color: var(--accent-text);
  font-weight: 700;
}

@media (max-width: 999px) {
  .side-card {
    display: none !important;
  }
}

.side-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #0b1a33, #14305a);
  color: #c9d6ea;
}

.side-card p {
  margin: 0;
  font-size: 0.92rem;
}

.side-card strong {
  display: block;
  margin-bottom: 4px;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.page-main > * + * {
  margin-top: clamp(32px, 4vw, 48px);
}

/* Flow inside a content block (higher specificity than component margin resets
   such as .doc-list { margin: 0 }): every item gets breathing room, and a sub-heading
   always starts a new group (more space above than below). Margins collapse with
   paragraph/heading margins, so this never doubles up. */
.page-main .content-block > * + * {
  margin-top: 16px;
}

.page-main .content-block > * + h2,
.page-main .content-block > * + h3 {
  margin-top: 36px;
}

.page-main .content-block > h2 + *,
.page-main .content-block > h3 + * {
  margin-top: 0;
}

.page-main .content-block > :last-child {
  margin-bottom: 0;
}

.content-block > h2 {
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem);
}

.prose {
  font-size: 1.04rem;
}

.prose p {
  color: var(--text);
}

.prose h2 {
  margin-top: 1.6em;
  font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 1.3rem;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose li::marker {
  color: var(--primary);
  font-weight: 700;
}

.prose blockquote {
  margin: 1.5em 0;
  padding: 18px 22px;
  border-left: 4px solid var(--gold);
  border-radius: 0 14px 14px 0;
  background: var(--card-2);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
}

.prose .drop::first-letter {
  float: left;
  margin: 6px 10px 0 0;
  font-family: var(--font-display);
  font-size: 3.6rem;
  font-weight: 700;
  line-height: 0.8;
  color: var(--primary);
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding: 14px 16px 14px 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.check-list li::before {
  content: "\f00c";
  position: absolute;
  left: 16px;
  top: 15px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(43, 138, 67, 0.15);
  color: var(--green);
  font: 900 0.7rem/1 "Font Awesome 6 Free";
}

[data-theme="dark"] .check-list li::before {
  color: #6fd38a;
}

.steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: s;
}

.steps li {
  position: relative;
  padding: 16px 18px 16px 62px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.steps li::before {
  counter-increment: s;
  content: counter(s);
  position: absolute;
  left: 16px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--accent-text);
  font-weight: 800;
}

/* Fact tiles */
.fact-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  margin: 0;
}

@media (min-width: 640px) {
  .fact-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .fact-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .fact-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .fact-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Phones: always two tiles per row; an odd last tile spans the full row */
@media (max-width: 639px) {
  .fact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fact-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

.fact {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.fact dt {
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.fact dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table caption {
  padding: 14px 18px 0;
  text-align: left;
  font-size: 0.85rem;
  color: var(--muted);
  caption-side: bottom;
  padding-bottom: 14px;
}

.data-table th,
.data-table td {
  padding: 13px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

/* Phones: let header labels and long values (emails, links) wrap so narrow
   tables fit the screen. Wide tables use .stack-mobile instead. */
@media (max-width: 639px) {
  .data-table th,
  .data-table td {
    padding: 10px 10px;
    overflow-wrap: anywhere;
  }

  /* .table-wrap prefix: must beat the base .data-table thead th { white-space: nowrap } below */
  .table-wrap .data-table thead th {
    white-space: normal;
    overflow-wrap: normal;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
  }

  .data-table {
    font-size: 0.9rem;
  }

  .data-table th,
  .data-table td {
    padding: 10px 8px;
  }

  .data-table th:first-child,
  .data-table td:first-child {
    padding-left: 12px;
  }

  @media (max-width: 360px) {
    .data-table th,
    .data-table td {
      padding: 10px 6px;
    }

    .data-table th:first-child,
    .data-table td:first-child {
      padding-left: 10px;
    }
  }

  /* Row numbers add width without meaning on a phone */
  .data-table .idx {
    display: none;
  }
}

.data-table thead th {
  background: var(--card-2);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.data-table tbody tr:last-child > * {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: var(--chip);
}

.data-table tbody th {
  font-weight: 700;
}

/* Two-column key/value tables: consistent label column */
.data-table tbody th[scope="row"]:first-child:nth-last-child(2) {
  width: 36%;
}

/* Phones: each row becomes a small card (label left, value right) so every
   column is visible without sideways scrolling. Cells carry data-label. */
@media (max-width: 899px) {
  .table-wrap:has(.stack-mobile) {
    overflow: visible;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .stack-mobile thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .stack-mobile,
  .stack-mobile tbody,
  .stack-mobile tr,
  .stack-mobile th,
  .stack-mobile td {
    display: block;
    width: 100%;
  }

  .stack-mobile tbody {
    display: grid;
    gap: 12px;
  }

  .stack-mobile tr {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
  }

  .stack-mobile tbody tr:hover {
    background: var(--card);
  }

  .stack-mobile th[scope="row"] {
    padding: 12px 16px;
    background: var(--card-2);
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 1.1rem;
  }

  .stack-mobile td {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 16px;
    text-align: right;
  }

  .stack-mobile td::before {
    content: attr(data-label);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: left;
  }

  .stack-mobile tbody tr > :last-child {
    border-bottom: 0;
  }

  .stack-mobile td.idx {
    display: none;
  }
}

.data-table .nowrap {
  white-space: nowrap;
}

.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.data-table tfoot td,
.data-table tfoot th {
  background: var(--card-2);
  font-weight: 800;
  border-top: 2px solid var(--line);
  border-bottom: 0;
}

/* Grouped rows (fee structure) */
.data-table .group-row th {
  background: var(--card-2);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.data-table .total-row > * {
  font-weight: 800;
  border-bottom: 2px solid var(--line);
}

.fee-table td.num {
  white-space: nowrap;
}

/* Phones: class buttons show one class column at a time (JS sets data-show).
   Without JS the full table scrolls sideways. */
.fee-picker {
  display: none;
}

@media (max-width: 639px) {
  html:not(.no-js) .fee-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  html:not(.no-js) .fee-picker .filter-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  /* Same specificity as the show rules below, which come later and win */
  html:not(.no-js) .fee-table[data-show] tr > :not(:first-child) {
    display: none;
  }

  html:not(.no-js) .fee-table[data-show="1"] tr > :nth-child(2),
  html:not(.no-js) .fee-table[data-show="2"] tr > :nth-child(3),
  html:not(.no-js) .fee-table[data-show="3"] tr > :nth-child(4),
  html:not(.no-js) .fee-table[data-show="4"] tr > :nth-child(5),
  html:not(.no-js) .fee-table[data-show="5"] tr > :nth-child(6) {
    display: table-cell;
  }

  html:not(.no-js) .fee-table[data-show] {
    font-size: 0.95rem;
  }
}

/* Keep the row labels in view while the class columns scroll on phones */
.fee-table tbody th[scope="row"],
.fee-table tfoot th,
.fee-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 160px;
  background: var(--card);
  box-shadow: 1px 0 0 var(--line);
}

.fee-table thead th:first-child,
.fee-table tfoot th {
  background: var(--card-2);
}

.fee-table .total-row th {
  background: var(--card);
}

.data-table .center {
  text-align: center;
}

/* Documents */
.doc-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

/* Static highlight only: moving rows re-rasterise text (blur, then sharpen) */
.doc:hover,
.doc:focus-within {
  border-color: rgba(212, 42, 50, 0.4);
  background: color-mix(in srgb, var(--card) 94%, var(--red));
}

.doc:hover .doc-icon,
.doc:focus-within .doc-icon {
  background: var(--primary);
  color: #ffffff;
}

.doc-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 54px;
  border-radius: 8px 16px 8px 8px;
  transition: background-color 0.2s ease, color 0.2s ease;
  background: var(--red-soft);
  color: var(--accent-text);
  font-size: 1.3rem;
}

.doc-body {
  flex: 1;
  min-width: 0;
}

.doc-title {
  display: block;
  font-weight: 700;
  color: var(--text);
}

.doc-meta {
  display: block;
  font-size: 0.84rem;
  color: var(--muted);
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 560px) {
  .doc {
    flex-wrap: wrap;
  }

  .doc-actions {
    width: 100%;
    padding-left: 62px;
  }
}

/* Profile (message pages) */
.profile {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 900px) {
  .profile {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

.profile-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

@media (min-width: 900px) {
  .profile-card {
    position: sticky;
    top: calc(var(--header-h) + 20px);
  }
}

.profile-card img {
  width: min(220px, 100%);
  margin: 0 auto 16px;
  border-radius: 18px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.profile-card h2 {
  margin: 0 0 4px;
  font-size: 1.4rem;
}

.profile-card p {
  margin: 0;
  color: var(--muted);
}

.profile-role {
  display: inline-block;
  margin: 8px 0 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--accent-text);
  font-size: 0.82rem;
  font-weight: 700;
}

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

.profile.compact .profile-card {
  position: static;
  display: flex;
  align-items: center;
  gap: 22px;
  text-align: left;
}

.profile.compact .profile-card img {
  width: 120px;
  margin: 0;
  flex-shrink: 0;
}

/* Staff photo cards (Teachers page). A photo in assets/people/staff/<slug>.webp
   replaces the initials; until then each card shows initials on a brand tone. */
.staff-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .staff-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .staff-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.staff-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.3s ease;
}

.staff-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(212, 42, 50, 0.35);
}

.staff-photo {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(160deg, #0b1a33, #14305a);
}

.staff-photo.tone-red {
  background: linear-gradient(160deg, #d42a32, #8f161d);
}

.staff-photo.tone-blue {
  background: linear-gradient(160deg, #14305a, #0a6aa6);
}

.staff-photo.tone-gold {
  background: linear-gradient(160deg, #e08a1e, #f2b134);
}

.staff-photo.tone-green {
  background: linear-gradient(160deg, #1f6b34, #2b8a43);
}

.staff-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background: url("../assets/pattern-doodle.svg") 0 0 / 180px 180px;
  pointer-events: none;
}

.staff-photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.staff-initials {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 46%;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.staff-body {
  display: grid;
  gap: 2px;
  padding: 14px 16px 16px;
}

.staff-body h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  line-height: 1.25;
}

.staff-body p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.staff-body .staff-role {
  font-weight: 700;
  color: var(--accent-text);
}

.staff-body .staff-exp {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--chip);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}

.staff-body .staff-exp i {
  color: var(--gold-ink);
}

@media (max-width: 639px) {
  .staff-body .exp-word {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
}

@media (max-width: 420px) {
  .staff-body {
    padding: 12px;
  }

  .staff-body h3 {
    font-size: 0.95rem;
  }
}

/* Circulars */
.notice {
  border-left: 4px solid var(--primary);
}

.notice-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
}

.notice-head h2 {
  margin: 0;
  font-size: 1.3rem;
}

.notice-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--chip);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
}

.notice .prose p {
  color: var(--text);
}

.stack {
  display: grid;
  gap: 20px;
}

/* FAQ (native details) */
.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq details[open] {
  border-color: rgba(212, 42, 50, 0.35);
  box-shadow: var(--shadow-soft);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "\2b";
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--accent-text);
  font: 900 0.8rem/1 "Font Awesome 6 Free";
  transition: transform 0.3s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details > div {
  padding: 0 20px 18px;
  color: var(--muted);
}

.faq details > div p:last-child {
  margin: 0;
}

/* Timetable */
.timeline {
  position: relative;
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0 0 0 30px;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--gold), var(--primary));
}

.timeline li {
  position: relative;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 22px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline time,
.timeline .time {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.timeline p {
  margin: 4px 0 0;
  color: var(--muted);
}

.timeline li.is-break {
  border-style: dashed;
  background: var(--card-2);
}

.timeline li.is-break::before {
  background: var(--gold);
  box-shadow: 0 0 0 2px var(--gold);
}

@media (min-width: 640px) {
  .timeline li {
    display: grid;
    grid-template-columns: 210px 1fr;
    align-items: baseline;
    gap: 20px;
  }

  .timeline p {
    margin: 0;
  }
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

.contact-card {
  display: grid;
  gap: 6px;
  align-content: start;
}

.contact-card h2,
.contact-card h3 {
  margin: 0 0 4px;
  font-size: 1.2rem;
}

.contact-card a {
  font-weight: 600;
}

.contact-card p,
.contact-card address {
  margin: 0;
  font-style: normal;
}

.map-embed {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  aspect-ratio: 16 / 9;
  background: var(--card-2);
  box-shadow: var(--shadow-soft);
}

.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

[data-theme="dark"] .map-embed iframe {
  filter: invert(0.9) hue-rotate(180deg) saturate(0.7);
}

@media (max-width: 640px) {
  .map-embed {
    aspect-ratio: 4 / 5;
  }
}

.video-embed {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: var(--shadow-soft);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Coming soon */
.soon-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(56px, 9vw, 120px) 0;
  background: linear-gradient(140deg, #0b1a33 0%, #10345f 55%, #0a6aa6 130%);
  color: #d6e3f5;
  text-align: center;
}

.soon-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.08;
  background: url("../assets/pattern-doodle.svg") 0 0 / 240px 240px;
  mask-image: radial-gradient(circle at 50% 42%, transparent 0 18%, #000 62%);
  -webkit-mask-image: radial-gradient(circle at 50% 42%, transparent 0 18%, #000 62%);
}

.soon-hero h1 {
  color: #ffffff;
  margin-bottom: 12px;
}

.soon-hero h1 span {
  display: block;
  font-size: 0.55em;
  font-weight: 500;
  color: var(--gold);
}

.soon-hero .lede {
  max-width: 640px;
  margin: 0 auto 28px;
  color: #c8d6eb;
}

.soon-hero .breadcrumbs ol {
  margin-bottom: 36px;
}

.soon-hero .cta-row {
  justify-content: center;
}

.soon-emblem {
  width: min(230px, 60vw);
  height: auto;
  margin: 0 auto 28px;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35));
}

.soon-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(242, 177, 52, 0.16);
  color: #ffd98a;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(242, 177, 52, 0.7);
  }
  100% {
    box-shadow: 0 0 0 14px rgba(242, 177, 52, 0);
  }
}

/* 404 */
.error-hero {
  padding: clamp(72px, 10vw, 140px) 0;
  text-align: center;
}

.error-code {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(5rem, 3rem + 10vw, 10rem);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--red), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-hero .cta-row {
  justify-content: center;
}

/* ==========================================================
   GALLERY + LIGHTBOX
========================================================== */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.filter-btn {
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font: 600 0.9rem/1.2 var(--font-body);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--primary);
}

.filter-btn[aria-pressed="true"] {
  border-color: transparent;
  background: var(--primary);
  color: #ffffff;
}

.gallery {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery {
  transition: height 0.45s var(--ease);
}

@media (min-width: 640px) {
  .gallery {
    gap: 14px;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1000px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery li {
  transition: opacity 0.35s ease, transform 0.45s var(--ease);
}

.gallery.is-switching li {
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition-delay: 0s !important;
}

.gallery li[hidden] {
  display: none;
}

.gallery a {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 3 / 2;
  background: var(--card-2);
}

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

.gallery a::after {
  content: "\f00e";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(11, 26, 51, 0.45);
  color: #ffffff;
  font: 900 1.4rem/1 "Font Awesome 6 Free";
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery a:hover img,
.gallery a:focus-visible img {
  transform: scale(1.06);
}

.gallery a:hover::after,
.gallery a:focus-visible::after {
  opacity: 1;
}

.lightbox {
  width: min(1100px, 94vw);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #0b1a33;
  color: #ffffff;
  overflow: hidden;
}

.lightbox::backdrop {
  background: rgba(5, 12, 24, 0.86);
  backdrop-filter: blur(4px);
}

.lightbox figure {
  margin: 0;
}

.lightbox img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  background: #050c18;
}

.lightbox figcaption {
  padding: 12px 64px 14px 18px;
  font-weight: 600;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 1.1rem;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: var(--primary);
}

.lightbox-close {
  right: 12px;
  bottom: 6px;
  width: 40px;
  height: 40px;
}

.lightbox-nav {
  top: 40%;
}

.lightbox-nav.prev {
  left: 12px;
}

.lightbox-nav.next {
  right: 12px;
}

/* ==========================================================
   FOOTER
========================================================== */
.site-footer {
  position: relative;
  padding-top: clamp(56px, 7vw, 80px);
  background: #081326;
  color: #b8c6dc;
  font-size: 0.95rem;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background: url("../assets/pattern-doodle.svg") 0 0 / 260px 260px;
  pointer-events: none;
}

.site-footer > * {
  position: relative;
}

.footer-wave {
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 6px;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--sky));
}

.footer-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: 1fr;
  padding-bottom: 44px;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1080px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  }
}

.brand-light .brand-name {
  color: #ffffff;
}

.brand-light .brand-sub {
  color: #f2b134;
}

.footer-brand p {
  margin: 18px 0 0;
  max-width: 380px;
}

.footer-motto {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-motto span {
  padding: 4px 12px;
  border: 1px solid rgba(242, 177, 52, 0.4);
  border-radius: 999px;
  color: #ffd98a;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.footer-col h2 {
  margin: 0 0 16px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
}

.footer-col ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: #dbe5f3;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--gold);
}

.footer-col address {
  font-style: normal;
}

.footer-col address p {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  margin: 0 0 14px;
}

.footer-col address i {
  margin-top: 5px;
  color: var(--gold);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 20px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: #91a3bf;
}

.footer-bottom p {
  margin: 0;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--red-strong));
  color: #ffffff;
  box-shadow: 0 12px 26px -12px rgba(212, 42, 50, 0.8);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease), visibility 0.3s;
}

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

/* ==========================================================
   UTILITIES
========================================================== */
.mt-0 {
  margin-top: 0;
}

.mb-0 {
  margin-bottom: 0;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.narrow {
  max-width: 820px;
  margin-inline: auto;
}

.center {
  text-align: center;
}

.muted {
  color: var(--muted);
}

.note {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid rgba(242, 177, 52, 0.45);
  border-radius: 14px;
  background: rgba(242, 177, 52, 0.1);
  font-size: 0.93rem;
}

.note i {
  margin-top: 4px;
  color: var(--gold-ink);
}

.note p {
  margin: 0;
}

/* ==========================================================
   MOTION
========================================================== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.stagger > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.stagger.in > * {
  opacity: 1;
  transform: none;
}

.stagger.in > *:nth-child(2) {
  transition-delay: 0.08s;
}

.stagger.in > *:nth-child(3) {
  transition-delay: 0.16s;
}

.stagger.in > *:nth-child(4) {
  transition-delay: 0.24s;
}

.stagger.in > *:nth-child(5) {
  transition-delay: 0.32s;
}

.stagger.in > *:nth-child(6) {
  transition-delay: 0.4s;
}

/* Without JS everything stays visible */
.no-js .reveal,
.no-js .stagger > * {
  opacity: 1;
  transform: none;
}

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

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

  .reveal,
  .stagger > * {
    opacity: 1;
    transform: none;
  }

  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
  }
}

@media print {
  .loader,
  .topbar,
  .site-header,
  .side-nav,
  .site-footer,
  .back-to-top,
  #progress-bar {
    display: none !important;
  }

  .page-hero {
    background: none;
    color: #000;
  }

  .page-hero h1 {
    color: #000;
  }
}
