/* Pricing page v2 — theme-aware professional */

.pr {
  --pr-ink: var(--mp-text, #eef2f8);
  --pr-muted: var(--mp-muted, #8b95a8);
  --pr-paper: var(--mp-bg, #06080d);
  --pr-paper-2: var(--mp-bg-elevated, #0c1018);
  --pr-card: var(--mp-surface, #121820);
  --pr-line: var(--mp-border, rgba(255, 255, 255, 0.1));
  --pr-primary: var(--brand-primary, #3d8bfd);
  --pr-teal: var(--brand-accent, #20c997);
  --pr-hero-fg: #f6f9fc;
  --pr-hero-muted: rgba(210, 220, 233, 0.82);
  --pr-hero-bg: radial-gradient(ellipse 55% 48% at 82% 15%, color-mix(in srgb, var(--pr-teal) 18%, transparent), transparent 60%),
                radial-gradient(ellipse 45% 45% at 8% 82%, color-mix(in srgb, var(--pr-primary) 14%, transparent), transparent 55%),
                linear-gradient(160deg, #0a1018 0%, #0d1726 52%, #0b2430 100%);
  font-family: "latin-digits", iransans, Tahoma, sans-serif;
}

html[data-theme="light"] .pr, body[data-theme="light"] .pr {
  --pr-ink: #0f172a;
  --pr-muted: #64748b;
  --pr-paper: var(--mp-bg, #f3f5f8);
  --pr-paper-2: #ffffff;
  --pr-card: #ffffff;
  --pr-line: rgba(15, 23, 42, 0.1);
  --pr-hero-fg: #0f172a;
  --pr-hero-muted: #475569;
  --pr-hero-bg: radial-gradient(ellipse 55% 48% at 82% 15%, color-mix(in srgb, var(--pr-teal) 12%, transparent), transparent 60%),
                radial-gradient(ellipse 45% 45% at 8% 82%, color-mix(in srgb, var(--pr-primary) 10%, transparent), transparent 55%),
                linear-gradient(160deg, #f8fafc 0%, #eef2f8 52%, #e4f2ee 100%);
}

.pr.pr { background: var(--pr-paper); color: var(--pr-ink); }

/* Hero */
.pr-hero {
  position: relative; overflow: hidden;
  padding: clamp(2.8rem, 6vw, 4.5rem) 0;
}
.pr-hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background: var(--pr-hero-bg);
}
.pr-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 25%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 25%, #000 15%, transparent 75%);
  opacity: .45;
}
.pr-hero-inner { position: relative; z-index: 1; }
.pr-hero h1 {
  margin: 0 0 .7rem; font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900; letter-spacing: -.03em; color: var(--pr-hero-fg);
}
.pr-hero p {
  margin: 0; max-width: 52ch; font-size: clamp(.95rem, 1.5vw, 1.08rem);
  color: var(--pr-hero-muted); line-height: 1.85;
}
.pr-trust {
  list-style: none; margin: 1.5rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .45rem 1.5rem;
  color: var(--pr-hero-muted); font-size: .85rem; font-weight: 650;
}
.pr-trust li { display: inline-flex; align-items: center; gap: .4rem; }
.pr-trust i {
  display: inline-grid; place-items: center;
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: color-mix(in srgb, var(--pr-teal) 22%, transparent);
  color: var(--pr-teal); font-size: .78rem;
}

/* Category chip nav */
.pr-chips {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem;
  padding: 1.6rem 0 1.2rem;
}
.pr-chip {
  padding: .48rem 1rem; border: 1px solid var(--pr-line); border-radius: 999px;
  background: var(--pr-card); color: var(--pr-muted);
  font-weight: 650; font-size: .88rem; text-decoration: none;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.pr-chip:hover { background: color-mix(in srgb, var(--pr-teal) 12%, transparent); border-color: color-mix(in srgb, var(--pr-teal) 45%, transparent); color: var(--pr-ink); transform: translateY(-1px); }
.pr-chip:target, .pr-chip.is-active { background: var(--pr-teal); border-color: var(--pr-teal); color: #04241c; }

/* Container */
.pr-container { width: min(1180px, calc(100% - 2.5rem)); margin: 0 auto; }

/* Category group */
.pr-group { margin-bottom: 3.5rem; scroll-margin-top: 5.5rem; }
.pr-group-head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .8rem 1.5rem;
  margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--pr-line);
}
.pr-group-head h2 {
  margin: 0; font-size: clamp(1.4rem, 2.5vw, 1.8rem); font-weight: 850;
  letter-spacing: -.02em; color: var(--pr-ink);
}
.pr-group-head p { margin: 0; color: var(--pr-muted); font-size: .95rem; }

/* Product block */
.pr-product { margin-bottom: 2.8rem; }
.pr-product-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.2rem;
  margin-bottom: 1.2rem;
}
.pr-product-name {
  display: inline-flex; align-items: center; gap: .5rem;
  margin: 0; font-size: 1.1rem; font-weight: 800; color: var(--pr-ink);
}
.pr-product-name i {
  color: var(--pr-teal); font-size: 1.2rem;
}
.pr-product-tag { font-size: .85rem; color: var(--pr-muted); margin: 0; }
.pr-product-link {
  color: var(--pr-teal); font-weight: 700; font-size: .85rem;
  text-decoration: none; border-bottom: 1px solid transparent;
}
.pr-product-link:hover { border-bottom-color: currentColor; }

/* Plan grid */
.pr-plans {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem; align-items: stretch;
}

/* Plan card */
.pr-card {
  position: relative; display: flex; flex-direction: column;
  padding: 1.5rem 1.3rem 1.3rem;
  border-radius: 18px; border: 1px solid var(--pr-line);
  background: var(--pr-card);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.pr-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--pr-teal) 40%, transparent); box-shadow: 0 18px 40px color-mix(in srgb, var(--pr-primary) 10%, transparent); }
.pr-card.featured {
  border-color: color-mix(in srgb, var(--pr-teal) 55%, transparent);
  background:
    radial-gradient(ellipse 80% 55% at 50% 0%, color-mix(in srgb, var(--pr-teal) 14%, transparent), transparent 60%),
    var(--pr-card);
  box-shadow: 0 20px 50px color-mix(in srgb, var(--pr-teal) 15%, transparent);
}
.pr-card.featured:hover { box-shadow: 0 24px 55px color-mix(in srgb, var(--pr-teal) 22%, transparent); }

.pr-card-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: .55rem;
  margin-bottom: .5rem;
}
.pr-card-head h3 {
  margin: 0; font-size: 1.08rem; font-weight: 800; color: var(--pr-ink);
}
.pr-badge {
  position: static;
  display: inline-flex; align-items: center;
  padding: .28rem .75rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--pr-teal), color-mix(in srgb, var(--pr-teal) 72%, var(--pr-primary)));
  color: #04241c; font-size: .7rem; font-weight: 800;
  white-space: nowrap;
}
.pr-card-desc {
  margin: 0 0 .9rem; font-size: .82rem; line-height: 1.65; color: var(--pr-muted);
}

.pr-price {
  display: flex; align-items: baseline; gap: .4rem;
  margin-bottom: .15rem;
}
.pr-price strong { font-size: 1.75rem; font-weight: 850; color: var(--pr-ink); }
.pr-price small { color: var(--pr-muted); font-size: .8rem; }

.pr-specs {
  list-style: none; margin: .85rem 0 1.1rem; padding: .85rem 0 0;
  border-top: 1px dashed var(--pr-line);
  display: grid; gap: .5rem;
}
.pr-specs li {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .86rem; color: var(--pr-muted);
}
.pr-specs li span { display: inline-flex; align-items: center; gap: .4rem; }
.pr-specs li span i { color: var(--pr-teal); font-size: 1rem; }
.pr-specs li em { font-style: normal; font-weight: 800; color: var(--pr-ink); }

.pr-card .pr-cta {
  margin-top: auto;
}
.pr-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 2.9rem; padding: .65rem 1.2rem; border-radius: 12px;
  font-weight: 700; font-size: .92rem; text-decoration: none !important;
  border: 1px solid transparent; width: 100%;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.pr-cta:hover { transform: translateY(-2px); }
.pr-cta:active { transform: translateY(0); }
.pr-cta-primary {
  background: linear-gradient(135deg, var(--pr-teal), color-mix(in srgb, var(--pr-teal) 78%, #fff));
  color: #04241c;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--pr-teal) 28%, transparent);
}
.pr-cta-primary:hover { box-shadow: 0 14px 28px color-mix(in srgb, var(--pr-teal) 36%, transparent); }
.pr-cta-outline {
  border-color: color-mix(in srgb, var(--pr-ink) 28%, transparent); color: var(--pr-ink);
}
.pr-cta-outline:hover { border-color: var(--pr-ink); background: color-mix(in srgb, var(--pr-ink) 5%, transparent); }

/* ---- Billing-period switcher ---- */
.pr-period {
  position: sticky;
  top: calc(64px + 12px);
  z-index: 40;
  display: flex; justify-content: center; flex-wrap: wrap; gap: .35rem;
  margin: 1.2rem 0 .6rem;
  padding: .5rem;
  background: color-mix(in srgb, var(--pr-card) 82%, transparent);
  border: 1px solid var(--pr-line); border-radius: 18px;
  backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--pr-primary) 8%, transparent);
}
.pr-period-btn {
  flex: 1 1 auto; min-width: 96px;
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding: .52rem .9rem; border-radius: 12px;
  border: 1px solid transparent; cursor: pointer;
  background: transparent; color: var(--pr-muted);
  font-family: inherit; font-size: .88rem; font-weight: 700;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.pr-period-btn em { font-style: normal; font-size: .66rem; font-weight: 800; color: var(--pr-teal); }
.pr-period-btn:hover { color: var(--pr-ink); background: color-mix(in srgb, var(--pr-teal) 9%, transparent); transform: translateY(-1px); }
.pr-period-btn.is-active {
  background: linear-gradient(135deg, var(--pr-teal), color-mix(in srgb, var(--pr-teal) 78%, #fff));
  color: #04241c;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--pr-teal) 30%, transparent);
}
.pr-period-btn.is-active em { color: #04241c; }
.pr-period-btn:focus-visible { outline: 2px solid var(--pr-teal); outline-offset: 2px; }

/* Price + CTA per period */
.pr-price { position: relative; }
.pr-price-item {
  display: none; align-items: baseline; gap: .4rem;
}
.pr-price-item.is-active { display: inline-flex; animation: pr-fade .25s ease; }
@keyframes pr-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.pr-cta-stack { margin-top: auto; display: grid; gap: .45rem; }
.pr-cta-item { display: none; }
.pr-cta-item.is-active { display: inline-flex; animation: pr-fade .25s ease; }

@media (max-width: 640px) {
  .pr-period { top: calc(60px + 8px); padding: .45rem; border-radius: 16px; }
  .pr-period-btn { min-width: 78px; padding: .45rem .6rem; font-size: .82rem; }
}

/* Bottom CTA */
.pr-finale {
  margin: 1rem 0 2rem; padding: clamp(2.5rem, 5vw, 3.5rem) 1.5rem;
  border-radius: 20px; text-align: center;
  background:
    radial-gradient(ellipse 70% 90% at 50% 100%, color-mix(in srgb, var(--pr-teal) 15%, transparent), transparent 60%),
    var(--pr-paper-2);
  border: 1px solid var(--pr-line);
}
.pr-finale h2 { margin: 0 0 .5rem; font-size: clamp(1.4rem, 2.8vw, 1.9rem); font-weight: 850; letter-spacing: -.02em; color: var(--pr-ink); }
.pr-finale p { margin: 0 0 1.2rem; color: var(--pr-muted); font-size: .98rem; }
.pr-finale .pr-cta { width: auto; display: inline-flex; }

/* Empty */
.pr-empty { text-align: center; padding: 2rem 1rem; color: var(--pr-muted); }

/* Reveal */
.pr-reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s cubic-bezier(.22,1,.36,1), transform .55s cubic-bezier(.22,1,.36,1); transition-delay: calc(var(--i, 0) * .06s); }
.pr-reveal.is-in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 991px) {
  .pr-plans { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; gap: .85rem; }
}
@media (max-width: 640px) {
  .pr-hero { padding: clamp(2rem, 5vw, 3rem) 0; }
  .pr-group-head { flex-direction: column; align-items: flex-start; }
  .pr-chips { gap: .4rem; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: .3rem; }
  .pr-chips::-webkit-scrollbar { display: none; }
  .pr-chip { flex: 0 0 auto; white-space: nowrap; font-size: .82rem; }
  .pr-card { padding: 1.2rem 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pr-reveal, .pr-card, .pr-cta, .pr-chip { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* Deep pricing polish */
.pr-hero h1 { letter-spacing: -0.04em; }
.pr-card {
  border-radius: 16px;
  box-shadow: var(--mp-inset, inset 0 1px 0 rgba(255,255,255,0.04)), var(--mp-shadow-sm);
  transition: transform 0.22s var(--ds-ease, ease), border-color 0.22s ease, box-shadow 0.22s ease;
}
.pr-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--pr-primary) 35%, var(--pr-line));
  box-shadow: var(--mp-shadow);
}
.pr-card.is-featured,
.pr-card--featured {
  border-color: color-mix(in srgb, var(--pr-teal) 55%, var(--pr-line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--pr-teal) 35%, transparent), var(--mp-shadow);
}
.pr-period-btn[aria-pressed="true"],
.pr-period-btn.is-active {
  background: linear-gradient(135deg, var(--pr-primary), var(--pr-teal)) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--pr-primary) 28%, transparent);
}
.pr-cta,
.pr-btn-primary {
  background: linear-gradient(135deg, var(--pr-primary), var(--pr-teal)) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.16) inset, 0 10px 24px color-mix(in srgb, var(--pr-primary) 28%, transparent);
}
.pr-finale {
  box-shadow: var(--mp-inset, none), var(--mp-shadow-sm);
}

/* Phase B pricing polish 2026-10-02 */

.pr-hero h1 {
  letter-spacing: -0.025em;
}
.pr .mp-plan-card,
.pr [class*="plan-card"],
.pr .pr-card {
  border-radius: var(--mp-radius-lg, 20px);
  transition: transform 0.22s var(--ds-ease, ease), box-shadow 0.22s ease, border-color 0.22s ease;
  box-shadow: var(--mp-inset, none), var(--mp-shadow-sm, 0 8px 22px rgba(0,0,0,0.2));
}
.pr .mp-plan-card:hover,
.pr [class*="plan-card"]:hover,
.pr .pr-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand-primary, #2f6fed) 35%, transparent);
}
.pr .mp-btn-accent {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.14) inset,
    0 12px 28px color-mix(in srgb, var(--brand-primary) 26%, transparent);
}
