/* BrainStatic Threads Books. System fonts only: the site makes no third-party requests. */
:root {
  --bg: #fffaf3;
  --surface: #ffffff;
  --alt: #fff1e2;
  --text: #221c18;
  --muted: #6b5f57;
  --border: #f0e2d2;
  --accent: #e0532c;
  --accent-hover: #c44420;
  --accent-text: #ffffff;
  --teal: #0e7c7b;
  --badge: #fde7c8;
  --badge-text: #7a4a10;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(60, 35, 15, .06), 0 8px 24px rgba(60, 35, 15, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17120f;
    --surface: #221b17;
    --alt: #2a211b;
    --text: #f5ece4;
    --muted: #c2b3a7;
    --border: #3a2e26;
    --accent: #ff7a50;
    --accent-hover: #ff9471;
    --accent-text: #1a0f0a;
    --teal: #4fd1c5;
    --badge: #4a3418;
    --badge-text: #ffd9a3;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
h1, h2, h3, .brand {
  font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
a { color: var(--teal); }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

header.site { padding: 18px 0; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.brand img { width: 40px; height: 40px; }
.brand small { display: block; font-weight: 600; font-size: .8rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
nav.site a { color: var(--text); text-decoration: none; font-weight: 600; margin-left: 20px; }
nav.site a:hover { color: var(--accent); }

.hero { padding: 40px 0 56px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 14px; max-width: 18ch; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 58ch; margin: 0 0 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.chips li { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: .95rem; font-weight: 600; }

section { padding: 48px 0; }
section.alt { background: var(--alt); }
section h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: 0 0 8px; }
section > .wrap > p.lede { color: var(--muted); margin: 0 0 32px; max-width: 60ch; }

.books { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.book {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.book .cover { background: var(--alt); padding: 24px 24px 0; display: flex; justify-content: center; }
.book .cover img { width: 70%; max-width: 230px; border-radius: 6px 6px 0 0; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.book .body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.book h3 { font-size: 1.3rem; margin: 0 0 4px; }
.book .sub { color: var(--muted); font-weight: 600; margin: 0 0 12px; font-size: .98rem; }
.book p { margin: 0 0 14px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 18px; }
.facts li { background: var(--badge); color: var(--badge-text); border-radius: 8px; padding: 3px 10px; font-size: .85rem; font-weight: 700; }
.book .actions { margin-top: auto; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-block; background: var(--accent); color: var(--accent-text); text-decoration: none;
  font-weight: 700; padding: 11px 20px; border-radius: 12px;
}
.btn:hover { background: var(--accent-hover); }
.btn.soon { background: var(--border); color: var(--muted); cursor: default; }
.peek { font-weight: 600; }

.samples { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.samples figure { margin: 0; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.samples figcaption { padding: 10px 16px; font-weight: 600; color: var(--muted); font-size: .95rem; }

.why { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.why div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.why h3 { margin: 0 0 6px; font-size: 1.1rem; }
.why p { margin: 0; color: var(--muted); }

footer.site { padding: 36px 0 48px; color: var(--muted); font-size: .93rem; border-top: 1px solid var(--border); }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; }
footer.site a { color: var(--muted); }
footer.site p { margin: 4px 0; }

.prose { max-width: 70ch; padding: 24px 0 56px; }
.prose h1 { font-size: 2.2rem; margin: 0 0 8px; }
.prose h2 { font-size: 1.3rem; margin: 32px 0 8px; }
.prose .updated { color: var(--muted); margin: 0 0 24px; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  nav.site a { margin: 0 16px 0 0; }
  .books, .samples { grid-template-columns: 1fr; }
}
