:root {
  color-scheme: dark;
  --background: #000;
  --panel: #131313;
  --text: #f6f4f0;
  --muted: #c8c4bd;
  --gold: #e1a743;
  --border: #303030;
  --action-button-width: 12.0625rem;
  scroll-padding-top: calc(var(--site-header-height, 4.5rem) + .75rem);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 1rem/1.6 system-ui, sans-serif;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { color: var(--gold); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
h1, h2, h3 { margin: 0; line-height: 1.14; }
p { margin: .65rem 0 0; }
.wrap { width: min(100% - 2.5rem, 62rem); margin-inline: auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #101010;
  border-bottom: 1px solid rgb(255 255 255 / .1);
}
@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .site-header {
    background: rgb(12 12 12 / .79);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}
.topbar {
  min-height: 4.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
}
.brand { flex: none; }
.brand img { width: 8rem; }
nav { display: flex; flex-wrap: wrap; gap: .35rem 1.55rem; }
nav a { text-decoration: none; font-weight: 600; }
.site-header nav a[aria-current="page"] { color: var(--gold); }
.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: .75rem clamp(1rem, 3vw, 2rem);
}
.language-switch {
  display: inline-flex;
  padding: .16rem;
  border: 1px solid var(--border);
  border-radius: .45rem;
  background: var(--panel);
}
.language-switch[hidden] { display: none; }
.language-switch button {
  padding: .3rem .48rem;
  border: 0;
  border-radius: .3rem;
  color: var(--muted);
  background: transparent;
  font: 700 .875rem/1.25 system-ui, sans-serif;
  cursor: pointer;
}
.language-switch button:hover { color: var(--text); }
.language-switch button[aria-pressed="true"] { color: #181104; background: var(--gold); }
.language-switch button:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.games-section { padding-block: clamp(1.5rem, 4vw, 3rem) 0; }
.home-logo { width: 100%; margin-bottom: clamp(1rem, 3vw, 2rem); }
.landing-heading {
  margin-bottom: clamp(1rem, 2.5vw, 1.75rem);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 820;
  letter-spacing: -.045em;
}
.game-grid, .game-features, .grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.9rem, 2.2vw, 1.5rem);
}
.game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; }
.game-grid:has(> .game-detail-panels) { grid-auto-rows: auto; }
.game-grid > .game-detail-panels { grid-column: 1 / -1; }
.game-grid > .game-detail-panels > .game-detail-panel { margin-top: 0; }
.game-grid .game-card { min-height: var(--game-card-height, 0); }
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: .65rem;
  background: var(--panel);
}
.game-cover {
  width: 100%;
  aspect-ratio: 460 / 215;
  object-fit: cover;
  border-radius: .6rem .6rem 0 0;
  border-bottom: 1px solid var(--border);
}
.game-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: .6rem;
  padding: 1rem 1rem 1.1rem;
}
.game-info h2, .game-info h3 { font-size: clamp(1.12rem, 2.2vw, 1.4rem); }
.game-info p { margin: 0; color: var(--muted); line-height: 1.5; }
.game-detail-link { text-decoration: none; }
.game-detail-link::after { content: ""; position: absolute; inset: 0; border-radius: .65rem; }
.game-detail-link:focus-visible { outline: none; }
.game-detail-link:focus-visible::after { outline: 2px solid var(--gold); outline-offset: 4px; }
.game-info .card-store-link { position: relative; z-index: 1; margin-top: auto; }
.card-store-links { display: grid; gap: .45rem; max-inline-size: 100%; margin-top: auto; }
.card-store-links .card-store-link { margin-top: 0; }
.game-card:has(.game-detail-link:hover) { border-color: var(--gold); }
.game-card:has(.game-detail-link[aria-expanded="true"]) {
  z-index: 1;
  transform: scale(1.035);
  border-color: var(--gold);
  background: #1f1a12;
  box-shadow: 0 .45rem 1.5rem rgb(0 0 0 / .55);
}
.game-detail-link[aria-expanded="true"] { color: #ffd58e; }
.section { padding-block: clamp(2.6rem, 6vw, 4.5rem); }
.section-title { margin-bottom: 1.65rem; font-size: clamp(1.7rem, 3.5vw, 2.25rem); text-transform: uppercase; }

.game-detail { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem); }
.games-back { display: inline-block; margin-bottom: 1.4rem; color: var(--muted); }
.game-overview {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: clamp(1.25rem, 4vw, 3.5rem);
  margin-bottom: clamp(2rem, 6vw, 4rem);
}
.game-overview h1 { font-size: clamp(2.25rem, 5.5vw, 4rem); letter-spacing: -.04em; }
.game-overview p { margin-top: 1rem; color: var(--muted); font-size: clamp(1.04rem, 1.9vw, 1.25rem); }
.overview-cover { width: 100%; border: 1px solid var(--border); border-radius: .65rem; }
.overview-links { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.15rem; margin-top: 1.25rem; }
.steam-button {
  display: inline-grid;
  place-items: center;
  flex: none;
  inline-size: var(--action-button-width);
  max-inline-size: 100%;
  min-block-size: 2.75rem;
  padding: .55rem .95rem;
  overflow-wrap: anywhere;
  text-align: center;
  border-radius: .35rem;
  color: #181104;
  background: var(--gold);
  font-weight: 700;
  text-decoration: none;
}
.steam-button[target="_blank"] { position: relative; }
.steam-button[target="_blank"]::after {
  content: "↗" / "";
  position: absolute;
  inset-block-start: .28rem;
  inset-inline-end: .38rem;
  font-size: .72em;
  line-height: 1;
  pointer-events: none;
}
.steam-button:hover { background: #ffd58e; color: #181104; }
.steam-button:disabled {
  border: 0;
  color: #b4b4b4;
  background: #282828;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
.game-feature { min-width: 0; }
.game-feature a { display: block; border-radius: .55rem; }
.game-feature img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: var(--panel); border-radius: .55rem; }
.has-previews .game-feature a { cursor: zoom-in; }
.preview-dialog {
  max-width: none;
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: .6rem;
  overflow: hidden;
  background: var(--panel);
}
.preview-dialog::backdrop { background: rgb(0 0 0 / .85); }
.screenshot-dialog {
  width: min(calc(100vw - 2rem), 75rem);
  width: min(calc(100vw - 2rem), calc((100dvh - 2rem) * var(--screenshot-ratio)), 75rem);
}
.screenshot-dialog img { width: 100%; max-height: calc(100dvh - 2rem); object-fit: contain; }
.news-dialog { width: min(calc(100vw - 2rem), 44rem); }
.news-dialog .preview-content {
  max-height: calc(100dvh - 2rem - 2px);
  overflow: auto;
  overscroll-behavior: contain;
}
.news-dialog .preview-content:focus-visible { outline: 2px solid var(--gold); outline-offset: -3px; }
.news-dialog img { width: 100%; }
.news-dialog .news-preview-copy { padding: clamp(1.25rem, 4vw, 2rem); }
.news-dialog .category { margin: 0 0 .6rem; color: var(--gold); }
.news-dialog h2 { font-size: clamp(1.55rem, 5vw, 2.25rem); }
.news-dialog .news-preview-copy p + p { margin-top: .75rem; }
.news-dialog .steam-button { margin-top: 1.15rem; }
.preview-close {
  position: absolute;
  inset: .55rem .55rem auto auto;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid #777;
  border-radius: 50%;
  background: #131313;
  color: var(--text);
  font: 700 1.65rem/1 system-ui, sans-serif;
  cursor: pointer;
}
.preview-close:hover { background: #292929; }
.preview-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
html:has(.preview-dialog[open]) { overflow: hidden; }
.game-feature h2 { margin-top: 1rem; font-size: clamp(1.25rem, 2.6vw, 1.7rem); }
.game-feature p { margin-top: .35rem; color: var(--muted); }

.game-detail-panels { display: flow-root; }
.game-detail-panel {
  margin-top: clamp(1.2rem, 3vw, 2rem);
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold);
  border-radius: .65rem;
  background: var(--panel);
  scroll-margin-top: 1rem;
}
.game-detail-panel .game-overview {
  display: block;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.game-detail-panel .game-overview h2, .game-panel-title { font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.035em; }
.game-detail-panel .game-overview p { max-width: 58ch; margin-top: .6rem; }
.game-feature h3 { margin-top: 1rem; font-size: clamp(1.25rem, 2.6vw, 1.7rem); }
.portrait-features .game-feature { width: min(100%, 14rem); justify-self: center; }
.portrait-features img { aspect-ratio: 9 / 16; }
#penguin-color-hop-panel .game-feature img { aspect-ratio: auto; }
.game-detail-panel .game-feature h4 { margin: 1rem 0 0; font-size: clamp(1.25rem, 2.6vw, 1.7rem); line-height: 1.14; }
#side-quests:not(.has-game-selector) .game-detail-panel:target { display: block; }

@media (prefers-reduced-motion: no-preference) {
  .game-grid .game-card { transition: transform 180ms ease-out, background-color 180ms ease-out, border-color 180ms ease-out; }
  .game-detail-panel.is-opening { animation: reveal-game 240ms ease-out; }
  @keyframes reveal-game {
    from { opacity: 0; transform: translateY(-.75rem); }
    to { opacity: 1; transform: translateY(0); }
  }
}
.news h3 { font-size: 1.35rem; }
.news p { color: var(--muted); }
.news img { width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; background: var(--panel); }
.news article:first-child img,
.news #news-crypt-keeper-release img { object-fit: contain; }
.news .category { color: var(--gold); font-size: .9rem; }
.news h3 { margin-top: .35rem; }
.news h3 a { text-decoration: none; }
.news article:target > .news-preview-copy[hidden] { display: block; margin-top: .65rem; }
.press-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.9rem, 2.2vw, 1.5rem);
}
.press-grid .game-card:first-child .game-cover {
  object-fit: contain;
  padding: clamp(1.5rem, 5vw, 3rem);
  background: #090909;
}
.site-footer { color: var(--muted); }
.contact-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem .75rem;
  margin-top: clamp(.75rem, 2vw, 1.25rem);
  padding: .65rem .85rem;
  border: 1px solid var(--border);
  border-radius: .65rem;
  color: var(--text);
  background: var(--panel);
}
.contact-email {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--gold);
  font-weight: 650;
  text-align: right;
}
.contact-banner nav { gap: .5rem; }
.contact-banner .steam-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  inline-size: 7.25rem;
  padding-inline: .3rem;
}
.contact-banner .social-icon { flex: none; width: .9375rem; }
.footer-content { padding-block: 1.6rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem 1.3rem; }
.footer-content p { margin: 0; }
.footer-content nav { gap: .4rem 1rem; }
.footer-content .legal-links { gap: .4rem 1.25rem; }
.legal { max-width: 49rem; }
.legal h2, .legal h3 { margin-top: 1.5rem; }
.legal address { font-style: normal; }
.legal p { color: var(--muted); }
.legal .draft-note { margin-bottom: 1.5rem; padding: .75rem 1rem; border-left: 2px solid var(--gold); background: var(--panel); }

@media (max-width: 65rem) {
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 48rem) {
  .grid { grid-template-columns: 1fr; gap: 2rem; }
  .news article { max-width: 32rem; }
  .game-overview { grid-template-columns: 1fr; }
  .overview-cover { max-width: 32rem; }
}

@media (max-width: 33rem) {
  :root { scroll-padding-top: calc(var(--site-header-height, 7.5rem) + .75rem); }
  .wrap { width: calc(100% - 1.75rem); }
  .topbar { padding-block: .65rem; flex-direction: column; justify-content: center; row-gap: .55rem; }
  .topbar nav { justify-content: center; gap: .35rem 1rem; }
  .header-actions { justify-content: center; }
  .news-dialog { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); }
  .news-dialog .preview-content { max-height: calc(100dvh - 1rem - 2px); }
  .game-grid, .game-features, .press-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .contact-banner { grid-template-columns: minmax(0, 1fr); }
  .game-features { gap: 2rem; }
}
