/* Headings only, matching the app: body text and figures stay on the system
 * stack. The file is the same variable font the app bundles, so the two cannot
 * drift. `font-weight` works here where it does not in Flutter — CSS maps the
 * weight onto a variable font's `wght` axis on its own. */
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/SpaceGrotesk.ttf") format("truetype-variations");
  font-weight: 300 700;
  font-display: swap;
}

/* Taken off the app icon, whose umlaut is a pair of anaglyph filters: a red
 * gel and a cyan one. Both are lifted in tone from the dots themselves
 * (#de2b28 / #00a6c0), which are far too dark to read on this background.
 * See docs/BRAND_THEME.md. */
:root {
  --bg: #0f1214;
  --surface: #181c1e;
  --text: #e3e7e9;
  --text-muted: #b0b8bb;
  --accent: #4fd4e8;
  --accent-hover: #8ae5f3;
  /* Text laid *on* the accent. The accent is a light tone, so white on it is
   * about 1.7:1 — the CTA needs a dark ink, not a lighter one. */
  --accent-ink: #00363f;
  --border: #2b3134;
  /* Prose width, used by the privacy pages. */
  --max-width: 720px;
  /* The landing page opts into a wider shell so screenshots can breathe. */
  --max-width-wide: 1080px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

header,
main,
footer {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

header {
  padding-top: 2.5rem;
  padding-bottom: 1rem;
}

header .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

header .brand:hover,
header .brand:focus {
  color: var(--text);
  text-decoration: none;
}

/* The app's own icon, drawn the way a launcher draws it. The artwork carries
 * its own white ground, so it is clipped to a rounded square rather than
 * dropped onto the page's dark background as a hard-edged tile. */
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: block;
}

header nav {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

header nav a {
  margin-right: 1rem;
}

main {
  flex: 1;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

h1,
h2,
h3,
header .brand {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
}

h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.5rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
}

p,
ul,
ol {
  color: var(--text);
}

ul,
ol {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.35rem;
}

.tagline {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.cta {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.65rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  margin: 0.25rem 0.5rem 0.25rem 0;
}

.cta:hover,
.cta:focus {
  background: var(--accent-hover);
  color: var(--accent-ink);
  text-decoration: none;
}

.cta.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.cta.secondary:hover,
.cta.secondary:focus {
  border-color: var(--accent);
  color: var(--accent);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  color: var(--text-muted);
  font-weight: 600;
}

code {
  background: var(--surface);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.9em;
}

.updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

footer {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  padding-bottom: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer a {
  margin-right: 0.75rem;
}

@media (max-width: 480px) {
  header {
    padding-top: 1.75rem;
  }

  h1 {
    font-size: 1.6rem;
  }
}

/* --- Landing page -----------------------------------------------------------
 *
 * Scoped to `body.landing` so the privacy pages keep their 720px prose column.
 */

.landing header,
.landing main,
.landing footer {
  max-width: var(--max-width-wide);
}

/* Paragraphs still want a prose measure even inside the wide shell. */
.landing .prose {
  max-width: 62ch;
}

/* The paragraph that opens a section — one size up from body text, so the
 * claim a section is making reads before the list that supports it. */
.section-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.section-lead strong,
.section-lead em {
  color: var(--text);
}

/* Bulleted claims under a section lead, as opposed to the ones inside a
 * .feature-row, which already sit in their own column. */
.landing section > ul.prose {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.landing section > ul.prose strong {
  color: var(--text);
  font-weight: 600;
}

.hero {
  text-align: center;
  padding: 1rem 0 0;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero .tagline {
  margin: 0 auto 2rem;
  max-width: 60ch;
  font-size: 1.15rem;
}

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

.cta-row .cta {
  margin: 0;
}

.hero .note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0;
}

/* Screenshot frames. The captures already have the app's own dark background,
 * so the frame is just a hairline and a lift off the page. */
.shot {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  line-height: 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot-wide {
  margin-top: 3rem;
}

/* The stats capture is nearly twice as tall as it is wide. At the full shell
 * width it would fill several screens on its own, so it gets a narrower column
 * and stays centred. */
.shot-tall {
  max-width: 760px;
  margin-inline: auto;
}

.shot-phone {
  max-width: 300px;
  margin-inline: auto;
  border-radius: 22px;
}

/* The same screen at both widths, side by side. The phone sits on the same
 * baseline as the desktop window rather than being centred against it, so the
 * pair reads as one comparison. */
.shot-pair {
  display: grid;
  grid-template-columns: minmax(0, 210px) 1fr;
  gap: 2rem;
  align-items: end;
  margin-top: 3rem;
}

.shot-pair .shot {
  margin: 0;
}

.shot-pair .shot-phone {
  max-width: none;
}

@media (max-width: 620px) {
  .shot-pair {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .shot-pair .shot-phone {
    max-width: 300px;
    margin-inline: auto;
  }
}

section {
  margin-top: 4.5rem;
}

section > h2 {
  margin-top: 0;
}

/* Alternating text/screenshot rows. */
.feature-row {
  display: grid;
  grid-template-columns: 1fr minmax(0, 300px);
  gap: 2.5rem;
  align-items: center;
  margin-top: 3.5rem;
}

.feature-row:nth-child(even) {
  grid-template-columns: minmax(0, 300px) 1fr;
}

.feature-row:nth-child(even) .feature-copy {
  order: 2;
}

.feature-row h3 {
  margin-top: 0;
  font-size: 1.4rem;
}

.feature-row ul {
  color: var(--text-muted);
}

.feature-row ul strong {
  color: var(--text);
  font-weight: 600;
}

/* Text-only capability cards. */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.feature-grid article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
}

.feature-grid h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.feature-grid p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.closing {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 3rem;
}

.closing .prose {
  margin-inline: auto;
}

.attribution {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 1rem;
  line-height: 1.5;
}

@media (max-width: 760px) {
  /* One column, and the screenshot always follows its copy — the nth-child
   * reordering above only makes sense side by side. */
  .feature-row,
  .feature-row:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .feature-row:nth-child(even) .feature-copy {
    order: 0;
  }

  section {
    margin-top: 3.5rem;
  }
}

/* Trust copy at the decision point rather than as a section of its own: it
 * used to sit between the feature grid and the closing call to action, where
 * it interrupted the demonstration to talk about servers. Quieter and smaller
 * than the paragraph above it, so it reads as reassurance and not as a pitch.
 */
.closing .trust {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
