/* HatchLogic site styles. System fonts only: no third-party requests. */
:root {
  --paper: #fbf8f3;
  --surface: #ffffff;
  --sunk: #f3ede4;
  --ink: #1f1a15;
  --ink-soft: #5c5249;
  --line: #e6ddd1;
  --accent: #b4511c;
  --accent-ink: #9a4415;
  --accent-soft: #fbe9dc;
  --on-accent: #ffffff;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(31, 26, 21, 0.06), 0 8px 24px rgba(31, 26, 21, 0.06);
  --max: 1080px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15120f;
    --surface: #1e1a16;
    --sunk: #26211c;
    --ink: #f3ece2;
    --ink-soft: #b9ada0;
    --line: #362f28;
    --accent: #e8874a;
    --accent-ink: #f0a06a;
    --accent-soft: #3a2518;
    --on-accent: #1f1209;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--font);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: 0.95rem; }
.nav a { color: var(--ink-soft); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
@media (max-width: 560px) {
  .site-header { position: static; }
  .site-header .wrap { padding-top: 10px; padding-bottom: 10px; }
}

/* Sections */
section { padding: 72px 0; }
.section-sunk { background: var(--sunk); }
.eyebrow { color: var(--accent-ink); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 40em; }
.section-head { max-width: 42em; margin-bottom: 36px; }
.section-head p { color: var(--ink-soft); }

.hero { padding: 88px 0 72px; }
.hero h1 { max-width: 15em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink-soft); }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 40px; color: var(--ink-soft); font-size: 0.95rem; padding: 0; list-style: none; }
.facts strong { color: var(--ink); }

/* Cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card p { color: var(--ink-soft); margin: 0; font-size: 0.97rem; }
.icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; margin-bottom: 16px; }
.icon svg { width: 24px; height: 24px; }
.tag { display: inline-block; font-size: 0.78rem; font-weight: 700; color: var(--ink-soft); background: var(--sunk); border-radius: 999px; padding: 3px 10px; margin-bottom: 12px; }

/* Featured game */
.feature { display: grid; gap: 28px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); margin-bottom: 16px; }
.feature img { width: 120px; height: 120px; border-radius: 26px; }
.feature p { color: var(--ink-soft); }
.feature p:last-child { margin-bottom: 0; }
@media (min-width: 720px) { .feature { grid-template-columns: 140px 1fr; padding: 36px; } .feature img { width: 140px; height: 140px; } }

/* Prose pages */
.page-head { padding: 64px 0 32px; border-bottom: 1px solid var(--line); }
.page-head p { color: var(--ink-soft); margin: 0; }
.prose { max-width: 46em; padding: 40px 0 80px; }
.prose h2 { font-size: 1.45rem; margin-top: 2.2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.table-scroll { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; background: var(--surface); }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
th { background: var(--sunk); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
.callout { background: var(--accent-soft); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 1.4em; }
.callout p:last-child { margin: 0; }
details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; }
details[open] summary { margin-bottom: 8px; }
details p:last-child { margin-bottom: 0; }
.toc { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.toc a { display: inline-block; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-size: 0.9rem; background: var(--surface); }

.cta { text-align: center; }
.cta .lede { margin: 0 auto; }
.cta .actions { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--ink-soft); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-soft); }
