/* Glenrise Educational Centre -- shared styles */
/* Font loading (Fraunces, Work Sans) moved to <link rel="preconnect"> + <link rel="stylesheet"> in each page's <head> to avoid a render-blocking @import waterfall. */

:root {
  --navy: #0F1D3A;
  --navy-2: #16294D;
  --navy-deep: #0A1428;
  --sky: #94D9FE;
  --sky-deep: #4FA8D8;
  --teal: #2C8C86;
  --teal-text: #1D6864;
  --teal-cta: #256F6A;
  --cream: #F7F4EC;
  --cream-2: #EFE9DA;
  --ink: #1B1B1B;
  --ink-soft: #4A4A4A;
  --line: rgba(15, 29, 58, 0.14);
  --line-on-navy: rgba(247, 244, 236, 0.16);
  --radius: 10px;
  --radius-lg: 16px;
  --maxw: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Work Sans', sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', serif;
  color: var(--navy);
  margin: 0 0 0.5em;
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.3rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 2.8vw, 2.35rem); }
h3 { font-size: 1.22rem; }

p { margin: 0 0 1em; max-width: 62ch; color: var(--ink-soft); }

a { color: inherit; }

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--sky-deep);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  color: var(--navy);
  padding: 12px 20px;
  z-index: 999;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}
.wrap-narrow { max-width: 70ch; }
.link-teal { color: var(--teal-text); font-weight: 600; }
.btn-block-top { margin-top: 10px; width: 100%; text-align: center; }

/* ---------- Top info bar ---------- */
.top-bar {
  background: var(--navy-deep);
  color: rgba(247, 244, 236, 0.82);
  font-size: 0.82rem;
}
.top-bar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 32px;
  gap: 20px;
  flex-wrap: wrap;
}
.top-bar a { text-decoration: none; color: inherit; }
.top-bar a:hover { color: var(--sky); }
.top-bar .top-links { display: flex; gap: 24px; flex-wrap: wrap; }
.top-bar .top-links span { opacity: 0.62; margin-right: 24px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-mark {
  background: #fff;
  border-radius: 8px;
  padding: 5px;
  line-height: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  flex-shrink: 0;
}
.brand-mark img { height: 40px; width: 40px; object-fit: contain; display: block; flex-shrink: 0; }
.brand-text { line-height: 1.2; flex-shrink: 0; }
.brand-text .name {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  color: #fff;
  font-size: 1.02rem;
  display: block;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-text .tag {
  font-size: 0.68rem;
  color: var(--sky);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 1;
}
nav.main-nav a.nav-cta {
  margin-left: auto;
}
nav.main-nav a {
  text-decoration: none;
  color: rgba(247, 244, 236, 0.88);
  font-size: 0.82rem;
  white-space: nowrap;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
nav.main-nav a:hover,
nav.main-nav a.active {
  border-bottom-color: var(--sky);
  color: #fff;
}
nav.main-nav a.nav-cta {
  border: 1.5px solid var(--sky);
  border-radius: 6px;
  padding: 8px 14px;
  color: #fff;
  font-weight: 600;
}
nav.main-nav a.nav-cta:hover { background: var(--sky); color: var(--navy); border-bottom: 1.5px solid var(--sky); }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: 1.5px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn-sky { background: var(--sky); color: var(--navy); border-color: var(--sky); }
.btn-sky:hover { box-shadow: 0 10px 22px rgba(148, 217, 254, 0.4); }
.btn-outline-light { border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-outline-light:hover { border-color: #fff; }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-navy:hover { box-shadow: 0 10px 22px rgba(15, 29, 58, 0.3); }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { box-shadow: 0 10px 22px rgba(0,0,0,0.15); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0;
}

/* ---------- Kicker / badge (replaces dotted eyebrow) ---------- */
.kicker {
  display: inline-block;
  color: var(--teal-text);
  font-weight: 600;
  font-size: 0.86rem;
  margin-bottom: 14px;
  position: relative;
  padding-left: 18px;
}
.kicker::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 10px; height: 2px;
  background: var(--sky-deep);
}
.kicker-light { color: var(--sky); }
.kicker-light::before { background: var(--sky); }

.hero-actions { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }

/* ---------- Hero variant: full-bleed image with overlaid text (crops to fill, unlike the rest of the site) ---------- */
.hero-overlay {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-overlay-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}
.hero-overlay-scrim {
  position: absolute;
  inset: 0;
  /* Floor kept >=0.62 so white hero text stays >=4.5:1 against the brightest sky pixels in the photo (WCAG AA). */
  background: linear-gradient(100deg, rgba(10,20,40,0.90) 0%, rgba(10,20,40,0.72) 45%, rgba(10,20,40,0.62) 100%);
}
.hero-overlay-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0;
  padding-top: 60px;
  padding-bottom: 60px;
}
.hero-overlay-content .kicker { color: var(--sky); }
.hero-overlay-content .kicker::before { background: var(--sky); }
.hero-overlay-content h1 { color: #fff; }
.hero-overlay-content p.lead { color: rgba(255,255,255,0.88); }
.hero-overlay-content .proof-strip { border-top-color: rgba(255,255,255,0.25); }
.hero-overlay-content .proof-strip span { color: #fff; }
@media (max-width: 900px) {
  .hero-overlay { min-height: 460px; }
  .hero-overlay-scrim { background: linear-gradient(180deg, rgba(10,20,40,0.65) 0%, rgba(10,20,40,0.85) 65%, rgba(10,20,40,0.92) 100%); }
  .hero-overlay-content { max-width: 100%; }
}

/* ---------- Page header (non-home) ---------- */
.page-header {
  position: relative;
  padding: 52px 0 42px;
  background: var(--navy);
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
}
/* Background photo + scrim per page, floor kept at 0.72 so white text stays >=4.5:1 against the brightest sampled pixel in each photo (WCAG AA). Landscape/building shots only -- no people, so nothing gets cropped in a way that cuts off a head or a foot. */
.page-header--about { background-image: linear-gradient(rgba(10,20,40,0.72), rgba(10,20,40,0.72)), url('img/campus-building.jpg'); }
.page-header--programmes { background-image: linear-gradient(rgba(10,20,40,0.72), rgba(10,20,40,0.72)), url('img/campus-tyre-garden.jpg'); }
.page-header--digital-learning { background-image: linear-gradient(rgba(10,20,40,0.72), rgba(10,20,40,0.72)), url('img/campus-wide.jpg'); }
.page-header--classroom-portal { background-image: linear-gradient(rgba(10,20,40,0.72), rgba(10,20,40,0.72)), url('img/campus-visitors.jpg'); }
.page-header--admissions { background-image: linear-gradient(rgba(10,20,40,0.72), rgba(10,20,40,0.72)), url('img/campus-building.jpg'); }
.page-header--gallery { background-image: linear-gradient(rgba(10,20,40,0.72), rgba(10,20,40,0.72)), url('img/campus-tyre-garden.jpg'); }
.page-header--contact { background-image: linear-gradient(rgba(10,20,40,0.72), rgba(10,20,40,0.72)), url('img/campus-wide.jpg'); }
.page-header .kicker { color: var(--sky); }
.page-header .kicker::before { background: var(--sky); }
.page-header h1 { color: #fff; }
.page-header p { font-size: 1.05rem; color: rgba(247, 244, 236, 0.82); }

/* ---------- Highlight strip / cards ---------- */
.strip { padding: 48px 0; }
.strip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: start;
}
.card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: 0 16px 36px rgba(15, 29, 58, 0.1); transform: translateY(-2px); }
.card .card-media {
  border-bottom: 3px solid var(--sky);
  aspect-ratio: 4 / 3;
  background: var(--cream-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card .card-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card .card-body { padding: 24px 26px 28px; }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: 0.96rem; }
.card p + p { margin-top: 12px; }

.leader-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  align-items: start;
  justify-items: center;
}
.leader-card { max-width: 380px; width: 100%; }
.leader-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px rgba(15, 29, 58, 0.28), 0 4px 12px rgba(15, 29, 58, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.leader-card img:hover { transform: translateY(-4px); box-shadow: 0 32px 60px rgba(15, 29, 58, 0.32), 0 6px 16px rgba(15, 29, 58, 0.14); }

/* ---------- Vision / Mission / Values ---------- */
.vm-section {
  background: var(--cream-2);
  padding: 48px 0;
}
.vm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 28px;
}
.vm-item {
  border-top: 3px solid var(--sky);
  padding-top: 16px;
}
.vm-item h4 {
  font-family: 'Fraunces', serif;
  color: var(--navy);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.vm-item p { margin: 0; }
.values-row { display: flex; flex-wrap: wrap; gap: 10px; }
.value-pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.88rem;
  color: var(--navy);
  font-weight: 500;
}
/* ---------- Section generic ---------- */
.section { padding: 48px 0; }
.section-alt { background: var(--cream-2); }
.section-head { max-width: 60ch; margin-bottom: 32px; }

/* ---------- Proof strip (honest differentiators, not invented stats) ---------- */
.proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.proof-strip span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}

/* ---------- Audience paths ---------- */
.audience-paths {
  padding: 0 0 48px;
}
.path-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.path-tile {
  display: block;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.path-tile:hover { border-color: var(--sky-deep); transform: translateY(-2px); }
.path-tile .path-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  display: block;
}
.path-tile h3 { margin-bottom: 6px; }
.path-tile p { margin: 0; font-size: 0.92rem; }

/* ---------- Two-col feature (image never cropped) ---------- */
.feature { padding: 40px 0; }
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.feature-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 6px solid #fff;
  box-shadow: 0 18px 40px rgba(15, 29, 58, 0.14);
  aspect-ratio: 4 / 3;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.feature ul { padding-left: 20px; color: var(--ink-soft); }
.feature li { margin-bottom: 8px; }

/* ---------- Gallery (equal ratio, resized -- never cropped) ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.gallery figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ---------- Objectives list ---------- */
.obj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.obj-item { border-top: 3px solid var(--sky); padding-top: 18px; }
.obj-item h4 { font-family: 'Fraunces', serif; color: var(--navy); font-size: 1.1rem; margin-bottom: 8px; }
.obj-item p { font-size: 0.95rem; margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--teal-cta);
  color: #fff;
  padding: 40px 0;
  text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: rgba(255,255,255,0.94); margin: 0 auto 26px; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: flex; flex-direction: column; gap: 0; }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 22px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step-num {
  counter-increment: step;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--sky);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 600;
}
.step-num::before { content: counter(step); }

/* ---------- Fee note box ---------- */
.note-box {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--sky-deep);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin-top: 12px;
}
.note-box h4 { margin-bottom: 8px; }
.note-box p { margin: 0; }

/* ---------- Fee / uniform table ---------- */
.fee-table {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.fee-row {
  display: flex;
  justify-content: space-between;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.fee-row:first-child { border-top: none; }
.fee-row span:first-child { color: var(--ink); }
.fee-row span:last-child { font-weight: 600; color: var(--navy); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 50px;
  align-items: start;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.contact-card h3 { margin-bottom: 4px; }
.contact-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.contact-row:first-of-type { border-top: none; }
.contact-row .ico {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--cream-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--navy);
  font-weight: 700;
}
.map-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  height: 100%;
  min-height: 440px;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Portal ---------- */
.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.portal-card {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  position: relative;
  overflow: hidden;
}
.portal-card.alt { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.portal-card.alt h3, .portal-card.alt p { color: var(--navy); }
.portal-card.alt p { color: var(--ink-soft); }
.portal-card h3 { color: #fff; font-size: 1.5rem; margin-bottom: 10px; }
.portal-card p { color: rgba(247,244,236,0.82); }
.portal-card .btn { margin-top: 18px; }
.faq-item { padding: 22px 0; border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item h4 { font-family: 'Fraunces', serif; color: var(--navy); font-size: 1.05rem; margin-bottom: 6px; }
.faq-item p { margin: 0; }

/* ---------- Footer ---------- */
footer {
  background: var(--navy-deep);
  color: rgba(247, 244, 236, 0.72);
  padding: 60px 0 26px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(247, 244, 236, 0.12);
}
.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.footer-brand .brand-mark { padding: 4px; }
.footer-brand .brand-mark img { height: 32px; width: 32px; }
.footer-brand span { font-family: 'Fraunces', serif; color: #fff; font-weight: 600; }
.footer-tagline { max-width: 30ch; }
footer h5 { color: #fff; font-family: 'Work Sans', sans-serif; font-size: 0.86rem; letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 16px; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin-bottom: 11px; font-size: 0.92rem; }
footer a { text-decoration: none; color: inherit; }
footer a:hover { color: var(--sky); }
.footer-bottom {
  padding-top: 22px;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  opacity: 0.75;
}

/* ---------- Responsive ---------- */
@media (max-width: 1250px) {
  .top-bar { display: none; }
  .nav-toggle { display: block; }
  nav.main-nav { position: fixed; top: 66px; left: 0; right: 0; background: var(--navy);
    flex-direction: column; align-items: flex-start; padding: 22px 32px; gap: 20px;
    border-top: 1px solid var(--line-on-navy); display: none; max-height: calc(100vh - 66px); overflow-y: auto; }
  nav.main-nav.open { display: flex; }
  nav.main-nav a.nav-cta { border-color: var(--sky); margin-left: 0; }
}

@media (max-width: 900px) {
  .strip-grid, .obj-grid, .portal-grid, .path-grid, .leader-grid { grid-template-columns: 1fr; }
  .vm-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .site-header .wrap { padding-left: 16px; padding-right: 16px; gap: 10px; }
  .brand { gap: 8px; }
  .brand-mark img { height: 30px; width: 30px; }
  .brand-text { flex-shrink: 1; min-width: 0; }
  .brand-text .name { white-space: normal; font-size: 0.86rem; line-height: 1.15; }
}
