/* Joybloom Games — one stylesheet, no external resources. Colors from Slipway (game/ui.gd). */

@font-face {
  font-family: "Open Sans";
  src: url("/assets/fonts/OpenSans-SemiBold-subset.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f4f1ea;
  --surface: #fbf9f4;
  --surface-2: #e9e4d8;
  --line: #ddd6c8;
  --ink: #3d405b;
  --ink-soft: #5c586c;
  --link: #3a5a8e;
  --blue: #5b7db1;
  --gold: #d4a24c;
  --coral: #e07b5f;
  --green: #3d9970;
  --plum: #8e6bb8;
  --focus: #3a5a8e;
  --shadow: 0 1px 2px rgb(61 64 91 / 6%), 0 10px 30px rgb(61 64 91 / 9%);
  --radius: 22px;
  --heading: "Open Sans", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1d2b;
    --surface: #25263a;
    --surface-2: #303148;
    --line: #3c3d56;
    --ink: #efebe2;
    --ink-soft: #bfbacb;
    --link: #a8c1ec;
    --focus: #a8c1ec;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.65 var(--body);
  overflow-wrap: break-word;
}

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

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--heading); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 7vw, 3rem); }
h2 { font-size: clamp(1.35rem, 4.5vw, 1.75rem); margin-top: 1.8em; }
h3 { font-size: 1.2rem; margin-top: 1.4em; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li + li { margin-top: 0.35em; }
strong { font-weight: 650; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--surface); color: var(--ink); padding: 0.6em 1em; border-radius: 10px; box-shadow: var(--shadow);
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 64rem; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 46rem; }

/* header */
.site-header { padding: 14px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
  font-family: var(--heading); font-weight: 600; font-size: 1.15rem;
}
.brand svg { flex: none; }
.brand .bloom-core { fill: var(--bg); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px 6px; flex-wrap: wrap; }
.site-nav li + li { margin: 0; }
.site-nav a {
  display: block; padding: 0.45em 0.75em; border-radius: 999px; color: var(--ink); text-decoration: none;
  font-family: var(--heading); font-weight: 600; font-size: 0.95rem;
}
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { background: var(--surface-2); }

main { padding-bottom: 3rem; }

/* hero */
.hero { padding: 2.5rem 0 1rem; }
.eyebrow { font-family: var(--heading); font-weight: 600; color: var(--ink-soft); font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.4em; }
.lead { font-size: clamp(1.1rem, 3.6vw, 1.3rem); color: var(--ink-soft); max-width: 38rem; }
.petals { display: flex; gap: 8px; margin: 1.4rem 0 0; }
.petals span { width: 34px; height: 8px; border-radius: 99px; }
.petals .c1 { background: var(--blue); }
.petals .c2 { background: var(--gold); }
.petals .c3 { background: var(--coral); }
.petals .c4 { background: var(--green); }

/* cards */
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; border: 1px solid var(--line);
}
@media (min-width: 640px) { .card { padding: 32px; } }

.game-head { display: flex; align-items: center; gap: 16px; margin-bottom: 1rem; }
.game-head img { width: 88px; height: 88px; border-radius: 22%; box-shadow: 0 2px 8px rgb(61 64 91 / 15%); flex: none; }
.game-head h2, .game-head h3 { margin: 0; }
.game-head h1 { margin: 0; font-size: clamp(2rem, 7vw, 2.75rem); }
.game-head p { margin: 0.15em 0 0; color: var(--ink-soft); }
.game-head h3 { font-size: 1.5rem; }
.game-head h3 a { color: inherit; text-decoration: none; }
.game-head h3 a:hover { text-decoration: underline; }

/* screenshots */
.shots { list-style: none; margin: 1.25rem 0; padding: 0; display: grid; gap: 10px; }
.shots li + li { margin: 0; }
.shots img { width: 100%; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.shots-3 { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 640px) { .shots-3 { gap: 16px; max-width: 600px; } }
.shots-scroll {
  grid-auto-flow: column; grid-auto-columns: min(46%, 220px);
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; overscroll-behavior-x: contain;
}
.shots-scroll li { scroll-snap-align: start; }
.shots-scroll figcaption { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.4em; }
.shots figure { margin: 0; }

/* store links */
.stores { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin: 1.25rem 0 0.5rem; }
.badge { display: inline-block; line-height: 0; border-radius: 10px; }
.badge img { width: 156px; height: 52px; }
.soon {
  margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 0.55em 1em; border-radius: 12px;
  border: 1px dashed var(--line); color: var(--ink-soft); font-family: var(--heading); font-weight: 600; font-size: 0.95rem;
}
.soon::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }

.more { font-family: var(--heading); font-weight: 600; }

/* feature list */
.features { list-style: none; padding: 0; display: grid; gap: 12px; }
.features li + li { margin: 0; }
.features li { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 14px 46px; position: relative; }
.features li::before { content: ""; position: absolute; left: 16px; top: 1.1em; width: 16px; height: 16px; border-radius: 5px; background: var(--c, var(--blue)); }
.features li:nth-child(4n+2) { --c: var(--gold); }
.features li:nth-child(4n+3) { --c: var(--coral); }
.features li:nth-child(4n+4) { --c: var(--green); }
.features strong { font-family: var(--heading); font-weight: 600; }
@media (min-width: 720px) { .features { grid-template-columns: 1fr 1fr; } }

.links-row { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; }
.links-row li + li { margin: 0; }
.pill {
  display: inline-block; padding: 0.55em 1.1em; border-radius: 999px; background: var(--surface-2);
  color: var(--ink); text-decoration: none; font-family: var(--heading); font-weight: 600;
}
.pill:hover { background: var(--line); }

/* long text pages */
.doc h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); margin-top: 1.5rem; }
.doc h2 { scroll-margin-top: 16px; }
.doc .meta { color: var(--ink-soft); }
.doc .note { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: 12px; padding: 12px 16px; }
.doc code { font-size: 0.92em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 6px; overflow-wrap: anywhere; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; }
.toc h2 { font-size: 1rem; margin: 0 0 0.4em; }
.toc ul { margin: 0; }
.mail { font-family: var(--heading); font-weight: 600; font-size: 1.1rem; }

.lang-switch { margin: 1.25rem 0 0; }
.lang-switch ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lang-switch li + li { margin: 0; }
.lang-switch a {
  display: block; padding: 0.3em 0.75em; border-radius: 999px; border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-size: 0.92rem;
}
.lang-switch a:hover { background: var(--surface-2); }
.lang-switch a[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.lang-switch .label { font-family: var(--heading); font-weight: 600; font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 0.4em; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 1.75rem 0 2.25rem; color: var(--ink-soft); font-size: 0.95rem; }
.site-footer ul { list-style: none; margin: 0 0 0.75em; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer li + li { margin: 0; }
.site-footer a { color: var(--ink-soft); }
.site-footer p { margin: 0; }

.center { text-align: center; }
.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;
}
.notfound { padding: 4rem 0 2rem; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
.notfound .lead { margin-inline: auto; }
.notfound .links-row { justify-content: center; }
