/* Game Catalog — look & feel modeled on the PlayStation Plus games catalog:
   dark navy hero, clean white catalog area, pill tabs, rounded tiles with a
   blue focus ring, and a full-width detail overlay. */

:root {
  --ps-blue: #0070d1;
  --ps-blue-dark: #0058a8;
  --ps-blue-light: #1f8ff0;
  --navy-0: #00092b;
  --navy-1: #001a4f;
  --ink: #1f1f1f;
  --ink-2: #363636;
  --muted: #6b6b6b;
  --line: #dcdcdc;
  --surface: #ffffff;
  --surface-2: #f5f7fa;
  --radius: 12px;
  --radius-lg: 24px;
  --shadow: 0 4px 16px rgba(0, 0, 0, .12);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .35);
  --font: "SST", "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw: 1440px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
svg { width: 1.25em; height: 1.25em; flex: none; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- nav --- */
.topnav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(0, 0, 0, .92);
  backdrop-filter: blur(8px);
  color: #fff;
}
.topnav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 40px;
  height: 64px; display: flex; align-items: center; gap: 40px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: .2px; }
.brand svg { width: 30px; height: 30px; color: #fff; }
.topnav__links { display: flex; gap: 28px; }
.topnav__links a { color: rgba(255,255,255,.8); text-decoration: none; font-size: 14px; letter-spacing: .3px; }
.topnav__links a:hover { color: #fff; }

/* --------------------------------------------------------------- hero --- */
.hero {
  position: relative; overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1200px 600px at 85% 20%, rgba(31,143,240,.45), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(0,112,209,.35), transparent 60%),
    linear-gradient(180deg, var(--navy-1), var(--navy-0));
  min-height: 440px;
  display: flex; align-items: center;
}
.hero__art {
  position: absolute; inset: 0 0 0 42%;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  padding: 24px; transform: rotate(-8deg) scale(1.25) translateX(6%);
  opacity: .55;
  mask-image: linear-gradient(90deg, transparent, #000 30%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%);
  pointer-events: none;
}
.hero__art .art { aspect-ratio: 16 / 9; border-radius: 10px; box-shadow: var(--shadow-lg); }
.hero__content { position: relative; max-width: var(--maxw); width: 100%; margin: 0 auto; padding: 72px 40px; }
.hero__eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: 2px; font-size: 13px; color: #9fd0ff; font-weight: 600; }
.hero h1 { margin: 0; font-size: clamp(40px, 6vw, 68px); font-weight: 300; letter-spacing: -.5px; line-height: 1.05; }
.hero__lede { max-width: 560px; font-size: 18px; color: rgba(255,255,255,.85); margin: 18px 0 28px; }
.hero__stats { display: flex; gap: 36px; flex-wrap: wrap; }
.stat b { display: block; font-size: 32px; font-weight: 300; line-height: 1.1; }
.stat span { font-size: 13px; color: rgba(255,255,255,.7); letter-spacing: .4px; }

/* ---------------------------------------------------------------- art --- */
/* Banner art box. Normal (wide) banners fill it with object-fit: cover.
   Full-screen sell sheets (.is-full) show only their top title band: the image
   is scaled so that band (--band of its height) fills the box, anchored top and
   centered horizontally. */
.art { position: relative; overflow: hidden; --band: 0.34; }
.art > .art__img { width: 100%; height: 100%; object-fit: cover; }
.art.is-full > .art__img {
  position: absolute; top: 0; left: 50%;
  width: auto; height: calc(100% / var(--band)); max-width: none; max-height: none;
  transform: translateX(-50%); object-fit: fill;
}

/* ------------------------------------------------------------ catalog --- */
.catalog { max-width: var(--maxw); margin: 0 auto; padding: 56px 40px 80px; scroll-margin-top: 64px; }
.catalog__head h2 { font-size: 36px; font-weight: 300; margin: 0; }
.catalog__sub { color: var(--muted); margin: 6px 0 28px; }

.tabs { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: thin; }
.tab {
  flex: none; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 9px 20px; cursor: pointer; font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s, border-color .15s;
}
.tab:hover { border-color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab:focus-visible, .btn:focus-visible, .tile:focus-visible, .chip:focus-visible { outline: 3px solid var(--ps-blue); outline-offset: 3px; }

.toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--line); }
.toolbar__spacer { flex: 1; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px;
  padding: 10px 22px; cursor: pointer; font-weight: 600; font-size: 14px; border: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--ps-blue); color: #fff; }
.btn--primary:hover { background: var(--ps-blue-dark); }
.btn--outline { background: transparent; border-color: var(--ink); }
.btn--outline:hover, .btn--outline[aria-expanded="true"] { background: var(--ink); color: #fff; }
.btn--text { background: none; color: var(--ps-blue); padding-inline: 8px; }
.btn--text:hover { text-decoration: underline; }
.badge { background: var(--ps-blue); color: #fff; border-radius: 999px; font-size: 12px; min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 6px; }

.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; height: 44px; min-width: 260px; background: var(--surface); }
.search:focus-within { border-color: var(--ps-blue); box-shadow: 0 0 0 2px rgba(0,112,209,.2); }
.search svg { color: var(--muted); }
.search input { border: 0; outline: 0; background: none; flex: 1; height: 100%; }
.result-count { color: var(--muted); font-size: 14px; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.sort select { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: var(--surface); color: var(--ink); cursor: pointer; }

.filter-panel { background: var(--surface-2); border-radius: var(--radius); padding: 24px; margin-top: 16px; }
.filter-panel__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.fgroup h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.fgroup ul { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow: auto; }
.fgroup li + li { margin-top: 4px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; padding: 3px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--ps-blue); }
.check small { color: var(--muted); margin-left: auto; }
.filter-panel__foot { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; background: #e8f1fb; color: var(--ps-blue-dark); padding: 6px 10px 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip:hover { background: #d6e7f8; }
.chip svg { width: 16px; height: 16px; }

/* --------------------------------------------------------------- grid --- */
.grid {
  display: grid; gap: 32px 24px; margin-top: 28px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.tile { text-decoration: none; color: inherit; display: block; border-radius: var(--radius); cursor: pointer; }
.tile__img {
  position: relative; aspect-ratio: 12 / 5; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, var(--navy-1), var(--ps-blue));
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  transition: transform .2s ease, box-shadow .2s ease;
}

.tile:hover .tile__img, .tile:focus-visible .tile__img { transform: scale(1.04); box-shadow: 0 0 0 3px var(--ps-blue), var(--shadow); }
.tile:focus-visible { outline: none; }
.tile__fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; color: #fff; font-weight: 600; font-size: 18px; }
.tile__fallback img { position: absolute; width: 38%; height: auto; opacity: .18; filter: brightness(0) invert(1); }
.tile__badges { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 6px; }
.pill { background: rgba(0,0,0,.72); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .3px; padding: 3px 8px; border-radius: 999px; }
.tile__name { margin: 12px 2px 2px; font-size: 16px; font-weight: 600; line-height: 1.3; }
.tile__meta { margin: 0 2px; font-size: 13px; color: var(--muted); }

.state { grid-column: 1 / -1; text-align: center; padding: 80px 20px; color: var(--muted); font-size: 18px; }
.state .btn { margin-top: 16px; }

/* -------------------------------------------------------------- modal --- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 32px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0, 6, 25, .78); backdrop-filter: blur(4px); animation: fade .2s; }
.modal__dialog {
  position: relative; width: min(1100px, 100%); max-height: calc(100vh - 64px); overflow: auto;
  background: var(--navy-0); color: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  animation: pop .22s ease;
}
.modal__close { position: absolute; top: 16px; right: 16px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; cursor: pointer; }
.modal__close:hover { background: rgba(0,0,0,.8); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }

.detail__hero { position: relative; background: #000; overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.detail__hero--empty { aspect-ratio: 16 / 5; background: linear-gradient(135deg, var(--navy-1), var(--ps-blue)); display: grid; place-items: center; }
.detail__hero--empty img { width: 120px; opacity: .25; filter: brightness(0) invert(1); }
.detail__art img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; margin: 0 auto; }
.detail__art.is-full { aspect-ratio: 640 / 126; }
.detail__body { padding: 36px 48px 48px; position: relative; }
.detail__eyebrow { color: #9fd0ff; text-transform: uppercase; letter-spacing: 1.5px; font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.detail__title { font-size: clamp(30px, 4vw, 48px); font-weight: 300; margin: 0 0 14px; line-height: 1.1; }
.detail__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.detail__tags .pill { background: rgba(255,255,255,.14); font-size: 12px; padding: 5px 12px; }
.detail__cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; }
.detail__synopsis { font-size: 17px; color: rgba(255,255,255,.88); margin: 0; white-space: pre-line; }
.detail__pub { display: flex; align-items: center; gap: 14px; margin-top: 24px; }
.detail__pub img { height: 44px; width: auto; max-width: 140px; object-fit: contain; background: #fff; border-radius: 8px; padding: 6px; }
.detail__pub span { color: rgba(255,255,255,.7); font-size: 14px; }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 14px; background: rgba(255,255,255,.06); border-radius: var(--radius); padding: 20px; }
.facts dt { color: rgba(255,255,255,.6); }
.facts dd { margin: 0; }
.detail h3 { font-size: 20px; font-weight: 400; margin: 40px 0 16px; }
.platforms { display: flex; flex-wrap: wrap; gap: 10px; }
.platform { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 8px 14px; font-size: 13px; }
.platform b { display: block; font-size: 14px; }
.platform span { color: rgba(255,255,255,.65); }
/* Screenshot gallery: horizontally scrolling row of tiles with round arrow
   buttons and a segmented position indicator (after the PlayStation Store). */
.gallery { margin: 40px 0 8px; }
.gallery__viewport { position: relative; }
.gallery__track {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-auto-flow: column; gap: 24px;
  grid-auto-columns: calc((100% - 3 * 24px) / 4);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track li { scroll-snap-align: start; }
.gallery__item {
  display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0;
  background: #000; border-radius: 6px; overflow: hidden; cursor: zoom-in;
  transition: box-shadow .15s;
}
.gallery__item img { width: 100%; height: 100%; object-fit: contain; }
.gallery__item:hover, .gallery__item:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ps-blue-light); }
.gallery__arrow {
  position: absolute; top: 50%; z-index: 1; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: #fff; color: #000;
  box-shadow: 0 2px 10px rgba(0,0,0,.45); transition: transform .15s;
}
.gallery__arrow:hover { transform: translateY(-50%) scale(1.08); }
.gallery__arrow:focus-visible { outline: 3px solid var(--ps-blue-light); outline-offset: 2px; }
.gallery__arrow svg { width: 24px; height: 24px; }
.gallery__arrow--prev { left: -22px; }
.gallery__arrow--next { right: -22px; }
.gallery__dots { display: flex; justify-content: center; gap: 4px; margin-top: 14px; }
.gallery__dots span { width: 22px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.28); transition: background .2s; }
.gallery__dots span.on { background: #fff; }

.gallery__item { position: relative; }
.gallery__item--video img { object-fit: cover; }
.gallery__noposter { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; color: #fff; font-weight: 600; background: linear-gradient(135deg, var(--navy-1), var(--ps-blue)); }
.gallery__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; box-shadow: 0 2px 12px rgba(0,0,0,.5); transition: transform .15s, background .15s; }
.gallery__play svg { width: 28px; height: 28px; margin-left: 3px; }
.gallery__item--video:hover .gallery__play { background: var(--ps-blue); transform: translate(-50%, -50%) scale(1.08); }
.gallery__tag { position: absolute; left: 8px; top: 8px; }

.lightbox--video { cursor: default; }
.player { position: relative; width: min(1100px, 100%); }
.player__frame { aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-lg); display: grid; place-items: center; }
.player__frame iframe, .player__frame video { width: 100%; height: 100%; border: 0; display: block; }
.player__close { position: absolute; top: -52px; right: 0; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; cursor: pointer; }
.player__close:hover { background: rgba(255,255,255,.3); }
.player__caption { color: rgba(255,255,255,.8); font-size: 14px; margin: 12px 2px 0; }
.player__error { color: #fff; padding: 24px; text-align: center; }
.player__error a { color: #9fd0ff; }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 40px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: var(--shadow-lg); }

/* ------------------------------------------------------------- footer --- */
.footer { background: var(--navy-0); color: rgba(255,255,255,.6); text-align: center; font-size: 13px; padding: 32px 20px; }

/* --------------------------------------------------------- responsive --- */
@media (max-width: 900px) {
  .topnav__inner, .hero__content, .catalog { padding-inline: 20px; }
  .hero__art { inset: 0; opacity: .2; }
  .detail__cols { grid-template-columns: 1fr; }
  .detail__body { padding: 28px 24px 32px; }
  .gallery__track { grid-auto-columns: calc((100% - 16px) / 2); gap: 16px; }
  .gallery__arrow--prev { left: -12px; }
  .gallery__arrow--next { right: -12px; }
  .search { min-width: 0; flex: 1; }
  .modal { padding: 0; }
  .modal__dialog { max-height: 100vh; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
