@keyframes bai-cinematic-reveal {
    from {
      opacity: 0;
      transform: translateY(1.5rem) scale(0.985);
      filter: blur(1rem);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
      filter: blur(0);
    }
  }

  @keyframes bai-fade-in {
    from {
      opacity: 0;
      transform: translateY(0.5rem);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes bai-confidence-fill {
    from { inline-size: 0; }
    to { inline-size: var(--confidence, 82%); }
  }

  @keyframes bai-ai-pulse {
    0%, 100% {
      box-shadow: 0 0 0 0 oklch(77% 0.145 181 / 0.26);
    }
    50% {
      box-shadow: 0 0 0 0.7rem oklch(77% 0.145 181 / 0);
    }
  }

  @keyframes bai-typewriter {
    from { clip-path: inset(0 0 0 100%); }
    to { clip-path: inset(0 0 0 0); }
  }

  @keyframes bai-confetti {
    0% {
      opacity: 0;
      transform: translateY(-0.5rem) rotate(0deg);
    }
    20% { opacity: 1; }
    100% {
      opacity: 0;
      transform: translateY(5rem) rotate(28deg);
    }
  }

  .premium-demo .hero-copy,
  .premium-demo .quick-answer {
    animation: bai-cinematic-reveal var(--bai-duration-cinematic) var(--bai-ease-emphasis) both;
  }

  .premium-demo .quick-answer {
    animation-delay: 120ms;
  }

  .premium-demo :where(.quote-summary, .steps, .demo-workspace, .result-zone, .comparison, .use-cases, .faq, .final-cta) {
    animation: bai-fade-in var(--bai-duration-slow) var(--bai-ease-standard) both;
    animation-timeline: view();
    animation-range: entry 0% cover 28%;
  }

  .premium-demo :where(.sample-card, .steps li, .case-grid article, .compare-grid article, .result-promises li) {
    animation: bai-fade-in var(--bai-duration-slow) var(--bai-ease-standard) both;
    animation-delay: calc(var(--stagger-index, 0) * 70ms);
  }

  .premium-demo :where(.sample-card:nth-child(2), .steps li:nth-child(2), .case-grid article:nth-child(2), .result-promises li:nth-child(2)) {
    --stagger-index: 1;
  }

  .premium-demo :where(.sample-card:nth-child(3), .steps li:nth-child(3), .case-grid article:nth-child(3), .result-promises li:nth-child(3)) {
    --stagger-index: 2;
  }

  .premium-demo :where(.steps li:nth-child(4), .result-promises li:nth-child(4)) {
    --stagger-index: 3;
  }

  .premium-demo :where(.result-promises li:nth-child(n+5)) {
    --stagger-index: 4;
  }

  .premium-demo .loading-box:not([hidden]) {
    position: relative;
    overflow: hidden;
    animation: bai-cinematic-reveal var(--bai-duration-slow) var(--bai-ease-emphasis) both;
  }

  .premium-demo .loading-box:not([hidden])::before {
    content: "";
    position: absolute;
    inset: -35%;
    background:
      radial-gradient(circle, oklch(77% 0.145 181 / 0.22), transparent 22%),
      conic-gradient(from 90deg, transparent, oklch(80% 0.14 82 / 0.18), transparent);
    animation: bai-ai-pulse 1.8s var(--bai-ease-standard) infinite;
    pointer-events: none;
  }

  .premium-demo [data-stage].active,
  .premium-demo .btn-primary,
  .premium-demo .score-ring {
    animation: bai-ai-pulse 1.9s var(--bai-ease-standard) infinite;
  }

  .premium-demo .confidence-bar > span,
  .premium-demo [data-confidence-bar] > span {
    display: block;
    block-size: 100%;
    inline-size: var(--confidence, 82%);
    animation: bai-confidence-fill var(--bai-duration-cinematic) var(--bai-ease-emphasis) both;
  }

  .premium-demo .typewriter {
    display: inline-block;
    animation: bai-typewriter 1.1s steps(32, end) both;
  }

  .premium-demo .bai-confetti {
    position: fixed;
    inset-block-start: 18%;
    inset-inline: 0;
    z-index: var(--bai-z-toast);
    pointer-events: none;
  }

  .premium-demo .bai-confetti i {
    position: absolute;
    inline-size: 0.45rem;
    block-size: 0.75rem;
    border-radius: 0.125rem;
    background: var(--bai-brand);
    animation: bai-confetti var(--bai-duration-confetti) var(--bai-ease-emphasis) both;
  }

  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 1ms !important;
      animation-iteration-count: 1 !important;
      scroll-behavior: auto !important;
      transition-duration: 1ms !important;
    }

    .premium-demo .typewriter {
      clip-path: none;
    }
  }
