/* ═══════════════════════════════════════════════════════
   RC Agent  –  Stylesheet
   Theme: dark performance / motorsport
═══════════════════════════════════════════════════════ */

/* ── Reset & Base ──────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:          #0d0f13;
  --bg-card:     #161a22;
  --bg-card2:    #1c2130;
  --border:      #252c3d;
  --accent:      #e84b3c;
  --accent-glow: rgba(232, 75, 60, 0.25);
  --accent2:     #f97316;
  --text:        #e2e8f0;
  --text-muted:  #7e8fa8;
  --text-dim:    #4a5568;
  --white:       #ffffff;
  --green:       #22c55e;
  --amber:       #f59e0b;

  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 4px 24px rgba(0,0,0,0.5);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.4);

  --font:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:   "Cascadia Code", "Fira Mono", "Consolas", monospace;

  --nav-h:       64px;
  --max-w:       1120px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

code {
  font-family: var(--font-mono);
  background: var(--bg-card2);
  color: var(--accent2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
}

.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 24px;
}

.section-pad { padding-block: 88px; }

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: 56px;
}

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  background: #d43b2c;
  box-shadow: 0 6px 28px var(--accent-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--text-muted);
  background: var(--bg-card);
}

.btn-download {
  background: var(--accent);
  color: var(--white);
  padding: 16px 36px;
  font-size: 1.125rem;
  box-shadow: 0 4px 24px var(--accent-glow);
  border-radius: var(--radius-lg);
}
.btn-download:hover {
  background: #d43b2c;
  box-shadow: 0 8px 36px rgba(232,75,60,0.4);
  transform: translateY(-3px);
}

/* ── Navigation ────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(13, 15, 19, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.brand-rc    { color: var(--accent); }
.brand-agent { color: var(--white); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-card); }
.nav-links .btn-nav {
  background: var(--accent);
  color: var(--white);
  padding: 8px 18px;
  margin-left: 8px;
}
.nav-links .btn-nav:hover { background: #d43b2c; }

/* ── Hero ──────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 80px 24px 64px;
}

.hero-badge {
  display: inline-block;
  background: rgba(232, 75, 60, 0.15);
  border: 1px solid rgba(232, 75, 60, 0.35);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.accent { color: var(--accent); }

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.hero-meta {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* Telemetry card mock-up */
.hero-visual {
  display: flex;
  justify-content: center;
}

.telemetry-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 440px;
}

.tcard-header {
  background: var(--bg-card2);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.tcard-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tcard-dot.red   { background: #ff5f57; }
.tcard-dot.amber { background: #febc2e; }
.tcard-dot.green { background: #28c840; }

.tcard-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: 4px;
}

.tcard-body { padding: 20px; }

.chart-placeholder {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 120px;
  margin-bottom: 20px;
  padding: 0 4px;
}

.chart-bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, var(--accent), var(--accent2));
  opacity: 0.75;
  min-width: 0;
  transition: opacity 0.2s;
}
.chart-bar:nth-child(4),
.chart-bar:nth-child(8) { opacity: 1; }

.ai-bubble {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.ai-icon {
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1.5;
}

/* ── Features ──────────────────────────────────────── */
.features { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

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

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.feature-icon {
  width: 52px; height: 52px;
  background: rgba(232, 75, 60, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--accent);
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── How It Works ──────────────────────────────────── */
.how-it-works { background: var(--bg); }

.steps {
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  counter-reset: steps;
}

.step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding-block: 40px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.step:last-child { border-bottom: none; }

.step-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  opacity: 0.25;
  line-height: 1;
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.step-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.step-content p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Getting Started ───────────────────────────────── */
.getting-started { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.gs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 880px;
  margin-inline: auto;
}

.gs-step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.gs-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  min-width: 36px;
  padding-top: 2px;
}

.gs-text h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.gs-text p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Requirements ──────────────────────────────────── */
.requirements { background: var(--bg); }

.req-table-wrap {
  max-width: 720px;
  margin-inline: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.req-table {
  width: 100%;
  border-collapse: collapse;
}

.req-table tr { border-bottom: 1px solid var(--border); }
.req-table tr:last-child { border-bottom: none; }

.req-table th, .req-table td {
  padding: 14px 20px;
  text-align: left;
  font-size: 0.9rem;
}

.req-table th {
  background: var(--bg-card);
  color: var(--text-muted);
  font-weight: 600;
  width: 200px;
  white-space: nowrap;
}

.req-table td { color: var(--text); }
.req-table tr:nth-child(even) td { background: var(--bg-card); }

/* ── Download Section ──────────────────────────────── */
.download-section {
  background: linear-gradient(135deg, #12151e 0%, #1c0f0f 50%, #0d0f13 100%);
  border-top: 1px solid var(--border);
}

.download-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}

.dl-text h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.dl-text p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.dl-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dl-checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.dl-checklist li::before {
  content: "✓";
  color: var(--green);
  font-weight: 700;
  font-size: 0.8rem;
  width: 18px;
  height: 18px;
  background: rgba(34,197,94,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  padding-top: 1px;
}

.dl-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.dl-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ── Footer ────────────────────────────────────────── */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding-block: 40px;
}

.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.site-footer .brand-rc    { color: var(--accent); font-size: 1.3rem; font-weight: 800; }
.site-footer .brand-agent { color: var(--white);  font-size: 1.3rem; font-weight: 800; }

.footer-tagline { color: var(--text-muted); font-size: 0.875rem; }
.footer-copy    { color: var(--text-dim);   font-size: 0.8rem; }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 60px;
  }
  .hero-sub { max-width: 100%; }
  .hero-cta { justify-content: center; }
  .hero-meta { text-align: center; }
  .hero-visual { display: none; }

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

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

  .download-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .dl-checklist { align-items: center; }
  .dl-action { align-self: center; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .nav-inner::after {
    content: "Download";
    background: var(--accent);
    color: var(--white);
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
  }

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

  .step { grid-template-columns: 56px 1fr; }
  .step-num { font-size: 1.8rem; }

  .req-table th { width: 140px; }

  .section-pad { padding-block: 56px; }
}
