/* Article pages — the landing page's tokens (site/src/style.css): graphite, warm off-white,
   the logo's cyan as the one accent, Instrument Serif display + Geist body + Geist Mono captions.
   Standalone because these pages are static HTML served from /articles/, outside the Vite build;
   fonts are the landing page's own self-hosted subsets at /fonts/. */

@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/instrument-serif-latin.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/instrument-serif-italic-latin.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/geist-latin.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/fonts/geist-mono-latin.woff2") format("woff2"); }

:root {
  --bg: #0e0f12;
  --bg-2: #121317;
  --surface: #17181d;
  --line: rgba(242, 239, 232, 0.1);
  --line-strong: rgba(242, 239, 232, 0.22);
  --text: #f2efe8;
  --dim: #a19d94;
  --dim-2: #84817a;
  --accent: #00e5ff;
  --accent-ink: #00142f;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --nav-h: 4.5rem;
  --container-max: 82rem;
  --measure: 46rem;
  --measure-wide: 46rem;
  --figure-max: 58rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; min-width: 320px; overflow-x: hidden;
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.06; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -3rem; z-index: 100; padding: 0.5rem 0.75rem; background: var(--text); color: var(--bg); border-radius: 4px; }
.skip-link:focus { top: 1rem; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.eyebrow {
  display: flex; align-items: center; gap: 0.6rem; margin: 0 0 1.25rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim);
}

/* ---------- buttons (the landing page's) ---------- */
.button, .btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.25rem; border-radius: 999px; font-weight: 500; font-size: 0.95rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.button-primary, .btn-accent { background: var(--accent); color: var(--accent-ink); }
.button-primary:hover, .btn-accent:hover { background: #5cefff; }
.button-dark, .btn-quiet { color: var(--text); border-color: var(--line-strong); padding: 0.55rem 0.95rem; font-size: 0.9rem; }
.button-dark:hover, .btn-quiet:hover { border-color: var(--text); }
.button:active, .btn:active { transform: translateY(1px); }
.button-small { padding: 0.55rem 0.95rem; font-size: 0.9rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 15, 18, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-shell {
  width: min(100% - var(--pad) * 2, var(--container-max)); margin-inline: auto;
  height: var(--nav-h); display: flex; align-items: center; gap: 2.5rem;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--text); }
.brand-logo { height: 1.85rem; width: auto; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; margin-left: auto; }
.nav-links a { color: var(--dim); text-decoration: none; font-size: 0.9rem; transition: color 160ms var(--ease-out); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links .button { color: var(--text); }
@media (max-width: 899px) {
  .nav-links a:not(.button) { display: none; }
  .nav-links { gap: 0; }
}

/* ---------- article head ---------- */
.article-head { padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--line); }
.article-head-inner { width: min(100% - var(--pad) * 2, var(--measure-wide)); margin-inline: auto; }
.article-head-inner.is-wide { width: min(100% - var(--pad) * 2, var(--container-max)); }
.article-head h1 { font-size: clamp(2.3rem, 4.4vw, 3.8rem); line-height: 1.02; letter-spacing: -0.015em; }
.article-standfirst { margin-top: 1.5rem; max-width: var(--measure); font-size: clamp(1.05rem, 1.3vw, 1.2rem); line-height: 1.5; color: var(--dim); }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1.75rem; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim-2); }

/* ---------- article body ---------- */
.article-body { width: min(100% - var(--pad) * 2, var(--measure)); margin: 0 auto; padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem); }
.article-body > p { margin: 0 0 1.35rem; color: var(--dim); font-size: 1.0625rem; line-height: 1.65; }
.article-body > p strong { color: var(--text); font-weight: 500; }
.article-body em { font-style: italic; }
.article-body h2 { margin: 3rem 0 1.1rem; font-size: clamp(1.7rem, 2.8vw, 2.4rem); }
.article-body h2 em { color: var(--accent); }
.article-body h3 { margin: 2.25rem 0 0.8rem; font-size: clamp(1.35rem, 2vw, 1.7rem); }
.article-body ul, .article-body ol { margin: 0 0 1.5rem; padding: 0; list-style: none; }
.article-body li { position: relative; padding: 0.7rem 0 0.7rem 1.4rem; border-top: 1px solid var(--line); color: var(--dim); }
.article-body li:last-child { border-bottom: 1px solid var(--line); }
.article-body li::before { content: "—"; position: absolute; left: 0; color: var(--dim-2); }
.article-body li strong { color: var(--text); font-weight: 500; }
.article-body code { font-family: var(--mono); font-size: 0.9em; color: var(--text); }

/* ---------- figures: the landing page's screenshot plane ---------- */
.article-figure {
  width: min(100vw - var(--pad) * 2, var(--figure-max));
  margin: 2.75rem 0 3.25rem 50%; transform: translateX(-50%);
}
.app-frame {
  border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: var(--surface);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
}
.frame-bar { display: flex; align-items: center; gap: 0.45rem; padding: 0.55rem 0.9rem; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.frame-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--line-strong); }
.frame-address { margin-left: 0.6rem; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim-2); }
.article-figure a { position: relative; display: block; text-decoration: none; }
.article-figure img { width: 100%; cursor: zoom-in; }
.figure-zoom {
  position: absolute; right: 0.75rem; bottom: 0.75rem;
  padding: 0.35rem 0.7rem; border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgba(14, 15, 18, 0.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim);
  opacity: 0; transition: opacity 160ms var(--ease-out);
}
.article-figure a:hover .figure-zoom, .article-figure a:focus-visible .figure-zoom { opacity: 1; }
.article-figure figcaption { margin: 0.75rem auto 0; max-width: var(--measure); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; line-height: 1.5; color: var(--dim-2); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 2rem; background: rgba(10, 10, 12, 0.88); }
.lightbox figure { margin: 0; max-width: min(96vw, 1600px); }
.lightbox img { max-width: 100%; max-height: 82vh; object-fit: contain; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.lightbox figcaption { margin-top: 0.75rem; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--dim); }
.lightbox-close {
  position: absolute; top: 1rem; right: 1rem; width: 2.25rem; height: 2.25rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font-size: 1.1rem; cursor: pointer;
}
.lightbox-close:hover { border-color: var(--text); }

/* ---------- closing CTA: the landing page's join band ---------- */
.article-cta { padding: clamp(4rem, 8vw, 7rem) 0; border-top: 1px solid var(--line); background: var(--bg-2); }
.article-cta { display: grid; grid-template-columns: min(100% - var(--pad) * 2, var(--measure-wide)); justify-content: center; }
.article-cta > * { justify-self: start; }
.article-cta h2 { font-size: clamp(2.1rem, 4vw, 3.4rem); margin-bottom: 1.25rem; }
.article-cta h2 em { color: var(--accent); }
.article-cta p { max-width: 38rem; margin-bottom: 2rem; color: var(--dim); font-size: clamp(1.05rem, 1.3vw, 1.2rem); }
.article-cta .button { padding: 1rem 1.5rem; font-size: 1.02rem; }

/* ---------- index: the landing page's numbered rows ---------- */
.index-grid { width: min(100% - var(--pad) * 2, var(--container-max)); margin: 0 auto; padding: clamp(2rem, 4vw, 3rem) 0 clamp(4rem, 8vw, 7rem); list-style: none; counter-reset: article; }
.index-card {
  counter-increment: article; display: grid; grid-template-columns: auto 1fr; gap: 1rem 1.5rem; align-items: center;
  padding: 1.75rem 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit;
}
.index-card:last-child { border-bottom: 1px solid var(--line); }
.index-card::before { content: counter(article, decimal-leading-zero); font-family: var(--mono); font-size: 0.8rem; color: var(--dim-2); }
.index-card-body { display: grid; gap: 0.4rem; }
.index-card h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.1; transition: color 160ms var(--ease-out); }
.index-card:hover h2 { color: var(--accent); }
.index-card p { color: var(--dim); font-size: 0.95rem; max-width: 42rem; }
.index-card-shot { grid-column: 1 / -1; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.index-card-shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
@media (min-width: 900px) {
  .index-card { grid-template-columns: 3rem 1fr 14rem; gap: 2rem; }
  .index-card-shot { grid-column: auto; order: 2; }
}
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  .index-card-shot { transition: transform 240ms var(--ease-out); }
  .index-card:hover .index-card-shot { transform: translateY(-3px); }
}

/* ---------- footer ---------- */
footer { padding: 3rem 0 2.5rem; border-top: 1px solid var(--line); }
.footer-top { width: min(100% - var(--pad) * 2, var(--container-max)); margin-inline: auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; }
.footer-logo { height: 1.6rem; width: auto; opacity: 0.85; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-links a { color: var(--dim); text-decoration: none; transition: color 160ms var(--ease-out); }
.footer-links a:hover { color: var(--text); }
.footer-bottom { width: min(100% - var(--pad) * 2, var(--container-max)); margin: 2rem auto 0; display: grid; gap: 0.5rem; font-size: 0.8rem; color: var(--dim-2); max-width: 60rem; }
