/* ========================================
   PayGate Marketing Site
   ======================================== */

:root {
  --bg-deep: #050510;
  --bg-dark: #0a0a1a;
  --bg-card: #111128;
  --bg-card-hover: #16163a;
  --border: #1e1e4a;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --primary: #00d4ff;
  --primary-soft: #00d4ff22;
  --secondary: #7c3aed;
  --accent: #00ffcc;
  --gradient: linear-gradient(135deg, #00d4ff, #7c3aed);
  --gradient-soft: linear-gradient(135deg, #00d4ff15, #7c3aed15);
  --gradient-accent: linear-gradient(135deg, #00ffcc, #00d4ff);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

img, svg { max-width: 100%; height: auto; }

/* ---- Layout ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* ---- Nav ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(5, 5, 16, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 72px;
}

.nav-logo { height: 40px; width: auto; }

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); opacity: 1; }
.nav-links a.active { color: var(--primary); }

.nav-cta {
  background: var(--gradient);
  color: #fff !important;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 20px #00d4ff40; opacity: 1; }

.nav-mobile-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ---- Hero ---- */
.hero {
  padding: 160px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(ellipse, #00d4ff08 0%, #7c3aed05 40%, transparent 70%);
  pointer-events: none;
}

.hero-logo {
  width: 140px; height: 140px;
  margin: 0 auto 40px;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero h1 .highlight {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 48px;
  line-height: 1.6;
}

.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 10px;
  font-size: 1rem; font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none; cursor: pointer;
}
.btn:hover { transform: translateY(-2px); opacity: 1; }

.btn-primary {
  background: var(--gradient); color: #fff;
}
.btn-primary:hover { box-shadow: 0 8px 30px #00d4ff30; }

.btn-secondary {
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary); box-shadow: 0 8px 30px #00d4ff10; }

/* ---- Badges ---- */
.badges {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-top: 64px;
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text-muted); font-weight: 500;
}

.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
}

/* ---- Section ---- */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-dark); }

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header .overline {
  display: inline-block;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 6px 16px; border-radius: 20px;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ---- Feature Grid ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: #00d4ff40;
  box-shadow: 0 12px 40px #00d4ff08;
}

.feature-icon {
  width: 48px; height: 48px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.2rem; font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---- SDK Logos ---- */
.sdk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.sdk-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}

.sdk-card:hover { transform: translateY(-3px); border-color: #00d4ff40; }

.sdk-card .sdk-icon { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.sdk-card .sdk-name { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.sdk-card .sdk-lang { color: var(--text-dim); font-size: 0.85rem; }

/* ---- How It Works ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  counter-reset: step;
}

.step {
  text-align: center;
  counter-increment: step;
  position: relative;
}

.step::before {
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  background: var(--gradient);
  border-radius: 50%;
  font-size: 1.4rem; font-weight: 800;
  color: #fff;
  margin: 0 auto 20px;
}

.step h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 0.95rem; }

/* ---- Code Block ---- */
.code-block {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  overflow-x: auto;
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 24px 0;
}

.code-block .kw { color: #c792ea; }
.code-block .fn { color: #82aaff; }
.code-block .str { color: #c3e88d; }
.code-block .cm { color: #546e7a; }
.code-block .ty { color: #ffcb6b; }
.code-block .num { color: #f78c6c; }

/* ---- Pricing ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
  position: relative;
  transition: transform 0.3s;
}

.pricing-card:hover { transform: translateY(-4px); }

.pricing-card.featured {
  border-color: #00d4ff60;
  box-shadow: 0 0 60px #00d4ff10;
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gradient);
  color: #fff; font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 4px 16px; border-radius: 12px;
}

.pricing-card .tier { font-size: 0.9rem; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.pricing-card .price { font-size: 3rem; font-weight: 800; margin-bottom: 4px; }
.pricing-card .price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.pricing-card .price-note { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 28px; }

.pricing-card ul { list-style: none; margin-bottom: 32px; }
.pricing-card li {
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex; align-items: flex-start; gap: 10px;
}
.pricing-card li::before {
  content: '';
  width: 20px; height: 20px; min-width: 20px;
  background: var(--accent);
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
  display: inline-block; margin-top: 2px;
}

.pricing-card .btn { width: 100%; justify-content: center; }

/* ---- Docs ---- */
.docs-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 32px;
}

.docs-tab {
  padding: 10px 20px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); font-weight: 600; font-size: 0.9rem;
  cursor: pointer; transition: all 0.2s;
}
.docs-tab:hover, .docs-tab.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.docs-panel { display: none; }
.docs-panel.active { display: block; }

/* ---- Stats ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  text-align: center;
  padding: 60px 0;
}

.stat-value {
  font-size: 3rem; font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label { color: var(--text-muted); font-size: 0.95rem; margin-top: 4px; }

/* ---- CTA Banner ---- */
.cta-banner {
  text-align: center;
  padding: 80px 24px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  border-radius: 24px;
  margin: 80px auto;
  max-width: 900px;
}

.cta-banner h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 16px; }
.cta-banner p { color: var(--text-muted); margin-bottom: 32px; font-size: 1.1rem; }

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p { color: var(--text-dim); font-size: 0.9rem; margin-top: 16px; max-width: 280px; line-height: 1.6; }

.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--text-dim); font-size: 0.85rem;
}

/* ---- Page Header ---- */
.page-header {
  padding: 140px 0 60px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ---- Feature Detail ---- */
.feature-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 60px 0;
}

.feature-detail.reverse { direction: rtl; }
.feature-detail.reverse > * { direction: ltr; }

.feature-detail h3 { font-size: 1.8rem; font-weight: 800; margin-bottom: 16px; }
.feature-detail p { color: var(--text-muted); font-size: 1.05rem; line-height: 1.7; margin-bottom: 16px; }

.feature-visual {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  font-family: 'SF Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.8;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--bg-deep); border-bottom: 1px solid var(--border);
    padding: 24px; gap: 16px;
  }
  .hero { padding: 120px 0 60px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-detail { grid-template-columns: 1fr; gap: 32px; }
  .feature-detail.reverse { direction: ltr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .sdk-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .sdk-grid { grid-template-columns: 1fr; }
}
