/**
 * Motion layer for hs-theme-cyber — complements AOS (scroll reveals).
 * Respects prefers-reduced-motion throughout.
 */

/* --- Chrome: promo bar + nav ----------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes hs-promo-enter {
    from {
      opacity: 0;
      transform: translateY(-100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  #announcement-bar.hs-announcement-bar:not(.hidden) {
    animation: hs-promo-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  @keyframes hs-nav-settle {
    from {
      opacity: 0.88;
      transform: translateY(-6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .hs-top-chrome {
    animation: hs-nav-settle 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
  }

  @keyframes hs-brand-glow {
    0%,
    100% {
      box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
    }
    50% {
      box-shadow: 0 0 16px rgba(56, 189, 248, 0.55);
    }
  }

  .hs-layout-brand-dot {
    animation: hs-brand-glow 2.8s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  #announcement-bar.hs-announcement-bar,
  .hs-top-chrome,
  .hs-layout-brand-dot {
    animation: none !important;
  }

  #hs-whatsapp-btn.hs-whatsapp-fab {
    animation: none !important;
  }
}

/* --- Interactive hovers + FAB ----------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .hs-live-tile {
    transition:
      transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
      border-color 0.25s ease,
      box-shadow 0.35s ease;
  }

  @media (hover: hover) {
    .hs-live-tile:hover {
      transform: translateY(-4px);
      border-color: rgba(56, 189, 248, 0.32);
      box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
    }
  }

  .hs-visual-card img {
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  }

  @media (hover: hover) {
    .hs-visual-card:hover img {
      transform: scale(1.04);
    }
  }

  .hs-layout-nav-desktop > a,
  .hs-layout-nav-dd-trigger {
    transition:
      color 0.18s ease,
      transform 0.18s ease;
  }

  @media (hover: hover) {
    .hs-layout-nav-desktop > a:hover,
    .hs-layout-nav-dd-trigger:hover {
      transform: translateY(-1px);
    }
  }

  .hs-hero-inline-link {
    transition:
      color 0.2s ease,
      text-underline-offset 0.2s ease;
  }

  @keyframes hs-wa-attn {
    0%,
    100% {
      transform: scale(1);
      box-shadow:
        0 4px 18px rgba(34, 197, 94, 0.28),
        0 0 0 0 rgba(34, 197, 94, 0.18);
    }
    55% {
      transform: scale(1.032);
      box-shadow:
        0 8px 26px rgba(34, 197, 94, 0.36),
        0 0 0 12px transparent;
    }
  }

  #hs-whatsapp-btn.hs-whatsapp-fab {
    animation: hs-wa-attn 9s ease-in-out infinite;
  }

  .hs-home-premium .hs-btn--primary {
    transition:
      transform 0.2s ease,
      box-shadow 0.25s ease;
  }

  @media (hover: hover) {
    .hs-home-premium .hs-btn--primary:hover {
      transform: translateY(-2px);
    }
  }
}

/* --- Hero load-in (above the fold — CSS, not scroll) ------------------------ */
@media (prefers-reduced-motion: no-preference) {
  @keyframes hs-rise-in {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes hs-slide-in-right {
    from {
      opacity: 0;
      transform: translateX(28px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  @keyframes hs-fade-in {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  @keyframes hs-ambient-shift {
    0%,
    100% {
      opacity: 1;
      filter: hue-rotate(0deg);
    }
    50% {
      opacity: 0.94;
      filter: hue-rotate(8deg);
    }
  }

  @keyframes hs-dot-pulse {
    0%,
    100% {
      transform: scale(1);
      box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.35);
    }
    50% {
      transform: scale(1.12);
      box-shadow: 0 0 0 6px transparent;
    }
  }

  html.hs-theme-cyber .hs-page-bg {
    animation: hs-ambient-shift 22s ease-in-out infinite;
  }

  .hs-ent-hero__copy > .hs-ent-eyebrow {
    animation: hs-rise-in 0.62s cubic-bezier(0.22, 1, 0.36, 1) 0.04s both;
  }

  .hs-ent-hero__copy > .hs-ent-hero__title {
    animation: hs-rise-in 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
  }

  .hs-ent-hero__copy > .hs-ent-hero__lead {
    animation: hs-rise-in 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
  }

  .hs-ent-hero__copy > .hs-ent-cta-row {
    animation: hs-rise-in 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.26s both;
  }

  .hs-ent-hero__copy > .hs-ent-hero__stats {
    animation: hs-rise-in 0.78s cubic-bezier(0.22, 1, 0.36, 1) 0.34s both;
  }

  .hs-ent-hero__copy > .hs-ent-hint {
    animation: hs-fade-in 0.6s ease 0.48s both;
  }

  .hs-ent-hero__panel {
    animation: hs-slide-in-right 0.88s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
  }

  .hs-ent-panel__grid > .hs-ent-panel__cell {
    animation: hs-rise-in 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .hs-ent-panel__grid > .hs-ent-panel__cell:nth-child(1) {
    animation-delay: 0.38s;
  }
  .hs-ent-panel__grid > .hs-ent-panel__cell:nth-child(2) {
    animation-delay: 0.44s;
  }
  .hs-ent-panel__grid > .hs-ent-panel__cell:nth-child(3) {
    animation-delay: 0.5s;
  }
  .hs-ent-panel__grid > .hs-ent-panel__cell:nth-child(4) {
    animation-delay: 0.56s;
  }
  .hs-ent-panel__grid > .hs-ent-panel__cell:nth-child(5) {
    animation-delay: 0.62s;
  }
  .hs-ent-panel__grid > .hs-ent-panel__cell:nth-child(6) {
    animation-delay: 0.68s;
  }
  .hs-ent-panel__grid > .hs-ent-panel__cell:nth-child(n + 7) {
    animation-delay: 0.74s;
  }

  .hs-ent-eyebrow__dot,
  .hs-ent-panel__status.is-ok .hs-ent-panel__status-dot {
    animation: hs-dot-pulse 2.6s ease-in-out infinite;
  }

  body[data-hs-cyber-product-landing] main > section:first-of-type h1,
  body[data-hs-india-pillar] main > section:first-of-type h1 {
    animation: hs-rise-in 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
  }

  body[data-hs-cyber-product-landing] main > section:first-of-type .hs-in-section-eyebrow,
  body[data-hs-cyber-product-landing] main > section:first-of-type .hs-ent-eyebrow,
  body[data-hs-india-pillar] main > section:first-of-type .hs-in-section-eyebrow {
    animation: hs-rise-in 0.62s cubic-bezier(0.22, 1, 0.36, 1) 0.02s both;
  }

  body[data-hs-cyber-product-landing] main > section:first-of-type .hs-hero__lead,
  body[data-hs-cyber-product-landing] main > section:first-of-type > .hs-container > p:first-of-type {
    animation: hs-rise-in 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
  }

  html.hs-theme-cyber .hs-btn {
    transition:
      transform 0.18s ease,
      box-shadow 0.22s ease,
      background 0.18s ease,
      border-color 0.18s ease;
  }

  @media (hover: hover) {
    html.hs-theme-cyber .hs-btn:hover {
      transform: translateY(-1px);
    }

    html.hs-theme-cyber .hs-btn:active {
      transform: translateY(0);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html.hs-theme-cyber .hs-page-bg,
  .hs-ent-hero__copy > *,
  .hs-ent-hero__panel,
  .hs-ent-panel__grid > .hs-ent-panel__cell,
  body[data-hs-cyber-product-landing] main > section:first-of-type h1,
  body[data-hs-india-pillar] main > section:first-of-type h1 {
    animation: none !important;
  }
}
