/* AI pillar — Excellence pass: progress, motion, interactive depth */

.ai-agents-pillar-page {
  --ai-scroll-offset: calc(var(--header-clearance, 4rem) + 3.25rem);
}

.ai-reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: calc(var(--z-header, 50) + 1);
  height: 3px;
  transform: scaleX(0);
  transform-origin: right center;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    var(--ai-accent),
    color-mix(in srgb, var(--ai-accent-2) 70%, var(--ai-accent))
  );
  box-shadow: 0 0 16px color-mix(in srgb, var(--ai-accent) 45%, transparent);
}

.ai-hub [id^="ai-"] {
  scroll-margin-top: var(--ai-scroll-offset);
}

.ai-hero {
  position: relative;
  overflow: hidden;
}

.ai-hero__glow {
  position: absolute;
  inset: -20% -10% auto;
  height: 70%;
  pointer-events: none;
  background: radial-gradient(
    ellipse 55% 45% at 75% 20%,
    color-mix(in srgb, var(--ai-accent) 22%, transparent),
    transparent 68%
  );
  animation: ai-hero-glow 16s var(--ai-ease) infinite alternate;
}

@keyframes ai-hero-glow {
  to {
    transform: translate3d(-3%, 4%, 0) scale(1.05);
    opacity: 0.85;
  }
}

.ai-subnav.is-scrolled {
  box-shadow: 0 10px 32px rgb(15 23 42 / 0.08);
  border-color: var(--ai-accent-border);
}

.ai-section__head h2 {
  position: relative;
  padding-bottom: 0.65rem;
}

.ai-section__head h2::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 2.75rem;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ai-accent), transparent);
}

.ai-section__head--center h2::after {
  inset-inline: 0;
  margin-inline: auto;
}

.ai-hub [data-stagger] > * {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.5s var(--ai-ease),
    transform 0.5s var(--ai-ease);
  transition-delay: calc(var(--stagger-index, 0) * 72ms);
}

.ai-hub [data-stagger].is-visible > * {
  opacity: 1;
  transform: none;
}

.ai-hub .glass-interactive {
  transition:
    transform 0.28s var(--ai-ease),
    box-shadow 0.28s var(--ai-ease),
    border-color 0.28s ease;
}

@media (hover: hover) {
  .ai-hub .glass-interactive:hover {
    transform: translateY(-3px);
    border-color: var(--ai-accent-border);
    box-shadow: 0 16px 40px rgb(15 23 42 / 0.07);
  }
}

.ai-bento__card.glass-interactive::before {
  opacity: 0.55;
}

.ai-faq__item {
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.ai-faq__item[open] {
  border-color: var(--ai-accent-border);
}

.ai-faq__item summary {
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease;
}

.ai-faq__item[open] summary {
  color: var(--ai-accent);
}

.ai-faq__item p {
  animation: ai-faq-in 0.35s var(--ai-ease);
}

@keyframes ai-faq-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.ai-cta {
  position: relative;
  overflow: hidden;
}

.ai-cta.is-visible::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgb(255 255 255 / 0.12) 50%,
    transparent 60%
  );
  transform: translateX(-120%);
  animation: ai-cta-shine 1.1s var(--ai-ease) 0.35s 1 forwards;
  pointer-events: none;
}

@keyframes ai-cta-shine {
  to {
    transform: translateX(120%);
  }
}

.ai-integrate-item a {
  color: var(--ai-accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--ai-accent) 35%, transparent);
}

.ai-integrate-item a:hover {
  border-bottom-color: var(--ai-accent);
}

@media (prefers-reduced-motion: reduce) {
  .ai-hero__glow,
  .ai-cta.is-visible::after,
  .ai-faq__item p {
    animation: none;
  }

  .ai-hub [data-stagger] > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
