/* Loci project page. Tokens follow docs/internals.md §15: warm stone and paper by day,
   deep slate at night, one brass accent. No web fonts, no shadows in light. */
:root {
  color-scheme: light;
  --bg: oklch(97.5% .006 85);
  --surface: oklch(99% .004 85);
  --ink: oklch(22% .02 260);
  --muted: oklch(50% .02 260);
  --line: oklch(88% .01 85);
  --accent: oklch(62% .13 70);
  --on-accent: white;
  /* Brass deep enough to carry text and a white label at AA contrast on paper. */
  --accent-ink: oklch(48% .11 65);
  --button: oklch(48% .11 65);
  --on-button: white;
  --code-bg: oklch(95% .008 85);

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --gutter: 16px;
  --measure: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: oklch(17% .015 260);
    --surface: oklch(21% .015 260);
    --ink: oklch(93% .01 85);
    --muted: oklch(68% .015 260);
    --line: oklch(30% .015 260);
    --accent: oklch(78% .12 75);
    --on-accent: oklch(17% .015 260);
    --accent-ink: oklch(78% .12 75);
    --button: oklch(78% .12 75);
    --on-button: oklch(17% .015 260);
    --code-bg: oklch(21% .015 260);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: oklch(17% .015 260);
  --surface: oklch(21% .015 260);
  --ink: oklch(93% .01 85);
  --muted: oklch(68% .015 260);
  --line: oklch(30% .015 260);
  --accent: oklch(78% .12 75);
  --on-accent: oklch(17% .015 260);
  --accent-ink: oklch(78% .12 75);
  --button: oklch(78% .12 75);
  --on-button: oklch(17% .015 260);
  --code-bg: oklch(21% .015 260);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-sm); }

code, pre { font-family: var(--mono); font-size: .875rem; }
:not(pre) > code {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: .05em .35em;
}
pre {
  margin: .5rem 0 0;
  padding: .875rem 1rem;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow-x: auto;
  line-height: 1.5;
}

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--surface); padding: 6px 10px; z-index: 2; }

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

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font: 600 1.375rem/1 var(--serif); letter-spacing: .01em;
}
.wordmark img { width: 28px; height: 28px; }
.site-header nav ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.site-header nav a { color: var(--ink); text-decoration: none; font-size: .9375rem; }
.site-header nav a:hover { color: var(--accent-ink); }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -.01em; max-width: 20ch; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.375rem; }
p { margin: .75rem 0 0; }
.lede { font-size: 1.1875rem; color: var(--muted); max-width: 60ch; margin-top: 1rem; }
.eyebrow { font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .5rem; }
.small { font-size: .875rem; color: var(--muted); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 1.75rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  font: 500 1rem/1.2 var(--sans);
  text-decoration: none;
}
.button:hover { border-color: var(--accent); text-decoration: none; }
.button.primary { background: var(--button); border-color: var(--button); color: var(--on-button); }
.button.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Sections */
section { padding: 64px 0; border-top: 1px solid var(--line); }
.hero { border-top: 0; padding-top: 56px; }

.shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
}
.hero .shot { margin-top: 48px; }

/* Three features, alternating */
.feature {
  display: grid; grid-template-columns: 3fr 2fr; gap: 40px; align-items: center;
}
.feature + .feature { margin-top: 64px; }
.feature:nth-of-type(even) { grid-template-columns: 2fr 3fr; }
.feature:nth-of-type(even) .shot { order: 2; }
.feature ul { margin: .75rem 0 0; padding-left: 1.2rem; }
.feature li + li { margin-top: .4rem; }

/* Phone row */
.phones {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
  list-style: none; margin: 32px 0 0; padding: 0;
}
.phones .shot { border-radius: var(--r-lg); }
.phones figcaption, .phones .label { font-size: .875rem; color: var(--muted); margin-top: 8px; text-align: center; }

/* What it is */
.facts { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.facts li {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 20px;
}
.facts strong { display: block; font: 600 1.125rem/1.3 var(--serif); margin-bottom: .35rem; }
.facts li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.first-run { display: grid; grid-template-columns: 2fr 3fr; gap: 32px; align-items: center; margin-top: 48px; }

/* Download */
.release-line { margin-top: 1rem; color: var(--muted); }
.release-line [data-release-tag] { color: var(--ink); font-weight: 600; }
[data-release-primary-size] { color: var(--muted); font-size: .9375rem; }
.assets { list-style: none; margin: 24px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.assets li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 16px; }
.assets li + li { border-top: 1px solid var(--line); }
.assets li a { font-weight: 500; min-width: 11rem; }
.assets code { background: none; border: 0; padding: 0; color: var(--muted); font-size: .8125rem; }
.assets .size { margin-left: auto; color: var(--muted); font-size: .875rem; }

.install { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.install > div { min-width: 0; }
.install h3 { font: 600 1rem/1.4 var(--sans); }
.install p { font-size: .9375rem; color: var(--muted); }
.licence { margin-top: 40px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: .9375rem; color: var(--muted); }
.site-footer ul { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }

@media (max-width: 719px) {
  section { padding: 48px 0; }
  .hero { padding-top: 40px; }
  .hero .shot { margin-top: 32px; }
  .site-header nav ul { gap: 14px; }
  .feature, .feature:nth-of-type(even), .first-run { grid-template-columns: 1fr; gap: 20px; }
  .feature:nth-of-type(even) .shot { order: 0; }
  .feature + .feature { margin-top: 48px; }
  .phones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .facts, .install { grid-template-columns: 1fr; }
  .assets .size { margin-left: 0; }
}
