/* ── Scan sequence (phone) — 4.5s, 3 steps (no gaps between slides) ── */

.phone__screen .scan-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  animation-fill-mode: both;
}

.scan-slide--scan {
  opacity: 1;
  animation: scanShow1 4.5s infinite;
}

.scan-slide--import {
  animation: scanShow2 4.5s infinite;
}

.scan-slide--items {
  animation: scanShow3 4.5s infinite;
}

@keyframes scanShow1 {
  0%, 33.32% { opacity: 1; z-index: 2; }
  33.33%, 100% { opacity: 0; z-index: 0; }
}

@keyframes scanShow2 {
  0%, 33.32% { opacity: 0; z-index: 0; }
  33.33%, 66.65% { opacity: 1; z-index: 2; }
  66.66%, 100% { opacity: 0; z-index: 0; }
}

@keyframes scanShow3 {
  0%, 66.65% { opacity: 0; z-index: 0; }
  66.66%, 100% { opacity: 1; z-index: 2; }
}

/* Scan dots */
.scan-dots__dot {
  animation-fill-mode: both;
}

.scan-dots__dot--1 { animation: dotActive1 4.5s infinite; }
.scan-dots__dot--2 { animation: dotActive2 4.5s infinite; }
.scan-dots__dot--3 { animation: dotActive3 4.5s infinite; }

@keyframes dotActive1 {
  0%, 33.32% { background: #267A98; transform: scale(1.25); }
  33.33%, 100% { background: #E2E8F0; transform: scale(1); }
}

@keyframes dotActive2 {
  0%, 33.32% { background: #E2E8F0; transform: scale(1); }
  33.33%, 66.65% { background: #267A98; transform: scale(1.25); }
  66.66%, 100% { background: #E2E8F0; transform: scale(1); }
}

@keyframes dotActive3 {
  0%, 66.65% { background: #E2E8F0; transform: scale(1); }
  66.66%, 100% { background: #267A98; transform: scale(1.25); }
}

/* Desktop captions — scan */
@media (min-width: 900px) {
  .scan-caption {
    animation-fill-mode: both;
  }

  .scan-caption--1 { animation: captionActive1 4.5s infinite; }
  .scan-caption--2 { animation: captionActive2 4.5s infinite; }
  .scan-caption--3 { animation: captionActive3 4.5s infinite; }

  .scan-caption--1 .scan-caption__dot { animation: dotActive1 4.5s infinite; }
  .scan-caption--2 .scan-caption__dot { animation: dotActive2 4.5s infinite; }
  .scan-caption--3 .scan-caption__dot { animation: dotActive3 4.5s infinite; }

  @keyframes captionActive1 {
    0%, 33.32% { opacity: 1; }
    33.33%, 100% { opacity: 0.35; }
  }

  @keyframes captionActive2 {
    0%, 33.32% { opacity: 0.35; }
    33.33%, 66.65% { opacity: 1; }
    66.66%, 100% { opacity: 0.35; }
  }

  @keyframes captionActive3 {
    0%, 66.65% { opacity: 0.35; }
    66.66%, 100% { opacity: 1; }
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .phone__screen .scan-slide {
    animation: none;
    opacity: 0;
  }

  .scan-slide--scan {
    opacity: 1;
    z-index: 2;
  }

  .scan-dots__dot,
  .scan-caption {
    animation: none;
  }

  .scan-dots__dot--1 {
    background: #267A98;
    transform: scale(1.25);
  }

  .scan-caption--1 {
    opacity: 1;
  }

  .scan-caption--1 .scan-caption__dot {
    background: #267A98;
  }

  .slide-import__progress-fill,
  .slide-scan__spinner {
    animation: none;
  }

  .slide-import__progress-fill {
    width: 70%;
  }
}
