:root {
  --blue-50: #EEF4FF;
  --blue-100: #D9E6FF;
  --blue-200: #B3CDFF;
  --blue-300: #80ABFF;
  --blue-400: #4F8CFF;
  --blue-500: #2B6FE6;
  --blue-600: #1A56C4;
  --blue-700: #13429E;

  --gray-50: #F8F9FB;
  --gray-100: #F1F3F7;
  --gray-200: #E2E6ED;
  --gray-300: #C8CED9;
  --gray-400: #9AA2B1;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  --accent-green: #10B981;
  --accent-amber: #F59E0B;
  --accent-violet: #8B5CF6;
  --accent-rose: #F43F5E;

  --surface-primary: #FAFAFB;
  --surface-card: #FFFFFF;
  --surface-dark: #0B1120;
  --surface-dark-card: #131C2E;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
  --shadow-xl: 0 16px 50px rgba(0,0,0,0.12);
  --shadow-blue: 0 4px 20px rgba(79,140,255,0.25);

  --font-main: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --container-width: 1140px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-main);
  color: var(--gray-800);
  background: var(--surface-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ============ CONFIRM MODAL (Pricing) ============ */
.xp-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.xp-confirm-modal {
  width: 100%;
  max-width: 460px;
  background: var(--surface-card);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  animation: xpConfirmIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes xpConfirmIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.xp-confirm-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-900);
  padding: 22px 22px 0;
}

.xp-confirm-message {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
  padding: 14px 22px 0;
  white-space: pre-line;
}

.xp-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 22px 22px;
}

.xp-confirm-btn {
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.xp-confirm-btn.secondary {
  background: var(--surface-card);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

.xp-confirm-btn.secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.xp-confirm-btn.danger {
  background: #E11D48;
  color: #fff;
  box-shadow: 0 6px 24px rgba(225,29,72,0.24);
}

.xp-confirm-btn.danger:hover {
  background: #BE123C;
  transform: translateY(-1px);
}

.xp-confirm-btn.primary {
  background: var(--blue-400);
  color: #fff;
  box-shadow: var(--shadow-blue);
}

.xp-confirm-btn.primary:hover {
  background: var(--blue-500);
  transform: translateY(-1px);
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ SCROLL ANIMATIONS ============ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============ PRICING HERO ============ */
.pricing-hero {
  padding: 140px 0 60px;
  text-align: center;
}

.pricing-hero h1 {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 16px;
}

.pricing-hero h1 .text-gradient {
  background: linear-gradient(135deg, var(--blue-400) 0%, var(--accent-violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pricing-subtitle {
  font-size: 17px;
  color: var(--gray-500);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 36px;
}

/* ============ BILLING TOGGLE ============ */
.billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 8px 20px;
  background: var(--surface-card);
  border: 1px solid var(--gray-200);
  border-radius: 100px;
}

.toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-400);
  transition: color 0.3s ease;
  cursor: pointer;
  user-select: none;
}

.toggle-label.active {
  color: var(--gray-900);
  font-weight: 600;
}

.discount-badge {
  display: inline-block;
  background: #ECFDF5;
  color: #059669;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  margin-left: 6px;
  letter-spacing: 0.3px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--gray-200);
  border-radius: 24px;
  transition: 0.3s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

input:checked + .toggle-slider {
  background: var(--blue-400);
}

input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ============ PRICING TIERS GRID ============ */
.pricing-section {
  padding: 0 0 100px;
}

.pricing-tiers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: start;
}

.pricing-card {
  background: var(--surface-card);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-xl);
  padding: 36px 28px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s ease;
  height: 100%;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-200);
}

/* Featured / Popular card */
.pricing-card.popular {
  border-color: var(--blue-400);
  box-shadow: var(--shadow-blue);
  background: var(--surface-card);
}

.pricing-card.popular:hover {
  box-shadow: 0 8px 32px rgba(79,140,255,0.3);
}

.popular-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue-400);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Tier header */
.tier-header {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-100);
}

.tier-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin: 0 auto 14px;
}

.tier-free .tier-icon { background: var(--gray-100); }
.tier-basic .tier-icon { background: var(--blue-50); }
.tier-pro .tier-icon { background: #F3E8FF; }
.tier-premium .tier-icon { background: #FEF3C7; }

.tier-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
}

.price-wrapper {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  margin-bottom: 4px;
}

.price {
  font-size: 40px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -1.5px;
  line-height: 1;
}

.period {
  font-size: 14px;
  color: var(--gray-400);
  font-weight: 400;
}

.tier-description {
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 4px;
}

.annual-savings {
  font-size: 12px;
  font-weight: 600;
  color: #059669;
  margin-top: 6px;
}

/* Feature list */
.features-list {
  list-style: none;
  flex-grow: 1;
  margin-bottom: 28px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--gray-600);
  padding: 8px 0;
}

.feature-item .check-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent-green);
}

.feature-item strong {
  color: var(--gray-800);
  font-weight: 600;
}

.feature-item .feature-disabled {
  color: var(--gray-300);
}

.feature-item .feature-disabled .check-icon {
  color: var(--gray-300);
}

/* CTA buttons */
.cta-button {
  display: block;
  width: 100%;
  padding: 12px 20px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid var(--gray-200);
  background: var(--surface-card);
  color: var(--gray-700);
}

.cta-button:hover {
  border-color: var(--gray-300);
  background: var(--gray-50);
  transform: translateY(-1px);
}

.cta-button.primary {
  background: var(--blue-400);
  color: #fff;
  border-color: var(--blue-400);
  box-shadow: var(--shadow-blue);
}

.cta-button.primary:hover {
  background: var(--blue-500);
  border-color: var(--blue-500);
  box-shadow: 0 6px 24px rgba(79,140,255,0.3);
}

/* ============ FEATURE COMPARISON TABLE ============ */
.comparison-section {
  padding: 0 0 100px;
}

.comparison-header {
  text-align: center;
  margin-bottom: 40px;
}

.comparison-header h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.comparison-header p {
  font-size: 15px;
  color: var(--gray-500);
}

.comparison-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.comparison-table thead th {
  padding: 20px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  text-align: center;
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
}

.comparison-table thead th:first-child {
  text-align: left;
  padding-left: 24px;
  color: var(--gray-500);
  font-weight: 500;
}

.comparison-table thead th.popular-col {
  background: var(--blue-50);
  color: var(--blue-600);
}

.comparison-table tbody td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--gray-600);
  text-align: center;
  border-bottom: 1px solid var(--gray-50);
}

.comparison-table tbody td:first-child {
  text-align: left;
  padding-left: 24px;
  font-weight: 500;
  color: var(--gray-700);
}

.comparison-table tbody td.popular-col {
  background: rgba(79,140,255,0.02);
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.table-check {
  color: var(--accent-green);
  font-size: 16px;
  font-weight: 700;
}

.table-dash {
  color: var(--gray-300);
}

.table-category {
  padding: 12px 24px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-400) !important;
  background: var(--gray-50);
}

/* ============ FAQ SECTION ============ */
.faq-section{
  padding:100px 0;
  background:var(--gray-50);
}

.faq-header{
  text-align:center;
  margin-bottom:48px;
}

.faq-header .section-label{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  font-weight:600;
  color:var(--blue-500);
  text-transform:uppercase;
  letter-spacing:1.5px;
  margin-bottom:16px;
}

.faq-header h2{
  font-size:clamp(28px,3.5vw,36px);
  font-weight:700;
  color:var(--gray-900);
  letter-spacing:-1px;
}

/* layout */

.faq-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
  max-width:900px;
  margin:0 auto;
}

.faq-col{
  display:flex;
  flex-direction:column;
  gap:16px;
}

/* faq items */

.faq-item{
  background:var(--surface-card);
  border:1px solid var(--gray-100);
  border-radius:var(--radius-md);
  overflow:hidden;
  transition:all .3s ease;
}

.faq-item:hover{
  border-color:var(--gray-200);
  box-shadow:var(--shadow-sm);
}

.faq-question{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:20px 24px;
  cursor:pointer;
  user-select:none;
}

.faq-question h3{
  font-size:15px;
  font-weight:600;
  color:var(--gray-800);
  line-height:1.4;
  flex:1;
  padding-right:16px;
}

.faq-toggle{
  width:28px;
  height:28px;
  border-radius:50%;
  background:var(--gray-50);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  transition:.3s;
  font-size:16px;
  color:var(--gray-400);
}

.faq-item.open .faq-toggle{
  background:var(--blue-50);
  color:var(--blue-500);
  transform:rotate(45deg);
}

.faq-answer{
  max-height:0;
  overflow:hidden;
  transition:max-height .4s ease;
}

.faq-item.open .faq-answer{
  max-height:300px;
}

.faq-answer-inner{
  padding:0 24px 20px;
  font-size:14px;
  color:var(--gray-500);
  line-height:1.7;
}

.coming-soon-badge{
  display:inline-block;
  background:#FEF3C7;
  color:#92400E;
  font-size:10px;
  font-weight:700;
  padding:2px 8px;
  border-radius:100px;
  text-transform:uppercase;
  letter-spacing:.5px;
  margin-right:4px;
}

/* responsive */

@media (max-width:768px){
  .faq-grid{
    grid-template-columns:1fr;
  }
}

/* ============ BOTTOM CTA ============ */
.pricing-cta-section {
  padding: 100px 0;
}

.cta-card {
  background: var(--surface-dark);
  border-radius: var(--radius-xl);
  padding: 80px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(79,140,255,0.1) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 50%, rgba(139,92,246,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.cta-card > * { position: relative; z-index: 1; }

.cta-card h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  color: #fff;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.cta-card p {
  font-size: 17px;
  color: var(--gray-400);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-actions {
  padding: 14px 32px;
  font-size: 15px;
}

.cta-actions .btn-secondary {
  padding: 14px 32px;
  font-size: 15px;
  background: transparent;
  color: var(--gray-300);
  border-color: rgba(255,255,255,0.15);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--blue-400);
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
  background: var(--blue-500);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(79,140,255,0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  background: var(--surface-card);
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 989px) {
  .header-nav { display: none; }
  .mobile-toggle { display: block; }

  .pricing-hero { padding: 120px 0 48px; }

  .pricing-tiers {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .cta-card {
    padding: 48px 24px;
  }
  
  .pricing-hero h1 {
    font-size: 32px;
  }
}

@media (max-width: 600px) {

  .pricing-tiers {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .comparison-header h2 {
    font-size: 22px;
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
  }
}