/* Gas Math site. Colours follow App/Sources/Theme.swift. No external requests. */

@font-face {
  font-family: "Shrikhand";
  src: url("/fonts/Shrikhand-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark light;
  --bg: #0a0e13;
  --panel: #111820;
  --panel2: #161e28;
  --line: #223040;
  --line2: #2d3d50;
  --fg: #e8edf2;
  --muted: #9aa8b8;
  --faint: #66768a;
  --brass: #e9a640;
  --brass-fill: #e9a640;
  --brass-ink: #1a1206;
  --on: #43d39a;
  --grid: rgba(120, 150, 180, 0.07);
  --grid-strong: rgba(120, 150, 180, 0.13);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #eff1ec;
    --panel: #ffffff;
    --panel2: #f6f7f3;
    --line: #dde1d8;
    --line2: #c9cec3;
    --fg: #17201a;
    --muted: #4e5b52;
    --faint: #77857c;
    --brass: #a9690f;
    --on: #16935f;
    --grid: rgba(40, 70, 50, 0.045);
    --grid-strong: rgba(40, 70, 50, 0.085);
    --shadow: 0 18px 40px rgba(30, 40, 30, 0.18);
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  /* Graph paper: fine lines every 16 px, a stronger one every 64 px. */
  background-image:
    linear-gradient(var(--grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-strong) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px, 16px 16px, 16px 16px;
  background-position: -1px -1px;
  color: var(--fg);
  font: 400 1.0625rem/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}

a { color: var(--brass); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--brass-fill); color: var(--brass-ink);
  padding: 0.5rem 1rem; font-weight: 700; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 44rem; }

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 1.25rem;
}
.brand {
  font-family: "Shrikhand", Georgia, serif;
  font-size: 1.75rem; line-height: 1; color: var(--fg); text-decoration: none;
}
.top nav { display: flex; gap: 1.25rem; font-weight: 600; font-size: 0.95rem; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--fg); }

/* Hero */
.hero {
  display: grid; gap: 2.5rem; align-items: center;
  padding-block: 2.5rem 3.5rem;
}
@media (min-width: 52rem) {
  .hero { grid-template-columns: 1.15fr 1fr; padding-block: 4rem 5rem; }
}
.wordmark {
  font-family: "Shrikhand", Georgia, serif;
  font-weight: 400;
  font-size: clamp(3.25rem, 12vw, 6.5rem);
  line-height: 0.95; margin: 0 0 1.25rem;
  letter-spacing: -0.01em;
}
.pitch {
  font-size: clamp(1.35rem, 3.6vw, 1.9rem);
  line-height: 1.25; font-weight: 700; margin: 0 0 1rem;
}
.pitch em { font-style: normal; color: var(--on); }
.lede { color: var(--muted); font-size: 1.125rem; margin: 0 0 1.75rem; max-width: 34rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--brass-fill); color: var(--brass-ink);
  font-weight: 800; font-size: 1.05rem; text-decoration: none;
  padding: 0.85rem 1.35rem; border-radius: 14px;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.soon { display: block; margin-top: 0.6rem; color: var(--faint); font-size: 0.9rem; }

.phone {
  margin: 0; justify-self: center;
  width: min(19rem, 78vw);
  border-radius: 2.4rem; overflow: hidden;
  border: 1px solid var(--line2);
  box-shadow: var(--shadow);
  background: #0a0e13;
}
.phone img { display: block; width: 100%; height: auto; }

/* Sections */
section { padding: 3rem 0; }
h2 {
  font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.2;
  margin: 0 0 1.25rem; letter-spacing: -0.01em;
}
h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }

.features {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  list-style: none; padding: 0; margin: 0;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.25rem 1.35rem;
}
.card p { margin: 0; color: var(--muted); }
.dot {
  display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%;
  background: var(--brass); margin-right: 0.5rem; vertical-align: 0.1em;
}

.shots {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  list-style: none; padding: 0; margin: 0;
}
.shots figure { margin: 0; }
.shots .phone { width: 100%; max-width: 17rem; margin: 0 auto; border-radius: 2rem; }
.shots figcaption {
  text-align: center; color: var(--muted); font-size: 0.95rem;
  margin-top: 0.85rem; max-width: 17rem; margin-left: auto; margin-right: auto;
}

.hardware {
  display: grid; gap: 1rem;
}
@media (min-width: 46rem) { .hardware { grid-template-columns: 1fr 1fr; } }
.hardware .card p + p { margin-top: 0.6rem; }

.note { color: var(--faint); font-size: 0.95rem; }

/* Long-form pages */
.doc { padding-block: 1.5rem 4rem; }
.doc h1 { font-size: clamp(2rem, 6vw, 2.75rem); line-height: 1.1; margin: 1rem 0 0.4rem; letter-spacing: -0.015em; }
.doc .date { color: var(--faint); margin: 0 0 2rem; }
.doc h2 { font-size: 1.4rem; margin: 2.5rem 0 0.75rem; }
.doc p, .doc li { color: var(--fg); }
.doc ul, .doc ol { padding-left: 1.25rem; }
.doc li { margin: 0.35rem 0; }
.doc li::marker { color: var(--brass); }
.summary {
  position: relative; overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.25rem 1rem 1.6rem;
  margin: 0 0 1rem;
}
/* Brass bar: rounded only where the box is, flat on the inside. */
.summary::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: var(--brass);
}
.summary p { margin: 0.4rem 0; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; margin: 0.5rem 0 1rem; font-size: 0.98rem; }
th, td { text-align: left; vertical-align: top; padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
td:first-child { font-weight: 600; width: 32%; }
kbd {
  font: inherit; font-weight: 600;
  background: var(--panel2); border: 1px solid var(--line2);
  border-radius: 6px; padding: 0.05rem 0.4rem;
}

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem; color: var(--faint); font-size: 0.92rem;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
footer nav { display: flex; gap: 1.25rem; }
footer a { color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: filter 0.15s ease; }
}
.top.home { justify-content: flex-end; }

/* Narrow screens: stack table rows so the explanation gets the full width. */
@media (max-width: 40rem) {
  table, tbody, tr, td { display: block; }
  thead { position: absolute; left: -9999px; }
  tr { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  td { border: 0; padding: 0.1rem 0; }
  td:first-child { white-space: normal; }
}

/* Hero: the instrument area only, larger than the phone shots. */
.phone.hero-shot { width: min(26rem, 100%); border-radius: 1.75rem; }

.lede + .lede { margin-top: -0.75rem; }
.aside { color: var(--faint); font-size: 0.95rem; margin: -0.75rem 0 1.25rem; }
sup { line-height: 0; font-size: 0.7em; }
sup a { text-decoration: none; padding: 0 0.1em; }
.footnotes { padding: 1rem 0 2rem; }
.footnotes ol { margin: 0; padding-left: 1.25rem; color: var(--faint); font-size: 0.9rem; max-width: 44rem; }
.footnotes li::marker { color: var(--faint); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
