/* pikugames.com: the house of casual games. A deep ink shelf (the colour of the PikuGames mark's tile), warm white
   type and one tangerine for the studio; every game brings its own colours to its tile and its landing. The shelf
   is the page: each game's gameplay clip, where it plays, and a button that plays it.
   An asset: URL inside url() becomes a hashed URL at build; the .g-<id> theme classes are appended by build.mjs. */

@font-face { font-family: "Titillium Web"; font-weight: 600; font-style: normal; font-display: swap;
  src: url(/assets/fonts/titilliumweb-semibold.6032ed59.woff2) format("woff2"); }
@font-face { font-family: "Titillium Web"; font-weight: 700; font-style: normal; font-display: swap;
  src: url(/assets/fonts/titilliumweb-bold.fd4d4065.woff2) format("woff2"); }
@font-face { font-family: "Titillium Web"; font-weight: 900; font-style: normal; font-display: swap;
  src: url(/assets/fonts/titilliumweb-black.d81b5f7f.woff2) format("woff2"); }

:root {
  --sheet: #12101a;            /* the shelf: deep ink, the mark's tile */
  --sheet-deep: #1c1928;       /* a tile, one step up */
  --sheet-up: #262236;         /* a tile under the pointer, chips */
  --line: rgba(255, 247, 235, 0.12);
  --ink: #fff7eb;              /* warm white, the mark's p */
  --ink-2: #c4bccf;            /* secondary, tinted from the shelf, never gray */
  --amber: #ff8a3d;            /* the studio's one signal: tangerine, the mark's foot */
  --amber-deep: #e0661a;
  --cut: #fff7eb;
  --field: var(--sheet);       /* a game's tile or landing overrides this with its own ground */
  --field-ink: var(--ink);
  --accent: var(--amber);
  --accent-deep: var(--amber-deep);
  --tilt: 0deg;
  --module: 24px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 18px;
  --sans: "Titillium Web", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --clock: 220ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-up: 0 2px 4px rgba(0, 0, 0, 0.3), 0 26px 44px -14px rgba(0, 0, 0, 0.75);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--sheet-up) var(--sheet); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--sheet);
  color: var(--ink);
  font: 600 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--amber); color: var(--sheet); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 3px;
  transition: text-decoration-color var(--clock) var(--ease), color var(--clock) var(--ease); }
a:hover { text-decoration-color: var(--ink); }
h1, h2, h3 { font-weight: 900; line-height: 1.05; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; }
.skip { position: absolute; left: 8px; top: -60px; padding: 8px 14px; background: var(--ink); color: var(--sheet);
  border-radius: 999px; z-index: 10; }
.skip:focus { top: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; }
.glyph { flex: none; }

/* ---- chrome: header and footer ----------------------------------------------------------------------------- */
.top, .foot, main > * { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.top { display: flex; align-items: center; justify-content: space-between; gap: var(--module);
  padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-icon { border-radius: 8px; }
.mark { width: 34px; height: 34px; flex: none; }
.wordmark { font-weight: 900; font-size: 1.375rem; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.wordmark span { color: var(--amber); }
.top nav { display: flex; gap: 2px; flex-wrap: wrap; }
.top nav a { text-decoration: none; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 8px 12px; border-radius: 999px; color: var(--ink-2);
  transition: color var(--clock) var(--ease), background-color var(--clock) var(--ease); }
.top nav a:hover { color: var(--ink); background: rgba(255, 247, 235, 0.08); }
.top nav a[aria-current="page"] { color: var(--ink); background: rgba(255, 247, 235, 0.1); }
.foot { margin-top: calc(var(--module) * 4); padding: calc(var(--module) * 1.5) 0 calc(var(--module) * 2);
  border-top: 1px solid var(--line); font-size: 0.9375rem; color: var(--ink-2);
  display: grid; gap: 8px var(--module); grid-template-columns: 1fr auto; align-items: baseline; }
.foot-brand { grid-column: 1; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.foot-brand a { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.foot .mark { width: 24px; height: 24px; }
.foot .wordmark { font-size: 1.125rem; }
.foot nav { grid-column: 2; grid-row: 1 / 4; display: flex; flex-direction: column; gap: 4px; text-align: right; }
.foot a { text-decoration-thickness: 1.5px; }

/* ---- the hub: the headline, then the shelf ------------------------------------------------------------------ */
.hero-studio { padding: calc(var(--module) * 2) 0 calc(var(--module) * 1.5); display: grid; gap: 14px; }
.hero-studio h1 { font-size: clamp(2.5rem, 6.4vw, 5.25rem); letter-spacing: -0.035em; line-height: 0.98;
  max-width: 14ch; }
.hero-studio .lede { font-size: clamp(1.125rem, 1.8vw, 1.375rem); color: var(--ink-2); max-width: 46ch;
  font-weight: 600; }

.library-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px var(--module); margin-bottom: 18px; }
.library-bar h2 { font-size: 1.5rem; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.filters input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.filters label { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 16px;
  border-radius: 999px; background: var(--sheet-deep); color: var(--ink-2); font-size: 0.9375rem; font-weight: 700;
  cursor: pointer; box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color var(--clock) var(--ease), color var(--clock) var(--ease); }
.filters label span { font-variant-numeric: tabular-nums; font-size: 0.8125rem; opacity: 0.7; }
.filters label:hover { color: var(--ink); background: var(--sheet-up); }
.filters input:checked + label { background: var(--amber); color: var(--sheet); box-shadow: none; }
.filters input:focus-visible + label { outline: 3px solid var(--amber); outline-offset: 3px; }
/* the filter: a chip hides every tile that is not out on its platform, and the "on the way" tile */
.library:has(#f-web:checked) .tile:not(.on-web),
.library:has(#f-android:checked) .tile:not(.on-android),
.library:has(#f-iphone:checked) .tile:not(.on-iphone) { display: none; }

.shelf { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--module);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.tile { position: relative; display: flex; flex-direction: column; border-radius: var(--radius);
  background: var(--sheet-deep); box-shadow: var(--shadow); overflow: hidden; min-width: 0;
  transition: transform var(--clock) var(--ease), box-shadow var(--clock) var(--ease),
  background-color var(--clock) var(--ease); }
.tile:hover, .tile:focus-within { transform: translateY(-4px); box-shadow: var(--shadow-up);
  background: var(--sheet-up); }
.tile-media { display: block; }
.tile-body { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; flex: 1; }
.tile-head { display: flex; align-items: center; gap: 14px; }
.tile-icon { width: 56px; height: 56px; border-radius: 14px; flex: none; box-shadow: 0 0 0 1px var(--line); }
.tile h3 { font-size: 1.5rem; }
.tile h3 a { text-decoration: none; }
.tile h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.genre { color: var(--amber); font-size: 0.9375rem; font-weight: 700; margin-top: 2px; }
.tile .blurb { color: var(--ink-2); font-size: 1rem; }
.tile-actions { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.also { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.9375rem; font-weight: 700; color: var(--ink-2); }
.also a { text-decoration-color: var(--line); }
.also a:hover { color: var(--ink); text-decoration-color: var(--accent); }

/* the clip: a 16:9 poster, the muted loop fades in over it while it plays */
.clip { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.clip img, .clip video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clip-video { opacity: 0; transition: opacity 320ms var(--ease); }
.clip.is-playing .clip-video, .clip-video[autoplay] { opacity: 1; }
.tile .clip img { transition: transform 600ms var(--ease); }
.tile:hover .clip img { transform: scale(1.03); }

/* the play button: the game's own colour on its own ground */
.play { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 20px 10px 16px;
  border-radius: 999px; background: var(--amber); color: var(--sheet); text-decoration: none; font-weight: 700;
  letter-spacing: 0.01em; transition: transform var(--clock) var(--ease), filter var(--clock) var(--ease); }
.play:hover, .play:focus-visible { transform: translateY(-2px); filter: brightness(1.08); }
.play .glyph { width: 18px; height: 18px; }
.play-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line);
  padding-left: 20px; }

/* where it plays: one badge per platform, a dashed one for "soon" */
.platforms-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pf { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 8px;
  background: rgba(255, 247, 235, 0.08); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; }
.pf .glyph { width: 16px; height: 16px; }
.pf-soon { background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.pf-soon span { font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); }


/* where each platform stands */
.anywhere { margin-top: calc(var(--module) * 3.5); }
.anywhere h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); max-width: 20ch; }
.anywhere ul { list-style: none; margin: calc(var(--module) * 1.25) 0 0; padding: 0; display: grid;
  gap: var(--module); }
@media (min-width: 800px) { .anywhere ul { grid-template-columns: repeat(3, 1fr); } }
.anywhere li { display: grid; gap: 8px; align-content: start; padding-top: 18px; border-top: 2px solid var(--line); }
.anywhere li .glyph { width: 28px; height: 28px; color: var(--amber); }
.anywhere h3 { font-size: 1.25rem; }
.anywhere p { color: var(--ink-2); max-width: 40ch; }

/* ---- the one-account footnote: small type under the games, never a second headline ------------------------- */
.account { margin-top: calc(var(--module) * 3); padding-top: var(--module); border-top: 1px solid var(--line);
  display: grid; gap: 10px; font-size: 0.9rem; color: var(--ink-2); }
.account > * { max-width: 64ch; }
.account h2 { font-size: 1rem; letter-spacing: 0.02em; color: var(--ink); }
.account-copy a { font-weight: 700; color: var(--ink); }

/* ---- status and store pills -------------------------------------------------------------------------------- */
.status { display: inline-flex; align-items: center; gap: 10px; font-size: 0.8125rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor;
  flex: none; }
.status-live { color: var(--ink); }
.status-live::before { background: var(--amber); border-color: var(--amber); }
.stores { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.store { display: inline-block; padding: 10px 20px; border-radius: 999px; color: var(--ink); text-decoration: none;
  font-weight: 700; letter-spacing: 0.02em; box-shadow: inset 0 0 0 2px currentColor;
  transition: transform var(--clock) var(--ease), background-color var(--clock) var(--ease); }
.store:hover, .store:focus-visible { transform: translateY(-2px); background: rgba(127, 127, 127, 0.14); }
.stores-none { display: none; }

/* ---- a game landing: the game's own colour owns the whole field -------------------------------------------- */
.page-game { background: var(--field); color: var(--field-ink); --line: rgba(127, 127, 127, 0.3); }
.page-game .top nav a, .page-game .brand { color: var(--field-ink); }
.page-game .top nav a { opacity: 0.8; }
.page-game .top nav a:hover { opacity: 1; background: rgba(127, 127, 127, 0.14); }
.page-game .top nav a[aria-current="page"] { background: none; }
.page-game .foot, .page-game .foot-brand { color: var(--field-ink); }
.page-game a { text-decoration-color: var(--accent); }
.page-game a:hover { text-decoration-color: var(--field-ink); }
.page-game :focus-visible { outline-color: var(--accent); }
.page-game ::selection { background: var(--accent); color: var(--field); }
.page-game .status { color: var(--field-ink); opacity: 0.85; }
.page-game .stores-none { display: inline-flex; }
.page-game .store { color: var(--field-ink); }
.page-game .pf { background: rgba(127, 127, 127, 0.16); }
.page-game .pf-soon { background: none; color: var(--field-ink); opacity: 0.8; }
.page-game .pf-soon span { color: inherit; font-weight: 700; }   /* the page ink on every field, light or dark */
.hero-game { display: grid; gap: calc(var(--module) * 1.5); padding: var(--module) 0 calc(var(--module) * 2);
  align-items: center; }
.hero-game > *, .tile > *, .account > *, .shots li { min-width: 0; }
@media (min-width: 900px) { .hero-game { grid-template-columns: 7fr 5fr; gap: calc(var(--module) * 2); } }
.hero-copy { display: grid; gap: 18px; justify-items: start; }
.hero-copy h1 { font-size: clamp(2.75rem, 6vw, 5rem); }
.hero-copy .subtitle { font-size: 1.125rem; font-weight: 700; opacity: 0.85; margin-top: -8px; }
.hero-copy .tagline { font-size: clamp(1.25rem, 2.2vw, 1.625rem); font-weight: 900; line-height: 1.2;
  letter-spacing: -0.01em; max-width: 22ch; }
.platforms { font-weight: 700; opacity: 0.75; }
.hero-art .clip { border-radius: 24px; box-shadow: var(--shadow); }
.about { display: grid; gap: 16px; max-width: 64ch; font-size: 1.125rem; padding: calc(var(--module) * 2) 0
  var(--module); }
.facts dl { display: grid; gap: 0; margin: 0; border-top: 2px solid var(--field-ink); }
@media (min-width: 700px) { .facts dl { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } }
.facts dl > div { padding: 14px 16px 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.7; }
.facts dd { margin: 4px 0 0; font-weight: 700; font-size: 1.0625rem; }
.shots { padding: calc(var(--module) * 2) 0 var(--module); }
.shots ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--module); }
@media (min-width: 700px) { .shots ul { grid-template-columns: repeat(2, 1fr); } }
.shots li { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); align-self: start;
  background: rgba(127, 127, 127, 0.12); }
.shots figure { margin: 0; }
/* every shot is the same 16:9 cut, so the two-column strip stays even whatever the source size */
.shots li img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shots figcaption { padding: 10px 14px 12px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; }
.game-foot { display: grid; gap: 12px; padding: var(--module) 0; max-width: 64ch; }
.game-foot .links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-weight: 700; }
.testing { font-weight: 700; }
.openapp { opacity: 0.8; }

/* ---- the reading pages: policies, support, deletion, 404 -------------------------------------------------- */
.doc { max-width: 68ch; padding: var(--module) 0; font-size: 1.0625rem; line-height: 1.6; }
.doc-head { margin-bottom: calc(var(--module) * 1.5); }
.doc h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); }
.updated { margin-top: 12px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-2); }
.doc .lede { font-size: 1.1875rem; }
.doc h2 { font-size: 1.5rem; margin: calc(var(--module) * 2) 0 12px; scroll-margin-top: var(--module); }
.doc h2 + p, .doc p + p, .doc ul + p, .doc p + ul { margin-top: 14px; }
.doc ul { padding-left: 1.2em; margin: 14px 0 0; }
.doc li + li { margin-top: 6px; }
.doc strong { font-weight: 900; }
.faq { margin: 0; }
.faq dt { font-weight: 900; margin-top: 18px; }
.faq dd { margin: 4px 0 0; }
.notfound { padding: calc(var(--module) * 3) 0; }

/* ---- small screens and motion ------------------------------------------------------------------------------ */
@media (max-width: 599px) {
  body { font-size: 16px; }
  .top { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 0 6px; }
  .top nav { margin-left: -12px; }
  .foot { grid-template-columns: 1fr; }
  .foot nav { grid-column: 1; grid-row: auto; text-align: left; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1);
    padding: 4px var(--gutter); scrollbar-width: none; }
  .filters label { white-space: nowrap; }
  .tile-body { padding: 16px 16px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .tile, .tile .clip img, .play, .store, a, .top nav a, .filters label, .clip-video { transition: none; }
  .tile:hover, .tile:focus-within { transform: none; }
  .tile:hover .clip img { transform: none; }
}

/* per-game themes, generated from src/games.mjs */
.g-pikuball{--accent:#1f8a63;--accent-deep:#166b4c;--field:#fdfaf4;--field-ink:#233240;--tilt:-1.6deg}
.g-pikuguns{--accent:#ffb852;--accent-deep:#c75a2e;--field:#130e0d;--field-ink:#fff7eb;--tilt:1.2deg}
.g-pikubots{--accent:#3ab8ff;--accent-deep:#ff7a2f;--field:#0a0e14;--field-ink:#ebf2f7;--tilt:-0.9deg}
.g-tala{--accent:#f2c46b;--accent-deep:#3d5fc4;--field:#0d1630;--field-ink:#f3eee4;--tilt:1.4deg}
.g-tinysoldiers{--accent:#c4252b;--accent-deep:#4b5320;--field:#fbf3e6;--field-ink:#2b2117;--tilt:-1.2deg}
