/* The landing page only: the example charge panel and the five steps, on top of style.css. */
/* The charge panel: an example Receipt drawn around the app's energy ring. */

.charge {
  width: 100%;
  max-width: 460px;
  justify-self: center;
  padding: clamp(20px, 4vw, 32px);
  border-radius: 32px;
  background: var(--panel);
  color: var(--panel-text);
}

.charge-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tag,
.badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border: 1px solid transparent;
  border-radius: 9999px;
  background: var(--panel-track);
  color: var(--panel-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.385;
}

.badge {
  background: var(--panel-positive-tint);
  color: var(--panel-positive);
}

.badge svg {
  width: 16px;
  height: 16px;
}

.ring {
  position: relative;
  display: grid;
  width: min(100%, 272px);
  aspect-ratio: 1;
  margin: 20px auto 24px;
  place-items: center;
}

.ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ring-track {
  stroke: var(--panel-track);
}

.ring-fill {
  stroke: var(--panel-energy);
  stroke-dasharray: 59.7 100;
  animation: ring-fill 1500ms var(--ease-enter) 200ms both;
}

.ring-ponto {
  fill: var(--panel-energy);
}

@keyframes ring-fill {
  from {
    stroke-dasharray: 0 100;
  }
}

.ring-figure {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
}

.ring-figure strong {
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 3.5rem);
  font-stretch: 112.5%;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}

.ring-figure span {
  color: var(--panel-muted);
  font-size: 0.9375rem;
}

.receipt-rows div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding-block: 12px;
  border-block-start: 1px solid var(--panel-line);
}

.receipt-rows dt {
  color: var(--panel-muted);
}

.receipt-rows dd {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.receipt-rows .total dt {
  color: var(--panel-text);
  font-weight: 600;
}

.receipt-rows .total dd {
  font-size: 1.25rem;
  font-weight: 700;
}

.charge-note {
  padding-block-start: 12px;
  border-block-start: 1px solid var(--panel-line);
  color: var(--panel-muted);
  font-size: 0.8125rem;
  line-height: 1.385;
}

/*
 * The five steps sit on one track, and the last marker is the ponto: what is
 * left of the Budget coming back closes the ring.
 */

.steps {
  position: relative;
  display: grid;
  gap: 32px;
  padding: 0;
  list-style: none;
}

.steps::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 11px;
  width: 2px;
  background: var(--separator);
}

.steps li {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  padding-inline-start: 48px;
}

.steps li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--text);
  border-radius: 50%;
  background: var(--ground);
}

.steps li:last-child::before {
  border-color: var(--energy);
  background: var(--energy);
}

.step-number {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 24px;
}

.steps p {
  max-width: 28em;
  color: var(--muted);
}

@media (min-width: 960px) {
  .steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px;
  }

  .steps::before {
    inset: 11px 12px auto 0;
    width: auto;
    height: 2px;
  }

  .steps li {
    padding: 40px 0 0;
  }
}
