/* Yenn Studios — one stylesheet for the whole site.
   Colours live in tokens; dark is the default, light follows the OS setting. */

:root {
  --bg: #0b111d;
  --surface: #121b2d;
  --surface-2: #18243b;
  --line: #24344f;
  --text: #e9eef7;
  --muted: #9fb0c8;
  --teal: #2fe0c0;
  --yellow: #ffc53d;
  --link: #5ce8cf;
  --accent-ink: #06231d;
  --discord: #5865f2;
  --discord-hover: #4752c4;
  --steam: #1b6fd1;
  --steam-hover: #1559ab;
  --shadow: 0 10px 30px rgb(0 0 0 / 0.35);
  --radius: 14px;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6fa;
    --surface: #ffffff;
    --surface-2: #eaeef5;
    --line: #d5dce8;
    --text: #111a2b;
    --muted: #4d5b72;
    --link: #0a7c69;
    --teal: #0f9e86;
    --yellow: #b07a00;
    --shadow: 0 10px 30px rgb(17 26 43 / 0.10);
    color-scheme: light;
  }
}

/* Bands that sit on pixel art stay dark in both themes. */
.band-dark {
  --bg: #0b111d;
  --surface: #121b2d;
  --surface-2: #18243b;
  --line: #24344f;
  --text: #e9eef7;
  --muted: #a9b8cd;
  --link: #5ce8cf;
  --teal: #2fe0c0;
  --yellow: #ffc53d;
  color-scheme: dark;
  background: var(--bg);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--yellow); color: #111; padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: clamp(48px, 8vw, 88px); }
.section-tight { padding-block: clamp(32px, 5vw, 56px); }
.eyebrow { font: 700 0.8rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; display: inline-block; }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 62ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 10px; border: 2px solid transparent;
  font: 700 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, transform 0.15s, border-color 0.15s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn .icon { width: 22px; height: 22px; fill: currentColor; flex: none; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 0.92rem; }
.btn-discord { background: var(--discord); color: #fff; }
.btn-discord:hover { background: var(--discord-hover); }
.btn-steam { background: var(--steam); color: #fff; }
.btn-steam:hover { background: var(--steam-hover); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--muted); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex: none; }
.brand img { display: block; }
.brand-name { font: 800 1.15rem/1 var(--font); letter-spacing: 0.02em; text-transform: uppercase; }
.brand-name span { color: var(--muted); font-weight: 600; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--teal); background: var(--surface); }
.nav-toggle { display: none; }

@media (max-width: 1020px) {
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; order: 3;
    width: 44px; height: 44px; margin-left: 0; border-radius: 10px; border: 1px solid var(--line);
    background: var(--surface); color: var(--text); cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: ""; }
  .nav-toggle-bars::before { position: absolute; top: -6px; }
  .nav-toggle-bars::after { position: absolute; top: 6px; }
  .header-discord { order: 2; margin-left: auto; }
  .site-nav { order: 4; flex-basis: 100%; margin: 0; display: none; padding-bottom: 12px; }
  .site-nav.open, .no-js .site-nav { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 12px; font-size: 1.05rem; }
}
@media (max-width: 460px) {
  .header-inner { gap: 8px; }
  .brand { gap: 8px; }
  .brand img { width: 30px; height: 30px; }
  .brand-name { font-size: 0.95rem; }
  .header-discord span { display: none; }
  .header-discord { padding: 8px 10px; gap: 6px; }
  .header-discord::after { content: "Discord"; }
}

/* ---------- Home hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-copy { padding-top: clamp(40px, 8vw, 96px); position: relative; z-index: 1; }
.hero h1 { max-width: 18ch; }
.hero-art { display: block; width: 100%; height: auto; aspect-ratio: 420 / 160; object-fit: cover; object-position: 50% 100%; margin-top: clamp(8px, 3vw, 24px); }
@media (min-width: 900px) { .hero-art { aspect-ratio: 420 / 118; max-height: 520px; } }
.launch-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.launch-strip .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.launch-strip p { margin: 0; font-weight: 600; }
.launch-strip strong { color: var(--teal); }
.countdown { font: 700 0.95rem/1 var(--mono); color: var(--muted); }

/* ---------- Game cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; margin-top: 32px; }
.card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.card-media { position: relative; display: block; aspect-ratio: 16 / 9; background: #0b111d; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-media .title-art { position: absolute; left: 18px; bottom: 16px; width: 62%; height: auto; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 2px 6px rgb(0 0 0 / 0.6)); }
.card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgb(11 17 29 / 0.85)); }
.card-media .title-art { z-index: 1; }
.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.35rem; }
.card-body h3 a { color: var(--text); text-decoration: none; }
.card-body h3 a:hover { text-decoration: underline; }
.card-body .btn-row { margin-top: auto; padding-top: 14px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font: 700 0.75rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; width: fit-content; }
.badge-teal { background: color-mix(in srgb, var(--teal) 16%, transparent); color: var(--teal); }
.badge-yellow { background: color-mix(in srgb, var(--yellow) 18%, transparent); color: var(--yellow); }
.badge::before { content: ""; width: 7px; height: 7px; background: currentColor; border-radius: 1px; }
.card-more {
  border-style: dashed; box-shadow: none; background: transparent; justify-content: center; align-items: flex-start;
  padding: 28px; min-height: 260px; gap: 10px;
}
.card-more .more-blocks { display: grid; grid-template-columns: repeat(3, 14px); gap: 4px; margin-bottom: 8px; }
.card-more .more-blocks i { width: 14px; height: 14px; border-radius: 2px; background: var(--line); }
.card-more .more-blocks i:nth-child(1) { background: var(--teal); }
.card-more .more-blocks i:nth-child(5) { background: var(--yellow); }

/* ---------- Discord band ---------- */
.discord-band { background: linear-gradient(135deg, #2b3290, #5865f2); color: #fff; border-radius: var(--radius); padding: clamp(28px, 5vw, 48px); display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.discord-band h2 { margin-bottom: 8px; }
.discord-band p { margin: 0; color: #e3e6ff; max-width: 60ch; }
.discord-band .btn { background: #fff; color: #2b3290; }
.discord-band .btn:hover { background: #eef0ff; }
@media (max-width: 700px) { .discord-band { grid-template-columns: 1fr; } }

/* ---------- Game page ---------- */
.game-hero { position: relative; overflow: hidden; isolation: isolate; }
.game-hero-bg { position: absolute; inset: 0; z-index: -1; }
.game-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.game-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(11 17 29 / 0.55) 0%, rgb(11 17 29 / 0.7) 45%, #0b111d 100%); }
.game-hero .wrap { padding-block: clamp(56px, 12vw, 140px) clamp(40px, 6vw, 64px); }
.game-hero .title-art { display: block; width: min(100%, 640px); height: auto; margin: 10px 0 18px; filter: drop-shadow(0 4px 10px rgb(0 0 0 / 0.6)); }
.game-hero .lead { color: #d3dceb; }
.release-line { font: 700 1rem/1.4 var(--mono); color: var(--teal); margin: 0 0 12px; }
.pe .release-line, .pe .eyebrow { color: var(--yellow); }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.facts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 92px; }
.facts dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0 0 18px; font-size: 0.95rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.facts .btn { width: 100%; margin-top: 10px; }
@media (max-width: 900px) { .game-layout { grid-template-columns: 1fr; } .facts { position: static; } }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose ul { margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--teal); }
.pe .prose li::marker { color: var(--yellow); }
.note { border-left: 4px solid var(--yellow); background: var(--surface); padding: 14px 18px; border-radius: 0 10px 10px 0; color: var(--muted); }

/* ---------- Screenshot gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-top: 24px; }
.gallery-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
.gallery figure { margin: 0; }
.gallery a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #0b111d; }
.gallery img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.25s; }
.gallery a:hover img { transform: scale(1.03); }
.gallery figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 8px; }
.lightbox { padding: 0; border: 0; background: transparent; max-width: min(96vw, 1600px); max-height: 94vh; }
.lightbox::backdrop { background: rgb(5 8 14 / 0.9); }
.lightbox img { display: block; max-width: 100%; max-height: 90vh; border-radius: 8px; }
.lightbox-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgb(0 0 0 / 0.7); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }

/* ---------- News ---------- */
.post-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; }
.post-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.post-item h3 { margin: 6px 0 8px; }
.post-item h3 a { color: var(--text); text-decoration: none; }
.post-item h3 a:hover { text-decoration: underline; }
.post-meta { font: 600 0.85rem/1.4 var(--mono); color: var(--muted); }
.article { max-width: 72ch; }
.article figure { margin: 28px 0; }
.article figure img { border-radius: 10px; border: 1px solid var(--line); display: block; }
.article figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }

/* ---------- Page header (About, Contact, News) ---------- */
.page-head { border-bottom: 1px solid var(--line); background: var(--surface); }
.page-head .wrap { padding-block: clamp(40px, 7vw, 72px); }
.page-head h1 { max-width: 22ch; }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.panel h2 { font-size: 1.4rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; padding-block: 48px 28px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--text); text-decoration: none; }
.footer-grid a:hover { color: var(--link); text-decoration: underline; }
.footer-grid .brand { margin-bottom: 12px; }
.footer-h { font: 700 0.8rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 6px 0 14px; }
.footer-base { border-top: 1px solid var(--line); padding-block: 18px 28px; font-size: 0.85rem; }
.footer-base p { margin: 0; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 420px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Small utilities ---------- */
.post-title { font-size: 1.35rem; margin: 6px 0 8px; }
.post-title a { color: var(--text); text-decoration: none; }
.post-title a:hover { text-decoration: underline; }
.more-link { margin-top: 16px; }
.sign-off { margin-top: 32px; }
.email-big { font-size: 1.15rem; font-weight: 700; overflow-wrap: anywhere; }
.small { font-size: 0.95rem; }
.narrow { max-width: 640px; }
.panel .btn-row { margin-top: 12px; }
