.plans {
  margin-inline: calc(var(--space-page-x) * -1);
  padding: 96px var(--space-page-x);
  background: var(--color-blue-80);
  color: #ffffff;
}

.plans__head {
  max-width: 735px;
  margin-inline: auto;
  text-align: center;
}

.plans__title {
  color: #ffffff;
  font-size: 48px;
  line-height: 56px;
}

.plans__title span {
  color: var(--color-blue-40);
}

.plans__lead {
  margin-top: 32px;
  color: var(--color-blue-40);
  font-size: 18px;
  line-height: 28px;
}

.plans__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 9px;
  grid-template-rows: 40px auto 16px auto 32px auto 32px auto 32px auto 40px;
  margin-top: 64px;
}

.plan {
  display: contents;
}

.plan::before {
  content: "";
  grid-row: 1 / -1;
  border-radius: 32px;
  background: var(--color-blue-70);
}

.plan:nth-child(1)::before,
.plan:nth-child(1) :is(.plan__name, .plan__for, .plan__rule, .plan__includes, .plan__audience) {
  grid-column: 1;
}

.plan:nth-child(2)::before,
.plan:nth-child(2) :is(.plan__name, .plan__for, .plan__rule, .plan__includes, .plan__audience) {
  grid-column: 2;
}

.plan:nth-child(3)::before,
.plan:nth-child(3) :is(.plan__name, .plan__for, .plan__rule, .plan__includes, .plan__audience) {
  grid-column: 3;
}

.plan__intro {
  display: contents;
}

.plan__name,
.plan__for,
.plan__rule,
.plan__includes,
.plan__audience {
  position: relative;
  z-index: 1;
  margin-inline: 32px;
}

.plan__name { grid-row: 2; }
.plan__for { grid-row: 4; }
.plan__rule { grid-row: 6; }
.plan__includes { grid-row: 8; }
.plan__audience { grid-row: 10; }

.plan--light::before {
  background: #ffffff;
}

.plan--light {
  color: var(--color-ink-strong);
}

.plan__name {
  color: #ffffff;
  font-family: var(--font-text);
  font-size: 32px;
  font-weight: 600;
  line-height: 48px;
  text-align: center;
}

.plan--light .plan__name {
  color: var(--color-ink-strong);
}

.plan__for {
  color: rgb(255 255 255 / 50%);
  font-size: 18px;
  line-height: 28px;
  text-align: center;
}

.plan--light .plan__for {
  color: rgb(43 43 43 / 50%);
}

.plan__rule {
  height: 1px;
  background: var(--color-blue);
}

.plan--light .plan__rule {
  background: #dfdfdf;
}

.plan__includes,
.plan__audience {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.plan__includes {
  min-height: 248px;
}

.plan__label {
  color: rgb(255 255 255 / 50%);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.plan--light .plan__label {
  color: rgb(43 43 43 / 50%);
}

.plan__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan__list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  color: #ffffff;
  font-size: 18px;
  line-height: 28px;
}

.plan--light .plan__list li {
  color: var(--color-muted);
}

.plan__list img {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin-top: 2px;
}

.plans__dots {
  display: none;
}

@media (max-width: 900px) {
  .plans {
    padding: 64px 24px 56px;
  }

  .plans__title {
    font-size: 24px;
    line-height: 32px;
  }

  .plans__lead {
    margin-top: 16px;
    font-size: 16px;
    line-height: 24px;
  }

  .plans__grid {
    display: flex;
    grid-template-rows: none;
    gap: 8px;
    margin: 32px -24px 0;
    padding-inline: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 24px;
    scrollbar-width: none;
  }

  .plans__grid::-webkit-scrollbar {
    display: none;
  }

  .plan {
    display: flex;
    flex: 0 0 min(312px, calc(100vw - 72px));
    width: min(312px, calc(100vw - 72px));
    flex-direction: column;
    gap: 24px;
    padding: 32px 24px;
    border-radius: 32px;
    background: var(--color-blue-70);
    scroll-snap-align: start;
  }

  .plan--light {
    background: #ffffff;
  }

  .plan::before {
    content: none;
  }

  .plan__intro {
    display: block;
  }

  .plan__name,
  .plan__for,
  .plan__rule,
  .plan__includes,
  .plan__audience {
    grid-row: auto;
    grid-column: auto;
    margin-inline: 0;
  }

  .plan__for {
    margin-top: 16px;
  }

  .plan__includes {
    min-height: 216px;
  }

  .plan__name {
    font-size: 16px;
    line-height: 24px;
  }

  .plan__for {
    font-size: 14px;
    line-height: 20px;
  }

  .plan__label {
    font-size: 12px;
    line-height: 16px;
  }

  .plan__list li {
    align-items: center;
    font-size: 14px;
    line-height: 20px;
  }

  .plan__list img {
    margin-top: 0;
  }

  .plans__dots {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 16px;
  }

  .plans__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: rgb(255 255 255 / 35%);
    cursor: pointer;
  }

  .plans__dot.is-on {
    width: 48px;
    background: #ffffff;
  }
}
