/* Longview — one stylesheet, no build step.
 *
 * Deliberately hand-written and dependency-free: this site is deployed by
 * copying a directory onto a server, and a toolchain that has to run first
 * is a toolchain that will be out of date the first time somebody edits a
 * headline in a hurry. */

:root {
  color-scheme: dark;

  --bg: #090b0f;
  --bg-raised: #10141b;
  --bg-sunken: #06080b;
  --line: #1e242e;
  --line-bright: #2b333f;

  --text: #e8ecf3;
  --text-dim: #9aa5b5;
  --text-faint: #6b7686;

  --accent: #5eead4;
  --accent-dim: #2dd4bf;
  --accent-glow: rgba(94, 234, 212, 0.14);
  --warn: #f0a35e;

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

  --gutter: 24px;
  --max: 1120px;
  --radius: 14px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.021em; margin: 0; font-weight: 640; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.033em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: -0.026em; }
h3 { font-size: 1.07rem; letter-spacing: -0.012em; }
p { margin: 0; }

code, kbd { font-family: var(--mono); font-size: 0.87em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */

header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 11, 15, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex; align-items: center; gap: 28px;
  height: 62px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  color: var(--text); font-weight: 650; letter-spacing: -0.02em; font-size: 1.04rem;
}
.brand:hover { text-decoration: none; }
.brand svg { display: block; }
nav.site { margin-left: auto; display: flex; align-items: center; gap: 24px; }
nav.site a { color: var(--text-dim); font-size: 0.93rem; font-weight: 500; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--text); text-decoration: none; }

@media (max-width: 680px) {
  header.site .wrap { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; gap: 12px 20px; }
  nav.site { margin-left: 0; width: 100%; gap: 18px; overflow-x: auto; }
  nav.site a { font-size: 0.88rem; white-space: nowrap; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 19px; border-radius: 10px;
  font-size: 0.95rem; font-weight: 580; letter-spacing: -0.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #042f2a; }
.btn-primary:hover { background: #7df0dd; }
.btn-ghost { border-color: var(--line-bright); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: #3d4756; background: var(--bg-raised); }

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

.hero { position: relative; padding: clamp(64px, 11vw, 124px) 0 clamp(52px, 8vw, 92px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% 0 auto 50%;
  width: min(1100px, 150vw); aspect-ratio: 1; transform: translateX(-50%);
  background: radial-gradient(circle at 50% 50%, var(--accent-glow), transparent 62%);
  pointer-events: none;
}
.hero > * { position: relative; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 5px 13px 5px 9px; margin-bottom: 26px;
  border: 1px solid var(--line-bright); border-radius: 999px;
  background: var(--bg-raised);
  font-size: 0.8rem; color: var(--text-dim); letter-spacing: 0.01em;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.16);
}

.hero p.lede {
  max-width: 50ch; margin-top: 22px;
  font-size: clamp(1.07rem, 2vw, 1.25rem); color: var(--text-dim);
}
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.specstrip {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--line);
  font-size: 0.86rem; color: var(--text-faint);
}
.specstrip span { display: inline-flex; align-items: center; gap: 8px; }
.specstrip span::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-dim); opacity: .75;
}

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

section.band { padding: clamp(56px, 9vw, 104px) 0; border-top: 1px solid var(--line); }
/* The header is sticky, so an in-page anchor would otherwise land with its
 * first line underneath it. */
section[id] { scroll-margin-top: 74px; }
section.band.sunken { background: var(--bg-sunken); }

.section-head { max-width: 62ch; margin-bottom: 46px; }
.section-head .kicker {
  display: block; margin-bottom: 14px;
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-dim);
}
.section-head p { margin-top: 16px; color: var(--text-dim); }

/* ---------- cards ---------- */

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

.card {
  padding: 26px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-raised), rgba(16, 20, 27, 0.4));
  transition: border-color .18s ease;
}
.card:hover { border-color: var(--line-bright); }
.card .ico { color: var(--accent); margin-bottom: 16px; display: block; width: 24px; height: 24px; }
.card h3 { margin-bottom: 9px; }
.card p { color: var(--text-dim); font-size: 0.945rem; }
.card p + p { margin-top: 11px; }
.card .note {
  display: block; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.78rem; color: var(--text-faint);
}

/* ---------- diagram ---------- */

.diagram {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-raised); padding: clamp(16px, 3vw, 32px);
}
.legend {
  display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 22px;
  padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 0.85rem; color: var(--text-dim);
}
.legend span { display: inline-flex; align-items: center; gap: 9px; }
.legend i { width: 20px; height: 0; border-top-width: 2px; border-top-style: solid; display: inline-block; }

/* ---------- steps ---------- */

ol.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
ol.steps li {
  counter-increment: step; position: relative;
  padding: 20px 22px 20px 64px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised);
}
ol.steps li::before {
  content: counter(step); position: absolute; left: 22px; top: 20px;
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(94, 234, 212, 0.1); border: 1px solid rgba(94, 234, 212, 0.26);
  color: var(--accent); font-family: var(--mono); font-size: 0.8rem;
}
ol.steps li strong { display: block; margin-bottom: 5px; font-weight: 600; }
ol.steps li p { color: var(--text-dim); font-size: 0.945rem; }

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

.tablewrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th {
  background: var(--bg-raised); color: var(--text-faint);
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.09em; text-transform: uppercase; font-weight: 500;
}
tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 560; color: var(--text); width: 34%; }
td { color: var(--text-dim); }
td code { color: var(--text); background: var(--bg-sunken); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line); }

@media (max-width: 620px) {
  th, td { padding: 12px 13px; font-size: 0.88rem; }
  tbody th { width: 42%; }
}

/* ---------- code blocks ---------- */

pre {
  margin: 0; padding: 18px 20px; overflow-x: auto;
  background: var(--bg-sunken); border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--mono); font-size: 0.85rem; line-height: 1.7; color: var(--text);
}
pre .c { color: var(--text-faint); }
pre .p { color: var(--accent-dim); user-select: none; }

/* ---------- callout ---------- */

.callout {
  display: flex; gap: 14px; padding: 18px 20px;
  border: 1px solid var(--line-bright); border-left: 3px solid var(--warn);
  border-radius: 10px; background: var(--bg-raised);
  font-size: 0.93rem; color: var(--text-dim);
}
.callout strong { color: var(--text); }

/* ---------- downloads ---------- */

/* `auto-fill`, not `auto-fit`: a group with one card in it (the Connection
 * Manager) should sit in a column the same width as the cards beside it in
 * the group above, not stretch across the page on its own. */
.dl-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.dl {
  display: flex; flex-direction: column; gap: 4px;
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised);
}
.dl .plat { display: flex; align-items: center; gap: 10px; font-weight: 620; letter-spacing: -0.012em; }
.dl .plat svg { color: var(--accent); flex: none; }
.dl .role { font-size: 0.87rem; color: var(--text-dim); margin-bottom: 14px; }
.dl .meta { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 0.76rem; color: var(--text-faint); }
.dl .meta div { overflow-wrap: anywhere; }
/* `auto` here rather than on `.meta` below, so the buttons line up across
 * a row of cards whose descriptions are different lengths. */
.dl .btn { margin-top: auto; justify-content: center; }
.dl[data-state="pending"] { opacity: .62; }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line-bright); background: var(--bg-sunken);
  font-family: var(--mono); font-size: 0.72rem; color: var(--text-dim);
}

/* ---------- cta + footer ---------- */

.cta {
  text-align: center; padding: clamp(44px, 7vw, 76px) var(--gutter);
  border: 1px solid var(--line); border-radius: 20px;
  background: radial-gradient(ellipse at 50% 0%, rgba(94, 234, 212, 0.09), transparent 66%), var(--bg-raised);
}
.cta p { max-width: 46ch; margin: 16px auto 0; color: var(--text-dim); }
.cta .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }

footer.site { border-top: 1px solid var(--line); padding: 40px 0; color: var(--text-faint); font-size: 0.87rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
footer.site nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 20px; }
footer.site a { color: var(--text-dim); }

.stack-lg > * + * { margin-top: 24px; }
.stack-sm > * + * { margin-top: 12px; }
.muted { color: var(--text-dim); }
.center { text-align: center; }

/* ---------- flow diagram ----------
 * HTML and CSS rather than one wide SVG: an SVG sized to look right on a
 * laptop renders its labels at about five pixels on a phone. Boxes that
 * reflow keep the type at a readable size at every width. */

.flow {
  display: grid; align-items: stretch; gap: 14px;
  grid-template-columns: 1fr auto 1fr auto 1fr;
}
.flow-node {
  padding: 20px; border: 1px solid var(--line-bright); border-radius: 12px;
  background: var(--bg-raised); text-align: center;
}
.flow-node.accent { border-color: rgba(94, 234, 212, 0.35); box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.07) inset; }
.flow-node .ico { color: var(--accent); display: block; width: 26px; height: 26px; margin: 0 auto 12px; }
.flow-node strong { display: block; font-size: 0.99rem; letter-spacing: -0.012em; }
.flow-node span { display: block; margin-top: 6px; font-size: 0.83rem; color: var(--text-dim); }
.flow-node ul {
  margin: 14px 0 0; padding: 12px 0 0; list-style: none; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.75rem; color: var(--text-faint); display: grid; gap: 5px;
}

.flow-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; min-width: 112px; padding: 0 4px;
}
.flow-link em {
  font-style: normal; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.04em;
  color: var(--text-faint); text-align: center; text-transform: uppercase;
}
.flow-link .line {
  width: 100%; height: 0; border-top: 2px dashed var(--line-bright);
  position: relative;
}
.flow-link .line::after {
  content: ""; position: absolute; right: -1px; top: -5px;
  border: 5px solid transparent; border-left-color: var(--line-bright); border-right: 0;
}
.flow-link.live .line { border-top-style: solid; border-top-color: var(--accent-dim); }
.flow-link.live .line::after { border-left-color: var(--accent-dim); }
.flow-link.live em { color: var(--accent-dim); }

@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr; gap: 10px; }
  .flow-link { min-width: 0; flex-direction: row; gap: 12px; padding: 4px 0; }
  .flow-link .line { width: 2px; height: 26px; border-top: 0; border-left: 2px dashed var(--line-bright); margin-left: 22px; }
  .flow-link.live .line { border-left-style: solid; border-left-color: var(--accent-dim); border-top: 0; }
  .flow-link .line::after { right: auto; left: -5px; top: auto; bottom: -1px;
    border: 5px solid transparent; border-top-color: var(--line-bright); border-bottom: 0; border-left-color: transparent; }
  .flow-link.live .line::after { border-top-color: var(--accent-dim); border-left-color: transparent; }
  .flow-link em { text-align: left; }
}

/* The footer's second row: who to write to, kept visually quieter than the
 * page links above it so it reads as a reference rather than navigation. */
footer.site .contact { margin-top: 14px; font-size: 0.82rem; }
footer.site .contact nav { gap: 18px; }
footer.site .contact a { color: var(--text-faint); }
footer.site .contact a:hover { color: var(--text-dim); }

/* ---------- legal pages ----------
 * Licence, terms, privacy and notices: long text meant to be read, so a
 * narrower measure and the ordinary document rhythm the rest of the site
 * does not need. */

footer.site .legal-row { margin-top: 14px; font-size: 0.8rem; }
footer.site .legal-row nav { gap: 18px; }
footer.site .legal-row a { color: var(--text-faint); }
footer.site .legal-row a:hover { color: var(--text-dim); }

.legal { max-width: 74ch; padding: clamp(40px, 7vw, 72px) 0 72px; }
.legal .updated { color: var(--text-faint); font-size: 0.9rem; margin-top: 10px; }
.legal h2 { font-size: 1.25rem; margin: 40px 0 12px; }
.legal h3 { margin: 24px 0 8px; }
.legal p, .legal li { color: var(--text-dim); }
.legal p + p { margin-top: 12px; }
.legal ul, .legal ol { margin: 10px 0 0; padding-left: 1.3em; }
.legal li + li { margin-top: 6px; }
.legal strong { color: var(--text); }
.legal .summary { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); padding: 18px 22px; margin-top: 26px; }
.legal .placeholder { color: var(--warn); }
.legal ul.columns { columns: 2 22ch; column-gap: 32px; font-family: var(--mono); font-size: 0.78rem; list-style: none; padding: 0; }
.legal ul.columns li { margin: 0 0 3px; break-inside: avoid; }
.legal details { border-top: 1px solid var(--line); padding: 10px 0; }
.legal details summary { cursor: pointer; color: var(--text-dim); font-family: var(--mono); font-size: 0.78rem; }
.legal details pre { margin-top: 10px; white-space: pre-wrap; font-size: 0.76rem; }

/* ---------- trial form ---------- */

form.trial { display: grid; gap: 14px 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: 760px; }
form.trial .wide { grid-column: 1 / -1; }
form.trial label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--text); }
form.trial label .optional { color: var(--text-faint); font-size: 0.8rem; }
form.trial input[type="email"], form.trial input[type="tel"], form.trial input:not([type]) {
  background: var(--bg-sunken); border: 1px solid var(--line-bright); border-radius: 10px;
  color: var(--text); font: inherit; padding: 10px 12px;
}
form.trial input:focus { outline: 2px solid var(--accent-dim); outline-offset: 1px; }
form.trial label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--text-dim); }
form.trial .fine { margin-top: 12px; color: var(--text-faint); font-size: 0.82rem; }
form.trial .result { margin-top: 10px; min-height: 1.4em; color: var(--text-dim); }
form.trial .result[data-state="ok"] { color: var(--accent); }
form.trial .result[data-state="error"] { color: var(--warn); }
form.trial button[disabled] { opacity: 0.6; cursor: progress; }
