/* ═══════════════════════════════════════════════════════════
   ProjecX · Pricing Theme
   Shared: in-app pricing panel + marketing site.
   Source of truth: main repo ui/pricing-theme.css.
   Copy verbatim. Do not add page-specific rules here.
═══════════════════════════════════════════════════════════ */

/* ── Design tokens ─────────────────────────────────────── */
:root {
  --bg:        oklch(9.5%  0.012 262);
  --surface:   oklch(13.5% 0.013 261);
  --surface2:  oklch(17.5% 0.014 260);
  --border:    oklch(27%   0.016 257);
  --accent:    oklch(64%   0.17  262);
  --text:      oklch(93%   0.008 252);
  --text-dim:  oklch(63%   0.012 252);
  --success:   oklch(62%   0.18  145);
  --font:      "Outfit", system-ui, sans-serif;
  --radius:    8px;
  --radius-xl: 16px;
  --t-base:    200ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Body + atmospheric background ────────────────────── */
body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Two fixed radial sapphire blooms: top-left strong, bottom-right faint */
  background-image:
    radial-gradient(ellipse 58% 46% at 12% 16%, oklch(31% 0.07 262 / 0.36) 0%, transparent 70%),
    radial-gradient(ellipse 40% 34% at 87% 83%, oklch(25% 0.05 262 / 0.19) 0%, transparent 62%);
  background-attachment: fixed;
}

/* ── Nav ───────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(9.5% 0.012 262 / 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--accent);
}
.nav-logo-x {
  font-size: 1.25em;
  font-weight: 800;
  color: oklch(93% 0.008 252);
  vertical-align: -0.08em;
}
.nav-back {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--t-base);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-back:hover { color: var(--text); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: var(--radius);
  transition: color var(--t-base), background var(--t-base);
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link-cta {
  background: var(--accent);
  color: oklch(10% 0.012 262);
  font-weight: 600;
  padding: 7px 16px;
  transition: background var(--t-base), transform var(--t-base), box-shadow var(--t-base);
}
.nav-link-cta:hover {
  color: oklch(10% 0.012 262);
  background: oklch(70% 0.17 262);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px oklch(0% 0 0 / 0.3);
}

/* ── Pricing page layout ───────────────────────────────── */
.pricing-wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}
.pricing-header {
  text-align: center;
  margin-bottom: 52px;
}
.pricing-header h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.15;
}
.pricing-header .subtitle {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Plans bento grid ──────────────────────────────────── */
.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}

/* ── Plan card ─────────────────────────────────────────── */
.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  transition:
    transform var(--t-base),
    box-shadow var(--t-base),
    border-color var(--t-base);
}
.plan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px oklch(0% 0 0 / 0.45);
  border-color: oklch(34% 0.018 257);
}

/* Featured: left column, spans 2 rows */
.plan-card.featured {
  grid-column: 1;
  grid-row: 1 / 3;
  background: var(--surface2);
  border-color: oklch(36% 0.022 262);
  box-shadow:
    0 0 0 1px oklch(42% 0.05 262 / 0.45),
    0 20px 56px oklch(0% 0 0 / 0.52);
}
.plan-card.featured:hover {
  transform: translateY(-3px);
  border-color: oklch(46% 0.035 262);
  box-shadow:
    0 0 0 1px oklch(53% 0.07 262 / 0.55),
    0 24px 64px oklch(0% 0 0 / 0.58);
}

/* Bento positions */
.plan-trial { grid-column: 2; grid-row: 1; }
.plan-byok  { grid-column: 2; grid-row: 2; }

/* ── Plan badge ────────────────────────────────────────── */
.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: oklch(64% 0.17 262 / 0.12);
  border: 1px solid oklch(64% 0.17 262 / 0.28);
  border-radius: 100px;
  padding: 3px 10px 3px 8px;
  width: fit-content;
}
.plan-badge::before { content: "★"; font-size: 0.65rem; }

/* ── Card header ───────────────────────────────────────── */
.plan-header { display: flex; flex-direction: column; gap: 8px; }
.plan-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
}
.plan-desc {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ── Plan price ────────────────────────────────────────── */
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  line-height: 1;
}
.plan-price-amount {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.045em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.plan-price-period {
  font-size: 0.875rem;
  color: var(--text-dim);
  font-weight: 400;
}

/* ── Feature list ──────────────────────────────────────── */
.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.5;
}
.plan-features li::before {
  content: "✓";
  flex-shrink: 0;
  color: var(--success);
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 1px;
}

/* ── CTA button ────────────────────────────────────────── */
.plan-cta {
  display: block;
  width: 100%;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition:
    background var(--t-base),
    border-color var(--t-base),
    transform var(--t-base),
    box-shadow var(--t-base),
    color var(--t-base);
}
.plan-cta:hover:not(:disabled) {
  background: var(--surface2);
  border-color: oklch(38% 0.018 257);
  transform: translateY(-1px);
}
.plan-cta.primary {
  background: var(--accent);
  color: oklch(9.5% 0.012 262);
  border-color: transparent;
}
.plan-cta.primary:hover:not(:disabled) {
  background: oklch(70% 0.17 262);
  transform: translateY(-1px);
  box-shadow: 0 5px 18px oklch(0% 0 0 / 0.35);
}
.plan-cta:disabled,
.plan-cta[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Trust strip ───────────────────────────────────────── */
.trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.trust-item + .trust-item::before {
  content: "·";
  color: var(--border);
  font-size: 1.2rem;
  line-height: 1;
  margin-right: -16px;
}

/* ── Pricing note ──────────────────────────────────────── */
.pricing-note {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 20px;
  line-height: 1.6;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Mobile ────────────────────────────────────────────── */
@media (max-width: 680px) {
  .nav-inner { padding: 0 16px; }

  .pricing-wrapper { padding: 40px 16px 60px; }
  .pricing-header { margin-bottom: 36px; }
  .pricing-header h1 { font-size: 1.75rem; }

  .plans {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .plan-card.featured { grid-column: 1; grid-row: auto; }
  .plan-trial         { grid-column: 1; grid-row: auto; }
  .plan-byok          { grid-column: 1; grid-row: auto; }

  .plan-price-amount { font-size: 1.9rem; }

  .trust-strip { flex-direction: column; gap: 10px; align-items: center; }
  .trust-item + .trust-item::before { display: none; }
}
