/* ===== Shivdatrai High School — shared styles ===== */

:root {
  --paper: #FAF8F3;
  --paper-alt: #F2EEE4;
  --navy: #1C3D5A;
  --navy-deep: #12293D;
  --brick: #C65D3B;
  --sage: #7A9B76;
  --ink: #2F2A25;
  --ink-soft: #6B655C;
  --rule: rgba(47, 42, 37, 0.14);
  --max-w: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  color: var(--navy-deep);
  margin: 0;
  line-height: 1.15;
}

.label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brick);
}

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

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

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

.ruled {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 2px 0;
}

.hr-thin {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0;
}

header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--navy);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.brand-text {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy-deep);
  line-height: 1.15;
}

.brand-text span {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 400;
  margin-top: 2px;
}

nav.main-nav {
  display: flex;
  gap: 32px;
}

nav.main-nav a {
  position: relative;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

nav.main-nav a:hover,
nav.main-nav a:focus-visible {
  border-color: var(--brick);
}

nav.main-nav a.active {
  color: var(--brick);
  border-color: var(--brick);
}

.nav-cta {
  background: var(--navy);
  color: var(--paper) !important;
  padding: 9px 18px;
  border-radius: 4px;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  border-bottom: none !important;
}

.nav-cta:hover {
  background: var(--navy-deep);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--navy-deep);
  cursor: pointer;
  line-height: 1;
}

.hero {
  padding: 72px 0 56px;
}

.register-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 10px 0;
  margin-bottom: 32px;
}

.register-line strong {
  color: var(--brick);
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  max-width: 16ch;
  margin-bottom: 20px;
}

.hero .lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 32px;
}

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--brick);
  color: var(--paper);
}
.btn-primary:hover {
  background: #A94C2E;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(198, 93, 59, 0.28);
}

.btn-secondary {
  background: transparent;
  color: var(--navy-deep);
  border: 1.5px solid var(--rule);
}
.btn-secondary:hover { border-color: var(--navy); transform: translateY(-1px); }

.ph {
  background: linear-gradient(135deg, var(--paper-alt), #E7E1D2);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  padding: 12px;
}

section { padding: 64px 0; }
section.alt { background: var(--paper-alt); }

.section-head {
  margin-bottom: 40px;
  max-width: 60ch;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-top: 8px;
}

.section-head p {
  color: var(--ink-soft);
  margin-top: 12px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.card {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 26px;
  background: var(--paper);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(28, 61, 90, 0.08);
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--ink-soft);
  font-size: 0.94rem;
  margin: 0;
}

.ledger {
  display: flex;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.ledger-item {
  flex: 1;
  padding: 24px 20px;
  text-align: center;
  border-right: 1px solid var(--rule);
}
.ledger-item:last-child { border-right: none; }

.ledger-item .num {
  font-family: 'Sora', sans-serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--navy-deep);
  display: block;
}

.ledger-item .cap {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 6px;
  display: block;
}

/* ---- Legacy page ---- */
.legacy-block {
  border-top: 1px solid var(--rule);
  padding: 40px 0;
}
.legacy-block:last-child { border-bottom: 1px solid var(--rule); }

.legacy-block h3 {
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.legacy-block p {
  color: var(--ink-soft);
}

/* ---- Contact page ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}

.contact-list li {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}
.contact-list li:last-child { border-bottom: 1px solid var(--rule); }

.contact-list .ico {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--brick);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
}

.timings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.timings-table td {
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}
.timings-table td:last-child {
  text-align: right;
  color: var(--ink-soft);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
}

.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--navy-deep);
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.92rem;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s ease;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--brick);
}

/* ---- Footer ---- */
footer {
  background: var(--navy-deep);
  color: #DCE3E8;
  padding: 52px 0 26px;
  margin-top: 40px;
}

footer .grid-3 { margin-bottom: 40px; }

footer h4 {
  color: var(--paper);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

footer p, footer a {
  color: #AFC0CC;
  font-size: 0.88rem;
  line-height: 1.8;
}

footer a:hover { color: var(--paper); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 22px;
  font-size: 0.8rem;
  color: #7E93A3;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ===== Animations & mobile nav ===== */

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .ledger { flex-wrap: wrap; }
  .ledger-item { flex: 1 1 50%; border-bottom: 1px solid var(--rule); }

  nav.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    padding: 8px 28px 20px;
  }

  nav.main-nav.nav-open {
    display: flex;
    animation: navDrop 0.22s ease;
  }

  nav.main-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
  }
  nav.main-nav a:last-child { border-bottom: none; }

  .nav-cta {
    margin-top: 10px;
    text-align: center;
  }

  .mobile-toggle { display: block; }
}

@keyframes navDrop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Typed word cursor */
.typed-cursor {
  display: inline-block;
  width: 3px;
  background: var(--brick);
  margin-left: 3px;
  animation: blink 0.9s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@media (max-width: 560px) {
  footer .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .typed-cursor { animation: none; }
}