/* LMBS Apps
   Parametric pixels as ambient chrome over an editorial dark layout.
   Every colour below is checked against --ground for WCAG AA. */

:root {
  --ground:   #0B0C0E;
  --raised:   #101216;
  --hairline: #191B20;
  --text:     #EDEFF2;  /* 17.0:1 */
  --body:     #9AA1AB;  /*  7.4:1 */
  --muted:    #7E858F;  /*  5.2:1 */
  --accent:   #D6E4FF;  /* 14.1:1 */

  --display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --cell: 12px;
  --cell-gap: 7px;
  --gutter: 72px;
  --measure: 1120px;
}

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

html { background: var(--ground); }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--display);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3 { font-weight: 700; letter-spacing: -0.03em; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: var(--accent); }
a:hover { color: #FFFFFF; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--ground);
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 13px;
  z-index: 10;
}
.skip:focus { left: 12px; top: 12px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- chrome ---------- */

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px var(--gutter);
  max-width: var(--measure);
  width: 100%;
  margin: 0 auto;
}

.wordmark {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.26em;
  color: var(--text);
  text-decoration: none;
}
.wordmark span { color: var(--muted); }

.bar-nav { display: flex; gap: 26px; }
.bar-nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
}
.bar-nav a:hover { color: var(--text); }

main {
  flex-grow: 1;
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px 32px;
  max-width: var(--measure);
  width: 100%;
  margin: 0 auto;
  padding: 40px var(--gutter) 48px;
  border-top: 1px solid var(--hairline);
  margin-top: 96px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.foot-name { flex-grow: 1; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 24px; }
.foot a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--hairline); padding-bottom: 3px; }
.foot a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- pixels ---------- */

@keyframes breathe {
  0%   { opacity: 0.04; }
  50%  { opacity: 0.62; }
  100% { opacity: 0.04; }
}

@keyframes mark {
  0%   { opacity: 0.18; }
  50%  { opacity: 1; }
  100% { opacity: 0.18; }
}

.pixel-field {
  display: grid;
  grid-template-columns: repeat(20, var(--cell));
  gap: var(--cell-gap);
  flex-shrink: 0;
  align-self: flex-start;
}
.pixel-field i {
  width: var(--cell);
  height: var(--cell);
  background: var(--accent);
  opacity: 0.04;
  animation: breathe var(--dur) ease-in-out infinite;
  animation-delay: var(--del);
}

.pixel-mark {
  display: grid;
  grid-template-columns: repeat(2, 6px);
  gap: 3px;
  width: 15px;
  flex-shrink: 0;
}
.pixel-mark i {
  width: 6px;
  height: 6px;
  background: var(--accent);
  animation: mark 2.6s ease-in-out infinite;
  animation-delay: var(--del);
}

/* ---------- home ---------- */

.hero {
  display: flex;
  gap: 72px;
  align-items: flex-start;
  padding: 56px 0 24px;
}

.hero-text {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 560px;
}

.hero h1 {
  font-size: clamp(38px, 5.2vw, 58px);
  line-height: 1.04;
}

.lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  max-width: 50ch;
}
.lead-note {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.section { padding-top: 96px; }
.section > .eyebrow { padding-bottom: 20px; }

.rows { display: flex; flex-direction: column; }

.row {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 26px 0;
  border-top: 1px solid var(--hairline);
  text-decoration: none;
  color: inherit;
  transition: border-color 260ms ease;
}
.rows li:last-child .row { border-bottom: 1px solid var(--hairline); }
.row:hover { border-color: #2C313A; }

.row-name {
  width: 220px;
  flex-shrink: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
  transition: color 200ms ease;
}
.row:hover .row-name { color: var(--accent); }

.row-blurb {
  flex-grow: 1;
  font-size: 15px;
  line-height: 1.55;
  color: var(--body);
}

.row-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.about { display: flex; gap: 72px; align-items: flex-start; }
.about .prose { flex-grow: 1; max-width: 58ch; }

.facts {
  margin: 0;
  display: grid;
  grid-template-columns: auto;
  gap: 4px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  flex-shrink: 0;
  width: 260px;
}
.facts dt { color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase; font-size: 10px; padding-top: 14px; }
.facts dd { margin: 0; color: var(--body); }
.facts a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--hairline); }
.facts a:hover { border-color: var(--accent); }

/* ---------- detail pages ---------- */

.page { padding: 8px 0 0; max-width: 72ch; }
.page-doc { max-width: 68ch; }

.back {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-decoration: none;
  padding: 10px 0;
}
.back:hover { color: var(--accent); }

.page-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 24px 0 40px;
}
.page-head h1 { font-size: clamp(34px, 4.6vw, 50px); line-height: 1.06; }

.cta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent);
  border: 1px solid #2C313A;
  padding: 15px 24px;
  margin-top: 6px;
  transition: border-color 220ms ease, background 220ms ease;
}
.cta:hover { border-color: var(--accent); background: var(--raised); }
.cta-pending { color: var(--muted); border-style: dashed; }

/* ---------- prose ---------- */

.prose { color: var(--body); font-size: 16px; line-height: 1.72; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  color: var(--text);
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-top: 2.2em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}
.prose h3 { color: var(--text); font-size: 17px; margin-top: 1.9em; }
.prose strong { color: var(--text); font-weight: 700; }
.prose a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--hairline); }
.prose a:hover { border-color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: square; }
.prose ol { list-style: decimal; }
.prose li { margin-top: 0.5em; }
.prose li::marker { color: var(--muted); }
.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--raised);
  border: 1px solid var(--hairline);
  padding: 2px 6px;
}
.prose pre {
  background: var(--raised);
  border: 1px solid var(--hairline);
  padding: 18px 20px;
  overflow-x: auto;
}
.prose pre code { background: none; border: 0; padding: 0; }
.prose blockquote {
  border-left: 2px solid var(--hairline);
  padding-left: 20px;
  color: var(--muted);
}
.prose hr { border: 0; border-top: 1px solid var(--hairline); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hairline); }
.prose th { color: var(--text); font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }

/* ---------- navigation ---------- */

@view-transition { navigation: auto; }

@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; transform: translateY(8px); } }

::view-transition-old(root) { animation: vt-fade-out 180ms ease both; }
::view-transition-new(root) { animation: vt-fade-in 320ms cubic-bezier(0.2, 0, 0, 1) both; }

/* ---------- narrow ---------- */

@media (max-width: 900px) {
  :root { --gutter: 24px; --cell: 9px; --cell-gap: 5px; }

  .hero { flex-direction: column; gap: 44px; padding-top: 32px; }
  .about { flex-direction: column; gap: 36px; }
  .facts { width: 100%; }

  .row { flex-wrap: wrap; gap: 8px 18px; padding: 22px 0; }
  .row-name { width: auto; flex-grow: 1; }
  .row-blurb { flex-basis: 100%; order: 3; padding-left: 41px; }
  .row-meta { order: 2; }

  .section { padding-top: 64px; }
  .foot { margin-top: 64px; }
}

/* ---------- motion off ---------- */

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }

  .pixel-field i,
  .pixel-mark i {
    animation: none;
  }
  .pixel-field i { opacity: 0.22; }
  .pixel-mark i { opacity: 0.8; }

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}

/* A statutory disclosure is a block of labelled facts, not a document with
   chapters. Its headings become labels in the site's own label language. */
.prose-tight h2 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 0;
  padding-bottom: 0;
  margin-top: 2.4em;
}
.prose-tight h2 + p { margin-top: 0.7em; }
