/* Cor Mariae Boys College Abuja — design system */
:root {
  --navy: #0d2240;
  --navy-deep: #081a31;
  --navy-soft: #14355f;
  --gold: #c8a24a;
  --gold-light: #e3c67c;
  --cream: #f7f4ec;
  --white: #ffffff;
  --ink: #16202e;
  --muted: #5d6b7d;
  --line: #e2ded2;
  --maroon: #7b1f2b;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --radius: 4px;
  --radius-lg: 10px;
  --shadow: 0 18px 40px -22px rgba(13, 34, 64, 0.45);
  --shadow-soft: 0 10px 26px -18px rgba(13, 34, 64, 0.35);
  --wrap: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--gold); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.18;
  margin: 0 0 .6em;
  font-weight: 700;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.section--cream { background: var(--cream); }
.section--navy { background: var(--navy); color: #dfe6f0; }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--white); }

.eyebrow {
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 .8rem;
}
.lead { font-size: 1.1rem; color: var(--muted); }
.section--navy .lead { color: #b9c6d8; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; max-width: 720px; }

.rule { width: 62px; height: 3px; background: var(--gold); border: 0; margin: 0 0 1.4rem; }
.center .rule { margin-left: auto; margin-right: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .82rem 1.5rem;
  font-weight: 700; font-size: .84rem;
  letter-spacing: .09em; text-transform: uppercase;
  border-radius: var(--radius); border: 1.5px solid transparent;
  cursor: pointer; transition: all .25s var(--ease);
}
.btn--gold { background: var(--gold); color: var(--navy-deep); }
.btn--gold:hover { background: var(--gold-light); color: var(--navy-deep); transform: translateY(-2px); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-soft); color: #fff; transform: translateY(-2px); }
.btn--ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--navy); }
.btn--outline { border-color: var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- header ---------- */
.topbar {
  background: var(--navy-deep); color: #c4d0e0;
  font-size: .82rem; letter-spacing: .02em;
}
.topbar .wrap { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; align-items: center; justify-content: space-between; min-height: 42px; }
.topbar a { color: #c4d0e0; }
.topbar a:hover { color: var(--gold-light); }
.topbar-meta { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.topbar-links { display: flex; gap: 1.1rem; font-weight: 600; }

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 82px; }
.brand { display: flex; align-items: center; gap: .75rem; }
.brand-logo {
  width: 52px; height: 52px; flex: none; border-radius: 50%;
  object-fit: contain; background: #fff;
  border: 2px solid var(--gold);
  box-shadow: 0 2px 10px rgba(11,31,59,.12);
}
/* kept for backward compatibility if any page still uses the text crest */
.brand-crest {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: linear-gradient(160deg, var(--navy), var(--navy-soft));
  color: var(--gold-light); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  letter-spacing: .02em; border: 2px solid var(--gold);
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; color: var(--navy); line-height: 1.15; }
.brand-tag { font-size: .68rem; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a {
  font-size: .88rem; font-weight: 600; color: var(--navy);
  padding: .3rem 0; position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -3px; height: 2px; width: 0;
  background: var(--gold); transition: width .25s var(--ease);
}
.nav a:hover::after, .nav a.is-active::after { width: 100%; }
.nav a.is-active { color: var(--navy); }

.nav-toggle {
  display: none; width: 44px; height: 40px; border: 1px solid var(--line);
  background: #fff; border-radius: var(--radius); cursor: pointer;
  padding: 10px 9px; flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: var(--navy); transition: transform .25s var(--ease), opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1000px) {
  .nav-toggle { display: flex; }
  .header-actions { display: none; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem 22px 1.2rem; box-shadow: var(--shadow-soft);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: .9rem; justify-content: center; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  min-height: 640px; display: flex; align-items: center;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(8,26,49,.93) 0%, rgba(8,26,49,.78) 45%, rgba(8,26,49,.35) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 96px 0; max-width: 700px; }
.hero h1 { color: #fff; }
.hero p { color: #cbd7e6; font-size: 1.12rem; max-width: 560px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 1.6rem; margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.2); }
.hero-badges div { min-width: 110px; }
.hero-badges strong { display: block; font-family: var(--font-display); font-size: 1.9rem; color: var(--gold-light); }
.hero-badges > div > span { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: #b6c4d6; }
.hero-badges strong span { font-size: inherit; font-family: inherit; color: inherit; letter-spacing: 0; }

/* page banner */
.page-hero { position: relative; color: #fff; padding: 96px 0 84px; overflow: hidden; }
.page-hero-media { position: absolute; inset: 0; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,26,49,.85), rgba(8,26,49,.9)); }
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; margin-bottom: .35em; }
.page-hero p { color: #c3d0e0; max-width: 640px; }
.crumbs { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 1rem; }
.crumbs a { color: var(--gold-light); }
.crumbs a:hover { color: #fff; }

/* ---------- quick portals ---------- */
.portals { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1px; background: var(--line); }
.portal {
  background: #fff; padding: 30px 26px; display: block;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.portal:hover { background: var(--navy); transform: translateY(-4px); }
.portal:hover h3, .portal:hover p, .portal:hover .portal-arrow { color: #fff; }
.portal-icon { font-size: 1.4rem; color: var(--gold); margin-bottom: .6rem; }
.portal h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.portal p { font-size: .9rem; color: var(--muted); margin: 0 0 .8rem; }
.portal-arrow { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }

/* ---------- grids & cards ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 34px; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px 26px; transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--muted); margin: 0; font-size: .96rem; }
.card-num { font-family: var(--font-display); font-size: 1.5rem; color: var(--gold); }

.media-frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.media-frame--tall img { aspect-ratio: 4/5; }
.media-badge {
  position: absolute; bottom: 0; left: 0; background: var(--gold); color: var(--navy-deep);
  padding: .9rem 1.3rem; font-family: var(--font-display); font-weight: 700; max-width: 72%;
}

.checklist { list-style: none; margin: 0 0 1.6rem; padding: 0; }
.checklist li { position: relative; padding-left: 1.9rem; margin-bottom: .6rem; color: var(--muted); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: -1px;
  color: var(--gold); font-weight: 700;
}

/* ---------- tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.tab {
  border: 1px solid var(--line); background: #fff; color: var(--navy);
  font-family: var(--font-body); font-weight: 600; font-size: .86rem;
  padding: .65rem 1.2rem; border-radius: 40px; cursor: pointer;
  transition: all .2s var(--ease);
}
.tab:hover { border-color: var(--gold); }
.tab.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fade .35s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- accordion ---------- */
.acc { border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-btn {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--navy);
  padding: 1.15rem 2.4rem 1.15rem 0; position: relative;
}
.acc-btn::after {
  content: "+"; position: absolute; right: .3rem; top: 50%; transform: translateY(-50%);
  color: var(--gold); font-size: 1.4rem; font-family: var(--font-body);
}
.acc-btn[aria-expanded="true"]::after { content: "–"; }
.acc-body { display: none; padding: 0 0 1.3rem; color: var(--muted); }
.acc-body.is-open { display: block; }

/* ---------- gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gallery-item {
  position: relative; border: 0; padding: 0; background: none; cursor: zoom-in;
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft);
}
.gallery-item img { aspect-ratio: 4/3; object-fit: cover; width: 100%; transition: transform .5s var(--ease); }
.gallery-item:hover img { transform: scale(1.07); }
.gallery-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: .9rem 1rem;
  background: linear-gradient(0deg, rgba(8,26,49,.9), transparent);
  color: #fff; font-size: .88rem; font-weight: 600; text-align: left;
}
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(6,17,32,.94);
  display: none; align-items: center; justify-content: center; padding: 28px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-height: 82vh; max-width: 100%; border-radius: 6px; }
.lightbox-cap { color: #d8e2ee; text-align: center; margin-top: 1rem; font-size: .95rem; }
.lightbox-close, .lightbox-nav {
  position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0;
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.3rem; cursor: pointer;
}
.lightbox-close { top: 22px; right: 22px; }
.lightbox-nav[data-dir="prev"] { left: 20px; top: 50%; }
.lightbox-nav[data-dir="next"] { right: 20px; top: 50%; }
.lightbox-nav:hover, .lightbox-close:hover { background: var(--gold); color: var(--navy-deep); }

/* ---------- posts / events ---------- */
.post { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.post:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.post-img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.post-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.tag { align-self: flex-start; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--maroon); background: #f6e9ea; padding: .3rem .65rem; border-radius: 30px; margin-bottom: .8rem; }
.post h3 { font-size: 1.15rem; }
.post p { color: var(--muted); font-size: .95rem; }
.post-meta { font-size: .8rem; color: var(--muted); margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--line); }

.event { display: grid; grid-template-columns: 96px 1fr auto; gap: 24px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 26px; margin-bottom: 14px; }
.event:hover { box-shadow: var(--shadow-soft); }
.event-date { text-align: center; background: var(--navy); color: #fff; border-radius: var(--radius); padding: .7rem .4rem; }
.event-date b { display: block; font-family: var(--font-display); font-size: 1.7rem; line-height: 1; color: var(--gold-light); }
.event-date span { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; }
.event h3 { margin-bottom: .25rem; font-size: 1.12rem; }
.event p { margin: 0; color: var(--muted); font-size: .93rem; }
@media (max-width: 760px) { .event { grid-template-columns: 78px 1fr; } .event .btn { grid-column: 2; justify-self: start; } }

/* ---------- testimonials ---------- */
.quote { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius-lg); padding: 28px; }
.quote p { font-style: italic; color: var(--ink); }
.quote-person { display: flex; align-items: center; gap: .8rem; }
.quote-person img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.quote-person b { display: block; font-size: .95rem; color: var(--navy); }
.quote-person span { font-size: .8rem; color: var(--muted); }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.field label { display: block; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); margin-bottom: .4rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem .9rem; font: inherit; font-size: .96rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,162,74,.2);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }
.form-note { font-size: .85rem; color: var(--muted); }
.form-status { display: none; padding: .85rem 1rem; border-radius: var(--radius); font-size: .92rem; }
.form-status.is-ok { display: block; background: #e9f4ec; color: #1d5b32; border: 1px solid #bcdfc6; }
.form-status.is-err { display: block; background: #fbeaea; color: #86242b; border: 1px solid #edc4c4; }

.info-card { display: flex; gap: 1rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.info-card .ic { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--cream); color: var(--gold); font-size: 1.1rem; }
.info-card h3 { font-size: 1rem; margin-bottom: .2rem; }
.info-card p, .info-card a { margin: 0; font-size: .95rem; color: var(--muted); }
.hours { list-style: none; margin: 0; padding: 0; }
.hours li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.hours li span:first-child { font-weight: 600; color: var(--navy); }

.map-frame { border: 0; width: 100%; height: 380px; border-radius: var(--radius-lg); }

/* ---------- cta band ---------- */
.cta-band { background: linear-gradient(115deg, var(--navy-deep), var(--navy-soft)); color: #fff; padding: 70px 0; }
.cta-band .wrap { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; justify-content: space-between; }
.cta-band h2 { color: #fff; margin-bottom: .3rem; }
.cta-band p { color: #bcc9db; margin: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-deep); color: #a9b8cc; padding: 72px 0 0; font-size: .94rem; }
.site-footer h4 { color: #fff; font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 1rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer a { color: #a9b8cc; }
.site-footer a:hover { color: var(--gold-light); }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: .55rem; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-tag { color: var(--gold-light); }
.footer-bottom {
  margin-top: 56px; border-top: 1px solid rgba(255,255,255,.12); padding: 22px 0;
  display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between; font-size: .85rem;
}
.socials { display: flex; gap: .6rem; margin-top: 1rem; }
.socials a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #fff; font-size: .8rem; font-weight: 700;
}
.socials a:hover { background: var(--gold); color: var(--navy-deep); }

/* ---------- responsive refinements ---------- */
@media (max-width: 1000px) {
  .site-header .wrap { min-height: 68px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 58px 0; }
  .section--tight { padding: 42px 0; }
  .wrap { padding: 0 18px; }

  .topbar .wrap { justify-content: center; text-align: center; gap: .25rem .9rem; min-height: 0; padding-top: .45rem; padding-bottom: .45rem; }
  .topbar-meta { justify-content: center; gap: .15rem .9rem; }
  .topbar-links { justify-content: center; }

  .hero { min-height: 0; }
  .hero-inner { padding: 70px 0; }
  .hero p { font-size: 1.04rem; }
  .hero-badges { gap: 1.1rem 1.5rem; margin-top: 2rem; padding-top: 1.3rem; }

  .page-hero { padding: 70px 0 58px; }

  .cta-band { padding: 56px 0; }
  .cta-band .wrap { flex-direction: column; align-items: flex-start; }

  .site-footer { padding-top: 56px; }
  .footer-bottom { flex-direction: column; text-align: center; justify-content: center; margin-top: 40px; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 15px; }
  h3 { font-size: 1.14rem; }

  .btn { padding: .78rem 1.1rem; font-size: .78rem; letter-spacing: .07em; }
  .btn-row .btn { width: 100%; justify-content: center; }

  .brand { gap: .6rem; }
  .brand-logo { width: 44px; height: 44px; }
  .brand-name { font-size: .96rem; }
  .brand-tag { font-size: .6rem; letter-spacing: .12em; }

  .topbar-meta span { display: none; }

  .portal { padding: 24px 20px; }
  .card { padding: 24px 20px; }

  .hero-badges { gap: .9rem 1.3rem; }
  .hero-badges div { min-width: 0; flex: 1 0 44%; }
  .hero-badges strong { font-size: 1.65rem; }

  .event { grid-template-columns: 64px 1fr; gap: 16px; padding: 18px 18px; }

  .lightbox { padding: 16px; }
  .lightbox-nav[data-dir="prev"] { left: 8px; }
  .lightbox-nav[data-dir="next"] { right: 8px; }
  .lightbox-close { top: 12px; right: 12px; }
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
