/* ===========================================================
   Legacy Schools: design system
   Palette sampled directly from the school crest:
     navy   #0D2947  (deep, grounding; used for chrome & dark sections)
     sky    #9AD8FC  (the crest's light blue; accents, highlights)
     sky-mid#5D92B0  (secondary blue; supporting text on light bg)
     blush  #E7AEC0  (sparing pink accent; co-ed warmth, used thinly)
   Type: Fraunces (a warm, slightly organic serif; the baobab-tree
   crest is the brand's anchor image, so headlines get a typeface with
   the same handmade, rooted character rather than a cold geometric
   sans) paired with Work Sans for body copy.
   =========================================================== */

:root {
  --navy: #0D2947;
  --navy-deep: #081A2E;
  --sky: #9AD8FC;
  --sky-mid: #5D92B0;
  --blush: #E7AEC0;
  --paper: #F7F9FB;
  --ink: #16202B;
  --ink-soft: #48566A;
  --border: #E2E8EF;
  --radius: 6px;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: var(--navy); }
h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { max-width: 62ch; color: var(--ink-soft); }
ul { padding-left: 1.1em; color: var(--ink-soft); }
li { margin-bottom: .5em; }
li strong { color: var(--ink); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247,249,251,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand-mark { display: block; }
.brand-word { font-family: var(--serif); font-size: 1.25rem; letter-spacing: .01em; }
.brand-word em { font-style: normal; color: var(--sky-mid); }
.main-nav ul { display: flex; align-items: center; gap: 8px; list-style: none; padding: 0; margin: 0; }
.main-nav > ul > li > a,
.main-nav > ul > li > button.dropdown-toggle { text-decoration: none; font-size: .95rem; color: var(--ink-soft); padding: 8px 14px; border-radius: 6px; transition: color .15s ease, background .15s ease; background: none; border: 0; cursor: pointer; font-family: inherit; display: flex; align-items: center; gap: 6px; }
.main-nav a:hover, .main-nav a.is-active,
.main-nav .dropdown-toggle:hover, .main-nav .dropdown-toggle.is-active { color: var(--navy); background: rgba(13,41,71,.06); }
.nav-toggle { display: none; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; padding: 8px; color: var(--navy); }
.nav-toggle svg { width: 24px; height: 24px; }

/* "Our Campuses" dropdown (desktop) */
.has-dropdown { position: relative; }
.dropdown-toggle svg { width: 13px; height: 13px; transition: transform .15s ease; }
.has-dropdown.is-open .dropdown-toggle svg { transform: rotate(180deg); }
.dropdown-menu {
  list-style: none; margin: 0; padding: 8px; position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(-6px); min-width: 240px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 18px 40px -16px rgba(13,41,71,.28);
  opacity: 0; visibility: hidden; transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.has-dropdown.is-open .dropdown-menu, .has-dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown-menu li + li { margin-top: 2px; }
.dropdown-menu a { display: block; padding: 9px 12px; border-radius: 6px; font-size: .9rem; color: var(--ink-soft); text-decoration: none; }
.dropdown-menu a:hover, .dropdown-menu a.is-active { background: var(--paper); color: var(--navy); }

/* Mobile nav panel: hidden on desktop, shown via the hamburger toggle */
.mobile-nav { display: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: var(--radius); font-size: .95rem; font-weight: 500; text-decoration: none; border: 1px solid transparent; transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* ---------- Hero (asymmetric, not centered) ---------- */
.hero { padding: 64px 0 88px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-eyebrow { font-family: var(--serif); font-style: italic; color: var(--sky-mid); font-size: 1.05rem; margin-bottom: 14px; }
.hero p.lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 46ch; }
.hero-ctas { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-visual { position: relative; }
.hero-visual .img-frame { border-radius: 14px; overflow: hidden; box-shadow: 0 24px 48px -20px rgba(13,41,71,.35); }
.hero-visual::before {
  content: ""; position: absolute; inset: -18px -18px auto auto; width: 220px; height: 220px;
  background: var(--sky); opacity: .35; border-radius: 50%; filter: blur(6px); z-index: -1;
}

/* ---------- Locked image frames ---------- */
.img-frame { position: relative; width: 100%; height: 0; padding-top: var(--ratio, 75%); background: var(--sky-mid); border-radius: var(--radius); overflow: hidden; }
.img-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.img-frame-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; background: linear-gradient(160deg, var(--navy), var(--sky-mid)); color: rgba(255,255,255,.85); font-size: .8rem; letter-spacing: .02em; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
section.on-navy { background: var(--navy); color: #fff; }
section.on-navy h2, section.on-navy .hero-eyebrow { color: #fff; }
section.on-navy p, section.on-navy li, section.on-navy li strong { color: rgba(255,255,255,.82); }
.section-head { max-width: 640px; margin-bottom: 40px; }

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

/* Pillars: plain list, not generic identical cards; each pillar gets
   a thin left rule (a "root" line, echoing the baobab motif) rather
   than a repeated card/shadow/icon kit. */
.pillars ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.pillars li { border-left: 3px solid var(--blush); padding-left: 20px; margin: 0; }

/* ---------- Hub-and-spoke campus network ----------
   This is a literal diagram of the school's own "Hub-and-Spoke Model",
   not a generic card grid; the connecting lines are the point. */
.network { position: relative; }
.network-hub { text-align: center; margin-bottom: 8px; }
.network-hub .node { display: inline-flex; align-items: center; justify-content: center; width: 96px; height: 96px; border-radius: 50%; background: var(--navy); color: #fff; font-family: var(--serif); font-size: .95rem; margin: 0 auto 8px; }
.network-line { width: 2px; height: 40px; background: var(--border); margin: 0 auto; }
.spokes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; position: relative; padding-top: 12px; }
.spokes::before { content: ""; position: absolute; top: 0; left: 8.33%; right: 8.33%; height: 2px; background: var(--border); }
.spoke { background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; position: relative; }
.spoke::before { content: ""; position: absolute; top: -12px; left: 50%; width: 2px; height: 12px; background: var(--border); }
.spoke-body { padding: 18px; }
.spoke-body h3 { margin-bottom: 6px; }
.spoke-body p { font-size: .9rem; margin: 0; }

@media (max-width: 900px) {
  .hero-grid, .two-col { grid-template-columns: 1fr; }
  .spokes { grid-template-columns: repeat(3, 1fr); }
  .spokes::before, .spoke::before { display: none; }
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--border); max-height: calc(100vh - 76px); overflow-y: auto; }
  .mobile-nav.is-open { display: block; }
  .mobile-nav > ul { list-style: none; margin: 0; padding: 8px 24px 20px; }
  .mobile-nav > ul > li > a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--ink-soft); }
  .mobile-nav a.is-active { color: var(--navy); font-weight: 500; }
  .mobile-nav details { border-bottom: 1px solid var(--border); }
  .mobile-nav summary { padding: 12px 0; cursor: pointer; color: var(--ink-soft); list-style: none; display: flex; justify-content: space-between; align-items: center; }
  .mobile-nav summary::after { content: "+"; font-size: 1.2rem; color: var(--sky-mid); }
  .mobile-nav details[open] summary::after { content: "\2212"; }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav details ul { list-style: none; margin: 0; padding: 0 0 12px 16px; }
  .mobile-nav details a { display: block; padding: 10px 0; text-decoration: none; color: var(--ink-soft); font-size: .92rem; }
}
@media (max-width: 560px) {
  .spokes { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.72); padding: 48px 0 28px; }
.footer-inner { display: flex; flex-direction: column; gap: 18px; align-items: center; text-align: center; }
.footer-motto { font-family: var(--serif); font-style: italic; color: #fff; font-size: 1.1rem; }
.social-links { display: flex; gap: 12px; }
.social-links a { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); color: rgba(255,255,255,.85); transition: background .15s ease, color .15s ease; }
.social-links a:hover { background: var(--sky); color: var(--navy); }
.social-links svg { width: 18px; height: 18px; }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-nav a { text-decoration: none; font-size: .88rem; color: rgba(255,255,255,.72); }
.footer-nav a:hover { color: #fff; }
.footer-copy { font-size: .8rem; margin: 0; color: rgba(255,255,255,.45); }

/* ---------- Simple content table (International School pathways) ---------- */
table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; }
table th, table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: .92rem; }
table th { font-family: var(--serif); color: var(--navy); font-weight: 500; }

/* Traditional-vs-Legacy comparison table: left column reads as the
   thing being moved away from, right column as the brand's approach —
   colour does that work instead of icons baked into editable content. */
.diff-table th:first-child, .diff-table td:first-child { color: #8A6A70; background: #FBF4F6; }
.diff-table th:last-child, .diff-table td:last-child { color: var(--navy); background: #F3F8FC; }
.diff-table th { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }

.pull-quote { position: relative; max-width: 62ch; margin: 40px 0; padding-left: 28px; border-left: 3px solid var(--blush); font-family: var(--serif); font-size: 1.3rem; font-style: italic; color: var(--navy); }
.pull-quote svg { width: 22px; height: 22px; color: var(--sky-mid); margin-bottom: 10px; display: block; }
section.on-navy .pull-quote { color: #fff; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: 1fr; } }

/* ---------- News ---------- */
.news-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.news-card { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.news-card:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -20px rgba(13,41,71,.25); }
.news-card-image { position: relative; width: 100%; padding-top: 62%; background: var(--sky-mid); overflow: hidden; }
.news-card-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.news-card-body { padding: 18px 20px 22px; }
.news-date { font-family: var(--serif); font-style: italic; color: var(--sky-mid); font-size: .85rem; }
.news-card-body h3 { margin: 6px 0 8px; font-size: 1.05rem; }
.news-card-body p { font-size: .9rem; margin: 0; color: var(--ink-soft); }
.news-meta { margin-top: 8px !important; font-size: .8rem !important; color: var(--sky-mid) !important; font-weight: 500; }
.event-badge { position: absolute; top: 12px; right: 12px; background: var(--blush); color: var(--navy); font-size: .7rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; }
@media (max-width: 900px) { .news-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .news-list { grid-template-columns: 1fr; } }

/* ---------- Get Involved: pathways, alumni, projects ---------- */
.pathway-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.pathway-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 24px; }
.pathway-card h3 { margin-top: 0; }
@media (max-width: 700px) { .pathway-grid { grid-template-columns: 1fr; } }

.alumni-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.alumni-card { display: flex; gap: 18px; align-items: flex-start; }
.alumni-photo { width: 84px; flex: none; }
.alumni-photo .img-frame { border-radius: 50%; }
.alumni-role { font-size: .85rem; color: var(--sky); margin: 2px 0 10px; }
.alumni-quote { font-family: var(--serif); font-style: italic; font-size: 1rem; }
@media (max-width: 700px) { .alumni-grid { grid-template-columns: 1fr; } }

.project-list { display: grid; gap: 20px; }
.project-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 26px; }
.project-card h3 { margin-top: 0; }
.progress-bar { width: 100%; height: 8px; background: var(--paper); border-radius: 20px; overflow: hidden; margin: 14px 0 4px; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--sky-mid), var(--sky)); border-radius: 20px; }
.progress-label { font-size: .82rem; color: var(--sky-mid); font-weight: 500; }
.project-target { font-size: .85rem; color: var(--ink-soft); margin: 8px 0 16px; }
