/* How booking works: five number cards. Number, icon, title and line sit on the same plane in every card. */

.steps {
  display: grid;
  gap: var(--sp-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Phones: a compact row per step with fixed columns (number, icon, words), so the list reads like a table. */
.steps li {
  display: grid;
  grid-template-columns: 2.25rem 36px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: var(--sp-1) var(--sp-3);
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--card);
}

.steps .num {
  grid-row: 1 / 3;
  align-self: start;
  font: 700 2.5rem / 1 var(--font-display);
  color: transparent;
  -webkit-text-stroke: 1.5px var(--blue-ink);
}

.steps li:last-child .num {
  -webkit-text-stroke-color: var(--gold-ink);
}

/* The icon sits in its own fixed column with no tile behind it. */
.steps .icon {
  grid-row: 1 / 3;
  align-self: start;
  display: grid;
  place-items: center start;
  height: 40px;
  color: var(--blue-ink);
}

.steps .icon svg {
  width: 32px;
  height: 32px;
}

.steps h3 {
  grid-column: 3;
  font-size: var(--fs-md);
}

/* At least 16px: many customers read on small phones. */
.steps p {
  grid-column: 3;
  color: var(--text-soft);
  font-size: var(--fs-base);
}

/* Cards fade up one after another; reveal.js adds the classes only when motion is allowed. */
@media (prefers-reduced-motion: no-preference) {
  .steps.will-animate li {
    opacity: 0;
    transform: translateY(10px);
    transition:
      opacity var(--dur-pop) var(--ease-out),
      transform var(--dur-pop) var(--ease-out);
  }

  .steps.will-animate.is-visible li {
    opacity: 1;
    transform: none;
  }

  .steps li:nth-child(2) {
    transition-delay: calc(var(--stagger) * 1);
  }

  .steps li:nth-child(3) {
    transition-delay: calc(var(--stagger) * 2);
  }

  .steps li:nth-child(4) {
    transition-delay: calc(var(--stagger) * 3);
  }

  .steps li:nth-child(5) {
    transition-delay: calc(var(--stagger) * 4);
  }
}

/* --bp-md: one row of five cards that share four rows (number, icon, title, line) through subgrid. */
@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(4, auto);
    gap: 0 var(--sp-3);
  }

  .steps li {
    grid-row: span 4;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: subgrid;
    gap: var(--sp-3);
    align-items: start;
    padding: var(--sp-5) var(--sp-4);
  }

  .steps .num,
  .steps .icon,
  .steps h3,
  .steps p {
    grid-row: auto;
    grid-column: 1;
  }

  .steps .num {
    font-size: 3.5rem;
  }
}

/* Older browsers without subgrid: fixed row heights so the planes still line up. */
@supports not (grid-template-rows: subgrid) {
  @media (min-width: 900px) {
    .steps li {
      grid-template-rows: 3.5rem 40px minmax(1.6em, auto) auto;
    }
  }
}
