/* pricing.css — Sovereign Matrix Pricing Page v1.0 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Bebas+Neue&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --gold:    #FFBF00;
  --gold-dim: #C9A000;
  --bg:      #000000;
  --bg-card: #0d1117;
  --bg-card2:#111820;
  --border:  #1e2a38;
  --text:    #e8eaf0;
  --muted:   #5a6478;
  --green:   #22c55e;
  --blue:    #3b82f6;
  --purple:  #a855f7;
  --red:     #ef4444;
  --radius:  16px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Background grid ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255,191,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,191,0,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none; z-index: 0;
}

.pricing-wrap { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 0 24px 80px; }

/* ── Back nav ── */
.back-nav {
  display: flex; align-items: center; gap: 8px;
  padding: 20px 0 0;
  font-size: 13px; color: var(--muted);
  cursor: pointer; width: fit-content;
  transition: color .2s;
}
.back-nav:hover { color: var(--gold); }
.back-nav svg { width: 16px; height: 16px; }

/* ── Page header ── */
.pricing-header { text-align: center; padding: 60px 0 48px; }
.pricing-header h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: 2px;
  background: linear-gradient(135deg, #fff 30%, var(--gold) 70%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  line-height: 1.1; margin-bottom: 16px;
}
.pricing-header p { font-size: 18px; color: var(--muted); max-width: 560px; margin: 0 auto 32px; }

/* ── Billing toggle ── */
.billing-toggle {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 40px; padding: 6px 16px; font-size: 14px;
}
.billing-toggle .toggle-switch {
  width: 44px; height: 24px; border-radius: 12px;
  background: var(--gold); cursor: pointer;
  position: relative; transition: background .2s;
}
.billing-toggle .toggle-knob {
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #000; transition: transform .2s;
}
.billing-toggle.monthly .toggle-knob { transform: translateX(0); }
.billing-toggle.annual  .toggle-knob { transform: translateX(20px); }
.billing-toggle .save-badge {
  background: rgba(34,197,94,.15); color: var(--green);
  border: 1px solid rgba(34,197,94,.3);
  border-radius: 20px; padding: 2px 10px; font-size: 12px; font-weight: 600;
}

/* ── Card grid ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
  align-items: start;
}
@media (max-width: 1024px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .pricing-grid { grid-template-columns: 1fr; } }

/* ── Base card ── */
.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  position: relative;
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.plan-card:hover { transform: translateY(-4px); }

/* Free */
.plan-card.free { border-color: #1e2a38; }
/* Premium */
.plan-card.premium { border-color: var(--blue); box-shadow: 0 0 30px rgba(59,130,246,.12); }
/* SSO */
.plan-card.sso {
  border-color: var(--gold); box-shadow: 0 0 40px rgba(255,191,0,.15);
  transform: scale(1.03); z-index: 1;
  background: linear-gradient(160deg, #0f1a0a 0%, #0d1117 60%);
}
.plan-card.sso:hover { transform: scale(1.03) translateY(-4px); }
/* Sovereign Pro */
.plan-card.pro {
  border-color: var(--purple);
  box-shadow: 0 0 30px rgba(168,85,247,.15);
  background: linear-gradient(160deg, #110a1a 0%, #0d1117 60%);
}

/* ── Badge ── */
.plan-badge {
  display: inline-block; padding: 3px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  margin-bottom: 16px; width: fit-content;
}
.plan-badge.gray   { background: rgba(90,100,120,.25); color: var(--muted); border: 1px solid #2a3040; }
.plan-badge.blue   { background: rgba(59,130,246,.15); color: #60a5fa; border: 1px solid rgba(59,130,246,.3); }
.plan-badge.gold   { background: rgba(255,191,0,.15); color: var(--gold); border: 1px solid rgba(255,191,0,.4); }
.plan-badge.purple { background: linear-gradient(90deg,rgba(255,191,0,.12),rgba(168,85,247,.12)); color: #d4b0ff; border: 1px solid rgba(168,85,247,.4); }

/* ── Plan name ── */
.plan-name { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.plan-name.gold-text {
  background: linear-gradient(90deg, var(--gold), #ffdd88, var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.plan-name.purple-text {
  background: linear-gradient(90deg, var(--gold), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ── Price ── */
.plan-price {
  display: flex; align-items: baseline; gap: 4px;
  margin-bottom: 4px;
}
.plan-price .amount { font-size: 44px; font-weight: 800; color: #fff; line-height: 1; }
.plan-price .period { font-size: 14px; color: var(--muted); }
.plan-annual-note  { font-size: 12px; color: var(--muted); margin-bottom: 20px; min-height: 18px; }
.plan-seat-note    { font-size: 12px; color: var(--gold); margin-bottom: 20px; }

/* ── Divider ── */
.plan-divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ── Feature list ── */
.plan-features { list-style: none; flex: 1; margin-bottom: 24px; }
.plan-features li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; padding: 5px 0; line-height: 1.4;
}
.plan-features li .fi { width: 16px; flex-shrink: 0; margin-top: 1px; }
.plan-features li.included .fi::before { content: '✓'; color: var(--green); font-weight: 700; }
.plan-features li.excluded { color: var(--muted); }
.plan-features li.excluded .fi::before { content: '—'; color: #3a4050; }
.plan-features li.addon .fi::before { content: '+'; color: var(--gold); font-weight: 700; }
.plan-features .section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  color: var(--muted); text-transform: uppercase;
  padding: 10px 0 4px; display: block;
}

/* ── CTA buttons ── */
.plan-cta {
  width: 100%; padding: 13px; border-radius: 10px;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 700;
  cursor: pointer; border: none; transition: all .2s; letter-spacing: .3px;
}
.plan-cta.ghost    { background: transparent; border: 1px solid #2a3040; color: var(--text); }
.plan-cta.ghost:hover  { border-color: #fff; color: #fff; }
.plan-cta.solid-blue   { background: var(--blue); color: #fff; }
.plan-cta.solid-blue:hover { background: #2563eb; box-shadow: 0 4px 20px rgba(59,130,246,.35); }
.plan-cta.solid-gold   { background: var(--gold); color: #000; }
.plan-cta.solid-gold:hover { background: #ffce2e; box-shadow: 0 4px 24px rgba(255,191,0,.4); }
.plan-cta.gradient-pro {
  background: linear-gradient(90deg, var(--gold-dim), var(--purple));
  color: #fff;
}
.plan-cta.gradient-pro:hover { box-shadow: 0 4px 24px rgba(168,85,247,.4); filter: brightness(1.1); }

/* ── Credits explainer ── */
.credits-explainer {
  margin-top: 40px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 32px;
  display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start;
}
.credits-explainer .ce-icon { font-size: 32px; }
.credits-explainer h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--gold); }
.credits-explainer p  { font-size: 13px; color: var(--muted); line-height: 1.6; }

.credit-table { margin-top: 16px; width: 100%; border-collapse: collapse; font-size: 12px; }
.credit-table th { color: var(--gold); text-align: left; padding: 4px 12px 8px 0; font-weight: 600; }
.credit-table td { padding: 5px 12px 5px 0; color: var(--text); border-top: 1px solid var(--border); }
.credit-table td:last-child { color: var(--muted); }
.credit-pill {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600;
  background: rgba(255,191,0,.12); color: var(--gold); border: 1px solid rgba(255,191,0,.25);
}

/* ── Feature comparison note ── */
.pricing-footnote {
  text-align: center; font-size: 12px; color: var(--muted);
  margin-top: 32px; line-height: 1.8;
}

/* ── Upsell modal overlay ── */
.sov-upgrade-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.75); backdrop-filter: blur(8px);
  z-index: 9990; display: flex; align-items: center; justify-content: center;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }

.sov-upgrade-modal {
  background: var(--bg-card2); border: 1px solid var(--gold);
  box-shadow: 0 0 60px rgba(255,191,0,.15);
  border-radius: 20px; padding: 36px 32px; width: 480px; max-width: 95vw;
  position: relative; animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(24px); opacity:0 } to { transform: translateY(0); opacity:1 } }

.sov-upgrade-modal .close-btn {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 20px; line-height: 1; padding: 4px;
  transition: color .2s;
}
.sov-upgrade-modal .close-btn:hover { color: #fff; }

.upgrade-icon { text-align: center; font-size: 40px; margin-bottom: 12px; }
.upgrade-title { text-align: center; font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.upgrade-sub   { text-align: center; font-size: 13px; color: var(--gold); margin-bottom: 20px; }

.upgrade-features { list-style: none; margin-bottom: 20px; }
.upgrade-features li {
  display: flex; gap: 10px; padding: 7px 0;
  font-size: 13px; border-bottom: 1px solid var(--border);
}
.upgrade-features li:last-child { border-bottom: none; }
.upgrade-features li .ufi { color: var(--gold); font-weight: 700; flex-shrink: 0; }

.tier-compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px;
}
.tier-compare .tc-box {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; text-align: center;
}
.tier-compare .tc-box.sso-box { border-color: var(--gold); }
.tier-compare .tc-title { font-size: 11px; font-weight: 700; letter-spacing: .5px; margin-bottom: 8px; }
.tier-compare .tc-box.sso-box .tc-title { color: var(--gold); }
.tier-compare .tc-box .tc-title { color: var(--muted); }
.tier-compare li { font-size: 11px; color: var(--muted); list-style: none; padding: 2px 0; }
.tier-compare .sso-box li { color: var(--text); }

.upgrade-cta-primary {
  width: 100%; padding: 14px; border: none; border-radius: 12px;
  background: var(--gold); color: #000; font-size: 15px; font-weight: 700;
  cursor: pointer; margin-bottom: 10px; transition: all .2s;
}
.upgrade-cta-primary:hover { background: #ffce2e; box-shadow: 0 4px 20px rgba(255,191,0,.4); }

.upgrade-cta-secondary {
  width: 100%; padding: 12px; border: 1px solid var(--border);
  border-radius: 12px; background: none; color: var(--muted);
  font-size: 13px; cursor: pointer; transition: all .2s;
}
.upgrade-cta-secondary:hover { border-color: #fff; color: #fff; }

.upgrade-footnote { text-align: center; font-size: 11px; color: var(--muted); margin-top: 10px; }

/* ── CreditMeter bar ── */
.credit-meter-wrap {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
}
.credit-meter-bar {
  width: 80px; height: 6px; border-radius: 3px;
  background: var(--border); overflow: hidden;
}
.credit-meter-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), #ffdd88);
  transition: width .4s ease;
}
.credit-meter-fill.low  { background: linear-gradient(90deg, var(--red), #ff8888); }
.credit-meter-fill.warn { background: linear-gradient(90deg, #f59e0b, #fcd34d); }
