/* ═══════════════════════════════════════════
   Saint "D" Public School — Logo-Aligned Design System
   Navy · Sky Blue · Crimson · Gold Color Story
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;700&display=swap');

:root {
  /* Primary — Deep Navy (logo banner & shield spine) */
  --forest:        #1a1a8c;
  /* Light tint — Sky Blue (logo left-shield panel) */
  --sage:          #e8f4fd;
  /* Very light wash */
  --olive:         #f0f6ff;
  /* Base white */
  --cream:         #ffffff;
  --white:         #ffffff;
  /* Accent — Crimson Red (logo right-shield & ribbon) */
  --moss:          #e53935;
  /* Highlight — Golden Yellow (logo portrait frame) */
  --gold:          #fdd835;
  /* Sky Blue (logo left-shield) */
  --sky:           #29b6f6;
  /* Shadows */
  --forest-shadow: rgba(26, 26, 140, 0.2);
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  color: var(--forest);
  overflow-x: hidden;
  min-height: 100vh;
  font-weight: 400;
}

/* ── NOISE OVERLAY ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--olive); }
::-webkit-scrollbar-thumb { background: var(--forest); border-radius: 3px; }

/* ── NAVBAR ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  /* Always has a translucent navy base so white text is readable over the light hero */
  background: rgba(26, 26, 140, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.4s var(--ease-premium), box-shadow 0.4s var(--ease-premium);
}
nav.scrolled {
  background: rgba(26, 26, 140, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px var(--forest-shadow);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.nav-logo img {
  height: 48px; width: 48px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7);
  background: white;
  padding: 2px;
  flex-shrink: 0;
}
.nav-logo-text {
  line-height: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav-logo-text strong {
  display: block;
  font-family: 'Anton', sans-serif;
  color: #ffffff;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.nav-logo-text small {
  color: rgba(255,255,255,0.8);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.nav-pill {
  display: flex;
  gap: 2px;
  list-style: none;
  align-items: center;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 50px;
  padding: 5px 5px;
  border: 1px solid rgba(255,255,255,0.2);
}
/* Each li must also be a centered flex container */
.nav-pill li {
  display: flex;
  align-items: center;
}
.nav-pill a {
  display: flex;
  align-items: center;
  height: 36px;
  color: var(--cream);
  text-decoration: none;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0 15px;
  border-radius: 50px;
  transition: all 0.3s var(--ease-premium);
  white-space: nowrap;
}
.nav-pill a:hover,
.nav-pill a.active {
  background: rgba(255,255,255,0.18);
  color: var(--white);
}
/* Admissions CTA — separated by a subtle gap via margin */
.nav-pill li:last-child {
  margin-left: 4px;
}
.nav-pill a.nav-cta {
  background: #ffffff;
  color: var(--forest);
  font-weight: 700;
  height: 36px;
  padding: 0 20px;
  border-radius: 50px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.nav-pill a.nav-cta:hover {
  background: var(--gold);
  color: var(--forest);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(253,216,53,0.4);
}

/* hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: all 0.3s var(--ease-premium);
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 70px; left: 0; right: 0;
  background: rgba(26, 26, 140, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1rem 2rem 2rem;
  z-index: 199;
  border-top: 1px solid rgba(41, 182, 246, 0.25);
  flex-direction: column;
  gap: 0.5rem;
  border-radius: 0 0 2.5rem 2.5rem;
}
.mobile-menu a {
  color: var(--sage);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 0;
  border-bottom: 1px solid rgba(230, 240, 250,0.1);
  display: block;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.mobile-menu.open { display: flex; }

/* ── PAGE HERO (shared inner pages) ── */
.page-hero {
  background: var(--sage);
  padding: 8rem 2rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 5rem 5rem;
}
.page-hero-label {
  display: inline-block;
  background: rgba(26, 26, 140, 0.1);
  border: 1px solid rgba(26, 26, 140, 0.25);
  color: var(--forest);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 8px 22px;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}
.page-hero h1 {
  font-family: 'Anton', sans-serif;
  color: var(--forest);
  font-size: clamp(3rem, 10vw, 8rem);
  line-height: 1.05;
  letter-spacing: 0.06em;
  margin-bottom: 1.8rem;
  text-transform: uppercase;
}
.page-hero p {
  color: var(--forest);
  opacity: 0.7;
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── SECTION SHARED ── */
.section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: 'Anton', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--forest);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.1;
}
.section-subtitle {
  color: var(--forest);
  opacity: 0.6;
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 3rem;
}
.bg-olive { background: var(--olive); border-radius: 5rem 5rem 0 0; }
.bg-sage  { background: var(--sage); border-radius: 5rem 5rem 0 0; }
.bg-light { background: var(--olive); border-radius: 5rem 5rem 0 0; }
.bg-navy  { background: var(--forest); border-radius: 5rem 5rem 0 0; }
.bg-sky   { background: var(--sky); border-radius: 5rem 5rem 0 0; }

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 10px;
  text-decoration: none;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: all 0.5s var(--ease-premium);
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
}
.btn-forest {
  background: var(--forest);
  color: var(--cream);
  box-shadow: 0 12px 40px var(--forest-shadow);
}
.btn-forest:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 50px rgba(26, 26, 140, 0.35);
}
.btn-gold {
  background: var(--gold);
  color: var(--forest);
  box-shadow: 0 8px 30px rgba(253, 216, 53, 0.4);
}
.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(253, 216, 53, 0.55);
}
.btn-navy {
  background: var(--forest);
  color: var(--cream);
  box-shadow: 0 8px 30px var(--forest-shadow);
}
.btn-navy:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(26, 26, 140, 0.35);
}
.btn-outline {
  background: transparent;
  color: var(--forest);
  border: 2px solid var(--forest);
}
.btn-outline:hover {
  background: var(--forest);
  color: var(--cream);
}
.btn-white {
  background: var(--cream);
  color: var(--forest);
  border: 2px solid rgba(10, 37, 64, 0.15);
}
.btn-white:hover {
  background: var(--white);
  transform: translateY(-3px);
}

/* ── FOOTER ── */
footer {
  background: var(--forest);
  color: var(--sage);
  padding: 5rem 2rem 2rem;
  border-radius: 5rem 5rem 0 0;
  margin-top: 2rem;
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.5fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(41, 182, 246, 0.15);
}
.footer-brand img {
  height: 55px; width: 55px;
  border-radius: 50%;
  border: 2px solid var(--sage);
  background: white;
  padding: 3px;
  margin-bottom: 1rem;
}
.footer-brand h3 {
  font-family: 'Anton', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 0.7rem;
  color: var(--cream);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.footer-brand p {
  color: var(--moss);
  font-size: 0.85rem;
  line-height: 1.7;
}
.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 1.5rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.7rem; }
.footer-col ul li a {
  color: var(--moss);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s var(--ease-premium);
}
.footer-col ul li a:hover { color: var(--cream); }
.footer-contact-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 0.9rem;
  color: var(--moss);
  font-size: 0.85rem;
}
.footer-contact-item span:first-child { font-size: 1rem; margin-top: 1px; }
.footer-contact-item a {
  color: var(--moss);
  text-decoration: none;
}
.footer-contact-item a:hover { color: var(--cream); }
.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--moss);
  opacity: 0.3;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ── ANIMATIONS ── */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* Scroll-triggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(100px);
  transition: opacity 1.2s var(--ease-premium), transform 1.2s var(--ease-premium);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.anim-up  { opacity: 0; transform: translateY(100px); animation: revealUp 1.2s var(--ease-premium) 0.1s both; }
.anim-up2 { opacity: 0; transform: translateY(100px); animation: revealUp 1.2s var(--ease-premium) 0.2s both; }
.anim-up3 { opacity: 0; transform: translateY(100px); animation: revealUp 1.2s var(--ease-premium) 0.35s both; }

@keyframes revealUp {
  from { opacity: 0; transform: translateY(100px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.4); }
  50%      { box-shadow: 0 0 0 14px rgba(229, 57, 53, 0); }
}

/* Letter stagger for hero text */
.hero-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(100px);
  animation: revealUp 1.2s var(--ease-premium) both;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-pill { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .page-hero { border-radius: 0 0 2.5rem 2.5rem; padding: 7rem 1.5rem 3rem; }
  .page-hero h1 { font-size: clamp(2.5rem, 15vw, 5rem); }
  .section { padding: 4rem 1.5rem; }
  nav { padding: 0 1.5rem; }
}
