/* ==========================================================================
   Catholic Central School — Site Stylesheet
   Bold purple & white palette, matched to the real CCS brand. Variable names
   below are historical (--maroon-*, --gold-*, --teal-*, etc.) but every value
   is now a shade of purple/lavender or a neutral — swap the values (not the
   names, unless you also update every var() reference) if your brand guide
   gives you exact hex codes.
   ========================================================================== */

:root {
  /* Core brand palette — purple & white, with tonal variety for depth */
  --maroon-900: #1f0f38;   /* deepest purple (dark gradients) */
  --maroon-700: #4c2382;   /* primary school purple (buttons, links, headings accents) */
  --maroon-600: #6b3aad;   /* mid purple (gradients) */
  --gold-500: #a457c9;     /* orchid accent (borders, badges) */
  --gold-400: #ddccf5;     /* light lavender (readable text on dark purple) */
  --gold-100: #f5eefc;     /* pale lavender tint (badge/section backgrounds) */
  --navy-900: #170b28;     /* near-black purple (footer, dark sections) */
  --coral-500: #7c5cd1;    /* indigo-violet accent */
  --teal-500: #4a2a73;     /* deep plum accent */
  --cream-50: #fbfaff;     /* near-white with a faint lavender tint */
  --ink-900: #221a30;      /* body text ink, purple-tinted neutral */
  --ink-600: #5c5568;      /* muted secondary text */
  --white: #ffffff;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius-md: 14px;
  --radius-lg: 26px;
  --shadow-soft: 0 18px 40px -20px rgba(22, 33, 58, 0.35);
  --shadow-card: 0 10px 30px -14px rgba(22, 33, 58, 0.28);
  --container: 1180px;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--cream-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; color: var(--ink-600); }
a { color: var(--maroon-700); text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--maroon-700);
  background: var(--gold-100);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--white);
  color: var(--maroon-700);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 22px 34px -18px rgba(76,35,130,0.45); }
.btn-secondary {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn-secondary:hover { background: rgba(255,255,255,0.14); }
.btn-outline {
  background: transparent;
  border-color: var(--maroon-700);
  color: var(--maroon-700);
}
.btn-outline:hover { background: var(--maroon-700); color: var(--white); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid rgba(22,33,58,0.08);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy-900);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}
.brand .crest {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--maroon-700), var(--maroon-900));
  color: var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-600);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--navy-900);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { border-bottom-color: var(--gold-500); color: var(--maroon-700); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-cta .btn { padding: 10px 20px; }

/* ---------- Nav dropdown (About) ---------- */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  transform: translateY(1.5px);
  gap: 4px;
  background: none;
  border: none;
  font-family: var(--font-body);
  color: var(--navy-900);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 2px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.nav-dropdown-toggle .caret { font-size: 0.7em; transition: transform 0.15s ease; }
.nav-dropdown.open .nav-dropdown-toggle .caret,
.nav-dropdown:hover .nav-dropdown-toggle .caret { transform: rotate(180deg); }
.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle,
.nav-dropdown.current .nav-dropdown-toggle { color: var(--maroon-700); border-bottom-color: var(--gold-500); }
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  box-shadow: var(--shadow-card);
  border-radius: 12px;
  padding: 8px;
  min-width: 210px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 200;
  border: 1px solid rgba(22,33,58,0.08);
  list-style: none;
  margin: 0;
}
.nav-dropdown-menu::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    height: 12px;
}
.nav-dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  border-bottom: none;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--navy-900);
  white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--gold-100); color: var(--maroon-700); }
.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu { display: flex; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  margin: 5px 0;
  background: var(--navy-900);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .nav-links, .nav-cta .btn-outline { display: none; }
  .nav-wrap { flex-wrap: wrap; }
  .nav-wrap nav { flex-basis: 100%; order: 3; }
  .nav-cta { gap: 10px; }
  body.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 4px;
    padding: 16px 0 8px;
    border-top: 1px solid rgba(22,33,58,0.08);
  }
  body.nav-open .nav-links a { width: 100%; padding: 10px 4px; }
  .nav-dropdown { width: 100%; }
  .nav-dropdown-toggle { width: 100%; padding: 10px 4px; justify-content: space-between; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0 14px;
    display: none;
    min-width: 0;
  }
  .nav-dropdown:hover .nav-dropdown-menu { display: none; }
  .nav-dropdown.open .nav-dropdown-menu { display: flex; }
  .nav-dropdown-menu a { padding: 8px 4px; font-size: 0.92rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: radial-gradient(circle at 15% 20%, var(--maroon-600), var(--maroon-900) 60%);
  color: var(--white);
  padding: 90px 0 110px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214,164,25,0.35), transparent 70%);
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero p.lead {
  color: rgba(255,255,255,0.88);
  font-size: 1.15rem;
  max-width: 46ch;
}
.hero h1, .hero h2, .hero h3 { color: var(--white); }
.hero .eyebrow { background: rgba(255,255,255,0.14); color: var(--gold-400); }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 48px;
}
.hero-stats div {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}
.hero-stats strong { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--gold-400); }
.hero-stats span { font-size: 0.78rem; letter-spacing: 0.04em; color: rgba(255,255,255,0.75); }
.hero-art {
  background: linear-gradient(160deg, var(--gold-400), var(--coral-500));
  border-radius: var(--radius-lg);
  min-height: 340px;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(22,33,58,0.55);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  padding: 20px;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Page hero (simpler banner for inner pages) ---------- */
.page-hero {
  background: linear-gradient(120deg, var(--navy-900), var(--maroon-900));
  color: var(--white);
  padding: 64px 0 72px;
  text-align: center;
}
.page-hero p { color: rgba(255,255,255,0.85); max-width: 60ch; margin: 0 auto; }
.page-hero h1, .page-hero h2, .page-hero h3 { color: var(--white); }
.page-hero .eyebrow { background: rgba(255,255,255,0.14); color: var(--gold-400); }

/* ---------- Sections ---------- */
section { padding: 84px 0; }
section.tight { padding: 56px 0; }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head.left { margin: 0 0 40px; text-align: left; }
.bg-cream { background: var(--cream-50); }
.bg-white { background: var(--white); }
.bg-navy { background: var(--navy-900); color: var(--white); }
.bg-navy h2, .bg-navy h3 { color: var(--white); }
.bg-navy p { color: rgba(255,255,255,0.78); }

/* ---------- Grids & Cards ---------- */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(22,33,58,0.06);
}
.card .icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
  color: var(--white);
}
.icon-maroon { background: var(--maroon-700); }
.icon-gold { background: var(--gold-500); }
.icon-teal { background: var(--teal-500); }
.icon-coral { background: var(--coral-500); }
.icon-navy { background: var(--navy-900); }

/* ---------- Stat strip ---------- */
.stat-strip {
  background: var(--gold-100);
  border-top: 1px solid rgba(214,164,25,0.3);
  border-bottom: 1px solid rgba(214,164,25,0.3);
  padding: 40px 0;
}
.stat-strip .grid-4 { text-align: center; }
.stat-strip strong { display: block; font-family: var(--font-display); font-size: 2rem; color: var(--maroon-700); }
.stat-strip span { font-size: 0.85rem; color: var(--ink-600); }

/* ---------- Gallery ---------- */
.gallery-item {
  border-radius: var(--radius-md);
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  color: var(--white);
  font-weight: 700;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.gallery-item::before {
  content: attr(data-tag);
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22,33,58,0) 40%, rgba(22,33,58,0.65) 100%);
}
.gallery-item span { position: relative; z-index: 1; }
.g1 { background: linear-gradient(150deg, var(--maroon-600), var(--maroon-900)); }
.g2 { background: linear-gradient(150deg, var(--teal-500), var(--navy-900)); }
.g3 { background: linear-gradient(150deg, var(--gold-500), var(--coral-500)); }
.g4 { background: linear-gradient(150deg, var(--navy-900), var(--maroon-700)); }
.g5 { background: linear-gradient(150deg, var(--coral-500), var(--maroon-900)); }
.g6 { background: linear-gradient(150deg, var(--gold-400), var(--teal-500)); }
.gallery-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-600);
  margin-top: 18px;
}

/* ---------- Testimonials ---------- */
.testimonial {
  background: var(--white);
  border-left: 4px solid var(--gold-500);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.testimonial p.quote {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink-900);
  font-style: italic;
}
.testimonial .attribution { font-size: 0.85rem; color: var(--maroon-700); font-weight: 700; }
.testimonials-note {
  background: var(--gold-100);
  border: 1px dashed var(--gold-500);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 0.85rem;
  color: var(--ink-600);
  margin-bottom: 32px;
}

/* ---------- Tables (tuition) ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
table { width: 100%; border-collapse: collapse; background: var(--white); }
th, td { text-align: left; padding: 16px 20px; border-bottom: 1px solid rgba(22,33,58,0.08); }
th { background: var(--navy-900); color: var(--white); font-family: var(--font-display); font-weight: 600; }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: var(--cream-50); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 24px; }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: flex-start;
}
.step .num {
  counter-increment: step;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--maroon-700);
  color: var(--gold-400);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700;
}
.step .num::before { content: counter(step); }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-soft);
}
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--navy-900);
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1.5px solid rgba(22,33,58,0.16);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--cream-50);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--maroon-700);
  background: var(--white);
}
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 620px) { .form-two { grid-template-columns: 1fr; } }
.form-note { font-size: 0.8rem; color: var(--ink-600); margin-top: 10px; }

/* ---------- Contact info cards ---------- */
.contact-info-list { display: grid; gap: 18px; }
.contact-info-list .card { display: flex; gap: 16px; align-items: flex-start; padding: 22px; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--coral-500), var(--gold-500));
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
  color: var(--white);
}
.cta-banner h2 { color: var(--white); }
.cta-banner p { color: rgba(255,255,255,0.92); max-width: 60ch; margin: 0 auto 26px; }
.cta-banner .btn-primary { background: var(--navy-900); color: var(--white); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: rgba(255,255,255,0.75);
  padding: 60px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.footer-grid h4 { color: var(--white); font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; }
.footer-grid a { color: rgba(255,255,255,0.75); display: block; margin-bottom: 10px; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--gold-400); }
.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
}
@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge {
  display: inline-block;
  background: var(--gold-100);
  color: var(--maroon-700);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}