/* FIX leads the experience with gentle motion and clear reduced-motion support. */
@media (prefers-reduced-motion: no-preference) {
  .quiz-cta.quiz-cta-character {
    animation: fix-cta-glow 5.5s ease-in-out infinite;
  }

  .quiz-cta-portrait img {
    transform-origin: center bottom;
    animation: fix-hero-bob 4.6s ease-in-out infinite;
  }

  .summer-hero-media {
    animation: fix-feature-float 7s ease-in-out infinite;
    transform-origin: center;
  }

  .summer-hero-media video {
    transition: box-shadow .35s ease, transform .35s ease;
  }

  .summer-hero-media:hover video {
    transform: scale(1.012);
    box-shadow: 0 15px 36px #020f1e55;
  }

  #fix-contact .fix-launcher {
    isolation: isolate;
  }

  #fix-contact .fix-launcher::before {
    content: "";
    position: absolute;
    z-index: -1;
    right: 2px;
    bottom: 10px;
    width: 88px;
    height: 88px;
    border: 1px solid #d5eafb88;
    border-radius: 50%;
    background: radial-gradient(circle, #8ec6ee38 0%, #8ec6ee12 58%, transparent 72%);
    animation: fix-halo 3.8s ease-in-out infinite;
    pointer-events: none;
  }

  #fix-contact .fix-launcher img {
    transform-origin: center bottom;
    animation: fix-greet 4.8s ease-in-out infinite;
  }

  #fix-contact .fix-launcher[aria-expanded="true"] img {
    animation: none;
  }

  #servicios .services-compact .service-top svg {
    animation: fix-service-icon 4.2s ease-in-out infinite !important;
  }

  #servicios .services-compact .service:nth-child(2) .service-top svg { animation-delay: -.7s !important; }
  #servicios .services-compact .service:nth-child(3) .service-top svg { animation-delay: -1.4s !important; }
  #servicios .services-compact .service:nth-child(4) .service-top svg { animation-delay: -2.1s !important; }
  #servicios .services-compact .service:nth-child(5) .service-top svg { animation-delay: -2.8s !important; }
  #servicios .services-compact .service:nth-child(6) .service-top svg { animation-delay: -3.5s !important; }

  #trivia-fix .quiz-guide {
    position: relative;
    isolation: isolate;
    overflow: hidden;
  }

  #trivia-fix .quiz-guide::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 54%;
    left: 50%;
    width: 210px;
    aspect-ratio: 1;
    border: 1px solid #ffffff35;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: fix-guide-ring 5s ease-in-out infinite;
    pointer-events: none;
  }

  #trivia-fix .quiz-guide > * { position: relative; z-index: 1; }

  #trivia-fix .quiz-mascot.mascot-enter {
    animation: fix-topic-change .7s cubic-bezier(.2,.75,.3,1) both, fixQuizFloat 4s ease-in-out .7s infinite;
  }

  #equipamiento .equipment-grid article .equipment-fix {
    transform-origin: center bottom;
    animation: fix-tool-float 5.2s ease-in-out infinite;
  }

  #equipamiento .equipment-grid article:nth-child(2) .equipment-fix { animation-delay: -1.7s; }
  #equipamiento .equipment-grid article:nth-child(3) .equipment-fix { animation-delay: -3.4s; }

  .fix-motion-ready .fix-reveal {
    opacity: 0;
    transform: translateY(22px) scale(.985);
    transition: opacity .65s ease, transform .65s cubic-bezier(.2,.75,.3,1);
  }

  .fix-motion-ready .fix-reveal.fix-in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  #equipamiento .equipment-grid article:nth-child(2) { transition-delay: .1s; }
  #equipamiento .equipment-grid article:nth-child(3) { transition-delay: .2s; }
  .quiz-panel .quiz-answers button { transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
  .quiz-panel .quiz-answers button:hover:not(:disabled) { transform: translateX(5px); box-shadow: 0 6px 16px #102b4314; }

  .motion-paused .quiz-cta-character,
  .motion-paused .quiz-cta-portrait img,
  .motion-paused .summer-hero-media,
  .motion-paused #fix-contact .fix-launcher::before,
  .motion-paused #fix-contact .fix-launcher img,
  .motion-paused #servicios .services-compact .service-top svg,
  .motion-paused #trivia-fix .quiz-guide::before,
  .motion-paused #trivia-fix .quiz-mascot,
  .motion-paused #equipamiento .equipment-fix {
    animation-play-state: paused !important;
  }
}

@keyframes fix-greet {
  0%, 100% { transform: translateY(0) rotate(0); }
  35% { transform: translateY(-8px) rotate(-1.7deg); }
  70% { transform: translateY(-2px) rotate(1deg); }
}

@keyframes fix-halo {
  0%, 100% { transform: scale(.9); opacity: .45; }
  50% { transform: scale(1.08); opacity: .95; }
}

@keyframes fix-cta-glow {
  0%, 100% { box-shadow: 0 12px 32px #051a3540; }
  50% { box-shadow: 0 16px 38px #4384b455; }
}

@keyframes fix-hero-bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-6px) rotate(1.5deg); }
}

@keyframes fix-feature-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes fix-service-icon {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-4px) rotate(-4deg); }
}

@keyframes fix-guide-ring {
  0%, 100% { opacity: .3; scale: .86; }
  50% { opacity: .8; scale: 1.04; }
}

@keyframes fix-topic-change {
  from { opacity: .35; transform: translateY(18px) scale(.94) rotate(-3deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes fix-tool-float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-4px) rotate(.5deg); }
}

@media (max-width: 700px) {
  #fix-contact .fix-launcher img { width: 66px; height: 99px; }
  #fix-contact .fix-launcher::before { width: 70px; height: 70px; right: 0; }
  .quiz-cta-portrait img { animation-duration: 5.2s; }
  #trivia-fix .quiz-guide::before { width: 155px; top: 58%; left: 74%; }
  #equipamiento .equipment-grid article .equipment-fix { animation-duration: 5.8s; }
}

@media (prefers-reduced-motion: reduce) {
  .fix-motion-ready .fix-reveal { opacity: 1; transform: none; transition: none; }
  .quiz-panel .quiz-answers button { transition: none; }
}
