/* MrClaus studio site.
   Layout follows the omnio-web text pages: a header bar with the way up, a page head, one
   left-aligned reading column on a 72rem page grid, numbered sections, a contents card and a
   footer band. Type, colour and brand are MrClaus's own: system fonts only, neutral greys, and one
   ink blue that only means "you can follow this" (links) or "you are here" (focus).
   Self-contained: no web fonts, images, imports or scripts. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;        /* page */
  --surface: #f5f6f8;   /* contents card, app cards */
  --band: #f1f2f4;      /* footer band */
  --line: #dcdfe4;      /* hairlines (decorative) */
  --fg: #16181b;        /* headings, strong, wordmark */
  --text: #33373d;      /* body copy */
  --muted: #5a606a;     /* dates, footer, list markers */
  --link: #2347b5;      /* links and focus ring */
  --code-bg: #eceef1;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --page: 72rem;
  --measure: 42rem;
  --inset: clamp(18px, 4vw, 48px);
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131416;
    --surface: #1b1d20;
    --band: #0d0e10;
    --line: #2d3035;
    --fg: #eef0f2;
    --text: #c9cdd3;
    --muted: #9ba2ac;
    --link: #93b1ff;
    --code-bg: #25282c;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 17px/1.6 var(--sans);
  overflow-wrap: break-word;
}
main { flex: 1 0 auto; width: 100%; }

h1, h2 { margin: 0; color: var(--fg); line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.8vw, 3.2rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; scroll-margin-top: 16px; }
p { margin: 0; }
strong { color: var(--fg); font-weight: 600; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 3px; }
code { font: 0.88em/1.4 var(--mono); color: var(--fg); background: var(--code-bg);
       padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }

.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 8px; z-index: 10; padding: 8px 14px; border-radius: 6px;
              background: var(--fg); color: var(--bg); text-decoration: none; }

/* Page grid: everything starts at the same left edge as the header. */
.wrap { width: 100%; max-width: var(--page); margin-left: auto; margin-right: auto;
        padding-left: var(--inset); padding-right: var(--inset); }

/* Header: the bar holds the way up (the studio, or the app's home) as a text wordmark. */
.bar { border-bottom: 1px solid var(--line); }
.brand { padding-top: 8px; padding-bottom: 8px; font-size: 1.15rem; font-weight: 700;
         line-height: 1.3; letter-spacing: -0.01em; }
.brand a { display: inline-block; padding: 6px 0; color: var(--fg); text-decoration: none; }
.brand a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.page-head { padding-top: 48px; }
.page-head p { margin-top: 10px; color: var(--muted); }

/* Reading column: every block keeps to the measure; sections open with a 40px rest. */
main.prose { padding-top: 24px; }
.prose > * { max-width: var(--measure); margin: 12px 0 0; }
.prose > :first-child { margin-top: 0; }
main.prose > h2:first-child { margin-top: 16px; }
.prose > h2 { margin-top: 40px; }
.prose > h2 + * { margin-top: 10px; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--muted); }
.lede { font-size: 1.15rem; line-height: 1.55; }

/* Contents card (privacy): two columns where there is room for them. */
.prose > .toc { margin-top: 28px; padding: 16px 20px; border: 1px solid var(--line);
                border-radius: var(--radius); background: var(--surface); }
.toc h2 { font-size: 1rem; letter-spacing: 0; }
.toc ol { margin: 8px 0 0; padding-left: 1.6rem; columns: 2 16rem; column-gap: 2.5rem; }
.toc li { break-inside: avoid; }
.toc li + li { margin-top: 4px; }

/* Studio home: one card per app, so the list grows as apps and games are added. */
.prose > .apps { list-style: none; padding: 0; display: grid; gap: 12px; }
.apps li { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
           background: var(--surface); }
.apps li + li { margin-top: 0; }
.apps li > a:first-child { color: var(--fg); font-weight: 700; font-size: 1.1rem; }

/* Footer band */
.site-footer { margin-top: 64px; background: var(--band); border-top: 1px solid var(--line);
               color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { padding-top: 24px; padding-bottom: 36px; display: grid; gap: 10px; }
.site-footer nav span { white-space: nowrap; }
.site-footer nav a { display: inline-block; padding: 4px 0; color: var(--text); text-decoration: none; }
.site-footer nav a:hover { color: var(--fg); text-decoration: underline; }

@media (max-width: 640px) {
  .page-head { padding-top: 32px; }
  .site-footer { margin-top: 48px; }
}
