/* ==============================================================
   GiverGames v1 -- style.css

   Color tokens:
     --teal:     #13C7B6   primary brand
     --teal-dk:  #0EA99E   hover / pressed teal
     --yellow:   #FFD53E   accent, CTA buttons
     --charcoal: #1F2937   text, dark sections
     --slate:    #4B5563   secondary text
     --cloud:    #F3F4F6   light section backgrounds
     --white:    #FFFFFF

   Fonts:
     Fredoka One   -- display headlines (chunky, rounded, playful)
     Nunito        -- body, labels, buttons (clean, rounded, readable)
   ============================================================== */


/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
ol, ul { list-style: none; }


/* ---- TOKENS ---- */
:root {
  --teal:     #13C7B6;
  --teal-dk:  #0EA99E;
  --yellow:   #FFD53E;
  --charcoal: #1F2937;
  --slate:    #4B5563;
  --cloud:    #F3F4F6;
  --white:    #FFFFFF;

  --r-pill: 999px;
  --r-card: 20px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.07);
  --shadow-md: 0 6px 24px rgba(0,0,0,0.10);
}


/* ---- BASE ---- */
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  color: var(--charcoal);
  background: var(--white);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Fredoka One', cursive;
  line-height: 1.15;
  letter-spacing: 0.01em;
}


/* ---- LAYOUT ---- */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

section { padding: 64px 0; }

section h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 12px;
}

.section-sub {
  text-align: center;
  color: var(--slate);
  font-size: 1rem;
  font-weight: 600;
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.6;
}
.section-sub--light { color: rgba(255,255,255,0.82); }


/* ---- BADGES (pill labels) ---- */
.badge {
  display: inline-block;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  margin-bottom: 10px;
}
.badge-yellow  { background: var(--yellow);  color: var(--charcoal); }
.badge-teal    { background: var(--teal);    color: var(--white); }
.badge-white   { background: var(--white);   color: var(--teal); }


/* ---- BUTTONS ---- */
.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--yellow);
  color: var(--charcoal);
  font-weight: 800;
  font-size: 1.05rem;
  padding: 14px 30px;
  border-radius: var(--r-pill);
  text-decoration: none;
  border: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-play:hover  { transform: translateY(-2px); box-shadow: 0 7px 20px rgba(0,0,0,0.18); }
.btn-play:active { transform: translateY(0); }
.btn-play--sm    { padding: 12px 22px; font-size: 0.95rem; }

.play-icon { font-size: 0.8em; }

.btn-outline {
  display: inline-block;
  border: 2px solid var(--teal);
  color: var(--teal);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 10px 24px;
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-outline:hover { background: var(--teal); color: var(--white); }

.btn-outline--charcoal {
  border-color: var(--charcoal);
  color: var(--charcoal);
}
.btn-outline--charcoal:hover { background: var(--charcoal); color: var(--white); }

.btn-ghost {
  display: inline-block;
  color: var(--white);
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 2px solid rgba(255,255,255,0.4);
  padding-bottom: 2px;
  transition: border-color 0.15s ease;
}
.btn-ghost:hover { border-color: var(--white); }


/* ==============================================================
   HERO
   ============================================================== */
.hero {
  background: var(--white);
  text-align: center;
  padding: 0 0 40px;
}
.hero-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}
.hero-btn-wrap {
  padding-top: 32px;
}


/* ==============================================================
   HOW IT WORKS
   ============================================================== */
.how-it-works { background: var(--white); }

.steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--cloud);
  border-radius: var(--r-card);
  padding: 20px 22px;
}
.step-num {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  background: var(--teal);
  color: var(--white);
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step p {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  padding-top: 8px;
}


/* ==============================================================
   THIS MONTH'S GAMES
   ============================================================== */
.this-month {
  background: var(--cloud);
  text-align: center;
}
.this-month h2 { margin-bottom: 4px; }

.game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 32px;
  text-align: left;
}
.game-card {
  background: var(--white);
  border-radius: var(--r-card);
  padding: 18px 16px;
  box-shadow: var(--shadow-sm);
}
.game-emoji {
  display: block;
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 8px;
}
.game-card h3 {
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.game-card p {
  font-size: 0.82rem;
  color: var(--slate);
  line-height: 1.5;
}


/* ==============================================================
   PROMPT GENERATOR
   ============================================================== */
.prompt-section {
  background: var(--teal);
  text-align: center;
}
.prompt-section h2    { color: var(--white); margin-bottom: 4px; }

.prompt-card {
  background: var(--white);
  border-radius: var(--r-card);
  padding: 32px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}
.prompt-text {
  font-family: 'Fredoka One', cursive;
  font-size: 1.35rem;
  color: var(--charcoal);
  line-height: 1.3;
}

.prompt-followup {
  display: none;
  margin-top: 24px;
  animation: slideUp 0.35s ease;
}
.prompt-followup p {
  color: rgba(255,255,255,0.9);
  font-weight: 700;
  margin-bottom: 12px;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ==============================================================
   LEADERBOARD
   ============================================================== */
.leaderboard { background: var(--white); text-align: center; }

.leaderboard-note {
  color: var(--slate);
  font-size: 0.88rem;
  margin-bottom: 24px;
}

.lb-table {
  border: 1.5px solid #E5E7EB;
  border-radius: var(--r-card);
  overflow: hidden;
  margin-bottom: 20px;
}

.lb-header {
  display: grid;
  grid-template-columns: 52px 1fr 90px;
  background: var(--cloud);
  padding: 10px 18px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
}
.lb-row {
  display: grid;
  grid-template-columns: 52px 1fr 90px;
  padding: 14px 18px;
  align-items: center;
  border-top: 1px solid #F3F4F6;
}

.lb-rank {
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  color: var(--teal);
}
.rank-1 { font-size: 1.5rem; color: var(--yellow); }

.lb-name {
  font-weight: 700;
  font-size: 0.95rem;
  text-align: left;
}
.lb-pts  { text-align: right; }

.pts-chip {
  display: inline-block;
  background: #EDF9F8;
  color: var(--teal);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 3px 12px;
  border-radius: var(--r-pill);
}

.lb-footer { font-size: 0.9rem; color: var(--slate); }
.lb-footer a { color: var(--teal); font-weight: 700; text-decoration: none; }
.lb-footer a:hover { text-decoration: underline; }


/* ==============================================================
   WINNERS WALL
   ============================================================== */
.winners-wall { background: var(--cloud); text-align: center; }

.winners-placeholder {
  background: var(--white);
  border-radius: var(--r-card);
  padding: 48px 24px;
  box-shadow: var(--shadow-sm);
}
.trophy { font-size: 3.2rem; margin-bottom: 16px; }
.winners-placeholder p  { font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.placeholder-sub {
  color: var(--slate) !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  margin-bottom: 24px !important;
}

/* Past winner entries */
.winner-entry {
  background: var(--white);
  border-radius: var(--r-card);
  padding: 20px 22px;
  margin-bottom: 14px;
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.winner-name  { font-family: 'Fredoka One', cursive; font-size: 1.2rem; margin: 6px 0 4px; }
.winner-prize { font-size: 0.9rem; color: var(--slate); margin-bottom: 4px; }
.winner-pts   { font-size: 0.82rem; font-weight: 800; color: var(--teal); }


/* ==============================================================
   EMAIL SIGNUP
   ============================================================== */
.email-signup {
  background: var(--charcoal);
  text-align: center;
}
.email-signup h2 { color: var(--white); }

.email-embed { max-width: 460px; margin: 0 auto; }

.email-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.email-input {
  flex: 1;
  padding: 14px 18px;
  border: none;
  border-radius: var(--r-pill);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  background: var(--white);
  color: var(--charcoal);
  outline: none;
}
.email-input::placeholder { color: #9CA3AF; }
.email-note {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.38);
}


/* ==============================================================
   FAQ
   ============================================================== */
.faq { background: var(--white); }
.faq h2 { text-align: center; margin-bottom: 28px; }

.faq-list { display: flex; flex-direction: column; gap: 10px; }

.faq-item {
  border: 1.5px solid #E5E7EB;
  border-radius: 16px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 20px;
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--charcoal);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: background 0.15s ease;
}
.faq-q:hover { background: var(--cloud); }
.faq-q[aria-expanded="true"] { color: var(--teal); background: var(--cloud); }

.faq-plus {
  font-size: 1.3rem;
  color: var(--teal);
  font-weight: 400;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-q[aria-expanded="true"] .faq-plus { transform: rotate(45deg); }

.faq-a {
  padding: 0 20px 18px;
  color: var(--slate);
  font-size: 0.93rem;
  line-height: 1.65;
}


/* ==============================================================
   FOOTER
   ============================================================== */
.site-footer {
  background: #111827;
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 52px 0 36px;
}
.footer-logo {
  font-family: 'Fredoka One', cursive;
  font-size: 2.4rem;
  color: var(--teal);
  margin-bottom: 24px;
}
.footer-verse {
  max-width: 480px;
  margin: 0 auto 24px;
  font-style: italic;
  font-size: 0.92rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.78);
}
.footer-verse p    { margin-bottom: 8px; }
.footer-verse cite {
  font-style: normal;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--teal);
}
.footer-tagline {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  margin-bottom: 10px;
}
.footer-family {
  font-size: 0.82rem;
  margin-bottom: 16px;
}
.footer-family a { color: var(--teal); font-weight: 700; text-decoration: none; }
.footer-family a:hover { text-decoration: underline; }
.footer-copy { font-size: 0.72rem; color: rgba(255,255,255,0.22); }


/* ==============================================================
   RESPONSIVE
   ============================================================== */

/* Steps go horizontal on wider screens */
@media (min-width: 600px) {
  .steps { flex-direction: row; }
  .step  {
    flex: 1;
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  .step p { padding-top: 0; }
}

/* Narrow phones: stack email row and game grid */
@media (max-width: 400px) {
  .game-grid   { grid-template-columns: 1fr; }
  .email-row   { flex-direction: column; }
  .btn-play--sm { width: 100%; justify-content: center; }
}


/* ==============================================================
   ACCESSIBILITY
   ============================================================== */
:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
