/* ==========================================================================
   Site stylesheet. One file, no build step, no web fonts. The only images
   are real screenshots of the rewrite (assets/shots/).
   Colours follow the Roses launcher (crates/roses-launcher/src/windows.rs):
   background #09090b, panels #0e0e11, hairlines #1e1e23 / #2c2c32,
   crimson accent #d63a55, Play-button gradient #701228 -> #b82842,
   gold labels #e5aa6c, text #ececf0, muted #9c9ca6, beta banner #541022 -> #280a14.
   Dark is the default (it matches the launcher); a light palette is used when
   the visitor's system asks for light.
   ========================================================================== */

:root {
  color-scheme: dark light;
  --bg: #09090b;
  --bg-head: #0b0b0d;
  --panel: #0e0e11;
  --panel-2: #141418;
  --wine: #1a1014;
  --rule: #1e1e23;
  --rule-2: #2c2c32;
  --text: #ececf0;
  --text-2: #d0d0d7;
  --muted: #9c9ca6;
  --accent: #d63a55;
  --btn-a: #701228;
  --btn-b: #b82842;
  --btn-text: #ffffff;
  --gold: #e5aa6c;
  --gold-soft: rgba(229, 170, 108, 0.14);
  --banner-a: #541022;
  --banner-b: #280a14;
  --banner-text: #f4e2e6;
  --banner-rule: #7a2438;
  --focus: #f0c088;
  --ok: #7fcf9a;
  --warn: #e5aa6c;
  --todo: #9c9ca6;
  --slot-a: #0d0d10;
  --slot-b: #0b0b0d;
  --slot-rule: #3a3a42;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.5);

  --font-display: "Palatino Linotype", "Book Antiqua", Palatino, "URW Palladio L", Georgia, serif;
  --font-body: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Code", ui-monospace, Consolas, "SF Mono", Menlo, monospace;
  --max: 1120px;
  --gutter: 16px;
  --radius: 6px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8f7f5;
    --bg-head: #ffffff;
    --panel: #ffffff;
    --panel-2: #f1efec;
    --wine: #fbf1f3;
    --rule: #e4e1dd;
    --rule-2: #cfcbc6;
    --text: #16151a;
    --text-2: #2f2d35;
    --muted: #5c5a64;
    --accent: #b3223f;
    --btn-a: #701228;
    --btn-b: #a3233b;
    --gold: #8a531a;
    --gold-soft: rgba(138, 83, 26, 0.10);
    --banner-a: #f6e3e7;
    --banner-b: #fbf1f3;
    --banner-text: #4a1020;
    --banner-rule: #e8c3cb;
    --focus: #8a531a;
    --ok: #1d7a43;
    --warn: #8a531a;
    --todo: #5c5a64;
    --slot-a: #f1efec;
    --slot-b: #ebe8e4;
    --slot-rule: #bdb8b2;
    --shadow: 0 18px 48px rgba(30, 20, 20, 0.12);
  }
}

@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-body);
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  position: absolute !important; 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: -48px; z-index: 20;
  background: var(--panel); color: var(--text); padding: 8px 14px; border: 1px solid var(--rule-2); border-radius: 4px;
}
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-head { border-bottom: 1px solid var(--rule); background: var(--bg-head); }
.head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
.wordmark {
  display: inline-flex; align-items: baseline; gap: 2px;
  color: var(--text); text-decoration: none;
  font-family: var(--font-mono); font-weight: 700; font-size: 19px; letter-spacing: -0.01em;
}
.wordmark .mark { color: var(--accent); }
.wordmark:hover .name { text-decoration: underline; text-decoration-thickness: 1px; }
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 20px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------- Banner (beta notice, as in the launcher) ---------- */
.banner { background: linear-gradient(90deg, var(--banner-a), var(--banner-b)); border-bottom: 1px solid var(--banner-rule); color: var(--banner-text); font-size: 14px; }
.banner .container { display: flex; flex-wrap: wrap; gap: 4px 14px; padding-top: 8px; padding-bottom: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 4px; border: 1px solid transparent;
  font: 600 16px/1.2 var(--font-body); text-decoration: none; text-align: center;
}
.btn:hover { filter: brightness(1.08); }
.btn-primary { background: linear-gradient(90deg, var(--btn-a), var(--btn-b)); color: var(--btn-text); }
.btn-ghost { background: var(--panel); border-color: var(--rule-2); color: var(--text); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Type ---------- */
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.01em; }
h1 { font-size: clamp(40px, 8vw, 72px); line-height: 1.05; margin: 12px 0 16px; }
h2 { font-size: clamp(26px, 4vw, 36px); line-height: 1.15; margin: 0 0 12px; }
h3 { font-size: 18px; line-height: 1.3; margin: 0 0 6px; }
p { margin: 0 0 14px; }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--text-2); max-width: 38em; }
.sub { color: var(--muted); max-width: 46em; margin-bottom: 28px; }
.eyebrow { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin: 0 0 8px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.mono, code { font-family: var(--font-mono); font-size: 0.9em; }
.small { font-size: 14px; color: var(--muted); }

/* ---------- Sections ---------- */
main section { padding: 64px 0; border-bottom: 1px solid var(--rule); }
main section:last-child { border-bottom: 0; }
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); }
.hero::before {
  /* flat heraldic rays drawn in CSS: no image */
  content: ""; position: absolute; width: 1200px; height: 1200px; left: 60%; top: 50%;
  transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent) 0 16%, transparent 44%),
    repeating-conic-gradient(from 0deg, var(--gold-soft) 0 4deg, transparent 4deg 15deg);
  -webkit-mask: radial-gradient(circle, #000 0 28%, transparent 60%);
          mask: radial-gradient(circle, #000 0 28%, transparent 60%);
  opacity: 0.7;
}
.hero .container { position: relative; padding-top: 56px; padding-bottom: 64px; }
.hero-split { display: grid; gap: 36px; align-items: center; }
@media (min-width: 960px) { .hero-split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; } }
.hero-text { min-width: 0; }
.hero-shot img { box-shadow: var(--shadow); }

/* Game title: plain type, no logos */
h1.game-title { font-size: clamp(36px, 6.2vw, 64px); line-height: 1.04; margin: 14px 0 14px; }
.game-title .pre {
  display: block; margin-bottom: 6px; font-size: 0.42em; letter-spacing: 0.06em;
  color: var(--gold); font-weight: 600;
}
.game-title .main { display: block; }
.title-sub { display: flex; align-items: baseline; gap: 8px 12px; color: var(--muted); font-size: 15px; margin: 0 0 20px; }
/* Plain-text platform label in the site's own type (not a platform logo) */
.platform {
  display: inline-block; padding: 3px 7px 2px; border: 1.5px solid currentColor; border-radius: 3px;
  font: 700 12px/1.1 var(--font-mono); letter-spacing: 0.08em; color: var(--text-2); flex: none;
}
.game-pre .platform { font-size: 11px; padding: 2px 6px 1px; color: var(--text-2); }
.note.disclaim { margin: 0 0 24px; max-width: 40em; font-size: 15px; }
@media (min-width: 900px) { .hero .container { padding-top: 88px; padding-bottom: 96px; } }

/* ---------- Grids and cards ---------- */
.grid { display: grid; gap: 18px; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--text-2); font-size: 15px; }

/* Game cards on the home page */
.games { display: grid; gap: 18px; }
@media (min-width: 700px) { .games { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .games { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.game { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--rule-2); border-radius: 8px; overflow: hidden; }
.game-top {
  display: flex; align-items: center; gap: 14px; padding: 20px 22px;
  background: linear-gradient(180deg, var(--wine), var(--panel)); border-bottom: 1px solid var(--rule);
}
.game-top h3 { font-family: var(--font-display); font-size: 25px; font-weight: 600; line-height: 1.15; margin: 0 0 4px; }
.game-top h3 a { color: inherit; text-decoration: none; }
.game-top h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.game-pre { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.game-shot { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 1px solid var(--rule); background: #000; }
.game-top .of { display: block; font-size: 14px; color: var(--muted); }
.game-body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 20px 22px 22px; }
.game-body p { margin: 0; color: var(--text-2); font-size: 15px; }
.game-body .ctas { margin-top: auto; padding-top: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.tags li { font-size: 12px; letter-spacing: 0.04em; padding: 2px 9px; border: 1px solid var(--rule-2); border-radius: 999px; color: var(--muted); }
.tags li.hot { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.game.empty { border-style: dashed; border-color: var(--slot-rule); background: transparent; justify-content: center; align-items: flex-start; padding: 24px; color: var(--muted); }
.game.empty h3 { font-family: var(--font-display); font-size: 22px; color: var(--text-2); }
.game.empty p { margin: 0; font-size: 15px; }

/* Steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 18px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps li { counter-increment: step; position: relative; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px 22px 20px 64px; }
.steps li::before {
  content: counter(step); position: absolute; left: 20px; top: 20px;
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--rule-2);
  display: grid; place-items: center; font-weight: 600; font-size: 14px; color: var(--gold);
}
.steps p { margin: 0; color: var(--text-2); font-size: 15px; }

/* Status lists */
.status h3 { display: flex; align-items: center; gap: 10px; }
.status ul { list-style: none; padding: 0; margin: 12px 0 0; }
.status li { position: relative; padding-left: 24px; margin: 8px 0; color: var(--text-2); font-size: 15px; }
.status li::before { content: ""; position: absolute; left: 3px; top: 0.6em; width: 8px; height: 8px; transform: rotate(45deg); }
.status .ok li::before { background: var(--ok); }
.status .beta li::before { background: var(--warn); }
.status .todo li::before { background: transparent; border: 1.5px solid var(--todo); }
.pill { font: 600 11px/1 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; border: 1px solid currentColor; }
.pill.ok { color: var(--ok); }
.pill.beta { color: var(--warn); }
.pill.todo { color: var(--todo); }

/* Screenshot gallery: plain links to the full-size image, no script */
figure { margin: 0; }
.gallery { display: grid; gap: 18px; }
@media (min-width: 560px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gallery a, .hero-shot a { display: block; border-radius: var(--radius); }
.gallery img, .hero-shot img {
  display: block; width: 100%; height: auto; border: 1px solid var(--rule-2);
  border-radius: var(--radius); background: #000;
}
.gallery img { aspect-ratio: 4 / 3; object-fit: contain; }
.gallery a:hover img, .hero-shot a:hover img { border-color: var(--gold); }
figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* Link rows (community, report) */
.linkrow { display: flex; flex-wrap: wrap; gap: 12px; }

/* FAQ: native <details>, no script */
.faq { display: grid; gap: 10px; max-width: 52em; }
.faq details { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-weight: 400; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] summary { border-bottom: 1px solid var(--rule); }
.faq .a { padding: 14px 18px 4px; color: var(--text-2); font-size: 15px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }

/* Prose pages (legal) */
.prose { max-width: 46em; }
.prose h2 { font-size: clamp(22px, 3vw, 28px); margin-top: 40px; }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }
.prose p, .prose li { color: var(--text-2); }

/* Callout */
.note { border-left: 3px solid var(--accent); background: var(--panel); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; color: var(--text-2); }
.note p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--rule); padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
.foot { display: grid; gap: 24px; }
@media (min-width: 860px) { .foot { grid-template-columns: 1fr 2fr; } }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--text); }
.disclaimer { font-size: 13px; line-height: 1.6; margin: 0; max-width: 62em; }

/* ---------- 404 ---------- */
.lost { min-height: min(50vh, 520px); display: grid; align-content: center; }
.lost .code { font-family: var(--font-mono); color: var(--accent); font-size: 15px; letter-spacing: 0.1em; }
