@media (prefers-reduced-motion: no-preference) {
  [data-animate] {
    opacity: 0;
    transform: translateY(1.5rem);
    transition:
      opacity var(--transition-slow),
      transform var(--transition-slow);
  }

  [data-animate="fade"] {
    transform: none;
  }

  [data-animate="scale"] {
    transform: scale(0.96);
  }

  [data-animate="left"] {
    transform: translateX(-1.5rem);
  }

  [data-animate="right"] {
    transform: translateX(1.5rem);
  }

  [data-animate].is-visible {
    opacity: 1;
    transform: none;
  }

  /* Hero stagger */
  .hero__content [data-animate]:nth-child(1) { transition-delay: 0ms; }
  .hero__content [data-animate]:nth-child(2) { transition-delay: 100ms; }
  .hero__content [data-animate]:nth-child(3) { transition-delay: 200ms; }
  .hero__content [data-animate]:nth-child(4) { transition-delay: 300ms; }
  .hero__content [data-animate]:nth-child(5) { transition-delay: 400ms; }

  .section__header[data-animate] { transition-delay: 0ms; }

  /* Card grid stagger */
  .card-grid [data-animate]:nth-child(1) { transition-delay: 0ms; }
  .card-grid [data-animate]:nth-child(2) { transition-delay: 90ms; }
  .card-grid [data-animate]:nth-child(3) { transition-delay: 180ms; }
  .card-grid [data-animate]:nth-child(4) { transition-delay: 270ms; }

  .steps [data-animate]:nth-child(1) { transition-delay: 0ms; }
  .steps [data-animate]:nth-child(2) { transition-delay: 130ms; }
  .steps [data-animate]:nth-child(3) { transition-delay: 260ms; }

  .accordion__item {
    opacity: 0;
    transform: translateY(0.75rem);
    transition:
      opacity 0.45s ease,
      transform 0.45s ease,
      border-color var(--transition),
      box-shadow var(--transition);
  }

  .accordion.is-visible .accordion__item,
  [data-animate].is-visible .accordion__item {
    opacity: 1;
    transform: none;
  }

  .accordion__item:nth-child(1) { transition-delay: 0ms; }
  .accordion__item:nth-child(2) { transition-delay: 60ms; }
  .accordion__item:nth-child(3) { transition-delay: 120ms; }
  .accordion__item:nth-child(4) { transition-delay: 180ms; }
  .accordion__item:nth-child(5) { transition-delay: 240ms; }
  .accordion__item:nth-child(6) { transition-delay: 300ms; }
  .accordion__item:nth-child(7) { transition-delay: 360ms; }

  /* Hero ambient motion */
  .hero__grid {
    animation: grid-drift 28s linear infinite;
  }

  .hero__orb--blue {
    animation: orb-float 14s ease-in-out infinite;
  }

  .hero__orb--green {
    animation: orb-float 18s ease-in-out infinite reverse;
  }

  .hero::after {
    content: "";
    position: absolute;
    width: 50%;
    height: 3px;
    bottom: 0;
    left: 25%;
    background: var(--gradient-brand-h);
    opacity: 0.4;
    border-radius: var(--radius-pill);
    animation: shimmer-line 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
  }

  @keyframes grid-drift {
    from { background-position: 0 0, 0 0; }
    to { background-position: 48px 48px, 48px 48px; }
  }

  @keyframes orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
    33% { transform: translate(2rem, -1.5rem) scale(1.06); opacity: 0.9; }
    66% { transform: translate(-1rem, 1rem) scale(0.96); opacity: 0.75; }
  }

  @keyframes shimmer-line {
    0%, 100% { opacity: 0.25; transform: scaleX(0.6); }
    50% { opacity: 0.65; transform: scaleX(1); }
  }

  @keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }

  .btn--primary {
    animation: gradient-shift 8s ease infinite;
    background-size: 200% 200%;
  }

  /* Interactive hover */
  .card[data-animate].is-visible:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  }

  .card__icon {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .card:hover .card__icon {
    transform: scale(1.08);
    box-shadow: 0 0 20px color-mix(in srgb, var(--brand-cyan) 30%, transparent);
  }

  .btn:not(.btn--disabled):not(.btn--soon):hover {
    transform: translateY(-2px);
  }

  .btn:not(.btn--disabled):not(.btn--soon):active {
    transform: translateY(0);
  }

  .text-gradient {
    background-size: 200% auto;
    animation: gradient-shift 10s ease infinite;
  }

  /* Accordion panel slide */
  .accordion__panel {
    display: block;
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    transition:
      max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
      padding 0.4s ease;
  }

  .accordion__item.is-open .accordion__panel {
    max-height: 24rem;
    padding-bottom: var(--space-md);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1;
    transform: none;
  }

  .accordion__item {
    opacity: 1;
    transform: none;
  }

  .accordion__panel {
    display: none;
  }

  .accordion__item.is-open .accordion__panel {
    display: block;
  }

  .btn--primary {
    animation: none;
  }
}
