/* ============================================
   TEAM SUNSHINE — Main Stylesheet
   ============================================ */

/* --- CSS Variables / Brand Tokens --- */
:root {
  /* Brand blue — from logo tire/banner */
  --blue: #1A8FCE;
  --blue-dark: #146FA3;
  --blue-deep: #0E4F75;
  --blue-pale: #E6F3FB;

  /* Brand gold — from logo sunshine */
  --sun-gold: #F5A623;
  --sun-bright: #F9DA02;
  --sun-pale: #FFF8E1;
  --sun-deep: #D4900E;

  /* Accessible text on gold buttons */
  --btn-text: #0D5F8F;

  /* Neutrals */
  --ink: #1A2332;
  --slate: #3D4F5F;
  --gray: #6B7280;
  --silver: #D1D5DB;
  --cloud: #F3F4F6;
  --white: #FFFFFF;

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', 'Segoe UI', sans-serif;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-xxl: 6rem;

  /* Layout */
  --max-width: 1100px;
  --nav-height: 72px;
  --radius: 8px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--blue-dark);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.25;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

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

.section {
  padding: var(--space-xl) 0;
}

.section--tinted {
  background: var(--blue-pale);
}

.section--dark {
  background: var(--ink);
  color: var(--white);
}
.section--dark h2,
.section--dark h3 {
  color: var(--sun-gold);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Header / Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--blue-deep);
  border-bottom: 3px solid var(--sun-gold);
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
}

.site-logo img {
  height: 48px;
  width: auto;
}

.site-logo span {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--white);
}

/* Desktop nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
}

.main-nav a {
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  padding: var(--space-xs) 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--white);
  border-bottom-color: var(--sun-gold);
}

.nav-donate {
  display: inline-block;
  background: var(--sun-gold);
  color: var(--btn-text) !important;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.nav-donate:hover {
  background: var(--sun-deep);
  color: var(--btn-text) !important;
  transform: translateY(-1px);
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* --- Hero Banner --- */
.hero {
  background: linear-gradient(135deg, var(--blue-pale) 0%, var(--white) 60%);
  padding: var(--space-xxl) 0 var(--space-xl);
  text-align: center;
}

.hero h1 {
  margin-bottom: var(--space-sm);
  color: var(--ink);
}

.hero h1 em {
  color: var(--sun-deep);
  font-style: normal;
}

.hero .tagline {
  font-size: 1.2rem;
  color: var(--slate);
  max-width: 650px;
  margin: 0 auto var(--space-lg);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--sun-gold);
  color: var(--btn-text);
}
.btn-primary:hover {
  background: var(--sun-deep);
  color: var(--btn-text);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--sun-deep);
  border: 2px solid var(--sun-gold);
}
.btn-outline:hover {
  background: var(--sun-gold);
  color: var(--btn-text);
}

.btn-sky {
  background: var(--blue);
  color: var(--white);
}
.btn-sky:hover {
  background: var(--blue-dark);
  color: var(--white);
  transform: translateY(-1px);
}

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-body {
  padding: var(--space-md);
}

.card-body h3 {
  margin-bottom: var(--space-xs);
}

.card-body p {
  color: var(--gray);
}

/* --- Event Cards --- */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.event-card {
  display: flex;
  flex-direction: column;
}

.event-card .card-img {
  height: 180px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cloud);
  padding: var(--space-md);
}

.event-card .card-img img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

.event-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.event-card .card-body .btn {
  margin-top: auto;
  align-self: flex-start;
}

.event-date {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-dark);
  background: var(--blue-pale);
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  margin-bottom: var(--space-xs);
}

/* --- Photo Carousel --- */
.carousel-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 667px;
  margin: 0 auto;
}

.carousel-wrapper--wide {
  max-width: 750px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.carousel-wrapper--wide .carousel-slide img {
  aspect-ratio: 3 / 2;
}

.carousel-slide figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: var(--white);
  font-size: 0.9rem;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.carousel-btn:hover {
  background: var(--sun-gold);
  color: var(--white);
}
.carousel-btn--prev { left: 12px; }
.carousel-btn--next { right: 12px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: var(--space-sm) 0;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--silver);
  cursor: pointer;
  transition: background 0.2s;
}
.carousel-dot.active {
  background: var(--sun-gold);
}

/* --- Zeffy Embed Containers --- */
.zeffy-embed {
  width: 100%;
  max-width: 600px;
  margin: var(--space-md) auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--cloud);
}

.zeffy-embed iframe {
  border: 0;
  width: 100%;
}

/* Placeholder shown until you paste Zeffy code */
.zeffy-placeholder {
  padding: var(--space-lg);
  text-align: center;
  color: var(--gray);
  font-style: italic;
  border: 2px dashed var(--silver);
  border-radius: var(--radius-lg);
}

/* --- Stats Bar --- */
.stats-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--blue);
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--gray);
  margin-top: 0.25rem;
}

/* --- Footer --- */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-brand p {
  max-width: 320px;
  font-size: 0.9rem;
  margin-top: var(--space-xs);
}

.footer-nav h4,
.footer-donate h4 {
  color: var(--sun-bright);
  margin-bottom: var(--space-sm);
  font-size: 1rem;
}

.footer-nav ul {
  list-style: none;
}

.footer-nav a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  line-height: 2;
}
.footer-nav a:hover {
  color: var(--sun-bright);
}

.footer-tax {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-top: var(--space-xs);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.footer-bottom a {
  color: rgba(255,255,255,0.5);
}
.footer-bottom a:hover {
  color: var(--sun-bright);
}

/* --- Disclaimer (Events page) --- */
.disclaimer {
  font-size: 0.8rem;
  color: var(--gray);
  border-top: 1px solid var(--silver);
  padding-top: var(--space-md);
  margin-top: var(--space-lg);
}

/* --- About Page: Origin Story --- */
.origin-story {
  max-width: 750px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
}

.origin-story strong {
  color: var(--blue);
}

/* --- Sponsors Page --- */
.sponsor-tier {
  margin-bottom: var(--space-xl);
}

.sponsor-tier h3 {
  border-bottom: 3px solid var(--sun-gold);
  display: inline-block;
  padding-bottom: 0.25rem;
  margin-bottom: var(--space-md);
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
}

.sponsor-card {
  background: var(--white);
  border: 1px solid var(--silver);
  border-radius: var(--radius);
  padding: var(--space-md);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sponsor-card:hover {
  border-color: var(--sun-gold);
  box-shadow: var(--shadow-md);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.5rem; }

  .hero {
    padding: var(--space-xl) 0 var(--space-lg);
  }

  .carousel-slide img {
    /* aspect-ratio: 4/3 from base rule handles all sizes */
  }

  /* Mobile nav */
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: var(--nav-height);
    right: 0;
    bottom: 0;
    width: 280px;
    flex-direction: column;
    background: var(--blue-deep);
    padding: var(--space-lg) var(--space-md);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 99;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .main-nav a {
    font-size: 1.1rem;
    padding: var(--space-sm) 0;
  }

  .footer-top {
    flex-direction: column;
  }

  .stats-bar {
    gap: var(--space-md);
  }

  .stat-number {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .events-grid {
    grid-template-columns: 1fr;
  }
}
