/* Pinnacle site-wide motion — calm, premium, accessible */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal,
  .hero-kenburns,
  .timeline-draw::before {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .timeline-draw::before {
    height: 100% !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  /* Scroll reveal */
  .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition:
      opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
  }

  .reveal.reveal-left {
    transform: translateX(-32px);
  }

  .reveal.reveal-right {
    transform: translateX(32px);
  }

  .reveal.reveal-scale {
    transform: scale(0.94);
  }

  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  /* Stronger stagger */
  .reveal-stagger > .reveal:nth-child(1) { transition-delay: 0.06s; }
  .reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.14s; }
  .reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.22s; }
  .reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.3s; }
  .reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.38s; }
  .reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.46s; }
  .reveal-stagger > .reveal:nth-child(7) { transition-delay: 0.54s; }
  .reveal-stagger > .reveal:nth-child(8) { transition-delay: 0.62s; }

  /* Header soft entrance */
  header.fixed {
    animation: pinnacleHeaderIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  @keyframes pinnacleHeaderIn {
    from {
      opacity: 0;
      transform: translateY(-12px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  /* Hero content gentle rise */
  @keyframes pinnacleHeroRise {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .hero-animate > * {
    animation: pinnacleHeroRise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .hero-animate > *:nth-child(1) { animation-delay: 0.1s; }
  .hero-animate > *:nth-child(2) { animation-delay: 0.22s; }
  .hero-animate > *:nth-child(3) { animation-delay: 0.34s; }
  .hero-animate > *:nth-child(4) { animation-delay: 0.46s; }
  .hero-animate > *:nth-child(5) { animation-delay: 0.58s; }

  /* Hero background ken burns (slow zoom) */
  .hero-kenburns {
    animation: pinnacleKenBurns 18s ease-in-out infinite alternate;
    transform-origin: center center;
    will-change: transform;
  }

  @keyframes pinnacleKenBurns {
    from {
      transform: scale(1);
    }
    to {
      transform: scale(1.08);
    }
  }

  /* Carousel slides: slow zoom while visible */
  .hero-slide.opacity-100 .hero-kenburns,
  .hero-slide .hero-kenburns {
    animation: pinnacleKenBurns 14s ease-in-out infinite alternate;
  }

  /* Card / interactive lift */
  article.group,
  .motion-card {
    transition:
      transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
      box-shadow 0.4s ease;
  }

  article.group:hover,
  .motion-card:hover {
    transform: translateY(-6px);
  }

  /* Buttons */
  a.inline-flex,
  button.px-4,
  button.px-5,
  button.px-6,
  button.px-8,
  a.px-5,
  a.px-6,
  a.px-8 {
    transition:
      transform 0.25s ease,
      background-color 0.25s ease,
      color 0.25s ease,
      box-shadow 0.25s ease,
      opacity 0.25s ease;
  }

  a.inline-flex:hover,
  button.px-4:hover,
  button.px-5:hover,
  button.px-6:hover,
  button.px-8:hover {
    transform: translateY(-1px);
  }

  a.inline-flex:active,
  button:active {
    transform: translateY(0) scale(0.98);
  }

  nav a.group span.absolute {
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* WhatsApp float pulse */
  aside.fixed.bottom-6 a {
    animation: pinnacleSoftPulse 2.8s ease-in-out infinite;
  }

  @keyframes pinnacleSoftPulse {
    0%, 100% {
      box-shadow: 0 16px 36px -12px rgba(16, 42, 67, 0.24);
    }
    50% {
      box-shadow: 0 16px 36px -12px rgba(16, 42, 67, 0.24), 0 0 0 8px rgba(117, 90, 40, 0.12);
    }
  }

  /* Timeline vertical line draw */
  .timeline-draw {
    position: relative;
  }

  .timeline-draw::before {
    transform-origin: top center;
    transform: scaleY(0);
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .timeline-draw.is-visible::before {
    transform: scaleY(1);
  }

  .timeline-draw .reveal {
    transition-delay: 0.15s;
  }

  /* Count-up numbers feel crisp */
  .count-up {
    font-variant-numeric: tabular-nums;
  }
}
