/* =========================================================
   NEXT V2 — Tutomile-style community CTA (homepage)
   3 full photo rows (no clip) + centered copy + dual CTAs
   ========================================================= */

.next-v2 {
  --next-v2-shot-h: clamp(6.25rem, 10.5vw, 7.75rem);
  --next-v2-gap: 0.65rem;
  --next-v2-rows-h: calc(
    (3 * var(--next-v2-shot-h)) + (2 * var(--next-v2-gap))
  );
  position: relative;
  z-index: 2;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: calc(
    var(--next-v2-rows-h) + clamp(5.5rem, 10vh, 7.5rem)
  );
  margin-bottom: 0;
  padding: clamp(3.75rem, 7vh, 5.25rem) clamp(1.25rem, 4vw, 3rem)
    clamp(2.75rem, 5.5vh, 4rem);
  overflow: hidden;
  color: var(--white);
  background: var(--navy-dark);
}

.faq + .next-v2 {
  padding-top: clamp(3.75rem, 7vh, 5.25rem);
}

.next-v2__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.next-v2__marquee {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--next-v2-gap);
  height: var(--next-v2-rows-h);
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
  pointer-events: none;
  overflow: hidden;
}

.next-v2__row {
  overflow: hidden;
  flex-shrink: 0;
  width: 100%;
  height: var(--next-v2-shot-h);
}

.next-v2__track {
  display: flex;
  width: max-content;
  height: 100%;
  --marquee-shift: 50%;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  animation: nextV2MarqueeLtr var(--row-dur, 42s) linear infinite;
}

.next-v2__row--rtl .next-v2__track {
  animation-name: nextV2MarqueeRtl;
}

.next-v2__group {
  display: flex;
  flex-shrink: 0;
  align-items: stretch;
  gap: var(--next-v2-gap);
  height: 100%;
  margin-right: var(--next-v2-gap);
}

.next-v2__shot {
  display: block;
  flex: 0 0 auto;
  width: clamp(10.5rem, 16.5vw, 14.25rem);
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: var(--radius-lg, 1.25rem);
  opacity: 0.72;
  filter: saturate(0.78) brightness(0.62);
  pointer-events: none;
  -webkit-user-drag: none;
}

.next-v2__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      180deg,
      var(--navy-dark) 0%,
      rgba(21, 17, 62, 0.55) 16%,
      rgba(21, 17, 62, 0.28) 38%,
      rgba(21, 17, 62, 0.28) 62%,
      rgba(21, 17, 62, 0.62) 86%,
      var(--navy-dark) 100%
    ),
    radial-gradient(
      ellipse 58% 72% at 50% 48%,
      rgba(15, 16, 48, 0.78) 0%,
      rgba(15, 16, 48, 0.52) 42%,
      rgba(15, 16, 48, 0.22) 72%,
      rgba(15, 16, 48, 0.08) 100%
    );
  pointer-events: none;
}

.next-v2__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.95rem;
  width: min(42rem, 100%);
  text-align: center;
}

.next-v2__content::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -2.25rem -2.75rem;
  background: radial-gradient(
    ellipse at center,
    rgba(12, 14, 42, 0.72) 0%,
    rgba(12, 14, 42, 0.38) 52%,
    transparent 74%
  );
  pointer-events: none;
}

.next-v2__eyebrow,
.next-v2 .eyebrow,
.next-v2 .eyebrow-lockup {
  margin: 0;
  color: var(--brand-gold, var(--gold));
  justify-content: center;
}

.next-v2__title {
  margin: 0;
  max-width: 16ch;
  color: var(--white);
  font-family: var(--font-primary);
  font-size: clamp(2.15rem, 4.6vw, 3.45rem);
  font-weight: var(--font-primary-weight, 400);
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
  text-shadow: 0 2px 22px rgba(8, 10, 36, 0.72);
}

.next-v2__lede {
  margin: 0;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(1.02rem, 1.45vw, 1.2rem);
  line-height: 1.5;
  text-shadow: 0 1px 16px rgba(8, 10, 36, 0.7);
}

.next-v2__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.55rem;
}

.next-v2__actions .btn {
  min-width: 10rem;
}

@keyframes nextV2MarqueeLtr {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(calc(-1 * var(--marquee-shift, 50%)), 0, 0); }
}

@keyframes nextV2MarqueeRtl {
  from { transform: translate3d(calc(-1 * var(--marquee-shift, 50%)), 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

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

@media (max-width: 900px) {
  .next-v2 {
    --next-v2-shot-h: 6.35rem;
    --next-v2-gap: 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 0;
    padding: 0 0 1.85rem;
    place-items: unset;
  }

  .faq + .next-v2 {
    padding-top: 0;
  }

  .next-v2__media {
    position: relative;
    inset: auto;
    flex: 0 0 auto;
  }

  .next-v2__marquee {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    z-index: 0;
    height: auto;
    margin: 0;
    padding: 0.85rem 0 0.7rem;
    transform: none;
    overflow: hidden;
  }

  .next-v2__track {
    animation-duration: 18s;
  }

  .next-v2__row:nth-child(2) .next-v2__track {
    animation-duration: 22s;
  }

  .next-v2__row:nth-child(3) .next-v2__track {
    animation-duration: 20s;
  }

  .next-v2__shot {
    width: clamp(8.5rem, 42vw, 12rem);
    opacity: 1;
    filter: saturate(0.95) brightness(0.92);
    border-radius: 0.75rem;
  }

  .next-v2__veil {
    display: block;
    z-index: 1;
    background:
      linear-gradient(
        180deg,
        rgba(21, 17, 62, 0.08) 0%,
        rgba(21, 17, 62, 0.2) 46%,
        rgba(21, 17, 62, 0.32) 100%
      );
  }

  .next-v2__content {
    position: relative;
    z-index: 2;
    width: min(22.75rem, calc(100% - 2rem));
    margin: 0.35rem auto 0;
    gap: 0.7rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .next-v2__content::before {
    display: none;
  }

  .next-v2__title {
    max-width: none;
    font-size: clamp(1.55rem, 6.4vw, 1.9rem);
    line-height: 1.18;
    letter-spacing: -0.03em;
    text-shadow: none;
  }

  .next-v2__lede {
    max-width: none;
    font-size: 0.95rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: none;
  }

  .next-v2__actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.45rem;
  }

  .next-v2__actions .btn {
    flex: 0 1 auto;
  }
}

@media (max-width: 600px) {
  .next-v2 {
    --next-v2-shot-h: 5.85rem;
    padding-bottom: 1.65rem;
  }

  .next-v2__marquee {
    padding: 0.7rem 0 0.55rem;
  }

  .next-v2__shot {
    width: min(10rem, 48vw);
    border-radius: 0.65rem;
  }

  .next-v2__content {
    width: calc(100% - 1.8rem);
    gap: 0.62rem;
  }

  .next-v2__title {
    font-size: 1.55rem;
    line-height: 1.16;
  }

  .next-v2__lede {
    font-size: 0.9rem;
    line-height: 1.42;
  }
}
