/* =============================================================
   Nimbus Education — Design System
   Brand navy sampled from logo: #203864
   Puzzle-block accents sampled from the bus render.
   ============================================================= */

:root {
  /* Brand */
  --navy:        #203864;
  --navy-800:    #1a2e52;
  --navy-900:    #14243f;
  --navy-700:    #2a477d;
  --navy-tint:   #eaeef6;

  /* Puzzle-block accents (from bus render) */
  --teal:        #2cb5c0;
  --teal-dark:   #1f8f99;
  --yellow:      #f4b32c;
  --orange:      #e07b24;
  --rust:        #c1492b;

  /* Neutrals */
  --cream:       #f6f1e6;
  --cream-deep:  #efe7d5;
  --ink:         #1b2434;
  --ink-soft:    #48546b;
  --line:        #e4e7ee;
  --white:       #ffffff;

  /* Semantic */
  --bg:          var(--white);
  --text:        var(--ink);
  --muted:       var(--ink-soft);
  --brand:       var(--navy);

  /* Type */
  --font-head: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Rhythm */
  --container: 1160px;
  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 8px rgba(20, 36, 63, 0.06);
  --shadow:    0 14px 40px rgba(20, 36, 63, 0.12);
  --shadow-lg: 0 30px 70px rgba(20, 36, 63, 0.20);
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

/* ------------------------------- Reset ------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; margin: 0 0 0.5em; color: var(--navy); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--yellow); color: var(--navy-900); }

/* ------------------------------ Layout ------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }
.section { padding-block: clamp(64px, 9vw, 120px); }
/* Prevent grid/flex children from blowing past the viewport on small screens */
.hero__grid > *, .split > *, .contact-grid > *, .cards > *, .steps > *, .stats > *, .footer__grid > * { min-width: 0; }
h1, h2, h3, p { overflow-wrap: break-word; }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal-dark);
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--yellow); }
.section-head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); }
.section-head p { color: var(--muted); font-size: 1.1rem; margin-bottom: 0; }
.lead { font-size: 1.2rem; color: var(--muted); }

/* ------------------------------ Buttons ------------------------------ */
.btn {
  --btn-bg: var(--navy); --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  padding: 15px 26px; border-radius: 999px; border: 2px solid transparent;
  background: var(--btn-bg); color: var(--btn-fg); cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s ease;
  box-shadow: 0 10px 24px rgba(32, 56, 100, 0.24);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(32, 56, 100, 0.32); }
.btn:active { transform: translateY(-1px); }
.btn--accent { --btn-bg: var(--yellow); --btn-fg: var(--navy-900); box-shadow: 0 10px 24px rgba(244, 179, 44, 0.4); }
.btn--accent:hover { background: #f7c04d; }
.btn--teal { --btn-bg: var(--teal); --btn-fg: #05343a; box-shadow: 0 10px 24px rgba(44, 181, 192, 0.34); }
.btn--ghost {
  --btn-bg: transparent; --btn-fg: #fff; border-color: rgba(255,255,255,0.5);
  box-shadow: none;
}
.btn--ghost:hover { background: rgba(255,255,255,0.1); box-shadow: none; }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--navy); border-color: var(--navy); box-shadow: none; }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn--lg { padding: 17px 32px; font-size: 1.05rem; }
.btn__arrow { transition: transform 0.25s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ------------------------------ Navbar ------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.86); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}
.nav.is-stuck { box-shadow: var(--shadow-sm); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.nav__menu { display: flex; align-items: center; gap: 8px; }
.nav__brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-head); font-weight: 700; color: var(--navy); font-size: 1.15rem; }
.nav__brand img { height: 42px; width: auto; }
.nav__brand small { display: block; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--teal-dark); font-weight: 600; margin-top: -2px; }
.nav__links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  font-family: var(--font-head); font-weight: 500; font-size: 0.98rem; color: var(--ink);
  padding: 9px 15px; border-radius: 999px; transition: background 0.2s ease, color 0.2s ease;
}
.nav__links a:hover { background: var(--navy-tint); color: var(--navy); }
.nav__links a.is-active { color: var(--navy); background: var(--navy-tint); }
.nav__cta { margin-left: 10px; }
.nav__toggle {
  display: none; width: 46px; height: 46px; border: none; background: transparent; cursor: pointer;
  border-radius: 12px; align-items: center; justify-content: center;
}
.nav__toggle span { position: relative; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav__toggle span::before, .nav__toggle span::after { content: ""; position: absolute; left: 0; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform 0.3s var(--ease); }
.nav__toggle span::before { top: -7px; } .nav__toggle span::after { top: 7px; }
.nav.is-open .nav__toggle span { background: transparent; }
.nav.is-open .nav__toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: fixed; inset: 74px 0 auto 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 16px clamp(20px, 5vw, 40px) 26px;
    box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.25s ease;
  }
  .nav.is-open .nav__menu { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__links { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav__links a { padding: 13px 15px; font-size: 1.05rem; }
  .nav__cta { margin: 12px 0 0; }
  .nav__cta .btn { width: 100%; }
}

/* --------------------------- Cloud dividers -------------------------- */
.cloud-divider { display: block; width: 100%; height: auto; margin-bottom: -1px; }
.cloud-divider--flip { transform: rotate(180deg); margin-bottom: 0; margin-top: -1px; }

/* ------------------------------- Hero -------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 10%, #2a477d 0%, rgba(42,71,125,0) 55%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%);
  color: #fff;
  padding-block: clamp(56px, 8vw, 96px);
}
.hero h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; letter-spacing: -0.02em; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(30px, 5vw, 64px); align-items: center; }
.hero__eyebrow { color: var(--yellow); }
.hero__eyebrow::before { background: var(--yellow); }
.hero p.lead { color: rgba(255,255,255,0.82); max-width: 44ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero__media { position: relative; }
.hero__media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.hero__badge {
  position: absolute; background: #fff; color: var(--navy); border-radius: 16px;
  padding: 14px 18px; box-shadow: var(--shadow); font-family: var(--font-head); font-weight: 700;
  display: flex; align-items: center; gap: 12px; line-height: 1.1;
}
.hero__badge small { display: block; font-weight: 500; font-size: 0.72rem; color: var(--muted); text-transform: none; letter-spacing: 0; }
.hero__badge .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 1.1rem; }
.hero__badge--tl { top: 18px; left: -18px; }
.hero__badge--br { bottom: 20px; right: -14px; }
.hero__strip {
  display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 34px;
  padding-top: 26px; border-top: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.9); font-family: var(--font-head); font-weight: 500; font-size: 0.98rem;
}
.hero__strip span { display: inline-flex; align-items: center; gap: 9px; }
.hero__strip .tick { color: var(--teal); font-weight: 700; }

/* floating blobs */
.hero__blob { position: absolute; border-radius: 40% 60% 62% 38% / 46% 40% 60% 54%; filter: blur(2px); opacity: 0.5; pointer-events: none; }
.hero__blob.b1 { width: 220px; height: 220px; background: var(--teal); top: -60px; left: -70px; opacity: 0.22; }
.hero__blob.b2 { width: 160px; height: 160px; background: var(--orange); bottom: -50px; left: 32%; opacity: 0.18; }

/* Page hero (about/contact) */
.pagehero { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%); color: #fff; padding-block: clamp(56px, 8vw, 88px); text-align: center; }
.pagehero h1 { color: #fff; font-size: clamp(2.2rem, 5.4vw, 3.4rem); font-weight: 800; }
.pagehero p { color: rgba(255,255,255,0.82); max-width: 60ch; margin-inline: auto; font-size: 1.15rem; }

/* ------------------------------ Steps -------------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 24px 28px; box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.step__num {
  counter-increment: step; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; color: #fff; font-size: 1.15rem; margin-bottom: 18px;
}
.step__num::before { content: counter(step); }
.step:nth-child(1) .step__num { background: var(--teal); }
.step:nth-child(2) .step__num { background: var(--yellow); color: var(--navy-900); }
.step:nth-child(3) .step__num { background: var(--orange); }
.step:nth-child(4) .step__num { background: var(--rust); }
.step h3 { font-size: 1.18rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.98rem; margin: 0; }

/* ------------------------------ Cards -------------------------------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px;
  box-shadow: var(--shadow-sm); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  position: relative; overflow: hidden;
}
.card::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--accent, var(--navy)); opacity: 0.9; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 18px; background: color-mix(in srgb, var(--accent, var(--navy)) 14%, #fff); }
.card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.card p { color: var(--muted); margin: 0; }
.card--teal   { --accent: var(--teal); }
.card--yellow { --accent: var(--yellow); }
.card--orange { --accent: var(--orange); }
.card--rust   { --accent: var(--rust); }
.card--navy   { --accent: var(--navy); }

/* ------------------------------ Split -------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 64px); align-items: center; }
.split--reverse .split__media { order: -1; }
.split__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; }
.split__media { position: relative; }
.checklist { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 13px; align-items: flex-start; }
.checklist .tick { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; background: color-mix(in srgb, var(--teal) 16%, #fff); color: var(--teal-dark); display: grid; place-items: center; font-weight: 800; font-size: 0.9rem; margin-top: 2px; }
.checklist strong { color: var(--navy); font-family: var(--font-head); }

/* ------------------------------ Stats -------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; padding: 22px 14px; border-radius: var(--radius); background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); }
.stat__num { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.5rem); color: #fff; line-height: 1; }
.stat__num .accent { color: var(--yellow); }
.stat__label { color: rgba(255,255,255,0.78); font-size: 0.96rem; margin-top: 8px; }

/* ------------------------- Section variants -------------------------- */
.section--cream { background: var(--cream); }
.section--navy { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%); color: #fff; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy .section-head p { color: rgba(255,255,255,0.8); }

/* ------------------------------ CTA band ----------------------------- */
.cta-band { position: relative; overflow: hidden; }
.cta-band__inner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 100%);
  border-radius: var(--radius-lg); padding: clamp(38px, 6vw, 66px); color: #fff;
  text-align: center; position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.cta-band__inner h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.7rem); }
.cta-band__inner p { color: rgba(255,255,255,0.85); max-width: 52ch; margin-inline: auto; font-size: 1.12rem; }
.cta-band__cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 26px; }
.cta-band__deco { position: absolute; border-radius: 22px; opacity: 0.5; }

/* puzzle strip decoration */
.puzzlebar { display: flex; height: 8px; }
.puzzlebar span { flex: 1; }
.puzzlebar span:nth-child(1){ background: var(--teal); }
.puzzlebar span:nth-child(2){ background: var(--yellow); }
.puzzlebar span:nth-child(3){ background: var(--orange); }
.puzzlebar span:nth-child(4){ background: var(--rust); }

/* ------------------------------ Forms -------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1.35fr 0.9fr; gap: clamp(28px, 4vw, 52px); align-items: start; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 40px); box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--font-head); font-weight: 600; font-size: 0.92rem; color: var(--navy); margin-bottom: 7px; }
.field .req { color: var(--rust); }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fbfcfe; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(44,181,192,0.18); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--rust); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 0.88rem; color: var(--muted); margin-top: 4px; }
.form-status { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 500; display: none; }
.form-status.is-error { display: block; background: #fdecec; color: #93261a; border: 1px solid #f3c0ba; }
.form-status.is-success { display: block; background: #e8f8f0; color: #14663f; border: 1px solid #b6e6cd; }

.contact-aside { display: grid; gap: 18px; }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 24px; box-shadow: var(--shadow-sm); }
.info-card h3 { font-size: 1.1rem; margin-bottom: 14px; }
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.info-list li { display: flex; gap: 13px; align-items: flex-start; }
.info-list .ic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 1.15rem; background: var(--navy-tint); }
.info-list a { color: var(--navy); font-weight: 600; word-break: break-word; }
.info-list a:hover { color: var(--teal-dark); }
.info-list small { display: block; color: var(--muted); font-weight: 400; }

/* ------------------------------- FAQ --------------------------------- */
.faq { display: grid; gap: 14px; max-width: 820px; margin-inline: auto; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; box-shadow: var(--shadow-sm); }
.faq summary { list-style: none; cursor: pointer; font-family: var(--font-head); font-weight: 600; color: var(--navy); padding: 16px 46px 16px 18px; position: relative; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--teal); transition: transform 0.25s var(--ease); line-height: 1; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 18px 16px; color: var(--muted); }

/* ------------------------------ Footer ------------------------------- */
.footer { background: var(--navy-900); color: rgba(255,255,255,0.72); padding-block: clamp(48px, 6vw, 72px) 30px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer__brand img { height: 84px; width: auto; margin-bottom: 14px; }
.footer__brand p { max-width: 32ch; font-size: 0.96rem; }
.footer h4 { color: #fff; font-size: 0.9rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px; font-weight: 600; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a { color: rgba(255,255,255,0.72); transition: color 0.2s; }
.footer a:hover { color: var(--yellow); }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.88rem; }
.footer__social { display: flex; gap: 10px; }
.footer__social a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,0.08); display: grid; place-items: center; }
.footer__social a:hover { background: var(--teal); }

/* --------------------------- Scroll reveal --------------------------- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: 0.08s; }
[data-reveal][data-delay="2"] { transition-delay: 0.16s; }
[data-reveal][data-delay="3"] { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; } }

/* --------------------------- Responsive ------------------------------ */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { max-width: 560px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .steps, .cards { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero__badge--tl { left: 8px; top: 8px; }
  .hero__badge--br { right: 8px; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { justify-content: flex-start; }
}
