/* gatherandsolve.com — layout and components.
   Uses the style guide's tokens only; no literal color values. */

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
}

/* ---------- Type scale (style guide: Headings / Text / Mono) ---------- */

.display, .h1, .h2, .h3 { font-family: var(--font-sans); margin: 0; }
.display { font-size: 56px; line-height: 1.05; font-weight: 800; letter-spacing: -1px; }
.h1 { font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -0.5px; }
.h2 { font-size: 28px; line-height: 1.2; font-weight: 700; }
.h3 { font-size: 20px; line-height: 1.3; font-weight: 700; }
.small { font-size: 14px; line-height: 1.5; font-weight: 500; }
.code { font-family: var(--font-mono); font-size: 14px; line-height: 1.5; font-weight: 400; }
.muted { color: var(--ink-muted); }

@media (max-width: 719px) {
  .display { font-size: 36px; letter-spacing: -0.5px; }
  .h1 { font-size: 30px; }
  .h2 { font-size: 24px; }
}

p { margin: 0 0 var(--space-4); max-width: 68ch; }
p:last-child { margin-bottom: 0; }

a { color: var(--gather); text-decoration: underline; text-underline-offset: 2px; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- Shell ---------- */

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.skip {
  position: absolute;
  left: var(--space-4);
  top: calc(-1 * var(--space-8));
  z-index: 20;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-5);
  text-decoration: none;
  font-weight: 700;
  transition: top 120ms ease;
}
.skip:focus { top: var(--space-4); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ground);
  border-bottom: 1px solid transparent;
}
.site-header[data-scrolled="true"] { border-bottom-color: var(--line); }

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 72px;
}

/* Lockup: mark left, two-line name beside it (style guide: Lockup) */
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
}
.lockup .mark { width: 42px; height: 42px; flex: none; }
.lockup-name {
  display: block;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 19px;
  line-height: 20px;
  color: var(--ink);
}
.lockup-name .amp { display: block; color: var(--ink-muted); font-weight: 600; }

.nav-group { display: flex; align-items: center; gap: var(--space-2); }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-1);
}
.site-nav a:hover { color: var(--gather); text-decoration: underline; }

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  min-width: 44px;
  padding: 0 var(--space-3);
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.icon-button:hover { background: var(--surface-raised); }
.icon-button svg { width: 18px; height: 18px; flex: none; }

.menu-button { display: none; }

/* Phone menu */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--ground);
}
.mobile-nav[data-open="true"] { display: block; }
.mobile-nav ul { margin: 0; padding: var(--space-2) 0 var(--space-4); list-style: none; }
.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.mobile-nav a:hover { background: var(--surface-raised); }

@media (max-width: 719px) {
  .site-nav { display: none; }
  .menu-button { display: inline-flex; }
}

/* ---------- Buttons (style guide: Button) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary { background: var(--gather); color: var(--on-gather); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-raised); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

/* ---------- Sections ---------- */

main > section { padding: var(--space-7) 0; }
@media (min-width: 720px) { main > section { padding: var(--space-8) 0; } }

section > .wrap > .h2 { margin-bottom: var(--space-5); }

.section-lede { color: var(--ink-muted); margin-bottom: var(--space-6); }

/* ---------- Hero ---------- */

.hero { padding-top: var(--space-6); }
.hero-grid {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-8); }
}
/* The opening is the headline and one sentence, nothing else. */
.hero-lead { color: var(--ink); margin-top: var(--space-5); font-size: 20px; }
@media (max-width: 719px) { .hero-lead { font-size: 18px; } }

/* Decorative mark: above the headline on phones, right of it on desktop */
.hero-mark { order: -1; justify-self: start; }
.hero-mark svg { width: 112px; height: 112px; display: block; }
@media (min-width: 900px) {
  .hero-mark { order: 0; justify-self: end; }
  .hero-mark svg { width: 232px; height: 232px; }
}

/* ---------- Cards and panels ---------- */

.card-grid { display: grid; gap: var(--space-4); }
@media (min-width: 720px) { .card-grid { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.card p { margin: 0; }
.card .btn { align-self: flex-start; margin-top: var(--space-2); }
.card-icon { display: block; width: 56px; height: 56px; border-radius: 12px; }
.card-scene { margin: var(--space-2) 0; }
.card-scene img { display: block; width: 100%; height: auto; border-radius: var(--radius-md); }
.card-domain { font-family: var(--font-mono); font-size: 14px; color: var(--ink-muted); }

/* The card ends on one line: the way to play at the left, the way to read
   more at the right. */
/* The button keeps a top margin when it stands alone in a card; inside this
   row the row provides the spacing, so drop it or the two sit 4px apart. */
.card-actions .btn { margin-top: 0; align-self: auto; }

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}
/* Outlined in its own colour, so it reads as the quieter of the two actions
   rather than as stray text. No underline: inside a border it is a control,
   not a line of prose. */
.card-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  /* The Button component's own padding and type metrics, so this ends up
     exactly as tall as the Play button beside it. */
  padding: var(--space-3) var(--space-5);
  border: 2px solid var(--gather);
  border-radius: var(--radius-md);
  color: var(--gather);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  text-decoration: none;
}
.card-more:hover { background: var(--surface-raised); text-decoration: underline; }

/* Three promises, three across once there is room for them to breathe. Below
   that they stack, rather than squeezing into columns too narrow to read. */
.promise-grid { display: grid; gap: var(--space-4); }
@media (min-width: 820px) { .promise-grid { grid-template-columns: repeat(3, 1fr); } }

.promise-art { display: block; width: 48px; height: 48px; margin-bottom: var(--space-2); }

.note { color: var(--ink-muted); font-size: 14px; line-height: 1.5; margin-top: var(--space-5); }

/* ---------- The partners form ---------- */

.contact-form { margin-top: var(--space-6); max-width: 46rem; }

.field { margin-bottom: var(--space-4); }
.field label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

/* border-strong is the token for the edge of a control; line is decorative
   only, so it is never the sole edge of one. */
.control {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
}
.control::placeholder { color: var(--ink-muted); }
textarea.control { resize: vertical; }

/* The select keeps the platform's own arrow, which follows color-scheme. */
select.control { padding-right: var(--space-3); }

.form-note {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  max-width: 68ch;
}

/* The honeypot. Off to the side rather than display:none, which some bots
   know to skip, and out of the accessibility tree and the tab order so no
   one using a screen reader or a keyboard ever meets it. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Where the form's outcome is announced. tokens.css is copied verbatim from
   the style guide and has no success or error colour, and inventing one here
   would put a colour on the site that the design system has never seen. So
   the words carry the meaning and a border carries the emphasis. */
.form-status:empty { display: none; }
.form-status {
  margin: var(--space-4) 0 0;
  padding: var(--space-3) var(--space-4);
  border-left: 4px solid var(--gather);
  background: var(--surface-raised);
  border-radius: var(--radius-sm);
  font-size: 16px;
  line-height: 1.6;
  max-width: 68ch;
}
.form-status[data-failed="true"] { border-left-color: var(--border-strong); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--space-7) 0;
  color: var(--ink-muted);
}
.credit-line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  margin-bottom: var(--space-4);
}
.credit-line .mark { width: 20px; height: 20px; flex: none; }
.credit-line strong { color: var(--ink); font-weight: 700; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
  font-size: 14px;
}
.footer-links a { color: var(--ink-muted); }
.footer-links a:hover { color: var(--gather); }
.footer-meta { font-size: 14px; line-height: 1.5; margin: 0; }

/* ---------- Game pages ---------- */

.back { font-size: 14px; margin-bottom: var(--space-5); }

.game-head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.game-icon { display: block; width: 72px; height: 72px; border-radius: 16px; flex: none; }
.game-head .h1 { margin-bottom: var(--space-1); }
.game-head .card-domain { margin: 0; }

/* The picture illustrates the game; it is not the page. Capped so it does not
   run the full content width and push everything below it off the screen. */
.game-scene { margin: var(--space-6) 0; max-width: 560px; }

/* On a wide screen the picture and what is in the game sit side by side, so
   both are in view at once. Narrower, they stack in source order. */
.game-detail { display: grid; gap: var(--space-5); align-items: start; }
@media (min-width: 1024px) {
  .game-detail {
    grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
    gap: var(--space-8);
    margin: var(--space-6) 0;
  }
  .game-detail .game-scene { margin: 0; }
  .game-detail .h2 { margin-top: 0; }
}
.game-scene img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

/* Where a game's apps will go. A stub is a div, not a link, so nothing looks
   clickable before there is somewhere to click to; swap in an <a class="store">
   when a listing exists and the row needs no other change. */
.store-list {
  list-style: none;
  margin: 0 0 var(--space-6);
  padding: 0;
  display: grid;
  gap: var(--space-3);
  max-width: 28rem;
}
.store {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 44px;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--ink);
}
a.store:hover { background: var(--surface-raised); }
.store-name { font-weight: 700; }
.store-state { color: var(--ink-muted); font-size: 14px; }

/* ---------- Legal and 404 pages ---------- */

.page { padding: var(--space-7) 0 var(--space-8); }
.page .h1 { margin-bottom: var(--space-5); }
.page .h2 { margin: var(--space-7) 0 var(--space-4); }
.page ul { padding-left: var(--space-5); max-width: 68ch; }
.page li { margin-bottom: var(--space-2); }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
