/* =========================================================================
   Charity Bingo — custom design layer on top of Tailwind
   Only the things Tailwind utilities can't easily express live here:
   keyframe animations, the bingo-ball motif, glass surfaces, and a few
   reduced-motion / accessibility niceties.
   ========================================================================= */

:root {
  --bg-base: #0a0a18;
  --bg-elev: #12122a;
  --brand-violet: #8b5cf6;
  --brand-fuchsia: #ec4899;
  --brand-cyan: #22d3ee;
  --brand-gold: #fbbf24;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* offset for the sticky navbar when jumping to anchors */
}

body {
  background-color: var(--bg-base);
  /* layered radial glows give the page depth without an image dependency */
  background-image:
    radial-gradient(60rem 60rem at 80% -10%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(50rem 50rem at -10% 20%, rgba(236, 72, 153, 0.14), transparent 55%),
    radial-gradient(40rem 40rem at 50% 120%, rgba(34, 211, 238, 0.12), transparent 60%);
  background-attachment: fixed;
}

/* ---- Glass surfaces ----------------------------------------------------- */
.glass {
  background: rgba(18, 18, 42, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-strong {
  background: rgba(10, 10, 24, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---- Gradient text helper ---------------------------------------------- */
.text-gradient {
  background: linear-gradient(135deg, #c4b5fd 0%, #f0abfc 45%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Animated gradient backdrop for the hero --------------------------- */
.animated-gradient {
  background: linear-gradient(120deg, #6d28d9, #db2777, #0891b2, #6d28d9);
  background-size: 300% 300%;
  animation: gradientShift 14s ease infinite;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- Glow / float for floating bingo balls ----------------------------- */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-18px) rotate(6deg); }
}

.float-slow  { animation: float 7s ease-in-out infinite; }
.float-med   { animation: float 5.5s ease-in-out infinite; }
.float-fast  { animation: float 4.5s ease-in-out infinite; }

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.45); }
  50%      { box-shadow: 0 0 32px 6px rgba(139, 92, 246, 0.55); }
}
.pulse-glow { animation: pulseGlow 3s ease-in-out infinite; }

/* ---- The bingo ball motif ---------------------------------------------- */
.bingo-ball {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-weight: 800;
  color: #0a0a18;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  box-shadow:
    inset -4px -6px 10px rgba(0, 0, 0, 0.25),
    inset 4px 5px 10px rgba(255, 255, 255, 0.55),
    0 8px 20px rgba(0, 0, 0, 0.35);
}
.bingo-ball::before {
  /* the white inner disc that real bingo balls have */
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 9999px;
  background: radial-gradient(circle at 35% 30%, #ffffff, #e5e7eb);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}
.bingo-ball > span {
  position: relative;
  z-index: 1;
}

.ball-b { background: radial-gradient(circle at 35% 28%, #60a5fa, #1d4ed8); }
.ball-i { background: radial-gradient(circle at 35% 28%, #f87171, #b91c1c); }
.ball-n { background: radial-gradient(circle at 35% 28%, #34d399, #047857); }
.ball-g { background: radial-gradient(circle at 35% 28%, #fbbf24, #b45309); }
.ball-o { background: radial-gradient(circle at 35% 28%, #f0abfc, #a21caf); }

/* ---- Marquee for the "trusted by / stats" strip ------------------------ */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---- Card hover lift ---------------------------------------------------- */
.card-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card-lift:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

/* ---- Reveal-on-scroll (driven by main.js IntersectionObserver) --------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---- Custom scrollbar --------------------------------------------------- */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #0a0a18; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8b5cf6, #ec4899);
  border-radius: 9999px;
  border: 2px solid #0a0a18;
}

/* ---- Respect users who prefer reduced motion --------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
