/* ============================================================
   BASE STYLES — Reset, Typography, Utilities
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,800;0,900;1,700&family=DM+Sans:wght@400;500;600;700&family=Hind:wght@400;500;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700;800&display=swap');

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-en-body);
  color: var(--text-body);
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

/* Hindi language mode */
body.lang-hi {
  font-family: var(--font-hi);
}
body.lang-hi h1,
body.lang-hi h2,
body.lang-hi h3,
body.lang-hi h4,
body.lang-hi h5,
body.lang-hi .nav-link,
body.lang-hi .btn,
body.lang-hi .card-title,
body.lang-hi .section-title,
body.lang-hi .section-subtitle,
body.lang-hi p,
body.lang-hi span,
body.lang-hi a,
body.lang-hi label,
body.lang-hi li {
  font-family: var(--font-hi);
  letter-spacing: 0;
}

/* --- Links --- */
a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* --- Images --- */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Lists --- */
ul, ol {
  list-style: none;
}

/* --- Buttons reset --- */
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

/* --- Typography Scale --- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--text-dark);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lang-hi h1,
.lang-hi h2,
.lang-hi h3,
.lang-hi h4,
.lang-hi h5 {
  font-family: var(--font-hi);
  line-height: 1.45;
  letter-spacing: 0;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.65rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.55rem); }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }

/* Nav, buttons, labels use DM Sans */
.nav-link, .btn, .badge, .gallery-filter-btn,
.section-eyebrow, .info-strip__label, .info-strip__value,
.footer-link, .footer-copyright, .form-label, .form-control,
.view-all, .notice-card__view, .notice-card__date-day,
.notice-card__date-month, .academic-card__level, .academic-card__grades,
.about-fact__label, .contact-detail__label {
  font-family: var(--font-en-ui) !important;
}

p { line-height: 1.8; font-family: var(--font-en-body); }

/* --- Section Layout --- */
.section {
  padding: var(--section-py) 0;
}
.section--ivory { background: var(--ivory); }
.section--light { background: var(--light-bg); }
.section--navy  { background: var(--navy-dark); color: var(--white); }
.section--cream { background: var(--cream); }

/* --- Section Header --- */
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: var(--space-3);
}
.section-eyebrow::before,
.section-eyebrow::after {
  content: '';
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--saffron);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  color: var(--navy);
  margin-bottom: var(--space-3);
  font-weight: 700;
}
.section--navy .section-title { color: var(--white); }

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.75;
}
.section--navy .section-subtitle { color: rgba(255,255,255,0.75); }

/* Divider */
.section-divider {
  width: 56px;
  height: 3px;
  background: linear-gradient(90deg, var(--saffron), var(--gold));
  border-radius: var(--radius-full);
  margin: var(--space-4) auto 0;
}

/* --- Grid Utilities --- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-6); }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* --- Flex utilities --- */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* --- Text utilities --- */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-navy   { color: var(--navy); }
.text-saffron { color: var(--saffron); }
.text-muted  { color: var(--text-muted); }
.text-white  { color: var(--white); }

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.10s; }
.reveal-delay-2 { transition-delay: 0.20s; }
.reveal-delay-3 { transition-delay: 0.30s; }
.reveal-delay-4 { transition-delay: 0.40s; }
.reveal-delay-5 { transition-delay: 0.50s; }
.reveal-delay-6 { transition-delay: 0.60s; }

/* --- Indian decorative border --- */
.indian-border-top {
  position: relative;
}
.indian-border-top::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 80px; height: 3px;
  background: linear-gradient(90deg, var(--saffron), var(--gold), var(--saffron));
  border-radius: var(--radius-full);
}

/* --- Ashoka-inspired circular accent --- */
.chakra-accent {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.chakra-accent::before {
  content: '';
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(200,154,26,0.3);
}

/* --- Skip to content (accessibility) --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  background: var(--navy);
  color: var(--white);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: 16px;
}

/* --- sr-only --- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--border-light); }
::-webkit-scrollbar-thumb { background: var(--navy-light); border-radius: 3px; }
