/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #0a0a0f;
  color: #e8e8ec;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ── Header ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem;
}
.logo { display: flex; align-items: center; gap: 0.75rem; }
.logo-icon { font-size: 1.8rem; }
.logo h1 { font-size: 1.25rem; font-weight: 700; color: #fff; }
.tagline { font-size: 0.75rem; color: #888; font-weight: 400; }
nav { display: flex; gap: 2rem; }
nav a { font-size: 0.875rem; font-weight: 500; color: #aaa; transition: color 0.2s; }
nav a:hover { color: #fff; }

/* ── Hero ── */
.hero {
  padding: 10rem 2rem 6rem;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(59,130,246,0.12) 0%, transparent 60%);
}
.hero-inner { max-width: 640px; margin: 0 auto; }
.hero h2 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800; line-height: 1.15;
  background: linear-gradient(135deg, #fff 30%, #60a5fa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p { margin: 1.25rem 0 2rem; font-size: 1.1rem; color: #999; }

/* ── Buttons ── */
.btn-primary {
  display: inline-block; padding: 0.85rem 2rem;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff; font-weight: 600; font-size: 1rem;
  border: none; border-radius: 12px; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 24px rgba(59,130,246,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(59,130,246,0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  display: inline-block; padding: 0.75rem 1.5rem;
  background: rgba(255,255,255,0.08); color: #fff;
  font-weight: 500; font-size: 0.9rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; cursor: pointer; transition: background 0.2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.14); }

/* ── How It Works ── */
.how-it-works {
  padding: 5rem 2rem; max-width: 1000px; margin: 0 auto; text-align: center;
}
.how-it-works h3 { font-size: 1.75rem; font-weight: 700; margin-bottom: 3rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.step {
  padding: 2rem 1.5rem; border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.step-num {
  width: 40px; height: 40px; margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff; font-weight: 700; border-radius: 50%; font-size: 1rem;
}
.step h4 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.step p { font-size: 0.85rem; color: #888; }

/* ── Packages ── */
.packages { padding: 3rem 2rem 6rem; max-width: 1100px; margin: 0 auto; text-align: center; }
.packages h3 { font-size: 1.75rem; font-weight: 700; margin-bottom: 2.5rem; }
.package-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.package-card {
  position: relative; padding: 2rem; border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  text-align: left; cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.package-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59,130,246,0.4);
  box-shadow: 0 12px 40px rgba(59,130,246,0.15);
}
.package-card.popular {
  border-color: rgba(59,130,246,0.5);
  background: linear-gradient(160deg, rgba(59,130,246,0.08), rgba(255,255,255,0.04));
}
.popular-badge {
  position: absolute; top: -12px; right: 20px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff; font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  padding: 0.3rem 0.8rem; border-radius: 20px; letter-spacing: 0.5px;
}
.package-name { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.package-price { font-size: 2rem; font-weight: 800; margin-bottom: 0.75rem; }
.package-price span { font-size: 0.9rem; font-weight: 400; color: #888; }
.package-features { list-style: none; margin-bottom: 1.5rem; }
.package-features li {
  padding: 0.35rem 0; font-size: 0.85rem; color: #aaa;
  display: flex; align-items: center; gap: 0.5rem;
}
.package-features li::before { content: '✓'; color: #3b82f6; font-weight: 700; }
.package-btn {
  width: 100%; padding: 0.75rem; border: none; border-radius: 10px;
  font-weight: 600; font-size: 0.9rem; cursor: pointer;
  transition: background 0.2s;
}
.package-card.popular .package-btn {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}
.package-card:not(.popular) .package-btn {
  background: rgba(255,255,255,0.08);
  color: #fff; border: 1px solid rgba(255,255,255,0.12);
}
.package-card:not(.popular) .package-btn:hover { background: rgba(255,255,255,0.14); }

/* ── Modals ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-overlay.active { display: flex; }
.modal {
  background: #16161d; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px; padding: 2.5rem; max-width: 460px; width: 100%;
  position: relative; animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute; top: 1rem; right: 1.25rem;
  background: none; border: none; color: #666; font-size: 1.5rem;
  cursor: pointer; transition: color 0.2s;
}
.modal-close:hover { color: #fff; }

/* Checkout modal */
#checkoutModal .modal-body h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.checkout-summary {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem; border-radius: 12px; margin: 1rem 0 1.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.checkout-item-name { font-weight: 600; }
.checkout-item-price { font-size: 1.25rem; font-weight: 700; color: #3b82f6; }
#stripeCard {
  padding: 1rem; border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}
#stripeCard.StripeElement--focus { border-color: #3b82f6; }
#stripeCard.StripeElement--invalid { border-color: #ef4444; }
.card-error { color: #ef4444; font-size: 0.8rem; margin-bottom: 0.75rem; min-height: 1.2rem; }
.pay-btn {
  width: 100%; padding: 0.9rem; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff; font-weight: 600; font-size: 1rem;
  cursor: pointer; transition: opacity 0.2s;
}
.pay-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Code display modal */
.modal-code { text-align: center; }
.success-icon {
  width: 64px; height: 64px; margin: 0 auto 1.25rem;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff; font-size: 2rem; font-weight: 700;
  border-radius: 50%;
}
.code-display {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 2.5rem; font-weight: 800; letter-spacing: 6px;
  padding: 1.25rem; margin: 1rem 0;
  background: rgba(59,130,246,0.08);
  border: 2px dashed rgba(59,130,246,0.3);
  border-radius: 16px; color: #60a5fa;
  user-select: all;
}
.code-instructions { font-size: 0.85rem; color: #888; margin-bottom: 1.5rem; }
.code-actions { display: flex; gap: 1rem; justify-content: center; }

/* Loading modal */
.modal-loading { text-align: center; padding: 3rem; }
.spinner {
  width: 48px; height: 48px; margin: 0 auto 1.5rem;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ── */
footer {
  text-align: center; padding: 2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.8rem; color: #555;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .header-inner { padding: 0.75rem 1rem; }
  nav { display: none; }
  .hero { padding: 8rem 1.5rem 4rem; }
  .packages { padding: 2rem 1rem 4rem; }
  .modal { padding: 1.75rem; margin: 0.5rem; }
  .code-display { font-size: 1.75rem; letter-spacing: 4px; }
}
