/* EmLogic Marketing Landing — styles */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 24px 64px rgba(15, 23, 42, 0.12);
  --transition: 0.2s ease;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-alt: #ffffff;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: rgba(37, 99, 235, 0.08);
  --accent: #7c3aed;
  --accent-soft: rgba(124, 58, 237, 0.1);
  --success: #059669;
  --gradient-1: radial-gradient(ellipse 80% 60% at 20% 20%, rgba(124, 58, 237, 0.12), transparent);
  --gradient-2: radial-gradient(ellipse 70% 50% at 80% 10%, rgba(37, 99, 235, 0.1), transparent);
  --gradient-3: radial-gradient(ellipse 60% 40% at 50% 100%, rgba(16, 185, 129, 0.08), transparent);
  --code-bg: #0f172a;
  --ribbon-bg: #ffffff;
}

[data-theme="dark"] {
  --bg: #0b1120;
  --bg-alt: #111827;
  --bg-card: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-soft: rgba(59, 130, 246, 0.15);
  --accent: #a78bfa;
  --accent-soft: rgba(167, 139, 250, 0.12);
  --success: #34d399;
  --gradient-1: radial-gradient(ellipse 80% 60% at 20% 20%, rgba(124, 58, 237, 0.2), transparent);
  --gradient-2: radial-gradient(ellipse 70% 50% at 80% 10%, rgba(37, 99, 235, 0.15), transparent);
  --gradient-3: radial-gradient(ellipse 60% 40% at 50% 100%, rgba(16, 185, 129, 0.1), transparent);
  --code-bg: #020617;
  --ribbon-bg: #111827;
}

*, *::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;
}

.container {
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}

a { color: inherit; text-decoration: none; }

/* Ribbon */
.ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--ribbon-bg);
  border-bottom: 1px solid var(--border);
}

.ribbon-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--success);
}

.ribbon .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.ribbon .sep { opacity: 0.4; }
.ribbon strong { color: var(--text); font-weight: 600; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg-alt) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav a:hover { color: var(--text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-menu-btn { display: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover { background: var(--primary-hover); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover { color: var(--text); }

.btn-lg { padding: 12px 24px; font-size: 15px; border-radius: 12px; }

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
}

[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

/* Language switch */
.lang-switch { position: relative; }

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 200;
}

.lang-menu[hidden] { display: none; }

.lang-menu li {
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--transition);
}

.lang-menu li:hover,
.lang-menu li.active {
  background: var(--primary-soft);
  color: var(--primary);
}

/* Hero */
.hero {
  position: relative;
  padding: 64px 0 48px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-1), var(--gradient-2), var(--gradient-3);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero h1 span { display: block; }

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 28px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Hero visual */
.hero-visual {
  position: relative;
  min-height: 380px;
}

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}

.main-card { position: relative; z-index: 2; }

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-weight: 600;
}

.badge {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
}

.badge-success {
  background: rgba(5, 150, 105, 0.12);
  color: var(--success);
}

.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
}

.flow-node {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.flow-node.accent {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.flow-arrow { color: var(--text-muted); font-size: 14px; }

.dash-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.mini-metric {
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius);
}

.mini-metric .label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.mini-metric strong { font-size: 18px; }
.text-success { color: var(--success); }

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 64px;
}

.chart-bars .bar {
  flex: 1;
  height: var(--h);
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  opacity: 0.85;
}

.float-card {
  position: absolute;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 12px;
  z-index: 3;
}

.float-card span {
  display: block;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.float-card strong { font-size: 16px; }

.float-top { top: -12px; right: -12px; }
.float-bottom { bottom: 24px; left: -20px; }

/* KPI strip */
.kpi-strip {
  padding: 32px 0;
  border-block: 1px solid var(--border);
  background: var(--bg-alt);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.kpi-card {
  text-align: center;
  padding: 20px;
}

.kpi-card strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.kpi-card span {
  font-size: 13px;
  color: var(--text-muted);
}

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { margin-bottom: 48px; max-width: 640px; }
.section-head.center { text-align: center; margin-inline: auto; }

.section-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: box-shadow var(--transition), transform var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.feature-icon { font-size: 28px; margin-bottom: 16px; }

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 48px;
}

.step-num {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 16px;
}

.step h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Code panel */
.code-panel {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.code-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: var(--code-bg);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.code-tab {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-mono);
  color: rgba(255,255,255,0.5);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.code-tab.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.code-copy {
  margin-left: auto;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.08);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.code-copy:hover { background: rgba(255,255,255,0.15); color: #fff; }

.code-block {
  margin: 0;
  padding: 24px;
  background: var(--code-bg);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: #e2e8f0;
}

.code-block .kw { color: #c084fc; }
.code-block .str { color: #86efac; }
.code-block .cm { color: #64748b; }
.code-block .fn { color: #93c5fd; }

/* Models */
.model-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.filter-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.model-card {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.model-card:hover { border-color: var(--primary); }

.model-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.model-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}

.model-card h3 {
  font-size: 15px;
  font-weight: 700;
}

.model-card .provider {
  font-size: 12px;
  color: var(--text-muted);
}

.model-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.model-tag {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-muted);
}

.model-price {
  font-size: 13px;
  color: var(--text-muted);
}

.model-price strong { color: var(--text); }

/* Pricing */
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 800px;
  margin-inline: auto;
}

.pricing-card {
  position: relative;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-soft);
}

.popular {
  position: absolute;
  top: -12px;
  left: 24px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
}

.pricing-card h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}

.pricing-card .price {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.pricing-card ul {
  list-style: none;
  margin-bottom: 28px;
}

.pricing-card li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.pricing-card li::before {
  content: "✓ ";
  color: var(--success);
  font-weight: 700;
}

.pricing-card .btn { width: 100%; }

/* FAQ */
.faq-list { max-width: 720px; margin-inline: auto; }

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
}

.faq-q svg { flex-shrink: 0; transition: transform var(--transition); }
.faq-item.open .faq-q svg { transform: rotate(180deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-a { max-height: 200px; }

.faq-a p {
  padding-bottom: 20px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* CTA */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  border-top: 1px solid var(--border);
}

.cta-inner { text-align: center; }

.cta-inner h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-inner p {
  color: var(--text-muted);
  margin-bottom: 28px;
}

.cta-inner .hero-cta { justify-content: center; }

/* Footer */
.footer {
  padding: 48px 0 24px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-links h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.footer-links a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  padding: 6px 0;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--primary); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; margin-inline: auto; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav, .header-actions .btn-ghost, .header-actions .btn-primary { display: none; }
  .mobile-menu-btn {
    display: flex;
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
  }
  .header-actions { margin-left: 0; }
  .steps, .feature-grid, .pricing-cards, .footer-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .float-top, .float-bottom { display: none; }
}
