/* ZUGA testimonials — green band, endlessly scrolling review cards. */

/* Paint above the band before so the wavy top edge sits on top of it. */
.section-zuga-testimonials {
  position: relative;
  z-index: 3;
}

.zuga-testi {
  /* Eight petals around a centre disc. */
  --zuga-flower-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='%23000'%3E%3Ccircle cx='50' cy='50' r='31'/%3E%3Ccircle cx='80' cy='50' r='19'/%3E%3Ccircle cx='71.2' cy='71.2' r='19'/%3E%3Ccircle cx='50' cy='80' r='19'/%3E%3Ccircle cx='28.8' cy='71.2' r='19'/%3E%3Ccircle cx='20' cy='50' r='19'/%3E%3Ccircle cx='28.8' cy='28.8' r='19'/%3E%3Ccircle cx='50' cy='20' r='19'/%3E%3Ccircle cx='71.2' cy='28.8' r='19'/%3E%3C/g%3E%3C/svg%3E");

  position: relative;
  padding: clamp(6rem, 8vw, 10rem) 0 clamp(8rem, 10vw, 12rem);
  background: var(--zuga-testi-bg, var(--zuga-green));
  overflow-x: clip;
}

.zuga-testi__heading {
  margin-bottom: clamp(3.6rem, 5vw, 6rem);
  font-size: clamp(3.4rem, 4.4vw, 6rem);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Marquee: the card row twice; moving the track by -50% loops seamlessly.
   -------------------------------------------------------------------------- */
.zuga-testi__marquee {
  --zuga-testi-gap: clamp(1.6rem, 1.6vw, 2.4rem);

  overflow: hidden;
  padding: 1.2rem 0 2rem; /* room for the hover lift */
}

.zuga-testi__track {
  display: flex;
  width: max-content;
  animation: zuga-testi-scroll var(--zuga-testi-speed, 50s) linear infinite;
}

@media (hover: hover) and (pointer: fine) {
  .zuga-testi__marquee:hover .zuga-testi__track,
  .zuga-testi__marquee:focus-within .zuga-testi__track {
    animation-play-state: paused;
  }
}

.zuga-testi__group {
  display: flex;
  gap: var(--zuga-testi-gap);
  padding-right: var(--zuga-testi-gap);
}

@keyframes zuga-testi-scroll {
  to {
    transform: translateX(-50%);
  }
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.zuga-testi__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: clamp(26rem, 24vw, 34rem);
  min-height: clamp(30rem, 27vw, 36rem);
  padding: 2.8rem 2.4rem 2.6rem;
  overflow: hidden;
  border: 0.15rem solid rgba(255, 255, 255, 0.7);
  border-radius: 1.8rem;
  background: var(--zuga-testi-card);
  text-align: center;
  transition:
    transform 0.5s var(--zuga-ease-spring),
    box-shadow 0.4s ease;
}

/* Faint white brush texture, like the design. */
.zuga-testi__card::before {
  content: '';
  position: absolute;
  inset: -10% -30%;
  background: var(--zuga-testi-texture) center / 120% auto no-repeat;
  opacity: 0.35;
  transform: rotate(-12deg);
  pointer-events: none;
}

.zuga-testi__card > * {
  position: relative;
}

@media (hover: hover) and (pointer: fine) {
  .zuga-testi__card:hover {
    transform: translateY(-0.8rem) rotate(-1.2deg);
    box-shadow: 0 1.2rem 0 rgba(232, 80, 28, 0.12);
  }
}

.zuga-testi__stars {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.6rem;
}

.zuga-testi__star {
  width: 1.8rem;
  height: 1.8rem;
  fill: #e9a80b;
}

.zuga-testi__star--off {
  fill: rgba(232, 80, 28, 0.2);
}

/* Stars pop in one after another when the row scrolls into view. */
.zuga-motion .zuga-testi__star {
  transform: scale(0) rotate(-90deg);
  transition: transform 0.5s var(--zuga-ease-spring);
  transition-delay: calc(var(--zuga-star) * 0.08s + 0.2s);
}

.zuga-motion .zuga-testi__marquee.is-inview .zuga-testi__star {
  transform: none;
}

.zuga-testi__title {
  margin: 0 0 1.2rem;
  font-family: var(--zuga-font);
  font-size: clamp(2rem, 1.8vw, 2.6rem);
  font-weight: 800;
  font-stretch: var(--zuga-stretch);
  line-height: 1.05;
  color: var(--zuga-heading, var(--zuga-orange));
}

.zuga-testi__quote {
  flex: 1;
  font-family: var(--zuga-font);
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--zuga-text, var(--zuga-orange));
  opacity: 0.85;
}

.zuga-testi__quote > :first-child {
  margin-top: 0;
}

.zuga-testi__quote > :last-child {
  margin-bottom: 0;
}

.zuga-testi__author {
  display: grid;
  justify-items: center;
  gap: 0.8rem;
  margin-top: 2rem;
}

/* Flower-shaped photo frame */
.zuga-testi__flower {
  position: relative;
  display: block;
  width: 6.8rem;
  height: 6.8rem;
}

.zuga-testi__petals,
.zuga-testi__face {
  position: absolute;
  display: block;
}

.zuga-testi__petals {
  inset: 0;
  background: var(--zuga-flower);
  -webkit-mask: var(--zuga-flower-shape) center / contain no-repeat;
  mask: var(--zuga-flower-shape) center / contain no-repeat;
  transition: transform 0.8s var(--zuga-ease-spring);
}

@media (hover: hover) and (pointer: fine) {
  .zuga-testi__card:hover .zuga-testi__petals {
    transform: rotate(45deg) scale(1.06);
  }
}

/* Photo fills most of the flower so only the petal tips show as a frame. */
.zuga-testi__face {
  inset: 10%;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}

.zuga-testi__face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zuga-testi__name {
  font-family: var(--zuga-font);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--zuga-text, var(--zuga-orange));
}

/* --------------------------------------------------------------------------
   Touch screens: a native, swipeable scroller. zuga-motion.js
   ([data-zuga-autoscroll]) keeps it drifting and pauses it under a finger.
   -------------------------------------------------------------------------- */
@media (hover: none) {
  .zuga-testi__marquee {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .zuga-testi__marquee::-webkit-scrollbar {
    display: none;
  }

  .zuga-testi__track {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion: no auto-scroll; let people swipe the row instead.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .zuga-testi__marquee {
    overflow-x: auto;
  }

  .zuga-testi__track {
    animation: none;
    padding: 0 1.5rem;
  }

  .zuga-testi__group[aria-hidden='true'] {
    display: none;
  }

  .zuga-motion .zuga-testi__star {
    transform: none;
    transition: none;
  }

  .zuga-testi__card,
  .zuga-testi__petals {
    transition: none;
  }
}
