/* Crumb Studios — site styles
   Plain CSS, no external fonts or third-party requests. */

:root {
  --bg: #fbf7f1;
  --bg-alt: #f3ebdf;
  --surface: #ffffff;
  --text: #2a1f17;
  --text-muted: #6b5a4c;
  --border: #e6dacb;
  --accent: #c8752a;
  --accent-strong: #a45a18;
  --accent-soft: #f6e3cc;
  --crust: #8a4f1f;
  --shadow: 0 1px 2px rgba(42, 31, 23, 0.06), 0 8px 24px rgba(42, 31, 23, 0.08);
  --radius: 14px;
  --maxw: 1080px;
  --prose: 720px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17120e;
    --bg-alt: #1f1812;
    --surface: #241c15;
    --text: #f4ece2;
    --text-muted: #bfae9c;
    --border: #3a2e24;
    --accent: #e8964a;
    --accent-strong: #f2ab66;
    --accent-soft: #3a2917;
    --crust: #d88b45;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-strong); text-underline-offset: 2px; }
a:hover { color: var(--accent); }

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--surface); color: var(--text); padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand-mark { width: 32px; height: 32px; flex: none; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--border); border-radius: 10px;
  width: 42px; height: 42px; padding: 0; cursor: pointer; color: var(--text);
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 0.95rem;
}
.site-nav a:hover { color: var(--text); background: var(--bg-alt); }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--accent-soft); }

@media (max-width: 640px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 64px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: 8px 16px 16px; gap: 2px; }
  .site-nav a { padding: 12px 14px; border-radius: 10px; font-size: 1rem; }
}

/* ---------- Home: hero ---------- */

.hero {
  padding: 88px 0 72px;
  background:
    radial-gradient(ellipse 60% 50% at 85% 20%, var(--accent-soft), transparent 70%),
    var(--bg);
}
.hero-inner {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-strong);
  margin: 0 0 14px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1.03; letter-spacing: -0.035em; font-weight: 800;
  margin: 0 0 20px;
}
.hero .lede { font-size: 1.2rem; color: var(--text-muted); max-width: 34ch; margin: 0 0 32px; }
.hero-art { justify-self: center; width: min(360px, 100%); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 0.98rem; text-decoration: none;
  border: 1px solid transparent; transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { color: var(--bg); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { color: var(--text); background: var(--bg-alt); }

@media (max-width: 820px) {
  .hero { padding: 56px 0 48px; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { width: min(240px, 70%); order: -1; }
}

/* ---------- Sections ---------- */

.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { margin-bottom: 36px; }
.section-head h2 {
  font-family: var(--font-display); font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  letter-spacing: -0.02em; line-height: 1.15; margin: 0;
}

@media (max-width: 640px) { .section { padding: 56px 0; } }

/* ---------- Featured game ---------- */

.game-card {
  display: grid; grid-template-columns: 300px 1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px); overflow: hidden; box-shadow: var(--shadow);
}
.game-art {
  background: linear-gradient(160deg, #f7c77f 0%, #e8964a 55%, #c8752a 100%);
  display: flex; align-items: center; justify-content: center; padding: 40px;
  min-height: 280px;
}
.game-art svg { width: 180px; filter: drop-shadow(0 10px 18px rgba(90, 45, 10, 0.3)); }
.game-body { padding: 40px 44px; display: flex; flex-direction: column; justify-content: center; }
.game-tag {
  align-self: flex-start;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-strong); background: var(--accent-soft);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 14px;
}
.game-body h3 {
  font-family: var(--font-display); font-size: 2rem; letter-spacing: -0.02em;
  margin: 0 0 6px; line-height: 1.1;
}
.game-platform { color: var(--text-muted); font-weight: 500; margin: 0 0 16px; }
.game-body p { margin: 0 0 24px; }
.game-links { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 760px) {
  .game-card { grid-template-columns: 1fr; }
  .game-art { min-height: 220px; padding: 32px; }
  .game-art svg { width: 140px; }
  .game-body { padding: 28px 24px 32px; }
}

/* ---------- About ---------- */

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about-grid p { margin: 0 0 16px; color: var(--text-muted); font-size: 1.08rem; }
.about-grid p:last-child { margin-bottom: 0; }
.fact-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.fact-list li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.fact-list span:first-child { color: var(--text-muted); }
.fact-list span:last-child { font-weight: 600; text-align: right; }

@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Document pages (privacy / support / terms) ---------- */

.page-header {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.page-header h1 {
  font-family: var(--font-display); font-size: clamp(2.1rem, 5vw, 3rem);
  letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 12px;
}
.page-header .meta { color: var(--text-muted); margin: 0; }

.doc-layout {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px;
  padding-top: 48px; padding-bottom: 88px;
}
.toc { position: sticky; top: 88px; align-self: start; font-size: 0.9rem; }
.toc h2 {
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin: 0 0 10px;
}
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.toc a {
  display: block; padding: 5px 0 5px 14px; margin-left: -2px;
  color: var(--text-muted); text-decoration: none; border-left: 2px solid transparent;
}
.toc a:hover { color: var(--text); border-left-color: var(--accent); }

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; }
  .toc { position: static; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
}

.prose { max-width: var(--prose); }
.prose h2 {
  font-family: var(--font-display); font-size: 1.45rem; letter-spacing: -0.01em;
  margin: 48px 0 12px; line-height: 1.25; scroll-margin-top: 84px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1rem; margin: 28px 0 8px; scroll-margin-top: 84px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.prose strong { font-weight: 650; }

.callout {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 18px 20px; margin: 0 0 24px;
}
.callout p:last-child { margin-bottom: 0; }

.data-table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 0.95rem; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.data-table th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); background: var(--bg-alt); }
@media (max-width: 640px) {
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table thead { display: none; }
  .data-table tr { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
  .data-table td { border-bottom: 1px solid var(--border); }
  .data-table td:last-child { border-bottom: 0; }
  .data-table td::before {
    content: attr(data-label); display: block;
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 2px;
  }
}

/* Placeholders the owner must replace before/after launch */
.placeholder {
  background: #fff3a8; color: #4a3b00;
  padding: 1px 6px; border-radius: 4px; font-weight: 600;
  border: 1px dashed #c9a800;
}
.placeholder-block {
  border: 2px dashed #c9a800; background: rgba(255, 243, 168, 0.25);
  border-radius: 10px; padding: 16px 18px; margin: 0 0 20px;
}
.placeholder-block p:last-child { margin-bottom: 0; }

/* ---------- Support ---------- */

.contact-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow); padding: 28px; margin: 0 0 40px;
}
.contact-card h2 { margin-top: 0 !important; }
.contact-email { font-size: 1.2rem; font-weight: 600; margin: 4px 0 16px; }

details.faq {
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  margin-bottom: 10px;
}
details.faq summary {
  cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--text-muted); font-weight: 400; }
details.faq[open] summary::after { content: "\2212"; }
details.faq .faq-body { padding: 0 20px 16px; }
details.faq .faq-body > :last-child { margin-bottom: 0; }

/* ---------- 404 ---------- */

.notfound { text-align: center; padding: 120px 0; }
.notfound h1 { font-family: var(--font-display); font-size: 3rem; letter-spacing: -0.03em; margin: 0 0 12px; }
.notfound p { color: var(--text-muted); margin: 0 0 28px; }
.notfound .btn-row { justify-content: center; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom));
  font-size: 0.9rem; color: var(--text-muted);
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand .brand-mark { width: 24px; height: 24px; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 20px; margin: 0; padding: 0; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-legal { width: 100%; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

/* ---------- Featured game: showcase image layout ---------- */

.game-card--showcase { grid-template-columns: 1fr; }
.game-shot { margin: 0; background: #3a2414; }
.game-shot img { width: 100%; height: auto; }
.game-card--showcase .game-body { padding: 32px 40px 36px; }
.game-features {
  list-style: none; margin: 0 0 24px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.game-features li {
  font-size: 0.9rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
  background: var(--bg-alt); border: 1px solid var(--border);
}
@media (max-width: 760px) {
  .game-card--showcase .game-body { padding: 24px 20px 28px; }
}
