/* Shared base for the public landing and the private app (spec 004): fonts, identity
   tokens (ink, bone and sulfur; Bricolage Grotesque to speak, Newsreader to read, Martian
   Mono for labels and code), resets, typography, the bar, the hero and the buttons. Dark
   first. This file is public: keep it free of names and internals. */

@font-face { font-family: 'Bricolage Grotesque'; src: url(/fonts/bricolage-grotesque.woff2) format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url(/fonts/newsreader.woff2) format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Martian Mono'; src: url(/fonts/martian-mono.woff2) format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #070B0C;
  --surface: #0C1314;
  --surface-2: #121C1D;
  --line: #1E2C2C;
  --line-2: #2C3E3E;
  --fg: #EDEFE9;
  --muted: #9AA8A4;
  --accent: #DCE455;
  --accent-text: #DCE455;
  --on-accent: #070B0C;
  --good: #8FD6A0;
  --wait: #E8C15A;
  --bad: #F08A72;
  --f-disp: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --f-read: 'Newsreader', Georgia, 'Times New Roman', serif;
  --f-mono: 'Martian Mono', ui-monospace, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 5vw, 56px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #F3EFE6;
    --surface: #FBF8F1;
    --surface-2: #ECE6D9;
    --line: #D9D2C3;
    --line-2: #C2B9A6;
    --fg: #0B0B0B;
    --muted: #5F5A52;
    --accent: #DCE455;
    --accent-text: #5A5F14;
    --on-accent: #070B0C;
    --good: #2C7442;
    --wait: #8C5F0A;
    --bad: #B0371F;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); color: var(--fg); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--f-disp); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-family: var(--f-disp); font-weight: 700; letter-spacing: -.02em; line-height: 1; text-wrap: balance; }
p { margin: 0; }
a { color: var(--accent-text); text-underline-offset: 3px; }
code, pre, .mono { font-family: var(--f-mono); font-size: .84em; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }

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

/* Bar */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; display: flex; align-items: center; gap: 16px; padding: 12px var(--gutter); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.mark { font-weight: 700; font-size: 18px; letter-spacing: -.01em; margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bar-actions { display: flex; align-items: center; gap: 14px; }
.bar-link { color: var(--muted); font-size: 14px; }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: var(--gutter); padding-block: 32px 80px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; }
.wrap > * { min-width: 0; }
.wrap:focus { outline: none; }
.loading, .empty { color: var(--muted); font-size: 15px; }
.empty { border: 1px dashed var(--line-2); padding: 18px; }

/* Hero */
.hero { display: grid; gap: 18px; }
.hero h1 { font-size: clamp(48px, 9vw, 112px); letter-spacing: -.035em; line-height: .92; }
.lead { font-family: var(--f-read); font-size: clamp(18px, 1.8vw, 22px); line-height: 1.45; color: var(--muted); max-width: 60ch; }

/* Buttons */
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 16px; border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 14px; border-radius: 3px; cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line-2); font-weight: 600; }
.btn.small { min-height: 34px; padding: 5px 12px; font-size: 13px; }
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease); }
}
