/*
  first-visit.css
  Mobile〜899px: 縦タイムライン（番号＋縦線 / アイコンなし）
  900px~: 5カラム横並び（大きな番号＋アイコン円＋矢印コネクタ）
*/

.first-visit {
  background-color: var(--color-bg-muted);
}

.steps {
  display: flex;
  flex-direction: column;
  max-width: 36rem;
  margin: 4rem auto 0;
}

.step {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 1.25rem;
}

.step__num {
  grid-area: 1 / 1;
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--color-accent);
}

.step__icon {
  grid-area: 2 / 1;
  justify-self: center;
  width: 1px;
  min-height: 3.25rem;
  margin-top: 0.75rem;
  background-color: var(--color-border);
}

.step:last-child .step__icon {
  display: none;
}

.step__icon-circle {
  display: none;
}

.step__body {
  grid-area: 1 / 2 / 3 / 3;
  padding-bottom: 2rem;
}

.step:last-child .step__body {
  padding-bottom: 0;
}

.step__title {
  padding-top: 2px;
  font-size: 1.05rem;
  line-height: 1.5;
}

.step__text {
  padding-top: 0.375rem;
  line-height: 1.85;
  color: var(--color-text-muted);
}

@media (min-width: 900px) {
  .steps {
    flex-direction: row;
    max-width: none;
  }

  .step {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding-inline: 1rem;
    text-align: center;
  }

  .step__num {
    margin-bottom: 1rem;
    font-size: 2.7rem;
    color: var(--color-accent-pale);
  }

  .step__icon,
  .step:last-child .step__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    margin: 0 0 1.25rem;
    background: none;
  }

  .step__icon::before,
  .step__icon::after {
    content: "";
    flex: 1 1 0;
    min-width: 0;
  }

  .step__icon::before {
    height: 1px;
    background-color: var(--color-border);
  }

  .step__icon::after {
    height: 6px;
    background:
      linear-gradient(var(--color-border), var(--color-border)) 0 50% / calc(100% - 5px) 1px no-repeat,
      linear-gradient(to top right, var(--color-border) 50%, transparent 50%) 100% 0 / 5px 3px no-repeat,
      linear-gradient(to bottom right, var(--color-border) 50%, transparent 50%) 100% 100% / 5px 3px no-repeat;
  }

  .step:first-child .step__icon::before,
  .step:last-child .step__icon::after {
    visibility: hidden;
  }

  .step__icon-circle {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background-color: var(--color-bg-alt);
  }

  .step__icon-circle img {
    width: 1.15rem;
    height: 1.15rem;
  }

  .step__body {
    padding-bottom: 0;
  }

  .step__title {
    padding-top: 0;
    padding-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.375;
  }

  .step__text {
    padding-top: 0;
    font-size: 0.75rem;
    line-height: 1.85;
  }
}
