/* ProbeGlass website styles.
 *
 * The palette is the dashboard's palette, so the site and the product look like
 * the same thing. Everything themes through custom properties and follows the
 * operating system's light/dark preference.
 *
 * No framework, no build step: this file is served as written.
 */

/* ------------------------------------------------------------------ tokens */

:root {
  color-scheme: dark;

  --bg: #0e1116;
  --surface: #151a21;
  --surface-2: #1c232c;
  --border: #262e3a;
  --border-strong: #38424f;
  --text: #e6ebf2;
  --text-dim: #9aa7b8;
  --text-faint: #6b7889;

  --ok: #22c55e;
  --warn: #f59e0b;
  --crit: #ef4444;

  --accent: #60a5fa;
  --accent-soft: rgb(96 165 250 / 12%);
  --accent-ink: #0b1220;

  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1120px;
  --wrap-narrow: 760px;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #eef2f7;
    --border: #dce3ec;
    --border-strong: #c2cddb;
    --text: #131922;
    --text-dim: #4d5a6b;
    --text-faint: #7a8798;
    --accent: #2563eb;
    --accent-soft: rgb(37 99 235 / 9%);
    --accent-ink: #ffffff;
  }
}

/* -------------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 650; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 0.9em; }

p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1em 0.38em;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.narrow { max-width: var(--wrap-narrow); }
.muted { color: var(--text-dim); font-size: 0.92rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 0.6rem 1rem;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ----------------------------------------------------------------- topbar */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }

.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--text); font-weight: 650; letter-spacing: -0.02em;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.nav { display: flex; align-items: center; gap: 1.4rem; margin-left: auto; }
.nav a { color: var(--text-dim); font-size: 0.93rem; font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav-ext::after { content: " ↗"; color: var(--text-faint); font-size: 0.85em; }

.nav-toggle {
  display: none; margin-left: auto;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.5rem 0.65rem; cursor: pointer;
}
.nav-bars, .nav-bars::before, .nav-bars::after {
  display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px;
  content: ""; position: relative;
}
.nav-bars::before { position: absolute; top: -6px; }
.nav-bars::after { position: absolute; top: 6px; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; inset: 100% 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.25rem 1rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.7rem 0; width: 100%; border-bottom: 1px solid var(--border); }
  .nav a:last-child { border-bottom: 0; }
}

/* ------------------------------------------------------------------- hero */

.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 3.5rem); }

.hero-grid {
  display: grid; grid-template-columns: 1fr 1.05fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
  font-size: 0.78rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--accent); margin-bottom: 1rem;
}

.lede { font-size: 1.1rem; color: var(--text-dim); max-width: 46ch; }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 0; }
.cta-row.center { justify-content: center; }

.btn {
  display: inline-block; padding: 0.7rem 1.3rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 0.95rem; font-weight: 550; cursor: pointer;
}
.btn:hover { text-decoration: none; border-color: var(--text-faint); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }

.badges {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem;
  list-style: none; margin: 2rem 0 0; padding: 0;
  font-size: 0.85rem; color: var(--text-faint);
}
.badges li::before { content: "· "; }
.badges li:first-child::before { content: ""; }

/* ------------------------------------------------------------------ image */

.hero-shot, .tour-item { margin: 0; }
.hero-shot img, .tour-item img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
}
.hero-shot figcaption, .tour-item figcaption {
  font-size: 0.82rem; color: var(--text-faint); margin-top: 0.75rem;
}

/* ------------------------------------------------------------------- strip */

.strip { border-block: 1px solid var(--border); background: var(--surface); }
.strip-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem; padding-block: 1.5rem; text-align: center;
}
.strip-grid strong { display: block; font-size: 1.35rem; font-weight: 650; letter-spacing: -0.02em; }
.strip-grid span { font-size: 0.82rem; color: var(--text-faint); }
@media (max-width: 640px) { .strip-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; } }

/* ---------------------------------------------------------------- section */

.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-lede { color: var(--text-dim); max-width: 62ch; margin-bottom: 2.5rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem 1.5rem;
}
.card h3 { color: var(--text); }
.card p { margin: 0; color: var(--text-dim); font-size: 0.95rem; }

/* -------------------------------------------------------------------- tour */

.tour { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
.tour-item h3 { margin-top: 1rem; }
.tour-item p { color: var(--text-dim); font-size: 0.95rem; max-width: 68ch; margin: 0; }

/* The drawings above are honest about being drawings; this is the way to the
   real thing, so it sits apart from them rather than as a caption. */
.tour-demo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: clamp(2rem, 5vw, 3rem);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.tour-demo p { flex: 1 1 20rem; margin: 0; color: var(--text-dim); font-size: 0.95rem; }

/* ------------------------------------------------------------------ tables */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; background: var(--surface); }
th, td { text-align: left; padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { white-space: nowrap; }
td { color: var(--text-dim); }
td:first-child { color: var(--text); }

.note {
  margin-top: 1.5rem; padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.93rem; color: var(--text-dim);
}

/* ----------------------------------------------------------------- install */

.install-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2.5rem; align-items: start; }

/* A grid column will not shrink below the widest thing inside it unless it is told
   to, and the widest thing inside this one is a line of `docker run` — 471 pixels of
   it, which is wider than a phone. So below about 510 pixels the column refused to
   narrow, the grid overflowed its container, and the whole landing page scrolled
   sideways: the code blocks below already scroll on their own (`overflow-x: auto`
   on `.code pre`), and they simply never got the chance, because the column they
   sit in had grown to fit them instead of holding still. `min-width: 0` is the
   whole fix. It is harmless at every width above the one where it matters. */
.install-main, .install-side { min-width: 0; }

@media (max-width: 900px) { .install-grid { grid-template-columns: 1fr; } }

.install-main h3 { margin-top: 2rem; }
.install-main h3:first-child { margin-top: 0; }
.install-main p { color: var(--text-dim); font-size: 0.95rem; }

.code { position: relative; margin: 0 0 1.25rem; }
.code pre {
  margin: 0; overflow-x: auto;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1rem 1.1rem;
}
.code code {
  background: none; border: 0; padding: 0;
  font-size: 0.85rem; line-height: 1.6; color: var(--text);
}
.section-alt .code pre { background: var(--surface-2); }

.copy {
  position: absolute; top: 0.55rem; right: 0.55rem;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-dim); border-radius: 6px;
  font: inherit; font-size: 0.76rem; padding: 0.28rem 0.6rem; cursor: pointer;
}
.copy:hover { color: var(--text); border-color: var(--border-strong); }
.copy.done { color: var(--ok); border-color: var(--ok); }

.install-side {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem 1.5rem;
}
.facts { margin: 0 0 1.25rem; }
.facts dt { font-weight: 600; font-size: 0.9rem; margin-top: 1rem; }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 0.25rem 0 0; color: var(--text-dim); font-size: 0.9rem; }

/* --------------------------------------------------------------------- faq */

details {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); padding: 0.95rem 1.2rem; margin-bottom: 0.7rem;
}
details[open] { border-color: var(--border-strong); }
summary { cursor: pointer; font-weight: 550; }
summary::marker { color: var(--text-faint); }
details p { margin: 0.8rem 0 0.2rem; color: var(--text-dim); font-size: 0.94rem; }

/* ------------------------------------------------------------------ roadmap */

/* The roadmap is lists, not cards: each section is a status report, and the
   bullets are the content rather than decoration around it. Without this the
   reader gets browser-default bullets at browser-default size next to text that
   is styled, which is the one thing a page with no build step still has to get
   right by hand. */
.roadmap ul { margin: 0; padding-left: 1.15rem; color: var(--text-dim); font-size: 0.95rem; }
.roadmap li { margin-top: 0.7rem; }
.roadmap li strong { color: var(--text); }
.roadmap h1 { font-size: clamp(1.9rem, 4.4vw, 2.8rem); }
.roadmap .cta-row { margin-top: 2.5rem; }

/* -------------------------------------------- roadmap: rail, chips, icons */

/* One rail runs down the whole timeline. It is drawn by the timeline container
   so the sections' own backgrounds cannot break it into dashes, and it sits on
   the same x as each row's left edge — the row then indents its text clear of
   it. The x is the narrow wrap's content edge, which is where it would land if
   the rail lived inside the wrap. */
.roadmap-timeline { position: relative; }
.roadmap-timeline::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: max(1.25rem, calc(50% - var(--wrap-narrow) / 2 + 1.25rem));
  width: 2px; margin-left: -1px; border-radius: 2px;
  background: var(--border-strong);
}

.roadmap-row { position: relative; padding-left: 2.4rem; }

/* The node is the point in time; its ring is the local background, so the rail
   reads as passing behind it. The section "beside" the timeline simply has no
   node. */
.roadmap-node {
  position: absolute; left: 0; top: 1.3rem;
  width: 13px; height: 13px; border-radius: 50%;
  transform: translateX(-50%);
  background: var(--text-faint);
  box-shadow: 0 0 0 4px var(--node-ring, var(--bg));
}
.roadmap-node--done { background: var(--ok); }
.roadmap-node--next { background: var(--accent); }
.roadmap-node--later { background: var(--text-faint); }
.roadmap-node--out { background: var(--border-strong); }
.section-alt .roadmap-node { --node-ring: var(--surface); }

/* A chip carries the version or the state, so no heading has to end in an
   em rule to say where it sits. Tinted like the product's status pills; the
   text is mixed toward --text so the light theme keeps its contrast. */
.roadmap-head { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.roadmap-head h2 { margin: 0; }

.roadmap-chip {
  display: inline-flex; align-items: center;
  padding: 0.22rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2); color: var(--text-dim);
  font-size: 0.78rem; font-weight: 600; line-height: 1.5;
  letter-spacing: 0.01em; white-space: nowrap;
}
.roadmap-chip--done {
  color: color-mix(in srgb, var(--ok) 72%, var(--text));
  background: color-mix(in srgb, var(--ok) 14%, transparent);
  border-color: color-mix(in srgb, var(--ok) 38%, transparent);
}
.roadmap-chip--next {
  color: color-mix(in srgb, var(--accent) 72%, var(--text));
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 36%, transparent);
}
.roadmap-chip--later { color: var(--text-faint); }
.roadmap-chip--out { color: var(--text-dim); background: transparent; border-color: var(--border-strong); }
.roadmap-chip--proposal {
  color: color-mix(in srgb, var(--warn) 68%, var(--text));
  background: color-mix(in srgb, var(--warn) 15%, transparent);
  border-color: color-mix(in srgb, var(--warn) 42%, transparent);
}

/* An icon in front of the bold lead-in. The class selectors are doubled up so
   they outrank the plain `.roadmap ul` rule above without !important. */
.roadmap .roadmap-list {
  list-style: none; margin: 0; padding-left: 0;
  display: grid; gap: 0.85rem;
  color: var(--text-dim); font-size: 0.95rem;
}
.roadmap .roadmap-list li { margin-top: 0; display: flex; align-items: flex-start; gap: 0.7rem; }
.roadmap .roadmap-list li > span { min-width: 0; }
.roadmap-icon { flex: 0 0 auto; width: 1.05rem; height: 1.05rem; margin-top: 0.32rem; color: var(--text-faint); }

/* The "now" band: the page's present tense, ahead of the timeline. */
.roadmap-now {
  padding: clamp(2.25rem, 5vw, 3.25rem) 0;
  background: var(--accent-soft);
  border-block: 1px solid var(--border);
}
.roadmap-now .eyebrow { margin-bottom: 0.6rem; }
.roadmap-now-text { max-width: 64ch; margin: 0; color: var(--text-dim); font-size: 1.02rem; }

/* The proposals live in their own panel, so they never read as commitments. */
.roadmap-suggested .roadmap-body {
  padding: 1.5rem 1.6rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.roadmap-suggested .section-lede { margin-bottom: 1.4rem; }

@media (max-width: 460px) {
  .roadmap-row { padding-left: 1.9rem; }
  .roadmap-suggested .roadmap-body { padding: 1.25rem 1.15rem; }
}

/* --------------------------------------------------------------- cta+foot */

.cta-band {
  padding: clamp(3rem, 7vw, 4.5rem) 0; text-align: center;
  background: var(--surface); border-top: 1px solid var(--border);
}
.cta-band p { color: var(--text-dim); max-width: 52ch; margin-inline: auto; }

.footer { border-top: 1px solid var(--border); padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.footer h4 { margin-bottom: 0.75rem; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 0.4rem; font-size: 0.9rem; }
.footer li a { color: var(--text-dim); }
.footer li a:hover { color: var(--accent); }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.footer-bottom p { margin: 0; font-size: 0.85rem; }

/* Printing the page should give something readable, not a dark slab. */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f4f4f4; --text: #000; --text-dim: #333; --border: #ccc; }
  .topbar, .copy, .cta-band { display: none; }
  a { color: #000; text-decoration: underline; }
}
