/* God Rush public site. One stylesheet for all three pages, no build step.
   Colours come from the game's UI theme (client/assets/scripts/bog/UITheme.ts, docs/design/ui-theme.md):
   dark-walnut frame, warm parchment interior, vermilion-orange actions, brass trim.
   Two text colours were deepened for WCAG AA on parchment: links #A3410F (5.48:1) and the button face
   #B84A16 (cream text 4.97:1). The game's #E06224 is kept for the large outlined title only. */

:root {
  color-scheme: light; /* the game's UI is light parchment everywhere; the site matches it */

  --walnut: #5a3822;        /* dialog frame */
  --walnut-deep: #3a2315;   /* footer / header plank */
  --walnut-edge: #3d2414;   /* thin outer contour */
  --brass: #c89b54;         /* inner trim on walnut */
  --parchment: #f7eedb;     /* page interior */
  --linen: #fdf8ec;         /* rows and cards */
  --sandstone: #eae0c8;     /* recessed wells */
  --ink: #3a2412;           /* titles and body text */
  --ink-soft: #73583d;      /* secondary text (5.7:1 on parchment) */
  --cream: #fff9ee;         /* text on walnut */
  --cream-soft: #d8c6ac;    /* secondary text on walnut (8.8:1) */
  --orange: #e06224;        /* game primary, large outlined title only */
  --action: #b84a16;        /* button face */
  --action-hover: #9c3d10;
  --link: #a3410f;
  --amber: #e8a23b;         /* focus ring on walnut */
  --seam: rgb(115 88 61 / 0.2);

  --display: "Arial Rounded MT Bold", ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--parchment);
  color: var(--ink);
  font: 1rem/1.6 var(--body);
}

main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

a, button, summary { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--walnut-deep);
  color: var(--cream);
  border-radius: 6px;
}
.skip:focus { top: 12px; }

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

/* ---------- Header: one walnut plank with brass trim, like the top of a game dialog ---------- */

.site-head {
  background: var(--walnut);
  border-bottom: 3px solid var(--walnut-edge);
  box-shadow: inset 0 -1px 0 var(--brass);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--cream);
  text-decoration: none;
  font: 700 1.25rem/1 var(--display);
}
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-head nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.site-head nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--cream);
  text-decoration: none;
  font-weight: 600;
}
.site-head nav a:hover { background: rgb(255 249 238 / 0.12); }
.site-head nav a:active { background: rgb(255 249 238 / 0.2); }
.site-head nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--amber); }
.site-head :focus-visible, .site-foot :focus-visible { outline-color: var(--amber); }

/* ---------- Footer: the deep walnut footer bar of the game's dialogs ---------- */

.site-foot {
  margin-top: 56px;
  background: var(--walnut-deep);
  color: var(--cream-soft);
  border-top: 1px solid var(--brass);
  font-size: 0.9375rem;
}
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.site-foot p { margin: 0; }
.site-foot ul { display: flex; flex-wrap: wrap; gap: 0 8px; margin: 0; padding: 0; list-style: none; }
.site-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  color: var(--cream);
}

/* ---------- Home: hero + the first six ---------- */

.hero {
  display: grid;
  gap: 32px;
  padding: 32px 0 8px;
}
.hero-icon { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 3px 0 var(--walnut-edge); }
.title {
  margin: 16px 0 4px;
  font: 700 clamp(2.75rem, 11vw, 4.5rem)/1 var(--display);
  color: var(--orange);
  -webkit-text-stroke: 0.09em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 0.05em 0 rgb(58 36 18 / 0.45);
}
.tagline {
  margin: 0 0 16px;
  font: 700 clamp(1.25rem, 4.5vw, 1.625rem)/1.25 var(--display);
  color: var(--ink);
}
.lede { margin: 0 0 24px; max-width: 34em; font-size: 1.0625rem; }

/* Store placeholders: not links yet, so they are labelled and do not look pressable. */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.store {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1 1 140px;
  max-width: 200px;
  min-height: 56px;
  padding: 8px 16px;
  border: 2px dashed rgb(115 88 61 / 0.55);
  border-radius: 10px;
  background: var(--linen);
  line-height: 1.25;
}
.store strong { font: 700 1.0625rem/1.25 var(--display); }
.store span { font-size: 0.875rem; color: var(--ink-soft); }

/* The framed panel: walnut frame, brass trim, parchment inside, a plaque that sits on the top edge. */
.panel {
  position: relative;
  margin-top: 22px;
  padding: 40px 16px 20px;
  background: var(--linen);
  border: 10px solid var(--walnut);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--brass), 0 4px 0 var(--walnut-edge);
}
.plaque {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 20px;
  white-space: nowrap;
  background: #52321e;
  color: var(--cream);
  border: 1px solid var(--brass);
  border-radius: 8px;
  font: 700 1.125rem/1.2 var(--display);
}

.gods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.god { text-align: center; }
.god .cell {
  aspect-ratio: 1;
  padding: 5px;
  background: #624228;
  border: 3px solid #4a3220;
  border-radius: 12px;
}
.god img { width: 100%; height: 100%; border-radius: 7px; }
.god-name { display: block; margin-top: 6px; font: 700 1rem/1.2 var(--display); }
.god-myth { display: block; font-size: 0.875rem; color: var(--ink-soft); }

.note {
  margin-top: 40px;
  padding: 20px;
  background: var(--sandstone);
  border-radius: 12px;
}
.note h2 { margin: 0 0 6px; font: 700 1.25rem/1.3 var(--display); }
.note p { margin: 0 0 8px; }
.note p:last-child { margin-bottom: 0; }

@media (min-width: 560px) {
  .gods { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
}

@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 48px; padding-top: 56px; }
  .gods { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 18px; }
  .panel { padding: 44px 24px 24px; }
  .note { display: grid; grid-template-columns: 1fr 1.6fr; gap: 24px; padding: 28px 32px; }
}

/* ---------- Document pages: support and privacy ---------- */

.doc { max-width: 760px; padding-top: 32px; }
.doc h1 { margin: 0 0 4px; font: 700 clamp(2rem, 7vw, 2.75rem)/1.1 var(--display); }
.doc .meta { margin: 0 0 24px; color: var(--ink-soft); }
.doc h2 { margin: 40px 0 10px; font: 700 1.375rem/1.3 var(--display); scroll-margin-top: 16px; }
.doc h3 { margin: 24px 0 6px; font-size: 1.0625rem; }
.doc p, .doc li { max-width: 68ch; }
.doc ul, .doc ol { padding-left: 1.4em; }
.doc li { margin: 6px 0; }
.doc code { font-size: 0.92em; background: var(--sandstone); padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere; }

.toc {
  margin: 0 0 8px;
  padding: 16px 20px;
  background: var(--linen);
  border: 1px solid var(--seam);
  border-radius: 12px;
}
.toc h2 { margin: 0 0 6px; font-size: 1rem; font-family: var(--body); }
.toc ol { margin: 0; columns: 1; }
.toc li { margin: 0; }
.toc a { display: inline-block; padding: 6px 0; }
@media (min-width: 640px) { .toc ol { columns: 2; column-gap: 32px; } }

/* Contact card on the support page: the one place with a real primary action. */
.contact {
  margin: 8px 0 0;
  padding: 20px;
  background: var(--linen);
  border: 1px solid var(--seam);
  border-radius: 14px;
}
.contact p { margin: 0 0 12px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  background: var(--action);
  color: var(--cream);
  border-radius: 12px;
  box-shadow: 0 3px 0 #7a300b;
  font: 700 1.0625rem/1 var(--display);
  text-decoration: none;
}
.button:hover { background: var(--action-hover); text-decoration: none; }
.button:active { transform: translateY(2px); box-shadow: 0 1px 0 #7a300b; }
.address { font-weight: 600; overflow-wrap: anywhere; }

.faq details {
  margin: 0 0 10px;
  background: var(--linen);
  border: 1px solid var(--seam);
  border-radius: 12px;
}
.faq summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 16px;
  font-weight: 700;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+";
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--walnut);
  color: var(--cream);
  font: 700 1rem/1 var(--display);
}
.faq details[open] summary::before { content: "\2212"; }
.faq summary:hover { background: rgb(234 224 200 / 0.6); border-radius: 12px; }
.faq .answer { padding: 0 16px 14px 52px; }
.faq .answer p { margin: 0 0 8px; }

.steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.steps li {
  position: relative;
  padding: 2px 0 2px 44px;
  margin: 12px 0;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--walnut);
  color: var(--cream);
  font: 700 0.95rem/1 var(--display);
}

/* Data tables: real tables on wide screens, stacked rows on phones. */
.data { width: 100%; border-collapse: collapse; margin: 12px 0 8px; font-size: 0.9375rem; }
.data th, .data td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--seam); }
.data thead th { background: var(--walnut); color: var(--cream); font-weight: 700; }
.data thead th:first-child { border-top-left-radius: 8px; }
.data thead th:last-child { border-top-right-radius: 8px; }
.data tbody tr:nth-child(odd) { background: var(--linen); }
@media (max-width: 639px) {
  .data thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data, .data tbody, .data tr, .data td { display: block; width: 100%; }
  .data tr { margin: 0 0 12px; border: 1px solid var(--seam); border-radius: 10px; background: var(--linen) !important; }
  .data td { border: 0; padding: 4px 14px; }
  .data td:first-child { padding-top: 12px; font-weight: 700; }
  .data td:last-child { padding-bottom: 12px; }
  .data td[data-label]:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ink-soft);
  }
}

/* TODO(you) markers: loud on purpose so none reaches the live site unnoticed. */
.todo {
  background: #ffe08a;
  color: #3a2412;
  padding: 0 4px;
  border-radius: 3px;
  font-weight: 700;
}

.back { margin-top: 32px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .button:active { transform: none; }
}
