/* Shared stylesheet for every page on the site.
   One file, no build step, no framework. Loaded with a plain <link>. */

:root {
  color-scheme: light dark;

  --bg: #fbf7f0;
  --surface: #ffffff;
  --border: #e6ded1;
  --text: #211d18;
  --muted: #6b6156;
  --accent: #b4541f;
  --accent-soft: #fdf0e6;

  --radius: 14px;
  --measure: 42rem;
  --sans: ui-sans-serif, -apple-system, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14120f;
    --surface: #1d1a16;
    --border: #322c25;
    --text: #ece5da;
    --muted: #a1968a;
    --accent: #e8925a;
    --accent-soft: #2a1f16;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0 1.25rem 5rem;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--measure); margin: 0 auto; }
.wrap--wide { max-width: 56rem; }

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 2rem 0 0;
  font-size: 0.9375rem;
}

.masthead a { color: var(--muted); text-decoration: none; }
.masthead a:hover { color: var(--accent); }
.masthead .sep { color: var(--border); }

/* ---------- type ---------- */

h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 2.5rem 0 0.5rem;
  font-weight: 600;
}

h2 {
  font-size: 1.1875rem;
  letter-spacing: -0.005em;
  margin: 2.75rem 0 0.75rem;
  font-weight: 600;
}

h3 {
  font-size: 1rem;
  margin: 1.75rem 0 0.5rem;
  font-weight: 600;
}

p { margin: 0 0 1rem; }

.lede {
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 2rem;
}

.dateline {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 2.5rem;
}

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

ul { padding-left: 1.15rem; margin: 0 0 1rem; }
li { margin-bottom: 0.4rem; }

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.875em;
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* ---------- cards ---------- */

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

a.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card h2 { margin: 0 0 0.35rem; font-size: 1.25rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.9375rem; }

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  margin: 2rem 0;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.15rem 0.6rem;
  margin-bottom: 0.75rem;
}

/* ---------- contact block ---------- */

.contact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}

.contact p:last-child { margin-bottom: 0; }

.email {
  font-size: 1.125rem;
  font-weight: 600;
}

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

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted);
}

footer a { color: var(--muted); }

/* ---------- tables ---------- */

.table-scroll { overflow-x: auto; margin: 0 0 1.5rem; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9375rem;
}

th, td {
  text-align: left;
  padding: 0.6rem 0.9rem 0.6rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th { font-weight: 600; color: var(--muted); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- game art ---------- */

.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }

.game-title { margin: 2.5rem 0 1rem; line-height: 0; }
.game-title img { display: block; width: auto; max-width: 100%; }

.hero {
  margin: 0 0 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  line-height: 0;
}
.hero img { display: block; width: 100%; height: auto; }

.figure { margin: 1.5rem 0 2rem; }
.figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.figure figcaption { margin-top: 0.6rem; font-size: 0.875rem; color: var(--muted); }

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(9.5rem, 1fr);
  gap: 0.75rem;
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
}
.shots img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  scroll-snap-align: start;
}

.card-art {
  margin: -1.5rem -1.5rem 1.25rem;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 1px solid var(--border);
  background: #000;
}
.card-art img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- per-game themes ----------
   Each game page carries its game's own palette. Both games are set at
   night, so both themes are dark whatever the system asks for. */

.theme-ripe, .theme-lantern { color-scheme: dark; }

/* RipeTogether: the night sky over the island, gold hex plots, wood panels. */
.theme-ripe {
  --bg: #111a3d;
  --surface: #182352;
  --border: #2c3a74;
  --text: #f3ecd9;
  --muted: #a7b0d4;
  --accent: #f2c14e;
  --accent-soft: #2a2b45;
  --serif: ui-monospace, "SF Mono", Menlo, monospace;
  background:
    linear-gradient(180deg, #0b1230 0%, #16224f 45%, #24346c 80%, #4a3f6e 100%) fixed;
}
.theme-ripe h1, .theme-ripe h2 { color: #fff4d6; }
.theme-ripe h2 { font-family: var(--serif); letter-spacing: 0.02em; }
.theme-ripe .contact,
.theme-ripe .card {
  background: #3a2414;
  border-color: #6b4325;
  box-shadow: inset 0 0 0 3px #2a190d;
}
.theme-ripe .contact p, .theme-ripe .card p { color: #e6d3b5; }
.theme-ripe footer { border-top-color: #2c3a74; }

/* Little Lanterns: a dark mine, lit only by the lamps the slimes carry. */
.theme-lantern {
  --bg: #0c0907;
  --surface: #17110c;
  --border: #33261a;
  --text: #eee2cc;
  --muted: #a39078;
  --accent: #f2a948;
  --accent-soft: #2a1c10;
  --slime: #5fae94;
  background:
    radial-gradient(60rem 36rem at 50% -8rem, rgba(242, 169, 72, 0.22), transparent 70%),
    #0c0907;
}
.theme-lantern h2 { color: #f6d9a8; }
.theme-lantern .badge { color: var(--slime); border-color: #24453a; }
.theme-lantern .hero,
.theme-lantern .figure img { box-shadow: 0 0 3rem rgba(242, 169, 72, 0.12); }
