/* Games: five cinematic favourites followed by a chronological release shelf. */
.games-world {
  color: var(--ink);
  background: var(--life-surface);
}

.games-world .panel-close {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(8, 9, 11, 0.68);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(14px);
}

.games-world .panel-close:hover,
.games-world .panel-close:focus-visible {
  border-color: #fff;
}

.games-scroll {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--ink) 32%, transparent) var(--life-surface);
}

.game-feature,
.games-archive {
  min-height: var(--games-viewport, 100dvh);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.games-eyebrow {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  color: var(--plum);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.game-trailer-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  width: max-content;
  color: inherit;
  font-size: 0.68rem;
  font-weight: 720;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.games-rail {
  position: absolute;
  top: 50%;
  right: max(16px, calc((100vw - 1370px) / 2));
  z-index: 22;
  display: flex;
  flex-direction: column;
  gap: 9px;
  opacity: 0;
  transform: translateY(-50%);
  pointer-events: none;
  transition: opacity 180ms ease 280ms;
}

.module-games.is-active .games-rail {
  opacity: 1;
  pointer-events: auto;
}

.games-world.is-archive-current .games-rail a {
  color: color-mix(in srgb, var(--ink) 48%, transparent);
  text-shadow: 0 1px 5px var(--life-surface);
}

.games-world.is-archive-current .games-rail a:hover,
.games-world.is-archive-current .games-rail a:focus-visible,
.games-world.is-archive-current .games-rail a.is-current {
  color: var(--ink);
}

.games-world.is-archive-current .panel-close {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 28%, transparent);
  background: color-mix(in srgb, var(--life-surface) 90%, transparent);
}

.games-rail a {
  display: grid;
  grid-template-columns: 23px 64px;
  gap: 7px;
  align-items: center;
  min-height: 24px;
  color: rgba(255, 255, 255, 0.48);
  font: 600 0.56rem/1 "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.75);
  transition: color 180ms ease;
}

.games-rail a::before {
  grid-column: 1 / -1;
  width: 18px;
  height: 1px;
  content: "";
  background: currentColor;
  transition: width 220ms ease;
}

.games-rail a span,
.games-rail a b {
  grid-row: 2;
}

.games-rail a b {
  font: inherit;
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.games-rail a:hover,
.games-rail a:focus-visible,
.games-rail a.is-current {
  color: #fff;
}

.games-rail a:hover::before,
.games-rail a:focus-visible::before,
.games-rail a.is-current::before {
  width: 46px;
}

.games-rail a:hover b,
.games-rail a:focus-visible b,
.games-rail a.is-current b {
  opacity: 1;
  transform: none;
}

.game-feature {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  padding: clamp(72px, 9vw, 132px) max(24px, calc((100vw - 1220px) / 2));
  overflow: hidden;
  background: var(--life-surface);
}

.game-media {
  position: absolute;
  inset: 0;
}

.game-media {
  z-index: -3;
  overflow: hidden;
  background: var(--life-surface);
}

.game-media > img,
.game-montage {
  width: 100%;
  height: 100%;
}

.game-media > img {
  display: block;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.05);
  transform: scale(1.02);
  transition: opacity 650ms ease, transform 7s ease;
}

.game-feature.is-current .game-media > img {
  transform: scale(1.08);
}

.game-montage {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  object-fit: cover;
  opacity: 0;
  filter: saturate(0.9) contrast(1.04);
  transform: scale(1.015);
  transition: opacity 700ms ease;
}

.game-feature.has-live-video .game-montage {
  opacity: 1;
}

.game-feature__copy {
  position: relative;
  z-index: 3;
  width: min(920px, 78vw);
  color: #fff;
  opacity: 0.58;
  transform: translateY(22px);
  transition: opacity 450ms ease 180ms, transform 650ms cubic-bezier(0.2, 0.72, 0.25, 1) 120ms;
}

.game-feature.is-current .game-feature__copy {
  opacity: 1;
  transform: none;
}

.game-count {
  display: inline-block;
  margin-bottom: clamp(18px, 3vh, 36px);
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.96), 0 5px 16px rgba(0, 0, 0, 0.72);
  font: 650 0.62rem/1 "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.08em;
}

.game-genre {
  display: table;
  margin: 0 0 12px;
  padding: 0;
  color: var(--game-accent, #fff);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.98), 0 6px 18px rgba(0, 0, 0, 0.82);
  font-size: 0.67rem;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.game-feature h3 {
  max-width: 980px;
  margin: 0;
  color: #fff;
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.64);
  paint-order: stroke fill;
  text-shadow: 0 3px 5px rgba(0, 0, 0, 0.88), 0 12px 34px rgba(0, 0, 0, 0.56);
  font-size: clamp(4rem, 10.5vw, 10.2rem);
  line-height: 0.78;
  letter-spacing: -0.075em;
  text-wrap: balance;
}

.game-feature h3 span {
  display: block;
  margin-bottom: 0.2em;
  font-size: 0.27em;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.game-thought {
  display: table;
  max-width: 560px;
  margin: 26px 0 0;
  padding: 0;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.98), 0 7px 22px rgba(0, 0, 0, 0.82);
  font-size: clamp(0.95rem, 1.35vw, 1.2rem);
}

.game-trailer-link {
  margin-top: 26px;
  padding: 0 0 7px;
  color: var(--game-accent, #fff);
  border-bottom: 1px solid currentColor;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.98), 0 6px 18px rgba(0, 0, 0, 0.82);
}

.game-trailer-link:hover,
.game-trailer-link:focus-visible {
  color: #fff;
  border-color: #fff;
}

.game-feature--fc26 { --game-accent: #c8ff31; }
.game-feature--minecraft { --game-accent: #b9e987; }
.game-feature--aoe4 { --game-accent: #efbd72; }
.game-feature--wukong { --game-accent: #e9bc70; }
.game-feature--gta6 { --game-accent: #ffb6dd; }

.games-archive {
  position: relative;
  padding: clamp(92px, 11vw, 160px) max(24px, calc((100vw - 1220px) / 2));
  color: var(--ink);
  background: var(--life-surface);
}

.games-archive__heading {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 0.58fr);
  gap: 22px clamp(42px, 8vw, 120px);
  align-items: end;
  margin-bottom: clamp(45px, 7vw, 88px);
}

.games-archive__heading .games-eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.games-archive h3 {
  margin: 0;
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: 0.78;
  letter-spacing: -0.07em;
}

.games-archive__heading > p:last-child {
  max-width: 390px;
  margin: 0;
  color: var(--copy);
  font-size: 0.9rem;
  line-height: 1.5;
}

.game-decades {
  display: grid;
  gap: clamp(64px, 9vw, 122px);
}

.game-decade {
  display: grid;
  grid-template-columns: clamp(112px, 13vw, 168px) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 62px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.game-decade__heading {
  position: sticky;
  top: 32px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: var(--muted);
  font: 650 0.6rem/1 "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.game-decade__heading h4 {
  margin: 5px 0 2px;
  color: var(--ink);
  font: 760 clamp(2rem, 4.2vw, 4.3rem)/0.82 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.07em;
  text-transform: none;
}

.game-decade__count {
  color: var(--plum);
}

.game-release-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(7px, 0.9vw, 11px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-release-list li {
  --cover-shade-bottom: 0.91;
  --cover-shade-top: 0.14;
  --cover-shade-side: 0.38;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) minmax(130px, 0.34fr) 34px;
  gap: clamp(14px, 2vw, 30px);
  align-items: end;
  min-height: clamp(112px, 11vw, 156px);
  padding: clamp(18px, 2vw, 27px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  overflow: hidden;
  color: #fff;
  background: color-mix(in srgb, var(--life-surface) 88%, var(--ink));
}

.game-release-list li::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background: var(--cover) var(--cover-position, center 42%) / cover no-repeat;
  filter: saturate(0.8) contrast(1.08);
  transform: scale(1.015);
  transition: filter 350ms ease, transform 700ms cubic-bezier(0.2, 0.72, 0.25, 1);
}

.game-release-list .game-release--image-cover::before {
  display: none;
}

.game-release-list .game-release__cover {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(0.8) contrast(1.08);
  transform: scale(1.015);
  transition: filter 350ms ease, transform 700ms cubic-bezier(0.2, 0.72, 0.25, 1);
}

.game-release-list li::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(0deg, rgba(6, 7, 9, var(--cover-shade-bottom)), rgba(6, 7, 9, var(--cover-shade-top)) 82%),
    linear-gradient(90deg, rgba(6, 7, 9, var(--cover-shade-side)), transparent 72%);
}

.game-release-list .game-release--lighter-cover {
  --cover-shade-bottom: 0.68;
  --cover-shade-top: 0.06;
  --cover-shade-side: 0.22;
}

.game-release-list li:hover::before {
  filter: saturate(1.08) contrast(1.02);
  transform: none;
}

.game-release-list li:hover .game-release__cover {
  filter: saturate(1.08) contrast(1.02);
  transform: none;
}

.game-release-list li > :not(.game-release__cover) {
  text-shadow: 0 1px 9px rgba(0, 0, 0, 0.65);
}

.release-year,
.release-index,
.game-release-list small {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-release-list strong {
  font-size: clamp(1.3rem, 2.45vw, 2.35rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
}

.release-index {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.8);
  text-align: right;
}

.game-release-list .release-year {
  margin: 0;
  color: rgba(255, 255, 255, 0.73);
}

.game-release-list small {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
}

.games-footnote {
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 820px) {
  .games-rail {
    right: 8px;
  }

  .games-rail a {
    grid-template-columns: 18px;
  }

  .games-rail a b {
    display: none;
  }

  .game-feature__copy {
    width: calc(100vw - 74px);
  }

  .games-archive__heading {
    grid-template-columns: 1fr;
  }

  .game-decade {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 18px;
  }

  .game-release-list li {
    grid-template-columns: 52px minmax(0, 1fr) 32px;
  }

  .game-release-list small {
    display: none;
  }
}

@media (max-width: 520px) {
  .game-feature,
  .games-archive {
    min-height: var(--games-viewport, 100svh);
  }

  .game-feature,
  .games-archive {
    padding-right: 18px;
    padding-left: 18px;
  }

  .games-rail {
    top: auto;
    right: 58px;
    bottom: 16px;
    left: 14px;
    flex-direction: row;
    justify-content: flex-end;
    gap: 7px;
    transform: none;
  }

  .games-rail a {
    display: flex;
    grid-template-columns: none;
    gap: 0;
    width: 25px;
    height: 25px;
    min-height: 0;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    justify-content: center;
    background: rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(8px);
  }

  .games-rail a::before,
  .games-rail a b {
    display: none;
  }

  .games-rail a.is-current {
    color: #111;
    background: #fff;
  }

  .games-world.is-archive-current .games-rail a.is-current {
    color: var(--life-surface);
    background: var(--ink);
  }

  .game-feature {
    padding-bottom: 80px;
  }

  .game-feature__copy {
    width: calc(100vw - 36px);
  }

  .game-count {
    margin-bottom: 24px;
  }

  .game-feature h3 {
    font-size: clamp(3.7rem, 18vw, 6rem);
  }

  .game-thought {
    max-width: 82vw;
    margin-top: 17px;
    font-size: 0.88rem;
  }

  .game-trailer-link {
    margin-top: 20px;
    font-size: 0.58rem;
  }

  .games-archive__heading {
    margin-bottom: 38px;
  }

  .game-decades {
    gap: 58px;
  }

  .game-decade {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .game-decade__heading {
    position: static;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .game-decade__heading h4 {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .game-decade__heading > span {
    grid-column: 2;
  }

  .game-release-list li {
    grid-template-columns: 42px minmax(0, 1fr) 28px;
    min-height: 108px;
    padding: 16px;
  }

  .game-release-list strong {
    font-size: 1.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .games-scroll {
    scroll-behavior: auto;
  }

  .game-feature__copy,
  .game-media > img,
  .game-montage,
  .game-release-list li::before {
    transition-duration: 0.001ms !important;
  }
}
