/*
 * .outcomes-showcase — numbered outcomes, video with the wordmark and a
 * testimonial slider with a big number
 * (template-parts/flexible/outcomes-showcase.php).
 * Figma: /customer-success D 337:14232 (list 337:14244, video 337:14275,
 * testimonial 337:14277) / M 337:13972.
 *
 * Phones: one column (list 420, video 420, testimonial). From 768 px:
 * list | video, the testimonial below on the full width. From 1025 px:
 * three 560 px columns; --2 (one column empty) gives two halves.
 */

.outcomes-showcase {
  position: relative;
  isolation: isolate;
  padding-top: var(--nv-section-y);
  padding-bottom: var(--nv-section-y);
}

/* .outcomes-showcase__bg — optional texture, clipped to the section */
.outcomes-showcase__bg {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* .outcomes-showcase__bg-image — top right corner: 219 of 375 (M), 521 of 1520 (D) */
.outcomes-showcase__bg-image {
  position: absolute;
  top: 0;
  right: 0;
  width: 58.4%;
  height: auto;

  /* @media (width >= 48em) .outcomes-showcase__bg-image */
  @media (width >= 48em) {
    width: 34.28%;
  }
}

/* .outcomes-showcase__container — head → grid (40 → 100 px) */
.outcomes-showcase__container {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 1.1670rem + 5.6872vw, 6.25rem);
}

/* .outcomes-showcase__head */
.outcomes-showcase__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1.875rem, 1.4306rem + 1.8957vw, 3.125rem);
}

/* .outcomes-showcase__eyebrow — pill: 10 px around the cap height, 8.5 px rhomb, 5 px gap */
.outcomes-showcase__eyebrow {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.3125rem;
  padding: calc(0.625rem - 0.14em) 0.625rem;
  color: var(--nv-green);
  font-weight: 500;
  font-size: var(--nv-fs-eyebrow);
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;

  /* @media (width >= 48em) .outcomes-showcase__eyebrow — the phone mocks track 5 %, the desktop ones 10 % */
  @media (width >= 48em) {
    letter-spacing: 0.1em;
  }

  /* .outcomes-showcase__eyebrow::before — rhomb */
  &::before {
    content: "";
    flex-shrink: 0;
    width: 0.53rem;
    height: 0.53rem;
    margin-top: calc(0.5lh - 0.265rem);
    background: url("../../img/icons/rhomb.svg") center / contain no-repeat;
  }
}

/* .outcomes-showcase__title — 1100 px, 40 → 90 px, trimmed to cap / baseline */
.outcomes-showcase__title {
  max-width: 68.75rem;
  margin-block: -0.14em;
  color: var(--nv-navy);
  font-weight: 400;
  font-size: var(--nv-fs-h2);
  line-height: 1;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;

  & strong {
    color: var(--nv-green);
    font-weight: inherit;
  }
}

/* .outcomes-showcase__grid */
.outcomes-showcase__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;

  /* @media (width >= 48em) .outcomes-showcase__grid — two columns */
  @media (width >= 48em) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* .outcomes-showcase__grid--3 — the testimonial under list | video, then three columns */
.outcomes-showcase__grid--3 {
  /* @media (width >= 64.0625em) .outcomes-showcase__grid--3 */
  @media (width >= 64.0625em) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* .outcomes-showcase__grid--1 — a single column stays full width */
.outcomes-showcase__grid--1 {
  /* @media (width >= 48em) .outcomes-showcase__grid--1 */
  @media (width >= 48em) {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* .outcomes-showcase__box — light card with the list, centred vertically */
.outcomes-showcase__box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 0.0625rem solid rgba(168, 217, 95, 0.3);
  border-radius: var(--nv-radius-s);
  padding: calc(clamp(0.625rem, -0.1526rem + 3.3176vw, 2.8125rem) - 0.0625rem) calc(clamp(0.625rem, -0.0414rem + 2.8436vw, 2.5rem) - 0.0625rem);
  background-color: rgba(255, 255, 255, 0.3);

  /* @media (width >= 64.0625em) .outcomes-showcase__box — 560 px */
  @media (width >= 64.0625em) {
    min-height: 35rem;
  }
}

/* .outcomes-showcase__list */
.outcomes-showcase__list {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 1.1389rem + 0.4740vw, 1.5625rem);
}

/* .outcomes-showcase__item — number tile | text */
.outcomes-showcase__item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* .outcomes-showcase__number — 50 → 60 px tile, green "01." */
.outcomes-showcase__number {
  width: clamp(3.125rem, 2.9028rem + 0.9479vw, 3.75rem);
  height: clamp(3.125rem, 2.9028rem + 0.9479vw, 3.75rem);
  color: var(--nv-green);
  font-weight: 700;
  font-size: clamp(1.25rem, 1.1611rem + 0.3792vw, 1.5rem);
}

/* .outcomes-showcase__text — 20 → 23 px */
.outcomes-showcase__text {
  min-width: 0;
  color: var(--nv-navy);
  font-weight: 500;
  font-size: clamp(1.25rem, 1.1833rem + 0.2844vw, 1.4375rem);
  line-height: 1;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

/* .outcomes-showcase__media — bordered column like its neighbours, 420 px on
   phones; stretches with the row, the video fills it */
.outcomes-showcase__media {
  position: relative;
  min-height: 26.25rem;
  border: 0.0625rem solid rgba(168, 217, 95, 0.3);
  border-radius: var(--nv-radius-s);
  background-color: rgba(255, 255, 255, 0.3);
  overflow: hidden;

  /* @media (width >= 64.0625em) .outcomes-showcase__media — 560 px */
  @media (width >= 64.0625em) {
    min-height: 35rem;
  }
}

/* .outcomes-showcase__video — the full height of the row (Vlad 2026-10-17) */
.outcomes-showcase__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--nv-radius-s) - 0.0625rem);
  background-color: var(--nv-blue);
  object-fit: cover;
}

/* .outcomes-showcase__wordmark — white, top left of the video */
.outcomes-showcase__wordmark {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  width: 9.375rem;
  color: var(--nv-white);
  line-height: 0;

  & svg {
    width: 100%;
    height: auto;
  }
}

/* .outcomes-showcase__proof — bordered slider: cards on top, arrows at the bottom;
   cards → arrows 30 px everywhere (was 30 → 40, Pavlo 2026-10-17) */
.outcomes-showcase__proof {
  display: flex;
  flex-direction: column;
  gap: 1.875rem;
  border: 0.0625rem solid rgba(168, 217, 95, 0.3);
  border-radius: var(--nv-radius-s);
  padding: 1.25rem;
  background-color: rgba(255, 255, 255, 0.3);

  /* @media (width >= 64.0625em) .outcomes-showcase__proof */
  @media (width >= 64.0625em) {
    min-height: 35rem;
    padding: 3.125rem 1.875rem 1.875rem;
  }
}

/* .outcomes-showcase__grid--3 .outcomes-showcase__proof — under list | video on tablets */
.outcomes-showcase__grid--3 .outcomes-showcase__proof {
  /* @media (width >= 48em) .outcomes-showcase__grid--3 .outcomes-showcase__proof */
  @media (width >= 48em) {
    grid-column: 1 / -1;
  }

  /* @media (width >= 64.0625em) .outcomes-showcase__grid--3 .outcomes-showcase__proof */
  @media (width >= 64.0625em) {
    grid-column: auto;
  }
}

/* .outcomes-showcase__proof .slider__track — grows, so the arrows stay at the bottom;
   10 px more below (taken back by the margin), so the swiper's overflow does not cut
   the descenders of the role, trimmed to its baseline */
.outcomes-showcase__proof .slider__track {
  flex: 1 0 auto;
  width: 100%;
  margin-bottom: -0.625rem;
}

/* .outcomes-showcase__card — number, quote, author */
.outcomes-showcase__card {
  display: flex;
  flex-direction: column;
  gap: clamp(1.875rem, 1.2086rem + 2.8436vw, 3.125rem);
  padding-bottom: 0.625rem;
}

/* .outcomes-showcase__metric */
.outcomes-showcase__metric {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  color: var(--nv-navy);
  font-weight: 500;
}

/* .outcomes-showcase__metric-value — 50 → 75 px, trimmed to cap / baseline */
.outcomes-showcase__metric-value {
  margin-block: -0.14em;
  font-size: clamp(3.125rem, 2.5696rem + 2.3697vw, 4.6875rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

/* .outcomes-showcase__metric-label — 20 → 23 px, trimmed to cap / baseline */
.outcomes-showcase__metric-label {
  margin-block: -0.14em;
  font-size: clamp(1.25rem, 1.1833rem + 0.2844vw, 1.4375rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* .outcomes-showcase__quote — 20 → 23 px at 120 %, trimmed to cap / baseline */
.outcomes-showcase__quote {
  margin-block: -0.24em;
  color: var(--nv-navy);
  font-weight: 500;
  font-size: clamp(1.25rem, 1.1833rem + 0.2844vw, 1.4375rem);
  line-height: 1.2;
  letter-spacing: -0.02em;

  & p + p {
    margin-top: calc(0.75rem - 0.48em);
  }
}

/* .outcomes-showcase__body — quote, then "Read More" 15 px under it */
.outcomes-showcase__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9375rem;
}

/* .outcomes-showcase--clamp .outcomes-showcase__quote — from 1025 px 4 lines keep the row close
   to the 560 px of the design (Vlad 2026-10-17); below it the whole quote shows and the slider
   follows each slide (data-slider-auto-height). Set by outcomes-showcase.js, so without JS nothing is hidden */
.outcomes-showcase--clamp .outcomes-showcase__quote {
  /* @media (width >= 64.0625em) .outcomes-showcase--clamp .outcomes-showcase__quote */
  @media (width >= 64.0625em) {
    display: -webkit-box;
    max-height: 4.8em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    transition: max-height 0.5s ease;
  }

  /* @media (prefers-reduced-motion: reduce) .outcomes-showcase--clamp .outcomes-showcase__quote */
  @media (prefers-reduced-motion: reduce) {
    transition: none;
  }
}

/* .outcomes-showcase__card--open .outcomes-showcase__quote — the whole quote */
.outcomes-showcase--clamp .outcomes-showcase__card--open .outcomes-showcase__quote {
  display: block;
  max-height: none;
  -webkit-line-clamp: unset;
  line-clamp: none;
}

/* .outcomes-showcase__more — "Read More" / "Read Less" under the quote, from 1025 px only */
.outcomes-showcase__more {
  display: none;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;

  /* @media (width >= 64.0625em) .outcomes-showcase__more — shown when the quote is cut */
  @media (width >= 64.0625em) {
    &:not([hidden]) {
      display: inline-block;
    }
  }

  /* .outcomes-showcase__more:focus-visible */
  &:focus-visible {
    outline: 0.125rem solid var(--nv-green);
    outline-offset: 0.25rem;
  }
}

/* .outcomes-showcase__more-label — small and muted, like the role (Vlad's mock) */
.outcomes-showcase__more-label {
  color: rgba(19, 33, 50, 0.6);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}

/* @media (hover: hover) .outcomes-showcase__more:hover */
@media (hover: hover) and (pointer: fine) {
  .outcomes-showcase__more:hover .outcomes-showcase__more-label {
    color: var(--nv-navy);
  }
}

/* .outcomes-showcase--expanded — while a quote is open only the testimonial column grows:
   the list and the video keep the row height they had (outcomes-showcase.js) */
.outcomes-showcase--expanded {
  /* .outcomes-showcase--expanded .outcomes-showcase__grid */
  & .outcomes-showcase__grid {
    align-items: start;
  }

  /* .outcomes-showcase--expanded .outcomes-showcase__box, .outcomes-showcase__media */
  & :is(.outcomes-showcase__box, .outcomes-showcase__media) {
    height: var(--outcomes-row-height, auto);
  }
}

/* .outcomes-showcase__author — name and role | quote mark, 30 → 50 px under the quote (Figma);
   the arrows alone sit at the bottom */
.outcomes-showcase__author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
}

/* .outcomes-showcase__person */
.outcomes-showcase__person {
  min-width: 0;
  line-height: 1.6;
}

/* .outcomes-showcase__name — green, 18 → 23 px at 160 %, cap on the block edge */
.outcomes-showcase__name {
  margin-top: -0.44em;
  color: var(--nv-green);
  font-weight: 700;
  font-size: clamp(1.125rem, 1.0139rem + 0.4740vw, 1.4375rem);
  letter-spacing: -0.02em;
}

/* .outcomes-showcase__role — 16 → 20 px, muted, baseline on the block edge */
.outcomes-showcase__role {
  margin-bottom: -0.44em;
  color: rgba(19, 33, 50, 0.6);
  font-size: clamp(1rem, 0.9111rem + 0.3792vw, 1.25rem);
  letter-spacing: -0.02em;
}

/* .outcomes-showcase__mark — quote mark, 48 → 60 px */
.outcomes-showcase__mark {
  flex-shrink: 0;
  width: clamp(3rem, 2.7334rem + 1.1375vw, 3.75rem);
  height: auto;
}

/* .outcomes-showcase__nav — 64 → 74 px arrows with dots */
.outcomes-showcase__nav {
  & .slider-arrow {
    flex-basis: clamp(4rem, 3.7778rem + 0.9479vw, 4.625rem);
    width: clamp(4rem, 3.7778rem + 0.9479vw, 4.625rem);
    height: clamp(4rem, 3.7778rem + 0.9479vw, 4.625rem);
  }
}
