/* ramelu.com app pages (ninefold/, paydirt/, thunk/, teahouse/, glug/): the
   shared bones. Each page adds its own stylesheet (<name>/app.css) that
   dresses these bones in its game's colours, type and materials by setting
   the tokens below and styling its own sections. No scripts; light and dark
   follow the device; fonts are the site's own files in /fonts/. */

:root {
  color-scheme: light dark;
  --measure: 62ch;
  --wrap: 1120px;
  --sys: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body, var(--sys));
  font-size: var(--body-size, 17px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display, var(--body)); }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--page); color: var(--ink); padding: 8px 12px; z-index: 10; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- the stage: header and hero on the game's own ground ---- */

.stage { position: relative; isolation: isolate; overflow: hidden; color: var(--stage-ink); background: var(--stage-bg); }
.stage > .decor { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.stage a:focus-visible, .stage :focus-visible { outline-color: var(--stage-focus, var(--focus)); }

.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; min-height: 68px; flex-wrap: wrap; }
.mark { display: inline-flex; align-items: center; color: var(--stage-ink); text-decoration: none; padding: 6px 0; }
.mark svg { display: block; height: 22px; width: 102px; }
.site-nav { display: flex; gap: 4px 20px; flex-wrap: wrap; font-family: var(--sys); font-size: 15px; }
.site-nav a { color: var(--stage-dim); text-decoration: none; padding: 6px 0; }
.site-nav a:hover { color: var(--stage-ink); }

.hero { display: grid; gap: 40px; align-items: center; padding-top: 32px; }
@media (min-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 48px; padding-top: 40px; }
}
.hero-text { padding-bottom: 8px; }
.app-icon { width: 88px; height: 88px; border-radius: 22.5%; }
.hero h1 { margin: 0; line-height: 1; text-wrap: balance; }
.kind { margin: 0; color: var(--stage-dim); }
.promise { margin: 0; text-wrap: balance; }
.lede { margin: 0; max-width: 46ch; color: var(--stage-dim); }

.stores { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-width: 176px; min-height: 54px; padding: 7px 18px 8px;
  font-family: var(--sys); line-height: 1.2; text-decoration: none;
  color: var(--store-ink); background: var(--store-bg); border: var(--store-border, 0);
  border-radius: var(--store-radius, 12px); box-shadow: var(--store-shadow, none);
}
.store small { font-size: 12px; opacity: 0.8; }
.store b { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.store-note { margin: 12px 0 0; font-family: var(--sys); font-size: 14px; color: var(--stage-dim); }

/* The phone: a short muted clip of the real game (poster only when the
   device asks for reduced motion: the <source> carries that media query). */
.hero-device { display: flex; justify-content: center; }
.device { position: relative; width: min(300px, 74vw); aspect-ratio: 886 / 1920; }
.device video, .device .still { width: 100%; height: 100%; object-fit: cover; background: var(--device-fill, #000); }
.device .still { display: none; }
@media (prefers-reduced-motion: reduce) {
  .device video { display: none; }
  .device .still { display: block; }
}

/* ---- page sections ---- */

main { display: block; }
.section { padding: 72px 0 0; }
@media (min-width: 700px) { .section { padding-top: 104px; } }
.section > .wrap > h2, .section-head h2 { margin: 0; line-height: 1.12; text-wrap: balance; }
.section-head p, .section .intro { margin: 14px 0 0; max-width: var(--measure); color: var(--dim); }

/* Screens: a row that scrolls sideways on phones and fits on a desktop. */
.shots-row {
  display: flex; gap: 16px; margin: 32px 0 0; padding: 4px 16px 20px; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
  overscroll-behavior-x: contain;
}
.shots-row li { flex: 0 0 auto; width: min(58vw, 240px); scroll-snap-align: start; }
.shots-row img { width: 100%; height: auto; aspect-ratio: 1320 / 2868; border-radius: var(--shot-radius, 14px); background: var(--surface); }
@media (min-width: 700px) { .shots-row { padding-left: 32px; padding-right: 32px; scroll-padding: 0 32px; } }
@media (min-width: 1140px) {
  .shots-row { justify-content: center; overflow: visible; max-width: var(--wrap); margin-left: auto; margin-right: auto; }
  .shots-row li { width: calc((var(--wrap) - 64px - 64px) / 5); }
}

/* Questions */
.faq-list { margin: 28px 0 0; max-width: 46rem; }
.faq-list details { border-bottom: 1px solid var(--rule); }
.faq-list details:first-child { border-top: 1px solid var(--rule); }
.faq-list summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 18px 0; cursor: pointer; list-style: none; font-weight: 600; font-size: 1.06em;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; flex: none; font-weight: 400; font-size: 1.4em; line-height: 1; color: var(--dim); }
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list details > p { margin: 0 0 18px; max-width: var(--measure); color: var(--dim); }

/* ---- footer ---- */

.site-foot { border-top: 1px solid var(--rule); margin-top: 96px; padding: 28px 0 40px; color: var(--dim); font-family: var(--sys); font-size: 14px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-foot nav { display: flex; gap: 8px 20px; flex-wrap: wrap; }
.site-foot a { color: var(--dim); }
