/* ===========================================================================
   app/pages/public/plans.css — the public plans page (/plans, alias /planes).

   Requires landing-kit.css to be linked FIRST (see plans.html head_extra):
   the page hero, section head, band and CTA band come from the kit. This file
   adds the plan cards and the add-on panels.

   Mobile-first: one card per row on the phone; two side by side from 820px,
   using the same 1080px content width as the rest of the public site.
   =========================================================================== */

.plans-sec {
  background: var(--color-bg);
  padding: 3.5rem 0;
}
.plans-sec--alt { background: var(--color-surface-alt); }

/* ——— Plan cards ——— */
.plan-grid {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  align-items: stretch;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.35rem;
  background: var(--color-surface);
  border: 1px solid var(--land-line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
/* The recommended plan reads as the default choice. */
.plan-card--featured {
  border-color: var(--color-primary);
  box-shadow: 0 18px 40px -24px rgba(29, 78, 216, 0.5);
}
.plan-card__badge {
  position: absolute;
  top: -0.7rem;
  left: 1.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.plan-card__name {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.035em;
}
.plan-card__desc {
  margin: 0.35rem 0 0;
  color: var(--land-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.plan-card__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--land-line);
}
.plan-card__price strong {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}
.plan-card__price span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--land-muted);
}

/* Yearly line — only rendered when the Stripe catalog carries a yearly price. */
.plan-card__yearly {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.7rem 0 0;
  color: var(--land-muted);
  font-size: 0.85rem;
}
.plan-card__yearly strong {
  color: var(--color-text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.plan-card__save {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: var(--color-success);
  font-size: 0.75rem;
  font-weight: 700;
}

.plan-card__features {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}
.plan-card__features li {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: 0.55rem;
  align-items: start;
  font-size: 0.92rem;
  line-height: 1.45;
}
.plan-card__features .fas {
  margin-top: 0.28em;
  font-size: 0.78rem;
  color: var(--color-success);
}

.plan-card__note {
  margin: 1rem 0 0;
  color: var(--land-muted);
  font-size: 0.82rem;
}
/* Pin the CTA to the bottom so the two cards' buttons line up. */
.plan-card__cta {
  margin-top: auto;
  margin-bottom: 0;
  min-height: var(--tap);
}
.plan-card__note + .plan-card__cta { margin-top: 1.1rem; }

/* ——— Add-on panels ——— */
.addon-grid {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  align-items: stretch;
}
.addon-panel {
  padding: 1.35rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--land-line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.addon-panel__title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}
.addon-panel__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.addon-panel__icon .fas { font-size: 0.9rem; }
.addon-panel__note {
  margin: 0.6rem 0 0;
  color: var(--land-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.addon-rows {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}
.addon-rows li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.55rem 0.75rem;
  background: var(--color-bg);
  border: 1px solid var(--land-line);
  border-radius: 10px;
}
.addon-rows__label {
  font-size: 0.9rem;
  font-weight: 600;
}
.addon-rows__price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.addon-rows__price em {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--land-muted);
}

/* ===========================================================================
   TABLET / DESKTOP — two columns, full public content width
   =========================================================================== */
@media (min-width: 820px) {
  .plan-grid,
  .addon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
    padding: 0 1.5rem;
  }
  .plan-card {
    height: 100%;
    padding: 2rem 1.75rem;
  }
  .plan-card__name { font-size: 1.5rem; }
  .plan-card__desc { font-size: 0.95rem; }
  .plan-card__price strong { font-size: 2.75rem; }
  .plan-card__features { gap: 0.65rem; margin-top: 1.15rem; }
  .plan-card__features li { font-size: 0.95rem; }
  .addon-panel { padding: 1.75rem 1.6rem; }
  .addon-panel__title { font-size: 1.15rem; }
}

@media (min-width: 1080px) {
  .plans-sec { padding: 5rem 0; }
  .plan-grid,
  .addon-grid {
    gap: 2rem;
    padding: 0 1.25rem;
  }
  .plan-card { padding: 2.25rem 2rem; }
  .plan-card--featured {
    box-shadow: 0 22px 48px -22px rgba(29, 78, 216, 0.45);
  }
}

/* ===========================================================================
   MOBILE POLISH (< 768px)
   =========================================================================== */
@media (max-width: 767px) {
  .plans-sec { padding: 2.5rem 0; }
  .plan-grid,
  .addon-grid { padding-inline: 1rem; }
  .plan-card__price strong { font-size: 2.1rem; }
  .plan-card__features li { font-size: 0.88rem; }
}
