/* ================================================================
   GURUKUL VIDYA MANDIR, DHORIMANA — Design System
   Palette drawn from the Thar desert & Rajasthani textile tradition:
   sandstone, marigold, turban-maroon, indigo dusk sky.
   ================================================================ */

:root {
  --sand:        #F6ECDC;
  --sand-deep:   #EAD3AC;
  --terracotta:  #C1663B;
  --terracotta-dark: #A34F2C;
  --maroon:      #7C2A34;
  --maroon-dark: #5E1F27;
  --indigo:      #16283A;
  --indigo-deep: #0D1B27;
  --saffron:     #E8A33D;
  --khejri:      #5B7553;
  --ink:         #2A211A;
  --paper:       #FFFDF9;
  --line:        #E3D4BC;

  --font-display: 'Rajdhani', 'Noto Sans Devanagari', sans-serif;
  --font-body:    'Hind', 'Noto Sans Devanagari', sans-serif;

  --radius: 6px;
  --shadow: 0 6px 24px rgba(42, 33, 26, 0.10);
  --shadow-lg: 0 16px 48px rgba(22, 40, 58, 0.18);
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--sand);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
}

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--indigo);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }
a { color: var(--terracotta-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta-dark);
  font-size: 0.82rem;
  display: inline-block;
  margin-bottom: 0.6em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 13px 30px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1.02rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }
.btn-primary { background: var(--maroon); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--maroon-dark); }
.btn-outline { background: transparent; border-color: var(--paper); color: var(--paper); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-outline-dark { background: transparent; border-color: var(--maroon); color: var(--maroon); }
.btn-outline-dark:hover { background: var(--maroon); color: #fff; }
.btn-gold { background: var(--saffron); color: var(--indigo-deep); box-shadow: var(--shadow); }
.btn-gold:hover { background: #d9922e; }
.btn-block { width: 100%; text-align: center; }

/* ---------- Toran arch motif (signature element) ----------
   A scalloped valance border, echoing the door/window toran
   hung across Rajasthani havelis and temple gates. Used as a
   section divider instead of a plain line. */
.toran {
  width: 100%;
  height: 26px;
  display: block;
  line-height: 0;
}
.toran svg { width: 100%; height: 100%; display: block; }

/* ---------- Top bar & nav ---------- */
.topbar {
  background: var(--indigo-deep);
  color: #EADFCB;
  font-size: 0.82rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  padding-bottom: 6px;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar a { color: #EADFCB; }
.topbar .topbar-links { display: flex; gap: 18px; }

.navbar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 46px; height: 46px;
  object-fit: contain;
  color: var(--saffron);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.brand-text .brand-en {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--indigo);
  display: block;
  line-height: 1.1;
}
.brand-text .brand-hi {
  font-size: 0.82rem;
  color: var(--terracotta-dark);
  display: block;
}

.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: var(--radius);
}
.nav-links a:hover { background: var(--sand-deep); text-decoration: none; }
.nav-links a.current { color: var(--maroon); }
.nav-cta { margin-left: 8px; }

.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; color: var(--indigo); cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--indigo) 0%, var(--indigo-deep) 100%);
  color: #F4EAD9;
  padding: 72px 0 0;
  position: relative;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  padding-bottom: 60px;
}
.hero h1 { color: #fff; }
.hero .eyebrow { color: var(--saffron); }
.hero p.lead { font-size: 1.12rem; color: #D9CBB0; max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(232,163,61,0.14);
  border: 1px solid rgba(232,163,61,0.4);
  color: var(--saffron);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.hero-art {
  background: var(--sand-deep);
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  color: var(--maroon);
  font-family: var(--font-display);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-art img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Stat strip ---------- */
.stat-strip {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat-item {
  text-align: center;
  padding: 26px 10px;
  border-left: 1px solid var(--line);
}
.stat-item:first-child { border-left: none; }
.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.1rem;
  color: var(--maroon);
  display: block;
}
.stat-label { font-size: 0.85rem; color: #5c5346; letter-spacing: 0.03em; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-alt { background: var(--sand-deep); }
.section-dark { background: var(--indigo); color: #EADFCB; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.4em; }
.card .icon-badge {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--sand-deep);
  color: var(--maroon);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.topper-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow);
}
.topper-photo {
  aspect-ratio: 1;
  background: var(--sand-deep);
  display: flex; align-items: center; justify-content: center;
  color: var(--maroon);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
}
.topper-body { padding: 16px; }
.topper-pct {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--terracotta-dark);
  font-size: 1.5rem;
}
.topper-rank {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--khejri);
  font-weight: 600;
}

.badge {
  display: inline-block;
  background: var(--khejri);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

/* ---------- Founder / quote block ---------- */
.founder-block {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: center;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.founder-photo {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--sand-deep);
  border-radius: var(--radius);
  object-fit: cover;
}
.founder-quote {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--indigo);
  font-weight: 600;
}
.founder-name { margin-top: 14px; color: var(--terracotta-dark); font-weight: 700; }

/* ---------- Forms ---------- */
.form-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; gap: 18px; margin-bottom: 18px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--indigo);
  margin-bottom: 6px;
}
label .req { color: var(--maroon); }
input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.98rem;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(193,102,59,0.15);
}
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 22px; }
legend { font-family: var(--font-display); font-weight: 700; color: var(--maroon); padding: 0 8px; }

.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-weight: 600; }
.alert-success { background: #E4EFDF; color: var(--khejri); border: 1px solid #b9d4ad; }
.alert-error { background: #F6DFE0; color: var(--maroon-dark); border: 1px solid #e3aaae; }

/* ---------- Footer ---------- */
footer {
  background: var(--indigo-deep);
  color: #C9BB9E;
  padding: 56px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
footer h4 { color: var(--saffron); font-size: 1rem; margin-bottom: 14px; }
footer a { color: #C9BB9E; }
footer a:hover { color: var(--saffron); }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin-bottom: 8px; }
.footer-bottom {
  text-align: center;
  padding: 18px 0;
  font-size: 0.82rem;
  color: #8b8065;
}
.footer-motto {
  font-family: var(--font-display);
  color: var(--saffron);
  font-size: 1.05rem;
  margin-bottom: 10px;
}

/* ---------- Tables (admin + public results) ---------- */
table { width: 100%; border-collapse: collapse; background: var(--paper); }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
th { background: var(--sand-deep); font-family: var(--font-display); font-weight: 700; color: var(--indigo); }
tr:hover td { background: #FBF3E4; }
/* ---------- Scroll reveal (subtle fade + slide-up) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Slightly richer hover motion on interactive cards ---------- */
.card, .topper-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover, .topper-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.nav-links a { transition: background-color 0.15s ease, color 0.15s ease; }
/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .founder-block { grid-template-columns: 1fr; }
  .founder-photo { max-width: 220px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-item:nth-child(3) { border-left: none; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 10px 24px 18px;
  }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row.cols-2, .form-row.cols-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .topbar .container { justify-content: center; text-align: center; }
}
