:root {
  --pink: #ff5c8a;
  --pink-dark: #e8397a;
  --purple: #7b4dff;
  --yellow: #ffd23f;
  --cream: #fff8ef;
  --dark: #2c1a3d;
  --green: #35c98f;
  --shadow: rgba(44, 26, 61, 0.15);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Baloo 2', system-ui, sans-serif;
  background: var(--cream);
  color: var(--dark);
  overflow-x: hidden;
}

h1, h2, h3, .logo, .kicker, .btn {
  font-family: 'Fredoka', system-ui, sans-serif;
}

a { text-decoration: none; color: inherit; }

.btn {
  display: inline-block;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-3px) scale(1.03); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  color: white;
  box-shadow: 0 8px 20px rgba(232, 57, 122, 0.35);
}

.btn-secondary {
  background: var(--yellow);
  color: var(--dark);
  box-shadow: 0 8px 20px rgba(255, 210, 63, 0.4);
}

/* ---------- Confetti ---------- */
.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}
.confetto {
  position: absolute;
  top: -20px;
  font-size: 1.4rem;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(360deg); opacity: 0.9; }
}

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(circle at top left, #ffb6c9 0%, var(--pink) 45%, var(--purple) 100%);
  color: white;
  padding-bottom: 4rem;
  position: relative;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.4rem;
}

.nav-links {
  display: flex;
  gap: 1.3rem;
  flex-wrap: wrap;
}

.nav-links a {
  font-weight: 600;
  opacity: 0.9;
  padding: 0.3rem 0.2rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}
.nav-links a:hover { opacity: 1; border-color: var(--yellow); }

.hero-content {
  max-width: 900px;
  margin: 2rem auto 0;
  text-align: center;
  padding: 0 1.5rem;
}

.kicker {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.4);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.1;
  margin: 0 0 1.2rem;
  text-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.wiggle {
  display: inline-block;
  color: var(--yellow);
  animation: wiggle 1.8s ease-in-out infinite;
}
@keyframes wiggle {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

.hero-sub {
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto 2rem;
  opacity: 0.95;
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-horses {
  font-size: 2.4rem;
  display: flex;
  justify-content: center;
  gap: 1.2rem;
}
.hero-horses span {
  display: inline-block;
  animation: bounce 1.4s ease-in-out infinite;
}
.hero-horses span:nth-child(2) { animation-delay: 0.15s; }
.hero-horses span:nth-child(3) { animation-delay: 0.3s; }
.hero-horses span:nth-child(4) { animation-delay: 0.45s; }
.hero-horses span:nth-child(5) { animation-delay: 0.6s; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

/* ---------- Ticker ---------- */
.ticker {
  background: var(--dark);
  color: var(--yellow);
  overflow: hidden;
  white-space: nowrap;
  padding: 0.7rem 0;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.ticker-track {
  display: inline-flex;
  gap: 3rem;
  padding-left: 100%;
  animation: ticker 28s linear infinite;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ---------- Sections ---------- */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}
.section.alt {
  max-width: none;
  background: linear-gradient(180deg, #fff0f5, #fff8ef);
}
.section.alt > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.section h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--pink-dark);
}

.section-lead {
  text-align: center;
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0 auto 2.5rem;
  opacity: 0.85;
}

.big-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--purple);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
  align-items: stretch;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.card {
  background: white;
  border-radius: 22px;
  padding: 2rem;
  box-shadow: 0 10px 30px var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px var(--shadow);
}

.card-emoji {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 1.2rem;
  background: linear-gradient(160deg, var(--purple), #5a2fd6);
  color: white;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: 'Fredoka', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--yellow);
}
.stat-label {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* ---------- Events ---------- */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 2.5rem;
}
.event-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: white;
  border-radius: 18px;
  padding: 1.2rem 1.6rem;
  box-shadow: 0 8px 24px var(--shadow);
  flex-wrap: wrap;
}
.event-date {
  background: var(--pink);
  color: white;
  font-weight: 700;
  text-align: center;
  border-radius: 14px;
  padding: 0.6rem 1rem;
  line-height: 1.1;
  font-size: 0.85rem;
  min-width: 70px;
}
.event-date span { font-size: 1.4rem; }
.event-info { flex: 1; min-width: 200px; }
.event-info h3 { margin: 0 0 0.2rem; }
.event-info p { margin: 0; opacity: 0.8; }
.tag {
  background: var(--green);
  color: white;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}

/* ---------- Legends ---------- */
.legends-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.legend-card {
  background: linear-gradient(160deg, #fff, #fff0f5);
  border: 2px solid #ffd6e3;
  border-radius: 20px;
  padding: 1.8rem 1.4rem;
  text-align: center;
}
.legend-emoji {
  font-size: 2.6rem;
  margin-bottom: 0.6rem;
}
.legend-card h3 { margin: 0 0 0.5rem; color: var(--pink-dark); }
.legend-card p { margin: 0; font-size: 0.92rem; opacity: 0.85; }

/* ---------- Generator ---------- */
.generator-section {
  text-align: center;
  padding: 4.5rem 1.5rem;
  background: linear-gradient(135deg, var(--purple), #4c2bb0);
  color: white;
}
.generator-section h2 { color: var(--yellow); }
.generator-box {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}
.generated-name {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  background: rgba(255,255,255,0.12);
  border: 2px dashed rgba(255,255,255,0.5);
  border-radius: 18px;
  padding: 1.5rem;
  width: 100%;
  min-height: 1.5em;
}

/* ---------- Join ---------- */
.join-section {
  text-align: center;
}
.join-form {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 560px;
  margin: 0 auto;
}
.join-form input {
  flex: 1;
  min-width: 180px;
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  border: 2px solid #ffd6e3;
  font-family: inherit;
  font-size: 1rem;
}
.join-form input:focus {
  outline: none;
  border-color: var(--pink);
}
.join-note {
  margin-top: 1.2rem;
  font-weight: 700;
  color: var(--green);
  min-height: 1.2em;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark);
  color: white;
  text-align: center;
  padding: 2.5rem 1.5rem;
}
.footer-sub {
  opacity: 0.6;
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .legends-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .grid-3 { grid-template-columns: 1fr; }
  .legends-grid { grid-template-columns: 1fr; }
  .nav-links { justify-content: center; width: 100%; }
}
