/* ============================================
   SnapAPI Landing Page — Monochrome Dark Theme
   ============================================ */

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

:root {
  --bg: #09090b;
  --bg-raised: #111113;
  --bg-card: #18181b;
  --bg-card-hover: #1f1f23;
  --border: #27272a;
  --border-light: #3f3f46;
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --max-w: 1200px;
  --transition: 150ms ease;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

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

code {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 0.875em;
}

/* --- BUTTONS --- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-primary:hover {
  background: #d4d4d8;
  border-color: #d4d4d8;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-light);
}
.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--text-muted);
}

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

/* --- NAV --- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  padding: 6px 16px;
  background: var(--text);
  color: var(--bg) !important;
  border-radius: var(--radius-xs);
  font-weight: 500;
}
.nav-cta:hover {
  background: #d4d4d8;
}

/* --- MOBILE TOGGLE --- */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.mobile-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: all 0.2s ease;
}
.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(3px, 3px);
}
.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(3px, -3px);
}

/* --- HERO --- */

.hero {
  padding: 160px 24px 100px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  letter-spacing: 0.01em;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 56px;
}

.hero-code {
  text-align: left;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 680px;
  margin: 0 auto;
}

/* --- CODE BLOCKS --- */

.code-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-light);
}

.code-lang {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.code-copy {
  margin-left: 12px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}
.code-copy:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

pre {
  padding: 20px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  color: #d4d4d8;
}

.token-keyword { color: #e4e4e7; font-weight: 500; }
.token-string { color: #a1a1aa; }
.token-number { color: #d4d4d8; }
.token-variable { color: #e4e4e7; }

/* --- SECTIONS COMMON --- */

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

.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

section h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.section-sub {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.6;
}

/* --- DEMO --- */

.demo {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.demo .section-sub {
  margin: 0 auto 40px;
}

.demo-box {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.demo-input-row {
  display: flex;
  padding: 16px;
  gap: 10px;
}

.demo-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.demo-input-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.demo-input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}
.demo-input:focus {
  border-color: var(--text-muted);
}

.demo-btn {
  flex-shrink: 0;
}

.demo-options {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px 16px;
  flex-wrap: wrap;
}

.demo-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.demo-option input {
  accent-color: #fff;
}

.demo-sep {
  width: 1px;
  height: 16px;
  background: var(--border);
}

.demo-preview {
  border-top: 1px solid var(--border);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 14px;
  padding: 40px;
}

/* --- FEATURES --- */

.features {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.features .section-sub {
  margin-bottom: 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature-card {
  padding: 32px;
  background: var(--bg-raised);
  transition: background var(--transition);
}
.feature-card:hover {
  background: var(--bg-card);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.feature-card code {
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid var(--border);
}

/* --- CODE EXAMPLES --- */

.examples {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.examples .section-sub {
  margin-bottom: 40px;
}

.code-tabs {
  max-width: 680px;
}

.code-tab-buttons {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
}

.code-tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color var(--transition);
}
.code-tab-btn:hover {
  color: var(--text-secondary);
}
.code-tab-btn.active {
  color: var(--text);
}
.code-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--text);
}

.code-tab-panel {
  display: none;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}
.code-tab-panel.active {
  display: block;
}

/* --- PRICING --- */

.pricing {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.pricing .section-sub {
  margin: 0 auto 48px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
}

.pricing-card {
  padding: 32px;
  background: var(--bg-raised);
  display: flex;
  flex-direction: column;
  position: relative;
}

.pricing-featured {
  background: var(--bg-card);
}

.pricing-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pricing-tier {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 4px;
}

.pricing-currency {
  font-size: 24px;
  font-weight: 600;
  vertical-align: top;
  line-height: 1.8;
}

.pricing-period {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.pricing-features {
  list-style: none;
  flex: 1;
  margin-bottom: 24px;
}

.pricing-features li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}
.pricing-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-light);
}

.pricing-featured .pricing-features li::before {
  background: var(--text-muted);
}

/* --- USE CASES --- */

.usecases {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.usecases .section-sub {
  margin-bottom: 48px;
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.usecase-card {
  padding: 28px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.usecase-card:hover {
  background: var(--bg-card);
  border-color: var(--border-light);
}

.usecase-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.usecase-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.usecase-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* --- CTA --- */

.cta {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.cta .section-sub {
  margin: 0 auto 36px;
}

.cta-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto 16px;
}

.cta-input {
  flex: 1;
  padding: 10px 16px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}
.cta-input:focus {
  border-color: var(--text-muted);
}

.cta-note {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- FOOTER --- */

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

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

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

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 12px;
  max-width: 260px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  padding: 4px 0;
  transition: color var(--transition);
}
.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

/* --- RESPONSIVE --- */

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }
  .nav-links {
    display: none;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 4px;
    z-index: 100;
  }
  .nav-links.open a {
    display: block;
    padding: 10px 0;
    font-size: 15px;
  }
  .nav-links.open .nav-cta {
    display: inline-block;
    margin-top: 8px;
    text-align: center;
  }
  .nav-inner {
    position: relative;
  }
  .hero {
    padding: 120px 20px 60px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .features-grid,
  .usecases-grid {
    grid-template-columns: 1fr;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .demo-input-row {
    flex-direction: column;
  }
  .cta-form {
    flex-direction: column;
  }
}