:root {
  --bg: #0b101b;
  --surface: #121928;
  --surface-2: #182236;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.3);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.14);
  --amber: #f59e0b;
  --cyan: #38bdf8;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at 18% -10%, rgba(16, 185, 129, 0.12), transparent 42%),
              radial-gradient(circle at 86% 0%, rgba(56, 189, 248, 0.1), transparent 36%),
              var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }

.container {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

/* Top navigation */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11, 16, 27, 0.84);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 16px; letter-spacing: -.01em;
}
.brand-dot {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #10b981, #38bdf8);
  display: grid; place-items: center; font-size: 15px; color: #052e1e; font-weight: 900;
}
.nav-actions {
  display: flex; align-items: center; gap: 12px;
}
.nav-link {
  font-size: 13px; font-weight: 600; color: var(--muted);
  padding: 6px 10px; border-radius: 8px; transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.lang-toggle {
  border: 1px solid var(--border-strong); background: var(--surface);
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.lang-toggle:hover { border-color: var(--accent); }

/* Hero */
.hero {
  padding: 40px 0 28px;
}
.hero-top {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7; font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.hero h1 {
  margin: 12px 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12; letter-spacing: -.03em; font-weight: 900; max-width: 720px;
}
.hero p.lead {
  margin: 0; color: var(--muted); font-size: 15px; max-width: 650px;
}
.metrics {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.metric-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 16px; min-width: 126px;
}
.metric-box strong {
  display: block; font-size: 20px; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums;
}
.metric-box span {
  font-size: 12px; color: var(--muted);
}

/* Interactive Workbench */
.workbench {
  display: grid;
  grid-template-columns: 270px minmax(320px, 1fr) 320px;
  gap: 18px;
  align-items: start;
  padding-bottom: 48px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.panel-title {
  margin: 0 0 12px; font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  display: flex; align-items: center; justify-content: space-between;
}

/* Demo selector list */
.demo-list { display: flex; flex-direction: column; gap: 10px; }
.demo-card {
  width: 100%; text-align: left; cursor: pointer;
  background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 13px; transition: border-color .16s, transform .14s, background .16s;
}
.demo-card:hover { border-color: rgba(56, 189, 248, 0.5); }
.demo-card.active {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.12), rgba(24, 34, 54, 0.96));
}
.demo-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px;
}
.demo-card h3 { margin: 0; font-size: 14.5px; font-weight: 800; color: #fff; white-space: nowrap; }
.tag {
  font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: rgba(56, 189, 248, 0.14); color: #7dd3fc; white-space: nowrap;
}
.demo-card p { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.demo-meta {
  display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: #cbd5e1;
  font-variant-numeric: tabular-nums;
}
.dot-ok { color: #34d399; font-weight: 700; }

/* Device preview stage */
.stage-panel {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.08), transparent 60%), var(--surface);
}
.stage-toolbar {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
.seg-group {
  display: inline-flex; background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 3px; gap: 3px;
}
.seg-btn {
  border: 0; background: transparent; color: var(--muted);
  padding: 5px 11px; border-radius: 7px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.seg-btn.active { background: var(--surface-2); color: #fff; }
.tool-btn {
  border: 1px solid var(--border-strong); background: var(--surface-2);
  padding: 6px 11px; border-radius: 9px; font-size: 12px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
}
.tool-btn:hover { border-color: var(--accent); color: #fff; }

.device-shell {
  padding: 10px; border-radius: 32px;
  background: #060a12; border: 2px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  transition: width .24s ease, height .24s ease;
  max-width: 100%;
}
.device-shell.portrait { width: 344px; height: 690px; }
.device-shell.landscape { width: min(100%, 580px); height: 360px; border-radius: 24px; }
.device-frame {
  width: 100%; height: 100%; border: 0; border-radius: 22px; background: #0f172a; display: block;
}
.device-shell.landscape .device-frame { border-radius: 15px; }

.stage-foot {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12px; color: var(--muted); flex-wrap: wrap;
}

/* Right UA Inspector */
.control-group { margin-bottom: 14px; }
.control-group label {
  display: block; font-size: 11.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px;
}
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn {
  flex: 1; min-width: 68px; border: 1px solid var(--border-strong); background: var(--bg);
  padding: 6px 8px; border-radius: 9px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.chip-btn.active {
  border-color: var(--accent); background: var(--accent-soft); color: #6ee7b7;
}
.text-input {
  width: 100%; border: 1px solid var(--border-strong); background: var(--bg);
  border-radius: 9px; padding: 7px 10px; font-size: 13px; color: #fff;
}
.text-input:focus { outline: none; border-color: var(--accent); }

.divider { height: 1px; background: var(--border); margin: 14px 0; }

/* Telemetry log */
.telemetry-box {
  background: #070b13; border: 1px solid var(--border); border-radius: 12px;
  padding: 10px; height: 164px; overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 11.5px;
}
.t-row {
  display: flex; align-items: baseline; gap: 8px; padding: 3px 0;
  border-bottom: 1px dashed rgba(148,163,184,0.1);
}
.t-time { color: #64748b; min-width: 38px; }
.t-name { color: #38bdf8; font-weight: 700; }
.t-name.cta { color: #fbbf24; }
.t-name.win { color: #34d399; }
.t-name.loss { color: #fb7185; }
.t-data { color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-empty { color: #64748b; text-align: center; padding: 52px 8px; }

/* Network compliance pills */
.net-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px;
}
.net-item {
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  padding: 6px 8px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 11px; transition: border-color .15s; white-space: nowrap;
}
.net-item:hover { border-color: var(--accent); }
.net-name { font-weight: 700; color: #e2e8f0; white-space: nowrap; }
.net-size { color: #6ee7b7; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }

/* Pricing & Workflow sections */
.section { padding: 36px 0; border-top: 1px solid var(--border); }
.section-head { margin-bottom: 22px; }
.section-head h2 { margin: 0 0 6px; font-size: 24px; font-weight: 900; letter-spacing: -.02em; }
.section-head p { margin: 0; color: var(--muted); font-size: 14px; }

.pricing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.price-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column;
}
.price-card.featured {
  border-color: rgba(16, 185, 129, 0.6);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.1), var(--surface) 45%);
}
.price-tier { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #6ee7b7; }
.price-val { font-size: 32px; font-weight: 900; margin: 8px 0 4px; letter-spacing: -.03em; }
.price-sub { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.price-list { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.price-list li { font-size: 13px; color: #cbd5e1; padding-left: 18px; position: relative; }
.price-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 900; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border-radius: 12px; border: 0; cursor: pointer;
  background: linear-gradient(180deg, #34d399, #10b981); color: #052e1e;
  font-weight: 800; font-size: 13.5px; transition: filter .15s;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: #fff; font-weight: 700; font-size: 13.5px;
}
.btn-secondary:hover { border-color: var(--accent); }

.contact-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px; padding: 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.contact-links { display: flex; gap: 10px; flex-wrap: wrap; }

.footer {
  padding: 24px 0 40px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--muted);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px);
  background: #0f172a; border: 1px solid var(--accent); color: #fff;
  padding: 10px 18px; border-radius: 999px; font-size: 13px; font-weight: 700;
  opacity: 0; pointer-events: none; transition: all .2s; z-index: 60;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 1080px) {
  .workbench { grid-template-columns: 1fr; }
  .demo-list { display: grid; grid-template-columns: repeat(3, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .demo-list { grid-template-columns: 1fr; }
  .device-shell.portrait { width: 100%; max-width: 356px; height: 640px; }
  .device-shell.landscape { width: 100%; height: 300px; }
}
