/* =========================================================
   STAR BATCH 3 - CUSTOM CSS
   Tailwind handles layout/utilities.
   This file handles animation, component polish and loading UI.
========================================================= */

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

::selection {
  background: #b5121b;
  color: #fff;
}

.gold-text {
  background: linear-gradient(100deg, #f5d76e 0%, #d4af37 45%, #fff0a6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 90%);
}

.badge-gold {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.08);
  color: #f5d76e;
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.section-kicker {
  display: inline-block;
  color: #b5121b;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section-title {
  color: #111;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.08;
}

.info-pill {
  border: 1px solid #e4e4e7;
  background: #fff;
  border-radius: 999px;
  padding: 0.65rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #3f3f46;
}

.form-label {
  display: block;
  margin-bottom: 0.4rem;
  color: #27272a;
  font-size: 0.75rem;
  font-weight: 800;
}

.form-input {
  width: 100%;
  border: 1px solid #e4e4e7;
  background: #fafafa;
  border-radius: 0.75rem;
  padding: 0.78rem 0.9rem;
  outline: none;
  color: #18181b;
  font-size: 0.875rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.form-input:focus {
  border-color: #b5121b;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(181, 18, 27, 0.09);
}

.form-input:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.form-input.input-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid #e4e4e7;
  border-radius: 1.5rem;
  background: #111;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.14);
}

.video-shell video {
  display: block;
}

.prize-card {
  overflow: hidden;
  /* border: 1px solid rgba(255, 255, 255, 0.1); */
  border-radius: 1.25rem;
  /* background: rgba(255, 255, 255, 0.05); */
  transition:
    transform 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.prize-card:hover {
  transform: translateY(-8px);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.prize-image-wrap {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.5rem;
  /* background:
    radial-gradient(
      circle at center,
      rgba(212, 175, 55, 0.14),
      transparent 65%
    ),
    rgba(255, 255, 255, 0.025); */
}

.prize-image {
  width: 100%;
  height: 210px;
  object-fit: contain;
  transition: transform 0.5s ease;
  /* background: rgba(255, 255, 255, 0.02); */
}

.prize-card:hover .prize-image {
  transform: scale(1.06);
}

.prize-placeholder {
  text-align: center;
  color: #f5d76e;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
}

.dark-benefit {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.035);
  padding: 1.1rem;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}

.dark-benefit:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.35);
}

.dark-number {
  display: grid;
  height: 2.25rem;
  width: 2.25rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.75rem;
  background: rgba(212, 175, 55, 0.1);
  color: #f5d76e;
  font-size: 0.7rem;
  font-weight: 900;
}

.mascot-stage {
  position: relative;
  display: flex;
  min-height: 430px;
  width: min(100%, 430px);
  align-items: center;
  justify-content: center;
}

.mascot-glow {
  position: absolute;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(212, 175, 55, 0.35),
    rgba(181, 18, 27, 0.05) 65%,
    transparent 70%
  );
  filter: blur(10px);
  animation: pulseGlow 3.5s ease-in-out infinite;
}

.benefit-card {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  border: 1px solid #ece7d7;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.8);
  padding: 1rem;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.benefit-card:hover {
  transform: translateY(-5px);
  border-color: rgba(181, 18, 27, 0.25);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.benefit-icon {
  display: grid;
  height: 2.7rem;
  width: 2.7rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.8rem;
  background: #b5121b;
  color: #f5d76e;
  font-weight: 900;
}

.benefit-card h3 {
  font-size: 0.9rem;
  font-weight: 900;
  color: #18181b;
}

.benefit-card p {
  margin-top: 0.25rem;
  color: #71717a;
  font-size: 0.78rem;
  line-height: 1.5;
}

.fact-card {
  border: 1px solid #e4e4e7;
  border-radius: 1.4rem;
  background: #fff;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.fact-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.09);
}

.fact-icon {
  display: grid;
  height: 3.2rem;
  width: 3.2rem;
  margin: 0 auto 1rem;
  place-items: center;
  border-radius: 1rem;
  background: rgba(181, 18, 27, 0.08);
  color: #b5121b;
}

.fact-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.fact-label {
  color: #a1a1aa;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fact-card h3 {
  margin-top: 0.4rem;
  font-size: 1.2rem;
  font-weight: 900;
  color: #18181b;
}

.fact-card p:last-child {
  margin-top: 0.2rem;
  color: #71717a;
  font-size: 0.8rem;
}

.terms-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.035);
  padding: 1.2rem;
  color: #d4d4d8;
  font-size: 0.9rem;
  line-height: 1.75;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    background 0.3s ease;
}

.terms-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.3);
  background: rgba(255, 255, 255, 0.055);
}

.terms-card strong {
  color: #fff;
}

.terms-card small {
  display: block;
  margin-top: 0.65rem;
  color: #71717a;
  font-size: 0.7rem;
  line-height: 1.5;
}

.terms-number {
  display: grid;
  height: 2.2rem;
  width: 2.2rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 0.75rem;
  color: #f5d76e;
  font-size: 0.8rem;
  font-weight: 900;
}

.testimonial-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #ece7d7;
  border-radius: 1.4rem;
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.quote-mark {
  position: absolute;
  right: 1rem;
  top: -0.45rem;
  color: rgba(181, 18, 27, 0.1);
  font-size: 7rem;
  font-weight: 900;
  line-height: 1;
}

.avatar {
  display: grid;
  height: 2.5rem;
  width: 2.5rem;
  place-items: center;
  border-radius: 50%;
  background: #b5121b;
  color: #f5d76e;
  font-weight: 900;
}

.footer-link {
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #f5d76e;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition:
    opacity 0.75s ease,
    transform 0.75s cubic-bezier(0.2, 0.75, 0.25, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.loading-overlay.hidden {
  display: none;
}

.loading-card {
  width: min(90%, 360px);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 1.5rem;
  background: #fff;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.4);
}

.loading-card h3 {
  margin-top: 1.2rem;
  font-weight: 900;
  color: #18181b;
}

.loading-card p {
  margin-top: 0.4rem;
  color: #71717a;
  font-size: 0.8rem;
  line-height: 1.5;
}

.loader-ring {
  width: 54px;
  height: 54px;
  margin: 0 auto;
  border: 4px solid #e4e4e7;
  border-top-color: #b5121b;
  border-right-color: #d4af37;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.form-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.form-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    transform: scale(0.95);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .prize-image-wrap {
    min-height: 160px;
  }

  .prize-image {
    height: 155px;
  }

  .terms-card {
    font-size: 0.82rem;
  }

  .mascot-stage {
    min-height: 340px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
