:root {
  --bg: #0b1120;
  --surface: #111827;
  --surface-2: #1e293b;
  --border: #1f2937;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --ok: #34d399;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 17, 32, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: -0.01em;
}

.brand img { width: 28px; height: 28px; }

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 0.92rem;
}

.nav-links a { color: var(--muted); font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: #fff; text-decoration: none; }

.hero {
  padding: 68px 0 48px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}

h1 {
  font-size: 2.5rem;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 16px;
}

.lead {
  color: var(--muted);
  font-size: 1.04rem;
  margin-bottom: 26px;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1120;
  border: none;
}

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

.sim-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.sim-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 24px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.sim-header strong {
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

#telemetry {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 190px;
  text-align: right;
  flex-shrink: 0;
}

.control-item label span:last-child {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  min-width: 68px;
  text-align: right;
}

canvas#simCanvas {
  width: 100%;
  height: 300px;
  display: block;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 25%, #172554 0%, #090e1a 75%);
  cursor: grab;
}

canvas#simCanvas:active { cursor: grabbing; }

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  margin-top: 12px;
  align-items: center;
  font-size: 0.82rem;
  color: var(--muted);
}

.control-item label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

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

.section h2 {
  font-size: 1.55rem;
  color: #fff;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--muted);
  margin-bottom: 28px;
  font-size: 0.96rem;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
}

.card h3 {
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 8px;
}

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

.tag {
  display: inline-block;
  font-size: 0.74rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--accent);
  margin-bottom: 10px;
}

pre {
  background: #060a14;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.55;
  color: #cbd5e1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--surface-2);
  color: #fff;
  font-weight: 600;
}

td { color: var(--muted); }
tr:last-child td { border-bottom: none; }

footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .grid-3 { grid-template-columns: 1fr; }
  .controls { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
}
