/* ==========================================================================
   Daine College Shared Design System
   ========================================================================== */

:root {
  --navy: #132048;
  --navy-dark: #0b1530;
  --gold: #c6a15b;
  --gold-light: #e3c98a;
  --cream: #faf8f3;
  --paper: #f3efe4;
  --ink: #1c2436;
  --white: #ffffff;

  --ink-soft: #4a5164;
  --line: rgba(19, 32, 72, 0.12);
  --shadow: 0 20px 60px rgba(11, 21, 48, 0.12);
  --shadow-soft: 0 10px 30px rgba(11, 21, 48, 0.08);

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 940px;
  --radius: 14px;
  --radius-lg: 22px;

  --star-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Cpath fill='%23c6a15b' d='M17 0 L20.5 13.5 L34 17 L20.5 20.5 L17 34 L13.5 20.5 L0 17 L13.5 13.5 Z'/%3E%3C/svg%3E");
  --star-gold-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Cpath fill='%23e3c98a' d='M17 0 L20.5 13.5 L34 17 L20.5 20.5 L17 34 L13.5 20.5 L0 17 L13.5 13.5 Z'/%3E%3C/svg%3E");
  --star-navy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Cpath fill='%23132048' d='M17 0 L20.5 13.5 L34 17 L20.5 20.5 L17 34 L13.5 20.5 L0 17 L13.5 13.5 Z'/%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  font-size: 76%;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Inline text links (within paragraphs, lists, cards) need a clear affordance:
   nav/footer/buttons style their own links separately and are unaffected. */
p a, li a, .lede a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(198, 161, 91, 0.5);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
p a:hover, li a:hover, .lede a:hover {
  color: #8a6a2f;
  text-decoration-color: #8a6a2f;
}
.footer-columns a:not(.btn), .check-list li a, .nav-links a, .ticker-item {
  text-decoration: none;
  font-weight: inherit;
  color: inherit;
}

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-style: italic;
  font-variation-settings: "opsz" 40, "SOFT" 60, "WONK" 1;
}

h1 {
  font-size: clamp(2rem, 3.8vw, 3.4rem);
  font-weight: 630;
  line-height: 1.03;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
}
h3 {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
}
h4 { font-size: 1.15rem; }

/* The searchable H1 sits in the eyebrow slot so Google reads a plain
   description of the page, while the brand line below stays visually
   dominant as an H2. These two rules keep the old appearance exactly. */
h1.eyebrow {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 2.5px;
  font-variation-settings: "opsz" 20, "SOFT" 40, "WONK" 1;
}

.hero-title {
  font-size: clamp(2rem, 3.8vw, 3.4rem);
  font-weight: 630;
  line-height: 1.03;
  letter-spacing: -0.02em;
}

h1 em, h2 em, .quote-block, blockquote {
  font-style: italic;
  font-variation-settings: "opsz" 40, "SOFT" 60, "WONK" 1;
}

p { color: var(--ink-soft); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

section {
  padding: 22px 0;
}

@media (max-width: 720px) {
  section { padding: 24px 0; }
}

.section-tight { padding: 18px 0; }

/* On admissions.html, a bg-navy section is immediately followed by a
   problem-section, both the same colour with no visual break between them,
   so the two paddings stack into one dead gap. Halving one side is enough. */
.bg-navy + .problem-section {
  padding-top: 16px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #8a6a2f;
  font-weight: 600;
  margin-bottom: 20px;
  font-variation-settings: "opsz" 20, "SOFT" 40, "WONK" 1;
}

.eyebrow::before {
  content: "";
  width: 13px;
  height: 13px;
  background-image: var(--star-gold);
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.hero .eyebrow, .page-hero .eyebrow, .problem-section .eyebrow, .bg-navy .eyebrow {
  color: var(--gold-light);
}
.hero .eyebrow::before, .page-hero .eyebrow::before, .problem-section .eyebrow::before, .bg-navy .eyebrow::before {
  background-image: var(--star-gold-light);
}

.section-head {
  max-width: 680px;
  margin-bottom: 18px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head p {
  margin-top: 10px;
  font-size: 1.1rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
}

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 40px;
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.005em;
  font-size: 0.96rem;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-gold::before, .btn-ghost::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.65s ease;
  pointer-events: none;
}
.btn-gold:hover::before, .btn-ghost:hover::before {
  left: 130%;
}

.btn::after {
  content: "\2192";
  display: inline-block;
  transition: transform 0.25s ease;
  position: relative;
}
.btn:hover::after {
  transform: translateX(4px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  color: var(--white);
  border-color: var(--white);
}
.btn-gold:hover {
  background: var(--navy-dark);
  color: var(--white);
  border-color: transparent;
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-soft);
}

.btn-ghost {
  background: var(--navy);
  border-color: transparent;
  color: var(--white);
}
.btn-ghost:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  color: var(--white);
  border-color: var(--white);
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-soft);
}

/* Gold buttons sitting on a blue/navy background read with blue text instead of white,
   and swap to a blue fill with a gold outline on hover. */
.hero .btn-gold,
.cta-band .btn-gold,
.site-footer .btn-gold {
  color: var(--navy);
}
.hero .btn-gold:hover,
.cta-band .btn-gold:hover,
.site-footer .btn-gold:hover {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 0 0 4px var(--gold), 0 0 18px rgba(198, 161, 91, 0.5);
}

/* Blue buttons sitting on a blue/navy background read as a blue fill with a gold outline,
   and swap to a gold fill (blue text) on hover. */
.hero .btn-ghost,
.cta-band .btn-ghost,
.site-footer .btn-ghost {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 0 0 4px var(--gold);
}
.hero .btn-ghost:hover,
.cta-band .btn-ghost:hover,
.site-footer .btn-ghost:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  color: var(--navy);
  box-shadow: none;
}

.btn-block { width: 100%; justify-content: center; white-space: normal; text-align: center; }

/* ---------------- Logo ---------------- */

.logo-lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo-top-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.logo-mark-wrap {
  position: relative;
  width: 78px;
  flex-shrink: 0;
  transition: width 0.3s ease;
}

.nav-logo-mark {
  width: 100%;
  height: auto;
  display: block;
}

.nav-logo-mark-glow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
  animation: logo-mark-glow 3.2s ease-in-out infinite;
}

.logo-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.1rem;
  letter-spacing: 2.5px;
  color: var(--navy);
  line-height: 1.1;
  white-space: nowrap;
}

.logo-word.on-dark {
  color: var(--white);
}

.logo-tagline {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 2.5px;
  font-weight: 600;
  margin-top: 4px;
  background: linear-gradient(90deg, #8a6a2f 0%, var(--gold) 25%, var(--gold-light) 50%, var(--gold) 75%, #8a6a2f 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--gold);
  animation: shimmer 5s linear infinite;
}

.logo-tagline.on-dark {
  background: linear-gradient(90deg, var(--gold) 0%, #fff3d6 25%, var(--gold-light) 50%, #fff3d6 75%, var(--gold) 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--gold-light);
}

@supports (-webkit-background-clip: text) {
  .logo-tagline { -webkit-text-fill-color: transparent; }
}

.logo-full {
  text-align: center;
}
.logo-full-img {
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto;
  animation: logo-mark-glow 3.2s ease-in-out infinite;
}

/* ---------------- Header / Nav ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.35s ease;
}
.site-header.scrolled {
  box-shadow: 0 8px 30px rgba(11, 21, 48, 0.1);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: blur(10px);
  z-index: -1;
}
.site-header::after {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--gold) 50%, var(--navy) 100%);
  background-size: 200% 100%;
  animation: gradient-drift 6s linear infinite;
}

.nav-top {
  background-color: var(--white);
}
.nav-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px 12px;
  max-width: var(--container);
  margin: 0 auto;
  transition: padding 0.3s ease;
}
.site-header.scrolled .nav-top-inner { padding: 10px 28px 8px; }
.site-header.scrolled .logo-mark-wrap { width: 58px; }

.nav-bottom {
  border-top: 1px solid var(--line);
}
.nav-bottom .nav-links {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px 28px;
  transition: padding 0.3s ease;
}
.site-header.scrolled .nav-bottom .nav-links { padding: 7px 28px; }

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.nav-links a {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
  transition: color 0.25s ease;
  white-space: nowrap;
}

.nav-links a::before {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-links a:hover { color: var(--navy); }
.nav-links a:hover::before { transform: scaleX(1); }

.nav-links a.active {
  color: var(--navy);
  font-weight: 600;
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
}

/* "More" dropdown */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1.06rem;
  font-weight: 500;
  color: var(--ink);
  padding: 4px 0;
  transition: color 0.25s ease;
}
.nav-dropdown-trigger:hover,
.nav-dropdown-trigger.active,
.nav-dropdown.open .nav-dropdown-trigger {
  color: var(--navy);
}
.nav-dropdown-trigger.active { font-weight: 600; }
.nav-dropdown-chevron {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.nav-dropdown.open .nav-dropdown-chevron,
.nav-dropdown:hover .nav-dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 10px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 50;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.nav-dropdown-menu a {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 1.06rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-dropdown-menu a::before { display: none; }
.nav-dropdown-menu a:hover { background: var(--paper); color: var(--navy); }
.nav-dropdown-menu a.active { background: var(--paper); color: var(--navy); font-weight: 600; }
.nav-dropdown-menu a.active::after { display: none; }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--navy);
  display: block;
}

@media (max-width: 980px) {
  .nav-bottom {
    border-top: none;
  }
  .nav-cta .btn {
    display: none;
  }
  .logo-mark-wrap {
    width: 58px;
  }
  .logo-word {
    font-size: 1.7rem;
  }
  .logo-tagline {
    font-size: 0.68rem;
  }
  .nav-links,
  .nav-bottom .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--cream);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0;
    padding: 20px 28px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links > a {
    padding: 16px 0;
    width: 100%;
    border-bottom: 1px solid var(--line);
    font-size: 1.22rem;
  }
  .nav-cta .btn-outline-nav-text { display: none; }
  .nav-toggle { display: flex; }

  /* Dropdown becomes a flat, always-open section on mobile */
  .nav-dropdown {
    width: 100%;
    border-bottom: 1px solid var(--line);
  }
  .nav-dropdown-trigger {
    width: 100%;
    justify-content: flex-start;
    padding: 16px 0;
    font-size: 1.22rem;
    font-weight: 600;
    color: var(--gold);
    pointer-events: none;
  }
  .nav-dropdown-chevron { display: none; }
  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0 0 10px;
    min-width: 0;
  }
  .nav-dropdown-menu a {
    padding: 13px 0 13px 14px;
    border-left: 2px solid var(--line);
    border-radius: 0;
    font-size: 1.17rem;
  }
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  overflow: hidden;
  padding: 36px 0 30px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(198,161,91,0.2), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(198,161,91,0.14), transparent 40%),
    radial-gradient(rgba(255,255,255,0.09) 1px, transparent 1px);
  background-size: 200% 200%, 200% 200%, 26px 26px;
  background-position: 0% 0%, 100% 100%, 0 0;
  animation: aurora-drift 16s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
}

.hero h1, .hero .hero-title { color: var(--white); }
.hero-title-lead {
  display: inline-block;
  white-space: nowrap;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
}
.hero h1 em, .hero .hero-title em {
  font-style: italic;
  background: linear-gradient(90deg, var(--gold) 0%, #fff3d6 25%, var(--gold-light) 50%, #fff3d6 75%, var(--gold) 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--gold-light);
  animation: shimmer 5s linear infinite;
}
@supports (-webkit-background-clip: text) {
  .hero h1 em, .hero .hero-title em { -webkit-text-fill-color: transparent; }
}

.hero p.lede {
  color: rgba(255,255,255,0.82);
  margin: 22px 0 34px;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-trust + .hero-actions {
  margin-top: 30px;
}
.hero-actions .btn {
  flex: 1 1 190px;
  min-width: 190px;
  justify-content: center;
  white-space: normal;
  text-align: center;
}

.hero-trust {
  display: flex;
  gap: 28px;
  margin-top: 46px;
  flex-wrap: wrap;
}
.hero-trust div {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
}
.hero-trust strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold-light);
  display: block;
  line-height: 1;
}

.hero-media {
  position: relative;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.15);
  transform: rotate(1.6deg);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  /* The source clip is a portrait 480x854 recording. Left unconstrained it
     renders taller than the viewport itself. Cropped to a controlled aspect
     so it behaves like the landscape-ish hero media used on other pages. */
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
.hero-media:hover { transform: rotate(0deg) scale(1.015); }
.hero-media img, .hero-media video {
  border-radius: var(--radius-lg);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  top: -22px;
  right: -22px;
  width: 76px;
  height: 76px;
  background-image: var(--star-gold-light);
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.35));
  pointer-events: none;
  z-index: 2;
  animation: badge-float 4.5s ease-in-out infinite;
}

.page-hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 30px 0 26px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(198,161,91,0.16), transparent 55%);
  background-size: 180% 180%;
  animation: aurora-drift-center 12s ease-in-out infinite alternate;
}
.page-hero .container { position: relative; }
.page-hero h1, .page-hero .hero-title { color: var(--white); max-width: 780px; margin: 0 auto; }
.page-hero .eyebrow { justify-content: center; }
.page-hero-mark {
  width: 84px;
  height: auto;
  margin: 0 auto 20px;
}
.page-hero p.lede {
  color: rgba(255,255,255,0.8);
  max-width: 640px;
  margin: 18px auto 0;
}

/* ---------------- Cards ---------------- */

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--gold) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.card:hover {
  transform: translateY(-6px) perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  box-shadow: var(--shadow);
  border-color: transparent;
}
.card:hover::before {
  transform: scaleX(1);
}

.card .icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--navy) 0%, #223466 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  color: var(--gold-light);
  font-size: 1.4rem;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card:hover .icon {
  transform: rotate(-6deg) scale(1.06);
}

.card h3 {
  margin-bottom: 12px;
  font-style: normal;
  font-variation-settings: "opsz" 30, "SOFT" 15, "WONK" 0;
}
.card p { font-size: 1.12rem; }

.grid {
  display: grid;
  gap: 28px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------------- Pillars (Home) ---------------- */

.pillar {
  display: flex;
  gap: 22px;
  padding: 30px 24px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease;
}
.pillar:hover { background: var(--paper); }
.pillar:last-child { border-bottom: none; }
.pillar .num {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "opsz" 60, "SOFT" 40, "WONK" 1;
  font-size: 3.4rem;
  line-height: 1;
  color: var(--gold);
  flex-shrink: 0;
  width: 66px;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}
.pillar:hover .num { opacity: 1; }

@supports (-webkit-text-stroke: 1px black) {
  .pillar .num {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--gold);
    opacity: 0.55;
  }
  .pillar:hover .num {
    color: var(--gold);
    -webkit-text-stroke: 0;
    opacity: 1;
  }
}
.pillar h3 {
  margin-bottom: 8px;
  font-style: normal;
  font-variation-settings: "opsz" 30, "SOFT" 15, "WONK" 0;
}
.pillar p { font-size: 1.15rem; }

.original-style-heading {
  font-style: normal;
  font-variation-settings: "opsz" 30, "SOFT" 15, "WONK" 0;
}

/* ---------------- Problem section ---------------- */

.problem-section {
  background: var(--navy);
  color: var(--white);
}
.problem-section .section-head h2 { color: var(--white); }
.problem-section .section-head p { color: rgba(255,255,255,0.75); }

/* Inline links sit on the dark band here, so the default navy link colour
   would be navy on navy. */
.problem-section a {
  color: var(--gold-light);
  text-decoration-color: rgba(227, 201, 138, 0.5);
}
.problem-section a:hover { color: var(--white); }

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.problem-grid .problem-item:last-child { grid-column: 1 / -1; }
@media (max-width: 900px) { .problem-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .problem-grid { grid-template-columns: 1fr; } }

.problem-item {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 26px;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.problem-item:hover {
  background: rgba(198,161,91,0.1);
  border-color: rgba(198,161,91,0.35);
  transform: translateY(-4px);
}
.problem-item p {
  color: rgba(255,255,255,0.85);
  font-size: 1.12rem;
}
.problem-item .q {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold-light);
  font-size: 1.4rem;
  margin-bottom: 10px;
}

/* ---------------- Testimonials ---------------- */

.testimonial {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 44px 40px 36px;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.testimonial:hover {
  transform: translateY(-6px) perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  box-shadow: var(--shadow);
  border-color: rgba(198,161,91,0.3);
}
.testimonial::before {
  content: "\201C";
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "opsz" 100, "SOFT" 80, "WONK" 1;
  font-size: 6.5rem;
  color: var(--gold-light);
  opacity: 0.7;
  position: absolute;
  top: -10px;
  left: 20px;
  line-height: 1;
}
.testimonial blockquote::before {
  content: "";
  display: block;
  width: 96px;
  height: 14px;
  margin-bottom: 16px;
  background-image: var(--star-gold);
  background-repeat: repeat-x;
  background-size: 19px 14px;
  position: relative;
  z-index: 1;
}
.testimonial blockquote {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--navy);
  font-style: italic;
  font-variation-settings: "opsz" 40, "SOFT" 55, "WONK" 1;
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
}
.testimonial cite {
  font-style: normal;
  font-size: 1.01rem;
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---------------- Final CTA band ---------------- */

.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  text-align: center;
  padding: 30px 0;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 120%, rgba(198,161,91,0.2), transparent 60%);
  background-size: 180% 180%;
  animation: aurora-drift-center 12s ease-in-out infinite alternate;
}
.cta-band .container { position: relative; }
.cta-band h2 { color: var(--white); max-width: 700px; margin: 0 auto; }
.cta-band p { color: rgba(255,255,255,0.78); max-width: 560px; margin: 18px auto 34px; }
.cta-band .hero-actions { justify-content: center; }

/* ---------------- Footer ---------------- */

.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.7);
  padding-top: 40px;
}

.footer-enquire {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 46px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 72px;
  border: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 800px) {
  .footer-enquire { grid-template-columns: 1fr; padding: 32px; }
}
.footer-enquire h2 { color: var(--white); font-size: 1.8rem; }
.footer-enquire p { color: rgba(255,255,255,0.75); margin-top: 10px; }

.footer-columns {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}

/* A plain full-width rule, independent of the columns above, so this row's
   own (short) content never gets stretched to match the taller nav lists
   beside it — the bug that used to leave a big gap under the college blurb. */
.fc-divider {
  width: 100%;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin: 16px 0;
}

.footer-tutoring-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.fc-tutoring { grid-column: 1; }
.fc-register {
  grid-column: 2 / -1;
  display: flex;
  justify-content: flex-end;
}
.fc-register-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 480px;
  width: 100%;
}
.fc-register-row .btn {
  justify-content: center;
  white-space: normal;
  text-align: center;
}

.fc-tutoring-cta-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
.fc-tutoring-cta {
  justify-content: center;
  white-space: normal;
  text-align: center;
  min-width: 240px;
}

.wa-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid rgba(198,161,91,0.55);
  border-radius: 3px;
  font-family: var(--font-body, Inter, sans-serif);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold, #c6a15b);
  vertical-align: 2px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .footer-columns { grid-template-columns: repeat(2, 1fr); }
  .footer-tutoring-row { grid-template-columns: 1fr; gap: 20px; }
  .fc-register { grid-column: 1; justify-content: flex-start; }
  .fc-tutoring-cta-wrap { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .footer-columns { grid-template-columns: 1fr; }
}

/* h3 since the column labels were demoted from h4 to close a heading-level
   skip; the h4 selector is kept so any older markup still renders. */
.footer-columns h3,
.footer-columns h4 {
  color: var(--white);
  font-size: 0.96rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  font-variation-settings: "opsz" 30, "SOFT" 15, "WONK" 0;
}
.footer-columns li { margin-bottom: 11px; }
.footer-columns a:not(.btn) { font-size: 1.06rem; color: rgba(255,255,255,0.68); }
.footer-columns a:not(.btn):hover { color: var(--gold-light); }
.footer-columns p { color: rgba(255,255,255,0.68); font-size: 1.06rem; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* Right padding keeps the copyright clear of the fixed chat launcher,
     which sits bottom-right and would otherwise clip the last few words. */
  padding: 18px 96px 18px 0;
  font-size: 0.96rem;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 720px) {
  .footer-bottom { padding-right: 0; }
}

.trust-badges {
  display: flex;
  align-items: center;
  gap: 22px;
}
.trust-badges img {
  height: 40px;
  width: auto;
  border-radius: 6px;
  background: var(--white);
  padding: 4px;
}

/* ---------------- Forms ---------------- */

.form-grid {
  display: grid;
  gap: 16px;
}
.form-row-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .form-row-2 { grid-template-columns: 1fr; } }

.field label {
  display: block;
  font-size: 0.96rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--ink);
}
.footer-enquire .field label { color: rgba(255,255,255,0.85); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.form-note {
  font-size: 0.96rem;
  color: var(--ink-soft);
  margin-top: 14px;
}

.form-success {
  display: none;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
}
.form-success h3 { margin-bottom: 8px; }

/* ---------------- Utility ---------------- */

.tag {
  display: inline-block;
  background: var(--paper);
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: 20px;
}
.tag-gold { background: rgba(198,161,91,0.15); color: #8a6a2f; }

.divider {
  height: 1px;
  background: var(--line);
  margin: 32px 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; gap: 34px; }
}
.two-col.reverse .col-media { order: 2; }
@media (max-width: 860px) {
  .two-col.reverse .col-media { order: 0; }
}

.col-media img, .col-media video {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.media-pair .col-media { height: 100%; }
.media-pair .col-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 16px;
  font-size: 1.15rem;
  color: var(--ink);
}
.check-list li::before {
  content: "";
  width: 15px;
  height: 15px;
  margin-top: 3px;
  background-image: var(--star-gold);
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.bg-paper {
  background-color: var(--paper);
  background-image: radial-gradient(rgba(19,32,72,0.05) 1px, transparent 1px);
  background-size: 22px 22px;
}
.bg-navy { background: var(--navy); color: var(--white); }
.bg-navy h2, .bg-navy h3 { color: var(--white); }
.bg-navy p { color: rgba(255,255,255,0.78); }

/* A white card sitting on the navy band still needs dark text, or the
   headings and copy inherit white and vanish. */
.bg-navy .card { color: var(--ink); }
.bg-navy .card h3 { color: var(--navy); }
.bg-navy .card p { color: var(--ink-soft); }
.bg-navy .card a { color: var(--navy); }

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

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Timetable */
.timetable {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  font-size: 1.06rem;
}
.timetable th, .timetable td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.timetable th {
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
}
.timetable tbody tr:last-child td { border-bottom: none; }
.timetable tbody tr:hover { background: var(--paper); }
.timetable .time { color: var(--gold); font-weight: 700; white-space: nowrap; }
.table-scroll { overflow-x: auto; border-radius: var(--radius); }

/* Teacher profile card */
.teacher-card { text-align: center; }
.teacher-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 20px;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-soft);
  max-width: 160px;
}
.teacher-photo svg { width: 60%; height: 60%; color: var(--gold); }
.teacher-photo .initials {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--navy);
}
.teacher-card h3 { margin-bottom: 2px; }
.teacher-card .role { color: var(--gold); font-size: 1rem; font-weight: 600; margin-bottom: 12px; }
.teacher-card p { font-size: 1.06rem; }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.gallery img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.gallery .tall { grid-row: span 2; aspect-ratio: 4/7; }

/* Stat strip */
.stat-strip {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 30px;
  text-align: center;
}
.stat-strip .stat {
  position: relative;
  padding: 0 30px;
}
.stat-strip .stat:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 8px;
  right: -7px;
  width: 14px;
  height: 14px;
  background-image: var(--star-gold);
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.6;
}
@media (max-width: 720px) {
  .stat-strip .stat:not(:last-child)::after { display: none; }
}
.stat-strip .stat strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 650;
  font-variation-settings: "opsz" 80, "SOFT" 30, "WONK" 1;
  font-size: 3rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--navy) 20%, #8a6a2f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--navy);
}
@supports (-webkit-background-clip: text) {
  .stat-strip .stat strong { -webkit-text-fill-color: transparent; }
}
.stat-strip .stat span {
  font-size: 1rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.bg-navy .stat-strip .stat strong {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--white) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--gold-light);
}
.bg-navy .stat-strip .stat span { color: rgba(255,255,255,0.7); }

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--navy);
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--gold);
  font-size: 1.4rem;
  font-weight: 400;
  flex-shrink: 0;
  margin-left: 20px;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin-top: 14px; font-size: 1.12rem; }

.fee-table {
  width: 100%;
  border-collapse: collapse;
}
.fee-table td, .fee-table th {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.fee-table th { font-family: var(--font-display); color: var(--navy); font-size: 0.95rem; }

.badge-row {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.badge-row img { height: 52px; width: auto; border-radius: 8px; }

.quote-block {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-style: italic;
  font-variation-settings: "opsz" 60, "SOFT" 55, "WONK" 1;
  color: var(--navy);
  line-height: 1.5;
  border-left: 3px solid var(--gold);
  padding: 6px 0 6px 32px;
  position: relative;
}

/* ==========================================================================
   Motion & Effects
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  z-index: 200;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(198,161,91,0.6);
}

/* Ticker marquee, auto-injected after every hero / page-hero */
.ticker {
  overflow: hidden;
  background: var(--navy-dark);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 13px 0;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.92rem;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
  padding: 0 22px;
  font-variation-settings: "opsz" 20, "SOFT" 30, "WONK" 1;
}
.ticker-dot {
  width: 12px;
  height: 12px;
  background-image: var(--star-gold);
  background-size: contain;
  background-repeat: no-repeat;
  display: inline-block;
  flex-shrink: 0;
}

/* Card / testimonial tilt base state */
.card, .testimonial {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  will-change: transform;
}

/* Hero content entrance on load */
.hero-inner > div:first-child > * {
  opacity: 0;
  animation: hero-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero .eyebrow { animation-delay: 0.05s; }
.hero h1, .hero .hero-title { animation-delay: 0.16s; }
.hero p.lede { animation-delay: 0.28s; }
.hero-trust { animation-delay: 0.4s; }
.hero-actions { animation-delay: 0.52s; }
.hero-media { animation: hero-rise-media 0.9s 0.25s cubic-bezier(0.22, 1, 0.36, 1) backwards; }

.page-hero .container > * {
  opacity: 0;
  animation: hero-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.page-hero .container > *:nth-child(1) { animation-delay: 0.05s; }
.page-hero .container > *:nth-child(2) { animation-delay: 0.17s; }
.page-hero .container > *:nth-child(3) { animation-delay: 0.29s; }
.page-hero .container > *:nth-child(4) { animation-delay: 0.41s; }

/* Keyframes */
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-rise-media {
  from { opacity: 0; transform: translateY(26px) rotate(1.6deg) scale(0.97); }
  to { opacity: 1; transform: translateY(0) rotate(1.6deg) scale(1); }
}
@keyframes badge-float {
  0%, 100% { transform: translateY(0) rotate(12deg); }
  50% { transform: translateY(-10px) rotate(-6deg); }
}
@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}
@keyframes logo-mark-glow {
  0%, 100% {
    filter: brightness(1) saturate(1) drop-shadow(0 0 2px rgba(198,161,91,0.55));
  }
  50% {
    filter: brightness(1.6) saturate(1.5) drop-shadow(0 0 5px rgba(198,161,91,0.95));
  }
}
@keyframes logo-word-glow {
  0%, 100% {
    text-shadow: 0 0 3px rgba(138,106,47,0.9), 0 0 14px rgba(198,161,91,0.6), 0 0 28px rgba(198,161,91,0.35);
  }
  50% {
    text-shadow: 0 0 6px rgba(138,106,47,1), 0 0 24px rgba(198,161,91,1), 0 0 44px rgba(198,161,91,0.65);
  }
}
@keyframes logo-word-glow-dark {
  0%, 100% {
    text-shadow: 0 0 8px rgba(227,201,138,0.6), 0 0 20px rgba(227,201,138,0.4);
  }
  50% {
    text-shadow: 0 0 18px rgba(227,201,138,1), 0 0 36px rgba(227,201,138,0.75);
  }
}
@keyframes gradient-drift {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}
@keyframes aurora-drift {
  0% { background-position: 0% 0%, 100% 100%, 0 0; }
  100% { background-position: 30% 20%, 70% 80%, 0 0; }
}
@keyframes aurora-drift-center {
  0% { background-position: 50% 0%; }
  100% { background-position: 35% 15%; }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Lets keyboard and screen-reader users jump the 10-item nav on every page.
   Visible only once focused. */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  padding: 14px 20px;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transform: translateY(-100%);
  transition: transform 0.18s ease;
}
.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--gold-light);
  outline-offset: -3px;
}

/* A full-width bar would sit on top of the logo, so the page moves down to
   make room for it rather than letting it cover the header. */
body:has(.skip-link:focus) { padding-top: 60px; }
body:has(.skip-link:focus) .site-header { top: 60px; }

/* The browser default focus ring is close to invisible on navy. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

.bg-navy a:focus-visible,
.hero a:focus-visible,
.page-hero a:focus-visible,
.site-footer a:focus-visible,
.problem-section a:focus-visible,
.cta-band a:focus-visible,
.site-header a:focus-visible {
  outline-color: var(--gold-light);
}

/* The header CTA was white on gold, about 1.6:1. Navy on gold is ~5.9:1 and
   matches the gold buttons elsewhere on the site. */
.nav-cta .btn-gold { color: var(--navy); }
.nav-cta .btn-gold:hover { color: var(--white); }

/* Enquiry form error, shown only when a submission actually fails. */
.form-error {
  margin-top: 4px;
  padding: 12px 16px;
  border: 1px solid rgba(168, 50, 74, 0.35);
  border-radius: var(--radius);
  background: rgba(168, 50, 74, 0.06);
  color: #8c2338;
  font-size: 1rem;
}
.form-error[hidden] { display: none; }

/* ==========================================================================
   Print
   Parents print the fees and admissions pages. Strip the furniture, keep
   the content readable in black on white and expose link targets.
   ========================================================================== */
@media print {
  .site-header,
  .site-footer,
  .ticker,
  .scroll-progress,
  .skip-link,
  .dc-chat-launcher,
  .dc-chat-panel,
  .cta-band,
  .hero-actions,
  video {
    display: none !important;
  }

  html, body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
  }

  .bg-navy, .bg-paper, .problem-section, .hero, .page-hero, .card, .pillar {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    border-color: #999 !important;
  }

  h1, h2, h3, h4, p, li, td, th,
  .bg-navy h2, .bg-navy h3, .bg-navy p,
  .hero h1, .hero .hero-title, .page-hero .hero-title {
    color: #000 !important;
  }

  .eyebrow, h1.eyebrow { color: #555 !important; }

  section { padding: 12pt 0 !important; }

  /* A printed link is useless without its destination. */
  main a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }

  .reveal { opacity: 1 !important; transform: none !important; }

  h1, h2, h3 { page-break-after: avoid; }
  .card, .faq-item, table { page-break-inside: avoid; }
}


/* ---------------- Nine Reasons, folding showcase ---------------- */
/*
 * A decorative loop of the nine pillar cards below: one large card shown
 * flat, with the next two waiting behind it, folded away and peeking out at
 * an angle, echoing a hand-folded paper concertina. js/main.js swaps a
 * data-state attribute on a timer; the position/rotation/scale each state
 * maps to is transitioned here in CSS. Purely visual: aria-hidden, because
 * the same nine headlines and descriptions already exist as real,
 * accessible text immediately below it.
 */
.reasons-loop {
  display: flex;
  justify-content: center;
  margin: 0 0 10px;
}
.reasons-loop-stage {
  position: relative;
  width: clamp(260px, 46vw, 560px);
  aspect-ratio: 1 / 1.03;
  perspective: 1600px;
  overflow: hidden;
}
.reasons-loop-stage::before {
  content: "";
  position: absolute;
  inset: -16%;
  background: radial-gradient(ellipse at 38% 45%, rgba(198, 161, 91, 0.18) 0%, rgba(198, 161, 91, 0) 70%);
  z-index: 0;
}
.reasons-loop-card {
  position: absolute;
  top: 3%;
  left: 2%;
  width: 76%;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  transform-style: preserve-3d;
  transform-origin: left center;
  box-shadow: 0 26px 54px rgba(11, 21, 48, 0.4);
  transition: transform 1s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.9s ease;
}
.reasons-loop-card picture,
.reasons-loop-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The card currently shown flat and fully readable. */
.reasons-loop-card[data-state="active"] {
  transform: translate3d(0, 0, 0) rotateY(0deg) scale(1);
  opacity: 1;
  z-index: 40;
}
/* Next up: folded away to the right, clearly visible as a waiting card. */
.reasons-loop-card[data-state="queue1"] {
  transform: translate3d(88%, 5%, -90px) rotateY(34deg) scale(0.6);
  opacity: 1;
  z-index: 30;
}
/* Further back: smaller, dimmer, mostly bled off the edge of the stage. */
.reasons-loop-card[data-state="queue2"] {
  transform: translate3d(128%, 9%, -160px) rotateY(40deg) scale(0.46);
  opacity: 0.7;
  z-index: 20;
}
/* Everywhere else in the deck: parked out of sight in the same spot queue2
   occupies, so it fades in rather than popping in when its turn comes. */
.reasons-loop-card[data-state="waiting"] {
  transform: translate3d(128%, 9%, -160px) rotateY(40deg) scale(0.46);
  opacity: 0;
  z-index: 10;
}

@media (prefers-reduced-motion: reduce) {
  .reasons-loop-card { transition: none; }
  .reasons-loop-card[data-state="active"] { transform: translate3d(0, 0, 0) rotateY(0deg) scale(1); opacity: 1; }
  .reasons-loop-card[data-state="queue1"],
  .reasons-loop-card[data-state="queue2"],
  .reasons-loop-card[data-state="waiting"] { opacity: 0; }
}

@media (max-width: 640px) {
  .reasons-loop { margin-bottom: 14px; }
}
