/* FROM — Services, section 3: for businesses. Two tabs, one for people who sell online and one for delivery
   companies; each shows its words beside what it looks like in FROM. js/business.js switches them. */

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

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

.biz__title {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(36px, 4.6vw, 72px);
  line-height: 1.02;
  font-weight: 760;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

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

/* ---------- The two tabs ---------- */

.biz__tabs {
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  margin-top: clamp(40px, 5vw, 64px);
  padding: 6px;
  border-radius: 999px;
  background: var(--paper-warm);
  box-shadow: inset 0 0 0 1px var(--line);
}

.biz__tab {
  position: relative;
  z-index: 1;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 650;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color 0.3s;
}

.biz__tab[aria-selected="true"] {
  color: #fff;
}

.biz__tab:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* The ink pill that slides under the chosen tab. */
.biz__tabs::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc(50% - 6px);
  border-radius: 999px;
  background: var(--ink);
  transition: transform 0.45s var(--ease-out);
}

.biz__tabs[data-at="1"]::before {
  transform: translateX(100%);
}

/* ---------- A panel: words and the picture ---------- */

.biz__panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 48px clamp(48px, 7vw, 112px);
  margin-top: 32px;
  animation: biz-in 0.6s var(--ease-out);
}

.biz__panel[hidden] {
  display: none;
}

@keyframes biz-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.biz__panel-title {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(28px, 2.8vw, 44px);
  line-height: 1.06;
  font-weight: 740;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.biz__points {
  display: grid;
  gap: 14px;
  max-width: 42ch;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.biz__points li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink-2);
}

.biz__points .icon {
  width: 24px;
  height: 24px;
  padding: 5px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  stroke-width: 3;
}

.biz__more {
  margin-top: 32px;
}

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

.biz__swash {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120%;
  max-width: none;
  transform: translate(-50%, -46%);
  opacity: 0.9;
  z-index: -1;
}

/* ---------- Sellers: the message to the customer, and what the customer sees ---------- */

.share {
  display: grid;
  gap: 14px;
  width: min(380px, 100%);
}

.share__msg {
  justify-self: end;
  max-width: 300px;
  padding: 14px 16px;
  border-radius: 20px 20px 6px 20px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  line-height: 1.45;
}

.share__msg span {
  display: inline-flex;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--orange);
  font-size: 14px;
  font-weight: 650;
}

.track {
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(7, 13, 23, 0.14);
  overflow: hidden;
}

.track__map {
  position: relative;
  height: 170px;
  background: #f7f1ea;
}

.track__map img,
.track__map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track__line {
  fill: none;
  stroke: var(--orange);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.track__rider {
  animation: track-ride 6s ease-in-out infinite alternate;
}

@keyframes track-ride {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(140px, 0);
  }
}

.track__body {
  padding: 16px 18px 18px;
}

.track__status {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.track__status span {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-3);
}

.track__rider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  font-weight: 650;
}

.track__rider-row small {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
}

.track__code {
  margin-left: auto;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--paper-warm);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  color: var(--ink-3);
}

.track__code strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--orange-tint);
  font-size: 14px;
  font-weight: 700;
  color: var(--orange-ink);
}

/* ---------- Delivery companies: the riders page ---------- */

.fleet {
  width: min(560px, 100%);
  padding: 20px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(7, 13, 23, 0.14);
}

.fleet__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.fleet__name {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.fleet__count {
  font-size: 14px;
  color: var(--ink-3);
}

.fleet__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
}

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

.fleet__stats dt {
  font-size: 13px;
  color: var(--ink-3);
}

.fleet__stats dd {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 760;
  letter-spacing: -0.03em;
}

.fleet__list {
  display: grid;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.fleet__list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  font-weight: 650;
}

.fleet__list small {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
}

.state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.state--busy {
  background: var(--orange);
  color: #fff;
}

.state--online {
  background: var(--orange-wash);
  color: var(--orange-ink);
}

.state--off {
  background: #eef0f3;
  color: var(--ink-3);
}

/* ---------- Tablet and phone ---------- */

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

  .biz__stage {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .biz__tabs {
    display: grid;
    width: 100%;
  }

  .biz__tab {
    padding: 0 10px;
    font-size: 15px;
  }

  .biz__stage {
    padding: 28px 14px;
  }

  .fleet {
    padding: 16px;
  }

  .fleet__stats div {
    padding: 10px 12px;
  }

  .fleet__stats dd {
    font-size: 20px;
  }

  .fleet__list small {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .fleet__list li {
    gap: 10px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .biz__panel {
    animation-duration: 0.01s;
  }
}
