@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #0A0A0B;
  --surface: #141418;
  --surface-hover: #1A1A20;
  --primary: #635BFF;
  --primary-hover: #7B75FF;
  --secondary: #00D4AA;
  --text: #FFFFFF;
  --text-muted: #8B8B9E;
  --border: #2A2A35;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

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

/* ── Nav ── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px;
}

.nav-brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

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

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-user {
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--text);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--text-muted);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-danger {
  background: transparent;
  color: #FF4D4D;
  border: 1px solid #FF4D4D33;
}

.btn-danger:hover {
  background: #FF4D4D11;
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 91, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 91, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridPulse 5s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-grid { animation: none; opacity: 0.6; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 80px 24px 100px;
  text-align: center;
}

.hero h1 {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 10px 20px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.btn-ghost:hover {
  color: var(--text);
}

.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  text-align: left;
  max-width: 520px;
  margin: 0 auto 40px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
  overflow-x: auto;
  position: relative;
}

.code-block .key {
  color: var(--primary);
}

.code-block .string {
  color: var(--secondary);
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--border);
  border: none;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font);
}

.copy-btn:hover {
  color: var(--text);
}

/* ── Showcase Marquee ── */
.showcase {
  padding: 60px 0 80px;
  overflow: hidden;
}

.showcase-label {
  text-align: center;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.marquee-row {
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  overflow: hidden;
  margin-bottom: 16px;
}

.marquee-row:last-child {
  margin-bottom: 0;
}

.marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marqueeScroll 45s linear infinite;
}

.marquee-row-reverse .marquee-track {
  animation-direction: reverse;
}

.marquee-track img {
  width: 280px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation-play-state: paused; }
}

/* ── Bento Grid ── */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.2s;
}

.bento-card:hover {
  border-color: var(--primary);
}

.bento-wide {
  grid-column: span 2;
}

.bento-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.bento-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.bento-card-inner {
  display: flex;
  gap: 32px;
  align-items: center;
}

.bento-text {
  flex: 1;
}

.bento-text p {
  margin-bottom: 0;
}

.bento-terminal {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
}

.terminal-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.terminal-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.terminal-prompt {
  color: var(--secondary);
}

.bento-thumbnails {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bento-thumbnails img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.bento-code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-muted);
}

.bento-code .key {
  color: var(--primary);
}

.bento-code .string {
  color: var(--secondary);
}

/* ── Sections ── */
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 24px;
}

.section-title {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 56px;
}

/* ── Features Grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}


.bento-accent {
  border-color: var(--primary);
}

.bento-stats {
  font-size: 13px;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ── Pricing Grid ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  text-align: center;
}

.price-card.featured {
  border-color: var(--primary);
  position: relative;
}

.price-card.featured::before {
  content: 'Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 14px;
  border-radius: 20px;
}

.price-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.price-amount {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -2px;
  margin-bottom: 4px;
}

.price-amount span {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0;
}


.price-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  text-align: left;
}

.price-features li {
  font-size: 14px;
  color: var(--text);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.price-features li:last-child {
  border-bottom: none;
}

.price-features li.muted {
  color: var(--text-muted);
  opacity: 0.5;
}

.price-card .btn {
  width: 100%;
}

/* ── Footer ── */
.footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Dashboard Layout ── */
.dashboard {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.dashboard-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.dashboard-nav button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.dashboard-nav button.active {
  color: var(--text);
  border-bottom-color: var(--primary);
}

.dashboard-nav button:hover {
  color: var(--text);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 24px;
}

.card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.card-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ── Usage Bar ── */
.usage-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.usage-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  transition: width 0.4s ease;
}

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

/* ── Chart ── */
.chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
  padding-top: 16px;
}

.chart-bar {
  flex: 1;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.chart-bar:hover {
  opacity: 1;
}

/* ── Key Rows ── */
.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.key-row:last-child {
  border-bottom: none;
}

.key-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.key-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.key-name {
  font-size: 14px;
  font-weight: 500;
}

.key-value {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  color: var(--text-muted);
}

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

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 440px;
}

.modal h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.modal p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.modal input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  margin-bottom: 16px;
  outline: none;
}

.modal input:focus {
  border-color: var(--primary);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ── Tier badge ── */
.tier-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: var(--primary);
  color: var(--text);
  margin-bottom: 16px;
}

.billing-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

/* ── Setup ── */
.setup-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.checking {
  background: var(--text-muted);
  animation: pulse 1.5s ease-in-out infinite;
}

.status-dot.connected {
  background: var(--secondary);
}

.status-dot.disconnected {
  background: #FF4D4D;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.setup-editors {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.setup-editors code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 3px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  .marquee-track {
    animation-duration: 60s;
  }

  .marquee-track img {
    width: 200px;
  }

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

  .bento-wide {
    grid-column: span 1;
  }

  .bento-card-inner {
    flex-direction: column;
  }

  .features-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .key-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
