/* ===========================================================
   Creativo Classes — stylesheet
   Design concept: a well-kept ledger / exercise book. Warm paper,
   deep ink-navy text, marigold for the one thing that matters on
   each page, chalkboard-teal for results and numbers.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --paper: #F2ECDC;
  --paper-warm: #EDE5D0;
  --card: #FCFAF3;
  --ink: #202B3B;
  --ink-soft: #556070;
  --ink-faint: #8B93A0;
  --marigold: #E2570B;
  --marigold-deep: #BF4607;
  --teal: #0B549C;
  --teal-deep: #083F76;
  --rule: #D3C6A3;
  --rule-soft: #E2D8BC;
  --max: 1120px;
  --radius: 3px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Source Serif 4', serif;
  color: var(--ink);
  margin: 0 0 0.5em 0;
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); }
h3 { font-size: 1.3rem; }

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

a { color: inherit; }

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

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

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------- Header ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule-soft);
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 20px; }
.topbar a { text-decoration: none; }
.topbar a:hover { color: var(--marigold-deep); }
.topbar-links { display: flex; gap: 20px; flex-wrap: wrap; }

.navrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand .mark {
  font-family: 'Source Serif 4', serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
}
.brand .tagline {
  font-size: 0.78rem;
  color: var(--ink-faint);
  display: none;
}
@media (min-width: 640px) { .brand .tagline { display: inline; } }

nav.primary ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}
nav.primary a {
  text-decoration: none;
  font-size: 0.98rem;
  color: var(--ink-soft);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
nav.primary a:hover,
nav.primary a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--marigold);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  width: 42px;
  height: 38px;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 8px auto;
  width: 20px;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  nav.primary {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }
  nav.primary.open { display: block; }
  nav.primary ul { flex-direction: column; gap: 0; padding: 8px 28px 18px; }
  nav.primary a { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule-soft); }
  .topbar-links { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--marigold); color: #fff; }
.btn-primary:hover { background: var(--marigold-deep); }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-deep); }

/* ---------- Ledger rule background ---------- */
.ruled {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 43px,
    var(--rule-soft) 44px
  );
}

/* ---------- Hero ---------- */
.hero {
  padding: 70px 0 60px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

.hero .eyebrow-line {
  color: var(--teal-deep);
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.hero p.lede { font-size: 1.12rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }

.hero-figure {
  position: relative;
  border: 1px solid var(--rule);
  background: var(--card);
  padding: 10px;
}
.hero-figure img { width: 100%; height: auto; }
.hero-figure .tab {
  position: absolute;
  top: -14px;
  left: 24px;
  background: var(--teal);
  color: #fff;
  font-family: 'Source Serif 4', serif;
  font-size: 0.85rem;
  padding: 5px 14px;
  transform: rotate(-1.5deg);
}

/* ---------- Section shells ---------- */
section { padding: 58px 0; }
section.alt { background: var(--paper-warm); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { margin-bottom: 10px; }

/* ---------- Feature grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
@media (max-width: 820px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.feature {
  border-top: 3px solid var(--marigold);
  padding-top: 16px;
}
.feature h3 { margin-bottom: 8px; }
.feature p { margin-bottom: 0; }

/* ---------- Index cards (results / team / testimonials) ---------- */
.card-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .card-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .card-row { grid-template-columns: 1fr; } }

.index-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 20px;
  text-align: left;
}
.index-card .score {
  font-family: 'Source Serif 4', serif;
  font-size: 2.1rem;
  color: var(--teal-deep);
  font-weight: 600;
  line-height: 1;
  margin-bottom: 6px;
}
.index-card .name { font-weight: 600; margin-bottom: 2px; }
.index-card .meta { color: var(--ink-faint); font-size: 0.88rem; }

/* ---------- Steps (genuine sequence) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-left: 46px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

/* ---------- Testimonial ---------- */
.testimonial {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.testimonial p.quote {
  font-family: 'Source Serif 4', serif;
  font-size: 1.08rem;
  color: var(--ink);
  font-style: italic;
}
.testimonial .who { font-weight: 600; font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: var(--paper);
}
.cta-band h2 { color: var(--paper); }
.cta-band p { color: #C7CCD4; }
.cta-band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 22px;
  padding-top: 46px;
  padding-bottom: 46px;
}

/* ---------- Table (course detail / fees) ---------- */
table.plain {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
}
table.plain th, table.plain td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
}
table.plain th { font-family: 'Source Serif 4', serif; color: var(--ink); }
table.plain td { color: var(--ink-soft); }

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--rule);
}
.faq-item summary {
  cursor: pointer;
  padding: 18px 0;
  font-family: 'Source Serif 4', serif;
  font-size: 1.08rem;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon {
  flex: none;
  width: 26px; height: 26px;
  border: 1px solid var(--ink-faint);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Source Serif 4', serif;
  color: var(--ink-soft);
}
.faq-item[open] summary .icon { background: var(--marigold); border-color: var(--marigold); color: #fff; }
.faq-item .a { padding: 0 0 20px 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.info-line { display: flex; gap: 14px; margin-bottom: 18px; }
.info-line .k { font-weight: 600; min-width: 92px; color: var(--ink); }
.info-line .v { color: var(--ink-soft); }

form.contact {
  display: grid;
  gap: 14px;
}
form.contact label {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
form.contact input, form.contact select, form.contact textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.98rem;
  color: var(--ink);
}
form.contact input:focus, form.contact select:focus, form.contact textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}
.map-frame {
  border: 1px solid var(--rule);
  width: 100%;
  height: 320px;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 760px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-grid figure {
  margin: 0;
  border: 1px solid var(--rule);
  background: var(--card);
  padding: 8px;
}
.gallery-grid figure .ph {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--paper-warm), var(--rule-soft));
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint);
  font-family: 'Source Serif 4', serif;
  font-size: 0.9rem;
}
.gallery-grid figcaption { padding: 10px 4px 2px; font-size: 0.88rem; color: var(--ink-soft); }

/* ---------- Page header (interior pages) ---------- */
.page-header {
  padding: 46px 0 40px;
  border-bottom: 1px solid var(--rule);
}
.page-header p.lede { margin-top: 8px; }
.crumb { font-size: 0.85rem; color: var(--ink-faint); margin-bottom: 10px; }
.crumb a { text-decoration: none; color: var(--ink-faint); }
.crumb a:hover { color: var(--marigold-deep); }

/* ---------- Footer ---------- */
footer.site {
  background: var(--ink);
  color: #C7CCD4;
  padding: 52px 0 24px;
}
footer.site h4 { color: var(--paper); font-size: 1rem; margin-bottom: 14px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 34px;
  padding-bottom: 34px;
  border-bottom: 1px solid #3A4453;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
footer.site .brand-foot { font-family: 'Source Serif 4', serif; font-size: 1.3rem; color: var(--paper); margin-bottom: 10px; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin-bottom: 9px; }
footer.site a { text-decoration: none; color: #C7CCD4; font-size: 0.94rem; }
footer.site a:hover { color: var(--marigold); }
.foot-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 20px;
  font-size: 0.85rem;
  color: #8892A0;
}
.social-row { display: flex; gap: 14px; }
.social-row a {
  width: 34px; height: 34px;
  border: 1px solid #3A4453;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
}
.social-row a:hover { border-color: var(--marigold); color: var(--marigold); }

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


/* ---------- Logo lockup ---------- */
.brand { align-items: center; gap: 12px; }
.brand .logo-icon { height: 46px; width: auto; }
.brand .mark { line-height: 1; }
.brand .mark .a { color: var(--teal); }
.brand .mark .b { color: var(--marigold); }

/* ---------- Hero photo ---------- */
.hero-figure img { width: 100%; height: auto; display: block; }

/* ---------- Feature list (from leaflet) ---------- */
.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; list-style: none; margin: 0; padding: 0; }
@media (max-width: 700px) { .feature-list { grid-template-columns: 1fr; } }
.feature-list li { padding: 16px 0 16px 34px; border-bottom: 1px solid var(--rule); position: relative; }
.feature-list li::before {
  content: ""; position: absolute; left: 4px; top: 22px;
  width: 12px; height: 7px; border-left: 3px solid var(--marigold); border-bottom: 3px solid var(--marigold);
  transform: rotate(-45deg);
}
.feature-list strong { display: block; font-family: 'Source Serif 4', serif; font-size: 1.08rem; color: var(--ink); margin-bottom: 2px; }
.feature-list span { color: var(--ink-soft); font-size: 0.96rem; }

/* ---------- Subject toppers ---------- */
.topper-group { margin-bottom: 30px; }
.topper-group h3 { font-size: 1.1rem; color: var(--teal-deep); margin-bottom: 12px; }


/* ---------- Student photo cards ---------- */
.student-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.student { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; text-align: center; }
.student img { width: 100%; aspect-ratio: 1 / 1.05; object-fit: cover; object-position: top; background: var(--paper-warm); }
.student .info { padding: 10px 8px 12px; }
.student .pct { font-family: 'Source Serif 4', serif; font-size: 1.5rem; font-weight: 600; color: var(--teal-deep); line-height: 1.1; }
.student .nm { font-weight: 600; font-size: 0.95rem; }
.student-group { margin-bottom: 34px; }
.student-group h3 { color: var(--teal-deep); margin-bottom: 14px; }


/* ---------- Facts strip ---------- */
.facts { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--card); padding: 0; }
.facts .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 700px) { .facts .wrap { grid-template-columns: 1fr 1fr; } }
.fact { padding: 22px 16px; border-left: 1px solid var(--rule-soft); }
.fact:first-child { border-left: none; }
@media (max-width: 700px) { .fact:nth-child(3) { border-left: none; } .fact:nth-child(n+3) { border-top: 1px solid var(--rule-soft); } }
.fact .big { font-family: 'Source Serif 4', serif; font-size: 1.9rem; font-weight: 600; color: var(--teal-deep); line-height: 1.1; }
.fact .lbl { color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- Admissions notice ---------- */
.notice { background: #FBE9DC; border-bottom: 1px solid #EBC7AE; padding: 20px 0; }
.notice .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.notice p { margin: 0; color: var(--ink); max-width: 60ch; }
.notice .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-wa { background: #138A45; color: #fff; }
.btn-wa:hover { background: #0F6E37; }

/* ---------- Photo + text split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.split img { width: 100%; height: auto; border: 1px solid var(--rule); background: var(--card); padding: 8px; }

/* ---------- Stage cards ---------- */
.stage { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; }
.stage h3 { margin-bottom: 4px; }
.stage .std { color: var(--marigold-deep); font-weight: 600; margin-bottom: 8px; }
.stage p { margin-bottom: 12px; }
.stage a { color: var(--teal-deep); font-weight: 600; }

/* ---------- Mobile call bar ---------- */
.mobile-cta { display: none; }
@media (max-width: 820px) {
  .mobile-cta { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--ink); }
  .mobile-cta a { flex: 1; text-align: center; padding: 14px 10px; font-weight: 600; text-decoration: none; color: #fff; }
  .mobile-cta .call { background: var(--teal); }
  .mobile-cta .wa { background: #138A45; }
  body { padding-bottom: 54px; }
}


/* ---------- Bigger full-logo header ---------- */
.brand .logo-full { height: 68px; width: auto; }
.navrow { padding: 10px 0; }
@media (max-width: 820px) { .brand .logo-full { height: 54px; } }
nav.primary a { font-size: 1.02rem; }
.brand .tagline { font-size: 0.85rem; }


/* ---------- Map ---------- */
.map-box { width: 100%; }
.map-box .map-frame { display: block; }
.map-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }


/* ---------- Hero cutout (student with books) ---------- */
.hero-figure.cutout {
  padding: 0;
  border: none;
  background: linear-gradient(165deg, #DCE8F6 0%, #FBE6D6 100%);
  border-radius: var(--radius);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 300px;
  overflow: visible;
}
.hero-figure.cutout img { width: auto; max-width: 100%; max-height: 440px; height: auto; display: block; }
.hero-figure .tab { white-space: nowrap; max-width: calc(100% - 28px); overflow: hidden; text-overflow: ellipsis; }

/* ---------- Stacked photo + text rows ---------- */
.split + .split { margin-top: 56px; }
.split.reverse > img { order: 2; }
@media (max-width: 800px) { .split.reverse > img { order: 0; } .split + .split { margin-top: 40px; } }


/* header keeps its side padding on small screens */
.wrap.navrow { padding-left: 28px; padding-right: 28px; }
@media (max-width: 480px) { .wrap.navrow { padding-left: 18px; padding-right: 18px; } .wrap { padding-left: 20px; padding-right: 20px; } }
