/* FROM — home, section 3: riding with FROM. Words and three steps on one side; on the other, the trip offer a
   rider sees, drawn as a ticket over the orange brush stroke from section 1. */

.earn {
  padding: clamp(88px, 11vw, 160px) 0;
  background: var(--paper);
}

.earn__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
}

.earn__title {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(34px, 4.2vw, 64px);
  line-height: 1.05;
  font-weight: 740;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.earn__lede {
  max-width: 44ch;
  margin-top: 22px;
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
}

/* ---------- Three steps ---------- */

.earn__steps {
  display: grid;
  gap: 26px;
  margin: clamp(36px, 4vw, 52px) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.earn__steps li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 18px;
  counter-increment: step;
}

.earn__steps li::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--orange-wash);
  box-shadow: inset 0 0 0 1.5px var(--orange-tint);
  color: var(--orange-ink);
  font-size: 16px;
  font-weight: 720;
}

.earn__step-title {
  margin: 0;
  padding-top: 8px;
  font-size: 19px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.earn__step-text {
  max-width: 44ch;
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-3);
}

.earn__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: clamp(36px, 4vw, 48px);
}

/* ---------- The trip offer ---------- */

.earn__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 640px;
  padding: 56px 24px;
  border-radius: var(--radius-lg);
  background: var(--orange-wash);
  overflow: hidden;
  isolation: isolate;
}

.earn__swash {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 104%;
  max-width: none;
  height: auto;
  transform: translate(-50%, -42%);
  z-index: -1;
}

.ticket {
  position: relative;
  width: min(100%, 372px);
  border-radius: 24px;
  background: var(--paper);
  box-shadow:
    0 1px 2px rgba(7, 13, 23, 0.06),
    0 24px 60px -18px rgba(120, 50, 0, 0.35);
  transform: rotate(-2.5deg);
  transition: transform 0.9s var(--ease-out);
}

.ticket__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
}

.ticket__new {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.ticket__new::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px var(--orange-tint);
}

/* Pickup and drop-off, joined by a dotted line. */
.ticket__route {
  position: relative;
  display: grid;
  gap: 18px;
  margin: 22px 24px 0;
  padding: 0;
  list-style: none;
}

.ticket__route::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 14px;
  bottom: 14px;
  border-left: 2px dotted var(--ink-3);
}

.ticket__route li {
  position: relative;
  display: grid;
  gap: 2px;
  padding-left: 30px;
}

.ticket__route li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 3.5px var(--ink);
}

.ticket__route li:last-child::before {
  border-radius: 4px;
  background: var(--orange);
  box-shadow: none;
}

.ticket__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
}

.ticket__place {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.ticket__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 22px 24px 0;
}

.ticket__facts div {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--paper-warm);
}

.ticket__facts dt {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}

.ticket__facts dd {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 680;
  white-space: nowrap;
}

/* The tear line between the trip and the pay. */
.ticket__tear {
  height: 0;
  margin: 22px 24px 18px;
  border-top: 2px dashed var(--line);
}

.ticket__pay {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 24px 0;
}

.ticket__pay span {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-3);
}

.ticket__pay strong {
  font-size: clamp(38px, 3.4vw, 46px);
  line-height: 1;
  font-weight: 760;
  letter-spacing: -0.045em;
}

.ticket__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 10px;
  padding: 20px 24px 24px;
}

.ticket__btn {
  display: grid;
  place-items: center;
  height: 52px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 650;
}

.ticket__btn--no {
  box-shadow: inset 0 0 0 1.5px var(--line);
  color: var(--ink-2);
}

.ticket__btn--yes {
  background: var(--orange);
  color: #fff;
}

/* "You're online": the rider's status, pinned to the ticket's corner. */
.earn__status {
  position: absolute;
  top: clamp(40px, 9%, 72px);
  left: clamp(20px, 8%, 64px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 20px 0 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  transform: rotate(3deg);
}

.earn__status .icon {
  width: 18px;
  height: 18px;
  color: var(--orange);
}

/* On the way in, the ticket lands at its tilt. */
.earn__stage[data-reveal]:not(.is-in) .ticket {
  transform: rotate(4deg) translateY(28px);
}

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

/* ---------- Tablet and phone: words first, then the ticket ---------- */

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

  .earn__title {
    max-width: 18ch;
  }

  .earn__stage {
    min-height: 0;
    padding: 96px 20px 64px;
  }
}

@media (max-width: 480px) {
  .earn__stage {
    margin-inline: calc(var(--gutter) * -0.4);
    padding: 84px 14px 48px;
  }

  .ticket__top,
  .ticket__pay {
    padding-inline: 20px;
  }

  .ticket__route,
  .ticket__facts {
    margin-inline: 20px;
  }

  .ticket__actions {
    padding: 18px 20px 20px;
  }

  .earn__status {
    top: 24px;
    left: 20px;
  }

  .earn__swash {
    width: 175%;
    transform: translate(-50%, -30%);
  }
}
