/* SocketsIO Landing Page — Dark Modern API Style */

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a2233;
  --bg-card-hover: #1f2a3f;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.15);
  --green: #10b981;
  --green-bg: rgba(16, 185, 129, 0.1);
  --yellow: #f59e0b;
  --red: #ef4444;
  --border: #1e293b;
  --border-light: #334155;
  --code-bg: #0d1117;
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1140px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-logo {
  font-size: 1.25rem; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
  background: var(--accent); color: #fff !important; padding: 8px 20px;
  border-radius: 6px; font-weight: 600; font-size: 0.875rem;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--accent-hover); }
.nav-signin {
  color: var(--text-secondary) !important; font-weight: 500;
  border: 1px solid rgba(255,255,255,0.15); padding: 7px 16px;
  border-radius: 6px; font-size: 0.875rem;
  transition: border-color 0.2s, color 0.2s;
}
.nav-signin:hover { color: var(--text-primary) !important; border-color: rgba(255,255,255,0.35); }

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

/* ===== HERO ===== */
.hero {
  padding: 160px 0 100px; text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(59,130,246,0.08) 0%, transparent 60%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-bg); border: 1px solid rgba(16,185,129,0.2);
  padding: 6px 16px; border-radius: 100px; font-size: 0.8rem;
  color: var(--green); font-weight: 600; margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800;
  line-height: 1.1; margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent) 0%, #818cf8 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.2rem; color: var(--text-secondary); max-width: 600px;
  margin: 0 auto 40px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: var(--accent); color: #fff; padding: 14px 32px;
  border-radius: 8px; font-weight: 700; font-size: 1rem;
  border: none; cursor: pointer; transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(59,130,246,0.3); }
.btn-secondary {
  background: transparent; color: var(--text-secondary); padding: 14px 32px;
  border-radius: 8px; font-weight: 600; font-size: 1rem;
  border: 1px solid var(--border-light); cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--text-secondary); color: var(--text-primary); }
.hero-sub {
  margin-top: 20px; font-size: 0.85rem; color: var(--text-muted);
}

/* ===== SECTION COMMON ===== */
section { padding: 100px 0; }
.section-label {
  text-transform: uppercase; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 2px; color: var(--accent); margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 800;
  margin-bottom: 16px; line-height: 1.2;
}
.section-desc {
  color: var(--text-secondary); font-size: 1.05rem; max-width: 600px;
  margin-bottom: 48px; line-height: 1.7;
}
.text-center { text-align: center; }
.text-center .section-desc { margin-left: auto; margin-right: auto; }

/* ===== PRICE COMPARISON ===== */
.comparison { background: var(--bg-secondary); }
.comparison-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-card); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
}
.comparison-table th, .comparison-table td {
  padding: 16px 24px; text-align: left; font-size: 0.95rem;
}
.comparison-table thead th {
  background: var(--bg-primary); color: var(--text-muted);
  font-weight: 600; font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 1px; border-bottom: 1px solid var(--border);
}
.comparison-table tbody tr { border-bottom: 1px solid var(--border); }
.comparison-table tbody tr:last-child { border-bottom: none; }
.comparison-table tbody tr:hover { background: var(--bg-card-hover); }
.comparison-table .highlight-row {
  background: rgba(59,130,246,0.08) !important;
  border-left: 3px solid var(--accent);
}
.comparison-table .highlight-row td { font-weight: 600; }
.price-tag { font-weight: 700; font-size: 1.1rem; }
.price-tag.expensive { color: var(--red); }
.price-tag.mid { color: var(--yellow); }
.price-tag.cheap { color: var(--green); }
.savings-badge {
  display: inline-block; background: var(--green-bg);
  color: var(--green); padding: 2px 10px; border-radius: 100px;
  font-size: 0.75rem; font-weight: 700; margin-left: 8px;
}

/* ===== FEATURES ===== */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  transition: all 0.3s;
}
.feature-card:hover {
  border-color: var(--border-light); transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.feature-icon {
  width: 48px; height: 48px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 20px;
  background: var(--accent-glow); color: var(--accent);
}
.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }

/* ===== CODE EXAMPLES ===== */
.code-section { background: var(--bg-secondary); }
.code-tabs { display: flex; gap: 0; margin-bottom: 0; }
.code-tab {
  background: var(--bg-card); border: 1px solid var(--border);
  border-bottom: none; padding: 10px 24px; cursor: pointer;
  color: var(--text-muted); font-size: 0.85rem; font-weight: 600;
  font-family: var(--font); border-radius: 8px 8px 0 0;
  transition: all 0.2s; margin-right: -1px;
}
.code-tab.active { background: var(--code-bg); color: var(--accent); border-color: var(--border-light); }
.code-block {
  background: var(--code-bg); border: 1px solid var(--border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
  padding: 24px; overflow-x: auto; position: relative;
}
.code-block pre {
  font-family: var(--font-mono); font-size: 0.85rem;
  line-height: 1.8; color: var(--text-secondary); white-space: pre;
  margin: 0;
}
.code-block .comment { color: var(--text-muted); }
.code-block .string { color: var(--green); }
.code-block .keyword { color: #c084fc; }
.code-block .url { color: var(--accent); }
.code-block .key { color: var(--yellow); }
.copy-btn {
  position: absolute; top: 12px; right: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); padding: 6px 12px; border-radius: 6px;
  font-size: 0.75rem; cursor: pointer; font-family: var(--font);
  transition: all 0.2s;
}
.copy-btn:hover { color: var(--text-primary); border-color: var(--border-light); }

/* ===== PRICING ===== */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px; max-width: 960px; margin: 0 auto;
}
.pricing-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px 32px; text-align: center;
  position: relative; transition: all 0.3s;
}
.pricing-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(59,130,246,0.1);
}
.pricing-card.featured::before {
  content: 'MOST POPULAR'; position: absolute; top: -12px; left: 50%;
  transform: translateX(-50%); background: var(--accent); color: #fff;
  padding: 4px 16px; border-radius: 100px; font-size: 0.7rem;
  font-weight: 700; letter-spacing: 1px;
}
.pricing-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.pricing-price {
  font-size: 3rem; font-weight: 800; margin-bottom: 4px;
}
.pricing-price .currency { font-size: 1.5rem; vertical-align: top; color: var(--text-muted); }
.pricing-price .period { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.pricing-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 24px; }
.pricing-features { list-style: none; text-align: left; margin-bottom: 32px; }
.pricing-features li {
  padding: 8px 0; color: var(--text-secondary); font-size: 0.9rem;
  display: flex; align-items: center; gap: 10px;
}
.pricing-features li::before { content: '✓'; color: var(--green); font-weight: 700; }
.pricing-btn {
  display: block; width: 100%; padding: 14px; border-radius: 8px;
  font-weight: 700; font-size: 0.95rem; cursor: pointer;
  transition: all 0.2s; border: none; font-family: var(--font);
}
.pricing-btn-primary { background: var(--accent); color: #fff; }
.pricing-btn-primary:hover { background: var(--accent-hover); }
.pricing-btn-secondary { background: transparent; color: var(--text-primary); border: 1px solid var(--border-light); }
.pricing-btn-secondary:hover { border-color: var(--text-secondary); }

/* ===== MIGRATION ===== */
.migration {
  background: var(--bg-secondary);
}
.migration-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 48px; text-align: center;
  max-width: 720px; margin: 0 auto;
}
.migration-box h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 12px; }
.migration-box p { color: var(--text-secondary); margin-bottom: 24px; line-height: 1.7; }
.migration-code {
  background: var(--code-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 20px; text-align: left;
  margin-bottom: 24px; overflow-x: auto;
}
.migration-code pre {
  font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.8;
  color: var(--text-secondary); margin: 0;
}
.migration-code .old { color: var(--red); text-decoration: line-through; opacity: 0.6; }
.migration-code .new { color: var(--green); }

/* ===== FAQ ===== */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 12px; overflow: hidden;
}
.faq-question {
  width: 100%; background: var(--bg-card); border: none;
  padding: 20px 24px; text-align: left; cursor: pointer;
  color: var(--text-primary); font-size: 1rem; font-weight: 600;
  font-family: var(--font); display: flex; justify-content: space-between;
  align-items: center; transition: background 0.2s;
}
.faq-question:hover { background: var(--bg-card-hover); }
.faq-question .arrow { transition: transform 0.3s; color: var(--text-muted); }
.faq-item.open .faq-question .arrow { transform: rotate(180deg); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  background: var(--bg-card);
}
.faq-answer-inner {
  padding: 0 24px 20px; color: var(--text-secondary);
  font-size: 0.95rem; line-height: 1.7;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border); padding: 48px 0;
  background: var(--bg-primary);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer-left { color: var(--text-muted); font-size: 0.85rem; }
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { color: var(--text-muted); font-size: 0.85rem; }
.footer-links a:hover { color: var(--text-primary); }

/* 4-column footer grid */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { color: var(--text-muted); font-size: 0.875rem; text-decoration: none; }
.footer-col ul a:hover { color: var(--text-primary); }
.footer-col-title {
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute;
    top: 64px; left: 0; right: 0; background: var(--bg-primary);
    border-bottom: 1px solid var(--border); padding: 24px;
    gap: 16px;
  }
  .mobile-toggle { display: block; }
  .hero { padding: 120px 0 60px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  section { padding: 60px 0; }
  .comparison-table th, .comparison-table td { padding: 12px 14px; font-size: 0.85rem; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .migration-box { padding: 32px 20px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .features-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .comparison-table { font-size: 0.8rem; }
  .comparison-table th, .comparison-table td { padding: 10px 10px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate { opacity: 0; }
.animate.visible { animation: fadeUp 0.6s ease forwards; }
