:root {
  --navy: #0a2540;
  --navy-deep: #061528;
  --teal: #0f6b5c;
  --gold: #c9a227;
  --gold-soft: #e8d48b;
  --sand: #f3efe6;
  --ink: #1a2332;
  --muted: #5c6b7a;
  --bg: #f7f5f0;
  --line: rgba(10, 37, 64, 0.1);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: clip;
  min-width: 0;
}
img, video, iframe, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--navy); }
h1,h2,h3,h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5rem; overflow-wrap: anywhere; }
p { margin: 0 0 0.75rem; overflow-wrap: anywhere; }
.container { width: min(1200px, calc(100% - 2rem)); margin-inline: auto; }
.muted { color: var(--muted); }
.site-main { min-width: 0; overflow-x: clip; padding-top: 0; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(6, 21, 40, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding: 0.65rem 0;
}
.brand { display: flex; align-items: center; gap: 0.65rem; color: #fff; min-width: 0; flex: 1; }
.brand:hover { color: var(--gold-soft); }
.brand-logo { width: 42px; height: 42px; object-fit: contain; flex-shrink: 0; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--gold); color: var(--navy-deep); font-weight: 800; font-size: 0.75rem;
}
.brand-text { min-width: 0; }
.brand-text strong {
  display: block; font-family: var(--font-display); font-size: clamp(0.88rem, 2.6vw, 1rem);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: min(52vw, 16rem);
}
.brand-text small { display: block; font-size: 0.65rem; letter-spacing: 0.12em; color: rgba(255,255,255,0.55); text-transform: uppercase; }
.main-nav { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; flex-shrink: 0; }
.main-nav a {
  color: rgba(255,255,255,0.85); font-size: 0.9rem; font-weight: 500;
  padding: 0.45rem 0.65rem; transition: color .2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--gold-soft); }
.nav-toggle {
  display: none; background: transparent; border: 1px solid rgba(255,255,255,0.3);
  color: #fff; font-size: 1.25rem; line-height: 1; width: 2.5rem; height: 2.5rem;
  padding: 0; cursor: pointer; flex-shrink: 0; align-items: center; justify-content: center;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.25rem; font-weight: 700; font-size: 0.92rem; border: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.85rem; }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: var(--gold-soft); color: var(--navy-deep); }
.btn-outline {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.55);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-block { width: 100%; }

/* Hero */
.hero {
  position: relative; min-height: 100svh; min-height: 100dvh; display: flex; align-items: stretch;
  color: #fff; overflow: hidden; padding-top: 4.25rem;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease;
  background: var(--navy) center/cover no-repeat;
}
.hero-slide.active { opacity: 1; z-index: 1; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(100deg, rgba(6,21,40,0.9) 0%, rgba(6,21,40,0.55) 35%, rgba(6,21,40,0.28) 50%, rgba(6,21,40,0.55) 78%, rgba(6,21,40,0.72) 100%),
    linear-gradient(to top, rgba(6,21,40,0.72) 0%, transparent 48%);
}
.hero-content {
  position: relative; z-index: 3; width: min(1600px, calc(100% - 2rem)); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) min(400px, 36vw); gap: 1.5rem;
  align-items: center; padding: 2rem 0 3rem; min-width: 0;
}
.hero-text { max-width: 34rem; min-width: 0; }
.hero-kicker {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-soft);
}
.hero-text h1 { font-size: clamp(1.7rem, 4.2vw, 3.4rem); margin: 0.6rem 0; }
.hero-text p { color: rgba(255,255,255,0.88); font-size: clamp(0.95rem, 2vw, 1.05rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.hero-actions .btn { min-height: 2.75rem; }

.hero-form {
  background: #fff; color: var(--ink); border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35); padding: 1.15rem; max-height: min(72svh, 640px);
  overflow-y: auto; -webkit-overflow-scrolling: touch; align-self: end; margin-bottom: 1.5rem;
  min-width: 0; width: 100%;
}
.hero-form h2 { font-size: clamp(1.15rem, 2.5vw, 1.35rem); color: var(--navy); margin: 0.15rem 0 0; }
.hero-form .eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal); text-align: center; }
.hero-form .form-head { border-bottom: 1px solid var(--line); padding-bottom: 0.6rem; margin-bottom: 0.85rem; text-align: center; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; min-width: 0; }
.field { margin-bottom: 0.65rem; min-width: 0; }
.field label { display: block; font-size: 0.75rem; font-weight: 700; margin-bottom: 0.3rem; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; max-width: 100%; padding: 0.7rem 0.8rem; border: 1px solid rgba(10,37,64,0.16);
  background: #fff; font: inherit; font-size: 1rem; color: var(--ink); outline: none;
  border-radius: 0; appearance: none; -webkit-appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 2rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,107,92,0.12);
}
.field textarea { min-height: 4.5rem; resize: vertical; }
.alert { padding: 0.7rem 0.85rem; margin-bottom: 0.85rem; border-left: 4px solid; font-size: 0.9rem; }
.alert-ok { background: #ecfdf5; border-color: var(--teal); color: var(--teal); }
.alert-err { background: #fef2f2; border-color: #dc2626; color: #b91c1c; }

/* PhonePe QR after admission submit */
.payment-success { text-align: center; }
.payment-qr-box {
  background: #0b0b0b;
  color: #fff;
  padding: 1.25rem 1rem 1.5rem;
  border: 1px solid rgba(90, 36, 160, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.payment-qr-box h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: #c4a0ff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.payment-qr-note {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
}
.payment-qr-img {
  display: block;
  width: min(100%, 280px);
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  background: #000;
}
.payment-qr-name {
  margin: 0.85rem 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}
.hero-form .payment-qr-box { margin-top: 0.25rem; }
.form-card + .payment-success,
.payment-success { margin-top: 0; }

/* Sections */
.section { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section-sand {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(15,107,92,0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(201,162,39,0.1), transparent 45%);
}
.section-white { background: #fff; }
.section-navy { background: var(--navy); color: #fff; }
.section-head { margin-bottom: 1.5rem; }
.section-head .eyebrow { color: var(--teal); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.section-navy .section-head .eyebrow { color: var(--gold-soft); }
.section-head h2 { font-size: clamp(1.45rem, 3.5vw, 2.4rem); color: var(--navy); }
.section-navy .section-head h2 { color: #fff; }
.grid-2 { display: grid; gap: clamp(1.25rem, 3vw, 2rem); grid-template-columns: 1fr 1fr; align-items: center; min-width: 0; }
.grid-3 { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); min-width: 0; }
.quote-box { border-left: 4px solid var(--gold); background: #fff; padding: clamp(1.1rem, 3vw, 1.5rem) clamp(1.1rem, 3vw, 1.75rem); box-shadow: 0 4px 20px rgba(10,37,64,0.06); }
.about-media { min-height: 240px; background: var(--navy); overflow: hidden; }
.about-media img { width: 100%; height: 100%; min-height: 240px; object-fit: cover; }

.card {
  background: #fff; border: 1px solid var(--line); overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.card:hover { border-color: rgba(15,107,92,0.25); box-shadow: 0 10px 30px rgba(10,37,64,0.08); }
.card-img { aspect-ratio: 16/10; background: var(--navy); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.15rem 1.25rem 1.35rem; }
.card-body h3 { font-size: 1.25rem; color: var(--navy); }
.meta { font-size: 0.85rem; color: var(--muted); }

/* Facilities marquee */
.facilities-wrap { overflow: hidden; }
.facility-track {
  display: flex; gap: 0.75rem; width: max-content;
  animation: marquee 45s linear infinite;
}
.facility-track:hover { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.facility-chip {
  display: inline-flex; align-items: center; padding: 0.65rem 1.1rem;
  border: 1px solid rgba(232,212,139,0.28); background: rgba(255,255,255,0.08);
  color: #fff; font-weight: 600; font-size: 0.9rem; white-space: nowrap;
}
.facility-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(3, 1fr); margin-top: 1.5rem; }
.facility-item {
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05);
  padding: 0.85rem 1rem; color: rgba(255,255,255,0.9); font-size: 0.92rem;
}

/* Leadership */
.leader-card { border: 1px solid var(--line); background: #fff; overflow: hidden; }
.leader-photo { aspect-ratio: 4/5; background: #e8eef3; position: relative; overflow: hidden; }
.leader-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.leader-photo .placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); }
.leader-photo .avatar {
  width: 5rem; height: 5rem; border-radius: 50%; background: var(--navy); color: var(--gold-soft);
  display: grid; place-items: center; font-weight: 800; font-size: 1.4rem; margin: 0 auto 0.5rem;
}
.leader-body { padding: 1.15rem 1.25rem 1.4rem; }
.leader-body .role { color: var(--teal); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.leader-body h3 { color: var(--navy); margin-top: 0.35rem; }

/* Gallery */
.gallery-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(3, 1fr); }
.gallery-item {
  position: relative; aspect-ratio: 4/3; overflow: hidden; cursor: pointer; border: 0; padding: 0; background: var(--navy);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-item:hover img { transform: scale(1.05); }
.lightbox {
  position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,0.88);
  display: none; align-items: center; justify-content: center; padding: 1rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(960px, 100%); max-height: 85vh; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 1rem; right: 1rem; background: transparent; border: 0;
  color: #fff; font-size: 2rem; cursor: pointer;
}

/* Page hero */
.page-hero {
  background: var(--navy); color: #fff;
  padding: clamp(5.5rem, 12vw, 7rem) 0 clamp(2rem, 4vw, 3rem);
  position: relative; overflow: hidden;
}
.page-hero h1 { font-size: clamp(1.65rem, 5vw, 3rem); }
.page-hero p { color: rgba(255,255,255,0.75); max-width: 36rem; font-size: clamp(0.95rem, 2.5vw, 1.05rem); }
.page-hero .bar { width: 4rem; height: 3px; background: var(--gold); margin-top: 1.25rem; }

.form-card {
  background: #fff; padding: clamp(1.1rem, 3vw, 1.5rem); border: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(10,37,64,0.04); min-width: 0;
}
.course-row {
  display: grid; grid-template-columns: minmax(160px, 220px) minmax(0, 1fr); gap: 0; border: 1px solid var(--line);
  background: #fff; overflow: hidden; margin-bottom: 1rem; min-width: 0;
}
.course-row .img { min-height: 160px; background: var(--navy); }
.course-row .img img { width: 100%; height: 100%; min-height: 160px; object-fit: cover; }
.course-row .body { padding: clamp(1rem, 3vw, 1.25rem) clamp(1rem, 3vw, 1.5rem); min-width: 0; }

/* Footer */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.8); padding-top: clamp(2rem, 4vw, 3rem); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr; padding-bottom: 2rem; min-width: 0; }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; color: #fff; }
.footer-brand strong { font-family: var(--font-display); }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 0.75rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links a { color: rgba(255,255,255,0.7); display: inline-block; padding: 0.2rem 0; }
.footer-links a:hover { color: var(--gold-soft); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 1rem 0; font-size: 0.8rem; color: rgba(255,255,255,0.45); }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-bottom a { color: rgba(255,255,255,0.5); }

.contact-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr 1fr; min-width: 0; }
.info-box { background: #fff; padding: clamp(1.1rem, 3vw, 1.5rem); border: 1px solid var(--line); min-width: 0; }
.map-box { border: 1px solid var(--line); overflow: hidden; background: #fff; }
.map-box iframe { width: 100%; height: min(260px, 45vh); border: 0; display: block; }

/* Tables (if any) */
table { width: 100%; border-collapse: collapse; }
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Responsive — large tablet / small laptop */
@media (max-width: 1100px) {
  .main-nav a { font-size: 0.85rem; padding: 0.4rem 0.5rem; }
  .hero-content { grid-template-columns: minmax(0, 1fr) min(360px, 40vw); gap: 1.15rem; }
}

/* Responsive — tablet */
@media (max-width: 960px) {
  .container { width: min(1200px, calc(100% - 1.5rem)); }
  .nav-toggle { display: inline-flex; }
  .header-inner { flex-wrap: nowrap; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    width: 100%; transform: none;
    background: var(--navy-deep); flex-direction: column; align-items: stretch;
    padding: 0.35rem 0.85rem 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 16px 40px rgba(0,0,0,0.35);
    max-height: min(75vh, 32rem); overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    padding: 0.85rem 0.65rem; border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.95rem;
  }
  .main-nav a:last-child { border-bottom: 0; margin-top: 0.35rem; text-align: center; }
  .main-nav .btn { width: 100%; }

  .hero {
    min-height: auto;
    padding-top: 4rem;
    padding-bottom: 0;
  }
  .hero-content {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.5rem 0 1.75rem;
    align-items: stretch;
  }
  .hero-text { text-align: center; margin: 0 auto; max-width: 36rem; padding: 0.5rem 0 0; }
  .hero-kicker { letter-spacing: 0.12em; font-size: 0.72rem; }
  .hero-text h1 { font-size: clamp(1.65rem, 6.5vw, 2.5rem); }
  .hero-actions { justify-content: center; }
  .hero-actions .btn { flex: 1 1 auto; min-width: min(100%, 10rem); max-width: 16rem; }
  .hero-form {
    max-width: min(480px, 100%);
    width: 100%;
    margin: 0 auto 1.25rem;
    max-height: none;
    align-self: stretch;
    padding: 1rem;
  }
  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(6,21,40,0.82) 0%, rgba(6,21,40,0.55) 35%, rgba(6,21,40,0.75) 100%);
  }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3, .gallery-grid, .facility-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid, .footer-grid { grid-template-columns: 1fr 1fr; }
  .course-row { grid-template-columns: 1fr; }
  .course-row .img { min-height: 180px; max-height: 220px; }
  .course-row .img img { min-height: 180px; max-height: 220px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .about-media, .about-media img { min-height: 220px; }
  .facility-track { animation-duration: 55s; }
}

/* Responsive — phone landscape / large phone */
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-bottom .container { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .map-box iframe { height: 220px; }
  .btn { padding: 0.7rem 1.1rem; }
  .leader-photo { aspect-ratio: 3/4; }
  .payment-qr-img { width: min(100%, 260px); }
  .payment-qr-box { padding: 1rem 0.85rem 1.25rem; }
  .payment-qr-name { font-size: 0.7rem; letter-spacing: 0.04em; }
  /* Prevent iOS zoom on focus */
  .field input, .field select, .field textarea, input, select, textarea { font-size: 16px !important; }
}

/* Responsive — small phones */
@media (max-width: 560px) {
  .container { width: min(1200px, calc(100% - 1.25rem)); }
  .brand-logo, .brand-mark { width: 36px; height: 36px; }
  .brand-text strong { max-width: min(58vw, 12.5rem); font-size: 0.88rem; }
  .brand-text small { display: none; }
  .nav-toggle { width: 2.35rem; height: 2.35rem; font-size: 1.15rem; }

  .hero-content { width: calc(100% - 1.25rem); padding: 1.1rem 0 1.25rem; gap: 1rem; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 0.6rem; }
  .hero-actions .btn { max-width: none; width: 100%; }
  .hero-form { padding: 0.9rem; margin-bottom: 1rem; }
  .hero-form h2 { font-size: 1.15rem; }
  .field { margin-bottom: 0.55rem; }
  .field input, .field select, .field textarea { padding: 0.65rem 0.75rem; }

  .grid-3, .gallery-grid, .facility-grid { grid-template-columns: 1fr; }
  .section-head { text-align: center; }
  .section-head p.muted { margin-inline: auto; }
  .card-body, .leader-body { padding: 1rem 1.05rem 1.15rem; }
  .quote-box p { font-size: 1.05rem !important; }
  .facility-item { font-size: 0.88rem; padding: 0.75rem 0.85rem; }
  .gallery-item { aspect-ratio: 5/4; }
  .lightbox { padding: 0.75rem; }
  .lightbox img { max-height: 78vh; }
  .lightbox-close { top: 0.5rem; right: 0.65rem; font-size: 1.75rem; }
  .page-hero { padding-top: 5.25rem; padding-bottom: 1.75rem; }
  .info-box h2 { font-size: 1.25rem; }
  .form-card .btn, .hero-form .btn { min-height: 2.85rem; }
}

/* Very small phones */
@media (max-width: 380px) {
  .brand-text strong { max-width: 46vw; font-size: 0.82rem; }
  .hero-text h1 { font-size: 1.45rem; }
  .hero-kicker { font-size: 0.65rem; letter-spacing: 0.08em; }
  .payment-qr-box h3 { font-size: 0.9rem; }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .facility-track { animation: none; }
  .hero-slide { transition: none; }
  * { scroll-behavior: auto !important; }
}

/* Landscape phones: keep hero usable */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: auto; }
  .hero-form { max-height: none; }
  .hero-content { padding: 1rem 0; }
}
