/*
  RevailLab — shared site styles.
  Colour palette + typography mirror the Flutter app's design system so
  the marketing site feels like the same product as the binary.

  Positioning: "research lab", not "consumer app landing page". Visual
  language leans on:
    • generous mono-spaced accents for data, model IDs, changelog entries
    • subtle 1px grid on hero backgrounds ("lab notebook" vibe)
    • "pill" labels prefixed with `$ ` or `#` to feel like shell output
  The palette stays the same as the app so bouncing from web to install
  feels like the same product.
*/

:root {
  --bg: #0F1115;
  --surface: #1A1D23;
  --surface-2: #2C313C;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);
  --primary: #5865F2;
  --primary-soft: rgba(88, 101, 242, 0.15);
  --success: #81C784;
  --warning: #FFB74D;
  --error: #E57373;
  --text: rgba(255, 255, 255, 0.92);
  --text-muted: rgba(255, 255, 255, 0.62);
  --text-faint: rgba(255, 255, 255, 0.38);
  --radius: 14px;
  --radius-sm: 10px;
  --max-width: 840px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Outfit", "Segoe UI",
               Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.15s ease;
}
a:hover { opacity: 0.75; }

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* --- Header --- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 17, 21, 0.9);
  backdrop-filter: saturate(160%) blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.site-header .brand img {
  width: 32px; height: 32px;
  border-radius: 8px;
}
.site-header nav a {
  margin-left: 20px;
  color: var(--text-muted);
  font-size: 14px;
}
.site-header nav a:hover { color: var(--text); opacity: 1; }

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 64px 0 48px;
}
.hero .logo-big {
  width: 140px; height: 140px;
  border-radius: 32px;
  box-shadow: 0 24px 64px rgba(88, 101, 242, 0.22);
}
.hero h1 {
  font-size: clamp(30px, 5vw, 44px);
  margin: 28px 0 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero .tagline {
  color: var(--text-muted);
  font-size: clamp(16px, 2vw, 19px);
  max-width: 560px;
  margin: 0 auto 32px;
}
.hero .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover { opacity: 0.9; }
.btn-disabled {
  opacity: 0.5;
  pointer-events: none;
}
.store-pill {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-left: 6px;
}

/* --- Section cards --- */
.section {
  margin: 48px 0;
}
.section h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-eyebrow {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.8px;
  font-weight: 700;
  text-transform: uppercase;
}
.eyebrow-green { background: rgba(129, 199, 132, 0.14); color: var(--success); }
.eyebrow-amber { background: rgba(255, 183, 77, 0.14); color: var(--warning); }
.eyebrow-purple { background: rgba(88, 101, 242, 0.16); color: var(--primary); }

.status-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}
.status-card.accent-green { border-left: 3px solid var(--success); }
.status-card.accent-amber { border-left: 3px solid var(--warning); }
.status-card.accent-purple { border-left: 3px solid var(--primary); }
.status-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}
.status-card p {
  color: var(--text-muted);
  margin: 0;
  line-height: 1.65;
}

.platform-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.chip {
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(129, 199, 132, 0.1);
  color: var(--success);
  border: 1px solid rgba(129, 199, 132, 0.28);
  font-weight: 500;
}

/* --- Privacy page long-form --- */
.doc h1 {
  font-size: 28px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.doc .doc-meta {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.doc h2 {
  font-size: 19px;
  margin: 36px 0 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.doc h3 {
  font-size: 15px;
  margin: 20px 0 8px;
  font-weight: 600;
  color: var(--text);
}
.doc p, .doc li {
  color: var(--text-muted);
}
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc code {
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  background: var(--surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  font-size: 14px;
}
.doc th, .doc td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}
.doc th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
}
.doc tbody tr:last-child td { border-bottom: none; }

.callout {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 20px 0;
  font-size: 14px;
  color: var(--text-muted);
}
.callout strong { color: var(--text); }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
}
.site-footer a { color: var(--text-muted); margin: 0 10px; }

/* --- 404 --- */
.error-page {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}
.error-page img {
  width: 96px; height: 96px; border-radius: 22px; margin-bottom: 24px;
  opacity: 0.85;
}
.error-page h1 { font-size: 48px; margin: 0; font-weight: 700; }
.error-page p { color: var(--text-muted); margin: 10px 0 24px; }

/* -------------------------------------------------------------------
   Lab-style primitives — used on index.html hero and /lab.
   ------------------------------------------------------------------- */
:root {
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --lab-grid: rgba(255, 255, 255, 0.035);
}

.lab-hero {
  position: relative;
  padding: 72px 0 48px;
  text-align: center;
  overflow: hidden;
}
.lab-hero::before {
  /* faint dot grid like a lab notebook, subtle enough to sit behind content */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(var(--lab-grid) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 75%);
}
.lab-hero > * { position: relative; }

.lab-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.12);
  border: 1px solid rgba(88, 101, 242, 0.32);
  color: var(--primary);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.lab-eyebrow::before { content: "$"; opacity: 0.6; }

.mono { font-family: var(--mono); }

.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 24px 0 8px;
}
.metric {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.metric .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.metric .value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.metric .value.warn { color: var(--warning); }
.metric .value.good { color: var(--success); }

.codeblock {
  background: #0B0D12;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  overflow-x: auto;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
}
.codeblock .cmt { color: rgba(255, 255, 255, 0.4); }
.codeblock .key { color: var(--primary); }

.roadmap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.roadmap .step {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 18px 18px 16px;
}
.roadmap .step .tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.roadmap .step .tag.live    { background: rgba(129, 199, 132, 0.14); color: var(--success); }
.roadmap .step .tag.working { background: rgba(255, 183, 77, 0.14);  color: var(--warning); }
.roadmap .step .tag.next    { background: rgba(88, 101, 242, 0.14);  color: var(--primary); }
.roadmap .step h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.roadmap .step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.lab-note {
  padding: 16px 18px;
  border-left: 2px solid var(--primary);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 14px;
}
.lab-note .date {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.8px;
  color: var(--text-faint);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.lab-note .title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.lab-note p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* --- Responsive tweaks --- */
@media (max-width: 520px) {
  main { padding: 28px 18px 56px; }
  .site-header { padding: 12px 18px; }
  .site-header nav a { margin-left: 14px; font-size: 13px; }
  .hero { padding: 36px 0 28px; }
  .hero .logo-big { width: 112px; height: 112px; }
}
