/* ─────────────────────────────────────────────────────────────────────────
   Section: About — We All Deserve (Figma 2225:1896 / mobile 2362:5555)

   Mobile first: the Figma mobile swipe carousel. From lg: the 1440 frame —
   panel flush left, card row running off the right edge, moving
   horizontally with the page scroll.
   ───────────────────────────────────────────────────────────────────────── */

.section-deserve {
  --color-deserve-dot: #d9d9d9;

  position: relative;
  z-index: 1; /* the card row hangs over the next section's top spacing on desktop */
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* 24 */
  padding-block: 3.75rem; /* 60 */
  overflow: hidden;
  background-color: var(--color-navy-dark);
}

/* The pin wrapper only matters on desktop */
.section-deserve__pin {
  display: contents;
}

.section-deserve__panel {
  display: none;
}

/* ── Heading ────────────────────────────────────────────────────────────── */
.section-deserve__heading {
  max-width: 18.375rem; /* 294 */
  margin: 0;
  padding-left: 1.25rem; /* 20 */
  font-size: 1.875rem; /* 30 */
  line-height: 2.0625rem; /* 33 */
  letter-spacing: -0.016em;
}

.section-deserve__accent {
  letter-spacing: -0.019em;
}

/* ── Cards (mobile carousel) ────────────────────────────────────────────── */
.section-deserve__viewport {
  overflow-x: auto;
  scroll-padding-inline: 1.25rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.section-deserve__viewport::-webkit-scrollbar {
  display: none;
}

.section-deserve__row {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem; /* 24 */
  width: max-content;
  margin-top: 1rem; /* heading-to-cards 40 = section gap 24 + 16 */
  padding-inline: 1.25rem;
}

.section-deserve__card {
  position: relative;
  display: flex;
  flex: none;
  flex-direction: column;
  justify-content: flex-end;
  width: 18.6875rem; /* 299 */
  height: 31.3125rem; /* 501 */
  padding: 1.75rem; /* 28 */
  overflow: hidden;
  border: 0.0625rem solid var(--color-white);
  border-radius: 1.25rem; /* 20 */
  scroll-snap-align: start;
  isolation: isolate;
}

/* Photo cards: image + dark overlay + inset highlight */
.section-deserve__card--first::before,
.section-deserve__card--third::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(36.87deg, rgb(0 0 0 / 59%) 0.92%, rgb(0 0 0 / 0%) 102.65%);
}

.section-deserve__card--first,
.section-deserve__card--third {
  box-shadow: inset 0 0.25rem 0.25rem 0 rgb(255 255 255 / 25%);
}

.section-deserve__photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* Card 2: green, 473 tall, bottom-aligned with the others, no border */
.section-deserve__card--second {
  height: 29.5625rem; /* 473 */
  padding: 0 1.75rem 1.5rem; /* px-28 pb-24 */
  border-color: transparent;
  background-color: var(--color-green-light);
}

.section-deserve__text {
  max-width: 15.1875rem; /* 243 */
  margin: 0;
  font-size: 1.875rem; /* 30 */
  line-height: 2.0625rem; /* 33 */
  letter-spacing: -0.016em;
}

/* ── Page dots (mobile) ─────────────────────────────────────────────────── */
.section-deserve__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem; /* 10 */
}

.section-deserve__dot {
  width: 0.8125rem; /* 13 */
  height: 0.8125rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background-color: var(--color-deserve-dot);
  cursor: pointer;
  transition:
    width 0.25s ease,
    background-color 0.25s ease;
}

.section-deserve__dot.is-current {
  width: 2.5rem; /* 40 */
  background-color: var(--color-yellow);
}

/* ── Desktop: the 1440 frame ────────────────────────────────────────────── */
@media (width >= 64rem) {
  .section-deserve {
    display: block;
    margin-bottom: -11.625rem; /* the row hangs 186 below the frame (1230 vs 1044) */
    padding-block: 0;
    overflow: clip; /* clips the row at the screen edge without becoming a scroller (sticky needs that) */
    background-color: transparent;
  }

  .section-deserve__pin {
    position: relative;
    display: block;
    padding-top: 7rem; /* heading at 112 */
  }

  .section-deserve__panel {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    display: block;
    width: calc(100% - 8.75rem); /* 1300 at 1440: 140 short of the right edge */
    height: 64.4375rem; /* 1031 */
    border-radius: 0 var(--radius-card) var(--radius-card) 0;
    background-color: var(--color-navy-dark);
  }

  .section-deserve__heading {
    max-width: none;
    width: 46.5625rem; /* 745 */
    min-height: 12.75rem; /* Figma's heading box is 204 tall (the Rock Salt line sits above line 1) */
    padding-left: 9.5rem; /* 152 */
    box-sizing: content-box;
    font-size: 3.75rem; /* 60 */
    line-height: 3.5625rem; /* 57 */
    letter-spacing: -0.024em;
  }

  .section-deserve__accent {
    font-size: 4.0625rem; /* 65 */
    line-height: 0;
  }

  .section-deserve__viewport {
    margin-top: 7.125rem; /* 114 */
    overflow-x: auto;
    scroll-snap-type: none;
  }

  .section-deserve__row {
    gap: 2.5rem; /* 40 */
    margin-top: 0;
    padding-inline: 18.8125rem 8.75rem; /* row starts at x301 */
  }

  .section-deserve__card {
    width: 28.125rem; /* 450 */
    height: 46.875rem; /* 750 */
    padding: 0 2.125rem 4.0625rem; /* copy 34 from the left, 65 from the bottom */
    border-color: var(--color-white);
    border-radius: var(--radius-card);
    box-shadow: none;
  }

  .section-deserve__card--first {
    width: 30rem; /* 480 */
    height: 50rem; /* 800 */
    padding-left: 2.25rem; /* 36 */
  }

  .section-deserve__card--first::before,
  .section-deserve__card--third::before {
    background: linear-gradient(56.17deg, rgb(0 0 0 / 59%) 35.713%, rgb(0 0 0 / 0%) 67.856%);
  }

  .section-deserve__card--second {
    border-color: var(--color-white);
  }

  .section-deserve__text {
    font-size: 2.8125rem; /* 45 */
    line-height: 2.8125rem; /* 45 */
    letter-spacing: -0.024em;
  }

  .section-deserve__card--first .section-deserve__text {
    max-width: 25.4375rem; /* 407 */
  }

  .section-deserve__card--second .section-deserve__text {
    max-width: 23.875rem; /* 382 */
  }

  .section-deserve__card--third .section-deserve__text {
    max-width: 23.8125rem; /* 381 */
  }

  /* Figma crops: card 1 image 1232x821 at -248.5 / -10.7; card 3 image
     1143x762 (inner fill offset -11.92%) at -369.3 / -8 */
  .section-deserve__card--first .section-deserve__photo {
    inset: auto;
    top: -1.3333%;
    left: -51.7778%;
    width: 256.6979%;
    height: 102.6542%;
    object-fit: fill;
  }

  .section-deserve__card--third .section-deserve__photo {
    inset: auto;
    top: -1.0667%;
    left: -82.0711%;
    width: 254.0444%;
    height: 101.6%;
    object-fit: fill;
  }

  .section-deserve__dots {
    display: none;
  }

  /* Pinned horizontal scroll (JS adds .is-pinned; without JS or with
     reduced motion the row is a native horizontal scroller). The section
     grows by the row's overflow; while that extra height scrolls past,
     the pin box sticks with its bottom (the cards) in view and the row
     moves left by the same distance, ending with the last card at the
     panel's right edge. */
  .section-deserve.is-pinned {
    height: var(
      --space-deserve-runway,
      auto
    ); /* pin box + travel; a sticky box only moves inside the content box, so not padding */
  }

  .section-deserve.is-pinned .section-deserve__pin {
    position: sticky;
    top: var(--space-deserve-top, 0);
  }

  .section-deserve.is-pinned .section-deserve__viewport {
    overflow: visible;
  }

  .section-deserve.is-pinned .section-deserve__row {
    transform: translateX(var(--space-deserve-shift, 0));
  }
}
