/* Pricing (ADR 0170, ADR 0239, HOMEPAGE-PLAN.md): the two plans on one card, each with what it adds to
   your balance drawn to scale ($3 against $30), and one line on what happens at zero. Each fact is said
   once. balance.mjs fills the bars once when the card is seen; without it they stand full. */
.pricing {
  padding-block: var(--space-9);
  text-align: center;
}

.pricing h2 {
  font-size: clamp(40px, 5vw, 68px);
}

.pricing-lead {
  margin-top: var(--space-3);
  color: var(--muted);
  font-size: var(--text-lead);
}

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 880px;
  margin: var(--space-7) auto 0;
  border: 1px solid #c7d1c2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(25, 55, 45, .04), 0 24px 60px -12px rgba(25, 55, 45, .16);
  text-align: left;
}

.plan {
  padding: var(--space-6);
}

.plan + .plan {
  border-left: 1px solid #dce3d8;
}

.plan h3 {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 500;
}

.plan-price {
  margin: var(--space-2) 0 var(--space-5);
  font-size: clamp(44px, 5vw, 60px);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -.045em;
}

.plan-price small {
  margin-left: 6px;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0;
}

/* What the plan adds to your balance, to one scale: the free $3 is a tenth of the plan's $30. */
.plan-fill {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #eef1ea;
}

.plan-fill::before {
  content: "";
  display: block;
  width: calc(var(--to) * 100%);
  height: 100%;
  border-radius: inherit;
  background: var(--accent-action);
  transform-origin: left;
  transition: scale 1.2s cubic-bezier(.2, .7, .2, 1) var(--after, 0s);
}

.plan:first-child .plan-fill { --to: .1; }
.plan:last-child .plan-fill { --to: 1; --after: .35s; }

.plans.is-waiting .plan-fill::before {
  scale: 0 1;
}

.plan p:last-child {
  margin-top: var(--space-3);
  color: var(--muted);
  font-size: var(--text-sm);
}

.pricing-note {
  margin-top: var(--space-5);
  color: var(--muted);
  font-size: var(--text-sm);
}

html[data-motion=off] .plan-fill::before {
  transition: none;
}

@media (max-width: 720px) {
  .pricing {
    padding-block: var(--space-8);
  }

  .plans {
    grid-template-columns: minmax(0, 1fr);
  }

  .plan {
    padding: var(--space-5);
  }

  .plan + .plan {
    border-top: 1px solid #dce3d8;
    border-left: 0;
  }
}
