/* Evolution Engine — Ocean Depth Design System */
/* Based on CodeQual brand: Deep Teal + Dark Mode */

:root {
  --bg: #0A0F14;
  --surface: #0F172A;
  --surface-elevated: #1E293B;
  --primary: #0A4D4A;
  --secondary: #2CA58D;
  --accent: #FF6B6B;
  --text: #F8F9FA;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --border: #1E293B;
  --border-light: #334155;
  --success: #2CA58D;
  --warning: #F59E0B;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1200px;
  --radius: 12px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

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

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

.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, 15, 20, 0.85);
  backdrop-filter: blur(16px);
  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-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.nav-brand img { height: 32px; width: auto; }
.nav-brand span { color: var(--text-muted); font-weight: 400; font-size: 0.85rem; }

.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: transparent;
  color: #5EEAD4;
  border: 1px solid #5EEAD4;
  font-weight: 700;
  transition: all 0.3s ease;
}
.btn-primary:hover { background: #5EEAD4; color: #0A0F14; border-color: #5EEAD4; }

.btn-outline {
  background: transparent;
  color: var(--secondary);
  border: 1px solid var(--secondary);
  transition: all 0.3s ease;
}
.btn-outline:hover { background: rgba(44, 165, 141, 0.15); color: #fff; border-color: #fff; }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #ff5252; color: #fff; }

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

/* ─── Language Switcher ─── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--border-light);
}

.lang-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.03em;
}

.lang-btn:hover {
  color: var(--text);
  border-color: var(--border-light);
}

.lang-btn.active {
  color: var(--secondary);
  border-color: var(--secondary);
  background: rgba(44, 165, 141, 0.1);
}

/* ─── Hero ─── */
.hero {
  padding: 140px 0 80px;
  text-align: center;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  max-width: 720px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, var(--text), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 12px;
}

.hero p.hero-detail {
  font-size: 1rem;
  margin: 0 auto 40px;
  opacity: 0.8;
}

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

.terminal {
  max-width: 640px;
  margin: 48px auto 0;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.terminal-dot.red { background: #FF5F57; }
.terminal-dot.yellow { background: #FEBC2E; }
.terminal-dot.green { background: #28C840; }

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.terminal-body .prompt { color: var(--secondary); }
.terminal-body .cmd { color: var(--text); }
.terminal-body .output { color: var(--text-dim); }
.terminal-body .highlight { color: var(--accent); }
.terminal-body .success { color: var(--success); }

/* ─── Features ─── */
.features { padding: 80px 0; }

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--secondary);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ─── How it works ─── */
.how-it-works { padding: 80px 0; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.step {
  text-align: center;
  padding: 32px 24px;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

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

.step code {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--secondary);
  cursor: pointer;
  position: relative;
}

.step code:hover { border-color: var(--secondary); }

/* ─── Signal Families ─── */
.signals { padding: 80px 0; }

.signals-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 32px;
}

.signals-table th,
.signals-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.signals-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.signals-table td { font-size: 0.95rem; }

.signals-table tr:hover td { background: rgba(44, 165, 141, 0.05); }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-free { background: rgba(44, 165, 141, 0.15); color: var(--secondary); }
.badge-pro { background: rgba(255, 107, 107, 0.15); color: var(--accent); }
.badge-planned { background: rgba(148, 163, 184, 0.15); color: var(--text-muted); }
.badge-community { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

/* ─── Adapter Catalog ─── */
.adapters { padding: 80px 0; }

.adapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.adapter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.adapter-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.adapter-card h4 { font-size: 0.95rem; }
.adapter-card .adapter-family { color: var(--text-dim); font-size: 0.8rem; }
.adapter-card p { color: var(--text-muted); font-size: 0.85rem; flex: 1; }

.adapter-cta { text-align: center; margin-top: 32px; }

/* ─── Pricing ─── */
.pricing { padding: 80px 0; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 800px;
  margin: 48px auto 0;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px 72px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.pricing-card.featured {
  border-color: var(--secondary);
  box-shadow: 0 0 40px rgba(44, 165, 141, 0.1);
}

.pricing-card.featured::before {
  content: var(--popular-text, "Most Popular");
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--secondary);
  color: var(--bg);
  padding: 4px 16px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.pricing-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.pricing-price { font-size: 2.5rem; font-weight: 800; margin-bottom: 4px; }
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.pricing-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }

.pricing-features { list-style: none; margin-bottom: 0; flex: 1; }
.pricing-features li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pricing-features li::before {
  content: "\2713";
  color: var(--secondary);
  font-weight: 700;
}
.pricing-features li.disabled { opacity: 0.4; }
.pricing-features li.disabled::before { content: "\2717"; color: var(--text-dim); }

.pricing-card .btn {
  width: 100%;
  display: block;
  box-sizing: border-box;
  text-align: center;
}

/* ─── Footer ─── */
footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  list-style: none;
  margin-bottom: 20px;
}

.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }

.footer-tagline { color: var(--text-dim); font-size: 0.85rem; }
.footer-brand { color: var(--text-dim); font-size: 0.8rem; margin-top: 12px; }

/* ─── Modal ─── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 32px;
  width: 90%;
  max-width: 480px;
}

.modal h3 { margin-bottom: 20px; }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.form-group textarea { resize: vertical; min-height: 80px; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary);
}

.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

.form-message {
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-top: 16px;
  display: none;
}
.form-message.success { display: block; background: rgba(44, 165, 141, 0.15); color: var(--secondary); }
.form-message.error { display: block; background: rgba(255, 107, 107, 0.15); color: var(--accent); }

/* ─── Copy tooltip ─── */
.copy-tooltip {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--secondary);
  color: var(--bg);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.copy-tooltip.show { opacity: 1; }

/* ─── Consent Banner ─── */
.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
}

.consent-banner.hidden { display: none; }

.consent-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  max-width: 600px;
  text-align: center;
}

.consent-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.consent-actions .btn { white-space: nowrap; }

/* ─── Billing Disclosure ─── */
.billing-disclosure {
  color: var(--text-dim);
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.5;
  position: absolute;
  bottom: 24px;
  left: 32px;
  right: 32px;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  .hero h1 { font-size: 2.4rem; }
}

@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 16px;
  }
  .nav-links.open .lang-switcher {
    border-left: none;
    margin-left: 0;
    padding-left: 0;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
  }
  .mobile-toggle { display: block; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 120px 0 60px; }
  .signals-table { font-size: 0.85rem; }
  .signals-table th, .signals-table td { padding: 10px 12px; }
}
