/* FROM — Services, section 1: who FROM is for. A bento of full-photo cards: delivery companies in the big tile, since
   they're who FROM is built for, with riders and customers stacked beside it. The words sit on a dark fade at the
   bottom of each photo, and the whole card is one link. */

.who {
  padding: calc(80px + clamp(48px, 7vw, 104px)) 0 clamp(88px, 11vw, 160px);
  background: var(--paper);
}

.who__head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: end;
  gap: 24px clamp(40px, 6vw, 96px);
}

.who__title {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(40px, 5.2vw, 84px);
  line-height: 1.02;
  font-weight: 760;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.who__title em {
  font-style: normal;
  color: var(--orange);
}

.who__lede {
  max-width: 42ch;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
}

.who__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(320px, auto));
  gap: 16px;
  margin-top: clamp(48px, 6vw, 80px);
}

/* ---------- A card ---------- */

.aud {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 320px;
  border-radius: 32px;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  scroll-margin-top: 96px;
}

.aud--companies {
  grid-row: span 2;
  min-height: 660px;
}

.aud__photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}

/* The dark fade the words sit on. */
.aud::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(7, 13, 23, 0) 28%, rgba(7, 13, 23, 0.55) 58%, rgba(7, 13, 23, 0.94) 100%);
}

.aud--companies .aud__photo {
  object-position: 62% 30%;
}

.aud--riders .aud__photo {
  object-position: 50% 22%;
}

.aud--customers .aud__photo {
  object-position: 50% 30%;
}

.aud__body {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: clamp(22px, 2.6vw, 36px);
}

.aud__who {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 650;
}

.aud--companies .aud__who {
  border-color: var(--orange);
  background: var(--orange);
  color: var(--ink);
}

.aud__title {
  max-width: 17ch;
  margin: 0;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.08;
  font-weight: 740;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.aud--companies .aud__title {
  max-width: 15ch;
  font-size: clamp(32px, 3.6vw, 54px);
  letter-spacing: -0.045em;
}

/* The title's link covers the whole card. */
.aud__link {
  color: inherit;
}

.aud__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.aud__link:focus-visible {
  outline: none;
}

.aud:has(.aud__link:focus-visible) {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.aud__text {
  max-width: 44ch;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}

.aud__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.aud__tags li {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.92);
}

/* The round arrow in the top corner. */
.aud__go {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  transition: background-color 0.3s, color 0.3s, transform 0.4s var(--ease-out);
}

.aud__go .icon {
  width: 20px;
  height: 20px;
  transform: rotate(-45deg);
}

.aud:hover .aud__photo {
  transform: scale(1.05);
}

.aud:hover .aud__go {
  background: var(--orange);
  color: #fff;
  transform: rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
  .aud__photo,
  .aud__go {
    transition: none;
  }
}

/* ---------- Tablet: companies across the top, riders and customers side by side ---------- */

@media (max-width: 1000px) {
  .who__head {
    grid-template-columns: 1fr;
  }

  .who__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }

  .aud--companies {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 520px;
  }

  .aud--riders,
  .aud--customers {
    min-height: 440px;
  }
}

/* ---------- Phone: one card under another ---------- */

@media (max-width: 640px) {
  .who__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .aud {
    border-radius: 26px;
  }

  .aud--companies {
    min-height: 560px;
  }

  .aud--riders,
  .aud--customers {
    min-height: 420px;
  }

  .aud__body {
    padding: 22px 20px;
  }

  .aud__go {
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
  }

  .aud__text {
    font-size: 15px;
  }
}
