/* Goup Climbs — site styles. No framework, no build step. The pages are built
   by lib/render.js from what the admin publishes; this file is static.

   The site runs no script and allows no inline style (its CSP is
   default-src 'none'; style-src 'self'; img-src 'self'), so every look is a
   class here, and every picture is a file in /assets/. The admin's preview
   inlines this file into its frame, so what it shows is this. */

:root {
  --bg: #0a0f1f;          /* the game's night sky */
  --bg-2: #0d1429;        /* header and footer */
  --panel: #121a36;
  --panel-2: #172144;
  --line: #222d52;
  --line-2: #33427a;
  --text: #eef2fb;
  --body: #c6d0e8;
  --muted: #8e9bc2;
  --gold: #ffd76a;        /* the logo's letters */
  --gold-2: #ffe7a6;
  --green: #8ee36b;       /* Goup */
  --warn: #ffb38a;
  --radius: 14px;
  --measure: 70ch;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 50% -120px, #18234a 0%, rgba(24, 35, 74, 0) 70%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font: 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 44px 24px 88px; }
img { max-width: 100%; height: auto; }
a { color: var(--gold); text-decoration-color: rgba(255, 215, 106, .45); text-underline-offset: 3px; }
a:hover { color: var(--gold-2); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
::selection { background: #3b4a86; color: #fff; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 50;
  background: var(--gold); color: #1a1405; padding: 8px 14px; border-radius: 8px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ header */
header.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(13, 20, 41, .86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar {
  max-width: 1080px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; margin-right: auto;
  color: var(--text); text-decoration: none;
  font-weight: 800; font-size: 17px; letter-spacing: .01em;
}
.brand img {
  width: 32px; height: 32px; border-radius: 8px; image-rendering: pixelated;
  box-shadow: 0 0 0 1px var(--line-2);
}
.brand:hover { color: #fff; }
.nav-wide { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-wide a {
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 550;
  padding: 6px 12px; border-radius: 999px; transition: color .15s, background .15s;
}
.nav-wide a:hover { color: var(--text); background: var(--panel); }
.nav-wide a[aria-current="page"] { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }

/* The phone's menu: an icon that opens a panel under the header. */
.nav-menu { display: none; }
.nav-menu summary {
  list-style: none; cursor: pointer; width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--line-2);
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary:hover { background: var(--panel-2); }
.burger { position: relative; width: 20px; height: 14px; display: block; }
.burger i {
  position: absolute; left: 0; width: 20px; height: 2px; border-radius: 2px; background: var(--text);
  transition: transform .2s, opacity .2s, top .2s;
}
.burger i:nth-child(1) { top: 0; }
.burger i:nth-child(2) { top: 6px; }
.burger i:nth-child(3) { top: 12px; }
.nav-menu[open] .burger i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-menu[open] .burger i:nth-child(2) { opacity: 0; }
.nav-menu[open] .burger i:nth-child(3) { top: 6px; transform: rotate(-45deg); }
.nav-menu nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 40px rgba(0, 0, 0, .45);
  padding: 8px 12px 14px; display: flex; flex-direction: column;
}
.nav-menu nav a {
  display: flex; align-items: center; min-height: 50px; padding: 0 14px; border-radius: 12px;
  color: var(--body); text-decoration: none; font-size: 17px; font-weight: 600;
}
.nav-menu nav a + a { border-top: 1px solid var(--line); border-radius: 0; }
.nav-menu nav a:hover { color: var(--text); background: var(--panel); border-radius: 12px; }
.nav-menu nav a[aria-current="page"] { color: var(--gold); }
.nav-menu nav a[aria-current="page"]::after { content: ""; width: 8px; height: 8px; margin-left: auto; background: var(--gold); }

/* ------------------------------------------------------------------ type */
h1 { font-size: 40px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 8px; font-weight: 800; text-wrap: balance; }
h2 { font-size: 23px; line-height: 1.3; letter-spacing: -.01em; margin: 44px 0 12px; font-weight: 750; text-wrap: balance; scroll-margin-top: 90px; }
h3 { font-size: 18px; line-height: 1.4; margin: 28px 0 8px; font-weight: 700; scroll-margin-top: 90px; }
p, li { color: var(--body); }
p { margin: 0 0 14px; }
strong { color: var(--text); font-weight: 700; }
ul, ol { padding-left: 22px; margin: 0 0 16px; }
li { margin: 6px 0; }
li::marker { color: var(--gold); }
code {
  font: 14px/1.4 var(--mono); background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px;
}
.updated { color: var(--muted); font-size: 15px; margin: 0; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  font-weight: 700; font-size: 15px; text-decoration: none;
  color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2);
  transition: transform .12s, background .15s, border-color .15s;
}
.btn:hover { color: #fff; border-color: var(--muted); transform: translateY(-1px); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #1a1405; }
.btn.primary:hover { background: var(--gold-2); border-color: var(--gold-2); color: #1a1405; }
.btn.ghost { background: transparent; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 24px; margin: 24px 0;
}
.card > :last-child { margin-bottom: 0; }
.card.lead {
  background: linear-gradient(160deg, #1a2550 0%, var(--panel) 60%);
  border-color: var(--line-2);
}
.card.lead p { color: #dfe6f7; font-size: 18px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
/* The home page's note of a page that changed lately. */
.card.notice {
  background: #221c0e; border-color: #6e5a26; padding: 14px 20px;
}
.card.notice p { color: #f4e4b8; margin: 3px 0; font-size: 15px; }
/* A setting nobody has filled in yet - the admin's to-do, visible on purpose. */
.todo {
  display: inline-block; background: rgba(255, 179, 138, .1); color: var(--warn);
  border: 1px dashed rgba(255, 179, 138, .5); border-radius: 6px;
  padding: 0 7px; font-size: .88em; font-weight: 600; line-height: 1.6;
}
.note { color: var(--muted); font-size: 15px; }

/* ------------------------------------------------------------------ tables */
.wrap { overflow-x: auto; margin: 18px 0 22px; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { color: var(--text); font-weight: 700; background: var(--panel-2); white-space: nowrap; }
td { color: var(--body); }
tr:nth-child(even) td { background: rgba(18, 26, 54, .55); }

/* ------------------------------------------------------------------ home */
.hero { text-align: center; }
.hero-art {
  display: block; width: 100%; max-width: 1024px; margin: 0 auto;
  border-radius: 20px; image-rendering: pixelated;
  box-shadow: 0 0 0 1px var(--line-2), 0 24px 60px rgba(0, 0, 0, .45);
}
.hero-text { max-width: 640px; margin: 36px auto 0; }
.hero-text h1 { font-size: 48px; }
.hero-text .updated { font-size: 19px; color: var(--body); }
.hero .actions { justify-content: center; }

.shots {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px 4px 18px; margin: 48px 0 8px; justify-content: safe center;
}
.shots img {
  flex: none; width: 200px; aspect-ratio: 9 / 16; object-fit: cover;
  border-radius: 22px; image-rendering: pixelated; scroll-snap-align: center;
  border: 6px solid #05070f; box-shadow: 0 0 0 1px var(--line-2), 0 16px 40px rgba(0, 0, 0, .4);
}

.home-body { max-width: 860px; margin: 0 auto; }
.home-body .card.lead { text-align: center; }
.home-body h2 { text-align: center; margin-top: 56px; }
.home-body ul {
  list-style: none; padding: 0; margin: 20px 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px;
}
/* Two or four cards sit two by two, so none is left alone on a row. */
.home-body ul:has(> li:nth-child(2):last-child),
.home-body ul:has(> li:nth-child(4):last-child) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
/* A heading and its line, the way a game's page speaks: centred, a little larger. */
.home-body h2 + p { text-align: center; font-size: 18px; max-width: 560px; margin: 0 auto 8px; }
.home-body li {
  margin: 0; padding: 16px 18px 16px 44px; position: relative;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.home-body li::before {
  content: ""; position: absolute; left: 18px; top: 24px; width: 10px; height: 10px;
  background: var(--green); box-shadow: 2px 2px 0 #4f9a3a;   /* a pixel, not a bullet */
}

/* ------------------------------------------------------------------ documents */
.doc-head { max-width: 760px; padding-bottom: 22px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.doc-head .updated {
  display: inline-block; margin-top: 6px; padding: 3px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); font-size: 14px;
}
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 56px; align-items: start; }
.doc-grid.single { grid-template-columns: minmax(0, 1fr); }
.prose { max-width: var(--measure); min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose h2 { padding-top: 26px; border-top: 1px solid var(--line); }
.prose .card h2 { padding-top: 0; border-top: 0; }

.toc { position: sticky; top: 92px; font-size: 14px; }
.toc-h { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; }
.toc ol, .toc-m ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0; }
.toc a {
  display: block; padding: 6px 12px; color: var(--muted); text-decoration: none;
  border-left: 2px solid var(--line); line-height: 1.4;
}
.toc a:hover { color: var(--text); border-left-color: var(--gold); }
.toc-m { display: none; }

/* ------------------------------------------------------------------ message pages */
.message { max-width: 520px; margin: 40px auto; text-align: center; }
.message img { width: 96px; height: 96px; image-rendering: pixelated; border-radius: 20px; margin-bottom: 18px; }
.message .btn { margin-top: 10px; }

/* ------------------------------------------------------------------ footer */
footer { background: var(--bg-2); border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.foot {
  max-width: 1080px; margin: 0 auto; padding: 40px 24px 28px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px;
}
.foot-brand { display: flex; gap: 14px; align-items: flex-start; }
.foot-brand img { width: 40px; height: 40px; border-radius: 10px; image-rendering: pixelated; box-shadow: 0 0 0 1px var(--line-2); }
.foot-name { color: var(--text); font-weight: 800; margin: 0 0 2px; }
.foot-line { margin: 0; color: var(--muted); font-size: 14px; max-width: 34ch; }
.foot-head { color: var(--text); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; }
.foot-col a { display: block; color: var(--muted); text-decoration: none; padding: 3px 0; }
.foot-col a:hover { color: var(--text); }
.foot-col p { margin: 0 0 8px; color: var(--muted); }
.foot-col p a { display: inline; padding: 0; }
.foot-label { display: block; font-size: 13px; color: var(--muted); opacity: .8; }
.foot-base {
  max-width: 1080px; margin: 0 auto; padding: 16px 24px 32px;
  border-top: 1px solid var(--line); font-size: 14px;
}

/* ------------------------------------------------------------------ narrow */
@media (max-width: 900px) {
  .doc-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
  .toc-m {
    display: block; margin: 0 0 28px; background: var(--panel);
    border: 1px solid var(--line); border-radius: 12px;
  }
  .toc-m summary { cursor: pointer; padding: 12px 16px; font-weight: 700; color: var(--text); font-size: 15px; }
  .toc-m ol { padding: 0 16px 12px; }
  .toc-m a { display: block; padding: 6px 0; color: var(--muted); text-decoration: none; font-size: 15px; border-top: 1px solid var(--line); }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .nav-wide { display: none; }
  .nav-menu { display: block; }
  .bar { flex-wrap: nowrap; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  main { padding: 28px 18px 64px; }
  .bar { padding: 10px 18px; }
  h1, .hero-text h1 { font-size: 32px; }
  h2 { font-size: 20px; }
  .hero-art { border-radius: 14px; }
  .hero-text { margin-top: 26px; }
  .hero-text .updated { font-size: 17px; }
  .shots img { width: 160px; border-radius: 18px; border-width: 5px; }
  .card { padding: 16px 18px; }
  .card.lead p { font-size: 17px; }
  .foot { grid-template-columns: 1fr; padding: 32px 18px 20px; }
  .foot-base { padding: 14px 18px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ------------------------------------------------------------------ print */
/* A privacy policy gets printed and saved as PDF: black on white, no chrome. */
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #000; font-size: 11pt; display: block; }
  header.top, footer, .toc, .toc-m, .skip, .shots, .actions, .nav-menu { display: none !important; }
  main { max-width: none; padding: 0; }
  h1, h2, h3, p, li, td, th, strong, .updated { color: #000 !important; }
  a { color: #000; text-decoration: underline; }
  .card, .wrap, .doc-head .updated { background: none !important; border: 1px solid #999 !important; box-shadow: none; }
  .doc-grid { display: block; }
  .prose { max-width: none; }
  .prose h2 { border-top: 0; padding-top: 0; }
  .hero-art { box-shadow: none; }
}
