/* St. Peter's High School — v2 MU-inspired institutional layer
   Brand tokens: burgundy / navy / gold / cream
   Used with Tailwind CDN utilities on public v2 pages
*/

:root {
  --sphs-burgundy: #B80C25;
  --sphs-red: #B80C25;
  --sphs-navy: #0F1D32;
  --sphs-blue: #1A3F7A;
  --sphs-gold: #C9A227;
  --sphs-gold-light: #E8D48B;
  --sphs-cream: #FDFBF7;
  --sphs-ivory: #F7F3EB;
  --sphs-text: #141C2B;
  --sphs-muted: #5C6B7F;
  --sphs-border: #E4E0D8;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Typography */
.v2-body,
.v2-home {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--sphs-text);
  font-feature-settings: "kern" "tnum" "cv05";
}

.v2-display {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.v2-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-v2 {
  padding-top: 3.5rem;
  padding-bottom: 3.75rem;
}

@media (min-width: 768px) {
  .section-v2 {
    padding-top: 4.5rem;
    padding-bottom: 5rem;
  }
}

.v2-eyebrow {
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.7rem;
  /* Darker gold for WCAG contrast on cream/white (~4.6:1) */
  color: #8B6914;
}

.v2-section-header {
  position: relative;
}

.v2-section-header::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 48px;
  height: 3px;
  background: linear-gradient(to right, var(--sphs-burgundy), var(--sphs-gold));
  border-radius: 999px;
}

/* Cards */
.v2-card,
.modern-card,
.unified-card {
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.2s var(--ease);
  border: 1px solid var(--sphs-border);
}

.v2-card:hover,
.modern-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 45px -12px rgb(15 29 50 / 0.12), 0 8px 16px -4px rgb(15 29 50 / 0.08);
  border-color: #d1cbbf;
}

.unified-card:hover {
  border-color: var(--sphs-gold);
  transform: translateY(-2px);
}

.premium-shadow {
  box-shadow: 0 25px 60px -15px rgb(15 29 50 / 0.12), 0 10px 20px -5px rgb(15 29 50 / 0.08);
}

/* Buttons — consistent public CTA system */
.v2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.v2-btn-primary {
  background: var(--sphs-burgundy);
  color: #fff;
  box-shadow: 0 4px 14px -2px rgb(184 12 37 / 0.35);
}

.v2-btn-primary:hover {
  background: #8E0A1E;
  color: #fff;
  box-shadow: 0 6px 20px -2px rgb(184 12 37 / 0.45);
  transform: translateY(-1px);
}

.v2-btn-secondary {
  background: var(--sphs-navy);
  color: #fff;
}

.v2-btn-secondary:hover {
  background: #000;
  color: #fff;
  transform: translateY(-1px);
}

.v2-btn-outline {
  background: transparent;
  color: var(--sphs-navy);
  border-color: rgba(15, 29, 50, 0.22);
}

.v2-btn-outline:hover {
  background: rgba(15, 29, 50, 0.05);
  border-color: var(--sphs-navy);
  color: var(--sphs-navy);
}

.v2-btn-ghost {
  background: transparent;
  color: var(--sphs-burgundy);
  border-color: transparent;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.v2-btn-ghost:hover {
  color: #8E0A1E;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.v2-btn-light {
  background: #fff;
  color: var(--sphs-navy);
}

.v2-btn-light:hover {
  background: var(--sphs-gold-light);
  color: var(--sphs-navy);
}

/* ─── MU-inspired page hero band ─── */
.v2-page-hero {
  background: linear-gradient(135deg, var(--sphs-navy) 0%, #152a4a 55%, var(--sphs-blue) 100%);
  color: #fff;
  padding: 2.75rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.v2-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 80% at 100% 0%, rgba(201, 162, 39, 0.12), transparent 55%),
    linear-gradient(90deg, transparent 60%, rgba(255,255,255,0.03));
  pointer-events: none;
}

.v2-page-hero .container {
  position: relative;
  z-index: 1;
}

.v2-page-hero--image {
  background-color: #0f1d32;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  min-height: 16rem;
  display: flex;
  align-items: flex-end;
  padding: 5.5rem 0 2.5rem;
}

.v2-page-hero--image::before {
  background: linear-gradient(180deg, rgba(15, 29, 50, 0.2) 0%, rgba(15, 29, 50, 0.78) 100%);
}

@media (min-width: 768px) {
  .v2-page-hero--image {
    min-height: 22rem;
    padding-top: 8rem;
  }
}

/* ─── Hero multi-slider (home) ─── */
.v2-hero-slider {
  position: relative;
  min-height: min(72vh, 640px);
  max-height: 720px;
  overflow: hidden;
  background: var(--sphs-navy);
}

@media (min-width: 768px) {
  .v2-hero-slider {
    min-height: min(78vh, 680px);
  }
}

.v2-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s var(--ease), visibility 0.9s;
  z-index: 1;
}

.v2-hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.v2-hero-slide__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: transform 8s linear;
}

.v2-hero-slide.is-active .v2-hero-slide__bg {
  transform: scale(1);
}

.v2-hero-slide__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(15, 29, 50, 0.88) 0%, rgba(15, 29, 50, 0.55) 48%, rgba(15, 29, 50, 0.35) 100%),
    linear-gradient(180deg, rgba(15, 29, 50, 0.25) 0%, transparent 40%, rgba(15, 29, 50, 0.75) 100%);
}

.v2-hero-slide__content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 4.5rem 0 5rem;
  color: #fff;
}

.v2-hero-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 0.5rem;
}

.v2-hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.v2-hero-dot.is-active {
  background: var(--sphs-gold);
  border-color: var(--sphs-gold);
  width: 28px;
}

.v2-hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 29, 50, 0.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.2s var(--ease);
}

.v2-hero-nav:hover {
  background: rgba(184, 12, 37, 0.85);
  border-color: transparent;
}

.v2-hero-nav--prev { left: 1rem; }
.v2-hero-nav--next { right: 1rem; }

@media (max-width: 640px) {
  .v2-hero-nav { display: none; }
}

/* ─── Quick-link icon strip (MU academic units style) ─── */
.v2-quick-strip {
  background: #fff;
  border-bottom: 1px solid var(--sphs-border);
  box-shadow: 0 8px 24px -12px rgb(15 29 50 / 0.1);
  position: relative;
  z-index: 5;
  margin-top: -2.5rem;
}

.v2-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

@media (min-width: 768px) {
  .v2-quick-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .v2-quick-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.v2-quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.35rem 0.75rem;
  text-align: center;
  color: var(--sphs-navy);
  border-right: 1px solid var(--sphs-border);
  border-bottom: 1px solid var(--sphs-border);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
  min-height: 110px;
}

@media (min-width: 1024px) {
  .v2-quick-item {
    border-bottom: none;
  }
  .v2-quick-item:last-child {
    border-right: none;
  }
}

.v2-quick-item:hover {
  background: var(--sphs-navy);
  color: #fff;
}

.v2-quick-item:hover .v2-quick-icon {
  background: rgba(201, 162, 39, 0.2);
  color: var(--sphs-gold-light);
}

.v2-quick-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(15, 29, 50, 0.05);
  color: var(--sphs-burgundy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease);
}

.v2-quick-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.v2-quick-sub {
  font-size: 0.68rem;
  opacity: 0.65;
  margin-top: -0.25rem;
}

/* ─── Important Announcements panel ─── */
.v2-announce {
  background: linear-gradient(180deg, var(--sphs-ivory) 0%, #fff 100%);
}

.v2-announce-panel {
  background: #fff;
  border: 1px solid var(--sphs-border);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 12px 40px -16px rgb(15 29 50 / 0.1);
}

.v2-announce-head {
  background: var(--sphs-navy);
  color: #fff;
  padding: 1rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.v2-announce-list {
  max-height: 320px;
  overflow-y: auto;
}

.v2-announce-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--sphs-border);
  color: var(--sphs-text);
  transition: background 0.15s var(--ease);
}

.v2-announce-item:last-child {
  border-bottom: none;
}

.v2-announce-item:hover {
  background: var(--sphs-ivory);
  color: var(--sphs-burgundy);
}

.v2-announce-bullet {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--sphs-burgundy);
  margin-top: 0.45rem;
  flex-shrink: 0;
}

/* ─── Leadership cards (MU chancellor/VC style) ─── */
.v2-lead-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .v2-lead-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.v2-lead-card {
  background: #fff;
  border: 1px solid var(--sphs-border);
  border-radius: 1.25rem;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

@media (min-width: 640px) {
  .v2-lead-card {
    grid-template-columns: 180px 1fr;
  }
}

.v2-lead-card:hover {
  box-shadow: 0 24px 50px -18px rgb(15 29 50 / 0.18);
  transform: translateY(-3px);
}

.v2-lead-photo {
  aspect-ratio: 1;
  background: linear-gradient(145deg, #1A3F7A, #0F1D32);
  overflow: hidden;
}

@media (min-width: 640px) {
  .v2-lead-photo {
    aspect-ratio: auto;
    min-height: 100%;
  }
}

.v2-lead-photo img,
.v2-lead-photo picture {
  width: 100%;
  height: 100%;
  display: block;
}

.v2-lead-photo img {
  object-fit: cover;
  object-position: center top;
  image-orientation: from-image;
  transition: transform 0.6s var(--ease);
}

.v2-lead-card:hover .v2-lead-photo img {
  transform: scale(1.04);
}

.v2-lead-body {
  padding: 1.5rem 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.v2-lead-role {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sphs-gold);
  margin-bottom: 0.35rem;
}

.v2-lead-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--sphs-navy);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.v2-lead-title {
  font-size: 0.9rem;
  color: var(--sphs-burgundy);
  font-weight: 600;
  margin-top: 0.25rem;
}

.v2-lead-bio {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(20, 28, 43, 0.75);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Secondary leadership grid */
.v2-team-mini {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .v2-team-mini {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .v2-team-mini {
    grid-template-columns: repeat(4, 1fr);
  }
}

.v2-team-mini-card {
  background: #fff;
  border: 1px solid var(--sphs-border);
  border-radius: 1rem;
  padding: 1.15rem;
  text-align: center;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.v2-team-mini-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -14px rgb(15 29 50 / 0.14);
}

.v2-team-mini-photo {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  margin: 0 auto 0.85rem;
  overflow: hidden;
  ring: 1px;
  border: 3px solid rgba(201, 162, 39, 0.35);
  background: linear-gradient(145deg, #1A3F7A, #0F1D32);
}

.v2-team-mini-photo picture,
.v2-team-mini-photo img {
  width: 100%;
  height: 100%;
  display: block;
}

.v2-team-mini-photo img {
  object-fit: cover;
  object-position: center top;
  image-orientation: from-image;
}

/* Ensure nested picture fills circular/rect crop frames */
.v2-team-mini-photo picture,
.v2-lead-photo picture {
  width: 100%;
  height: 100%;
}

.v2-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sphs-gold-light);
  font-weight: 600;
  font-size: 1.5rem;
  background: linear-gradient(145deg, #1A3F7A, #0F1D32);
}

/* Academics icon units */
.v2-units-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .v2-units-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.v2-unit-card {
  background: #fff;
  border: 1px solid var(--sphs-border);
  border-radius: 1rem;
  padding: 1.75rem 1.25rem;
  text-align: center;
  transition: all 0.25s var(--ease);
}

.v2-unit-card:hover {
  border-color: var(--sphs-gold);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -16px rgb(15 29 50 / 0.14);
}

.v2-unit-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  background: rgba(184, 12, 37, 0.08);
  color: var(--sphs-burgundy);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Stats strip */
.v2-stats {
  background: var(--sphs-navy);
  color: #fff;
}

.stat-number {
  font-variant-numeric: tabular-nums;
}

/* Forms */
.v2-form-input,
.v2-form-select,
.v2-form-textarea {
  transition: all 0.2s var(--ease);
  background: white;
  border: 1px solid var(--sphs-border);
}

.v2-form-input:focus,
.v2-form-select:focus,
.v2-form-textarea:focus {
  border-color: var(--sphs-navy);
  box-shadow: 0 0 0 4px rgba(15, 29, 50, 0.08);
  outline: none;
}

/* Gallery band */
.v2-gallery-band img {
  transition: transform 0.6s var(--ease);
}

.v2-gallery-band a:hover img,
.v2-gallery-band button:hover img {
  transform: scale(1.05);
}

/* Lightbox */
.v2-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 29, 50, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.v2-lightbox.open {
  display: flex !important; /* override [hidden] while open */
}

.v2-lightbox__img {
  max-width: 94vw;
  max-height: 86vh;
  border-radius: 12px;
  box-shadow: 0 30px 90px -15px rgb(0 0 0 / 0.7);
}

.v2-lb-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

/* Utilities used across pages */
.navy-gradient {
  background: linear-gradient(145deg, #0F1D32 0%, #1A3F7A 100%);
}

/* Phone / CTA links on dark navy bands — override global a { color: blue } */
.navy-gradient a[href^="tel"],
.v2-stats a[href^="tel"],
.v2-page-hero a[href^="tel"] {
  color: #fff !important;
}

.navy-gradient a[href^="tel"]:hover,
.v2-stats a[href^="tel"]:hover {
  color: #0F1D32 !important;
}

.jubilee-silver {
  background: linear-gradient(145deg, #F4F1E9 0%, #EDE8DB 100%);
}

.cinema-gradient {
  background: linear-gradient(180deg, rgba(15, 29, 50, 0.35) 0%, rgba(15, 29, 50, 0.68) 45%, rgba(15, 29, 50, 0.85) 100%);
}

.person-photo {
  transition: transform 0.6s var(--ease);
}

.modern-card:hover .person-photo {
  transform: scale(1.04);
}

.initials {
  background: linear-gradient(145deg, #1A3F7A, #0F1D32);
  color: #E8D48B;
}

.quote-mark {
  font-size: 4.5rem;
  line-height: 1;
  opacity: 0.12;
  font-family: 'Cormorant Garamond', serif;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Events date rail (was orphan class) */
.elegant-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 4.25rem;
  padding: 0.65rem 0.5rem;
  border-radius: 0.85rem;
  background: linear-gradient(145deg, #0F1D32 0%, #1A3F7A 100%);
  color: #fff;
  text-align: center;
  flex-shrink: 0;
}
.elegant-date .day,
.elegant-date__day,
.elegant-date .date-badge {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
}
.elegant-date .month,
.elegant-date__month {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #E8D48B;
  margin-top: 0.25rem;
}
.elegant-date .uppercase {
  color: #E8D48B;
}

/* Long-form CMS HTML body (news / notices) */
.prose-v2,
.v2-prose {
  font-size: 1.02rem;
  line-height: 1.75;
  color: rgba(20, 28, 43, 0.9);
}
.prose-v2 h2,
.prose-v2 h3,
.v2-prose h2,
.v2-prose h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: #0F1D32;
  letter-spacing: -0.02em;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.15;
}
.prose-v2 p,
.v2-prose p { margin-bottom: 1em; }
.prose-v2 a,
.v2-prose a {
  color: #9A0A1F; /* burgundy on cream — stronger contrast than gold */
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}
.prose-v2 a:hover,
.v2-prose a:hover { color: #6E0816; }
.prose-v2 ul,
.prose-v2 ol,
.v2-prose ul,
.v2-prose ol { margin: 0.75em 0 1em 1.25em; }
.prose-v2 li,
.v2-prose li { margin-bottom: 0.35em; }
.prose-v2 img,
.v2-prose img { max-width: 100%; height: auto; border-radius: 0.75rem; margin: 1rem 0; }
.prose-v2 blockquote,
.v2-prose blockquote {
  border-left: 3px solid #C9A227;
  padding-left: 1rem;
  margin: 1.25rem 0;
  color: rgba(20, 28, 43, 0.75);
  font-style: italic;
}

/* Skip + focus (public) */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 9999;
  background: #0F1D32;
  color: #fff;
  padding: 0.65rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
}
.skip-link:focus {
  top: 1rem;
}
:focus-visible {
  outline: 2px solid #C9A227;
  outline-offset: 2px;
}

/* Gold text utilities: only safe on dark surfaces; darken on light */
.text-sphs-gold {
  color: #8B6914 !important;
}
.bg-sphs-navy .text-sphs-gold,
.v2-stats .text-sphs-gold,
.navy-gradient .text-sphs-gold,
.v2-hero-slide .text-sphs-gold {
  color: #E8D48B !important;
}

/* Links styled with gold class — prefer burgundy for accessibility */
a.text-sphs-gold,
a.hover\:text-sphs-gold:hover {
  color: #9A0A1F !important;
}

@media (prefers-reduced-motion: reduce) {
  .v2-btn,
  .v2-btn-primary:hover,
  .v2-btn-secondary:hover {
    transition: none;
    transform: none;
  }
  .v2-hero-slide,
  .v2-hero-slide__bg {
    transition: none !important;
    animation: none !important;
  }
}
