/* Dicedrift landing. Tokens mirror docs/BRAND.md (DD* colors), v2: a warm game-night look. */
:root {
  color-scheme: light dark;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface2: #ece8df;
  --table: #e9dfcf;
  --table-edge: #d6c6ab;
  --ink: #1c1f26;
  --muted: #545a66;
  --faint: #666c78;
  --primary: #c2412d;
  --on-primary: #ffffff;
  --p-red: #c2412d;
  --p-blue: #2e66b8;
  --p-yellow: #e0a800;
  --p-green: #2b8250;
  --on-player: #ffffff;
  --on-yellow: #1c1f26;
  --shadow: rgba(28, 31, 38, 0.14);
  --m-party: #b8325a;
  --m-strategy: #2f55a4;
  --m-coop: #23784f;
  --m-word: #7a5500;
  --m-bluff: #6a3fa0;
  --m-family: #b04a12;
  --m-two: #8c1d2f;
  --font-head: "SF Pro Display", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171c;
    --surface: #1f2229;
    --surface2: #2a2e37;
    --table: #3a332b;
    --table-edge: #2b261f;
    --ink: #f1f2f5;
    --muted: #aeb4c0;
    --faint: #8d94a1;
    --primary: #ff7f6b;
    --on-primary: #2a0a05;
    --p-red: #ff7f6b;
    --p-blue: #7ea9f0;
    --p-yellow: #f2c94c;
    --p-green: #62c98e;
    --on-player: #15171c;
    --on-yellow: #15171c;
    --shadow: rgba(0, 0, 0, 0.35);
    --m-party: #ff7fa3;
    --m-strategy: #86a8f0;
    --m-coop: #5fcb91;
    --m-word: #e9b949;
    --m-bluff: #b896f0;
    --m-family: #ff9f66;
    --m-two: #ff8796;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

img, svg { max-width: 100%; }

a { color: var(--primary); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .skip:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-stretch: expanded;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

.wrap { width: 100%; max-width: 66rem; margin: 0 auto; padding: 0 1rem; }

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Pawns: one shape, filled by player color */
.pw-red { fill: var(--p-red); }
.pw-blue { fill: var(--p-blue); }
.pw-yellow { fill: var(--p-yellow); }
.pw-green { fill: var(--p-green); }
.pw-white { fill: var(--on-primary); }
.mark-bg { fill: var(--primary); }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--surface);
  color: var(--ink);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: 0.6rem; }

/* Header */
.top { padding: 0.9rem 0; }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1.25rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-head);
  font-stretch: expanded;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.brand svg { width: 2rem; height: 2rem; flex: none; }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; font-size: 0.95rem; }
.nav a { color: var(--muted); text-decoration: none; padding: 0.35rem 0; font-weight: 600; }
.nav a:hover { color: var(--primary); text-decoration: underline; }

/* Hero: a round wooden table with pawns */
.hero-band { padding: 0 0 0.5rem; }
.hero { padding: 1.5rem 0 0.5rem; }
.hero-copy { position: relative; }
.eyebrow {
  margin: 0 0 0.8rem;
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--surface2);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.hero h1 { font-size: clamp(2.05rem, 9vw, 3.6rem); font-weight: 900; letter-spacing: -0.02em; }
.hero .lede { margin: 1rem 0 0; font-size: 1.15rem; max-width: 34rem; color: var(--muted); }
.hero .avail { margin: 1.25rem 0 0; font-weight: 700; }
.hero-art { display: block; width: 100%; max-width: 28rem; height: auto; margin: 1.5rem auto 0; }
.tbl { fill: var(--table); }
.tbl-edge { fill: var(--table-edge); }
.tbl-ring { fill: none; stroke: var(--table-edge); stroke-width: 2; opacity: 0.55; }
.pw-shadow { fill: var(--shadow); }

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(-12px); }
}
@media (prefers-reduced-motion: no-preference) {
  .drift { animation: drift 4.5s ease-in-out infinite alternate; }
}

/* Sections */
section { padding: 2.75rem 0 0.5rem; }
.sec-head { margin-bottom: 1.25rem; }
.sec-head h2 { font-size: clamp(1.55rem, 6vw, 2.15rem); font-weight: 900; letter-spacing: -0.015em; }
.sec-head p { margin: 0.6rem 0 0; color: var(--muted); max-width: 40rem; }

/* How it works: numbered player-color circles */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.step {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0.9rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: 1rem;
  padding: 1rem;
}
.num {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  font-family: var(--font-head);
  font-stretch: expanded;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--on-player);
}
.num.p1 { background: var(--p-red); }
.num.p2 { background: var(--p-blue); }
.num.p3 { background: var(--p-yellow); color: var(--on-yellow); }
.num.p4 { background: var(--p-green); }
.step h3 { font-size: 1.15rem; font-weight: 800; }
.step p { margin: 0.35rem 0 0; color: var(--muted); }

/* Ready-made nights: game-box tiles */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.card {
  --lid: var(--p-yellow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: 1rem;
  box-shadow: 0 2px 0 var(--surface2);
}
.card::before { content: ""; display: block; height: 0.8rem; background: var(--lid); }
.card.lid-family { --lid: var(--m-family); }
.card.lid-two { --lid: var(--m-two); }
.card.lid-party { --lid: var(--m-party); }
.card.lid-strategy { --lid: var(--m-strategy); }
.card.lid-coop { --lid: var(--m-coop); }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 0.9rem 0.9rem 1rem; }
.card h3 { font-size: 1.08rem; font-weight: 900; letter-spacing: -0.01em; }
.tags { margin: 0.6rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tags li {
  background: var(--surface2);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.card .sub { margin: 0.6rem 0 0.7rem; font-size: 0.9rem; color: var(--muted); line-height: 1.4; }
.moods { margin: auto 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem 0.6rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; }
.moods li::before { content: "● "; font-size: 0.7em; vertical-align: 0.08em; }
.m-party { color: var(--m-party); }
.m-strategy { color: var(--m-strategy); }
.m-coop { color: var(--m-coop); }
.m-word { color: var(--m-word); }
.m-bluff { color: var(--m-bluff); }
.m-family { color: var(--m-family); }
.m-two { color: var(--m-two); }
.m-plain { color: var(--muted); }

/* App screens: a horizontal strip on phones, a row on wide screens */
.screens {
  list-style: none;
  margin: 0;
  padding: 0 0 0.75rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(11rem, 62%);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}
.screens li { scroll-snap-align: start; }
.screens:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; border-radius: 1rem; }
.screens figure { margin: 0; }
.screens img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.4rem;
  border: 1px solid var(--surface2);
  background: var(--surface);
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.08);
}
.screens figcaption { margin: 0.6rem 0 0; font-weight: 700; text-align: center; }

/* Shop block */
.shop {
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: 1.25rem;
  padding: 1.25rem 1rem;
}
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--surface2);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  padding: 0.8rem 1rem;
  border-radius: 0.75rem;
  min-height: 2.75rem;
}
.links a:hover { background: var(--primary); color: var(--on-primary); }
.links a .go { font-weight: 400; }
.shop-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  background: var(--primary);
  color: var(--on-primary);
  text-decoration: none;
  font-weight: 700;
  padding: 0.8rem 1.25rem;
  border-radius: 0.75rem;
  min-height: 2.75rem;
}
.shop-more:hover { filter: brightness(1.08); }
.disclosure { margin: 1rem 0 0; font-size: 1rem; color: var(--muted); font-weight: 600; }
.note { margin: 0.5rem 0 0; font-size: 0.95rem; color: var(--muted); }

/* Good to know: small pawn-colored dots */
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.facts li { padding-left: 1.6rem; position: relative; }
.facts li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.5em;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--p-red);
}
.facts li:nth-child(4n + 2)::before { background: var(--p-blue); }
.facts li:nth-child(4n + 3)::before { background: var(--p-yellow); }
.facts li:nth-child(4n)::before { background: var(--p-green); }

/* Legal and 404 */
.legal { padding: 1.5rem 0 1rem; max-width: 44rem; }
.legal h1 { font-size: clamp(1.8rem, 7.5vw, 2.6rem); font-weight: 900; letter-spacing: -0.02em; }
.legal .meta { color: var(--muted); font-size: 0.9rem; margin: 0.6rem 0 1.5rem; }
.legal h2 { font-size: 1.3rem; font-weight: 800; margin: 2rem 0 0.5rem; }
.legal p, .legal ul { margin: 0.6rem 0; }
.legal ul { padding-left: 1.3rem; }
.legal li { margin: 0.3rem 0; }
.legal .box { background: var(--surface); border: 1px solid var(--surface2); border-radius: 1rem; padding: 0.9rem 1rem; margin: 1rem 0; }
.lost { padding: 3rem 0 1rem; text-align: left; }
.lost svg { width: 3.5rem; height: 5.6rem; transform: rotate(18deg); }
.lost h1 { font-size: clamp(1.8rem, 7.5vw, 2.6rem); font-weight: 900; margin: 1rem 0 0.6rem; }

/* Footer */
.foot { margin-top: 3.5rem; border-top: 1px solid var(--surface2); padding: 1.75rem 0 2.5rem; color: var(--muted); font-size: 0.95rem; }
.foot .row { display: flex; flex-wrap: wrap; gap: 0.3rem 1.25rem; margin: 0 0 0.9rem; }
.foot p { margin: 0.4rem 0; }
.foot .disclosure { font-size: 0.95rem; }

@media (min-width: 40rem) {
  .wrap { padding: 0 1.5rem; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .links { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 2.5rem 0 1rem; }
  .screens { grid-auto-columns: minmax(11rem, 34%); }
}

@media (min-width: 58rem) {
  .hero { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 2rem; padding: 3rem 0 1.5rem; }
  .hero-art { margin: 0; max-width: none; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .step { grid-template-columns: 1fr; }
  .links { grid-template-columns: repeat(3, 1fr); }
  .screens { grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); overflow-x: visible; }
}
