/* ==========================================================================
   Avondale Preparatory School — v2 theme
   Design system: bright blue #2f6bff + warm orange accent, navy #141f47,
   Mulish, rounded cards, pill buttons, soft layered shadows.
   v1 class + variable names are kept (remapped) so existing views re-skin.
   ========================================================================== */

:root {
  /* new design-system names */
  --navy: #141f47;
  --navy-glow: #25357a;
  --primary: #2f6bff;
  --primary-600: #2456d6;
  --tint: #eef4ff;
  --tint-2: #e3ecff;
  --ink: #1b2540;
  --muted: #5b6780;
  --faint: #8a97b3;
  --hairline: #e6ecf5;
  --hairline-2: #eef2f9;
  --surface: #f4f7fc;
  --surface-2: #eef3fb;
  --white: #fff;
  --accent: #ff8a4c;
  --accent-tint: #fff1e8;
  --accent-ink: #c25419;
  --green: #16a34a;  --green-tint: #e7f6ec;
  --amber: #f59e0b;  --amber-tint: #fdf3df;  --amber-ink: #b9750a;
  --red: #e5484d;    --red-tint: #fdeaea;
  --violet: #7c5cff; --cyan: #0ea5b5; --pink: #e05fa8;

  /* v1 aliases (so inline var() references in existing views still work) */
  --navy-900: #0f1838;
  --navy-800: #141f47;
  --navy-700: #1d2a5c;
  --navy-600: #25357a;
  --blue-600: #2456d6;
  --blue-500: #2f6bff;
  --blue-400: #5b8bff;
  --blue-100: #d7e3ff;
  --blue-050: #eef4ff;
  --cyan-500: #0ea5b5;
  --ink-soft: #5b6780;
  --line: #e6ecf5;
  --green-050: #e7f6ec;
  --amber-050: #fdf3df;
  --red-050: #fdeaea;

  --radius: 18px;      --r-card: 18px;
  --radius-sm: 12px;   --r-input: 12px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20,32,74,.06), 0 1px 3px rgba(20,32,74,.05);
  --shadow: 0 8px 24px -8px rgba(20,32,74,.14), 0 2px 6px rgba(20,32,74,.06);
  --shadow-lg: 0 24px 60px -16px rgba(20,32,74,.22), 0 6px 16px rgba(20,32,74,.08);
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4 { margin: 0; line-height: 1.15; color: var(--navy); font-weight: 900; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-600); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2.5px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #cdd8ea; border: 3px solid transparent; border-radius: 99px; background-clip: content-box; }
@keyframes floaty { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
@keyframes fadeUp { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:none} }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px,4vw,28px); }
.section { padding: clamp(40px,5vw,72px) 0; }
.section.tight { padding: clamp(28px,4vw,48px) 0; }
.section.surface { background: var(--surface); }
.section-head { max-width: 640px; margin: 0 auto 36px; text-align: center; }
.section-title { font-size: clamp(26px,3.4vw,40px); font-weight: 900; letter-spacing: -0.02em; }
.section-sub { margin-top: 12px; color: var(--muted); font-size: clamp(15px,1.6vw,17px); }
.muted { color: var(--muted); }
.center { text-align: center; }
.eyebrow, .overline {
  display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--primary);
}
.eyebrow { background: var(--tint); color: var(--primary-600); padding: 6px 12px; border-radius: var(--r-pill); margin-bottom: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 800; font-size: 14px; padding: 11px 20px;
  border-radius: var(--r-pill); border: 1.5px solid transparent; cursor: pointer;
  font-family: inherit; transition: transform .15s, box-shadow .15s, background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px -8px var(--primary); }
.btn-primary:hover { background: var(--primary-600); transform: translateY(-1px); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-glow); transform: translateY(-1px); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--hairline); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-danger { background: var(--red-tint); color: var(--red); }
.btn-danger:hover { background: #fbdcdc; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--hairline); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 14px 26px; font-size: 15px; }
.btn-block { width: 100%; }

/* ---------- forms ---------- */
.field { margin-bottom: 15px; }
.field > label { display: block; font-weight: 700; font-size: 13px; color: var(--ink); margin-bottom: 7px; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
input[type=text],input[type=email],input[type=password],input[type=tel],input[type=number],
input[type=date],input[type=time],input[type=search],select,textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--hairline); border-radius: var(--r-input);
  font: inherit; font-size: 14.5px; color: var(--ink); background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 92px; }
input:focus,select:focus,textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(47,107,255,.12); }
input::placeholder, textarea::placeholder { color: var(--faint); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
label.check { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; color: var(--muted); cursor: pointer; font-size: 13.5px; }
label.check input { width: auto; accent-color: var(--primary); }

/* ---------- alerts ---------- */
.alert { border-radius: var(--r-input); padding: 13px 16px; font-weight: 700; font-size: 14px; margin-bottom: 18px; border: 1px solid transparent; }
.alert-ok { background: var(--green-tint); color: #12633a; border-color: #bff0cf; }
.alert-err { background: var(--red-tint); color: #b3282d; border-color: #f6cccd; }
.alert-info { background: var(--tint); color: var(--primary-600); border-color: #d7e3ff; }
.alert-warn { background: var(--amber-tint); color: var(--amber-ink); border-color: #fbe3ac; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: 11.5px;
  padding: 4px 11px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); text-transform: capitalize; }
.badge.blue { background: rgba(47,107,255,.12); color: var(--primary-600); }
.badge.green { background: var(--green-tint); color: var(--green); }
.badge.amber { background: var(--amber-tint); color: var(--amber-ink); }
.badge.red { background: var(--red-tint); color: var(--red); }
.badge.navy { background: var(--navy); color: #fff; }
.badge.grey { background: var(--surface-2); color: var(--muted); }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* rounded-square avatar (initials) */
.avatar {
  width: 40px; height: 40px; border-radius: 30%; display: grid; place-items: center;
  font-weight: 900; font-size: 14px; color: #fff; flex: none;
}

/* ---------- cards ---------- */
.card { background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 22px; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { font-size: 16px; font-weight: 800; }

/* ==========================================================================
   Public navbar + hero + sections
   ========================================================================== */
.site-nav { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--hairline); }
.site-nav .nav-inner { display: flex; align-items: center; gap: 20px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .brand-badge { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--navy), var(--navy-glow)); display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 18px; box-shadow: var(--shadow); overflow: hidden; }
.brand .brand-badge img { width: 100%; height: 100%; object-fit: cover; }
.brand .bt { line-height: 1.15; }
.brand .bt b { font-weight: 900; font-size: 16px; color: var(--navy); letter-spacing: -0.01em; display: block; }
.brand .bt small { font-size: 11px; color: var(--muted); font-weight: 600; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 14px; font-weight: 700; }
.nav-links a { color: var(--muted); }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-toggle { display: none; border: 1.5px solid var(--hairline); background: #fff; border-radius: 10px; padding: 8px 10px; cursor: pointer; font-size: 16px; }
.mobile-menu { display: none; flex-direction: column; padding: 8px 0 16px; border-bottom: 1px solid var(--hairline); background: #fff; }
.mobile-menu a { padding: 11px 4px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--surface-2); }
.mobile-menu.open { display: flex; }

.hero { padding: clamp(28px,5vw,60px) 0 clamp(20px,4vw,44px); background: var(--white); }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(28px,4vw,56px); align-items: center; }
.hero-copy { animation: fadeUp .5s ease both; }
.hero-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--accent-tint); color: var(--accent-ink); font-weight: 800; font-size: 12.5px; padding: 6px 13px; border-radius: var(--r-pill); margin-bottom: 18px; }
.hero h1 { font-size: clamp(34px,5vw,60px); font-weight: 900; line-height: 1.05; letter-spacing: -0.03em; }
.hero h1 .accent { color: var(--primary); }
.hero-lead { font-size: clamp(15px,1.6vw,18px); color: var(--muted); line-height: 1.6; max-width: 46ch; margin: 18px 0 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual { position: relative; aspect-ratio: 4/3; border-radius: calc(var(--r-card) + 8px); overflow: hidden; box-shadow: var(--shadow-lg); background: linear-gradient(150deg, var(--navy), var(--navy-glow)); display: grid; place-items: center; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual .ph { color: #fff; font-size: 90px; filter: drop-shadow(0 10px 20px rgba(0,0,0,.25)); }

.stats { background: var(--surface); }
.stats-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 18px; padding: clamp(24px,4vw,40px) 0; }
.stats-inner .stat { text-align: center; padding: 8px; }
.stats-inner .stat .val { font-size: clamp(30px,4vw,44px); font-weight: 900; letter-spacing: -0.02em; color: var(--navy); }
.stats-inner .stat .lbl { font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 4px; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 20px; }
.feature-card { background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 26px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-card .ic { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 24px; background: var(--tint); color: var(--primary); }
.feature-card:nth-child(4n+2) .ic { background: var(--accent-tint); color: var(--accent-ink); }
.feature-card:nth-child(4n+3) .ic { background: var(--green-tint); color: var(--green); }
.feature-card:nth-child(4n+4) .ic { background: var(--amber-tint); color: var(--amber-ink); }
.feature-card h3 { font-size: 18px; font-weight: 800; margin: 16px 0 8px; }
.feature-card p { font-size: 14px; color: var(--muted); line-height: 1.6; }

.cta-band { background: linear-gradient(120deg, var(--navy), var(--navy-glow)); color: #fff; border-radius: 24px; padding: clamp(32px,4vw,52px); display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; box-shadow: var(--shadow); }
.cta-band h2 { color: #fff; font-size: clamp(24px,3.5vw,34px); }
.cta-band p { color: #c3cce6; margin-top: 8px; font-size: 16px; }

.site-footer { background: var(--navy); color: #c3cce6; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 36px; padding: 48px 0 0; }
.site-footer h4 { color: #fff; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a { color: #aeb9d6; display: block; padding: 5px 0; font-size: 14.5px; }
.site-footer a:hover { color: #fff; }
.site-footer .about .brand b { color: #fff; }
.site-footer .about p { color: #9fabc9; margin-top: 12px; font-size: 14.5px; }
.footer-bottom { margin-top: 36px; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 13px; color: #8b98bd; }

/* ---------- news ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 20px; }
.news-card { background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news-card .thumb { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--tint), var(--surface-2)); display: grid; place-items: center; font-size: 40px; color: var(--primary); overflow: hidden; }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card .body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.news-card .cat { align-self: flex-start; background: rgba(47,107,255,.12); color: var(--primary-600); font-weight: 800; font-size: 11px; padding: 3px 10px; border-radius: var(--r-pill); }
.news-card h3 { font-size: 16px; font-weight: 800; margin: 10px 0 6px; line-height: 1.3; }
.news-card p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.news-card .date { margin-top: auto; padding-top: 12px; color: var(--faint); font-size: 12px; font-weight: 700; }
.article { max-width: 760px; margin: 0 auto; }
.article .hero-emoji { aspect-ratio: 21/9; border-radius: var(--r-card); background: linear-gradient(135deg, var(--tint), var(--surface-2)); display: grid; place-items: center; font-size: 64px; color: var(--primary); margin-bottom: 26px; overflow: hidden; }
.article .hero-emoji img { width: 100%; height: 100%; object-fit: cover; }
.article-body { font-size: 16.5px; color: #33405c; line-height: 1.75; }
.article-body p { margin-top: 16px; }

/* contact rows */
.contact-row { display: flex; gap: 12px; align-items: center; }
.contact-row .ic { width: 40px; height: 40px; border-radius: 11px; background: var(--tint); display: grid; place-items: center; font-size: 18px; flex: none; }
.contact-row .k { font-weight: 800; font-size: 14px; }
.contact-row .v { font-size: 13px; color: var(--muted); }

/* ==========================================================================
   Auth
   ========================================================================== */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px,1fr)); }
.auth-aside { background: linear-gradient(150deg, var(--navy), var(--navy-glow)); color: #fff; padding: clamp(32px,5vw,56px); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; min-height: 360px; }
.auth-aside .blob1 { position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,.06); top: -80px; right: -80px; animation: floaty 6s ease-in-out infinite; }
.auth-aside .blob2 { position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(47,107,255,.25); bottom: 40px; left: -60px; }
.auth-aside .aa-inner, .auth-aside .aa-top, .auth-aside .aa-foot { position: relative; z-index: 1; }
.auth-aside .aa-brand { display: flex; align-items: center; gap: 12px; }
.auth-aside .aa-brand .brand-badge { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.14); display: grid; place-items: center; font-weight: 900; font-size: 20px; overflow: hidden; }
.auth-aside .aa-brand .brand-badge img { width: 100%; height: 100%; object-fit: cover; }
.auth-aside h1, .auth-aside h2 { color: #fff; font-size: clamp(24px,3vw,34px); line-height: 1.15; margin: 22px 0 14px; }
.auth-aside p { color: rgba(255,255,255,.8); font-size: 15px; line-height: 1.6; max-width: 38ch; margin-bottom: 26px; }
.auth-aside .aa-list { display: grid; gap: 12px; }
.auth-aside .aa-list .li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.auth-aside .aa-list .li .tick { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.15); display: grid; place-items: center; font-size: 12px; flex: none; }
.auth-aside .aa-foot { font-size: 12px; opacity: .6; }
.auth-main { background: #fff; padding: clamp(32px,5vw,56px); display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 390px; }
.auth-card h1 { font-size: 26px; font-weight: 900; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.auth-tabs { display: flex; gap: 6px; background: var(--surface); border-radius: var(--r-pill); padding: 5px; margin-bottom: 22px; }
.auth-tabs a { flex: 1; text-align: center; padding: 9px; border-radius: var(--r-pill); font-weight: 800; font-size: 13.5px; color: var(--muted); }
.auth-tabs a.active { background: #fff; color: var(--primary-600); box-shadow: var(--shadow-sm); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--hairline); }
.auth-divider span { font-size: 12px; color: var(--faint); font-weight: 700; }
.auth-alt { margin-top: 20px; text-align: center; font-size: 14px; color: var(--muted); }

.text-link { color: var(--primary); font-weight: 700; }
.divider { height: 1px; background: var(--hairline); margin: 22px 0; border: 0; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============ motion + liquid glass ============ */
.reveal{opacity:0;transform:translateY(18px);transition:opacity .6s ease, transform .7s cubic-bezier(.2,.7,.2,1)}
.reveal.in{opacity:1;transform:none}
.reveal.d1{transition-delay:.06s}.reveal.d2{transition-delay:.12s}.reveal.d3{transition-delay:.18s}
@media (prefers-reduced-motion: reduce){.reveal{opacity:1 !important;transform:none !important;transition:none}}
.site-nav{transition:box-shadow .3s ease}
.site-nav.scrolled{box-shadow:var(--shadow-sm)}
/* liquid floating blobs behind the home hero */
.hero{position:relative;overflow:hidden}
.hero>.container{position:relative;z-index:1}
.hero::before,.hero::after{content:'';position:absolute;border-radius:50%;filter:blur(64px);opacity:.55;z-index:0;pointer-events:none}
.hero::before{width:440px;height:440px;background:radial-gradient(circle,var(--blue-100),transparent 70%);top:-140px;right:-90px;animation:floatBlob 16s ease-in-out infinite}
.hero::after{width:380px;height:380px;background:radial-gradient(circle,var(--accent-tint),transparent 72%);bottom:-160px;left:-110px;animation:floatBlob 20s ease-in-out infinite reverse}
@keyframes floatBlob{0%,100%{transform:translate(0,0) scale(1)}33%{transform:translate(32px,-22px) scale(1.08)}66%{transform:translate(-22px,26px) scale(.95)}}
/* glass sheen + gentle tilt on hero visual */
.hero-visual{transition:transform .45s cubic-bezier(.2,.7,.2,1)}
.hero-visual:hover{transform:translateY(-5px) rotate(-.6deg)}
.hero-visual::after{content:'';position:absolute;inset:0;background:linear-gradient(125deg,rgba(255,255,255,.30),transparent 42%);pointer-events:none}
.hero-visual .ph svg{animation:floaty 5s ease-in-out infinite}
/* icon-tile pop on card hover */
.feature-card .ic{transition:transform .22s ease, background .2s ease, color .2s ease}
.feature-card:hover .ic{transform:translateY(-3px) scale(1.08) rotate(-3deg)}
/* primary button shine sweep */
.btn-primary{position:relative;overflow:hidden}
.btn-primary::after{content:'';position:absolute;top:0;left:-130%;width:55%;height:100%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.4),transparent);transform:skewX(-18deg);transition:left .6s ease;pointer-events:none}
.btn-primary:hover::after{left:140%}
/* stat pop */
.stats-inner .stat .val{transition:transform .3s ease;display:inline-block}
.stats-inner .stat:hover .val{transform:scale(1.09)}
