/*
 * spawnhall.net
 *
 * The palette is the app's, from packages/shared/src/brand.ts. Somebody who
 * arrives here from a confirmation email should recognise where they are, and
 * somebody who installs the app afterwards should recognise it again.
 *
 * Dark only, matching the app, and for the same reason: gameplay is the
 * content, and it reads badly against white.
 */

:root {
  --bg:            #0A0714;
  --surface:       #150E24;
  --surface-raised:#1E1435;
  --border:        #2E1F4A;

  --text:       #F5F0FF;
  --text-muted: #A79BC7;
  --text-faint: #877DA5;

  --accent:      #FF2D95;
  --accent-text: #14000A;
  --secondary:   #00E5FF;

  --measure: 68ch;
}

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

html {
  /* Anchored headings on the legal pages land under the sticky masthead
     rather than behind it. */
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Chakra Petch is the app's display face. If it fails to load, the fallback is
   a normal sans-serif rather than a serif, so a blocked font changes the
   texture and not the layout. */
.display {
  font-family: "Chakra Petch", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--secondary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }

/* Visible focus, deliberately not removed. Keyboard users need to see where
   they are, and the default ring is invisible against this background. */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Masthead ------------------------------------------------------------ */

header.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 7, 20, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.top-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.wordmark {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
  text-decoration: none;
}
.wordmark:hover { color: var(--accent); }

nav.top-nav { margin-left: auto; display: flex; gap: 18px; font-size: 14px; }
nav.top-nav a { color: var(--text-faint); text-decoration: none; }
nav.top-nav a:hover, nav.top-nav a[aria-current="page"] { color: var(--text); }

/* --- Layout -------------------------------------------------------------- */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 56px 24px 96px;
}

h1 {
  font-size: 34px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}

h2 {
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  margin: 44px 0 12px;
  letter-spacing: -0.2px;
}

h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 8px;
}

p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 8px; }

strong { color: var(--text); font-weight: 600; }

.lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 32px;
}

.updated {
  font-size: 14px;
  color: var(--text-faint);
  margin: 0 0 40px;
}

/* --- Landing ------------------------------------------------------------- */

.hero { padding: 40px 0 8px; }

.hero h1 { font-size: 44px; }

.tagline {
  font-size: 20px;
  color: var(--accent);
  margin: 0 0 28px;
  font-weight: 600;
}

.cta {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  padding: 13px 26px;
  border-radius: 10px;
  text-decoration: none;
  margin-top: 8px;
}
.cta:hover { color: var(--accent-text); filter: brightness(1.08); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 40px 0 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
}
.card h3 { margin-top: 0; }
.card p { margin-bottom: 0; font-size: 15px; }

.note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 32px 0;
  font-size: 15px;
}
.note p:last-child { margin-bottom: 0; }

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

footer {
  border-top: 1px solid var(--border);
  margin-top: 72px;
}
.footer-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 28px 24px 56px;
  font-size: 14px;
  color: var(--text-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: baseline;
}
.footer-inner a { color: var(--text-faint); }
.footer-inner .spacer { flex: 1; }

/* --- Small screens ------------------------------------------------------- */

@media (max-width: 560px) {
  body { font-size: 16px; }
  main { padding: 36px 20px 72px; }
  h1 { font-size: 28px; }
  .hero h1 { font-size: 34px; }
  .top-inner { padding: 14px 20px; gap: 12px; }
  nav.top-nav { gap: 14px; font-size: 13px; }
  .footer-inner { padding: 24px 20px 44px; }
}

/* Somebody who has asked for less motion gets none. Nothing here animates
   today, but the declaration belongs with the stylesheet rather than with
   whoever adds the first transition. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
