/**
 * /plans — membership tier picker shown after onboarding.
 *
 *   Reuses the welcome-signup full-viewport yacht backdrop + dark
 *   vignette so the page reads as the same "first-run" flow as
 *   /welcome and /onboarding — same atmosphere, no jolt.
 *
 *   Layout: a glass intro block on top, then three plan cards in a
 *   row (stack on mobile). The middle card is the "Plus" tier — gold-
 *   rimmed with a ribbon — to anchor the eye toward the choice the
 *   product wants users to take, without disabling the alternatives.
 */

.plans-main {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--header-height, 72px));
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(28px, 5vw, 72px) clamp(16px, 4vw, 40px) 64px;
  color: var(--color-ink, #1c1814);
}

/* Loading state shares the welcome spinner; reuses .welcome-spinner. */
.plans-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 80px 0;
  color: #fff;
}

.plans-main[data-state="ready"] .plans-loading { display: none; }
.plans-main[data-state="loading"] .plans-body { display: none; }

/* ── Header block (intro copy on glass) ───────────────────────────── */
.plans-body {
  width: 100%;
  max-width: 1180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(28px, 4vw, 48px);
}

.plans-header {
  text-align: center;
  color: #fff;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plans-eyebrow {
  font-family: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.plans-title {
  font-family: "Ivy Presto", "Playfair Display", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
  color: #fff;
}

.plans-lede {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  margin: 6px auto 0;
  max-width: 560px;
}

/* ── Grid of three plan cards ─────────────────────────────────────── */
.plans-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
  align-items: stretch;
}

@media (max-width: 920px) {
  .plans-grid { grid-template-columns: 1fr; max-width: 460px; }
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 30px 28px 28px;
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  transition: border-color 200ms ease;
}

.plan-card:hover {
  border-color: rgba(15, 23, 42, 0.22);
}

/* The featured plan is distinguished by a thicker gold border only —
   no lift, no shadow, no glow. Pure flat hierarchy. */
.plan-card--featured {
  border: 1.5px solid var(--color-accent, #c8a14a);
}

/* Viewer's currently active plan when they arrived via /me?upgrade=…
   — visually demoted (not the upsell target) and the CTA gets disabled
   in plans.js. Subtle ink-toned border, no gold, no ribbon. */
.plan-card--current {
  border-color: rgba(15, 23, 42, 0.22);
  opacity: 0.78;
}
.plan-card--current .plan-card__cta {
  background: transparent;
  color: var(--color-ink-muted, #6a665f);
  border: 1px solid rgba(15, 23, 42, 0.18);
}
.plan-card--current .plan-card__cta:hover { background: transparent; }

.plan-card__ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent, #c8a14a);
  color: #1a1208;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.plan-card__head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.plan-card__tier {
  font-family: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--color-ink-muted, #6a665f);
}

.plan-card--featured .plan-card__tier { color: var(--color-accent-deep, #a37e2f); }

.plan-card__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--color-ink, #1c1814);
}

.plan-card__price-amount {
  font-family: "Ivy Presto", "Playfair Display", Georgia, serif;
  font-size: clamp(2.4rem, 3.6vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}

.plan-card__price-unit {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-ink-muted, #6a665f);
}

.plan-card__tagline {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--color-ink-muted, #4d4a44);
  margin: 0;
}

.plan-card__features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
}

.plan-card__features li {
  position: relative;
  padding-left: 26px;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--color-ink, #2a261f);
}

/* Hand-rolled check glyph — keeps deps zero and reads cleaner than a
   stock unicode tick which renders weirdly across platforms. */
.plan-card__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  background:
    no-repeat center / 12px 12px
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8a14a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
}

.plan-card__cta {
  appearance: none;
  border: 0;
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  font-family: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  background: var(--color-ink, #1c1814);
  color: #fff;
  transition: background 160ms ease;
  margin-top: 6px;
}

.plan-card__cta:hover { background: #000; }
.plan-card__cta:disabled { opacity: 0.65; cursor: not-allowed; }

.plan-card__cta--accent {
  background: var(--color-accent, #c8a14a);
  color: #1a1208;
}

.plan-card__cta--accent:hover {
  background: var(--color-accent-deep, #b8924c);
}

/* ── Fineprint ─────────────────────────────────────────────────────── */
.plans-fineprint {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  max-width: 540px;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .plan-card,
  .plan-card__cta { transition: none; }
}
