/* ============================================================================
   ALab — alab.systems
   One screen. Serif for the statement, monospace for everything that names a
   thing. No webfonts, no images, no script, no external requests.
   ========================================================================== */

:root {
  --bg: #F5F3EC;
  --fg: #1B1D18;
  --fg-dim: #4D4F47;
  --muted: #64665D;
  --rule: #847E72;
  --accent: #0F6A78;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --serif: ui-serif, Charter, "Bitstream Charter", "Iowan Old Style", Georgia, "Times New Roman", serif;

  color-scheme: light;
}

/* Both themes get the same care: the neutrals are warm in light (paper) and
   near-black-green in dark (terminal), and the accent is re-solved for each
   ground rather than reused — 5.64:1 on paper, 8.44:1 on the dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C0D0C;
    --fg: #E6E4DD;
    --fg-dim: #A3A199;
    --muted: #8A8983;
    --rule: #6A6C64;
    --accent: #5BB8C4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C0D0C;
  --fg: #E6E4DD;
  --fg-dim: #A3A199;
  --muted: #8A8983;
  --rule: #6A6C64;
  --accent: #5BB8C4;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F5F3EC;
  --fg: #1B1D18;
  --fg-dim: #4D4F47;
  --muted: #64665D;
  --rule: #847E72;
  --accent: #0F6A78;
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  padding: clamp(1.5rem, 6vw, 4rem);
}

main { width: 100%; }

/* The rail is the whole identity here: one accent stroke in the margin, the
   same device the products use to mark a diagnostic. */
.card {
  max-width: 34rem;
  margin-inline: auto;
  border-left: 2px solid var(--accent);
  padding-left: clamp(1.25rem, 4vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

p { margin: 0; }

.wordmark {
  font: 600 0.9375rem var(--mono);
  letter-spacing: -0.01em;
  color: var(--fg);
}
.wordmark .bar { color: var(--accent); margin-right: 0.35em; }

h1 {
  font: 400 clamp(2rem, 1.3rem + 3.4vw, 3.25rem)/1.1 var(--serif);
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

.what {
  font: 400 clamp(1.0625rem, 1rem + 0.4vw, 1.25rem)/1.5 var(--serif);
  color: var(--fg-dim);
}

.links { font: 400 0.9375rem var(--mono); }

.by {
  font: 400 0.8125rem/1.6 var(--mono);
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-wrap: anywhere;
}

a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 120ms ease, text-decoration-color 120ms ease;
}
a:hover, a:focus-visible {
  color: var(--accent);
  text-decoration-thickness: 2px;
}
.by a { color: var(--muted); }
.by a:hover, .by a:focus-visible { color: var(--accent); }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

@media print {
  body { background: #fff; color: #000; }
}
