/* site.css: what every page of multiplayground shares (the redesign of
   2026-10-11): the colours, the type, the top bar, buttons and the footer.
   The games page, the developer pages and the console each add their own
   stylesheet on top. Dark, so the game pictures carry the colour; "play" in the
   wordmark stays blue, as in the owner's design of 2026-10-03.
   The console is served from another host, so the platform serves this file
   there too (server.js): one look, one file. */

:root {
  color-scheme: dark;
  --bg: #0b0e1a;
  --bg-deep: #070912;
  --surface: #131932;
  --surface-2: #1a2142;
  --surface-3: #232c55;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f4fc;
  --text-2: #c9cee3;
  --muted: #949cba;
  --blue: #5b86ff;
  --blue-hover: #7c9fff;
  /* Behind white text: 4.6:1 (the accent blue above is 3.3:1 with white, and is for text on dark). */
  --blue-btn: #3f6af2;
  --blue-btn-hover: #3459dc;
  --blue-soft: rgba(91, 134, 255, 0.16);
  --violet: #9b6bff;
  --pink: #ff5fa8;
  --yellow: #ffd23f;
  --green: #2fdc93;
  --green-soft: rgba(47, 220, 147, 0.14);
  --red: #ff6b6b;
  --red-soft: rgba(255, 107, 107, 0.14);
  --amber: #ffb547;
  --amber-soft: rgba(255, 181, 71, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1240px;
  --gutter: 24px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* The hidden attribute always wins over a class that sets display. */
[hidden] {
  display: none !important;
}

img,
svg {
  display: block;
}

a {
  color: var(--blue-hover);
}

:focus-visible {
  outline: 3px solid var(--blue-hover);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Hidden from sight, not from the keyboard or screen readers. */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--blue-btn);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

code,
kbd {
  font-family: var(--mono);
  font-size: 0.9em;
}

code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

/* --- the top bar ------------------------------------------------------------ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 26, 0.82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-in {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  flex: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
}

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 23px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
}

.wordmark .play {
  color: var(--blue);
}

.brand-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-hover);
  font-size: 13px;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text-2);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-links a[aria-current="page"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

/* "Publish" and "your game" are one label: one word's space between them, not
   the button's gap (a flex item drops its leading space). */
.btn.nav-publish {
  gap: 0.25em;
}

/* In the phone's menu only: on a laptop the button beside it says the same. */
.nav-links .menu-only {
  display: none;
}

.nav-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-menu {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

/* --- buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.btn svg {
  flex: none;
}

.btn-primary {
  border-color: transparent;
  background: var(--blue-btn);
  color: #fff;
  box-shadow: 0 8px 24px rgba(91, 134, 255, 0.32);
}

.btn-primary:hover:not(:disabled) {
  border-color: transparent;
  background: var(--blue-btn-hover);
  color: #fff;
}

.btn-light {
  border-color: transparent;
  background: #fff;
  color: #0b0e1a;
}

.btn-light:hover:not(:disabled) {
  border-color: transparent;
  background: #e6eaff;
  color: #0b0e1a;
}

.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.btn-lg {
  min-height: 54px;
  padding: 0 28px;
  font-size: 17px;
}

/* --- headings and text ------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--blue-hover);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.h-display {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.h-section {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.lead {
  margin: 0;
  color: var(--text-2);
  font-size: 19px;
  line-height: 1.55;
}

.muted {
  color: var(--muted);
}

/* The colour that says "people are in this game right now". */
.live-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(47, 220, 147, 0.6);
  animation: live-pulse 2s ease-out infinite;
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(47, 220, 147, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(47, 220, 147, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(47, 220, 147, 0);
  }
}

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

.foot {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
}

.foot-in {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-top: 44px;
  padding-bottom: 36px;
}

.foot-about p {
  margin: 14px 0 0;
  max-width: 340px;
  color: var(--muted);
  font-size: 15px;
}

.foot h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.foot a {
  color: var(--text-2);
  font-size: 15px;
  text-decoration: none;
}

.foot a:hover {
  color: var(--text);
  text-decoration: underline;
}

.foot-base {
  padding-top: 18px;
  padding-bottom: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

/* --- phones and narrow windows ---------------------------------------------- */

@media (max-width: 860px) {
  .nav-in {
    gap: 12px;
    height: 62px;
  }

  .nav-menu {
    display: inline-flex;
  }

  /* The links fold into a menu under the bar, opened by the menu button
     (site.js). Without scripts they stay reachable: the menu is folded only
     once the page's head has marked it "js", and is shown open otherwise. */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px var(--gutter) 16px;
    background: rgba(11, 14, 26, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .js .nav-links:not(.is-open) {
    display: none;
  }

  .nav-links a {
    min-height: 48px;
    padding: 0 12px;
    font-size: 17px;
    border-radius: 12px;
  }

  .nav-links .menu-only {
    display: flex;
    color: var(--blue-hover);
  }

  .foot-in {
    grid-template-columns: 1fr 1fr;
  }

  .foot-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }

  .wordmark {
    font-size: 20px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .nav-end .btn-sm {
    padding: 0 14px;
  }

  /* "Publish your game" becomes "Publish", so the menu button fits beside it. */
  .pub-long {
    display: none;
  }

  .h-section {
    font-size: 25px;
  }

  .lead {
    font-size: 17px;
  }
}

/* Under 380px the publish button would squeeze the wordmark: it is in the menu. */
@media (max-width: 379px) {
  .nav-end .nav-publish {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
