/* Voices / testimonials — spotlight carousel */

#test {
  position: relative;
  overflow: hidden;
  background: var(--bg2);
}

#test::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 55% at 50% 0%, rgba(224, 90, 26, 0.14), transparent 62%),
    radial-gradient(ellipse 60% 40% at 100% 80%, rgba(232, 184, 90, 0.08), transparent 55%);
}

#test .test-wrap {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
}

#test .test-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 30px;
}

#test .test-lead {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

#test .test-stage {
  position: relative;
  border-radius: 24px;
  padding: clamp(28px, 4vw, 48px);
  background: rgba(10, 8, 5, 0.55);
  border: 1px solid rgba(138, 128, 120, 0.2);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
}

body.theme-light #test .test-stage {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(52, 44, 36, 0.14);
  box-shadow: 0 24px 60px rgba(52, 44, 36, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

#test .test-stage__ambient {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 60px rgba(224, 90, 26, 0.08);
  animation: test-ambient-pulse 5s ease-in-out infinite alternate;
}

@keyframes test-ambient-pulse {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 1;
  }
}

body.theme-light #test::before {
  background: radial-gradient(ellipse 80% 55% at 50% 0%, rgba(201, 78, 20, 0.12), transparent 62%),
    radial-gradient(ellipse 60% 40% at 100% 80%, rgba(184, 134, 46, 0.08), transparent 55%);
}

#test .test-stage__counter {
  position: absolute;
  top: clamp(20px, 3vw, 32px);
  right: clamp(20px, 3vw, 32px);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  z-index: 3;
}

#test .test-stage__counter #testCurrent {
  color: var(--gold2);
  font-weight: 500;
}

#test .test-stage__counter-sep {
  margin: 0 0.35em;
  opacity: 0.45;
}

#test .test-viewport {
  position: relative;
  min-height: clamp(300px, 42vw, 380px);
}

#test .test-track {
  position: relative;
  width: 100%;
  min-height: inherit;
}

#test .test-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(8px, 2vw, 20px) clamp(12px, 3vw, 48px) 0;
  opacity: 0;
  transform: translateX(48px) scale(0.97);
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

#test .test-card.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
  z-index: 2;
}

#test .test-card.is-leaving {
  opacity: 0;
  transform: translateX(-48px) scale(0.97);
  z-index: 1;
}

#test .test-card__mark {
  display: block;
  font-family: var(--serif);
  font-size: clamp(4rem, 12vw, 7rem);
  line-height: 0.75;
  color: rgba(224, 90, 26, 0.22);
  margin-bottom: -0.15em;
  user-select: none;
}

#test .test-card__quote {
  margin: 0;
  max-width: 920px;
}

#test .test-card__quote p {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3.2vw, 2.35rem);
  font-weight: 100;
  font-style: italic;
  line-height: 1.45;
  color: var(--text);
}

#test .test-card__quote em {
  font-style: italic;
  color: var(--orange-em);
}

#test .test-card__foot {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: clamp(28px, 4vw, 40px);
  padding-top: 22px;
  border-top: 1px solid rgba(138, 128, 120, 0.2);
}

#test .test-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(224, 90, 26, 0.45);
  box-shadow: 0 0 24px rgba(224, 90, 26, 0.25);
}

#test .test-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) brightness(0.92);
}

body.theme-light #test .test-card__avatar img {
  filter: saturate(1.1) brightness(1);
}

#test .test-card__who cite {
  display: block;
  font-style: normal;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

#test .test-card__who span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  line-height: 1.5;
}

#test .test-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 28px;
  position: relative;
  z-index: 3;
}

#test .test-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(224, 90, 26, 0.4);
  background: rgba(224, 90, 26, 0.08);
  color: var(--gold2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

#test .test-btn:hover {
  background: rgba(224, 90, 26, 0.18);
  border-color: rgba(224, 90, 26, 0.65);
  transform: scale(1.06);
}

#test .test-dots {
  display: flex;
  gap: 10px;
}

#test .test-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(138, 128, 120, 0.35);
  cursor: pointer;
  transition: transform 0.35s ease, background 0.35s ease, width 0.35s ease;
}

#test .test-dot.is-active {
  width: 28px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--gold2));
}

#test .test-timer {
  height: 2px;
  margin-top: 22px;
  border-radius: 999px;
  background: rgba(138, 128, 120, 0.2);
  overflow: hidden;
}

#test .test-timer__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--gold2));
}

#test .test-stage.is-playing .test-timer__fill {
  animation: test-timer-run 6.5s linear forwards;
}

@keyframes test-timer-run {
  to {
    width: 100%;
  }
}

#test .test-marquee {
  margin-top: 30px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(224, 90, 26, 0.2);
  background: rgba(224, 90, 26, 0.06);
  padding: 12px 0;
}

#test .test-marquee__track {
  display: flex;
  width: max-content;
  animation: test-marquee-scroll 28s linear infinite;
}

#test .test-marquee__track:hover {
  animation-play-state: paused;
}

@keyframes test-marquee-scroll {
  to {
    transform: translateX(-50%);
  }
}

#test .test-marquee__item {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 2rem;
  white-space: nowrap;
}

#test .test-marquee__sep {
  color: var(--orange);
  opacity: 0.55;
  font-size: 8px;
  padding: 0 0.25rem;
}

:is(.theme-v1, .theme-v2) #test .test-head {
  margin-bottom: var(--section-pad-y, 30px);
}

@media (max-width: 768px) {
  #test .test-stage__counter {
    position: static;
    text-align: right;
    margin-bottom: 12px;
  }

  #test .test-card {
    padding-left: 4px;
    padding-right: 4px;
  }

  #test .test-card__foot {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  #test .test-stage__ambient {
    animation: none;
    opacity: 0.75;
  }

  #test .test-marquee__track {
    animation: none;
  }

  #test .test-card {
    transition: opacity 0.35s ease;
    transform: none;
  }

  #test .test-card.is-leaving {
    transform: none;
  }

  #test .test-stage.is-playing .test-timer__fill {
    animation: none;
    width: 100%;
  }
}
