/* ===== Aarya Academy — design tokens ===== */
:root {
  /* Brand colours taken from the Aarya Academy logo */
  --brand: #3F80CE;       /* logo blue */
  --brand-2: #4079BD;     /* logo secondary blue */
  --brand-d: #2A66B0;     /* darker blue for buttons (better contrast) */
  --brand-l: #8CBAF0;     /* light blue for use on dark backgrounds */
  --board: #0F2A4D;       /* deep navy (hero, results) */
  --board-2: #1B4274;
  --paper: #F6F9FD;
  --tint: #EAF2FB;
  --ink: #1A1A18;         /* logo black */
  --muted: #56627A;
  --line: #D6E1EF;
  --chalk: #EEF4FC;
  --white: #FFFFFF;

  --f-head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Mukta", "Segoe UI", system-ui, sans-serif;

  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.65;
  color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--board-2); }
h1, h2, h3 { font-family: var(--f-head); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--brand-d); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--f-head); font-weight: 700; font-size: 1rem;
  background: var(--brand-d); color: #fff; text-decoration: none;
  padding: .85rem 1.4rem; border-radius: 999px; border: 2px solid var(--brand-d);
  cursor: pointer; transition: background .15s, transform .15s;
}
.btn:hover { background: var(--brand); border-color: var(--brand); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--chalk); border-color: rgba(238,244,240,.4); }
.btn-ghost:hover { background: rgba(238,244,240,.1); }
.btn-sm { padding: .5rem 1rem; font-size: .95rem; }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); color: var(--ink); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; }
.brand img { height: 54px; width: auto; transition: transform .4s cubic-bezier(.34,1.56,.64,1); }
.brand:hover img { transform: scale(1.03); }
.menu { display: flex; align-items: center; gap: 1.6rem; }
.menu a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; opacity: .85; }
.menu a:not(.btn):hover { opacity: 1; color: var(--brand-d); }
.menu-btn { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.menu-btn span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s, opacity .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  background: var(--board); color: var(--chalk); padding: 4rem 0 5rem;
  background-image:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.05), transparent 40%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(238,244,240,.04) 39px 40px);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3.5rem; align-items: center; }
.hero-note {
  display: inline-block; background: rgba(140,186,240,.16); color: var(--brand-l);
  padding: .25rem .8rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
}
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; margin: .6rem 0 1.2rem; color: var(--white); }
.lead { font-size: 1.2rem; max-width: 34em; opacity: .9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 2.4rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 2.2rem; margin: 0; }
.hero-facts dt { font-family: var(--f-head); font-weight: 800; font-size: 1.6rem; color: var(--white); }
.hero-facts dd { margin: 0; opacity: .75; font-size: .95rem; }

/* Timetable card — the hero's signature element */
.timetable {
  background: var(--paper); color: var(--ink); border-radius: var(--r-lg);
  padding: 1.5rem 1.5rem 1.2rem; box-shadow: 0 30px 60px -20px rgba(0,0,0,.45);
  transform: rotate(1.2deg); border-top: 8px solid var(--brand);
}
.tt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 2px dashed var(--line); padding-bottom: .8rem; margin-bottom: .6rem; }
.tt-head h2 { font-size: 1.2rem; margin: 0; }
.tt-day { font-weight: 600; color: var(--muted); }
.tt-list { list-style: none; margin: 0; padding: 0; }
.tt-list li { display: grid; grid-template-columns: 3.4rem 1fr; gap: .8rem; padding: .7rem .5rem; border-radius: var(--r-sm); }
.tt-list li + li { border-top: 1px solid var(--line); }
.tt-list time { font-family: var(--f-head); font-weight: 700; color: var(--board-2); }
.tt-list strong { display: block; font-weight: 600; line-height: 1.3; }
.tt-list span { font-size: .92rem; color: var(--muted); }
.tt-list li.now { background: #E3EEFB; border-top-color: transparent; }
.tt-list li.now + li { border-top-color: transparent; }
.tt-list li.now time::after { content: ""; display: block; width: 8px; height: 8px; background: var(--brand); border-radius: 50%; margin-top: .35rem; }
.tt-foot { margin: .8rem 0 0; font-size: .92rem; color: var(--muted); }

/* ===== Sections ===== */
.section { padding: 5rem 0; }
.section-tint { background: var(--tint); }
.section-title { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 800; color: var(--board); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-head p { margin: 0; color: var(--muted); }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.about-grid > div p { max-width: 36em; color: #2A3833; }
.pillars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem 2rem; }
.pillars li { border-left: 4px solid var(--brand); padding-left: 1rem; }
.pillars h3 { font-size: 1.15rem; margin-bottom: .3rem; }
.pillars p { margin: 0; color: var(--muted); font-size: 1rem; }

/* Courses */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.chip {
  transition: background .25s, color .25s, border-color .25s, transform .2s;
  font: 600 .98rem var(--f-body); padding: .45rem 1.1rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer;
}
.chip:hover { border-color: var(--board-2); }
.chip.active { background: var(--board); border-color: var(--board); color: var(--white); }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 1.25rem; }

/* Per-exam colours (all from the logo's blue family) */
.tone-cet  { --c1: #2A66B0; --c2: #4F95E0; --soft: #E3EEFB; }
.tone-jee  { --c1: #0F2A4D; --c2: #2E5E9E; --soft: #E4EAF4; }
.tone-neet { --c1: #146C8C; --c2: #33A1C4; --soft: #E0F2F8; }

.course {
  position: relative; display: flex; flex-direction: column; background: var(--white);
  border-radius: 20px; overflow: hidden; isolation: isolate;
  box-shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(15,42,77,.35);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}
.course::after { /* glowing ring on hover */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  border: 2px solid var(--c2); opacity: 0; transition: opacity .3s;
}
.course:hover { transform: translateY(-6px); box-shadow: 0 28px 50px -22px color-mix(in srgb, var(--c1) 55%, transparent); }
.course:hover::after { opacity: 1; }
.course[hidden] { display: none; }

.course-top {
  position: relative; display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1.2rem 1.8rem; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, var(--c1), var(--c2));
}
.course-top::before { /* soft chalk rings in the band */
  content: ""; position: absolute; right: -40px; top: -70px; width: 140px; height: 140px; border-radius: 50%;
  border: 18px solid rgba(255,255,255,.12); transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.course:hover .course-top::before { transform: scale(1.25) translate(-12px, 10px); }
.course-icon {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: rgba(255,255,255,.2); backdrop-filter: blur(4px); flex-shrink: 0;
  transition: transform .45s cubic-bezier(.34,1.56,.64,1);
}
.course:hover .course-icon { transform: rotate(-8deg) scale(1.1); }
.course-icon svg, .course-meta svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.course-tag { font-weight: 600; font-size: .92rem; opacity: .95; }
.badge {
  margin-left: auto; background: #fff; color: var(--c1); font-weight: 700; font-size: .78rem;
  padding: .2rem .6rem; border-radius: 999px; position: relative;
  animation: badgePop 2.8s ease-in-out infinite;
}
@keyframes badgePop { 0%, 80%, 100% { transform: scale(1); } 88% { transform: scale(1.1); } }

.course-body { position: relative; padding: 0 1.2rem; margin-top: -1.05rem; flex: 1; display: flex; flex-direction: column; }
.course-body h3 {
  align-self: flex-start; background: var(--white); font-size: 1.15rem; margin: 0 0 .35rem;
  padding: .5rem .8rem .1rem 0; border-radius: 0 12px 0 0;
}
.course-body > p {
  color: var(--muted); font-size: .95rem; line-height: 1.45; margin-bottom: .6rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.course-points { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .2rem; }
.course-points li { position: relative; padding-left: 1.55rem; font-size: .93rem; line-height: 1.45; }
.course-points li::before {
  content: ""; position: absolute; left: 0; top: .1rem; width: 1.05rem; height: 1.05rem; border-radius: 50%;
  background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F2A4D' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 70% no-repeat;
}
.course-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-bottom: .85rem; }
.course-meta span {
  display: inline-flex; align-items: center; gap: .35rem; background: var(--soft); color: var(--c1);
  font-weight: 600; font-size: .82rem; padding: .2rem .6rem; border-radius: 999px;
}
.course-meta svg { width: 14px; height: 14px; stroke-width: 2.2; }
.course-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .7rem 1.2rem; border-top: 1px dashed var(--line); background: #FBFCFB;
}
.fee strong { display: block; font: 800 1.2rem/1.1 var(--f-head); color: var(--board); }
.fee span { font-size: .8rem; color: var(--muted); }
.course-btn {
  position: relative; overflow: hidden; z-index: 0; text-decoration: none; font-weight: 700; font-size: .95rem;
  color: var(--c1); border: 2px solid var(--c1); padding: .38rem .9rem; border-radius: 999px;
  transition: color .3s;
}
.course-btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--c1);
  transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.course-btn:hover, .course-btn:focus-visible { color: #fff; }
.course-btn:hover::before, .course-btn:focus-visible::before { transform: scaleX(1); }
.is-popular { box-shadow: 0 0 0 2px var(--brand), 0 18px 40px -20px rgba(63,128,206,.6); }

/* Filter transitions */
.course.is-leaving { opacity: 0; transform: scale(.94); transition: opacity .22s, transform .22s; }
.course.is-entering { animation: cardIn .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.note { margin-top: 1.5rem; color: var(--muted); font-size: .95rem; }

/* Steps — a real sequence, so numbered */
.steps { list-style: none; counter-reset: step; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.steps li { counter-increment: step; position: relative; padding-top: 3.2rem; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0; width: 2.4rem; height: 2.4rem;
  display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: #fff;
  font: 800 1.1rem var(--f-head);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 1.2rem; left: 3rem; right: -1rem; border-top: 2px dashed var(--line);
}
.steps h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.steps p { color: var(--muted); font-size: 1rem; margin: 0; }

/* Faculty */
.faculty-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-top: 2rem; }
.teacher { background: var(--white); border-radius: var(--r-md); padding: 1.5rem; border: 1px solid var(--line); }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--tint); color: var(--brand-d); font: 800 1.3rem var(--f-head); margin-bottom: 1rem;
}
.teacher h3 { font-size: 1.12rem; margin-bottom: .1rem; }
.role { color: var(--board-2); font-weight: 600; font-size: .95rem; margin-bottom: .6rem; }
.teacher p:last-child { color: var(--muted); font-size: .98rem; margin: 0; }

/* Results */
.results { background: var(--board); color: var(--chalk); }
.results .section-title { color: var(--white); }
.result-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 2rem 0 3rem; }
.result { border-top: 3px solid var(--brand-l); padding-top: 1rem; }
.result strong { display: block; font: 800 clamp(2rem, 4vw, 2.8rem) var(--f-head); color: var(--white); }
.result > span { opacity: .8; }
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.quotes blockquote { margin: 0; background: var(--board-2); border-radius: var(--r-md); padding: 1.5rem; }
.quotes p { font-size: 1.08rem; }
.quotes footer { color: var(--brand-l); font-weight: 600; font-size: .95rem; }

/* FAQ */
.faq-wrap { max-width: 820px; }
.faq { margin-top: 1.5rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.1rem 2.5rem 1.1rem 0; position: relative;
  font: 700 1.1rem var(--f-head);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .3rem; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; font-weight: 500; color: var(--board-2); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 1rem; margin: 0; }

/* Contact */
.contact { background: var(--tint); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 2rem 0 0; }
.contact-list li { padding: .8rem 0; border-top: 1px solid var(--line); }
.contact-list span { display: block; font-size: .88rem; color: var(--muted); }
.contact-list a { color: var(--ink); font-weight: 600; text-decoration: none; }
.enquiry { background: var(--white); padding: 2rem; border-radius: var(--r-lg); border: 1px solid var(--line); display: grid; gap: 1rem; }
.enquiry label { display: grid; gap: .35rem; font-weight: 600; font-size: .98rem; }
.enquiry small { font-weight: 400; color: var(--muted); }
.enquiry input, .enquiry select, .enquiry textarea {
  font: 400 1rem var(--f-body); padding: .75rem .9rem; border: 1.5px solid var(--line);
  border-radius: var(--r-sm); background: var(--paper); color: var(--ink); width: 100%;
}
.enquiry input:focus, .enquiry select:focus, .enquiry textarea:focus { outline: none; border-color: var(--board-2); background: var(--white); box-shadow: 0 0 0 3px rgba(63,128,206,.3); }
.hp { position: absolute; left: -9999px; }
.form-msg { padding: .8rem 1rem; border-radius: var(--r-sm); margin: 0; font-weight: 500; }
.form-msg.ok { background: #E3F2E8; color: #1F5B36; }
.form-msg.err { background: #FDE8E6; color: #8A2A1F; }
.form-legal { font-size: .88rem; color: var(--muted); margin: 0; text-align: center; }

/* ===== Legal pages ===== */
.legal-hero { background: var(--board); color: var(--chalk); padding: 3.5rem 0 3rem; }
.legal-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--white); font-weight: 800; }
.legal-hero p { margin: 0; opacity: .8; }
.crumbs { margin-bottom: .8rem !important; }
.crumbs a { color: var(--brand-l); text-decoration: none; }
.legal { max-width: 760px; padding: 3.5rem 0 5rem; }
.legal h2 { font-size: 1.4rem; color: var(--board); margin-top: 2.2rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .45rem; }
.legal li::marker { color: var(--brand); }

/* ===== Footer ===== */
.site-footer { background: #0A1F3A; color: var(--chalk); padding: 4rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 2.5rem; }
.footer-logo img { height: 56px; width: auto; }
.footer-about { opacity: .75; margin-top: 1rem; max-width: 28em; }
.site-footer h3 { font-size: 1rem; color: var(--brand-l); margin-bottom: .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: var(--chalk); text-decoration: none; opacity: .85; }
.site-footer a:hover { opacity: 1; color: var(--brand-l); }
.site-footer address { font-style: normal; opacity: .85; line-height: 1.8; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .8rem;
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(238,244,240,.15); font-size: .92rem;
}
.footer-bottom p { margin: 0; opacity: .7; }
.footer-legal { display: flex; gap: 1.5rem; }

/* WhatsApp button */
.wa-float {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 60; width: 56px; height: 56px;
  display: grid; place-items: center; border-radius: 50%; background: #25D366; color: #fff;
  box-shadow: 0 10px 24px -6px rgba(0,0,0,.35);
}

/* ===== Responsive ===== */
@media (max-width: 1000px) {
  .faculty-grid, .result-row { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 2.2rem; }
  .steps li::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .menu {
    position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--white); padding: .5rem 1.25rem 1.25rem; border-top: 1px solid var(--line); box-shadow: 0 20px 30px -20px rgba(15,42,77,.35);
    display: none;
  }
  .menu.open { display: flex; }
  .menu a:not(.btn) { padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .menu .btn { margin-top: 1rem; }
  .hero { padding: 3rem 0 4rem; }
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .timetable { transform: none; }
  .quotes { grid-template-columns: 1fr; }
  .section { padding: 3.5rem 0; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .brand img { height: 42px; }
  .hero-actions .btn { width: 100%; }
  .hero-facts { gap: 1.4rem; }
  .pillars, .faculty-grid, .steps, .footer-grid { grid-template-columns: 1fr; }
  .result-row { grid-template-columns: 1fr 1fr; }
  .enquiry { padding: 1.4rem; }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .4rem; margin-inline: -1.25rem; padding-inline: 1.25rem; }
  .chip { flex-shrink: 0; }
}
/* ================= MOTION ================= */

/* Scroll progress bar */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 70; background: var(--brand); transform-origin: left; transform: scaleX(0); }

/* Header gets a shadow once you scroll */
.site-header { transition: box-shadow .3s, background .3s; }
.site-header.scrolled { box-shadow: 0 8px 24px -14px rgba(15,42,77,.35); background: rgba(255,255,255,.94); backdrop-filter: blur(8px); }
.menu a:not(.btn) { position: relative; }
.menu a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--brand);
  transform: scaleX(0); transition: transform .3s;
}
.menu a:not(.btn):hover::after, .menu a.active::after { transform: scaleX(1); }
.menu a.active { color: var(--brand-d); opacity: 1; }

/* Button shine */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: ""; position: absolute; top: 0; left: -75%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg);
}
.btn:hover::after { animation: shine .8s ease; }
@keyframes shine { to { left: 130%; } }

/* Hero page-load sequence */
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .line > span { display: inline-block; animation: lineUp .9s cubic-bezier(.2,.8,.2,1) both; }
.hero h1 .line:nth-child(2) > span { animation-delay: .12s; }
@keyframes lineUp { from { transform: translateY(105%); } }
.hero-note, .lead, .hero-actions, .hero-facts { animation: fadeUp .8s cubic-bezier(.2,.8,.2,1) both; }
.hero-note { animation-delay: 0s; }
.lead { animation-delay: .3s; }
.hero-actions { animation-delay: .42s; }
.hero-facts { animation-delay: .54s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } }

.timetable { animation: cardDrop 1s cubic-bezier(.2,.8,.2,1) .25s backwards; }
@keyframes cardDrop { from { opacity: 0; transform: translateY(40px) rotate(-4deg); } to { opacity: 1; transform: rotate(1.2deg); } }
.timetable:hover { transform: rotate(0deg) translateY(-4px); transition: transform .4s; }
.tt-list li { animation: rowIn .5s cubic-bezier(.2,.8,.2,1) both; }
.tt-list li:nth-child(1) { animation-delay: .7s; }
.tt-list li:nth-child(2) { animation-delay: .8s; }
.tt-list li:nth-child(3) { animation-delay: .9s; }
.tt-list li:nth-child(4) { animation-delay: 1s; }
.tt-list li:nth-child(5) { animation-delay: 1.1s; }
@keyframes rowIn { from { opacity: 0; transform: translateX(24px); } }
.tt-list li.now time::after { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(63,128,206,.6); } 100% { box-shadow: 0 0 0 10px rgba(63,128,206,0); } }

/* Floating chalk dots in hero */
.hero { position: relative; overflow: hidden; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  border: 2px dashed rgba(140,186,240,.25); animation: spin 40s linear infinite;
}
.hero::before { width: 420px; height: 420px; right: -140px; bottom: -200px; }
.hero::after { width: 180px; height: 180px; left: -60px; top: 40px; animation-duration: 28s; animation-direction: reverse; }
.hero-grid { position: relative; z-index: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Scroll reveal (only applies once JS confirms it's running) */
.js [data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--d, 0) * 90ms); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js [data-reveal-group] > * { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }
.js [data-reveal-group].in > * { opacity: 1; transform: none; }
.js [data-reveal-group].in > *:nth-child(2) { transition-delay: .1s; }
.js [data-reveal-group].in > *:nth-child(3) { transition-delay: .2s; }
.js [data-reveal-group].in > *:nth-child(4) { transition-delay: .3s; }
/* keep card hover snappy after reveal */
.js .course[data-reveal].in { transition: opacity .8s, transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }

/* Steps: dashed connector draws in */
.steps li:not(:last-child)::after { transform-origin: left; transform: scaleX(0); transition: transform .9s ease .4s; }
.steps.in li::after, html:not(.js) .steps li::after { transform: scaleX(1); }
.steps li::before { transition: transform .4s cubic-bezier(.34,1.56,.64,1); }
.steps li:hover::before { transform: scale(1.15); }

/* Pillars, faculty, quotes hover */
.pillars li { transition: border-color .3s, transform .3s; }
.pillars li:hover { transform: translateX(6px); border-color: var(--board-2); }
.teacher { transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
.teacher:hover { transform: translateY(-6px); box-shadow: 0 22px 40px -24px rgba(15,42,77,.5); }
.avatar { transition: transform .5s cubic-bezier(.34,1.56,.64,1), background .3s; }
.teacher:hover .avatar { transform: rotate(-8deg) scale(1.08); background: var(--brand); color: #fff; }
.quotes blockquote { transition: transform .35s, background .35s; }
.quotes blockquote:hover { transform: translateY(-5px); background: #24528C; }

/* FAQ answer slides in */
.faq details[open] p { animation: fadeUp .4s ease both; }

/* WhatsApp button gentle ring */
.wa-float { transition: transform .3s; }
.wa-float:hover { transform: scale(1.1); }
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25D366;
  animation: ring 2.4s ease-out infinite;
}
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }

@media (max-width: 860px) {
  .timetable { animation-name: cardDropFlat; }
  @keyframes cardDropFlat { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
  .timetable:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js [data-reveal-group] > * { opacity: 1 !important; transform: none !important; }
  .steps li::after { transform: none !important; }
}
/* ===== Enquiry form — fields & inline errors ===== */

/* .enquiry var already `display:grid; gap:1rem` aahe, mhanun .field la margin nako */
.enquiry .field { display: grid; gap: .35rem; }

.enquiry .field > label {
  font-weight: 600;
  font-size: .98rem;
  color: var(--ink);
}
.enquiry .field > label small { font-weight: 400; color: var(--muted); }

/* Error text — field cha khali */
.enquiry .field-error {
  display: none;
  font-size: .86rem;
  line-height: 1.4;
  color: #8A2A1F;                 /* .form-msg.err chya ink shi match */
  padding-left: 1.35rem;
  position: relative;
}
.enquiry .field-error.show { display: block; animation: fieldErrIn .25s cubic-bezier(.2,.8,.2,1) both; }

/* Chhota warning icon */
.enquiry .field-error.show::before {
  content: "!";
  position: absolute; left: 0; top: .12em;
  width: 1rem; height: 1rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #D93025; color: #fff;
  font: 700 .72rem/1 var(--f-head);
}

@keyframes fieldErrIn { from { opacity: 0; transform: translateY(-4px); } }

/* Invalid input state */
.enquiry input.invalid,
.enquiry select.invalid,
.enquiry textarea.invalid {
  border-color: #D93025;
  background: #FFF7F6;
}
.enquiry input.invalid:focus,
.enquiry select.invalid:focus,
.enquiry textarea.invalid:focus {
  border-color: #D93025;
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(217, 48, 37, .22);
}

/* Shake — fakt submit var error aalyavar */
.enquiry input.invalid.shake { animation: fieldShake .4s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes fieldShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

/* Mobile field — digits sarkhe disnyasathi */
.enquiry #f-phone { letter-spacing: .04em; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .enquiry .field-error.show,
  .enquiry input.invalid.shake { animation: none !important; }
}
