/* Animal Mahjong site stylesheet.
   One file, no remote fonts, no remote images, system fonts. Built for older readers:
   body text is 20px, links and buttons are at least 48px tall, and the layout holds at 320px.
   Light is the default; a phone set to dark gets a deep teal (never black) set of the same colours.
   Contrast (WCAG AA, light): text on cream 13.9:1, teal on cream 6.8:1, rust on cream 6.2:1.
   Motion: there is none. */

:root {
  color-scheme: light dark;
  --ground: #fff6e5;
  --ground-alt: #f6e7cc;
  --card: #fffdf6;
  --line: #d9c49a;
  --text: #2a2622;
  --dim: #5a5249;
  --accent: #1b5e6b;
  --accent-hover: #134853;
  --on-accent: #ffffff;
  --rust: #9a3f00;
  --gold: #f2b705;
  --tile: #fffdf6;
  --tile-lip: #b9a77f;
  --tile-line: #2a2622;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #17262b;
    --ground-alt: #1e3238;
    --card: #223940;
    --line: #3f5d66;
    --text: #f5efe2;
    --dim: #c9d4d2;
    --accent: #8fd3de;
    --accent-hover: #b6e5ec;
    --on-accent: #10242a;
    --rust: #f2b27a;
    --tile: #f4efe2;
    --tile-lip: #8c8369;
    --tile-line: #2a2622;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--text);
  font-family: var(--body); font-size: 1.25rem; line-height: 1.7;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: .5em; }
code { font-size: .95em; overflow-wrap: anywhere; }

.skip {
  position: absolute; left: 16px; top: -80px; z-index: 20;
  background: var(--gold); color: #2a2622; font-weight: 800;
  padding: 12px 18px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 780px; }

/* header */
.site-header { background: var(--card); border-bottom: 3px solid var(--line); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 16px; padding-top: 6px; padding-bottom: 6px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px; min-height: 52px;
  font-family: var(--display); font-weight: 700; font-size: 1.4rem; color: var(--text); text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand-mark { width: 36px; height: 36px; flex: none; background: url("/img/favicon.svg") center / contain no-repeat; }
.nav { display: flex; flex-wrap: wrap; gap: 0 4px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 14px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.1rem;
}
.nav a:hover { text-decoration: underline; }
.nav a[aria-current="page"] { box-shadow: inset 0 -4px 0 var(--rust); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 56px;
  padding: 0 28px; border-radius: 14px; font-weight: 800; font-size: 1.2rem;
  text-decoration: none; border: 3px solid var(--accent); background: var(--accent); color: var(--on-accent);
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }

/* "Not yet released" note: plain text, not a link, so nobody taps a button that goes nowhere */
.soon {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  padding: 14px 20px; border: 3px dashed var(--rust); border-radius: 14px;
  background: var(--card); font-weight: 700; margin: 0;
}
.soon-tag {
  background: var(--rust); color: var(--ground); font-weight: 800; font-size: .85rem;
  letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 6px;
}
.cta-note, .note { color: var(--dim); font-size: 1.05rem; margin: 12px 0 0; }

/* hero */
.hero { padding: 40px 0 48px; background: var(--ground-alt); border-bottom: 3px solid var(--line); }
.hero .wrap { display: grid; gap: 32px; }
.eyebrow { color: var(--rust); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .95rem; margin: 0 0 10px; }
h1 {
  font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 11vw, 4.6rem);
  line-height: 1.05; margin: 0 0 .3em; color: var(--text);
}
.tagline { font-family: var(--display); font-style: italic; font-size: clamp(1.4rem, 5vw, 2rem); color: var(--accent); margin: 0 0 18px; }
.lede { font-size: 1.35rem; max-width: 32em; }

/* tiles drawn as inline SVG */
.hero-tiles, .strip { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero-tiles li { width: min(30%, 150px); margin: 0; }
.strip { margin-top: 28px; }
.strip li { width: min(30%, 110px); margin: 0; }
.tile-art { display: block; width: 100%; }
.t-lip { fill: var(--tile-lip); }
.t-face { fill: var(--tile); stroke: var(--tile-line); stroke-width: 3; }
.eye { fill: #2a2622; }
.nose, .line { fill: none; }
.nose { fill: #2a2622; }
.line { stroke: #2a2622; stroke-width: 3; stroke-linecap: round; }
.a-cat path, .a-cat circle { fill: #c9772b; }
.a-duck circle, .a-duck path { fill: #f2c230; }
.a-beak { fill: #d9641e; }
.a-owl ellipse, .a-owl path { fill: #8a6a4a; }
.a-ring { fill: #fffdf6; stroke: #2a2622; stroke-width: 2; }
.a-frog ellipse, .a-frog circle { fill: #4f9a54; }
.a-sheep circle { fill: #e9e4d8; stroke: #2a2622; stroke-width: 2; }
.a-face { fill: #3d3a36; }
.a-sheep ~ .eye { fill: #fffdf6; }
.a-bear circle { fill: #7a4f32; }
.a-bear ~ .a-face { fill: #d9b38c; }

/* sections */
section.block { padding: 52px 0; }
section.block.alt { background: var(--ground-alt); border-block: 3px solid var(--line); }
h2.section-title { font-family: var(--display); font-size: clamp(1.8rem, 6.5vw, 2.6rem); line-height: 1.15; margin: 0 0 .6em; }
h2.section-title::after { content: ""; display: block; width: 96px; height: 6px; margin-top: 12px; border-radius: 3px; background: var(--rust); }

.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.card { background: var(--card); border: 3px solid var(--line); border-radius: 16px; padding: 24px 22px; }
.card h3 { font-family: var(--display); font-size: 1.5rem; line-height: 1.25; margin: 0 0 .45em; }
.card p:last-child { margin-bottom: 0; }

.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 16px; }
.steps li {
  counter-increment: step; background: var(--card); border: 3px solid var(--line);
  border-radius: 16px; padding: 18px 18px 18px 74px; position: relative; margin: 0;
}
.steps li::before {
  content: counter(step); position: absolute; left: 16px; top: 16px; width: 44px; height: 44px;
  border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 1.3rem;
  display: grid; place-items: center;
}
.steps strong { display: block; font-size: 1.3rem; }

/* legal and support */
.page-head { background: var(--ground-alt); padding: 36px 0 26px; border-bottom: 3px solid var(--line); }
.page-head h1 { font-size: clamp(2.2rem, 9vw, 3.2rem); margin: 0 0 8px; }
.page-head .meta { color: var(--dim); margin: 0; }
.prose { padding: 34px 16px 60px; }
.prose h2 { font-family: var(--display); font-size: 1.7rem; line-height: 1.25; margin: 1.8em 0 .5em; color: var(--rust); }
.prose h2:first-child { margin-top: 0; }
.prose address, address { font-style: normal; }
.prose address { background: var(--card); border: 3px solid var(--line); border-radius: 16px; padding: 16px 20px; margin: 0 0 1em; }
.callout { background: var(--card); border-left: 8px solid var(--accent); border-radius: 0 16px 16px 0; padding: 18px 20px; margin: 0 0 1.4em; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.toc { background: var(--card); border: 3px solid var(--line); border-radius: 16px; padding: 16px 20px 6px; margin: 0 0 1.6em; }
.toc a { display: inline-block; padding: 4px 0; }
.switchable { border: 3px dashed var(--rust); border-radius: 16px; padding: 22px 20px; margin: 2em 0; background: var(--card); }
.switchable h2 { margin-top: 0; }
.switchable .status { background: var(--ground-alt); border-radius: 10px; padding: 12px 16px; }

.faq details { background: var(--card); border: 3px solid var(--line); border-radius: 16px; margin: 0 0 14px; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 700; min-height: 56px; font-size: 1.2rem; }
.faq details > :not(summary) { padding: 0 20px; }
.faq details > p:last-child { padding-bottom: 8px; }

/* footer */
.site-footer { background: var(--card); border-top: 3px solid var(--line); padding: 34px 0 44px; color: var(--dim); font-size: 1.1rem; }
.site-footer .cols { display: grid; gap: 24px; }
.site-footer h2 { font-size: .95rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text); margin: 0 0 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0; }
.site-footer li a { display: inline-block; padding: 8px 0; }
.site-footer address { font-style: normal; }
.fine { margin: 26px 0 0; font-size: 1rem; line-height: 1.55; }

/* 404 */
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 40px 16px; }
.lost .big { font-family: var(--display); font-size: clamp(4rem, 22vw, 9rem); line-height: 1; margin: 0; color: var(--rust); }

@media (min-width: 720px) {
  .hero { padding: 68px 0 76px; }
  .hero .wrap { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 48px; }
  .site-footer .cols { grid-template-columns: 1.4fr 1fr 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { padding: 74px 18px 18px; }
  .steps li::before { left: 18px; top: 18px; }
}

@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  .site-header, .site-footer .cols, .skip { display: none; }
  .page-head { background: none; border: 0; }
  a, .prose h2 { color: #000; }
  .switchable, .callout, .toc, .prose address { background: none; border-color: #000; color: #000; }
}
