/* ==========================================================================
   Clear Vale Behavioral - Design System
   Palette: deep ocean blue + sage green + warm neutrals
   ========================================================================== */

:root {
  /* Brand */
  --navy:        #1b4b66;
  --navy-700:    #163f57;
  --navy-900:    #0f2d3e;
  --blue:        #3e8ead;
  --blue-100:    #e5f1f5;
  --sage:        #7fa98c;
  --sage-600:    #5f8f6c;
  --sage-100:    #e9f1eb;
  --gold:        #dda85c;

  /* Neutrals */
  --sand:        #f4efe7;
  --cream:       #fbf8f3;
  --white:       #ffffff;
  --ink:         #22303a;
  --muted:       #5b6b74;
  --line:        #e4ddd1;

  /* Effects */
  --radius:      16px;
  --radius-lg:   26px;
  --radius-pill: 999px;
  --shadow-sm:   0 4px 14px rgba(15, 45, 62, 0.07);
  --shadow-md:   0 14px 40px rgba(15, 45, 62, 0.12);
  --shadow-lg:   0 30px 70px rgba(15, 45, 62, 0.18);

  /* Layout */
  --maxw:        1200px;
  --gutter:      clamp(20px, 5vw, 48px);

  /* Type */
  --font-head:   'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:   'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; color: var(--navy); font-weight: 700; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding: clamp(56px, 8vw, 110px) 0; }
.section--sand  { background: var(--sand); }
.section--cream { background: var(--cream); }
.section--navy  { background: var(--navy); color: #dceaf0; }
.section--navy h2, .section--navy h3 { color: #fff; }
.center { text-align: center; }
.eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: .78rem;
  color: var(--sage-600);
  margin-bottom: 14px;
}
.section--navy .eyebrow { color: var(--gold); }
.section-title { font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -.01em; }
.lead { font-size: clamp(1.02rem, 1.5vw, 1.2rem); color: var(--muted); max-width: 62ch; }
.section--navy .lead { color: #b9d0da; }
.stack > * + * { margin-top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  padding: .85em 1.6em; border-radius: var(--radius-pill);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--sage); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--sage-600); box-shadow: var(--shadow-md); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-900); }
.btn--gold { background: var(--gold); color: #402c10; }
.btn--gold:hover { background: #cf9646; }
.btn--ghost { background: transparent; color: var(--navy); border: 2px solid var(--line); }
.btn--ghost:hover { border-color: var(--navy); background: var(--navy); color: #fff; }
.btn--light { background: #fff; color: var(--navy); }
.btn--outline-light { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5); }
.btn--outline-light:hover { background: #fff; color: var(--navy); border-color:#fff; }
.btn--lg { font-size: 1.05rem; padding: 1em 1.9em; }
.btn--block { display: flex; width: 100%; justify-content: center; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 60; background: #fff; box-shadow: 0 1px 0 var(--line); }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark { width: 46px; height: 46px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--font-head); font-weight: 800; font-size: 1.28rem;
  color: var(--navy); letter-spacing: -.01em;
}
.brand__name b { color: var(--sage-600); font-weight: 800; }
.brand__tag { font-size: .64rem; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

.header-cta { display: flex; align-items: center; gap: 10px; }
.header-cta .btn { padding: .68em 1.15em; font-size: .9rem; }
.nav-toggle {
  display: none; width: 50px; height: 50px; border-radius: 50%;
  border: 2px solid var(--line); align-items: center; justify-content: center;
  color: var(--navy); flex: none;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* Secondary nav */
.mainnav { background: var(--navy); }
.mainnav__inner {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; justify-content: center;
}
.mainnav a {
  font-family: var(--font-head); font-weight: 500; font-size: .93rem;
  color: #dbe9ef; padding: .5em 1.05em; border-radius: var(--radius-pill);
  transition: background .16s ease, color .16s ease;
}
.mainnav a:hover, .mainnav a.is-active { background: rgba(255,255,255,.14); color: #fff; }

/* Mobile drawer */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(15,45,62,.5); opacity: 0; visibility: hidden;
  transition: opacity .25s ease; z-index: 70;
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(86vw, 360px);
  background: #fff; z-index: 80; transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; padding: 22px;
}
.drawer.open { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.drawer__close { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); color: var(--navy); font-size: 1.4rem; }
.drawer nav { display: flex; flex-direction: column; margin-top: 8px; overflow-y: auto; }
.drawer nav a {
  font-family: var(--font-head); font-weight: 600; color: var(--navy);
  padding: 13px 6px; border-bottom: 1px solid var(--line);
}
.drawer nav a:hover { color: var(--sage-600); }
.drawer__cta { margin-top: auto; padding-top: 18px; display: grid; gap: 10px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; min-height: min(78vh, 660px); }
.hero__panel {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-900) 100%);
  color: #fff; display: flex; flex-direction: column; justify-content: center;
  padding: clamp(40px, 6vw, 88px) clamp(28px, 5vw, 78px);
  position: relative;
}
.hero__panel::after {
  content: ""; position: absolute; right: -70px; top: -70px; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(127,169,140,.4), transparent 70%);
}
.hero__eyebrow { color: var(--gold); }
.hero h1 {
  color: #fff; font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800;
  letter-spacing: -.02em; margin: 4px 0 18px;
}
.hero h1 span { color: var(--sage); }
.hero p { color: #c3d7df; font-size: clamp(1.02rem, 1.5vw, 1.18rem); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__media { position: relative; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__badge {
  position: absolute; left: -34px; bottom: 42px; background: #fff; color: var(--ink);
  border-radius: var(--radius); padding: 16px 22px; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 14px; max-width: 280px;
}
.hero__badge .dot { width: 44px; height: 44px; border-radius: 50%; background: var(--sage-100); display: grid; place-items: center; color: var(--sage-600); flex: none; }
.hero__badge b { font-family: var(--font-head); color: var(--navy); display:block; font-size: 1.4rem; line-height: 1;}
.hero__badge small { color: var(--muted); font-size: .82rem; }

/* Page hero (inner pages) */
.pagehero {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-900) 100%);
  color: #fff; position: relative; overflow: hidden;
  padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 90px);
}
.pagehero::before {
  content:""; position:absolute; inset:0; opacity:.16;
  background-size: cover; background-position: center;
}
.pagehero__inner { position: relative; z-index: 1; max-width: 760px; }
.pagehero h1 { color: #fff; font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.02em; }
.pagehero p { color: #c3d7df; font-size: clamp(1.02rem, 1.5vw, 1.2rem); margin-top: 16px; max-width: 58ch; }
.breadcrumb { font-size: .85rem; color: var(--gold); margin-bottom: 14px; letter-spacing: .04em; }
.breadcrumb a:hover { text-decoration: underline; }

/* ==========================================================================
   Trust bar
   ========================================================================== */
.trustbar { background: var(--sage-100); }
.trustbar__inner { display: flex; flex-wrap: wrap; gap: clamp(18px,5vw,60px); justify-content: center; padding: 26px 0; text-align:center; }
.trustbar .stat b { font-family: var(--font-head); font-size: clamp(1.6rem,3vw,2.2rem); color: var(--navy); display:block; }
.trustbar .stat span { color: var(--sage-600); font-weight: 600; font-size: .9rem; }

/* ==========================================================================
   Generic grids & cards
   ========================================================================== */
.grid { display: grid; gap: 26px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.card__icon {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  background: var(--blue-100); color: var(--blue); margin-bottom: 18px;
}
.card__icon svg { width: 30px; height: 30px; }
.card h3 { font-size: 1.28rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .98rem; }
.card .card__link { display:inline-flex; align-items:center; gap:6px; margin-top:16px; font-family:var(--font-head); font-weight:600; color: var(--sage-600); }
.card .card__link:hover { gap: 10px; }

/* Program cards (numbered, like reference) */
.progcard {
  background:#fff; border-left: 5px solid var(--sage); border-radius: 12px;
  padding: 26px 26px 26px 28px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.progcard:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.progcard .tag { font-family: var(--font-head); font-weight: 700; color: var(--blue); font-size: 1.3rem; margin-bottom: 8px; }
.progcard p { color: var(--muted); font-size: .96rem; }

/* Fact / Did You Know cards */
.fact {
  background:#fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--gold); display:flex; gap:16px; align-items:flex-start;
}
.fact .num { font-family: var(--font-head); font-weight: 800; font-size: 2rem; color: var(--sage-600); line-height: 1; flex:none; }
.fact p { color: var(--ink); font-size: .97rem; }

/* ==========================================================================
   Split feature
   ========================================================================== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 70px); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); aspect-ratio: 4/3; object-fit: cover; }
.split__body h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 14px; }
.checklist { margin-top: 22px; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); }
.checklist svg { width: 22px; height: 22px; color: var(--sage-600); flex: none; margin-top: 3px; }
.pill-tags { display:flex; flex-wrap:wrap; gap:10px; margin-top: 22px; }
.pill-tags span {
  font-family: var(--font-head); font-weight:600; font-size:.85rem; color: var(--navy);
  background: var(--sage-100); padding: .5em 1em; border-radius: var(--radius-pill);
}

/* ==========================================================================
   Newsletter band
   ========================================================================== */
.newsletter { background: linear-gradient(150deg, var(--sage) 0%, var(--sage-600) 100%); color:#fff; }
.newsletter__inner { display:grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items:center; }
.newsletter h2 { color:#fff; font-size: clamp(1.7rem,3.4vw,2.4rem); }
.newsletter p { color: #eaf3ec; margin-top: 8px; }
.newsletter form { display:flex; flex-wrap:wrap; gap: 12px; }
.newsletter input {
  flex: 1 1 200px; min-width: 0; padding: .95em 1.2em; border-radius: var(--radius-pill);
  border: none; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
}
.newsletter input:focus { outline: 3px solid rgba(255,255,255,.5); }

/* ==========================================================================
   CTA band
   ========================================================================== */
.ctaband { background: linear-gradient(150deg, var(--navy) 0%, var(--navy-900) 100%); color:#fff; text-align:center; }
.ctaband h2 { color:#fff; font-size: clamp(1.9rem, 4vw, 2.8rem); }
.ctaband p { color:#bcd2db; max-width: 56ch; margin: 14px auto 0; }
.ctaband__actions { display:flex; flex-wrap:wrap; gap:14px; justify-content:center; margin-top: 28px; }

/* ==========================================================================
   Testimonials
   ========================================================================== */
.tcard {
  background: var(--navy); color:#fff; border-radius: var(--radius-lg); padding: 30px;
  box-shadow: var(--shadow-md); display:flex; flex-direction:column; gap: 14px; height: 100%;
}
.section--sand .tcard, .section--cream .tcard { background:#fff; color: var(--ink); border:1px solid var(--line); }
.stars { color: var(--gold); letter-spacing: 2px; font-size: 1.05rem; }
.tcard blockquote { font-size: 1.02rem; line-height: 1.6; }
.section--navy .tcard blockquote { color:#dceaf0; }
.tcard .who { display:flex; align-items:center; gap: 12px; margin-top: auto; }
.tcard .who img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.tcard .who .avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--sage-100); color: var(--sage-600);
  font-family: var(--font-head); font-weight: 700; font-size: .95rem; letter-spacing: .03em;
}
.tcard .who b { font-family: var(--font-head); display:block; }
.tcard .who span { font-size: .84rem; color: var(--muted); }
.section--navy .tcard .who span { color:#9fbccb; }

/* ==========================================================================
   Steps (admissions)
   ========================================================================== */
.steps { counter-reset: step; display:grid; gap: 22px; }
.step {
  display:grid; grid-template-columns: 64px 1fr; gap: 20px; align-items:flex-start;
  background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
}
.step__num {
  counter-increment: step; width: 64px; height: 64px; border-radius: 50%;
  background: var(--navy); color:#fff; font-family: var(--font-head); font-weight:800; font-size: 1.5rem;
  display:grid; place-items:center;
}
.step__num::before { content: counter(step); }
.step h3 { font-size: 1.22rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .97rem; }

/* ==========================================================================
   FAQ / Accordion
   ========================================================================== */
.faq { max-width: 820px; margin-inline:auto; display:grid; gap: 14px; }
.faq__item { background:#fff; border:1px solid var(--line); border-radius: var(--radius); overflow:hidden; }
.faq__q {
  width:100%; text-align:left; display:flex; justify-content:space-between; align-items:center; gap: 16px;
  padding: 20px 22px; font-family: var(--font-head); font-weight:600; font-size: 1.05rem; color: var(--navy);
}
.faq__q .chev { transition: transform .25s ease; flex:none; color: var(--sage-600); }
.faq__item.open .chev { transform: rotate(180deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq__a p { padding: 0 22px 20px; color: var(--muted); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--navy-900); color: #b7ccd6; padding-top: clamp(48px, 7vw, 80px); }
.footer__grid { display:grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer h4 { color:#fff; font-size: 1.05rem; margin-bottom: 18px; letter-spacing:.02em; }
.footer a:hover { color:#fff; }
.footer__brand .brand__name { color:#fff; }
.footer__brand .brand__tag { color:#7f9dab; }
.footer__brand p { margin-top: 16px; font-size: .95rem; color:#9db6c2; max-width: 34ch; }
.footer ul { display:grid; gap: 11px; }
.footer ul a { display:inline-flex; align-items:center; gap:9px; font-size:.96rem; }
.footer .contact li { display:flex; gap: 11px; align-items:flex-start; font-size: .96rem; }
.footer .contact svg { width: 18px; height: 18px; color: var(--sage); flex:none; margin-top: 3px; }
.footer form { display:flex; flex-direction: column; gap: 10px; }
.footer form input { padding: .8em 1em; border-radius: 12px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color:#fff; }
.footer form input::placeholder { color:#8fa9b6; }
.footer form input:focus { outline: 2px solid var(--sage); }
.socials { display:flex; gap: 10px; margin-top: 6px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08); display:grid; place-items:center; color:#dceaf0; transition: background .18s ease; }
.socials a:hover { background: var(--sage); color:#fff; }
.socials svg { width: 18px; height: 18px; }
.footer__bottom {
  margin-top: clamp(40px,6vw,64px); border-top: 1px solid rgba(255,255,255,.12);
  padding: 22px 0; display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; font-size:.86rem; color:#8fa9b6;
}
.footer__bottom a:hover { color:#fff; }

/* Emergency banner */
.emergency { background: var(--gold); color:#3a2807; text-align:center; font-size:.9rem; font-weight:600; padding: 9px 16px; font-family: var(--font-head); }
.emergency a { text-decoration: underline; }

/* ==========================================================================
   Reveal animation
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   Toast notifications
   ========================================================================== */
.toast-wrap {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  display: flex; flex-direction: column; gap: 12px; width: min(92vw, 380px);
}
.toast {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border-radius: 14px; padding: 16px 18px;
  box-shadow: var(--shadow-lg); border-left: 5px solid var(--sage);
  transform: translateY(24px); opacity: 0;
  transition: transform .38s cubic-bezier(.4,0,.2,1), opacity .38s ease;
}
.toast.show { transform: none; opacity: 1; }
.toast__icon {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--sage-100); color: var(--sage-600); display: grid; place-items: center;
}
.toast__icon svg { width: 22px; height: 22px; }
.toast__body { flex: 1; min-width: 0; }
.toast__title { font-family: var(--font-head); font-weight: 700; color: var(--navy); font-size: 1rem; line-height: 1.2; }
.toast__msg { color: var(--muted); font-size: .9rem; margin-top: 3px; }
.toast__close {
  color: var(--muted); font-size: 1.25rem; line-height: 1; flex: none;
  width: 26px; height: 26px; border-radius: 6px;
}
.toast__close:hover { color: var(--ink); background: var(--sand); }
@media (prefers-reduced-motion: reduce) {
  .toast { transition: opacity .2s ease; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .header-cta .btn:not(.header-cta__phone) { display: none; }
  .nav-toggle { display: inline-flex; }
  .mainnav { display: none; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { min-height: 320px; order: -1; }
  .hero__badge { left: 16px; bottom: 16px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .newsletter__inner { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 48px 1fr; gap: 14px; }
  .step__num { width: 48px; height: 48px; font-size: 1.2rem; }
  .header-cta__phone .label { display: none; }
  .form-row { grid-template-columns: 1fr !important; }
}
@media (max-width: 420px) {
  .brand__tag { display:none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .progcard:hover { transform: none; }
}
