/* ===========================
   AthLeaders — Styles
   Mobile-first, soccer-inspired palette
=========================== */

:root {
  /* Palette */
  --green-dark: #0b5d3b;
  --green: #16814f;
  --green-bright: #2fa86a;
  --blue-dark: #0d3b66;
  --blue: #1467a6;
  --blue-bright: #2e94d1;
  --white: #ffffff;
  --off-white: #f4f9f6;
  --gray-100: #eef2f0;
  --gray-300: #cbd6d2;
  --gray-600: #52625b;
  --gray-800: #263630;
  --text: #1c2b24;

  /* Santa Barbara accents: sun, sand, coastline */
  --gold: #e8a33d;
  --gold-dark: #c4801f;
  --sand: #fbf3e3;

  --font-heading: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --radius: 14px;
  --shadow-sm: 0 2px 8px rgba(13, 59, 102, 0.08);
  --shadow-md: 0 8px 24px rgba(13, 59, 102, 0.12);
  --container-width: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--blue-dark);
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--blue);
}

img, svg {
  max-width: 100%;
  display: block;
}

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

.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;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--blue-dark);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

/* Focus visibility for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--blue-bright);
  outline-offset: 2px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--green-bright);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--green);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-large {
  padding: 0.9rem 2.1rem;
  font-size: 1.05rem;
}

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-100);
}

.navbar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--blue-dark);
  text-decoration: none;
}

.logo-badge {
  color: var(--green);
  display: inline-flex;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 501;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blue-dark);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger::before {
  transform: translateY(-7px);
}

.hamburger::after {
  transform: translateY(5px);
}

.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  transform: translateY(0) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  transform: translateY(0) rotate(-45deg);
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  position: fixed;
  top: 64px;
  right: 0;
  left: 0;
  background: var(--white);
  flex-direction: column;
  gap: 0;
  box-shadow: var(--shadow-md);
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-links.is-open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-links li {
  border-bottom: 1px solid var(--gray-100);
}

.nav-links a {
  display: block;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

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

.nav-cta {
  color: var(--white) !important;
  background: var(--green-bright);
  margin: 0.75rem 1.25rem;
  border-radius: 999px;
  text-align: center;
  font-weight: 600 !important;
}

@media (min-width: 860px) {
  .nav-toggle {
    display: none;
  }

  .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
    box-shadow: none;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    background: transparent;
  }

  .nav-links li {
    border-bottom: none;
  }

  .nav-links a {
    padding: 0.5rem 0.55rem;
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .nav-cta {
    margin: 0 0 0 0.5rem;
    padding: 0.55rem 1.1rem;
    white-space: nowrap;
  }
}

@media (min-width: 1180px) {
  .nav-links a {
    padding: 0.5rem 0.85rem;
    font-size: 0.95rem;
  }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  background:
    radial-gradient(circle at 50% 120%, rgba(255, 255, 255, 0.12) 0%, transparent 55%),
    linear-gradient(135deg, var(--green-dark), var(--blue-dark) 100%);
  color: var(--white);
  padding: 5rem 0 6rem;
  text-align: center;
  overflow: hidden;
}

/* Faint soccer center-circle + kickoff mark, purely decorative */
.hero::before {
  content: '';
  position: absolute;
  top: 8%;
  left: 50%;
  width: min(70vw, 640px);
  aspect-ratio: 1 / 1;
  transform: translateX(-50%);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  margin-bottom: 1.25rem;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.4em;
}

.hero-tagline {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 600;
  color: var(--white);
  max-width: 34ch;
}

.hero-sub {
  max-width: 52ch;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 1.25rem;
}

.hero-region {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 2rem;
}

.hero-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 90px;
  display: block;
}

/* ===== Sections ===== */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--off-white);
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  text-align: center;
}

.section-lead {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 2.5rem;
  color: var(--gray-600);
  font-size: 1.05rem;
}

/* ===== Hours Callout ===== */
.hours-callout {
  padding: 3.5rem 0;
  position: relative;
  background:
    repeating-linear-gradient(
      90deg,
      var(--off-white) 0,
      var(--off-white) 64px,
      rgba(22, 129, 79, 0.035) 64px,
      rgba(22, 129, 79, 0.035) 128px
    );
}

.callout-card {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--gold);
}

.callout-card h2 {
  color: var(--white);
}

.callout-icon {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.hours-placeholder {
  font-size: 1.1rem;
  margin-top: 1.5rem;
}

.hours-note {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0;
}

.placeholder-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  border: 1px dashed rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
  margin-top: 0.4rem;
}

/* Placeholder tag variant on light backgrounds */
.stat-card .placeholder-tag,
.benefit-card .placeholder-tag,
.accordion-panel .placeholder-tag,
.footer-contact .placeholder-tag {
  background: rgba(20, 103, 166, 0.08);
  border: 1px dashed var(--blue);
  color: var(--blue-dark);
}

/* Estimate tag: a researched-but-unverified figure, distinct from a blank placeholder */
.estimate-tag {
  display: inline-block;
  background: rgba(232, 163, 61, 0.15);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-dark);
  margin-top: 0.4rem;
}

.callout-card .estimate-tag {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--white);
}

/* ===== Stat Cards ===== */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

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

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

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 0.35rem;
}

.stat-label {
  font-size: 0.92rem;
  color: var(--gray-600);
  margin-bottom: 0.6rem;
}

.matters-copy {
  max-width: 70ch;
  margin: 0 auto;
  text-align: center;
  color: var(--gray-800);
}

/* ===== Benefit Cards (Why Referee) ===== */
.benefit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

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

.benefit-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--blue-bright);
}

.benefit-icon {
  font-size: 2rem;
  margin-bottom: 0.6rem;
}

.benefit-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.benefit-card p {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

/* ===== Sign-up Checklist Progress ===== */
.checklist-progress {
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.checklist-progress-bar {
  height: 10px;
  background: var(--gray-100);
  border-radius: 999px;
  overflow: hidden;
}

.checklist-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green-bright), var(--gold));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.checklist-progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.checklist-reset {
  background: none;
  border: none;
  color: var(--blue);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  padding: 0;
}

.checklist-reset:hover {
  color: var(--blue-dark);
}

.checklist-complete {
  max-width: 720px;
  margin: -1rem auto 2rem;
  padding: 1rem 1.25rem;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--green-dark);
  background: linear-gradient(135deg, rgba(47, 168, 106, 0.15), rgba(232, 163, 61, 0.15));
  border: 1px solid var(--green-bright);
  border-radius: var(--radius);
  animation: complete-pop 0.4s ease;
}

.checklist-complete[hidden] {
  display: none;
}

@keyframes complete-pop {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(6px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

@media (prefers-reduced-motion: reduce) {
  .checklist-complete {
    animation: none;
  }
}

/* ===== Steps (How to Sign Up) ===== */
.steps-list {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.step-item:has(.step-checkbox:checked) {
  border-color: var(--green-bright);
  background: var(--off-white);
}

.step-checkbox {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 0.9rem;
  accent-color: var(--green);
  cursor: pointer;
}

.step-body {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  cursor: pointer;
  flex: 1;
}

.step-number {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  transition: background 0.15s ease;
}

.step-item.is-done .step-number {
  background: var(--gray-300);
}

.step-item.is-done .step-text h3 {
  text-decoration: line-through;
  color: var(--gray-600);
}

.step-item.is-done .step-text p {
  opacity: 0.7;
}

.step-text {
  min-width: 0;
}

.step-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  transition: color 0.15s ease;
}

.step-body p {
  color: var(--gray-600);
  margin-bottom: 0;
}

.signup-cta {
  text-align: center;
}

/* ===== Key Dates ===== */
.dates-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto 1.75rem;
}

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

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

.date-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.date-card-featured {
  border: 2px solid var(--gold);
  background: linear-gradient(135deg, rgba(232, 163, 61, 0.08), var(--white));
}

.date-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--green-dark);
  background: rgba(22, 129, 79, 0.1);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  margin-bottom: 0.75rem;
}

.date-card-featured .date-badge {
  color: var(--gold-dark);
  background: rgba(232, 163, 61, 0.18);
}

.date-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.date-card p {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.dates-note {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto;
  font-size: 0.9rem;
  color: var(--gray-600);
}

/* ===== Resources ===== */
.resource-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

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

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

.resource-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.resource-card:hover,
.resource-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--green-bright);
}

.resource-icon {
  font-size: 1.6rem;
}

.resource-title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--blue-dark);
}

.resource-desc {
  font-size: 0.9rem;
  color: var(--gray-600);
}

/* ===== FAQ Accordion ===== */
.accordion {
  max-width: 760px;
  margin: 0 auto;
}

.accordion-item {
  border-bottom: 1px solid var(--gray-100);
}

.accordion-item h3 {
  margin: 0;
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: none;
  border: none;
  text-align: left;
  padding: 1.15rem 0.25rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--blue-dark);
  cursor: pointer;
}

.accordion-icon {
  flex-shrink: 0;
  font-size: 1.4rem;
  color: var(--green);
  transition: transform 0.2s ease;
}

.accordion-trigger[aria-expanded="true"] .accordion-icon {
  transform: rotate(45deg);
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  padding: 0 0.25rem;
}

.accordion-panel p {
  color: var(--gray-600);
  margin-bottom: 1rem;
}

.accordion-item.is-open .accordion-panel {
  max-height: 320px;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--blue-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 3rem 0 2rem;
}

.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--white);
}

.footer-brand .logo-badge {
  color: var(--green-bright);
}

.footer-region {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.footer-contact .placeholder-tag {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
}

.footer-copy {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* ===== Scroll-in animation ===== */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .animate-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
