/* SunkCost — shared site styles. One place for tokens, type, header, footer. */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=Hanken+Grotesk:wght@400;500;600&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  --ink: #14121f;
  --ink-2: #0f0d1a;
  --chamber: #1b1830;
  --card: #1e1b2e;
  --line: #2c2842;
  --line-2: #35304f;
  --text: #efecff;
  --muted: #9a93b8;      /* violet-biased grey, chosen not defaulted */
  --violet: #8b7cf6;
  --violet-hi: #b5a8ff;
  --sand: #f6b17c;
  --sand-hi: #ffce9b;
  --good: #7cf6a8;

  --font-display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1080px;
  --measure: 62ch;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--violet-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--sand); color: #201400; }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--sand); font-weight: 600;
}

/* ---- site header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--text); letter-spacing: -0.01em; }
.brand img { width: 26px; height: 26px; border-radius: 7px; display: block; }
.brand:hover { text-decoration: none; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav .btn-sm {
  background: var(--violet); color: #fff; padding: 8px 15px; border-radius: 9px;
  font-weight: 600; font-size: 14px;
}
.nav .btn-sm:hover { filter: brightness(1.1); text-decoration: none; }
@media (max-width: 640px) { .nav a.navlink { display: none; } }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px; border-radius: 12px; font-weight: 600; font-size: 16px;
  font-family: var(--font-body); cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, filter .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--violet); color: #fff; }
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--card); transform: translateY(-1px); }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; }
.site-footer .inner { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; justify-content: space-between; padding: 34px 0 56px; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; }
.site-footer .links a { color: var(--muted); }
.site-footer .links a:hover { color: var(--text); }
.site-footer .tag { color: #6f6a85; font-size: 13px; }

/* ---- scroll reveal (progressive; visible by default if JS/motion off) ---- */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.6,.2,1), transform .7s cubic-bezier(.2,.6,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ---- readable document pages (privacy / support) ---- */
.doc { max-width: 760px; margin-inline: auto; padding: 72px 24px 40px; }
.doc .back { display: inline-block; margin-bottom: 26px; color: var(--muted); font-size: 14px; }
.doc h1 { font-size: clamp(30px, 5vw, 40px); margin-bottom: 8px; }
.doc .lede { color: var(--muted); font-size: 17px; max-width: var(--measure); }
.doc h2 { font-size: 22px; color: var(--sand); margin: 40px 0 12px; font-weight: 700; }
.doc h3 { font-size: 17px; margin: 26px 0 6px; font-family: var(--font-body); font-weight: 600; }
.doc p, .doc li { color: #cfc9ea; font-size: 16.5px; max-width: var(--measure); }
.doc ul { padding-left: 22px; margin: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.doc code { font-family: var(--font-mono); font-size: 14px; background: var(--chamber); border: 1px solid var(--line); border-radius: 5px; padding: 1px 7px; }
.doc .panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin: 20px 0; }
.doc .meta { color: var(--muted); font-size: 14px; }
