/* ============================================================
   AJOY GAMES — HOME HERO
   Hero-only polish layer, loaded after style.css on the home page.
   Every rule is scoped to .home-wow .hero (or the wow-* decor that
   only exists inside the hero), so the rest of the site is untouched.
   Palette follows the site theme: brand blue, navy ink, orange accent.
   ============================================================ */

.home-wow .hero {
  --hx-blue: #2563eb;
  --hx-blue-deep: #1e3a8a;
  --hx-sky: #60a5fa;
  --hx-indigo: #6366f1;
  --hx-orange: #ea580c;
  --hx-amber: #f59e0b;
  --hx-ink: #0f172a;
  --hx-muted: #4b5568;
  --hx-ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: min(calc(100svh - var(--header-height)), 860px);
  padding: clamp(44px, 5.5vw, 88px) 0 clamp(56px, 6vw, 96px);
  background: linear-gradient(180deg, #f3f7ff 0%, #f8faff 55%, #ffffff 100%);
}

.home-wow .hero > .container {
  position: relative;
  z-index: 2;
}

/* ---------- Background ---------- */
.wow-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.wow-aurora {
  position: absolute;
  border-radius: 50%;
  /* Radial gradients already have soft edges; avoid large blur surfaces. */
}

.wow-aurora-1 {
  top: -18%;
  right: -8%;
  width: 52vw;
  height: 52vw;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.28) 0%, rgba(99, 102, 241, 0.14) 45%, transparent 70%);
  animation: wowDrift1 18s ease-in-out infinite alternate;
}

.wow-aurora-2 {
  bottom: -30%;
  left: -14%;
  width: 46vw;
  height: 46vw;
  background: radial-gradient(circle, rgba(234, 88, 12, 0.18) 0%, rgba(245, 158, 11, 0.1) 45%, transparent 70%);
  animation: wowDrift2 22s ease-in-out infinite alternate;
}

.wow-aurora-3 {
  top: 6%;
  left: 34%;
  width: 26vw;
  height: 26vw;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.2) 0%, transparent 70%);
  animation: wowDrift3 16s ease-in-out infinite alternate;
}

@keyframes wowDrift1 { to { transform: translate(-6vw, 5vw) scale(1.12); } }
@keyframes wowDrift2 { to { transform: translate(8vw, -5vw) scale(1.1); } }
@keyframes wowDrift3 { to { transform: translate(-5vw, 6vw) scale(0.85); } }

/* fine dot grid, fading out toward the edges */
.wow-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(30, 58, 138, 0.16) 1px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 45%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 60% 45%, #000 0%, transparent 75%);
}

.wow-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---------- Layout ---------- */
.home-wow .hero-layout {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
}

.home-wow .hero-copy {
  max-width: 640px;
  animation: none;
}

/* ---------- Copy ---------- */
.home-wow .hero .section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 8px 16px 8px 12px;
  border: 1px solid rgba(234, 88, 12, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 24px -12px rgba(234, 88, 12, 0.35);
  color: #9a3412;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  animation: none;
}

.home-wow .hero .section-kicker::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hx-orange);
  /* Keep the status dot static; animated shadows repaint every frame. */
}

.home-wow .hero-title {
  color: var(--hx-ink);
  font-size: clamp(3.5rem, 6.6vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
}

.home-wow .hero-title-line {
  display: block;
  animation: none;
}

.home-wow .hero-title-line.is-accent {
  position: relative;
  color: var(--hx-blue);
  background: linear-gradient(100deg, #1e3a8a 0%, #2563eb 30%, #6366f1 55%, #2563eb 75%, #ea580c 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: none;
}

.home-wow .hero-description {
  color: var(--hx-muted);
  font-size: clamp(1rem, 1.12vw, 1.1rem);
  animation: none;
}

.home-wow .hero-actions {
  animation: none;
}

.home-wow .hero-actions .button {
  min-height: 54px;
  padding-inline: 28px;
  font-size: 1rem;
}

.home-wow .hero .button-primary {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0;
  background: linear-gradient(135deg, #ff7a2e 0%, #f85008 45%, #d94100 100%);
  box-shadow: 0 14px 30px -10px rgba(248, 80, 8, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-wow .hero .button-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: wowShine 4.5s 2s ease-in-out infinite;
}

@keyframes wowShine {
  0%, 70% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

.home-wow .hero .button-primary:hover,
.home-wow .hero .button-primary:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -12px rgba(248, 80, 8, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.home-wow .hero .button-secondary {
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 24px -16px rgba(15, 23, 42, 0.35);
  color: var(--hx-blue-deep);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.home-wow .hero .button-secondary:hover,
.home-wow .hero .button-secondary:focus-visible {
  border-color: rgba(37, 99, 235, 0.5);
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -16px rgba(37, 99, 235, 0.5);
}

.home-wow .hero-proof {
  animation: none;
}

.home-wow .hero-proof-list {
  gap: 10px;
}

.home-wow .hero-proof-item {
  padding: 7px 14px 7px 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: #334155;
  font-size: 0.78rem;
}

.home-wow .hero-proof-item::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.12);
  color: var(--hx-blue);
  font-size: 0.66rem;
  font-weight: 800;
}

/* ---------- Visual: mascot on a glowing stage ---------- */
.home-wow .hero-visual {
  position: relative;
  overflow: visible;
  height: clamp(440px, 44vw, 620px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  animation: none;
}

/* soft glow blob behind everything */
.wow-blob-back {
  position: absolute;
  left: 50%;
  top: 47%;
  width: 92%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 46% 54% 58% 42% / 44% 46% 54% 56%;
  background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.28), rgba(96, 165, 250, 0.12) 50%, transparent 72%);
  animation: wowMorph 14s ease-in-out infinite alternate-reverse;
}

/* Stable colour shape; animate only its transform. */
.wow-halo {
  position: absolute;
  left: 50%;
  top: 47%;
  width: 72%;
  aspect-ratio: 1;
  overflow: hidden;
  transform: translate(-50%, -50%);
  border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.65) 0%, transparent 34%),
    radial-gradient(circle at 12% 92%, rgba(251, 146, 60, 0.95) 0%, rgba(245, 158, 11, 0.5) 26%, transparent 52%),
    radial-gradient(circle at 96% 60%, rgba(251, 146, 60, 0.85) 0%, transparent 38%),
    linear-gradient(150deg, #60a5fa 0%, #3b82f6 34%, #6366f1 66%, #8b5cf6 100%);
  box-shadow:
    0 50px 90px -30px rgba(79, 70, 229, 0.55),
    inset 0 -30px 60px rgba(30, 58, 138, 0.3),
    inset 0 20px 40px rgba(255, 255, 255, 0.35);
  animation: wowMorph 11s ease-in-out infinite alternate;
}

@keyframes wowMorph {
  0%   { transform: translate(-50%, -50%) rotate(0deg); }
  50%  { transform: translate(-50%, -50%) rotate(8deg) scale(1.03); }
  100% { transform: translate(-50%, -50%) rotate(-6deg); }
}

/* rotating light rays inside the blob */
.wow-rays {
  position: absolute;
  inset: -40%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.18) 0deg 7deg, transparent 7deg 22deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.5) 35%, transparent 62%);
  mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.5) 35%, transparent 62%);
  animation: wowRays 40s linear infinite;
}

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

.wow-ring {
  position: absolute;
  left: 50%;
  top: 47%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.wow-ring i {
  position: absolute;
  top: -6px;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--hx-orange);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.5);
}

.wow-ring-1 {
  width: 94%;
  aspect-ratio: 1;
  border: 1.5px dashed rgba(37, 99, 235, 0.25);
  animation: wowSpin 30s linear infinite;
}

@keyframes wowSpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.wow-platform {
  position: absolute;
  left: 50%;
  bottom: 5%;
  width: 46%;
  height: 7%;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.28) 0%, rgba(15, 23, 42, 0.08) 50%, transparent 72%);
  animation: wowShadow 6s ease-in-out infinite;
}

@keyframes wowShadow {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
  50% { transform: translateX(-50%) scale(0.85); opacity: 0.7; }
}

.home-wow .hero-character-shell {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-wow .hero-character {
  width: auto;
  max-height: 90%;
  filter: drop-shadow(0 24px 30px rgba(30, 58, 138, 0.25));
  animation: wowFloat 6s ease-in-out infinite;
}

@keyframes wowFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-16px) rotate(1deg); }
}

/* twinkling sparkles */
.wow-sparkle {
  position: absolute;
  z-index: 3;
  width: 22px;
  height: 22px;
  background: var(--hx-amber);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: wowTwinkle 2.8s ease-in-out infinite;
}

.wow-sparkle-1 { top: 6%; right: 18%; }
.wow-sparkle-2 { top: 30%; left: 8%; width: 14px; height: 14px; background: var(--hx-blue); animation-delay: 0.7s; }
.wow-sparkle-3 { bottom: 22%; right: 6%; width: 16px; height: 16px; background: var(--hx-orange); animation-delay: 1.4s; }
.wow-sparkle-4 { top: 62%; left: 20%; width: 10px; height: 10px; background: var(--hx-indigo); animation-delay: 2s; }

@keyframes wowTwinkle {
  0%, 100% { transform: scale(0.4) rotate(0deg); opacity: 0.3; }
  50% { transform: scale(1) rotate(90deg); opacity: 1; }
}

/* floating collectibles: coins, gems, bubbles */
.wow-float {
  position: absolute;
  z-index: 3;
}

.wow-coin {
  width: 42px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #fff7cc 0%, transparent 28%),
    radial-gradient(circle, #fcd34d 0%, #f59e0b 58%, #d97706 100%);
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.35),
    inset 0 -4px 6px rgba(180, 83, 9, 0.45),
    0 12px 20px -8px rgba(217, 119, 6, 0.65);
}

.wow-coin::after {
  content: "";
  position: absolute;
  inset: 30%;
  border-radius: 3px;
  background: rgba(180, 83, 9, 0.35);
  transform: rotate(45deg);
}

.wow-gem {
  width: 28px;
  aspect-ratio: 1;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, transparent 40%),
    linear-gradient(135deg, #93c5fd, #3b82f6 55%, #4338ca);
  box-shadow: 0 10px 18px -6px rgba(59, 130, 246, 0.7);
  rotate: 45deg;
}

.wow-gem-orange {
  width: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, transparent 40%),
    linear-gradient(135deg, #fdba74, #f97316 55%, #c2410c);
  box-shadow: 0 10px 18px -6px rgba(234, 88, 12, 0.7);
}

.wow-bubble {
  width: 30px;
  aspect-ratio: 1;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95) 0 12%, rgba(191, 219, 254, 0.35) 13%, rgba(147, 197, 253, 0.12) 70%);
  box-shadow: 0 8px 20px -8px rgba(37, 99, 235, 0.4);
}

.wow-float-1 { top: 14%; left: 8%;  animation: wowFloatA 6s ease-in-out infinite, wowSpinY 4s linear infinite; }
.wow-float-2 { bottom: 20%; right: 6%; width: 34px; animation: wowFloatB 7s 0.6s ease-in-out infinite, wowSpinY 5s linear infinite reverse; }
.wow-float-3 { top: 20%; right: 10%; animation: wowFloatB 6.5s 0.3s ease-in-out infinite; }
.wow-float-4 { bottom: 14%; left: 14%; animation: wowFloatA 5.5s 1s ease-in-out infinite; }
.wow-float-5 { top: 50%; left: 2%; animation: wowFloatB 8s ease-in-out infinite; }
.wow-float-6 { top: 4%; left: 44%; width: 20px; animation: wowFloatA 7.5s 1.4s ease-in-out infinite; }

@keyframes wowFloatA {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

@keyframes wowFloatB {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(14px) translateX(-6px); }
}

/* coin "flip" */
@keyframes wowSpinY {
  0%, 100% { scale: 1 1; }
  50% { scale: 0.25 1; }
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .home-wow .hero {
    min-height: 0;
  }

  .home-wow .hero-layout {
    grid-template-columns: 1fr;
  }

  .home-wow .hero-copy {
    margin-inline: auto;
  }

  .home-wow .hero-visual {
    width: min(100%, 540px);
    height: clamp(340px, 78vw, 500px);
  }


  /* keep the orbit clear of the buttons stacked above */
  .home-wow .hero-visual {
    margin-top: 12px;
  }

  .wow-ring-1 {
    width: 88%;
  }

  .wow-blob-back {
    width: 86%;
  }

  .wow-halo {
    width: 68%;
  }
}

@media (max-width: 767px) {
  .home-wow .hero {
    padding: 32px 0 44px;
  }

  .home-wow .hero .section-kicker {
    max-width: 100%;
    padding: 7px 12px 7px 10px;
    font-size: 0.6rem;
    letter-spacing: 0.12em;
  }

  .home-wow .hero-title {
    font-size: clamp(2.8rem, 13vw, 4.2rem);
  }

  .home-wow .hero-actions .button {
    min-height: 50px;
  }

  .wow-coin { width: 30px; }
  .wow-float-2 { width: 26px; }
  .wow-gem { width: 20px; }
  .wow-gem-orange { width: 16px; }
  .wow-bubble { width: 22px; }

  .wow-aurora-1 { width: 100vw; height: 100vw; }
  .wow-aurora-2 { width: 90vw; height: 90vw; }
}

/* Pause every decorative animation when offscreen, backgrounded, or saving data. */
.home-wow .hero.hero-effects-paused *,
.home-wow .hero.hero-effects-paused *::before,
.home-wow .hero.hero-effects-paused *::after {
  animation-play-state: paused !important;
}

/* Keep the same composition on touch devices, with no continuous motion. */
@media (max-width: 920px), (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .home-wow .hero *,
  .home-wow .hero *::before,
  .home-wow .hero *::after {
    animation: none !important;
  }
}

/* The header is opaque; backdrop sampling adds unnecessary scroll work. */
.home-wow .site-header {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
