/* =========================================================
   S.D.R.D Public Inter College — Design Tokens
   Palette drawn from the school's own emblem: the indigo of
   Bharat Mata's robe, the marigold of the tricolour flags
   carried at every assembly, the maroon of the ribbon banner
   on the crest, and the leaf-green of the wreath that frames it.
   ========================================================= */

:root {
  /* Color */
  --ink: #24211d;
  --navy: #1b2a4a;
  --navy-deep: #121c33;
  --ivory: #fbf6ec;
  --ivory-dim: #f3ecdc;
  --saffron: #e8a33d;
  --saffron-deep: #c97f1f;
  --maroon: #a32f22;
  --maroon-deep: #7e2419;
  --leaf: #2f6b4f;
  --leaf-deep: #21503a;
  --line: rgba(27, 42, 74, 0.14);
  --white: #ffffff;

  /* Type */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;
  --font-mono: "Space Mono", "Courier New", monospace;

  /* Layout */
  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  color: var(--navy);
}

p { margin: 0; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--maroon);
}

.eyebrow.on-dark { color: var(--saffron); }

:focus-visible {
  outline: 3px solid var(--saffron);
  outline-offset: 2px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 10px 18px;
  z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--pad);
  max-width: var(--maxw);
  margin: 0 auto;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  height: 46px;
  width: 46px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text .full {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16.5px;
  color: var(--navy);
  white-space: nowrap;
}

.brand-text .sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--maroon);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
  padding: 6px 2px;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--saffron);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-links a[aria-current="page"] { color: var(--maroon); }

.nav-cta {
  display: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle svg { width: 26px; height: 26px; color: var(--navy); }

@media (max-width: 820px) {
  .nav-links {
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--ivory);
    flex-direction: column;
    padding: 24px var(--pad);
    gap: 18px;
    transform: translateY(-110%);
    transition: transform 0.3s ease;
    border-top: 1px solid var(--line);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { font-size: 18px; display: block; }
  .nav-toggle { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14.5px;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--saffron); color: var(--navy-deep); }
.btn-primary:hover { background: var(--saffron-deep); }

.btn-outline-light { border-color: rgba(255,255,255,0.6); color: var(--white); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }

.btn-maroon { background: var(--maroon); color: var(--ivory); }
.btn-maroon:hover { background: var(--maroon-deep); }

.btn-outline-navy { border-color: var(--navy); color: var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: var(--ivory); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background: var(--navy-deep);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,28,51,0.55) 0%, rgba(18,28,51,0.65) 45%, rgba(18,28,51,0.96) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 64px var(--pad) 46px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 5.4vw, 4.1rem);
  max-width: 15ch;
  margin-top: 14px;
}

.hero .lede {
  margin-top: 16px;
  max-width: 46ch;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.88);
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.fact-strip {
  margin-top: 42px;
  display: flex;
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.22);
  flex-wrap: wrap;
}
.fact {
  padding: 16px 26px 0 0;
  margin-right: 26px;
  border-right: 1px solid rgba(255,255,255,0.22);
}
.fact:last-child { border-right: none; }
.fact .num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--saffron);
}
.fact .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}

/* ---------- Rangoli divider (signature element) ---------- */
.rangoli-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 34px 0;
}
.rangoli-divider .line {
  height: 1px;
  flex: 1;
  max-width: 220px;
  background: var(--line);
}
.rangoli-divider svg { width: 40px; height: 40px; flex-shrink: 0; }

/* ---------- Sections ---------- */
section { padding: 84px 0; }
.section-head {
  max-width: 640px;
  margin-bottom: 44px;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  margin-top: 10px;
}
.section-head .lede {
  margin-top: 14px;
  color: #4b473f;
  font-size: 1.02rem;
}

.bg-navy { background: var(--navy); color: var(--ivory); }
.bg-navy h2, .bg-navy h3, .bg-navy h4 { color: var(--white); }
.bg-navy .lede { color: rgba(255,255,255,0.78); }

.bg-ivory-dim { background: var(--ivory-dim); }

/* ---------- About snapshot (home) ---------- */
.snapshot {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.snapshot figure { margin: 0; position: relative; }
.snapshot img { border-radius: var(--radius); }
.snapshot .tag {
  position: absolute;
  bottom: -18px;
  left: -18px;
  background: var(--maroon);
  color: var(--ivory);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 10px 16px;
  border-radius: var(--radius);
}
.snapshot .body p + p { margin-top: 16px; }
.snapshot .body { color: #423e35; font-size: 1.02rem; }

@media (max-width: 860px) {
  .snapshot { grid-template-columns: 1fr; gap: 32px; }
  .snapshot .tag { left: 0; }
}

/* ---------- Value cards ---------- */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.value-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--saffron);
  padding: 30px 26px;
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.value-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -18px rgba(27,42,74,0.35); }
.value-card svg { width: 34px; height: 34px; color: var(--maroon); }
.value-card h3 { font-size: 1.18rem; margin-top: 18px; }
.value-card p { margin-top: 10px; color: #4b473f; font-size: 0.97rem; }

@media (max-width: 860px) {
  .cards-3 { grid-template-columns: 1fr; }
}

/* ---------- Leadership preview / team grid ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.team-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.team-photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--ivory-dim);
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-info { padding: 20px 22px 24px; }
.team-info .role {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--maroon);
}
.team-info h3 { font-size: 1.2rem; margin-top: 6px; }
.team-info p.msg { margin-top: 12px; color: #4b473f; font-size: 0.95rem; }

@media (max-width: 860px) {
  .team-grid { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
}

/* ---------- Gallery preview strip ---------- */
.strip {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
  height: 460px;
}
.strip a { border-radius: var(--radius); overflow: hidden; display: block; position: relative; }
.strip img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.strip a:hover img { transform: scale(1.06); }
.strip a:first-child { grid-row: 1 / 3; }

@media (max-width: 860px) {
  .strip { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 160px); height: auto; }
  .strip a:first-child { grid-row: auto; grid-column: 1 / 3; }
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--maroon);
  color: var(--ivory);
  padding: 56px 0;
}
.cta-band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); font-size: 1.7rem; }
.cta-band .contact-line {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  margin-top: 10px;
  color: rgba(255,255,255,0.85);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.78);
  padding: 56px 0 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand img { height: 50px; width: 50px; object-fit: contain; }
.footer-brand .full { font-family: var(--font-display); color: var(--white); font-size: 17px; font-weight: 700; }
.footer-brand .addr { margin-top: 8px; font-size: 0.9rem; line-height: 1.6; }
.footer h4 {
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-links a:hover { color: var(--saffron); }
.footer-bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- Page hero (non-home pages) ---------- */
.page-hero {
  background: var(--navy);
  color: var(--white);
  padding: 64px 0 46px;
  position: relative;
  overflow: hidden;
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4vw, 3rem); margin-top: 12px; }
.page-hero .lede { margin-top: 14px; max-width: 56ch; color: rgba(255,255,255,0.8); }
.page-hero .motif {
  position: absolute;
  right: -60px;
  top: -60px;
  width: 260px;
  height: 260px;
  opacity: 0.14;
}

/* ---------- Gallery page ---------- */
.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 9px 16px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 100px;
  cursor: pointer;
  color: var(--navy);
  transition: all 0.2s ease;
}
.filter-btn:hover { border-color: var(--saffron); }
.filter-btn[aria-pressed="true"] {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.g-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--white);
  border: 1px solid var(--line);
  position: relative;
}
.g-item .ph { aspect-ratio: 4/3; overflow: hidden; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.g-item:hover img { transform: scale(1.07); }
.g-item .cap {
  padding: 14px 16px;
  font-size: 0.86rem;
  color: #4b473f;
}
.g-item .cap .tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--maroon);
  margin-bottom: 4px;
}

@media (max-width: 860px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

.g-item[hidden] { display: none; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(18, 28, 51, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: 900px; max-height: 86vh; }
.lightbox img { max-height: 78vh; width: auto; margin: 0 auto; border-radius: var(--radius); }
.lightbox figcaption {
  color: var(--ivory);
  text-align: center;
  margin-top: 14px;
  font-size: 0.92rem;
}
.lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
}
.lightbox-close svg { width: 30px; height: 30px; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--white);
  padding: 14px 10px;
  cursor: pointer;
  border-radius: var(--radius);
}
.lightbox-nav:hover { background: rgba(255,255,255,0.22); }
.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { right: 16px; }
.lightbox-nav svg { width: 22px; height: 22px; }

/* ---------- Teachers / staff page ---------- */
.leader-row {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}
.leader-row:last-child { border-bottom: none; }
.leader-row .photo {
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ivory-dim);
}
.leader-row .photo img { width: 100%; height: 100%; object-fit: cover; }
.leader-row .role {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--maroon);
}
.leader-row h2 { margin-top: 8px; font-size: 1.9rem; }
.leader-row .msg { margin-top: 18px; color: #423e35; font-size: 1.02rem; max-width: 58ch; }
.leader-row .msg p + p { margin-top: 12px; }

@media (max-width: 780px) {
  .leader-row { grid-template-columns: 1fr; }
  .leader-row .photo { max-width: 280px; }
}

.staff-note {
  margin-top: 60px;
  padding: 30px;
  background: var(--ivory-dim);
  border-radius: var(--radius);
  border-left: 4px solid var(--leaf);
}
.staff-note p { color: #423e35; }

/* ---------- About page ---------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid var(--line);
  margin-left: 8px;
}
.t-item { position: relative; padding: 0 0 40px 34px; }
.t-item:last-child { padding-bottom: 0; }
.t-item::before {
  content: "";
  position: absolute;
  left: -7px; top: 2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--saffron);
  border: 2px solid var(--ivory);
  box-shadow: 0 0 0 2px var(--line);
}
.t-item .yr { font-family: var(--font-mono); color: var(--maroon); font-size: 0.9rem; }
.t-item h3 { margin-top: 6px; font-size: 1.15rem; }
.t-item p { margin-top: 8px; color: #4b473f; font-size: 0.96rem; max-width: 60ch; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; gap: 36px; }
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 10px;
}
.stat { padding: 20px 0; border-top: 3px solid var(--saffron); }
.stat .num { font-family: var(--font-mono); font-size: 2rem; color: var(--white); }
.stat .lbl { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.7); margin-top: 6px; }

@media (max-width: 700px) {
  .stat-row { grid-template-columns: 1fr 1fr; }
}

.building-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.building-strip img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; }

@media (max-width: 780px) {
  .building-strip { grid-template-columns: 1fr; }
}

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}
.contact-list { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 22px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list svg { width: 22px; height: 22px; color: var(--maroon); flex-shrink: 0; margin-top: 2px; }
.contact-list .lbl { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--maroon); }
.contact-list .val { font-size: 1.05rem; margin-top: 4px; color: var(--navy); font-weight: 600; }
.contact-list .val a:hover { text-decoration: underline; }

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
}
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--ivory);
  color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--saffron);
  outline: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.85rem; color: #6b665a; margin-top: 14px; }

.map-embed {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 24px;
  filter: saturate(0.85);
}
.map-embed iframe { width: 100%; height: 280px; border: 0; display: block; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Misc ---------- */
.center-text { text-align: center; margin: 0 auto; }
.mt-56 { margin-top: 56px; }
