/* =========================================================
   IMPACT SPORTS — Stylesheet
   Clean, minimal, modern. Inspired by agamehoops.com.
   ========================================================= */

:root {
  /* Palette */
  --black: #0a0a0a;
  --ink: #111315;
  --charcoal: #1f2226;
  --slate: #4a4f57;
  --muted: #8a9099;
  --line: #e6e8eb;
  --paper: #f7f8fa;
  --white: #ffffff;

  /* Brand — IMPACT Sports Royal Blue & White */
  --brand: #1d4ed8;        /* royal blue */
  --brand-dark: #1e3a8a;   /* deep navy blue */
  --brand-light: #3b82f6;  /* lighter royal */
  --brand-soft: #dbeafe;   /* pale blue tint */
  --accent: #60a5fa;       /* sky-blue accent */

  /* Type */
  --font-sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Layout */
  --container: 1200px;
  --gutter: 24px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 2px 6px rgba(0,0,0,.04);
  --shadow-md: 0 4px 14px rgba(0,0,0,.06), 0 12px 32px rgba(0,0,0,.06);

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* -------- Reset -------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--brand); }
button { font-family: inherit; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { margin: 0 0 1em; color: var(--slate); }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 1rem;
}

/* -------- Container -------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* -------- Buttons -------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .01em;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); color: #fff; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--black); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--ghost-light:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--sm { padding: .6rem 1rem; font-size: .85rem; }

/* -------- Header / Nav -------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav__brand {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 900; letter-spacing: -.02em; font-size: 1.15rem;
}
/* Brand logos (real IMPACT Sports wordmark) */
.nav__logo { height: 48px; width: auto; display: block; }
.footer__logo { height: 52px; width: auto; display: block; }
@media (max-width: 420px) { .nav__logo { height: 40px; } }

.nav__menu {
  display: flex; align-items: center; gap: 2rem;
  list-style: none; margin: 0; padding: 0;
}
.nav__menu a {
  font-weight: 600;
  font-size: .95rem;
  color: var(--charcoal);
  position: relative;
}
.nav__menu a.is-active,
.nav__menu a:hover { color: var(--brand); }
.nav__menu a.is-active::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--brand);
}

.nav__cta { display: flex; gap: .6rem; align-items: center; }

.nav__toggle {
  display: none;
  background: none; border: 0; padding: 0; cursor: pointer;
  width: 36px; height: 36px;
}
.nav__toggle span {
  display: block; height: 2px; background: var(--ink);
  margin: 6px auto; width: 22px; transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav__menu, .nav__cta { display: none; }
  .nav__toggle { display: block; }
  .nav.is-open .nav__menu {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; left: 0; right: 0; top: 72px;
    background: #fff; padding: 1rem var(--gutter) 1.5rem;
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open .nav__menu a {
    padding: .85rem 0; width: 100%;
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open .nav__cta {
    display: flex; flex-direction: column; gap: .6rem;
    position: absolute; left: 0; right: 0; top: auto;
    background: #fff; padding: 0 var(--gutter) 1.25rem;
    margin-top: calc(72px + 1px);
  }
  .nav.is-open .nav__cta .btn { width: 100%; justify-content: center; }
}

/* -------- Hero -------- */
.hero {
  position: relative;
  /* Real game photo behind the headline. Two overlay layers:
     1. a horizontal gradient — heavy on the left so the white text stays
        readable, easing off to the right so the shooter is still visible;
     2. a flat scrim, because the photo is bright (pale bleachers, white
        jerseys) and the gradient alone doesn't hold contrast on the right.
     Mobile gets a stronger, even overlay (below) since text spans full width. */
  background:
    linear-gradient(90deg, rgba(8,9,11,.92) 0%, rgba(8,9,11,.80) 42%, rgba(8,9,11,.38) 100%),
    linear-gradient(rgba(8,9,11,.28), rgba(8,9,11,.28)),
    url("../img/home-hero.jpg") center / cover no-repeat,
    var(--ink);
  color: #fff;
  overflow: hidden;
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(5rem, 10vw, 9rem);
}
.hero::before {
  /* subtle court line decoration */
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 600px at 90% 10%, rgba(29,78,216,.32), transparent 60%),
    radial-gradient(700px 500px at 10% 100%, rgba(96,165,250,.18), transparent 60%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(transparent 95%, rgba(255,255,255,.06) 95%),
    linear-gradient(90deg, transparent 95%, rgba(255,255,255,.06) 95%);
  background-size: 60px 60px;
  pointer-events: none;
  opacity: .35;
}
.hero__inner {
  position: relative; z-index: 1;
  max-width: 900px;
}
.hero__eyebrow {
  display: inline-block;
  padding: .4rem .8rem;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700; margin-bottom: 1.5rem;
}
.hero h1 { color: #fff; }
/* Royal blue (--brand) only hits ~2.4:1 on the dark hero — below the 3:1 AA
   floor for large text. The lighter palette blue reads cleanly (~6:1) and
   matches the light blue in the logo. --brand stays the accent on light
   backgrounds, where it has plenty of contrast. */
.hero h1 .accent { color: var(--accent); }
.hero p.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: rgba(255,255,255,.78);
  max-width: 640px; margin: 1.2rem 0 2rem;
}
.hero__actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* On narrow screens the headline spans the full width, so a left-weighted
   gradient can't protect it — use an even, stronger scrim instead. */
@media (max-width: 900px) {
  .hero {
    background:
      linear-gradient(rgba(8,9,11,.86), rgba(8,9,11,.74)),
      url("../img/home-hero.jpg") center / cover no-repeat,
      var(--ink);
  }
}

/* Page header (smaller hero for inner pages) */
.page-header {
  background: var(--ink); color: #fff;
  padding: clamp(3rem, 7vw, 5rem) 0;
  position: relative; overflow: hidden;
}
.page-header::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(800px 400px at 100% 0%, rgba(29,78,216,.28), transparent 60%);
  pointer-events: none;
}
.page-header__inner { position: relative; z-index: 1; max-width: 800px; }
.page-header h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.4rem); }
.page-header p { color: rgba(255,255,255,.72); font-size: 1.1rem; margin: 0; }
.crumbs { color: rgba(255,255,255,.6); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1rem; }
.crumbs a { color: rgba(255,255,255,.6); }
.crumbs a:hover { color: #fff; }

/* -------- Sections -------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--alt { background: var(--paper); }
.section--dark { background: var(--ink); color: #fff; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: rgba(255,255,255,.72); }

.section__head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.section__head--left { margin-left: 0; text-align: left; }
.section__head p { font-size: 1.1rem; }

/* -------- Stats -------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  background: #fff;
  padding: 2rem 1.5rem;
  text-align: center;
}
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--brand);
  line-height: 1; letter-spacing: -.02em;
  margin-bottom: .35rem;
}
.stat__label {
  text-transform: uppercase; letter-spacing: .12em;
  font-size: .78rem; color: var(--slate); font-weight: 700;
}
@media (max-width: 800px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* -------- Program / Card grid -------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid, .grid--2, .grid--4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid, .grid--2, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), border-color .2s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.card__media {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #1a1d22, #2a2f37);
  position: relative; overflow: hidden;
  display: grid; place-items: center;
  color: rgba(255,255,255,.5);
}
.card__media--red { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: rgba(255,255,255,.85); }
.card__media--accent { background: linear-gradient(135deg, var(--brand), var(--accent)); color: rgba(255,255,255,.9); }
.card__media svg { width: 56px; height: 56px; opacity: .9; }
.card__media--photo { display: block; }
.card__media--photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.card:hover .card__media--photo img { transform: scale(1.04); }
.card__badge {
  position: absolute; top: 14px; left: 14px;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .35rem .65rem; border-radius: 999px;
  backdrop-filter: blur(6px);
}
.card__body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.card__title { margin: 0 0 .5rem; font-size: 1.15rem; }
.card__meta { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .75rem; font-weight: 600; }
.card__desc { font-size: .95rem; color: var(--slate); flex: 1; }
.card__actions { display: flex; gap: .6rem; margin-top: 1.2rem; flex-wrap: wrap; }

/* -------- Feature row -------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } }
.feature__icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center;
  margin-bottom: 1rem;
}
.feature__icon svg { width: 24px; height: 24px; }
.feature h3 { margin-bottom: .5rem; }
.feature p { font-size: .98rem; }

/* -------- Split / About -------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.split__media {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--ink), #2a2f37);
  position: relative; overflow: hidden;
  display: grid; place-items: center;
  color: rgba(255,255,255,.65);
}
.split__media::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(400px 240px at 80% 20%, rgba(29,78,216,.35), transparent 65%),
    radial-gradient(280px 180px at 20% 90%, rgba(96,165,250,.2), transparent 65%);
}
.split__media svg { position: relative; z-index: 1; width: 96px; height: 96px; }
/* Portrait media (e.g. the League ID card) — capped and centred in its column
   so a tall image doesn't dwarf the text beside it. */
.split__media--portrait {
  aspect-ratio: 3 / 4;
  max-width: 420px;
  margin-inline: auto;
}
.split__media--photo { background: var(--ink); }
.split__media--photo::before { display: none; }
.split__media--photo img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }

/* -------- Schedule -------- */
.schedule {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
@media (max-width: 700px) { .schedule { grid-template-columns: 1fr; } }
.schedule__item {
  background: #fff;
  padding: 1.1rem 1.4rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.schedule__date {
  font-weight: 700; color: var(--ink);
}
.schedule__date small {
  display: block; font-weight: 600; color: var(--muted);
  font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
}

/* -------- Gallery -------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 800px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .gallery { grid-template-columns: 1fr; } }
.gallery__item {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(135deg, #1a1d22, #2a2f37);
  display: grid; place-items: center;
  color: rgba(255,255,255,.4);
  position: relative;
  cursor: pointer;
  transition: transform .25s var(--ease);
}
.gallery__item:hover { transform: scale(1.02); }
.gallery__item img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery__item::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,.6), transparent 50%);
}
.gallery__item span { z-index: 2; }
.gallery__item.red { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); }
.gallery__item.gold { background: linear-gradient(135deg, var(--brand), var(--accent)); }
.gallery__item.white {
  background: #ffffff;
  color: var(--brand);
  border: 1px solid var(--line);
}
.gallery__item.white span { color: var(--brand); }
.gallery__item.tall { aspect-ratio: 3 / 4; }
.gallery__item span {
  position: absolute; bottom: 14px; left: 14px;
  font-size: .8rem; font-weight: 700;
  color: rgba(255,255,255,.85); letter-spacing: .1em;
  text-transform: uppercase;
}

/* -------- CTA strip -------- */
.cta-strip {
  background: var(--brand);
  color: #fff;
  padding: 3rem 0;
}
.cta-strip__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.cta-strip h2 { color: #fff; margin: 0; max-width: 700px; }
.cta-strip .btn--ghost-light { border-color: #fff; }

/* -------- Contact -------- */
.contact {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.form {
  display: grid;
  gap: 1rem;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }
.form label {
  display: block;
  font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 700; color: var(--charcoal); margin-bottom: .4rem;
}
.form input, .form textarea, .form select {
  width: 100%;
  padding: .85rem 1rem;
  font: inherit;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(29,78,216,.15);
}
.form textarea { resize: vertical; min-height: 140px; }

.info-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
}
.info-card h3 { margin-top: 0; }
.info-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.info-list li { display: flex; gap: .85rem; align-items: flex-start; font-size: .98rem; color: var(--slate); }
.info-list svg { flex: 0 0 22px; width: 22px; height: 22px; color: var(--brand); margin-top: 2px; }
.info-list a { color: var(--ink); font-weight: 600; }

/* Form alert */
.form-alert {
  display: none;
  background: var(--brand-soft);
  border: 1px solid var(--brand);
  color: var(--brand-dark);
  border-radius: var(--radius-sm);
  padding: .9rem 1rem;
  font-weight: 600;
  font-size: .9rem;
}
.form-alert.is-visible { display: block; }

/* -------- Footer -------- */
.footer {
  background: var(--ink); color: #fff;
  padding: 4rem 0 2rem;
}
.footer a { color: rgba(255,255,255,.72); }
.footer a:hover { color: var(--brand); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
@media (max-width: 800px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__brand { font-weight: 900; font-size: 1.2rem; letter-spacing: -.02em; color: #fff; margin-bottom: 1rem; display: inline-flex; align-items: center; gap: .6rem; }
.footer p { color: rgba(255,255,255,.62); font-size: .92rem; }
.footer h4 {
  color: #fff; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .15em;
  margin: 0 0 1rem;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer ul a { font-size: .95rem; }
.socials { display: flex; gap: .75rem; margin-top: 1.25rem; }
.socials a {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.socials a:hover { background: var(--brand); border-color: var(--brand); }
.socials svg { width: 16px; height: 16px; }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 1.5rem;
  font-size: .85rem;
  color: rgba(255,255,255,.5);
  flex-wrap: wrap; gap: 1rem;
}

/* -------- Utility -------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* Honor reduced-motion: no transforms, no hover lift */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .gallery__item:hover { transform: none; }
}

/* Visible keyboard focus for all interactive elements */
a:focus-visible, button:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* =========================================================
   EVENTS — calendar + list views (assets/js/events.js)
   ========================================================= */
.events-loading { padding: 3rem 0; text-align: center; color: var(--muted); font-weight: 600; }
.events-empty {
  padding: 3rem 1.5rem; text-align: center;
  background: var(--paper); border: 1px dashed var(--line);
  border-radius: var(--radius); color: var(--slate);
}
.events-empty p { margin: 0; }

/* Controls bar */
.events-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem;
}
.events-filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip {
  --chip-color: var(--brand);
  background: #fff; color: var(--charcoal);
  border: 1.5px solid var(--line);
  padding: .5rem .9rem; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: .85rem;
  cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.chip:hover { border-color: var(--chip-color); color: var(--chip-color); }
.chip.is-active {
  background: var(--chip-color); border-color: var(--chip-color); color: #fff;
}

.events-toggle {
  display: inline-flex; background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 999px; padding: 3px;
}
.events-toggle__btn {
  background: transparent; border: 0; cursor: pointer;
  font: inherit; font-weight: 700; font-size: .85rem; color: var(--slate);
  padding: .45rem 1rem; border-radius: 999px;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.events-toggle__btn.is-active { background: var(--brand); color: #fff; }

/* List view */
.events-list { display: grid; gap: 1rem; }
.event-card {
  --league-color: var(--brand);
  display: grid; grid-template-columns: 84px 1fr; gap: 1.25rem;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem;
  transition: box-shadow .25s var(--ease), border-color .2s var(--ease);
}
.event-card:hover { box-shadow: var(--shadow-md); border-color: transparent; }
.event-card__date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--paper); border-radius: var(--radius-sm);
  border-top: 4px solid var(--league-color);
  padding: .75rem .5rem; text-align: center;
}
.event-card__dow { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.event-card__day { font-size: 1.9rem; font-weight: 900; line-height: 1; color: var(--ink); letter-spacing: -.02em; }
.event-card__mon { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); }
.event-card__body { min-width: 0; }
.event-card__tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .6rem; }
.event-tag {
  --tag-color: var(--slate);
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--tag-color); background: color-mix(in srgb, var(--tag-color) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--tag-color) 30%, #fff);
  padding: .2rem .55rem; border-radius: 999px;
}
.event-card__title { margin: 0 0 .5rem; font-size: 1.2rem; }
.event-card__meta { display: flex; gap: 1.2rem; flex-wrap: wrap; margin: 0 0 .6rem; }
.event-card__metabit { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; color: var(--slate); font-weight: 600; }
.event-card__metabit svg { width: 16px; height: 16px; color: var(--brand); flex: 0 0 16px; }
.event-card__desc { font-size: .95rem; margin: 0 0 1rem; }
.event-card__actions { margin-top: .25rem; }
@media (max-width: 520px) {
  .event-card { grid-template-columns: 64px 1fr; gap: 1rem; padding: 1rem; }
  .event-card__day { font-size: 1.5rem; }
}

/* Calendar view */
.events-cal__head {
  display: flex; align-items: center; justify-content: center; gap: 1.5rem;
  margin-bottom: 1.25rem;
}
.events-cal__title { margin: 0; font-size: 1.4rem; min-width: 12ch; text-align: center; }
.events-cal__nav {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff; cursor: pointer;
  font-size: 1.4rem; line-height: 1; color: var(--ink);
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.events-cal__nav:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.events-cal__grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.events-cal__dow {
  background: var(--ink); color: rgba(255,255,255,.85);
  text-align: center; padding: .6rem 0;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.events-cal__cell {
  background: #fff; min-height: 104px; padding: .5rem;
  display: flex; flex-direction: column; gap: .3rem;
}
.events-cal__cell.is-empty { background: var(--paper); }
.events-cal__cell.is-today { background: var(--brand-soft); }
.events-cal__num { font-size: .8rem; font-weight: 700; color: var(--slate); }
.events-cal__cell.is-today .events-cal__num { color: var(--brand-dark); }
.events-cal__pills { display: flex; flex-direction: column; gap: .25rem; }
.events-cal__pill {
  --league-color: var(--brand);
  display: block; font-size: .72rem; font-weight: 700; line-height: 1.25;
  color: #fff; background: var(--league-color);
  padding: .2rem .4rem; border-radius: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.events-cal__pill:hover { color: #fff; filter: brightness(1.08); }
.events-cal__legend {
  display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center;
  margin-top: 1.25rem;
}
.events-cal__legend-item {
  --league-color: var(--brand);
  font-size: .82rem; font-weight: 600; color: var(--slate);
  display: inline-flex; align-items: center; gap: .45rem;
}
.events-cal__legend-item::before {
  content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--league-color);
}
@media (max-width: 640px) {
  .events-cal__cell { min-height: 72px; padding: .3rem; }
  .events-cal__pill { font-size: 0; padding: 0; height: 6px; border-radius: 3px; }
  .events-cal__dow { font-size: .6rem; }
}

/* Form alert error variant */
.form-alert--error {
  background: #fef2f2; border-color: #dc2626; color: #991b1b;
}

/* -------- Cards / List view switch (Programs: leagues & tournaments) --------
   Both views share one set of markup. Cards is the default grid; .is-list
   re-lays each card into a scannable row: date | title | actions. */
.view-switch { display: flex; justify-content: center; margin: -1rem 0 2rem; }
.view-toggle {
  display: inline-flex; gap: 2px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 999px; padding: 3px;
}
.view-toggle button {
  display: inline-flex; align-items: center; gap: .45rem;
  background: transparent; border: 0; cursor: pointer;
  font: inherit; font-weight: 700; font-size: .85rem; color: var(--slate);
  padding: .5rem 1.1rem; border-radius: 999px;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.view-toggle button svg { width: 15px; height: 15px; }
.view-toggle button:hover { color: var(--brand); }
.view-toggle button.is-active { background: var(--brand); color: #fff; }
.view-toggle button.is-active:hover { color: #fff; }

/* List view */
.grid.is-list { grid-template-columns: 1fr; gap: .7rem; }
.grid.is-list .card:hover { transform: none; }
.grid.is-list .card__body {
  display: grid;
  /* 225px keeps "Tournament · Aug 29 & 30, 2026" on one line */
  grid-template-columns: 225px minmax(0, 1fr) auto;
  align-items: center;
  gap: .3rem 1.5rem;
  padding: 1.15rem 1.4rem;
}
/* Date and buttons sit centred against however many rows the middle column has */
/* Slightly tighter than the card view so the longest label
   ("Tournament · Aug 29 & 30, 2026") stays on one line and rows keep an
   even height down the list. */
.grid.is-list .card__meta {
  grid-column: 1; grid-row: 1 / -1; margin: 0;
  font-size: .74rem; letter-spacing: .05em;
}
.grid.is-list .card__title   { grid-column: 2; margin: 0; font-size: 1.05rem; }
.grid.is-list .note          { grid-column: 2; margin: 0; }
.grid.is-list .card__actions { grid-column: 3; grid-row: 1 / -1; margin: 0; flex-wrap: nowrap; }
.grid.is-list .card__desc    { display: none; }  /* too long to scan in a row */

@media (max-width: 760px) {
  .grid.is-list .card__body { grid-template-columns: 1fr; gap: .5rem; }
  .grid.is-list .card__meta,
  .grid.is-list .card__title,
  .grid.is-list .note,
  .grid.is-list .card__actions { grid-column: 1; grid-row: auto; }
  .grid.is-list .card__actions { margin-top: .6rem; flex-wrap: wrap; }
}

/* Disabled / coming-soon buttons (registration links pending) */
.btn.is-disabled {
  background: var(--paper); color: var(--muted);
  border-color: var(--line); cursor: not-allowed; pointer-events: none;
}
.btn.is-disabled:hover { transform: none; }
.note {
  font-size: .82rem; color: var(--muted); font-style: italic; margin: .5rem 0 0;
}
.card__meta--gold { color: #b45309; }

/* Screen-reader-only text */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Bigger CTA */
.btn--lg { padding: 1.05rem 2rem; font-size: 1.05rem; }

/* -------- Registration cards (open SketchPlay tournaments) -------- */
.reg-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
  align-items: stretch;
}
@media (max-width: 980px) { .reg-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 660px) { .reg-grid { grid-template-columns: 1fr; } }

.reg-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid rgba(16, 24, 40, .07);
  border-radius: 16px;
  padding: 1.75rem 1.6rem 1.6rem;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, .04),
    0 8px 24px -8px rgba(16, 24, 40, .10);
  transition: box-shadow .3s var(--ease), transform .25s var(--ease), border-color .3s var(--ease);
}
.reg-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 24, 40, .10);
  box-shadow:
    0 2px 4px rgba(16, 24, 40, .05),
    0 20px 44px -12px rgba(16, 24, 40, .20);
}

/* Status: a quiet dot + label, not a loud chip */
.reg-card__status {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #047857; margin-bottom: 1rem;
}
.reg-card__status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .16);
}

.reg-card__title {
  margin: 0 0 .4rem; font-size: 1.3rem; letter-spacing: -.02em; line-height: 1.25;
}
.reg-card__dates {
  margin: 0 0 1.25rem; font-size: .92rem; font-weight: 600; color: var(--slate);
}

.reg-card__meta {
  list-style: none; padding: 1.25rem 0 0; margin: 0 0 1.5rem;
  border-top: 1px solid rgba(16, 24, 40, .07);
  display: grid; gap: .8rem; flex: 1;
}
.reg-card__meta li {
  display: flex; gap: .65rem; align-items: flex-start;
  font-size: .88rem; color: var(--slate); line-height: 1.5;
}
.reg-card__meta svg {
  flex: 0 0 16px; width: 16px; height: 16px; margin-top: 3px;
  color: var(--muted); stroke-width: 1.75;
}
.reg-card__meta strong { color: var(--ink); font-weight: 700; }
.reg-card__cta { justify-content: center; width: 100%; }

/* -------- Donate: single Givebutter hand-off card -------- */
.give-card {
  max-width: 720px; margin: 0 auto; text-align: center;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(2rem, 5vw, 3.25rem) 1.75rem;
  box-shadow: var(--shadow-sm);
}
.give-card h2 { margin-bottom: .75rem; }
.give-card p { max-width: 54ch; margin-left: auto; margin-right: auto; }
.give-card .btn { margin-top: 1rem; }

/* Embedded third-party forms (store widget) */
/* Full container width — the store grid needs every pixel it can get.
   .container already caps at --container (1200px) and handles the gutter,
   so this tracks the viewport down to mobile without its own breakpoints. */
.embed-frame {
  width: 100%; margin: 0 auto;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; overflow: hidden;
}
.embed-frame.is-embedded { padding: 0; }
.embed-frame iframe { display: block; width: 100%; border: 0; }
.embed-fallback { padding: 2.5rem 1.5rem; text-align: center; }
.embed-fallback h3 { margin-top: 0; }
.embed-fallback p { max-width: 52ch; margin-left: auto; margin-right: auto; }
.embed-fallback .btn { margin-top: .5rem; }

/* FAQ accordion */
.faq { max-width: 800px; margin: 0 auto; display: grid; gap: .75rem; }
.faq__item {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow: hidden;
}
.faq__item summary {
  list-style: none; cursor: pointer;
  padding: 1.1rem 1.4rem; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; font-size: 1.4rem; font-weight: 700; color: var(--brand);
  transition: transform .2s var(--ease); line-height: 1;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item summary:hover { color: var(--brand); }
.faq__body { padding: 0 1.4rem 1.2rem; }
.faq__body p { margin: 0; color: var(--slate); }

/* Upcoming-events teaser (home) */
.events-teaser { display: grid; gap: .75rem; max-width: 760px; margin: 0 auto; }
.teaser-event {
  --league-color: var(--brand);
  display: flex; align-items: center; gap: 1rem;
  background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--league-color);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem;
  transition: box-shadow .2s var(--ease), transform .15s var(--ease);
}
.teaser-event:hover { box-shadow: var(--shadow-sm); transform: translateX(2px); color: inherit; }
.teaser-event__date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 48px; line-height: 1;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; color: var(--league-color);
}
.teaser-event__date strong { font-size: 1.5rem; color: var(--ink); }
.teaser-event__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.teaser-event__title { font-weight: 700; color: var(--ink); }
.teaser-event__meta { font-size: .85rem; color: var(--slate); }
.teaser-event__arrow { color: var(--brand); font-weight: 700; font-size: 1.2rem; flex: 0 0 auto; }

/* Partners — centred logo cards; wraps as more are added */
.partners {
  display: flex; justify-content: center; align-items: stretch;
  gap: 1.25rem; flex-wrap: wrap;
}
.partner {
  display: grid; place-items: center;
  min-width: 260px; padding: 2.25rem 3rem;
  background: #fff;
  border: 1px solid rgba(16, 24, 40, .08);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -10px rgba(16, 24, 40, .10);
  transition: box-shadow .3s var(--ease), transform .25s var(--ease);
}
.partner:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(16, 24, 40, .05), 0 18px 36px -12px rgba(16, 24, 40, .18);
}
/* Logos are supplied as flat black artwork — soften them slightly so they sit
   with the page rather than shouting, and bring them up full on hover. */
.partner img { height: 30px; width: auto; opacity: .78; transition: opacity .25s var(--ease); }
.partner:hover img { opacity: 1; }
@media (max-width: 480px) {
  .partner { min-width: 0; width: 100%; padding: 1.75rem 1.5rem; }
}
