/* FROM — About: the difference is the order of events. */

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

/* As the first section of about.html it starts below the fixed header. */
.about--page {
  padding-top: calc(80px + clamp(64px, 9vw, 136px));
}

/* ---------- Statement ---------- */

.about__title {
  max-width: 19ch;
  margin: 0;
  font-size: clamp(36px, 4.6vw, 76px);
  line-height: 1.04;
  font-weight: 740;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

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

.about__lede {
  max-width: 50ch;
  margin-top: 32px;
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.55;
  color: var(--ink-2);
}

/* ---------- The order of events ---------- */

.order {
  margin-top: clamp(64px, 8vw, 112px);
  padding: 8px clamp(20px, 3vw, 44px);
  border-radius: var(--radius-lg);
  background: var(--paper-warm);
  box-shadow: inset 0 0 0 1px rgba(7, 13, 23, 0.05);
}

.order__row {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: clamp(22px, 2.6vw, 36px) 0;
}

.order__row + .order__row {
  border-top: 1px solid var(--line);
}

.order__label {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-3);
}

.order__row--from .order__label {
  color: var(--orange-deep);
}

.order__steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.order__steps li {
  display: flex;
  align-items: center;
}

/* The line between two steps. */
.order__steps li + li::before {
  content: "";
  width: clamp(14px, 2vw, 30px);
  height: 2px;
  margin: 0 6px;
  border-radius: 2px;
  background: var(--orange);
  transform-origin: left;
}

.order__steps span {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  background: #fff;
}

.order__steps .is-pay span {
  border-color: var(--orange);
  background: var(--orange);
  color: var(--ink);
}

/* The usual way, greyed out: paying comes first. */
.order__row--usual .order__steps span {
  border: 1.5px dashed #c5cad3;
  background: transparent;
  color: var(--ink-3);
  font-weight: 500;
}

.order__row--usual .order__steps li + li::before {
  background: repeating-linear-gradient(90deg, #c5cad3 0 4px, transparent 4px 8px);
}

.order__row--usual .order__steps .is-pay span {
  border: 1.5px solid var(--ink-3);
  color: var(--ink-2);
  font-weight: 600;
}

/* ---------- Facts ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
  margin: clamp(72px, 9vw, 128px) 0 0;
}

.fact {
  container-type: inline-size;
  padding-top: 24px;
  border-top: 1.5px solid var(--ink);
}

/* Each figure stays on one line: the size also follows the column, so "Every naira" (the widest) always fits. */
.fact dt {
  font-size: min(clamp(48px, 5.4vw, 88px), 22cqi);
  white-space: nowrap;
  line-height: 1;
  font-weight: 760;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.fact dd {
  max-width: 30ch;
  margin: 16px 0 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* ---------- Reveal on scroll ---------- */

[data-reveal] .order__steps span,
[data-reveal] .fact {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 110ms);
}

[data-reveal] .order__steps li + li::before {
  transform: scaleX(0);
  transition: transform 0.5s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 110ms - 60ms);
}

/* The FROM row starts once the usual way has played. */
[data-reveal] .order__row--from span {
  transition-delay: calc(var(--i, 0) * 110ms + 400ms);
}

[data-reveal] .order__row--from li + li::before {
  transition-delay: calc(var(--i, 0) * 110ms + 340ms);
}

[data-reveal].is-in .order__steps span,
[data-reveal].is-in .fact {
  opacity: 1;
  transform: none;
}

[data-reveal].is-in .order__steps li + li::before {
  transform: none;
}

/* ---------- The two ways side by side, steps top to bottom (each step is a short sentence) ---------- */

.order {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
}

.order__row {
  grid-template-columns: 1fr;
  align-content: start;
  gap: 20px;
  padding: clamp(24px, 4vw, 40px);
}

.order__row + .order__row {
  border-top: 0;
  border-left: 1px solid var(--line);
}

.order__steps,
.order__row--from .order__steps {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  row-gap: 0;
}

.order__steps li,
.order__row--from .order__steps li + li {
  flex: none;
  flex-direction: column;
  align-items: flex-start;
}

.order__steps li + li::before,
.order__row--from .order__steps li + li::before {
  flex: none;
  width: 2px;
  height: 16px;
  min-width: 0;
  margin: 0 0 0 22px;
  transform-origin: top;
}

.order__row--usual .order__steps li + li::before {
  background: repeating-linear-gradient(180deg, #c5cad3 0 4px, transparent 4px 8px);
}

[data-reveal] .order__steps li + li::before {
  transform: scaleY(0);
}

/* ---------- Phone ---------- */

@media (max-width: 760px) {
  .about__lede {
    margin-top: 20px;
  }

  .order {
    grid-template-columns: 1fr;
  }

  .order__row {
    gap: 16px;
    padding: 24px 20px;
  }

  .order__row + .order__row {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .order__steps span {
    height: 42px;
    padding: 0 16px;
  }

  .order__steps li + li::before,
  .order__row--from .order__steps li + li::before {
    height: 12px;
    margin-left: 20px;
  }

  .facts {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .fact dd {
    font-size: 16px;
  }
}
