/* ===========================
   Lakeville Stray Cats — CSS
   =========================== */

:root {
  --red-dark:   #D90700;
  --red:        #EF4D48;
  --red-light:  #f47f7c;
  --off-white:  #F7F3F5;
  --white:      #ffffff;
  --dark:       #1A0A0A;
  --text:       #453E3E;
  --gray:       #7a6e6e;
  --light-gray: #e8e0e0;
  --radius:     10px;
  --shadow:     0 2px 16px rgba(0,0,0,0.10);
}

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

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---- NAV ---- */
nav {
  background: var(--dark);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}

.nav-logo img { height: 76px; padding: 6px 0; }

.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 1.1rem 1.2rem;
  color: rgba(255,255,255,0.72);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.2s;
}

/* Underline indicator — slides in on hover/active */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1.2rem;
  right: 1.2rem;
  height: 2px;
  background: var(--red);
  border-radius: 2px 2px 0 0;
  transform: scaleX(0);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a.active {
  color: var(--white);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-cta {
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
}
.nav-cta a {
  background: var(--red) !important;
  color: var(--white) !important;
  border-radius: var(--radius);
  padding: 0.6rem 1.4rem !important;
  font-weight: 700;
  transition: background 0.2s !important;
  line-height: 1;
}
.nav-cta a:hover { background: var(--red-dark) !important; }

/* hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.hamburger span { width: 24px; height: 2px; background: var(--white); border-radius: 2px; }

/* ---- HERO SLIDESHOW ---- */
.hero {
  position: relative;
  height: clamp(420px, 56.25vw, 780px); /* 16:9 ratio — scales with screen width */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slide.active { opacity: 1; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(26,10,10,0.62) 0%, rgba(26,10,10,0.5) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  padding: 2rem;
  max-width: 700px;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero-content h1 span { color: var(--red-light); }

.hero-content p {
  font-size: 1.1rem;
  opacity: 0.92;
  margin-bottom: 2rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.btn {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.22); }

.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); }

.btn-outline {
  border: 2px solid rgba(255,255,255,0.7);
  color: var(--white);
  margin-left: 1rem;
  background: transparent;
}
.btn-outline:hover { background: rgba(255,255,255,0.15); }

/* ---- STATS BAR ---- */
.stats-bar {
  background: #111;
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 0;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.stat {
  text-align: center;
  padding: 1.4rem 2.8rem;
  border-right: 1px solid rgba(255,255,255,0.07);
  flex: 1;
  min-width: 120px;
}
.stat:last-child { border-right: none; }

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.3rem;
}

/* ---- SECTIONS ---- */
.section { padding: 4rem 2rem; max-width: 1100px; margin: 0 auto; }

.section-title { font-size: 1.9rem; font-weight: 800; color: var(--dark); margin-bottom: 0.4rem; }
.section-sub { color: var(--gray); margin-bottom: 2.5rem; font-size: 1rem; }

.divider { width: 52px; height: 4px; background: var(--red); border-radius: 2px; margin: 0.5rem 0 2rem; }

/* ---- ABOUT STRIP ---- */
.about-strip { background: var(--off-white); padding: 4rem 2rem; }

.about-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-inner p { color: var(--text); margin-bottom: 1rem; }

.about-photo {
  border-radius: var(--radius);
  height: 320px;
  object-fit: cover;
  width: 100%;
  box-shadow: var(--shadow);
}

/* ---- TESTIMONIALS ---- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 1.8rem;
  border-left: 4px solid var(--red);
  box-shadow: var(--shadow);
}

.testimonial-card p {
  color: var(--text);
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.7;
}

/* ---- PHOTO GRID ---- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.photo-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s;
}

.photo-grid img:hover { transform: scale(1.04); }

/* ---- CALENDAR ---- */
.calendar-section { background: var(--off-white); padding: 4rem 2rem; }
.calendar-inner { max-width: 1100px; margin: 0 auto; }

/* ---- School tabs ---- */
.school-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.8rem;
}
.school-tab {
  flex: 1;
  padding: 0.85rem 1.2rem;
  border: 2px solid var(--light-gray);
  background: var(--white);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--gray);
  letter-spacing: 0.02em;
}
.school-tab:hover { border-color: var(--red); color: var(--red-dark); }
.school-tab.active {
  background: var(--red-dark);
  color: var(--white);
  border-color: var(--red-dark);
  box-shadow: 0 4px 14px rgba(217,7,0,0.25);
}

.sport-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }

.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--light-gray);
  background: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--gray);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--red-dark);
  color: var(--white);
  border-color: var(--red-dark);
}

/* Keyframe animations for dynamically injected content */
@keyframes card-in {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pill-in {
  from { opacity: 0; transform: scale(0.82); }
  to   { opacity: 1; transform: scale(1); }
}

#events-list-north, #events-list-south { display: grid; gap: 0.75rem; }

/* Cards and filter pills animate in when injected */
.event-card  { animation: card-in 0.45s ease both; }
.filter-btn  { animation: pill-in 0.3s ease both; }

/* Stagger via nth-child */
.event-card:nth-child(1)  { animation-delay: 0.03s; }
.event-card:nth-child(2)  { animation-delay: 0.07s; }
.event-card:nth-child(3)  { animation-delay: 0.11s; }
.event-card:nth-child(4)  { animation-delay: 0.15s; }
.event-card:nth-child(5)  { animation-delay: 0.19s; }
.event-card:nth-child(6)  { animation-delay: 0.23s; }
.event-card:nth-child(7)  { animation-delay: 0.27s; }
.event-card:nth-child(8)  { animation-delay: 0.31s; }
.event-card:nth-child(9)  { animation-delay: 0.35s; }
.event-card:nth-child(10) { animation-delay: 0.39s; }
.event-card:nth-child(n+11) { animation-delay: 0.43s; }

.filter-btn:nth-child(2)  { animation-delay: 0.04s; }
.filter-btn:nth-child(3)  { animation-delay: 0.08s; }
.filter-btn:nth-child(4)  { animation-delay: 0.12s; }
.filter-btn:nth-child(5)  { animation-delay: 0.16s; }
.filter-btn:nth-child(6)  { animation-delay: 0.20s; }
.filter-btn:nth-child(7)  { animation-delay: 0.24s; }
.filter-btn:nth-child(n+8) { animation-delay: 0.28s; }

.event-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.4rem;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 1.2rem;
  box-shadow: var(--shadow);
  transition: transform 0.15s;
  min-height: 72px;
}

.event-card:hover { transform: translateX(4px); }

.event-date-box {
  background: var(--red-dark);
  color: var(--white);
  border-radius: 8px;
  width: 56px;
  text-align: center;
  padding: 0.5rem;
}

.event-date-box .month { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--red-light); }
.event-date-box .day { font-size: 1.5rem; font-weight: 800; line-height: 1; }

.event-info { min-width: 0; }
.event-info h4 { font-size: 0.95rem; font-weight: 700; color: var(--dark); }
.event-info p { font-size: 0.82rem; color: var(--gray); }

.event-sport-tag {
  background: var(--red);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
  justify-self: end;
}

/* ---- Logo loader ---- */
.logo-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem;
}
.logo-loader img {
  width: 120px;
  animation: logo-pulse 1.4s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(217,7,0,0.4));
}
.logo-loader p { color: var(--gray); font-size: 0.9rem; }
@keyframes logo-pulse {
  0%, 100% { transform: scale(1);   opacity: 0.8; }
  50%       { transform: scale(1.1); opacity: 1;   }
}

/* ---- Calendar watermark logo ---- */
.calendar-section { position: relative; overflow: hidden; }
.calendar-watermark {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 340px;
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
}

.loading-msg, .error-msg { text-align: center; padding: 2rem; color: var(--gray); }

/* ---- EVENTS CTA (home page) ---- */
.events-cta-section {
  background: var(--dark);
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.events-cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(200,16,46,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.events-cta-inner {
  position: relative;
  max-width: 580px;
  margin: 0 auto;
}
.events-cta-icons {
  font-size: 2rem;
  margin-bottom: 1rem;
  letter-spacing: 0.15em;
}
.events-cta-section p {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

/* ---- MEMBERSHIP CTA ---- */
.membership-section {
  background: var(--dark);
  color: var(--white);
  padding: 4rem 2rem;
  text-align: center;
}

.membership-section h2 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.membership-section h2 span { color: var(--red-light); }
.membership-section p { opacity: 0.8; max-width: 500px; margin: 0 auto 2rem; }

.perks-grid { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; margin-bottom: 2rem; }

.perk { background: rgba(255,255,255,0.07); border-radius: var(--radius); padding: 1.2rem 1.8rem; text-align: center; min-width: 160px; }
.perk-icon { font-size: 2rem; margin-bottom: 0.4rem; }
.perk-label { font-size: 0.85rem; font-weight: 600; opacity: 0.9; }

/* ---- FOOTER ---- */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.55);
  padding: 2.5rem 2rem;
  text-align: center;
  font-size: 0.88rem;
  border-top: 3px solid var(--red-dark);
}

footer .footer-logo { margin: 0 auto 1rem; height: 44px; }
footer a { color: var(--red-light); }
footer .footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; flex-wrap: wrap; }

/* ---- PAGE HERO ---- */
.page-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 4rem 2rem;
  text-align: center;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(26,10,10,0.65);
}
.page-hero > * { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.page-hero p { opacity: 0.85; max-width: 500px; margin: .8rem auto 0; }

/* ---- RESPONSIVE ---- */
@media (max-width: 700px) {
  html, body { overflow-x: hidden; max-width: 100%; }

  /* ── Nav ─────────────────────────────────────────────────── */
  .nav-links {
    display: none; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--dark); padding: 0 0 1.5rem; z-index: 9999;
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }

  /* ── Hero — use min-height so content drives height, not vw ─ */
  .hero {
    height: auto;
    min-height: 520px;
  }
  .hero-content {
    padding: 2rem 1.25rem;
  }
  .hero-content h1 {
    font-size: clamp(1.55rem, 6.5vw, 2.1rem);
    margin-bottom: 0.75rem;
  }
  .hero-content p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }
  .hero-content .btn {
    display: block;
    margin: 0.6rem auto 0;
    text-align: center;
    width: fit-content;
  }
  .btn-outline { margin-left: 0; }

  /* ── Stats — 2-column grid so it's balanced ─────────────── */
  .stats-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    padding: 0;
    text-align: center;
  }
  .stat { border-right: 1px solid rgba(255,255,255,0.07); border-bottom: 1px solid rgba(255,255,255,0.07); padding: 1.2rem 1rem; }
  /* 5th stat spans both columns */
  .stats-bar .stat:last-child { grid-column: 1 / -1; border-right: none; }
  .stat-number { font-size: 1.45rem; }
  .stat-label  { font-size: 0.68rem; }

  /* ── Layout ─────────────────────────────────────────────── */
  .about-inner { grid-template-columns: 1fr; }
  .about-photo { height: 210px; }
  .section { padding: 2.5rem 1.25rem; }
  .calendar-section, .about-strip, .membership-section { padding: 2.5rem 1.25rem; }

  /* ── Photo grid ──────────────────────────────────────────── */
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid img { height: 130px; }

  /* ── Perks ───────────────────────────────────────────────── */
  .perks-grid { gap: 0.75rem; }
  .perk { width: 100%; max-width: 360px; }

  /* ── Testimonials ────────────────────────────────────────── */
  .testimonials-grid { grid-template-columns: 1fr; }

  /* ── School tabs (old calendar page) ────────────────────── */
  .school-tabs { flex-direction: column; }
  .school-tab.calendar-tab { flex: none; width: 100%; text-align: center; }

  /* ── Events page controls bar ────────────────────────────── */
  .events-controls {
    top: 88px;
    padding: 0.55rem 0.75rem;
    gap: 0.3rem;
    row-gap: 0.4rem;
    flex-wrap: wrap;
  }
  /* Hide separators — wrapping handles visual grouping */
  .ctrl-sep { display: none; }

  /* School tabs in events bar */
  .events-controls .school-tab {
    font-size: 0.72rem;
    padding: 0.32rem 0.7rem;
  }

  /* Season buttons */
  .season-btn {
    font-size: 0.68rem;
    padding: 0.28rem 0.5rem;
  }

  /* View buttons */
  .view-btn {
    font-size: 0.68rem;
    padding: 0.28rem 0.55rem;
  }

  /* Month nav (calendar mode) */
  .month-nav { margin-left: 0; }
  #cal-month-label { font-size: 0.78rem; min-width: 110px; }

  /* Live badge — always push to its own row */
  .live-badge { margin-left: auto; }

  /* ── Sport filter bar ────────────────────────────────────── */
  .sport-filter-bar { padding: 0.45rem 0.75rem; gap: 0.3rem; }
  .sf-btn { font-size: 0.65rem; padding: 0.18rem 0.5rem; }
  .sf-label { font-size: 0.62rem; }

  /* ── Events list ─────────────────────────────────────────── */
  .ev-wrap { padding: 1rem 0.75rem 3rem; }
  .ev-item { gap: 0.5rem; padding: 0.6rem 0.75rem; }
  .ev-title { font-size: 0.82rem; }

  /* ── Calendar grid ───────────────────────────────────────── */
  .cal-wrap { padding: 0.75rem 0.2rem 3rem; }
  #cal-grid { gap: 1px; }
  .cal-day { min-height: 52px; padding: 0.18rem 0.15rem; }
  .day-num { font-size: 0.65rem; width: 17px; height: 17px; line-height: 17px; margin-bottom: 0.15rem; }
  .cal-chip { font-size: 0.5rem; padding: 1px 3px; margin-bottom: 1px; }
  .cal-head { font-size: 0.58rem; padding: 0.3rem 0.1rem; }
}

/* =====================================================
   PREMIUM ANIMATIONS v2
   Custom cursor · scroll progress · word-wipe reveals
   ===================================================== */

/* ---- Page transition overlay ---- */
.pt-overlay {
  position: fixed;
  inset: 0;
  background: #0d0d0d;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}


/* ---- Page entry fade-in (applies to every page load automatically) ---- */
@keyframes page-entry {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
body {
  animation: page-entry 0.45s ease both;
}

/* ---- Scroll progress bar ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--red-dark), var(--red-light));
  z-index: 10001;
  width: 0%;
  pointer-events: none;
  will-change: width;
}

/* ---- Word-wipe clip containers ---- */
.word-clip {
  display: inline-block;
  overflow: hidden;
  vertical-align: text-bottom;
  line-height: inherit;
}
.word-inner {
  display: inline-block;
  will-change: transform;
}

/* ---- Hero text overflow clip (for wipe-up) ---- */
.hero-content h1 { overflow: visible; }

/* ---- About photo clip base ---- */
.about-photo { will-change: clip-path; }

/* ---- Photo grid overflow ---- */
.photo-grid img { will-change: clip-path, transform; overflow: hidden; }
