/* ------------------------------------------------------------------
   THEME: change these values to restyle the whole site.
------------------------------------------------------------------- */
:root {
  --orange: #e1a118;        /* header and buttons */
  --orange-hover: #efb53a;
  --bg: #242424;            /* page background */
  --surface: #2f2f2f;       /* panels and cards */
  --footer: #1a1a1a;
  --text: #f5f5f5;
  --muted: #b9b9b9;
  --line: #444444;
  --on-orange: #242424;     /* text that sits on orange */
  --radius: 12px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 6px;
}
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

/* Header */
header.site { background: var(--orange); color: var(--on-orange); }
header.site a:focus-visible { outline-color: var(--on-orange); }
.bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem 2rem; padding-block: .85rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-mark {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--on-orange); color: var(--orange);
  display: grid; place-items: center; font-weight: 700; font-size: 1.6rem;
}
.brand-mark .brand-logo { display: none; }
.brand-mark.has-logo { width: auto; background: none; border-radius: 0; }
.brand-mark.has-logo .brand-logo { display: block; height: 52px; width: auto; max-width: 140px; object-fit: contain; }
.brand-mark.has-logo .brand-letter { display: none; }
.brand-name {
  font-weight: 700; letter-spacing: -.01em;
  font-size: clamp(1.8125rem, 5vw, 2.5rem);   /* 25% bigger than the original clamp(1.45rem, 4vw, 2rem) */
  line-height: 1.1; display: flex; align-items: center;
  min-height: calc(1.65 * clamp(1.45rem, 4vw, 2rem));   /* same box height as the original, so the header doesn't change */
}
/* narrow phones: never wrap the title */
@media (max-width: 480px) { .brand-name { font-size: min(1.8125rem, calc((100vw - 105px) / 8.6)); } }
/* tablets: use whatever room the menu leaves (up to the full 25%) so the menu stays on the same row as before */
@media (min-width: 690px) and (max-width: 800px) {
  .brand-name { font-size: max(clamp(1.45rem, 4vw, 2rem), min(clamp(1.8125rem, 5vw, 2.5rem), calc((100vw - 457px) / 8.526))); }
}
nav.main ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem 1.5rem; flex-wrap: wrap; }
nav.main > ul { align-items: center; }
nav.main > ul > li > a, .menu-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  font: inherit; font-weight: 600; line-height: 1.65; color: inherit; text-decoration: none;
  padding: .25rem 0; border: 0; border-bottom: 3px solid transparent; background: none;
}
nav.main > ul > li > a:hover, nav.main > ul > li > a[aria-current="page"] { border-bottom-color: var(--on-orange); }

/* Header dropdown (Support) */
nav.main li.has-menu { position: relative; }
.menu-btn { cursor: pointer; }
.menu-btn:hover, .menu-btn[aria-expanded="true"] { border-bottom-color: var(--on-orange); }
.menu-btn .caret {
  display: block; width: .6rem; height: .6rem; margin: -.3rem .1rem 0 0;
  border-right: 3px solid currentColor; border-bottom: 3px solid currentColor;
  transform: rotate(45deg); transition: transform .15s ease, margin .15s ease;
}
.menu-btn[aria-expanded="true"] .caret { transform: rotate(-135deg); margin-top: .2rem; }
header.site button:focus-visible { outline: 3px solid var(--on-orange); outline-offset: 3px; border-radius: 6px; }
nav.main ul.menu {
  display: block; position: absolute; right: 0; top: calc(100% + .65rem); z-index: 20;
  min-width: 13rem; margin: 0; padding: .4rem; list-style: none;
  background: var(--bg); border: 2px solid var(--orange); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
  opacity: 0; visibility: hidden; transform: translateY(-8px); transform-origin: top right;
  pointer-events: none; /* while closed or closing, the menu can't catch the pointer (prevents open/close flicker) */
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
nav.main ul.menu.is-open {
  opacity: 1; visibility: visible; transform: none; pointer-events: auto;
  transition: opacity .18s ease, transform .18s ease, visibility 0s;
}
nav.main ul.menu::before { content: ""; position: absolute; left: 0; right: 0; top: -1rem; height: 1rem; }
nav.main .menu a {
  display: block; padding: .6rem .85rem; border-radius: 8px; border-bottom: 0;
  color: var(--text); font-weight: 600; text-decoration: none;
}
nav.main .menu a:hover, nav.main .menu a:focus-visible { background: var(--orange); color: var(--on-orange); }

/* Buttons */
.btn-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; cursor: pointer; text-align: center;
  padding: .7rem 1.35rem; border-radius: 999px; font: inherit; font-weight: 600;
  border: 2px solid var(--orange);
}
.btn.primary { background: var(--orange); color: var(--on-orange); }
.btn.primary:hover { background: var(--orange-hover); border-color: var(--orange-hover); }
.btn.ghost { background: transparent; color: var(--orange); }
.btn.ghost:hover { background: rgba(225, 161, 24, .14); }

/* Home hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero-grid {
  display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "title" "image" "text" "buttons";   /* phone: title, image, description, buttons */
}
.hero-title { grid-area: title; margin: 0; }
.hero-grid .feature { grid-area: image; }
.hero-desc { grid-area: text; }
.hero-buttons { grid-area: buttons; }
@media (min-width: 880px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    grid-template-areas: "title image" "buttons image" ". text";   /* desktop: description sits under the image */
    column-gap: clamp(1.5rem, 4vw, 3.5rem); row-gap: 0;
  }
  .hero-title { align-self: end; margin-bottom: 1.5rem; }    /* title + buttons stay together, centered beside the image */
  .hero-buttons { align-self: start; }
  .hero p.lede.hero-desc { margin-top: 1.5rem; }   /* more specific than the .hero p.lede rule below */
}
.hero h1 {
  font-weight: 700; font-size: clamp(2.4rem, 6.5vw, 4.2rem);
  line-height: 1.05; letter-spacing: -.02em;
}
.hero p.lede { max-width: 34rem; margin: 0; font-size: 1.1rem; color: var(--muted); }
.feature {
  border-radius: var(--radius); overflow: hidden; background: var(--surface);
  aspect-ratio: 16 / 9; border: 4px solid var(--orange);
}
.feature img { width: 100%; height: 100%; object-fit: cover; }

/* Strips */
.strip { padding-block: clamp(2rem, 5vw, 3.5rem); }
.strip.panel-bg { background: var(--surface); }
.strip-inner { display: flex; gap: 1.5rem 3rem; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.strip h2 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .4rem; }
.strip p { margin: 0; color: var(--muted); max-width: 38rem; }

/* Games page */
.page-head { padding-block: clamp(2rem, 5vw, 3.5rem) 1rem; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; margin: 0 0 .5rem; letter-spacing: -.01em; }
.page-head p { margin: 0; color: var(--muted); max-width: 40rem; }
.catalog { padding-block: 1rem clamp(2.5rem, 6vw, 4.5rem); }
.catalog-head { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1rem; margin-bottom: 1.5rem; }
.catalog-head .filters { margin-left: auto; }
.search { position: relative; flex: 1 1 14rem; max-width: 20rem; }
.suggest {
  position: absolute; top: calc(100% + .4rem); left: 0; right: 0; z-index: 30;
  margin: 0; padding: .3rem; list-style: none; max-height: 16rem; overflow-y: auto;
  background: var(--bg); border: 2px solid var(--orange); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
}
.suggest li { padding: .5rem .8rem; border-radius: 8px; cursor: pointer; }
.suggest li:hover, .suggest li[aria-selected="true"] { background: var(--orange); color: var(--on-orange); }
.search input {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 2px solid var(--line); border-radius: 999px; padding: .4rem 1.1rem;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--orange); }
.search input:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip {
  font: inherit; font-weight: 500; cursor: pointer;
  background: transparent; color: var(--text);
  border: 2px solid var(--line); border-radius: 999px; padding: .35rem 1rem;
}
.chip:hover { border-color: var(--orange); }
.chip[aria-current="page"],
.chip[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }

.grid {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}
.game { display: flex; flex-direction: column; position: relative; }
.grid.animating { overflow: hidden; }
.cover {
  aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); position: relative; border: 1px solid var(--line);
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .fallback {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem;
  text-align: center; font-weight: 700; font-size: 1.15rem; color: var(--on-orange);
}
.status {
  position: absolute; left: .75rem; top: .75rem;
  background: var(--bg); color: var(--text);
  font-size: .8rem; font-weight: 600; padding: .15rem .7rem; border-radius: 999px;
}
.status.dev { background: var(--bg); color: var(--orange); }
.game h2 { font-size: 1.25rem; line-height: 1.3; margin: .9rem 0 .2rem; }
.game h2 a { text-decoration: none; }
/* The title link stretches over the whole tile, so the entire tile is clickable */
.game h2 a::after { content: ""; position: absolute; inset: 0; }
.game:hover h2 a { color: var(--orange); }
.game:hover .cover { border-color: var(--orange); }
.game h2 a:focus-visible { outline: none; }
.game h2 a:focus-visible::after { outline: 3px solid var(--orange); outline-offset: 4px; border-radius: var(--radius); }
.meta { color: var(--muted); font-size: .92rem; margin: 0 0 .5rem; }
.empty { color: var(--muted); padding: 2rem 0; }
.chip:disabled { opacity: .4; cursor: default; }
.chip:disabled:hover { border-color: var(--line); }
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }

/* Storefront (single game) page */
.store { padding-block: 1.5rem clamp(2.5rem, 6vw, 4.5rem); }
.back { display: inline-block; margin-bottom: 1rem; color: var(--orange); font-weight: 600; text-underline-offset: 3px; }
.back-arrow { display: inline-block; margin-right: .3rem; transition: transform .2s ease; }
.back:hover .back-arrow { transform: translateX(-4px); }
.store h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); line-height: 1.12; margin: 0 0 1.25rem; letter-spacing: -.01em; }
.store-grid {
  display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); align-items: start;
  grid-template-areas: "media" "panel" "about";                 /* phones: picture, details, description */
}
@media (min-width: 880px) {
  .store-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "media panel" "about panel";           /* desktop: the description sits under the carousel, same width */
  }
}
.store-media { min-width: 0; grid-area: media; }
.panel { grid-area: panel; }
.about { grid-area: about; min-width: 0; margin-top: .3rem; }   /* 20% more space under the carousel (1.5rem gap + .3rem) */
.store-media .cover { border-width: 2px; }
.store-media .cover .fallback { font-size: 1.6rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.panel .summary { margin: 0 0 1.1rem; color: var(--muted); }
.facts { margin: 0 0 1.1rem; display: grid; gap: .55rem; }
.facts div { display: grid; grid-template-columns: 7rem 1fr; gap: .75rem; font-size: .95rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.tags { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tags li { border: 1.5px solid var(--line); border-radius: 999px; padding: .1rem .75rem; font-size: .85rem; }
.panel .btn-row { flex-direction: column; }
.about h2 { font-size: 1.5rem; margin: 0 0 .75rem; }
.about p { margin: 0 0 1rem; }
.desc-img { margin: 1.25rem 0; }
.desc-img img { display: block; width: 100%; max-width: 760px; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }

/* Steam price (sale styling) and star rating in the details panel */
.price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; }
.price-now { font-weight: 600; }
.price-sale { color: var(--orange); }
.price-was { color: var(--muted); }
.price-badge { background: var(--orange); color: var(--on-orange); font-size: .8rem; font-weight: 700; padding: .05rem .55rem; border-radius: 999px; }
.price-source { color: var(--muted); font-size: .85rem; }   /* same font as the "N reviews" text */
.rating { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .1rem .6rem; }   /* stars, number and "N reviews" share one line when there is room */
.stars { position: relative; display: inline-block; color: var(--line); font-size: 1.15rem; line-height: 1; letter-spacing: .08em; }
.stars-fill { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: var(--orange); }
.rating-num { font-weight: 600; }
.rating-count { color: var(--muted); font-size: .85rem; text-underline-offset: 3px; }
.rating-count:hover { color: var(--orange); }

/* Screenshot viewer: replaces the main image when a thumbnail is clicked */
.viewer { position: absolute; inset: 0; z-index: 2; background: #161616; }
.store-media .cover.is-viewing { border-width: 0; }   /* no gray frame while a screenshot is showing, so the picture fills the 16:9 box exactly */
.viewer-open { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.viewer-open img { width: 100%; height: 100%; object-fit: contain; display: block; }
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; padding: 0 0 .15rem;
  border: 2px solid var(--orange); background: rgba(36, 36, 36, .88); color: var(--orange);
  font: inherit; font-size: 1.7rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.car-btn.prev { left: .6rem; }
.car-btn.next { right: .6rem; }
.car-btn.close { top: .6rem; right: .6rem; transform: none; }
.car-btn.close { padding: 0; }
.car-btn.close svg { display: block; width: 46%; height: 46%; }
.viewer .car-btn.close { width: 22px; height: 22px; }
.lightbox .car-btn.close svg { width: 36%; height: 36%; }
/* keeps a comfortable click/tap area around the smaller X */
.viewer .car-btn.close::after { content: ""; position: absolute; inset: -11px; border-radius: 50%; }
.car-btn:hover { background: var(--orange); color: var(--on-orange); }
.car-btn:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.carousel-count {
  position: absolute; right: .75rem; bottom: .75rem; z-index: 3; pointer-events: none;
  background: rgba(36, 36, 36, .88); border-radius: 999px; padding: .1rem .7rem; font-size: .85rem;
}
.thumbs {
  display: flex; gap: .5rem; margin-top: .6rem; max-width: 100%; position: relative;
  overflow-x: auto; overscroll-behavior-x: contain; padding: .15rem .15rem .5rem;
  scrollbar-width: thin; scrollbar-color: var(--orange) var(--surface);
}
.thumb {
  flex: 0 0 auto; width: 134.4px; aspect-ratio: 16 / 9; padding: 0; overflow: hidden;   /* 20% bigger than the original 112px */
  border: 2px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; opacity: .75;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { opacity: 1; border-color: var(--orange); }
.thumb[aria-current="true"] { border-color: var(--orange); opacity: 1; }

/* Full screen lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 4rem 6rem; background: rgba(10, 10, 10, .95); animation: lb-in .18s ease;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lightbox .car-btn { position: fixed; width: 56px; height: 56px; font-size: 2rem; }
.lightbox .car-btn.prev { left: 1.25rem; }
.lightbox .car-btn.next { right: 1.25rem; }
.lightbox .car-btn.close { top: 1.25rem; right: 1.25rem; }
.lightbox { touch-action: pan-y pinch-zoom; overscroll-behavior: contain; }
.lightbox .carousel-count { position: fixed; bottom: 1.25rem; left: 50%; right: auto; transform: translateX(-50%); }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 700px) {
  .lightbox { padding: 4rem .5rem; }
  .lightbox .car-btn.prev { left: .5rem; }
  .lightbox .car-btn.next { right: .5rem; }
}

/* Footer */
footer.site { background: var(--footer); color: var(--muted); padding-block: 2rem 2.5rem; font-size: .92rem; }
.foot { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--orange); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .back-arrow, .menu-btn .caret { transition: none; }
  .lightbox { animation: none; }
  nav.main ul.menu, nav.main ul.menu.is-open { transition: none; }
}
