/* Lunipost MiniGames: site styles.
   Colours, fonts, spacing, radii and sizes come from tokens.css, which is generated from
   design/tokens.json. Use the token variables (var(--space-4), var(--color-text-primary), ...) rather
   than raw values: Figma binds its variables to layers by these names when a page is captured.
   Each "== Name ==" section below is one part of the site and matches the Figma component of the
   same name (see README.md, "Parts of the site").
   Breakpoints: 40rem (640 px, large phones and up) and 60rem (960 px, laptops and up). */

/* == Fonts == self-hosted variable fonts, SIL Open Font License 1.1 (see /assets/fonts/*-OFL.txt).
   Latin characters only (from Fontsource 5.3.0); anything else falls back to the system font named
   in the tokens. The family names match the tokens and Figma's built-in Google Fonts. */

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/fredoka-latin-wght-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/fredoka-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/assets/fonts/nunito-latin-wght-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/nunito-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* == Base == */

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

:root {
  color-scheme: dark;
  scrollbar-color: var(--color-night-600) var(--color-bg-deep);
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg-page);
  color: var(--color-text-secondary);
  font-family: var(--font-family-body);
  font-size: var(--font-size-md);
  line-height: var(--font-line-height-normal);
  overflow-wrap: break-word;
}

main { flex: 1 0 auto; }

[hidden] { display: none !important; }

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-family-display);
  font-weight: var(--font-weight-semibold);
  line-height: var(--font-line-height-snug);
  color: var(--color-text-primary);
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a {
  color: var(--color-link-default);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--color-link-hover); }

:focus-visible {
  outline: var(--size-focus-ring) solid var(--color-focus-ring);
  outline-offset: 3px;
}

::selection { background: var(--color-candy-grape); color: var(--color-text-primary); }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - 2 * var(--space-4), var(--size-content));
  margin-inline: auto;
}

@media (min-width: 40rem) {
  .container { width: min(100% - 2 * var(--space-8), var(--size-content)); }
}

/* Decorative night sky behind the hero, page headers and the 404 page. */
.starfield { position: relative; isolation: isolate; }
.starfield::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, var(--color-night-100) 50%, transparent 52%),
    radial-gradient(1px 1px at 64% 32%, var(--color-night-200) 50%, transparent 52%),
    radial-gradient(2px 2px at 82% 74%, var(--color-candy-moon) 50%, transparent 52%),
    radial-gradient(1px 1px at 33% 82%, var(--color-night-100) 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 48% 8%, var(--color-night-300) 50%, transparent 52%),
    radial-gradient(1px 1px at 91% 41%, var(--color-night-100) 50%, transparent 52%);
  background-size: 260px 260px, 330px 330px, 410px 410px, 290px 290px, 370px 370px, 230px 230px;
  opacity: 0.7;
}
.starfield::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(60% 70% at 15% 0%, color-mix(in srgb, var(--color-candy-grape) 22%, transparent), transparent 70%),
    radial-gradient(50% 60% at 95% 20%, color-mix(in srgb, var(--color-candy-sky) 14%, transparent), transparent 70%);
}

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--color-accent-primary);
  color: var(--color-text-on-accent);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: var(--color-text-on-accent); }

/* == Eyebrow == the small capitals line above a heading */

.eyebrow {
  margin: 0 0 var(--space-2);
  font-family: var(--font-family-display);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-candy-moon);
}

/* == Button == variants: primary, secondary; Store button = primary with an arrow */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--size-tap);
  padding: var(--space-3) var(--space-6);
  border: var(--size-border) solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-family-display);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  line-height: var(--font-line-height-tight);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--duration-fast), border-color var(--duration-fast),
    color var(--duration-fast), transform var(--duration-fast), box-shadow var(--duration-fast);
}

.button--primary {
  background-color: var(--color-accent-primary);
  color: var(--color-text-on-accent);
  box-shadow: 0 4px 0 var(--color-candy-orange);
}
.button--primary:hover { background-color: var(--color-accent-primary-hover); color: var(--color-text-on-accent); }
.button--primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--color-candy-orange); }

.button--secondary {
  background-color: transparent;
  border-color: var(--color-border-strong);
  color: var(--color-text-primary);
}
.button--secondary:hover { border-color: var(--color-accent-secondary); color: var(--color-text-primary); }
.button--secondary:active { transform: translateY(1px); }

.button__icon { width: 1.1em; height: 1.1em; flex: none; }

/* == Store status == shown instead of a store button until a game is out */

.store-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--size-tap);
  margin: 0;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-pill);
  background-color: var(--color-surface-raised);
  color: var(--color-text-primary);
  font-family: var(--font-family-display);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
}
.store-status::before {
  content: "";
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background-color: var(--color-candy-moon);
}

/* == Chip == small facts such as "Android" or "Ages 13+" */

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip {
  padding: var(--space-1) var(--space-3);
  border: var(--size-border) solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

/* == Header == */

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: var(--size-header);
  padding-block: var(--space-2);
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--size-tap);
  color: var(--color-text-primary);
  font-family: var(--font-family-display);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}
.site-header__brand:hover { color: var(--color-text-primary); }

.site-header__logo {
  width: var(--size-logo-mark);
  height: var(--size-logo-mark);
  transition: transform var(--duration-base);
}
.site-header__brand:hover .site-header__logo { transform: rotate(-6deg) scale(1.06); }

.site-header__nav ul {
  display: flex;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header__nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--size-tap);
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  color: var(--color-text-secondary);
  font-family: var(--font-family-display);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
}
.site-header__nav a:hover { background-color: var(--color-surface-card); color: var(--color-text-primary); }
.site-header__nav a[aria-current] {
  background-color: var(--color-surface-card);
  box-shadow: inset 0 0 0 var(--size-border) var(--color-border-strong);
  color: var(--color-text-primary);
}

@media (max-width: 39.99rem) {
  .site-header__name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (min-width: 40rem) {
  .site-header__nav ul { gap: var(--space-2); }
  .site-header__nav a { padding: 0 var(--space-4); }
}

/* == Footer == */

.site-footer {
  margin-top: var(--space-16);
  padding: var(--space-10) 0 var(--space-8);
  border-top: var(--size-border) solid var(--color-border-subtle);
  background-color: var(--color-bg-deep);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.site-footer__inner {
  display: grid;
  gap: var(--space-4);
  justify-items: center;
  text-align: center;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-primary);
  font-family: var(--font-family-display);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}
.site-footer__brand:hover { color: var(--color-text-primary); }
.site-footer__brand img { width: 32px; height: 32px; }

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer__links li + li::before {
  content: "·";
  padding: 0 var(--space-1);
  color: var(--color-night-500);
}
.site-footer__links a {
  display: inline-block;
  padding: var(--space-2) var(--space-1);
  color: var(--color-text-secondary);
}
.site-footer__links a:hover { color: var(--color-link-hover); }
.site-footer__copy { display: inline-block; padding: var(--space-2) var(--space-1); }

.site-footer__games { max-width: 36rem; font-size: var(--font-size-xs); }
.site-footer__games a { display: inline-block; padding: var(--space-1) 0; color: var(--color-text-muted); }
.site-footer__games a:hover { color: var(--color-link-hover); }

/* == Hero == the top of the home page */

.hero { padding: var(--space-8) 0 var(--space-16); }

.hero__inner {
  display: grid;
  gap: var(--space-8);
  align-items: center;
  text-align: center;
}

.hero__media {
  justify-self: center;
  width: min(100%, 20rem);
}

.hero__title {
  font-size: var(--font-size-3xl);
  line-height: var(--font-line-height-tight);
}

.hero__lead {
  max-width: 36rem;
  margin: var(--space-4) auto 0;
  font-size: var(--font-size-lg);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

@media (min-width: 60rem) {
  .hero { padding: var(--space-12) 0 var(--space-20); }
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 27rem);
    gap: var(--space-16);
    text-align: left;
  }
  .hero__media { order: 2; width: 100%; }
  .hero__title { font-size: var(--font-size-5xl); }
  .hero__lead { margin-inline: 0; font-size: var(--font-size-xl); }
  .hero__actions { justify-content: flex-start; }
}

/* == Logo intro == the logo panel in the hero. The script plays the animated logo once; with
   reduced motion, Save-Data, or no script, the still logo shows instead. */

.logo-intro {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--color-bg-deep) url("/assets/media/logo-intro-start.webp") center / cover no-repeat;
  box-shadow: 0 0 0 var(--size-border) var(--color-border-subtle),
    0 30px 80px -30px color-mix(in srgb, var(--color-candy-grape) 70%, transparent);
}

.logo-intro__img,
.logo-intro__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.logo-intro__img { padding: 4%; object-fit: contain; }
.logo-intro__video { object-fit: cover; }

@media (prefers-reduced-motion: no-preference) {
  /* Wait for the animation; show the still logo after 3 s whatever happens. */
  .logo-intro__img { opacity: 0; animation: logo-intro-reveal var(--duration-slow) ease-out 3s forwards; }
  .logo-intro.is-static .logo-intro__img { animation-delay: 0s; }
}

@keyframes logo-intro-reveal { to { opacity: 1; } }

/* == Section heading == eyebrow, title and lead at the top of a section */

.section { padding: var(--space-12) 0; }

.section-heading {
  max-width: var(--size-prose);
  margin-bottom: var(--space-8);
}
.section-heading__title { font-size: var(--font-size-2xl); }
.section-heading__lead { margin-top: var(--space-3); font-size: var(--font-size-lg); }

@media (min-width: 60rem) {
  .section { padding: var(--space-16) 0; }
  .section-heading__title { font-size: var(--font-size-4xl); }
}

/* == Game themes == each game's accent and tint, used by cards, showcases and game pages */

.theme-up-we-bounce {
  --game-accent: var(--color-game-up-we-bounce-accent);
  --game-tint: var(--color-game-up-we-bounce-tint);
}
.theme-one-trip-only {
  --game-accent: var(--color-game-one-trip-only-accent);
  --game-tint: var(--color-game-one-trip-only-tint);
}
.theme-to-hell-and-back {
  --game-accent: var(--color-game-to-hell-and-back-accent);
  --game-tint: var(--color-game-to-hell-and-back-tint);
}

/* == Game showcase == a game with its lead screenshot, on the home page */

.showcase-list { display: grid; gap: var(--space-6); }

.game-showcase {
  display: flex;
  flex-direction: column;
  border: var(--size-border) solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--game-tint) 0%, var(--color-surface-card) 65%);
  transition: border-color var(--duration-base);
}
.game-showcase:hover,
.game-showcase:focus-within { border-color: var(--game-accent); }
.game-showcase__preview {
  display: block;
  border-radius: calc(var(--radius-lg) - var(--size-border)) calc(var(--radius-lg) - var(--size-border)) 0 0;
  overflow: hidden;
  border-bottom: var(--size-border) solid var(--color-border-subtle);
}
.game-showcase__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform var(--duration-base);
}
.game-showcase__image--up-we-bounce { object-position: center 62%; }
@media (prefers-reduced-motion: no-preference) {
  .game-showcase__preview:hover .game-showcase__image { transform: scale(1.03); }
}
.game-showcase__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--space-4) var(--space-5) var(--space-5);
}
.game-showcase__genre { color: var(--game-accent); }
.game-showcase__title { font-size: var(--font-size-xl); }
.game-showcase__text { margin-block: var(--space-3) var(--space-5); }
.game-showcase__actions {
  display: grid;
  justify-items: start;
  gap: var(--space-2);
  margin-top: auto;
}
.game-showcase__actions .store-status {
  min-height: 0;
  padding: 0;
  background: none;
  color: var(--color-text-muted);
  font: inherit;
  font-size: var(--font-size-sm);
}
.game-showcase__actions .store-status::before { background-color: var(--game-accent); }
.game-showcase__link,
.game-card__action {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--game-accent);
  font-weight: var(--font-weight-bold);
}
.game-showcase__link { min-height: var(--size-tap); }
.game-showcase__link span,
.game-card__action span { transition: transform var(--duration-fast); }
.game-showcase__link:hover span,
.game-showcase__link:focus-visible span,
.game-card:hover .game-card__action span,
.game-card:focus-within .game-card__action span { transform: translateX(var(--space-1)); }

/* == Game card == a compact link to a game page */

.game-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: var(--size-border) solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, var(--game-tint) 0%, var(--color-surface-card) 70%);
  transition: transform var(--duration-base), border-color var(--duration-base);
}
.game-card:hover { transform: translateY(-3px); border-color: var(--game-accent); }

.game-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background-color: var(--color-bg-deep);
}
.game-card__image--portrait { object-position: 50% 9%; }

.game-card__body {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-5);
}
.game-card__genre { margin: 0; color: var(--game-accent); }
.game-card__title { font-size: var(--font-size-xl); }
.game-card__title a { color: var(--color-text-primary); text-decoration: none; }
.game-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }
.game-card__title a:focus-visible { outline: none; }
.game-card:has(a:focus-visible) { outline: var(--size-focus-ring) solid var(--color-focus-ring); outline-offset: 3px; }
.game-card__tagline { color: var(--color-text-secondary); }
.game-card__status { margin-top: var(--space-2); color: var(--color-text-muted); font-size: var(--font-size-sm); }

/* == Game lineup == the three featured games share a row on larger screens */

.game-lineup {
  grid-template-columns: minmax(0, 1fr);
  max-width: var(--size-game-lineup-narrow);
  margin-inline: auto;
}
.game-lineup .game-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
}
.game-lineup .game-card__status { margin-top: auto; padding-top: var(--space-3); }
.game-card__action { min-height: var(--size-tap); }

@media (min-width: 60rem) {
  .game-lineup {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
  }
}

/* == Page header == the top of every inner page */

.page-header { padding: var(--space-10) 0 var(--space-8); }
.page-header__title { font-size: var(--font-size-3xl); }
.page-header__lead {
  max-width: var(--size-prose);
  margin-top: var(--space-4);
  font-size: var(--font-size-lg);
}
.page-header__meta { margin-top: var(--space-3); color: var(--color-text-muted); font-size: var(--font-size-sm); }

@media (min-width: 60rem) {
  .page-header { padding: var(--space-16) 0 var(--space-12); }
  .page-header__title { font-size: var(--font-size-4xl); }
}

/* == Breadcrumbs == */

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}
.breadcrumbs li + li::before { content: "/"; margin-right: var(--space-2); color: var(--color-night-500); }
.breadcrumbs a { color: var(--color-text-secondary); }

/* == Game hero == the top of a game page */

.game-hero {
  padding: var(--space-8) 0 var(--space-10);
  background: linear-gradient(180deg, var(--game-tint) 0%, var(--color-bg-page) 100%);
}
.game-hero__genre { color: var(--game-accent); }
.game-hero__title { font-size: var(--font-size-3xl); line-height: var(--font-line-height-tight); }
.game-hero__tagline {
  max-width: 40rem;
  margin-top: var(--space-3);
  color: var(--color-text-primary);
  font-family: var(--font-family-display);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
}
.game-hero .chip-list { margin-top: var(--space-5); }
.game-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }

@media (min-width: 60rem) {
  .game-hero { padding: var(--space-12) 0 var(--space-12); }
  .game-hero__title { font-size: var(--font-size-5xl); }
  .game-hero__tagline { font-size: var(--font-size-xl); }
}

.screenshot-gallery { margin-top: var(--space-2); }
.screenshot-gallery__grid {
  display: grid;
  gap: var(--space-5);
}
.screenshot-gallery__item { margin: 0; min-width: 0; }
.screenshot-gallery__link {
  display: block;
  border: var(--size-border) solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: zoom-in;
}
.screenshot-gallery__link:hover,
.screenshot-gallery__link:focus-visible { border-color: var(--game-accent); }
.screenshot-gallery__item img { width: 100%; }
.screenshot-gallery__item figcaption {
  margin-top: var(--space-2);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}
.screenshot-gallery--portrait {
  max-width: 18rem;
  margin-inline: auto;
}
@media (min-width: 40rem) {
  .screenshot-gallery--portrait { max-width: 54rem; }
  .screenshot-gallery--portrait .screenshot-gallery__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 60rem) {
  .screenshot-gallery__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.screenshot-viewer {
  max-width: min(calc(100% - 2 * var(--space-4)), var(--size-content));
  max-height: calc(100dvh - 2 * var(--space-4));
  padding: var(--space-3);
  border: var(--size-border) solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-bg-page);
  color: var(--color-text-primary);
}
.screenshot-viewer::backdrop { background: rgb(0 0 0 / 0.8); }
.screenshot-viewer__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-3);
}
.screenshot-viewer__image {
  width: auto;
  max-height: calc(100dvh - 9rem);
  margin-inline: auto;
  object-fit: contain;
}

.game-page__details {
  display: grid;
  gap: var(--space-10);
  margin-top: var(--space-12);
}
@media (min-width: 60rem) {
  .game-page__details { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--space-16); }
}

.game-page__heading { margin-bottom: var(--space-4); font-size: var(--font-size-xl); }

/* == Facts == a short list of facts about a game */

.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--space-3) var(--space-4);
  margin: 0;
  padding: var(--space-6);
  border: var(--size-border) solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  background-color: var(--color-surface-card);
}
.facts dt { color: var(--color-text-muted); }
.facts dd { margin: 0; color: var(--color-text-primary); }

/* == Prose == running text: about page, legal pages */

.prose { max-width: var(--size-prose); }
.prose > * + * { margin-top: var(--space-4); }
.prose h2 { margin-top: var(--space-10); font-size: var(--font-size-xl); }
.prose h3 { margin-top: var(--space-8); font-size: var(--font-size-lg); }
.prose h2 + *, .prose h3 + * { margin-top: var(--space-3); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: var(--space-2); }
.prose strong { color: var(--color-text-primary); }
.prose code {
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
  background-color: var(--color-surface-raised);
  font-size: 0.85em;
  overflow-wrap: anywhere;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}
.prose th, .prose td {
  padding: var(--space-3) var(--space-2);
  border-bottom: var(--size-border) solid var(--color-border-subtle);
  text-align: left;
  vertical-align: top;
}
.prose th { color: var(--color-text-primary); font-weight: var(--font-weight-semibold); }
.table-scroll { overflow-x: auto; }

/* == Legal page == privacy policies and terms */

.legal { padding-top: var(--space-8); }
.legal__header { margin-bottom: var(--space-8); }
.privacy-site { margin-top: var(--space-6); }

.legal-footnote {
  padding-top: var(--space-6);
  border-top: var(--size-border) solid var(--color-border-subtle);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

/* == Notice == a highlighted box: the "In short" summary, draft warnings */

.notice {
  padding: var(--space-5) var(--space-6);
  border: var(--size-border) solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  background-color: var(--color-surface-card);
}
.notice ul { margin: var(--space-2) 0 0; }
.notice__title { display: block; color: var(--color-text-primary); font-family: var(--font-family-display); }
.notice--draft { border-color: var(--color-candy-orange); }
.notice--draft .notice__title { color: var(--color-candy-orange); }

/* == Link list == a list of big links, e.g. the privacy policies */

.link-list {
  display: grid;
  gap: var(--space-3);
  max-width: var(--size-prose);
  margin: 0;
  padding: 0;
  list-style: none;
}
.link-list__item {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-4) var(--space-5);
  border: var(--size-border) solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  background-color: var(--color-surface-card);
  transition: border-color var(--duration-base);
}
.link-list__item:hover { border-color: var(--color-accent-secondary); }
.link-list__item a {
  color: var(--color-text-primary);
  font-family: var(--font-family-display);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}
.link-list__item a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }
.link-list__meta { color: var(--color-text-muted); font-size: var(--font-size-sm); }

/* == Contact card == */

.contact-card {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  padding: var(--space-8) var(--space-5);
  border: var(--size-border) solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, color-mix(in srgb, var(--color-candy-grape) 18%, var(--color-surface-card)) 0%, var(--color-surface-card) 70%);
  text-align: center;
}
.contact-card,
.contact-help { max-width: var(--size-prose); margin-inline: auto; }
.contact-card__email {
  color: var(--color-text-primary);
  font-family: var(--font-family-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--font-line-height-snug);
}
.contact-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}
.contact-card__feedback {
  min-height: 1lh;
  margin-top: calc(-1 * var(--space-2));
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

@media (min-width: 40rem) {
  .contact-card__email { font-size: var(--font-size-2xl); }
}

.contact-help {
  margin-top: var(--space-5);
  border: var(--size-border) solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  background: var(--color-surface-card);
}
.contact-help summary {
  padding: var(--space-4) var(--space-5);
  border-radius: inherit;
  color: var(--color-text-primary);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
}
.contact-help summary:hover { background: var(--color-surface-raised); }
.contact-help summary::marker { color: var(--color-accent-secondary); }
.contact-help__body { padding: 0 var(--space-5) var(--space-5); }
.contact-help__body p + p { margin-top: var(--space-3); }

/* == About == the studio's games beside its logo */

.about {
  display: grid;
  gap: var(--space-10);
  align-items: start;
}
.about__heading { margin-bottom: var(--space-4); font-size: var(--font-size-xl); }
.about__games .link-list__item {
  display: grid;
  padding-inline-end: var(--space-12);
}
.about__games .link-list__item:hover,
.about__games .link-list__item:focus-within { border-color: var(--game-accent); }
.about__games a span {
  position: absolute;
  inset-inline-end: var(--space-5);
  inset-block-start: 50%;
  transform: translateY(-50%);
  color: var(--game-accent);
}
.about__games .link-list__meta { color: var(--color-text-secondary); }
.about__logo { justify-self: center; width: min(100%, 16rem); margin: 0; }
.about__contact { margin-top: var(--space-8); }

@media (min-width: 60rem) {
  .about { grid-template-columns: minmax(0, 1fr) 20rem; gap: var(--space-16); align-items: center; }
  .about__logo { width: 100%; order: 2; }
}

/* == Callout == a closing band with a contact action */

.callout {
  display: grid;
  gap: var(--space-4);
  justify-items: start;
  padding: var(--space-8) var(--space-6);
  border: var(--size-border) solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, color-mix(in srgb, var(--color-candy-sky) 14%, var(--color-surface-card)) 0%, var(--color-surface-card) 60%);
}
.callout__title { font-size: var(--font-size-2xl); }
.callout__text { max-width: 36rem; }

@media (min-width: 60rem) {
  .callout {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: var(--space-10) var(--space-12);
  }
  .callout__title { font-size: var(--font-size-3xl); }
}

/* == Lost == the 404 page */

.lost {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  padding: var(--space-16) 0;
  text-align: center;
}
.lost__moon {
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  box-shadow: 0 0 60px color-mix(in srgb, var(--color-candy-moon) 35%, transparent);
}
.lost__title { font-size: var(--font-size-3xl); }
.lost__text { max-width: 30rem; font-size: var(--font-size-lg); }
.lost__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-4); margin-top: var(--space-4); }

@media (prefers-reduced-motion: no-preference) {
  .lost__moon { animation: lost-float 6s ease-in-out infinite; }
}
@keyframes lost-float { 50% { transform: translateY(-10px) rotate(-6deg); } }

/* == Reduced motion == */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  .game-card:hover { transform: none; }
}

/* == Print == legal pages print as plain black on white */

@media print {
  body { background: #fff; color: #000; }
  .site-header__nav, .site-footer, .skip-link, .starfield::before, .starfield::after { display: none; }
  h1, h2, h3, h4, .prose strong, .facts dd { color: #000; }
  a { color: #000; }
  .notice, .facts, .link-list__item { border-color: #999; background: none; }
}
