/* Desktop Crew home page. Plain CSS, no build step, no web fonts (system fonts only).
   Colours are tokens; light by default, dark when the system asks for it. The site checker
   (distribution/tools/test/site.test.mjs) reads the token pairs below and checks their contrast. */

:root {
  color-scheme: light dark;
  --bg: #fbf6ef;
  --surface: #ffffff;
  --surface-2: #f3ebf8;
  --text: #251c33;
  --muted: #574b68;
  --line: #e4d9ec;
  --accent: #6a3fb5;
  --accent-text: #ffffff;
  --link: #5b2fa6;
  --focus: #b8560a;
  --todo-bg: #fff2c2;
  --todo-text: #5a4300;
  --shadow: 0 1px 2px rgba(37, 28, 51, 0.08), 0 8px 24px rgba(37, 28, 51, 0.08);
  --radius: 18px;
  --max: 1120px;
  --font: ui-rounded, "SF Pro Rounded", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17121f;
    --surface: #221b2e;
    --surface-2: #2b2240;
    --text: #f3eefa;
    --muted: #c3b8d4;
    --line: #3a3050;
    --accent: #b99cff;
    --accent-text: #1b1228;
    --link: #c9b2ff;
    --focus: #ffb35c;
    --todo-bg: #4a3c00;
    --todo-text: #ffe9a3;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow);
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

/* --- header and footer --- */
.site-head { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 8px 0; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 6px 2px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

.site-foot { margin-top: 72px; border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 0.92rem; }
.site-foot nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 0 0 16px; }
.site-foot p { margin: 6px 0; }

/* --- type --- */
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); margin: 0 0 12px; font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.2rem); margin: 0 0 12px; font-weight: 800; }
h3 { font-size: 1.15rem; margin: 0 0 6px; }
.lede { font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: var(--muted); max-width: 46ch; }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }
.hash-line code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; overflow-wrap: anywhere; }

section { padding: 56px 0 8px; }
section > .wrap > p, .prose p, .prose li { max-width: 70ch; }

/* --- hero --- */
.hero { padding-top: 40px; }
.hero .wrap { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1fr 1.15fr; gap: 40px; } }
.hero figure { margin: 0; }
.shot { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--surface-2); }
.shot img { width: 100%; }
figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-top: 20px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
  background: var(--accent); color: var(--accent-text);
}
.button:hover { filter: brightness(1.06); }
.button.secondary { background: transparent; color: var(--text); border-color: var(--line); }
/* A placeholder link (no href yet: the checkout or download doesn't exist). Not focusable, not clickable. */
a.button:not([href]) { cursor: default; background: var(--surface-2); color: var(--muted); border-color: var(--line); filter: none; }

.price-line { font-weight: 700; }
.price-line .tax { font-weight: 400; color: var(--muted); }

/* --- cards and grids --- */
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid.three { grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid.three { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card p { margin: 0; }
.card h3 + p { margin-top: 4px; }

.crew { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); }
@media (min-width: 640px) { .crew { grid-template-columns: repeat(5, 1fr); gap: 12px; } }
.crew li { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 6px 12px; text-align: center; overflow: hidden; }
/* The sprites are the app's own 360x300 frames with room around the pose: zoom in on the crewmate. */
.crew img { width: 100%; max-width: 160px; aspect-ratio: 6 / 5; object-fit: contain; margin: 0 auto 10px; transform: scale(1.6); transform-origin: 50% 82%; }
.crew .name { font-weight: 800; display: block; }
.crew .what { color: var(--muted); font-size: 0.88rem; display: block; }

.worlds { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .worlds { gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); } }
@media (max-width: 639px) { .worlds .meta { padding: 8px 10px 10px; } .worlds .party { font-size: 0.82rem; } }
.worlds li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.worlds img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.worlds .meta { padding: 12px 14px 14px; }
.worlds .month { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); display: block; }
.worlds .build { font-weight: 800; display: block; }
.worlds .party { color: var(--muted); font-size: 0.9rem; display: block; }

.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin-top: 20px; }
.gallery figure { margin: 0; }

.checks { padding-left: 1.2em; }
.checks li { margin: 6px 0; }

/* --- price box --- */
.price-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); max-width: 640px; }
.price-box .amount { font-size: 2.6rem; font-weight: 800; line-height: 1; margin: 0 0 8px; }
.price-box ul { padding-left: 1.2em; }

/* --- tables --- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 480px; background: var(--surface); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); }
caption { text-align: left; color: var(--muted); padding-bottom: 8px; }

/* --- FAQ --- */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; margin: 10px 0; max-width: 820px; }
.faq summary { cursor: pointer; font-weight: 800; padding: 14px 0; min-height: 48px; display: flex; align-items: center; }
.faq details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.faq details > *:last-child { margin-bottom: 16px; }

/* --- inner pages --- */
.page { padding-top: 32px; }
.prose h2 { margin-top: 40px; }
.prose h3 { margin-top: 24px; }
.prose code, kbd { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.92em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.callout { background: var(--surface-2); border-radius: 14px; padding: 16px 18px; max-width: 70ch; }
/* Terms that must stand out from the text around them (the warranty disclaimer and the liability limit). */
.legal-notice { background: var(--surface-2); border: 2px solid var(--text); border-radius: 10px; padding: 14px 18px; max-width: 70ch; font-weight: 600; }
.legal-notice p { margin: 0.4em 0; }

/* Placeholders the owner must fill before publishing (the checker counts them). */
.todo { background: var(--todo-bg); color: var(--todo-text); padding: 0 4px; border-radius: 4px; font-weight: 700; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.spaced { margin-top: 20px; }

/* Tables stack into one block per row on phones; a cell's column name shows from data-label. */
@media (max-width: 639px) {
  table.stack { min-width: 0; }
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  table.stack tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.stack th, table.stack td { display: block; border: 0; padding: 4px 14px; }
  table.stack tbody th { background: transparent; }
  table.stack td[data-label]::before { content: attr(data-label) ": "; font-weight: 700; }
}
