/* ============================================================
   MEEPLEWOOD — The Tabletop Companion
   Warm "board-game café" system: parchment, forest green, terracotta,
   mustard. Slab-serif headings, hard offset shadows, bordered tiles.
   Hand-authored, no framework.
   ============================================================ */

:root {
  --paper:   #f5efe3;
  --paper-2: #efe7d6;
  --paper-3: #e4d8bd;
  --ink:     #2a2620;
  --ink-soft:#5f574a;
  --green:   #2f6b4f;
  --green-dk:#244f3b;
  --rust:    #c15b3c;
  --mustard: #d9a441;
  --line:    #d8cdb8;
  --cream:   #fbf7ee;

  --font-head: "Bitter", Georgia, "Times New Roman", serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --container-max: 78rem;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
}

* { box-sizing: border-box; }

html {
  background-color: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--line) 1.3px, transparent 1.3px);
  background-size: 26px 26px;
}

::selection { background: var(--mustard); color: var(--ink); }

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.08;
  color: var(--ink);
  margin: 0;
}
p { margin: 0; }

/* -------- Layout helpers -------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.4rem;
}
@media (min-width: 768px) { .container { padding-inline: 2.4rem; } }
.container.narrow { max-width: 52rem; }

.h-xl { font-size: clamp(2.5rem, 6vw, 4.4rem); letter-spacing: -0.02em; }
.h-lg { font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -0.015em; }
.h-md { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.01em; }

.kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--rust);
  padding: 0.3rem 0.7rem;
  border: 2px solid var(--ink);
  background: var(--mustard);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.2rem;
}
.kicker--light { color: var(--ink); background: var(--cream); }

.mark {
  background: linear-gradient(180deg, transparent 62%, var(--mustard) 62%);
  padding-inline: 0.1em;
}
.lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 44rem; }
.muted { color: var(--ink-soft); }
.mt-1 { margin-top: 0.5rem; } .mt-3 { margin-top: 1.5rem; }

/* -------- Buttons -------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-solid { background: var(--rust); color: var(--cream); }
.btn-outline { background: var(--cream); color: var(--ink); }
.btn-wide { width: 100%; margin-top: 0.5rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; }

.link-more {
  font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--green-dk); border-bottom: 2px solid var(--mustard); padding-bottom: 2px; white-space: nowrap;
}
.link-more:hover { color: var(--rust); }
.link-more--light { color: var(--cream); border-color: var(--cream); }
.link-more--light:hover { color: var(--mustard); }

/* -------- Top ribbon -------- */
.ribbon {
  background: var(--green-dk);
  color: var(--cream);
  border-bottom: 2px solid var(--ink);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}
.ribbon .container { padding-block: 0.45rem; text-align: center; }

/* -------- Header -------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--cream);
  border-bottom: 3px solid var(--ink);
}
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 78px; }
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand-token {
  display: grid; place-items: center; width: 46px; height: 46px; flex-shrink: 0;
  color: var(--cream); background: var(--green); border: 2px solid var(--ink);
  border-radius: 8px; box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--ink); }
.brand-sub { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--rust); font-weight: 700; margin-top: 2px; }

.head-nav { display: none; align-items: center; gap: 1.6rem; }
.head-nav a {
  font-weight: 600; font-size: 0.9rem; color: var(--ink);
  padding-bottom: 3px; border-bottom: 2px solid transparent; transition: border-color 0.15s ease, color 0.15s ease;
}
.head-nav a:hover { color: var(--rust); border-color: var(--rust); }
.head-cta { display: none; }
@media (min-width: 1040px) {
  .head-nav { display: flex; }
  .head-cta { display: inline-flex; }
}

/* Mobile menu (checkbox, no JS) */
.nav-toggle-input { display: none; }
.nav-burger {
  display: inline-flex; flex-direction: column; gap: 5px; cursor: pointer;
  padding: 9px; border: 2px solid var(--ink); border-radius: 6px; background: var(--paper-2); box-shadow: var(--shadow-sm);
}
.nav-burger span { width: 22px; height: 2px; background: var(--ink); display: block; }
.mobile-menu { display: none; flex-direction: column; gap: 0.2rem; padding: 0.5rem 0 1.2rem; }
.mobile-menu a { padding: 0.7rem 0.4rem; font-weight: 600; border-bottom: 1px solid var(--line); }
.nav-toggle-input:checked ~ .mobile-menu { display: flex; }
@media (min-width: 1040px) { .nav-burger { display: none; } }

/* -------- Hero -------- */
.hero { padding-block: 3.5rem; border-bottom: 3px solid var(--ink); background: var(--paper-2); }
@media (min-width: 768px) { .hero { padding-block: 5.5rem; } }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 920px) { .hero-grid { grid-template-columns: 1.15fr 0.85fr; } }
.hero-copy h1 { margin-block: 0.4rem 1.4rem; }
.hero-art svg { display: block; width: 100%; height: auto; filter: drop-shadow(8px 8px 0 rgba(42, 38, 32, 0.18)); }

.stat-strip { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.4rem; }
.stat-chip {
  display: flex; flex-direction: column; padding: 0.7rem 1rem;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 6px; box-shadow: var(--shadow-sm);
}
.stat-num { font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; color: var(--green-dk); line-height: 1; }
.stat-cap { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); margin-top: 0.3rem; }

/* -------- Bands (sections) -------- */
.band { padding-block: 4rem; }
@media (min-width: 768px) { .band { padding-block: 6rem; } }
.band--paper { background: var(--paper-2); border-block: 3px solid var(--ink); }
.band--green { background: var(--green); color: var(--cream); border-block: 3px solid var(--ink); }
.band--green .lead { color: rgba(251, 247, 238, 0.85); }
.light { color: var(--cream); }

.band-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 2.4rem; }
.band-head h2 { margin-top: 0.3rem; }
.mini-head { font-family: var(--font-head); font-size: 1.15rem; margin-bottom: 0.8rem; }

/* -------- Category tiles -------- */
.tile-row { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .tile-row { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tile-row { grid-template-columns: repeat(4, 1fr); } }
.tile-card {
  display: block; padding: 1.6rem; background: var(--cream);
  border: 2px solid var(--ink); border-radius: 8px; box-shadow: var(--shadow);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.tile-card:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--ink); }
.tile-glyph {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1rem;
  font-size: 1.6rem; color: var(--cream); background: var(--green);
  border: 2px solid var(--ink); border-radius: 8px;
}
.tile-card h3 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.tile-card p { color: var(--ink-soft); font-size: 0.95rem; }

/* -------- Game list rows -------- */
.game-list { display: grid; gap: 1rem; }
.game-row {
  display: grid; grid-template-columns: auto 1fr; gap: 0.6rem 1.2rem; align-items: center;
  padding: 1.2rem 1.4rem; background: var(--cream);
  border: 2px solid var(--ink); border-radius: 8px; box-shadow: var(--shadow-sm);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
@media (min-width: 720px) { .game-row { grid-template-columns: 7rem 1fr auto; } }
.game-row:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow); }
.game-type {
  align-self: start; justify-self: start; font-weight: 700; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink); background: var(--mustard); border: 2px solid var(--ink); border-radius: 4px; padding: 0.25rem 0.6rem;
}
.game-main { display: flex; flex-direction: column; }
.game-name { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; }
.game-tag { color: var(--ink-soft); font-size: 0.92rem; }
.game-meta { display: flex; gap: 1.2rem; font-size: 0.82rem; font-weight: 600; color: var(--green-dk); }

/* -------- Split (copy + list) -------- */
.split { display: grid; gap: 2.4rem; align-items: center; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }

.check-list { list-style: none; counter-reset: c; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.check-list li {
  position: relative; counter-increment: c; padding: 0.9rem 1rem 0.9rem 3rem;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 6px; box-shadow: var(--shadow-sm); font-weight: 600;
}
.check-list li::before {
  content: counter(c); position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; display: grid; place-items: center;
  font-family: var(--font-head); font-size: 0.85rem; color: var(--cream); background: var(--rust);
  border: 2px solid var(--ink); border-radius: 50%;
}

.tick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.tick-list li { position: relative; padding-left: 1.9rem; color: var(--ink); }
.tick-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0; font-weight: 700; color: var(--green);
}

/* -------- Game night cards -------- */
.night-row, .night-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .night-row, .night-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .night-row { grid-template-columns: repeat(4, 1fr); } }
.night-card {
  padding: 1.5rem; background: var(--cream); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 8px; box-shadow: var(--shadow);
}
.night-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.night-card p { color: var(--ink-soft); font-size: 0.92rem; }
.night-meta { display: inline-block; margin-top: 1rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--green-dk); }

.idea-card {
  padding: 1.8rem; background: var(--cream);
  border: 2px solid var(--ink); border-radius: 8px; box-shadow: var(--shadow);
}
.idea-card h2 { font-size: 1.4rem; margin-bottom: 0.6rem; }
.idea-card p { color: var(--ink-soft); }

/* -------- CTA box -------- */
.cta-box {
  display: grid; gap: 1.6rem; align-items: center; padding: 2.4rem;
  background: var(--mustard); border: 3px solid var(--ink); border-radius: 10px; box-shadow: var(--shadow);
}
@media (min-width: 820px) { .cta-box { grid-template-columns: 1.5fr 1fr; padding: 3rem; } }
.cta-box .lead { color: var(--ink); }
.cta-box .btn-row { margin-top: 0; }

/* -------- Page head (interior) -------- */
.page-head { padding-block: 3.5rem; background: var(--paper-2); border-bottom: 3px solid var(--ink); }
@media (min-width: 768px) { .page-head { padding-block: 5rem; } }
.page-head h1 { margin-block: 0.3rem 1.2rem; }

/* -------- Catalog cards -------- */
.catalog { display: grid; gap: 1.6rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .catalog { grid-template-columns: repeat(2, 1fr); } }
.cat-card {
  display: flex; flex-direction: column; padding: 1.8rem;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 8px; box-shadow: var(--shadow);
}
.cat-top { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-bottom: 1rem; }
.cat-complexity { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--green-dk); }
.cat-card h2 { font-size: 1.6rem; }
.cat-tag { color: var(--rust); font-weight: 700; margin-top: 0.3rem; }
.cat-desc { color: var(--ink-soft); margin-top: 0.8rem; }
.cat-facts { display: flex; flex-wrap: wrap; gap: 1.4rem; margin: 1.4rem 0 0; padding-top: 1.2rem; border-top: 2px dashed var(--line); }
.cat-facts div { display: flex; flex-direction: column; }
.cat-facts dt { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-soft); }
.cat-facts dd { margin: 0; font-weight: 700; font-family: var(--font-head); }

/* -------- Category stack -------- */
.cat-stack { display: grid; gap: 1.8rem; }
.type-block {
  display: grid; gap: 1.6rem; padding: 2rem;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 8px; box-shadow: var(--shadow);
}
@media (min-width: 800px) { .type-block { grid-template-columns: 0.8fr 1.2fr; } }
.type-mark h2 { font-size: 1.7rem; margin-top: 0.8rem; }
.type-body { border-left: 3px solid var(--paper-3); padding-left: 1.6rem; }
@media (max-width: 799px) { .type-body { border-left: 0; padding-left: 0; border-top: 3px solid var(--paper-3); padding-top: 1.4rem; } }

/* -------- Guides -------- */
.guide-stack { display: grid; gap: 1.8rem; }
.guide-block {
  display: grid; gap: 1.8rem; padding: 2rem;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 8px; box-shadow: var(--shadow);
}
@media (min-width: 820px) { .guide-block { grid-template-columns: 1fr 1.2fr; align-items: start; } }

/* -------- Glossary -------- */
.term-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .term-grid { grid-template-columns: repeat(2, 1fr); } }
.term-card {
  padding: 1.5rem; background: var(--cream); border: 2px solid var(--ink); border-radius: 8px; box-shadow: var(--shadow-sm);
  border-left: 8px solid var(--green);
}
.term-card h2 { font-size: 1.25rem; color: var(--green-dk); margin-bottom: 0.4rem; }
.term-card p { color: var(--ink-soft); font-size: 0.95rem; }

/* -------- Contact / forms -------- */
.contact-list { display: grid; gap: 1.3rem; margin: 1.5rem 0 0; }
.contact-list div { display: flex; flex-direction: column; }
.contact-list dt { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--rust); font-weight: 700; }
.contact-list dd { margin: 0.2rem 0 0; font-weight: 600; }
.form-box {
  padding: 1.8rem; background: var(--cream);
  border: 2px solid var(--ink); border-radius: 8px; box-shadow: var(--shadow);
}
.field { display: grid; margin-bottom: 1.1rem; }
.field label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; color: var(--ink-soft); margin-bottom: 0.4rem; }
.req { color: var(--rust); margin-left: 3px; }
.input, .textarea {
  width: 100%; font-family: var(--font-body); font-size: 0.95rem; color: var(--ink);
  background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; padding: 0.7rem 0.9rem; outline: none;
  transition: box-shadow 0.12s ease;
}
.textarea { resize: vertical; }
.input:focus, .textarea:focus { box-shadow: var(--shadow-sm); }
.form-done {
  display: flex; gap: 1rem; align-items: flex-start; padding: 2rem;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 8px; box-shadow: var(--shadow);
}
.form-done[hidden] { display: none; }
.tick-badge {
  display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0;
  color: var(--cream); background: var(--green); border: 2px solid var(--ink); border-radius: 50%; font-size: 1.3rem;
}

/* -------- FAQ -------- */
.faq-group { margin-bottom: 2.6rem; }
.faq-item {
  background: var(--cream); border: 2px solid var(--ink); border-radius: 8px; box-shadow: var(--shadow-sm);
  margin-bottom: 0.9rem;
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: 1.1rem 1.3rem; display: flex; justify-content: space-between; gap: 1.2rem;
  font-family: var(--font-head); font-weight: 600; font-size: 1.08rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--rust); font-weight: 700; font-size: 1.4rem; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 1.3rem 1.2rem; color: var(--ink-soft); }

/* -------- Prose (legal) -------- */
.prose { max-width: 48rem; }
.prose h2 { font-size: 1.4rem; margin-top: 2.2rem; margin-bottom: 0.7rem; }
.prose p { margin-bottom: 1rem; color: var(--ink-soft); }
.prose a { color: var(--green-dk); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

/* -------- Footer -------- */
.site-foot { background: var(--ink); color: var(--paper); border-top: 3px solid var(--ink); }
.foot-grid { display: grid; gap: 2.2rem; padding-block: 3.4rem; }
@media (min-width: 820px) { .foot-grid { grid-template-columns: 1.7fr repeat(4, 1fr); } }
.foot-brand .brand-name { color: var(--cream); }
.foot-brand .brand-token { background: var(--rust); }
.foot-brand p { margin-top: 1rem; color: rgba(245, 239, 227, 0.7); max-width: 22rem; font-size: 0.92rem; }
.foot-socials { display: flex; flex-wrap: wrap; gap: 0.6rem 1.1rem; margin-top: 1.2rem; }
.foot-socials a { font-size: 0.82rem; font-weight: 600; color: var(--mustard); border-bottom: 2px solid transparent; }
.foot-socials a:hover { border-color: var(--mustard); }
.foot-col h4 { font-family: var(--font-body); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--mustard); margin-bottom: 1rem; }
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin-bottom: 0.6rem; }
.foot-col li a { font-size: 0.9rem; color: rgba(245, 239, 227, 0.78); }
.foot-col li a:hover { color: var(--cream); }
.foot-base {
  display: flex; flex-direction: column; gap: 0.6rem; padding-block: 1.6rem;
  border-top: 1px solid rgba(245, 239, 227, 0.18); font-size: 0.8rem; color: rgba(245, 239, 227, 0.55);
}
@media (min-width: 768px) { .foot-base { flex-direction: row; justify-content: space-between; align-items: center; } }

/* -------- Skip link + reveal -------- */
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--rust); color: var(--cream); padding: 0.6rem 1rem; border: 2px solid var(--ink); border-radius: 6px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .btn:hover, .tile-card:hover, .game-row:hover { transform: none; }
}
