/* =====================================================
   POCKETSPLAY — ANIMATIONS.CSS
   Wix-identical scroll reveals, hovers, parallax & floating
   ===================================================== */

/* ══════════════════════════════════════════
   1. PAGE LOAD — Hero entrance
══════════════════════════════════════════ */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Hero title staggers in on load */
.hero-wix-body {
  animation: heroFadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
/* Floating cards appear after title */
.chip-top     { animation: heroFadeIn 0.6s ease 0.5s both, floatChip 3.5s ease-in-out 1.2s infinite; }
.chip-botleft { animation: heroFadeIn 0.6s ease 0.7s both, floatChipAlt 3.8s ease-in-out 1.5s infinite; }
.chip-botright{ animation: heroFadeIn 0.6s ease 0.9s both, floatChip 4.0s ease-in-out 1.8s infinite; }
/* Shapes appear last */
.plus-shape { animation: shapeEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both, floatShape 4s ease-in-out 1.1s infinite; }
.ring-shape { animation: shapeEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both, floatShape 3.5s ease-in-out 1.3s infinite; }
.ball-shape { animation: shapeEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.7s both, floatShape 4.5s ease-in-out 1s infinite; }
/* Phone mockup */
.hero-wix-visual { animation: heroFadeUp 1s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both; }

/* Massive 3D hands entrance */
@keyframes slideUpFadeHands {
  from { opacity: 0; transform: translateY(12vw); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-wix-massive-visual img {
  animation: slideUpFadeHands 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

@keyframes shapeEntrance {
  from { opacity: 0; transform: scale(0.5) rotate(-15deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* ══════════════════════════════════════════
   2. CONTINUOUS FLOAT ANIMATIONS
══════════════════════════════════════════ */
@keyframes floatChip {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}
@keyframes floatChipAlt {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
/* Override chip-top base transform to include float */
@keyframes floatChipTop {
  0%, 100% { transform: translateX(-50%) translateY(0px); }
  50%       { transform: translateX(-50%) translateY(-12px); }
}
.chip-top {
  animation: heroFadeIn 0.6s ease 0.5s both, floatChipTop 3.5s ease-in-out 1.2s infinite !important;
}

@keyframes floatShape {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-10px) rotate(3deg); }
  66%       { transform: translateY(-5px) rotate(-2deg); }
}

/* ══════════════════════════════════════════
   3. SCROLL-TRIGGERED REVEALS
   Multiple variants matching Wix patterns
══════════════════════════════════════════ */

/* Default: fade + slide up (most sections) */
.anim-fadein {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.anim-fadein.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slide from left */
.anim-slide-left {
  opacity: 0;
  transform: translateX(-48px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.anim-slide-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide from right */
.anim-slide-right {
  opacity: 0;
  transform: translateX(48px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.anim-slide-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale up (for cards) */
.anim-scale {
  opacity: 0;
  transform: scale(0.92) translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.anim-scale.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Stagger delays for grid children */
.stagger-1 { transition-delay: 0ms   !important; }
.stagger-2 { transition-delay: 100ms !important; }
.stagger-3 { transition-delay: 200ms !important; }
.stagger-4 { transition-delay: 300ms !important; }
.stagger-5 { transition-delay: 400ms !important; }
.stagger-6 { transition-delay: 500ms !important; }

/* ══════════════════════════════════════════
   4. HOVER EFFECTS — Wix-style lift & shadow
══════════════════════════════════════════ */

/* Cards */
.ws-card {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
.wix-showcase:hover .ws-card {
  transform: translateY(calc(-50% - 6px)) !important;
  box-shadow: 0 36px 80px rgba(0,0,0,0.28) !important;
}
.ws-card-left:not(.wix-showcase:hover *),
.ws-card-right:not(.wix-showcase:hover *) {
  transform: translateY(-50%);
}

/* Team cards */
.team-card {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease !important;
}
.team-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 20px 50px rgba(139,92,246,0.18) !important;
}

/* Community cards */
.community-card {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease !important;
}
.community-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 20px 48px rgba(139,92,246,0.15) !important;
}

/* Floating mini-cards hover */
.float-chip {
  cursor: default;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease;
}
.float-chip:hover {
  box-shadow: 0 16px 48px rgba(80,60,160,0.22);
}

/* Genre items */
.genre-item {
  transition: background 0.25s ease, padding-left 0.3s ease, color 0.25s ease !important;
}
.genre-item:hover {
  background: rgba(139,92,246,0.06) !important;
  padding-left: 1.5rem !important;
}
.genre-item:hover .genre-num { color: #7c3aed !important; }

/* Buttons — lift */
.btn-primary, .sc-btn-primary, .ws-store-btn, .abt-btn, .form-submit, .btn-nav {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.25s ease,
              background 0.25s ease,
              opacity 0.25s ease !important;
}
.btn-primary:hover, .sc-btn-primary:hover {
  transform: translateY(-3px) scale(1.02) !important;
}
.ws-store-btn:hover {
  transform: translateY(-2px) !important;
}
.abt-btn:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18) !important;
}

/* Nav links underline slide */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: #8b5cf6;
  border-radius: 2px;
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-links a:hover::after { width: 100%; }

/* ══════════════════════════════════════════
   5. PARALLAX — Showcase background images
══════════════════════════════════════════ */
.ws-bg img {
  transition: transform 0.1s linear; /* driven by JS */
  will-change: transform;
}

/* ══════════════════════════════════════════
   6. SMOOTH PAGE / SCROLL BEHAVIOUR
══════════════════════════════════════════ */
html {
  scroll-behavior: smooth;
}

/* ══════════════════════════════════════════
   7. NAVBAR — Glassmorphism on scroll
══════════════════════════════════════════ */
.navbar {
  transition: background 0.4s ease,
              box-shadow 0.4s ease,
              backdrop-filter 0.4s ease !important;
}
.navbar.scrolled {
  background: rgba(255,255,255,0.88) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  box-shadow: 0 2px 30px rgba(80,60,160,0.1) !important;
}

/* ══════════════════════════════════════════
   8. TICKER — smooth infinite scroll
══════════════════════════════════════════ */
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-track {
  animation: ticker 22s linear infinite;
  will-change: transform;
}
.ticker-wrap:hover .ticker-track {
  animation-play-state: paused;
}

/* ══════════════════════════════════════════
   9. MISSION CARDS reveal
══════════════════════════════════════════ */
.mission-card {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease !important;
}
.mission-card:hover {
  transform: translateX(6px) !important;
  box-shadow: 0 8px 28px rgba(139,92,246,0.12) !important;
}

/* ══════════════════════════════════════════
   10. PHONE MOCKUP — subtle tilt interaction
══════════════════════════════════════════ */
.hero-phone-mockup {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s ease;
}

/* ══════════════════════════════════════════
   11. ABOUT SECTION — robot bounce
══════════════════════════════════════════ */
@keyframes robotBounce {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%       { transform: translateY(-14px) rotate(3deg); }
}
.abt-char-inner {
  animation: robotBounce 3.2s ease-in-out infinite;
}

/* ══════════════════════════════════════════
   12. FORM INPUTS — focus animation
══════════════════════════════════════════ */
.form-group input,
.form-group textarea {
  transition: border-color 0.25s ease,
              box-shadow 0.25s ease,
              background 0.25s ease !important;
}
.form-group input:focus,
.form-group textarea:focus {
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15) !important;
}

/* ══════════════════════════════════════════
   13. FOOTER newsletter button
══════════════════════════════════════════ */
.fw-newsletter button {
  transition: transform 0.2s ease, opacity 0.2s ease !important;
}
.fw-newsletter button:hover {
  transform: scale(1.04) !important;
}

/* ══════════════════════════════════════════
   14. Reduced motion — respect user prefs
══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════════
   15. MOBILE FIXES
══════════════════════════════════════════ */
@media (max-width: 680px) {
  /* Prevent jitter/jerkiness on mobile:
     Since layout.css sets the chips to static positioning with margin: auto,
     floatChipTop's internal translateX(-50%) creates erratic positioning logic.
     Switching to a pure vertical floatChip stabilizes it immediately. */
  .chip-top {
    animation: heroFadeIn 0.6s ease 0.5s both, floatChip 3.5s ease-in-out 1.2s infinite !important;
  }
}
