/* ZUGA real life — endlessly scrolling two-column photo collage + copy and features. */

.zuga-life {
  position: relative;
  background: var(--zuga-life-bg, var(--zuga-cream));
  overflow-x: clip;
}

.zuga-life__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(4rem, 6vw, 9rem);
  min-height: clamp(54rem, 50vw, 74rem);
}

.zuga-life--media-right .zuga-life__collage {
  order: 2;
}

/* --------------------------------------------------------------------------
   Collage: two columns that loop vertically in opposite directions. Each
   track holds the column twice; moving it by -50% loops seamlessly.
   -------------------------------------------------------------------------- */
.zuga-life__collage {
  --zuga-life-gap: clamp(1.2rem, 1.4vw, 1.8rem);

  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--zuga-life-gap);
  overflow: hidden;
  /* Soft fade where the photos enter at the top; at the bottom they run
     straight down under the next band's wavy edge, like the design. */
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 7%);
  mask-image: linear-gradient(180deg, transparent 0, #000 7%);
}

.zuga-life__col {
  position: relative;
  min-width: 0;
}

.zuga-life__track {
  position: absolute;
  inset: 0 0 auto;
  animation: zuga-life-up var(--zuga-life-speed, 45s) linear infinite;
}

.zuga-life__col--down .zuga-life__track {
  animation-name: zuga-life-down;
}

@media (hover: hover) and (pointer: fine) {
  .zuga-life__collage:hover .zuga-life__track {
    animation-play-state: paused;
  }
}

.zuga-life__group {
  display: grid;
  gap: var(--zuga-life-gap);
  padding-bottom: var(--zuga-life-gap);
}

@keyframes zuga-life-up {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-50%);
  }
}

@keyframes zuga-life-down {
  from {
    transform: translateY(-50%);
  }
  to {
    transform: translateY(0);
  }
}

.zuga-life__photo {
  position: relative;
  margin: 0;
  aspect-ratio: var(--zuga-life-ratio, 1 / 1);
  overflow: hidden;
  border-radius: 1.6rem;
  background: var(--zuga-life-tint, var(--zuga-green));
  box-shadow: 0 0 0 0.3rem var(--zuga-white);
}

.zuga-life__image,
.zuga-life__blank {
  display: block;
  width: 100%;
  height: 100%;
}

.zuga-life__image {
  object-fit: cover;
  transition: scale 0.7s var(--zuga-ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .zuga-life__photo:hover .zuga-life__image {
    scale: 1.06;
  }
}

/* --------------------------------------------------------------------------
   Copy
   -------------------------------------------------------------------------- */
.zuga-life__content {
  align-self: center;
  max-width: 54rem;
  padding: clamp(6rem, 8vw, 10rem) 0;
}

.zuga-life__title {
  font-size: clamp(3.6rem, 4.6vw, 6.4rem);
}

.zuga-life__text {
  margin: 2rem 0 3rem;
  font-size: 1.5rem;
  font-weight: 500;
}

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

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

.zuga-life__features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 2rem 1.6rem;
  margin: 0 0 3.2rem;
  padding: 0;
  list-style: none;
}

.zuga-life__feature {
  display: grid;
  justify-items: center;
  gap: 1rem;
  text-align: center;
}

.zuga-life__icon {
  display: grid;
  place-items: center;
  width: 4.6rem;
  height: 4.6rem;
  border: 0.15rem solid var(--zuga-orange);
  border-radius: 50%;
  color: var(--zuga-orange);
  transition:
    background-color 0.3s ease,
    transform 0.5s var(--zuga-ease-spring);
}

.zuga-life__icon .zuga-icon {
  width: 2.2rem;
  height: 2.2rem;
}

@media (hover: hover) and (pointer: fine) {
  .zuga-life__feature:hover .zuga-life__icon {
    background-color: var(--zuga-yellow);
    transform: translateY(-0.4rem) rotate(-10deg);
  }
}

.zuga-life__label {
  font-family: var(--zuga-font);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--zuga-text, var(--zuga-orange));
}

/* --------------------------------------------------------------------------
   Mobile: copy first, collage below at a fixed height
   -------------------------------------------------------------------------- */
@media screen and (max-width: 749px) {
  .zuga-life__grid {
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 0;
  }

  .zuga-life__collage {
    order: 2;
    height: 52rem;
    margin-bottom: 0; /* run into the testimonials wave below */
  }

  .zuga-life__content {
    padding: 6rem 0 4rem;
  }

  .zuga-life__features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .zuga-life__track {
    animation: none;
  }

  .zuga-life__image,
  .zuga-life__icon {
    transition: none;
  }
}
