/* Site-wide custom styles (complement Tailwind CDN) */

html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; }

::selection { background: rgba(36,154,89,0.25); color: #062216; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f6f7f9; }
::-webkit-scrollbar-thumb { background: #b0b9c8; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #249a59; }

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.gradient-text {
  background: linear-gradient(90deg, #249a59 0%, #48b676 50%, #f97c06 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.gradient-text-light {
  background: linear-gradient(90deg, #ffd388 0%, #ff9d20 50%, #ffb74a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.stadium-bg {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(36,154,89,0.35), transparent 60%),
    radial-gradient(ellipse 60% 60% at 90% 90%, rgba(249,124,6,0.25), transparent 60%),
    linear-gradient(135deg, #062216 0%, #0d3d27 60%, #062216 100%);
}

.stadium-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

.cricket-pitch {
  background:
    linear-gradient(180deg, transparent 0%, transparent 40%, rgba(255,255,255,0.06) 40%, rgba(255,255,255,0.06) 60%, transparent 60%),
    radial-gradient(ellipse at center, #177c46 0%, #0d3d27 60%, #062216 100%);
}

/* Marquee */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.animate-marquee { animation: marquee 40s linear infinite; }
.animate-marquee:hover { animation-play-state: paused; }

/* Card hover lift */
.card-lift {
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.4s ease;
}
.card-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px -20px rgba(36,154,89,0.4);
}

/* Glassmorphism */
.glass {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
}

.glass-dark {
  background: rgba(11,14,21,0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.1);
}

/* Animated gradient border */
.gradient-border {
  position: relative;
  background: white;
  border-radius: 1rem;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 1.1rem;
  padding: 2px;
  background: linear-gradient(135deg, #249a59, #f97c06, #249a59);
  background-size: 200% 200%;
  animation: gradientShift 5s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}

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

/* Tilted card */
.tilt-on-hover {
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
  transform-style: preserve-3d;
}
.tilt-on-hover:hover {
  transform: perspective(800px) rotateY(-5deg) rotateX(3deg) translateY(-4px);
}

/* Hero ball animation */
@keyframes ballSpin {
  from { transform: rotate(0); }
  to   { transform: rotate(360deg); }
}
.ball-spin { animation: ballSpin 8s linear infinite; }

/* Pulse ring (live badges) */
@keyframes pulseRing {
  0%   { transform: scale(0.85); opacity: 0.7; }
  100% { transform: scale(1.5);  opacity: 0; }
}
.pulse-ring::before {
  content:''; position:absolute; inset:0; border-radius:9999px;
  background: currentColor; animation: pulseRing 2s cubic-bezier(.215,.61,.355,1) infinite;
}

/* Scoreboard digit style */
.score-digit {
  font-family: 'Bebas Neue', system-ui, sans-serif;
  letter-spacing: 0.05em;
  font-feature-settings: 'tnum';
}

/* Hover image zoom */
.zoom-img-wrap { overflow: hidden; }
.zoom-img-wrap img { transition: transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.zoom-img-wrap:hover img { transform: scale(1.08); }

/* Prose */
.prose-news h2 { font-family: 'Bebas Neue', sans-serif; font-size: 1.75rem; margin: 2rem 0 0.75rem; color: #1a1f2c; letter-spacing: 0.02em; }
.prose-news h3 { font-family: 'Bebas Neue', sans-serif; font-size: 1.4rem;  margin: 1.5rem 0 0.5rem; color: #1a1f2c; letter-spacing: 0.02em; }
.prose-news p  { color: #434d61; line-height: 1.75; margin-bottom: 1rem; }
.prose-news ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; color: #434d61; }
.prose-news ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 1rem; color: #434d61; }
.prose-news a  { color: #177c46; text-decoration: underline; }
.prose-news a:hover { color: #13633a; }
.prose-news blockquote { border-left: 4px solid #249a59; padding-left: 1rem; font-style: italic; color: #525e77; margin: 1rem 0; }
.prose-news em { color: #249a59; font-style: italic; }
.prose-news img { border-radius: 0.75rem; margin: 1rem 0; max-width: 100%; }

/* No-image placeholder */
.placeholder-grad-1 { background: linear-gradient(135deg, #249a59, #13633a); }
.placeholder-grad-2 { background: linear-gradient(135deg, #f97c06, #b73e06); }
.placeholder-grad-3 { background: linear-gradient(135deg, #1a1f2c, #3a4252); }
.placeholder-grad-4 { background: linear-gradient(135deg, #48b676, #ff9d20); }

/* Avatar initials backdrop */
.avatar-grad {
  background-image: linear-gradient(135deg, #249a59 0%, #13633a 60%, #062216 100%);
}

/* Active nav underline (server-rendered) */
header a.is-active span:last-child {
  width: 100% !important;
}

/* Smooth fade for .htmx-like transitions if used */
[x-cloak] { display: none !important; }
