.customer-stories {
  --customer-stories-navy: #071b37;
  --customer-stories-blue: #123fc7;
  --customer-stories-electric: #0003d9;
  --customer-stories-teal: #35c8b0;
  --customer-stories-pale-teal: #dff7f2;
  --customer-stories-pale-blue: #e6edff;
  --customer-stories-border: #d9e0e6;
  --customer-stories-white: #fff;
  margin: 0;
  padding: 120px 0;
  background: #fbfbfa;
}

.customer-stories__header {
  max-width: 950px;
  margin: 0 auto 55px;
}

.customer-stories__header .b2-eyebrow {
  margin-bottom: 14px;
  color: #008f83;
}

.customer-stories__header h2 {
  max-width: 900px;
  margin-right: auto;
  margin-bottom: 20px;
  margin-left: auto;
}

.customer-stories__intro {
  max-width: 760px;
  margin: 0 auto;
}

.customer-stories__intro p {
  font-size: 1.125rem;
  line-height: 1.45;
}

.customer-stories__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(0, 0.93fr);
  grid-auto-rows: minmax(310px, auto);
  gap: 20px;
}

.customer-story-card {
  position: relative;
  min-width: 0;
  min-height: 310px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--customer-stories-navy);
  isolation: isolate;
}

.customer-story-card--featured {
  grid-row: span 2;
  min-height: 640px;
}

.customer-story-card__media,
.customer-story-card__shade {
  position: absolute;
  inset: 0;
}

.customer-story-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.55s ease;
}

.customer-story-card__shade {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(1, 18, 39, 0.98) 0%, rgba(1, 18, 39, 0.9) 38%, rgba(1, 18, 39, 0.25) 72%, rgba(1, 18, 39, 0.05) 100%),
    linear-gradient(0deg, rgba(1, 18, 39, 0.65) 0%, transparent 45%);
}

.customer-story-card:hover .customer-story-card__image {
  transform: scale(1.025);
}

.customer-story-card__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: min(62%, 500px);
  height: 100%;
  min-height: inherit;
  padding: 36px 38px 34px;
}

.customer-story-card--featured .customer-story-card__content {
  width: min(58%, 560px);
  padding: 52px 50px 46px;
}

.customer-story-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  min-height: 30px;
  margin: 0;
  padding: 7px 20px 6px;
  border-radius: 999px;
  font-family: var(--paragraph-font);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
}

.customer-story-pill--teal {
  color: #03283b;
  background: linear-gradient(90deg, #79decf 0%, #48c6b3 100%);
}

.customer-story-pill--blue {
  color: #fff;
  background: linear-gradient(90deg, #0840bc 0%, #4064ff 100%);
}

.customer-story-card__copy {
  margin: 34px 0 28px;
}

.customer-story-card__copy h3 {
  margin-bottom: 18px;
  color: #fff;
  font-size: clamp(1.5rem, 1.55vw, 2rem);
  font-weight: 600;
  line-height: 1.05;
}

.customer-story-card--featured .customer-story-card__copy h3 {
  font-size: clamp(2rem, 2.2vw, 2.75rem);
}

.customer-story-card__text p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
  line-height: 1.45;
}

.customer-story-card--featured .customer-story-card__text p {
  font-size: 1.125rem;
}

.customer-story-card__footer {
  width: 100%;
  margin-top: auto;
}

.customer-story-card__company {
  margin-bottom: 17px;
  color: var(--customer-stories-teal);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.customer-stories__open {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  max-width: 100%;
  padding: 7px 0 8px;
  border: 0;
  border-bottom: 1px solid var(--customer-stories-teal);
  border-radius: 0;
  color: #fff;
  background: transparent;
  box-shadow: none;
  font-family: var(--paragraph-font);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.25px;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, gap 0.2s ease;
}

.customer-stories__open:hover {
  gap: 17px;
  color: #91e8db;
  border-color: #91e8db;
}

.customer-stories__document,
.customer-stories__arrow {
  display: inline-flex;
  flex: 0 0 auto;
}

.customer-stories__document svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.customer-stories__arrow {
  margin-left: auto;
}

.customer-stories__arrow svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.customer-stories__archive-wrap {
  margin-top: 36px;
}

.customer-stories .customer-stories__archive {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-width: 360px;
  padding: 14px 35px !important;
  border: 1.5px solid var(--customer-stories-navy);
  border-radius: 8px !important;
  color: var(--customer-stories-navy);
  background: transparent;
}

.customer-stories .customer-stories__archive:hover {
  color: #fff;
  background: var(--customer-stories-navy);
  opacity: 1;
}

/* Customer story modal */
body.customer-story-modal-open {
  overflow: hidden;
  padding-right: var(--customer-story-scrollbar-width, 0);
}

.customer-story-modal[hidden] {
  display: none;
}

.customer-story-modal {
  position: fixed;
  z-index: 10050;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
  background: rgba(7, 17, 31, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.customer-story-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.customer-story-modal__dialog {
  position: relative;
  width: min(1040px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  padding: 28px 34px 22px;
  overflow: auto;
  border-radius: 22px;
  outline: 0;
  background: #fff;
  box-shadow: 0 28px 75px rgba(0, 11, 28, 0.32);
  transform: translateY(18px) scale(0.985);
  transition: transform 0.2s ease;
  overscroll-behavior: contain;
}

.customer-story-modal.is-open .customer-story-modal__dialog {
  transform: translateY(0) scale(1);
}

.customer-story-modal__close {
  position: absolute;
  z-index: 2;
  top: 22px;
  right: 24px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--customer-stories-navy);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.customer-story-modal__close:hover {
  background: #f1f4f6;
  transform: rotate(4deg);
}

.customer-story-modal__close span::before,
.customer-story-modal__close span::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 10px;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.customer-story-modal__close span::before {
  transform: rotate(45deg);
}

.customer-story-modal__close span::after {
  transform: rotate(-45deg);
}

.customer-story-modal__header {
  padding-right: 50px;
  text-align: left;
}

.customer-story-modal--center .customer-story-modal__header {
  max-width: 820px;
  margin-right: auto;
  margin-left: auto;
  padding-left: 50px;
  text-align: center;
}

.customer-story-modal__eyebrow {
  margin-bottom: 8px;
  color: #15a997;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.customer-story-modal__header h2 {
  margin-bottom: 12px;
  color: var(--customer-stories-navy);
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
}

.customer-story-modal__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.customer-story-modal--center .customer-story-modal__pills {
  justify-content: center;
}

.customer-story-modal__header h3 {
  margin-bottom: 6px;
  color: var(--customer-stories-navy);
  font-size: clamp(1.45rem, 2.15vw, 1.9rem);
  font-weight: 600;
  line-height: 1.1;
}

.customer-story-modal__intro {
  color: #23344d;
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: 0.2px;
}

.customer-story-modal__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.customer-story-modal__panel {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--customer-stories-border);
  border-radius: 14px;
  background: #fff;
}

.customer-story-modal__panel--full {
  grid-column: 1 / -1;
}

.customer-story-modal__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  color: #087d79;
  background: var(--customer-stories-pale-teal);
}

.customer-story-modal__icon--challenge,
.customer-story-modal__icon--results {
  color: #1645c6;
  background: var(--customer-stories-pale-blue);
}

.customer-story-modal__icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.customer-story-modal__panel h4 {
  margin: 2px 0 8px;
  color: var(--customer-stories-navy);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.15;
}

.customer-story-modal__panel-content,
.customer-story-modal__panel-content p,
.customer-story-modal__panel-content li {
  color: #13263a;
  font-family: var(--paragraph-font);
  font-size: 0.8125rem;
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: 0.1px;
}

.customer-story-modal__panel-content p + p {
  margin-top: 8px;
}

.customer-story-modal__panel-content ul,
.customer-story-modal__panel-content ol {
  margin: 0;
  padding-left: 18px;
}

.customer-story-modal__panel-content li + li {
  margin-top: 3px;
}

.customer-story-modal__panel-content li::marker {
  color: #12aa99;
}

.customer-story-modal__footer {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.customer-stories .customer-story-modal__cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 310px;
  padding: 13px 26px !important;
  border-radius: 10px !important;
  background: linear-gradient(90deg, #0536ad 0%, #001e9b 100%);
}

.customer-story-modal__cta .customer-stories__arrow {
  margin-left: 10px;
}

.customer-stories__open:focus-visible,
.customer-stories__archive:focus-visible,
.customer-story-modal__close:focus-visible,
.customer-story-modal__cta:focus-visible {
  outline: 3px solid #65d9c7;
  outline-offset: 4px;
}

@media only screen and (max-width: 1280px) {
  .customer-stories {
    padding: 90px 0;
  }

  .customer-story-card__content {
    width: min(78%, 580px);
    padding: 30px;
  }

  .customer-story-card--featured .customer-story-card__content {
    width: min(72%, 590px);
    padding: 42px;
  }
}

@media only screen and (max-width: 991px) {
  .customer-stories__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
  }

  .customer-story-card--featured {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 520px;
  }

  .customer-story-card:not(.customer-story-card--featured) {
    min-height: 390px;
  }

  .customer-story-card:not(.customer-story-card--featured) .customer-story-card__content {
    width: 88%;
  }

  .customer-story-modal__dialog {
    padding: 34px 28px 26px;
  }

  .customer-story-modal__panel {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 13px;
    padding: 16px;
  }

  .customer-story-modal__icon {
    width: 50px;
    height: 50px;
  }

  .customer-story-modal__icon svg {
    width: 29px;
    height: 29px;
  }
}

@media only screen and (max-width: 767px) {
  .customer-stories {
    padding: 70px 0;
  }

  .customer-stories__header {
    margin-bottom: 36px;
  }

  .customer-stories__header .b2-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 4px;
  }

  .customer-stories__intro p {
    font-size: 1rem;
  }

  .customer-stories__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .customer-story-card,
  .customer-story-card--featured,
  .customer-story-card:not(.customer-story-card--featured) {
    grid-column: auto;
    min-height: 460px;
  }

  .customer-story-card__shade {
    background:
      linear-gradient(90deg, rgba(1, 18, 39, 0.97) 0%, rgba(1, 18, 39, 0.82) 58%, rgba(1, 18, 39, 0.28) 100%),
      linear-gradient(0deg, rgba(1, 18, 39, 0.7) 0%, transparent 55%);
  }

  .customer-story-card__content,
  .customer-story-card--featured .customer-story-card__content,
  .customer-story-card:not(.customer-story-card--featured) .customer-story-card__content {
    width: 88%;
    padding: 28px 24px;
  }

  .customer-story-card__copy h3,
  .customer-story-card--featured .customer-story-card__copy h3 {
    font-size: 2rem;
  }

  .customer-story-card__text p,
  .customer-story-card--featured .customer-story-card__text p {
    font-size: 0.9375rem;
  }

  .customer-stories .customer-stories__archive {
    width: 100%;
    min-width: 0;
  }

  .customer-story-modal {
    align-items: flex-start;
    padding: 12px;
  }

  .customer-story-modal__dialog {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 58px 18px 22px;
    border-radius: 16px;
  }

  .customer-story-modal__close {
    top: 10px;
    right: 10px;
  }

  .customer-story-modal__header,
  .customer-story-modal--center .customer-story-modal__header {
    padding: 0;
    text-align: left;
  }

  .customer-story-modal--center .customer-story-modal__pills {
    justify-content: flex-start;
  }

  .customer-story-modal__header h2 {
    font-size: 2.2rem;
  }

  .customer-story-modal__header h3 {
    font-size: 1.5rem;
  }

  .customer-story-modal__pills {
    gap: 7px;
  }

  .customer-story-modal__pills .customer-story-pill {
    padding-right: 13px;
    padding-left: 13px;
    font-size: 0.625rem;
    letter-spacing: 1.4px;
  }

  .customer-story-modal__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-story-modal__panel,
  .customer-story-modal__panel--full {
    grid-column: auto;
  }

  .customer-story-modal__footer {
    display: block;
  }

  .customer-stories .customer-story-modal__cta {
    width: 100%;
    min-width: 0;
  }
}

@media only screen and (max-width: 420px) {
  .customer-story-card,
  .customer-story-card--featured,
  .customer-story-card:not(.customer-story-card--featured) {
    min-height: 430px;
  }

  .customer-story-card__content,
  .customer-story-card--featured .customer-story-card__content,
  .customer-story-card:not(.customer-story-card--featured) .customer-story-card__content {
    width: 94%;
    padding: 24px 20px;
  }

  .customer-story-card__copy h3,
  .customer-story-card--featured .customer-story-card__copy h3 {
    font-size: 1.7rem;
  }

  .customer-story-modal__panel {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
    padding: 14px;
  }

  .customer-story-modal__icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  .customer-story-modal__icon svg {
    width: 25px;
    height: 25px;
  }

  .customer-story-modal__panel h4 {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .customer-story-card__image,
  .customer-story-modal,
  .customer-story-modal__dialog,
  .customer-story-modal__close,
  .customer-stories__open {
    transition: none;
  }
}
