/* Pebblewit: small, clever, calm games.
   Layout: one left-aligned column on a cool river-stone ground; game art sits inside pebble-shaped
   masks (the one bold move); everything else stays quiet. */
@font-face { font-family: "Young Serif"; src: url(/assets/fonts/young-serif.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url(/assets/fonts/atkinson-400.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url(/assets/fonts/atkinson-700.ttf) format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --riverbed: #E5EAE7;   /* page ground: wet grey-green stone */
  --stone: #F2F5F2;      /* raised surfaces */
  --tile: #FAFBF9;
  --edge: #C5CFCB;
  --ink: #1E2A2B;        /* slate */
  --ink-soft: #536160;
  --ink-faint: #76837F;
  --teal: #1F5F5A;       /* river teal: actions and links */
  --teal-ink: #F1F6F4;
  --sand: #D8CFBD; --moss: #AFC1A3; --slate: #9EABAB; --rose: #CDAA9C;  /* pebble tints */
  --moss-band: #B5D3AE; --moss-band-ink: #1F3B23;
  --lake-band: #B3CDE3; --lake-band-ink: #17324A;
  --apricot-band: #F2CBA2; --apricot-band-ink: #4A2C10;
  --display: "Young Serif", Georgia, "Times New Roman", serif;
  --body: "Atkinson Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --riverbed: #111819; --stone: #182224; --tile: #202D30; --edge: #2C3B3E;
    --ink: #E3EAE8; --ink-soft: #A5B2AF; --ink-faint: #7F8C89;
    --teal: #84C6BD; --teal-ink: #0E1F1D;
    --sand: #6E6656; --moss: #4E604A; --slate: #4D5A5B; --rose: #6F5148;
    --moss-band: #3F6447; --moss-band-ink: #E3F2DF;
    --lake-band: #3C5D78; --lake-band-ink: #E2EEF8;
    --apricot-band: #7A5432; --apricot-band-ink: #FBEBDA;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--riverbed); color: var(--ink); font: 400 1.0625rem/1.65 var(--body); }
img { max-width: 100%; height: auto; }
a { color: var(--teal); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 10px; }
.wrap { max-width: 66rem; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.measure { max-width: 40rem; }

/* header */
.top { padding-block: max(20px, env(safe-area-inset-top, 0px)) 8px; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 400 1.55rem/1 var(--display); }
.mark svg { width: 34px; height: 34px; flex: none; }
.top nav { display: flex; gap: 22px; font-weight: 700; font-size: 1rem; }
.top nav a { color: var(--ink); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

/* type */
h1 { font: 400 clamp(2.3rem, 5.6vw, 3.7rem)/1.06 var(--display); letter-spacing: -0.01em; margin: 0 0 18px; text-wrap: balance; }
h2 { font: 400 clamp(1.6rem, 3.2vw, 2.15rem)/1.15 var(--display); margin: 0 0 18px; text-wrap: balance; }
h3 { font: 700 1.12rem/1.35 var(--body); margin: 0 0 6px; }
p { margin: 0 0 14px; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 34rem; }
.soft { color: var(--ink-soft); }
section.band-sec { padding-block: 60px; border-top: 1px solid color-mix(in srgb, var(--edge) 75%, transparent); }

/* buttons */
.btn { display: inline-block; appearance: none; border: 0; border-radius: 999px; background: var(--teal); color: var(--teal-ink); font: 700 1.05rem/1 var(--body); padding: 16px 26px; text-decoration: none; cursor: pointer; }
.btn.quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--edge); }
.btn:disabled { opacity: 0.4; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* pebble-shaped art: each game wears its own stone */
.pebble { border-radius: 47% 53% 44% 56% / 56% 45% 55% 44%; overflow: hidden; background: var(--sand); aspect-ratio: 1 / 1; max-width: 100%; }
.pebble img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pebble.b { border-radius: 55% 45% 52% 48% / 46% 56% 44% 54%; }
@media (prefers-color-scheme: dark) { .pebble img { filter: brightness(0.84); } }

/* game feature row */
.feature { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.facts { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 6px; color: var(--ink-soft); }
.facts li::before { content: ""; display: inline-block; width: 0.55em; height: 0.45em; margin-right: 0.6em; border-radius: 50%; background: var(--moss); vertical-align: 0.08em; }

/* promises */
.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 44px; }
.points p { color: var(--ink-soft); margin: 0; }

/* long-form pages */
.prose { max-width: 40rem; }
.prose h2 { margin-top: 44px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.chapters { columns: 2; column-gap: 40px; padding-left: 1.25em; }
.chapters li { break-inside: avoid; }
dl.faq dt { font-weight: 700; color: var(--ink); margin-top: 18px; }
dl.faq dd { margin: 4px 0 0; color: var(--ink-soft); }

/* footer */
footer { padding-block: 36px max(40px, env(safe-area-inset-bottom, 0px)); color: var(--ink-soft); font-size: 0.95rem; border-top: 1px solid color-mix(in srgb, var(--edge) 75%, transparent); margin-top: 40px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
footer p { margin: 0; }
.email { user-select: all; color: var(--ink); }

@media (max-width: 860px) {
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature .pebble { max-width: 18rem; }
  .points { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .chapters { columns: 1; }
  .top nav { gap: 16px; }
}
