/* CAMalot site stylesheet
   Tokens pulled directly from the app's own ui/theme.py so the site reads
   as the same product as the software — not a separate marketing brand. */

:root {
  --deep: #0d1117;
  --chrome: #141618;
  --base: #1a1d21;
  --surface: #1e2228;
  --control: #22262d;
  --line: #2a2e35;

  --accent: #00b4d8;
  --ok: #52b788;
  --warn: #e69c00;
  --danger: #e63946;
  --console: #a8d8a8;

  --text: #e0e4ea;
  --text-body: #c0cad8;
  --text-muted: #8a9ab0;
  --text-faint: #4a5568;

  --xs: 4px;
  --sm: 8px;
  --md: 12px;
  --lg: 16px;
  --xl: 24px;
  --xxl: 32px;

  --radius-control: 4px;
  --radius-panel: 6px;

  --max-width: 1120px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--deep);
  color: var(--text-body);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

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

h1, h2, h3 {
  color: var(--text);
  font-weight: 600;
  margin: 0 0 var(--md) 0;
}

h1 { font-size: 40px; line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: 26px; letter-spacing: -0.005em; }
h3 { font-size: 18px; }

p { margin: 0 0 var(--lg) 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--xl);
}

/* ---- Header / nav ---- */

header.site-header {
  background: var(--chrome);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--lg) var(--xl);
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sm);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

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

nav.primary-nav {
  display: flex;
  align-items: center;
  gap: var(--xl);
}

nav.primary-nav a {
  color: var(--text-muted);
  font-size: 14px;
  margin-right: var(--xl); /* fallback for renderers without flexbox gap support */
}

nav.primary-nav a:last-of-type {
  margin-right: 0;
}

nav.primary-nav a:hover,
nav.primary-nav a.active {
  color: var(--text);
  text-decoration: none;
}

/* ---- Buttons ---- */

.btn {
  display: inline-block;
  border-radius: var(--radius-control);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #06222b;
}
.btn-primary:hover { background: #22c3e6; }

.btn-secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--text-body);
}
.btn-secondary:hover { border-color: var(--text-muted); color: var(--text); }

/* ---- Hero ---- */

.hero {
  padding: var(--xxl) 0 var(--xl) 0;
  text-align: center;
  position: relative;
}

.hero-watermark {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  height: 340px;
  object-fit: contain;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

.hero > *:not(.hero-watermark) {
  position: relative;
  z-index: 1;
}

.hero p.lede {
  max-width: 640px;
  margin: 0 auto var(--xl) auto;
  font-size: 16px;
  color: var(--text-body);
}

.hero .cta-row {
  display: flex;
  justify-content: center;
  gap: var(--md);
  margin-bottom: var(--xxl);
}

.hero-image {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  overflow: hidden;
  background: var(--surface);
  max-width: 960px;
  margin: 0 auto;
}

.hero-image img { display: block; width: 100%; height: auto; }

/* ---- Feature sections ---- */

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

.section .section-intro {
  max-width: 640px;
  margin: 0 auto var(--xxl) auto;
  text-align: center;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--xxl);
  align-items: center;
  margin-bottom: var(--xxl);
}

.feature-row:last-child { margin-bottom: 0; }

.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }

.feature-text .eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sm);
  display: block;
}

.feature-image {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  overflow: hidden;
  background: var(--surface);
}

.feature-image img { display: block; width: 100%; height: auto; }

/* ---- Roadmap / coming section ---- */

.roadmap {
  background: var(--chrome);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: var(--xxl);
  text-align: center;
}

.roadmap .badge {
  display: inline-block;
  background: rgba(230, 156, 0, 0.12);
  color: var(--warn);
  border: 1px solid rgba(230, 156, 0, 0.35);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--lg);
}

/* ---- Machines table ---- */

table.machines {
  width: 100%;
  border-collapse: collapse;
  margin: var(--xl) 0;
}

table.machines th,
table.machines td {
  text-align: left;
  padding: var(--md) var(--lg);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

table.machines th {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

table.machines td { color: var(--text-body); }
table.machines tr:last-child td { border-bottom: none; }

/* ---- Docs list ---- */

.docs-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: var(--lg);
  margin-bottom: var(--md);
  color: var(--text-muted);
}

.docs-list li strong { color: var(--text-body); display: block; margin-bottom: 2px; }

.coming-soon-note {
  color: var(--text-faint);
  font-size: 13px;
}

/* ---- Footer ---- */

footer.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--xxl) 0;
  margin-top: var(--xxl);
}

footer.site-footer .legal {
  color: var(--text-faint);
  font-size: 12px;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

footer.site-footer .foot-links {
  display: flex;
  justify-content: center;
  gap: var(--lg);
  margin-bottom: var(--lg);
  font-size: 13px;
}

/* ---- Responsive ---- */

@media (max-width: 760px) {
  h1 { font-size: 30px; }
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; direction: ltr; }
  nav.primary-nav { gap: var(--lg); }
  .nav-row { flex-wrap: wrap; gap: var(--md); }
}
