/* Neon Sunset Studios: site styles.
   Tokens follow studio-docs/docs/DESIGN-GUIDE.md. Dark is the default
   ("Neon Row at night"); light is "stucco by day". Every colour comes from a
   token; nothing is hard-coded below the :root blocks. */

:root {
  --bg: #120e1c;
  --surface: #1c1630;
  --surface-2: #251e3d;
  --line: #3a3058;
  --line-strong: #75689f;
  --ink: #f2eefb;
  --muted: #a99fc4;
  --neon: #ff4fa3;
  --neon-ink: #1a0610;
  --teal: #33d6c4;
  --gold: #e8b54c;
  --danger: #ff6b6b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font-display: "Righteous", "Trebuchet MS", sans-serif;
  --font-body: "Work Sans", system-ui, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f0f7;
    --surface: #ffffff;
    --surface-2: #ece6f2;
    --line: #d5cce0;
    --line-strong: #857a9e;
    --ink: #1b1430;
    --muted: #5d5378;
    --neon: #c0166a;
    --neon-ink: #ffffff;
    --teal: #0b7a70;
    --gold: #8c5f0a;
    --danger: #b3261e;
    --shadow: 0 10px 30px rgba(27, 20, 48, 0.12);
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #f4f0f7;
  --surface: #ffffff;
  --surface-2: #ece6f2;
  --line: #d5cce0;
  --line-strong: #857a9e;
  --ink: #1b1430;
  --muted: #5d5378;
  --neon: #c0166a;
  --neon-ink: #ffffff;
  --teal: #0b7a70;
  --gold: #8c5f0a;
  --danger: #b3261e;
  --shadow: 0 10px 30px rgba(27, 20, 48, 0.12);
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

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

:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 0 0 12px;
  text-wrap: balance;
}
h1 { font-size: clamp(34px, 6vw, 56px); }
h2 { font-size: clamp(26px, 4vw, 36px); }
h3 { font-size: 22px; }
p { margin: 0 0 16px; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
.prose { max-width: 72ch; }

.label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Motifs: at most two per page (sunset rule, checker band). */
.sunset-rule {
  height: 2px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, var(--neon), var(--gold), var(--teal));
}
.checker {
  height: 8px;
  background-image:
    linear-gradient(45deg, var(--ink) 25%, transparent 25%, transparent 75%, var(--ink) 75%),
    linear-gradient(45deg, var(--ink) 25%, transparent 25%, transparent 75%, var(--ink) 75%);
  background-size: 8px 8px;
  background-position: 0 0, 4px 4px;
  background-color: var(--bg);
  opacity: 0.35;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { height: 52px; width: auto; }
.brand .brand-text { display: none; font-family: var(--font-display); font-size: 18px; line-height: 1; }
.brand .brand-text b { color: var(--neon); font-weight: 400; }
.brand .brand-text span { color: var(--teal); }
nav.primary { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
nav.primary a {
  color: var(--ink);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 15px;
}
nav.primary a:hover, nav.primary a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
nav.primary a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--neon); }
.theme-toggle {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 6px;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--neon); }

@media (max-width: 640px) {
  .site-header { position: static; }
  .site-header .wrap { min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
  .brand img { height: 40px; }
  nav.primary { gap: 0; }
  nav.primary a { padding: 6px 8px; font-size: 14px; }
  .theme-toggle { padding: 4px 8px; font-size: 12px; }
}
@media (max-width: 420px) {
  .brand img { display: none; }
  .brand .brand-text { display: block; }
}

/* Hero */
.hero { padding: 64px 0 40px; }
.hero .lockup { width: min(480px, 100%); margin: 0 0 28px -12px; }
.hero .tagline {
  font-family: var(--font-display);
  font-size: clamp(30px, 5.5vw, 54px);
  line-height: 1.1;
  color: var(--neon);
  text-shadow: 0 0 18px color-mix(in srgb, var(--neon) 45%, transparent);
  margin: 0 0 16px;
}
.hero .lede { font-size: 19px; color: var(--muted); max-width: 62ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.btn:hover { border-color: var(--neon); color: var(--ink); }
.btn.primary { background: var(--neon); color: var(--neon-ink); border-color: var(--neon); }
.btn.primary:hover { filter: brightness(1.08); }

/* Sections */
section { padding: 48px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head p { color: var(--muted); margin: 0; }

/* Mission quote */
.mission {
  border-left: 3px solid var(--gold);
  padding: 8px 0 8px 22px;
  margin: 0;
  max-width: 72ch;
}
.mission p { font-size: 19px; }
.mission footer { color: var(--muted); font-size: 15px; }
.mission footer b { color: var(--ink); font-weight: 600; }

/* Game cards */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
section.alt .card { background: var(--bg); }
.card .shot { aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; position: relative; }
.card .shot img { width: 100%; height: 100%; object-fit: cover; }
.card .shot img.pixel { image-rendering: pixelated; object-fit: contain; background: #000; }
.card .body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { margin: 0; }
.card .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card p { margin: 0; color: var(--ink); }
.card .facts { color: var(--muted); font-size: 14px; margin-top: auto; padding-top: 6px; border-top: 1px solid var(--line); }

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: var(--surface-2);
}
.badge.play { border-color: var(--teal); color: var(--teal); }
.badge.prod { border-color: var(--gold); color: var(--gold); }
.badge.pre { color: var(--muted); }
.badge.rating { border-style: dashed; }

/* The Night Dispatch desk panel (no screenshot yet: three colours, one bitmap font) */
.desk {
  width: 100%; height: 100%;
  background: #07110b;
  color: #7ff0a0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  padding: 16px 18px;
  margin: 0;
  overflow: hidden;
  white-space: pre;
}
.desk .amber { color: #f0b24a; }
.desk .dim { color: #3f8a58; }

/* Team table */
.roster { width: 100%; border-collapse: collapse; font-size: 15px; }
.roster th, .roster td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.roster th { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.roster td:first-child { font-weight: 600; white-space: nowrap; }
.roster .who { color: var(--muted); }
@media (max-width: 640px) {
  .roster thead { display: none; }
  .roster tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .roster td { display: block; border: 0; padding: 2px 0; white-space: normal; }
  .roster td:first-child { white-space: normal; }
}

/* Log timeline */
.timeline { list-style: none; margin: 0; padding: 0; max-width: 76ch; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.timeline time { font-family: var(--font-mono); font-size: 13px; color: var(--gold); padding-top: 4px; }
.timeline h3 { font-size: 19px; margin: 0 0 6px; }
.timeline p { margin: 0; color: var(--ink); }
@media (max-width: 520px) { .timeline li { grid-template-columns: 1fr; gap: 4px; } }

/* Press kit */
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 120px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface); }
.swatch i { display: block; height: 48px; }
.swatch span { display: block; padding: 6px 8px; font-family: var(--font-mono); font-size: 12px; }
.downloads { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.downloads a { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--surface); text-decoration: none; color: var(--ink); }
.downloads a:hover { border-color: var(--neon); }
.downloads .pv { height: 90px; display: grid; place-items: center; background: var(--surface-2); border-radius: 6px; margin-bottom: 10px; padding: 10px; }
.downloads .pv.dark { background: #120e1c; }
.downloads .pv.light { background: #ffffff; }
.downloads .pv img { max-height: 70px; width: auto; }
.downloads small { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }

/* Contact */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  max-width: 60ch;
}
.contact-card .email { font-family: var(--font-mono); font-size: 20px; word-break: break-all; }

/* Footer */
.site-footer { padding: 32px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: grid; gap: 14px; }
.site-footer .links { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer .links a { color: var(--ink); }
.site-footer .note { margin: 0; }
.site-footer .tag { font-family: var(--font-display); color: var(--neon); font-size: 16px; }

/* Utilities */
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.mt-0 { margin-top: 0; }
.mb-24 { margin-bottom: 24px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
