/* ============================================
   Kyntra — Shared stylesheet for pricing + legal pages
   Used by: /pricing, /terms, /privacy, /refund
   ============================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #030712;
  --bg-elevated: #0a0f1e;
  --bg-card: #111827;
  --bg-card-hover: #1a2236;
  --text: #f1f5f9;
  --text-sub: #94a3b8;
  --text-dim: #64748b;
  --text-faint: #475569;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --violet: #8b5cf6;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --border: rgba(148,163,184,0.08);
  --border-bright: rgba(148,163,184,0.15);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Pretendard Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}
::selection { background: rgba(59,130,246,0.3); }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }

.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

a { color: var(--blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--cyan); }

.grad-blue {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Nav ────────────────────────────────── */
nav.legal-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(3,7,18,0.88);
  backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img { width: 34px; height: 34px; border-radius: 9px; }
.nav-logo span { font-size: 19px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; }
.nav-back {
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 500;
}
.nav-back:hover { color: var(--text); }
.nav-cta {
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff !important;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(59,130,246,0.25); color: #fff !important; }
.nav-right { display: flex; align-items: center; gap: 24px; }

/* ── Page header ────────────────────────── */
.page-header {
  padding: 100px 0 60px;
  text-align: center;
}
.page-header h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  line-height: 1.1;
}
.page-header .subtitle {
  font-size: 18px;
  color: var(--text-sub);
  max-width: 640px;
  margin: 0 auto;
}
.page-header .updated {
  display: inline-block;
  margin-top: 24px;
  padding: 6px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* ── Legal content ──────────────────────── */
.legal-content { padding: 20px 0 120px; }
.legal-content h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 56px 0 16px;
  color: var(--text);
  letter-spacing: -0.5px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-size: 19px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--text);
}
.legal-content p {
  font-size: 16px;
  color: var(--text-sub);
  margin-bottom: 16px;
}
.legal-content ul, .legal-content ol {
  margin: 16px 0 16px 24px;
  color: var(--text-sub);
  font-size: 16px;
}
.legal-content li { margin-bottom: 10px; }
.legal-content strong { color: var(--text); font-weight: 600; }
.legal-content em { color: var(--text); font-style: normal; font-weight: 500; }
.legal-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 56px 0;
}
.legal-content code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 5px;
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-size: 13.5px;
  color: var(--cyan);
}
.legal-content blockquote {
  border-left: 3px solid var(--blue);
  padding: 4px 0 4px 20px;
  margin: 20px 0;
  color: var(--text-sub);
  font-style: italic;
}
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 28px;
  margin-bottom: 40px;
}
.toc-title {
  font-size: 13px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
  margin-bottom: 12px;
}
.toc ol {
  margin: 0 0 0 20px;
  color: var(--text-sub);
  font-size: 14px;
}
.toc li { margin-bottom: 6px; }
.toc a { color: var(--text-sub); }
.toc a:hover { color: var(--blue); }

/* ── Pricing grid ───────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin: 48px 0 60px;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.pricing-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-bright);
  transform: translateY(-4px);
}
.pricing-card.featured {
  border-color: rgba(59,130,246,0.4);
  background: linear-gradient(180deg, rgba(59,130,246,0.05), var(--bg-card));
  position: relative;
}
.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  padding: 5px 16px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  box-shadow: 0 6px 20px rgba(59,130,246,0.3);
}
.pricing-card .tier-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.pricing-card .tier-tag {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 28px;
  min-height: 42px;
}
.pricing-card .price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
}
.pricing-card .amount {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--text);
}
.pricing-card .per {
  font-size: 16px;
  color: var(--text-dim);
}
.pricing-card .first-month {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 999px;
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 32px;
}
.pricing-card ul.features {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  flex: 1;
}
.pricing-card ul.features li {
  padding: 11px 0;
  color: var(--text-sub);
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.pricing-card ul.features li:last-child { border-bottom: none; }
.pricing-card ul.features li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1.3;
}
.pricing-card .cta {
  display: block;
  width: 100%;
  padding: 15px;
  text-align: center;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff !important;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}
.pricing-card .cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(59,130,246,0.25);
  color: #fff !important;
}

/* ── FAQ ────────────────────────────────── */
.faq { margin: 60px 0; }
.faq h2 { margin-bottom: 24px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 26px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
.faq-item:hover { border-color: var(--border-bright); }
.faq-item h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.faq-item p {
  font-size: 14px;
  color: var(--text-sub);
  margin: 0;
  line-height: 1.65;
}

/* ── Footer ─────────────────────────────── */
footer.legal-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 32px;
  background: var(--bg-elevated);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-left { display: flex; align-items: center; gap: 10px; }
.footer-left img { width: 24px; height: 24px; border-radius: 6px; }
.footer-copy { font-size: 13px; color: var(--text-dim); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: var(--text-dim); }
.footer-links a:hover { color: var(--text-sub); }
.footer-biz {
  margin-top: 16px;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

/* ── Mobile ─────────────────────────────── */
@media (max-width: 768px) {
  .pricing-grid { grid-template-columns: 1fr; gap: 20px; }
  .page-header { padding: 60px 0 40px; }
  .legal-content h2 { font-size: 22px; margin: 40px 0 12px; }
  .legal-content p, .legal-content ul, .legal-content ol { font-size: 15px; }
  .pricing-card { padding: 32px 26px; }
  .pricing-card .amount { font-size: 44px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .nav-right { gap: 14px; }
  .nav-back { display: none; }
}
