:root {
  --ink: #140e18;
  --night: #1a1024;
  --plum: #3a1730;
  --maroon: #7a2438;
  --gold: #e4b15a;
  --gold-2: #f6d48a;
  --cream: #fbf6ee;
  --paper: #fffdf9;
  --muted: #6d6274;
  --line: rgba(228, 177, 90, 0.35);
  --shadow: 0 24px 60px rgba(20, 14, 24, 0.18);
  --header-h: 92px;
  --font: "Noto Sans Tamil", "Segoe UI", sans-serif;
  --display: "Noto Serif Tamil", "Noto Sans Tamil", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(228, 177, 90, 0.16), transparent 55%),
    radial-gradient(900px 420px at -10% 20%, rgba(122, 36, 56, 0.08), transparent 50%),
    var(--cream);
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font-family: inherit; }

.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 80;
  background: linear-gradient(90deg, var(--maroon), var(--gold), var(--gold-2));
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 18px 0;
}
.nav-shell {
  max-width: 1240px;
  margin: 0 auto;
  background: rgba(20, 14, 24, 0.92);
  color: #fff;
  border: 1px solid rgba(246, 212, 138, 0.22);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(20, 14, 24, 0.28);
  backdrop-filter: blur(16px);
  transition: border-radius 0.3s ease, padding 0.3s ease;
}
.site-header.is-stuck .nav-shell {
  border-radius: 0 0 22px 22px;
}
.ribbon {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 8px 22px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ribbon a { color: var(--gold-2); }
.ribbon span { margin-right: 16px; }
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 16px 12px 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
}
.brand-mark {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(228, 177, 90, 0.45);
}
.brand strong {
  display: block;
  letter-spacing: 0.08em;
  font-size: 14px;
  text-transform: uppercase;
}
.brand small {
  display: block;
  color: var(--gold-2);
  font-size: 12px;
  margin-top: 2px;
}
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(246, 212, 138, 0.35);
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  transition: 0.25s ease;
}
.nav-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 4px;
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}
.nav-links > li { position: relative; }
.nav-links > li > a {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 92px;
  padding: 8px 14px 7px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.15;
}
.nav-links > li > a .en {
  font-size: 14px;
  font-weight: 700;
}
.nav-links > li > a .ta {
  font-size: 11px;
  color: rgba(246, 212, 138, 0.8);
}
.nav-links > li > a.active,
.nav-links > li > a:hover {
  color: var(--ink);
}
.nav-links > li > a.active .ta,
.nav-links > li > a:hover .ta { color: var(--maroon); }
.nav-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: 92px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  box-shadow: 0 8px 20px rgba(228, 177, 90, 0.35);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), width 0.35s ease;
  z-index: 0;
}

.mega, .drop {
  position: absolute;
  top: 100%;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.mega { left: 50%; transform: translate(-50%, 8px); }
.drop { transform: translateY(8px); }
.mega::before,
.drop::before {
  content: "";
  position: absolute;
  left: -40px;
  right: -40px;
  top: -28px;
  height: 32px;
}
.mega {
  left: 50%;
  width: min(760px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px;
  background: #2b1c36;
  border: 1px solid rgba(246, 212, 138, 0.25);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.drop {
  right: 0;
  min-width: 220px;
  padding: 8px;
  background: #2b1c36;
  border-radius: 16px;
  border: 1px solid rgba(246, 212, 138, 0.25);
}
.drop a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #fff;
}
.drop a:hover { background: rgba(228, 177, 90, 0.16); color: var(--gold-2); }
.has-mega:hover .mega,
.has-mega:focus-within .mega,
.has-mega.open .mega {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 8px);
}
.has-drop:hover .drop,
.has-drop:focus-within .drop,
.has-drop.open .drop {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(8px);
}
.mega a {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: #120c18;
  border: 1px solid transparent;
}
.mega a:hover { border-color: var(--gold); transform: translateY(-3px); }
.mega img { height: 92px; width: 100%; object-fit: cover; background: #120c18; }
.mega strong {
  display: block;
  padding: 8px 10px 10px;
  font-size: 13px;
  color: var(--gold-2);
}
.nav-cta {
  margin-left: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(228, 177, 90, 0.28);
}
.nav-cta:hover { transform: translateY(-2px); }

.spy {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.spy a {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: transparent;
  position: relative;
}
.spy a.active { background: var(--gold); }
.spy a span {
  position: absolute;
  right: 22px;
  top: -6px;
  white-space: nowrap;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
}
.spy a:hover span { opacity: 1; }

/* Hero */
.hero {
  position: relative;
  z-index: 0;
  max-width: 1240px;
  margin: 22px auto 10px;
  min-height: 640px;
  border-radius: 32px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 24px;
  padding: 54px 48px;
  background:
    radial-gradient(700px 380px at 82% 30%, rgba(36, 92, 186, 0.4), transparent 62%),
    linear-gradient(120deg, #140e18 0%, #2a1840 52%, #16315f 100%);
  color: #fff;
  box-shadow: var(--shadow);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.7) 1px, transparent 1.4px);
  background-size: 90px 90px;
  opacity: 0.25;
  animation: drift 22s linear infinite;
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(246, 212, 138, 0.45);
  color: var(--gold-2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.25; margin: 0 0 12px; }
.hero h1 { font-size: clamp(36px, 4.4vw, 62px); margin-top: 16px; }
.lede { max-width: 560px; color: rgba(255,255,255,.86); font-size: 17px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
}
.btn.gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--ink); }
.btn.ghost { border-color: rgba(255,255,255,.45); color: #fff; background: transparent; }
.btn.maroon { background: var(--maroon); color: #fff; }
.btn:hover { transform: translateY(-2px); }
.stat-row, .stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.stat {
  padding: 14px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}
.stat b { display: block; font-size: 28px; color: var(--maroon); font-family: var(--display); }
.hero .stat b { color: var(--gold-2); }
.stat span { font-size: 13px; }
.poster-stack { position: relative; }
.poster-stack img {
  width: min(100%, 380px);
  margin-left: auto;
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
  aspect-ratio: 1;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  border: 4px solid rgba(246, 212, 138, 0.7);
}
.float-chip {
  position: absolute;
  left: 0;
  bottom: 28px;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  max-width: 210px;
}
.float-chip strong { display: block; }

.page-line {
  max-width: 1240px;
  margin: 16px auto 0;
  padding: 10px 18px;
  color: var(--muted);
  font-size: 15px;
  border-bottom: 1px solid rgba(122, 36, 56, 0.12);
}
.page-line a { color: var(--maroon); font-weight: 700; }
.page-line h1 {
  display: inline;
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--muted);
}
.page-line + .wrap { padding-top: 28px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 72px 20px; }
.kicker {
  color: var(--maroon);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
}
.section-head { max-width: 720px; margin-bottom: 28px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4vw, 46px); }

.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 36px; align-items: center; }
.frame {
  border-radius: 28px;
  overflow: hidden;
  min-height: 420px;
  background: #fff center/contain no-repeat;
  box-shadow: var(--shadow);
}
.logo-frame { display: grid; place-items: center; padding: 24px; }
.logo-frame img { width: min(100%, 420px); border-radius: 50%; }
.cards-3, .cards-2 { display: grid; gap: 18px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: 1.1fr 0.9fr; }
.card {
  background: var(--paper);
  border-radius: 22px;
  padding: 22px;
  border: 1px solid rgba(122, 36, 56, 0.08);
  box-shadow: 0 10px 30px rgba(20, 14, 24, 0.05);
  transition: 0.3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--ink);
  font-size: 22px;
  margin-bottom: 12px;
}

.band {
  background: linear-gradient(180deg, #1a1024, #3a1730);
  color: #fff;
}
.band .card { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.08); }
.band .kicker { color: var(--gold-2); }

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 920px;
  margin: 0 auto;
}
.course-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #fff;
  color: #fff;
  box-shadow: var(--shadow);
}
.course-card h3 { font-size: 18px; margin: 6px 0 0; }
.course-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #120c18;
  position: absolute;
  inset: 0;
}
.course-card .shade,
.course-card .meta { display: none; }
.course-card .meta {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
}
.step {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}
.teachers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.teacher {
  text-align: center;
  padding: 28px 16px 22px;
  border-radius: 24px;
  background: var(--paper);
  border: 1px solid rgba(228, 177, 90, 0.35);
  transition: 0.3s ease;
}
.teacher:hover { transform: translateY(-8px) rotate(-0.4deg); }
.monogram {
  width: 92px;
  height: 92px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 40px;
  line-height: 1;
  color: var(--maroon);
  background:
    radial-gradient(circle at 30% 30%, #fff, var(--gold-2) 40%, var(--gold) 70%);
  box-shadow: 0 0 0 8px rgba(228, 177, 90, 0.18);
}
.teacher p { margin: 0; color: var(--maroon); font-weight: 700; }

.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 22px; }
.info-list { display: grid; gap: 12px; }
.info {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
}
form { display: grid; gap: 12px; }
.captcha-row { display: grid; grid-template-columns: 1fr 120px; gap: 10px; align-items: center; }
.captcha-row span { font-weight: 700; }
.form-note { margin: 0; font-size: 14px; }
.form-note.ok { color: #1a6b3c; }
.form-note.err { color: var(--maroon); }
.hp { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0; }
input, textarea {
  width: 100%;
  border: 1px solid rgba(20, 14, 24, 0.12);
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 16px;
}
textarea { min-height: 140px; resize: vertical; }
.map {
  margin-top: 14px;
  border: 0;
  width: 100%;
  height: 220px;
  border-radius: 18px;
}

.syllabus {
  position: sticky;
  top: 120px;
  background: var(--night);
  color: #fff;
  border-radius: 24px;
  padding: 8px 8px 18px;
  overflow: hidden;
}
.syllabus h3 { padding: 16px 16px 8px; }
.syllabus li {
  list-style: none;
  margin: 0 10px;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.syllabus ul { margin: 0; padding: 0; }
.level-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.level-switch button {
  border: 1px solid rgba(122, 36, 56, 0.2);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}
.level-switch button.active {
  background: var(--ink);
  color: var(--gold-2);
}
.detail-layout { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 24px; align-items: start; }
.poster-lg { border-radius: 24px; width: 100%; max-height: 460px; object-fit: contain; background: #fff; }
.foot-logo { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; background: #fff; margin-bottom: 12px; }

footer {
  background: #100a14;
  color: rgba(255,255,255,.78);
  padding: 56px 20px 20px;
}
.foot {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr;
  gap: 28px;
}
footer h3 { color: #fff; }
footer a { display: block; padding: 4px 0; color: var(--gold-2); }
.legal {
  max-width: 1240px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 13px;
}
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--gold);
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
  z-index: 35;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
}
.to-top.show { opacity: 1; pointer-events: auto; }

.reveal { animation: rise 0.7s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 4px rgba(228, 177, 90, 0.15); }
  50% { box-shadow: 0 0 0 8px rgba(228, 177, 90, 0.05); }
}
@keyframes drift {
  from { background-position: 0 0; }
  to { background-position: 90px 140px; }
}

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav-panel {
    display: none;
    position: absolute;
    left: 18px;
    right: 18px;
    top: calc(100% + 8px);
    flex-direction: column;
    align-items: stretch;
    background: #1a1024;
    border-radius: 20px;
    padding: 12px;
    border: 1px solid rgba(246, 212, 138, 0.25);
  }
  .nav-panel.open { display: flex; }
  .nav-links { flex-direction: column; border-radius: 16px; width: 100%; }
  .nav-indicator { display: none; }
  .nav-links > li { width: 100%; }
  .nav-links > li > a { align-items: flex-start; color: #fff; }
  .nav-links > li > a.active { background: var(--gold); }
  .mega::before,
  .drop::before { display: none; }
  .mega, .drop {
    position: static;
    opacity: 1;
    pointer-events: none;
    transform: none;
    display: none;
    width: auto;
    margin: 0;
  }
  .has-mega.open .mega,
  .has-drop.open .drop {
    display: grid;
    pointer-events: auto;
    position: static;
    transform: none;
    width: auto;
  }
  .has-drop.open .drop { display: block; }
  .hero, .split, .cards-3, .teachers, .contact-grid, .detail-layout, .foot, .stat-row, .cards-2 {
    grid-template-columns: 1fr;
  }
  .course-grid { grid-template-columns: 1fr 1fr; max-width: none; }
  .captcha-row { grid-template-columns: 1fr; }
  .hero { padding: 36px 22px; min-height: 0; }
  .poster-stack img { margin: 10px auto 0; }
  .spy { display: none; }
  .ribbon { display: none; }
  .brand { min-width: 0; }
  .brand small { display: none; }
  .brand-mark { width: 54px; height: 54px; }
}
@media (max-width: 560px) {
  .course-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
