/* Spawn Town landing. Tokens follow 06_marketing/brand/STYLE.md (palette v0).
   Light theme = golden hour (H1), dark theme = evening (H2), chosen by prefers-color-scheme. */

@font-face {
  font-family: "Monocraft";
  src: url("/fonts/Monocraft-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* brand palette */
  --wood-dark: #492e1d;
  --wood: #814323;
  --terracotta: #b2754e;
  --quartz: #efe3cf;
  --gold: #cf922e;
  --light-1: #e4af6b;
  --light-2: #fbd099;
  --navy: #2c3e74;
  --patina: #4f9a8a;
  --ink: #241509;

  /* light theme (golden hour) */
  --bg: #f7efe2;
  --surface: #efe3cf;
  --surface-2: #fffaf1;
  --text: #2b1a10;
  --muted: #5a3d2b;
  --link: #7a4a12;
  --line: #d7c3a5;
  --focus: #2c3e74;
  --footer-bg: #2b1a10;
  --footer-text: #efe3cf;
  --footer-link: #fbd099;

  --font-display: "Monocraft", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141b33;
    --surface: #1d2747;
    --surface-2: #243056;
    --text: #f6ead6;
    --muted: #d6c4a8;
    --link: #fbd099;
    --line: #34406a;
    --focus: #fbd099;
    --footer-bg: #0d1226;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.6rem, 4.6vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3.6vw, 2.1rem); }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; }
.note { color: var(--muted); font-size: 0.95rem; }

.wrap {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.narrow { max-width: 760px; }
.center { text-align: center; }
.center .pixel-icon { margin-inline: auto; }

.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--surface-2);
  color: var(--text);
  border: 2px solid var(--wood-dark);
}
.skip-link:focus { top: 8px; }

/* Header */
.site-header {
  border-bottom: 2px solid var(--line);
  background: var(--bg);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.brand img { width: 36px; height: 36px; border: 2px solid var(--wood-dark); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.site-nav { display: none; gap: 20px; }
.site-nav a { color: var(--text); text-decoration: none; font-weight: 600; }
.site-nav a:hover { text-decoration: underline; }
@media (min-width: 760px) {
  .site-nav { display: flex; }
}

/* Buttons: chunky, bevelled like an in-game button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  border: 2px solid var(--wood-dark);
  cursor: pointer;
}
.btn-primary, .btn-small {
  background: var(--gold);
  color: var(--ink);
  box-shadow: inset -3px -4px 0 rgba(0, 0, 0, 0.22), inset 3px 3px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover, .btn-small:hover { background: var(--light-1); text-decoration: none; }
.btn-primary:active, .btn-small:active { box-shadow: inset 3px 4px 0 rgba(0, 0, 0, 0.22); }
.btn-small { min-height: 44px; padding: 8px 14px; font-size: 0.9rem; white-space: nowrap; }
.btn-large { min-height: 56px; padding: 14px 28px; font-size: 1.1rem; }
.btn-ghost {
  background: transparent;
  color: var(--light-2);
  border-color: var(--light-2);
}
.btn-ghost:hover { background: rgba(251, 208, 153, 0.12); }

/* Hero */
.hero { position: relative; }
.hero-media { position: relative; margin: 0; }
.hero-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.hero-media figcaption {
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 2px 8px;
  font-size: 0.75rem;
  color: #fffaf1;
  background: rgba(20, 12, 6, 0.72);
}
.panel {
  --focus: var(--light-2);
  background: rgba(36, 21, 9, 0.94);
  color: #f6ead6;
  border: 3px solid var(--wood-dark);
  box-shadow: 0 0 0 2px var(--gold), 0 12px 32px rgba(0, 0, 0, 0.35);
  padding: 22px 20px;
}
.panel a:not(.btn) { color: var(--light-2); }
.hero-body { margin-top: -28px; position: relative; }
.hero-panel h1 { color: var(--light-2); }
.hero-panel .lead { color: #f6ead6; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 16px; }
.actions .btn { flex: 1 1 220px; }
.meta-line {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 0.9rem;
  color: #e6d6bd;
}
.meta-line li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  vertical-align: 0.15em;
  background: var(--light-1);
}

@media (min-width: 900px) {
  .hero { display: grid; }
  .hero > * { grid-area: 1 / 1; }
  .hero-media img { aspect-ratio: auto; height: min(86vh, 760px); min-height: 560px; }
  /* Panel in the top-left corner: the cast stands at the bottom centre of the hero image. */
  .hero-body { margin: 0 auto 0 clamp(16px, 3vw, 48px); max-width: none; align-self: start; padding-top: 28px; }
  .hero-panel { max-width: 520px; padding: 24px 28px; }
}

/* Sections */
.section { padding-block: 56px; scroll-margin-top: 8px; }
.section-alt { background: var(--surface); }
@media (min-width: 900px) {
  .section { padding-block: 80px; }
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--surface-2);
  border: 2px solid var(--line);
  padding: 20px;
}
.card p { margin: 0; }
.pixel-icon { width: 48px; height: 48px; display: block; margin-bottom: 12px; image-rendering: pixelated; }

.cast { margin: 40px 0 0; }
.cast img { width: 100%; border: 3px solid var(--wood-dark); }
.cast figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.cast figcaption strong { font-family: var(--font-display); font-size: 1.15rem; }
.cast small, .framed figcaption { color: var(--muted); font-size: 0.85rem; }

.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1.15fr 0.85fr; gap: 56px; }
  .split-reverse > figure { order: -1; }
  .split-reverse { grid-template-columns: 0.6fr 1.4fr; }
}
.framed { margin: 0; max-width: 460px; justify-self: center; width: 100%; }
.framed img { border: 4px solid var(--wood-dark); box-shadow: 0 0 0 2px var(--gold); }
.framed figcaption { margin-top: 10px; }
.emblem { margin: 0; justify-self: center; }
.emblem img { width: 200px; height: 200px; border: 4px solid var(--wood-dark); box-shadow: 0 0 0 2px var(--gold); }
@media (min-width: 900px) { .emblem img { width: 240px; height: 240px; } }

/* How it works */
.map { max-width: 560px; margin: 8px auto 32px; }
.map img { width: 100%; height: auto; image-rendering: pixelated; }
.howto { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .howto { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .howto { grid-template-columns: repeat(3, 1fr); } }
.howto-step { background: var(--surface-2); border: 2px solid var(--line); padding: 12px; }
.howto-step img { width: 100%; height: auto; border: 3px solid var(--wood-dark); }
.howto-step h3 { margin: 12px 0 6px; }
.howto-step p { margin: 0; }
.howto-num { display: inline-block; min-width: 1.6em; padding: 0 4px; margin-right: 4px; text-align: center; background: var(--gold); color: var(--ink); font-family: var(--font-display); }

/* Seasons and rules */
.rules-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .rules-grid { grid-template-columns: 1fr 1fr; } }
.rules-list { margin: 0 0 12px; padding-left: 1.2em; }
.rules-list li { margin: 4px 0; }

/* Join */
.section-join { text-align: center; }
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0 auto 28px;
  padding: 0;
  display: grid;
  gap: 12px;
  text-align: left;
  max-width: 520px;
}
.steps li {
  counter-increment: step;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-2);
  border: 2px solid var(--line);
  padding: 12px 16px;
}
.steps li::before {
  content: counter(step);
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  font-family: var(--font-display);
  font-weight: 700;
  background: var(--gold);
  color: var(--ink);
  border: 2px solid var(--wood-dark);
}
.section-join .btn-large { width: 100%; max-width: 520px; }
.age { margin: 14px 0 6px; font-weight: 600; }
.videos { color: var(--muted); }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface-2); border: 2px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 44px 14px 16px;
  position: relative;
  font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--link);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 16px 14px; margin: 0; }

/* Prose pages */
.prose h1 { margin-bottom: 0.3em; }

/* Footer */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding-block: 36px;
  font-size: 0.95rem;
}
.site-footer a { color: var(--footer-link); }
.site-footer p { margin: 0 0 10px; }
.site-footer .disclaimer { font-weight: 600; }
.footer-links {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.footer-links a { display: inline-block; padding-block: 6px; }
.copyright { opacity: 0.85; }
.disclaimer { font-size: 0.9rem; }
