/* ============================================================
   WHY TEAMS CHOOSE US — horizontal slider with stat cards
   Sits between .two-ways and .testimonials
============================================================ */

.why-us {
  width: 100%;
  padding: 120px 0 120px;
  background: #F6F5F7;
  overflow: hidden; /* hide off-screen slider cards */
}

.why-us-inner {
  max-width: 1500px;
  width: calc(100% - 160px);
  margin: 0 auto;
}

/* ------------- HEADER ------------- */

.why-us-header {
  margin-bottom: 48px;
}

.why-us-title {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: clamp(32px, 3.6vw, 56px);
  line-height: 1.05;
  color: #1D1D1F;
  margin: 0;
  letter-spacing: -0.02em;
}

/* ------------- SLIDER ------------- */

.why-us-slider {
  position: relative;
  width: 100%;
  overflow: hidden;

  /* Fade out on the right edge so peeked cards don't show a cut border.
     Left edge stays sharp. */
  -webkit-mask-image: linear-gradient(
    to right,
    #000 0%,
    #000 92%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(
    to right,
    #000 0%,
    #000 92%,
    rgba(0, 0, 0, 0) 100%
  );
}

.why-us-track {
  display: flex;
  gap: 20px;

  /* JS sets transform: translateX(...) for slide transitions */
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* ------------- CARD ------------- */

.wu-card {
  flex: 0 0 400px; /* fixed width — ~3.x cards fit on typical desktop */
  height: 330px;
  min-width: 0;

  background: #ffffff;
  border-radius: 22px;
  padding: 28px 28px 30px;

  display: flex;
  flex-direction: column;
  gap: 10px;

  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.wu-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
}

.wu-card-number {
  display: inline-flex;
  align-items: baseline;

  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 72px;
  line-height: 1;
  color: #1D1D1F;
  letter-spacing: -0.03em;

  margin: 0 0 8px;
}

.wu-card-number--icon {
  align-items: center;
  color: #1D1D1F;
}

.wu-card-number--icon svg {
  width: 64px;
  height: 64px;
}

.wu-card-title {
  font-family: "Syne", sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.25;
  color: #1D1D1F;
  margin: 0;
  letter-spacing: -0.01em;
}

.wu-card-text {
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: #6E6E74;
  margin: 4px 0 0;
}

/* ------------- SLIDER NAV (arrows below slider, right-aligned) ------------- */

.why-us-nav {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 32px;
}

.wu-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #D8D7DB;
  background: transparent;
  color: #1D1D1F;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  padding: 0;

  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.25s ease;
}

.wu-nav-btn:hover {
  background: #1D1D1F;
  border-color: #1D1D1F;
  color: #ffffff;
}

.wu-nav-btn:active {
  transform: scale(0.94);
  transition-duration: 0.12s;
}

.wu-nav-btn:focus-visible {
  outline: 2px solid #F55629;
  outline-offset: 3px;
}

/* Disabled state — at first/last slide */
.wu-nav-btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ------------- RAMP-UP INITIAL STATE ------------- */

[data-wu-ramp],
[data-wu-card] {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(6px);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

[data-wu-ramp].is-in,
[data-wu-card].is-in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* IMPORTANT: once cards are "in", the track's translateX must still work.
   We only animate opacity/filter on cards here, not their transform,
   because the track transform handles slide movement.
   Re-override so ramp-up doesn't fight slider transform on cards: */
[data-wu-card].is-in {
  transform: none;
}

/* ------------- RESPONSIVE ------------- */

@media (max-width: 1400px) {
  .why-us-inner {
    width: calc(100% - 80px);
  }
}

/* Laptop — slightly smaller cards */
@media (max-width: 1200px) {
  .wu-card {
    flex-basis: 360px;
    height: 310px;
  }
}

/* Tablet */
@media (max-width: 900px) {
  .why-us {
    padding: 80px 0 80px;
  }

  .why-us-inner {
    width: calc(100% - 40px);
  }

  .why-us-header {
    margin-bottom: 36px;
  }

  .wu-card {
    flex-basis: 320px;
    height: 290px;
    padding: 24px 22px 26px;
  }

  .wu-card-number {
    font-size: 56px;
  }

  .wu-card-number--icon svg {
    width: 50px;
    height: 50px;
  }

  .wu-card-title {
    font-size: 20px;
  }

  .wu-card-text {
    font-size: 14px;
  }

  .why-us-nav {
    margin-top: 24px;
  }
}

/* Mobile — 1.1 cards visible (peek next) */
@media (max-width: 640px) {
  .why-us-inner {
    width: calc(100% - 24px);
  }

  .why-us-header {
    margin-bottom: 24px;
  }

  .why-us-track {
    gap: 14px;
  }

  .wu-card {
    flex-basis: 78%;
    height: 260px;
    padding: 22px 20px 24px;
  }

  .wu-card-number {
    font-size: 48px;
  }

  .wu-card-number--icon svg {
    width: 44px;
    height: 44px;
  }

  .wu-card-title {
    font-size: 18px;
  }

  .wu-card-text {
    font-size: 14px;
  }

  .wu-nav-btn {
    width: 40px;
    height: 40px;
  }

  .why-us-nav {
    margin-top: 20px;
  }
}

@media (max-width: 380px) {
  .wu-card {
    flex-basis: 84%;
    height: 250px;
    padding: 20px 18px 22px;
  }

  .wu-card-number {
    font-size: 42px;
  }

  .wu-card-title {
    font-size: 17px;
  }
}

/* ------------- REDUCED MOTION ------------- */

@media (prefers-reduced-motion: reduce) {
  .why-us-track {
    transition: none;
  }

  [data-wu-ramp],
  [data-wu-card] {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  .wu-card,
  .wu-nav-btn {
    transition: none;
  }

  .wu-card:hover {
    transform: none;
  }
}

/* Touch — no hover lift */
@media (hover: none) {
  .wu-card:hover {
    transform: none;
    box-shadow: none;
  }
}