/* ArtDock Games — public site.
   Dark cinematic minimalism: quiet chrome, colour comes from the game art.
   No radius, no shadows, no cards; gradients only as legibility overlays. */

/* ---------- Chakra Petch, self-hosted (OFL, see assets/fonts/OFL.txt) ---------- */
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/chakra-petch-400-latin.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: "Chakra Petch"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/chakra-petch-500-latin.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: "Chakra Petch"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/chakra-petch-600-latin.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: "Chakra Petch"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/chakra-petch-700-latin.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: "Chakra Petch"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/chakra-petch-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/chakra-petch-500-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/chakra-petch-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/chakra-petch-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/chakra-petch-400-thai.woff2") format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/chakra-petch-500-thai.woff2") format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/chakra-petch-600-thai.woff2") format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/chakra-petch-700-thai.woff2") format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }

/* ---------- Tokens ---------- */
:root {
  --bg: #060606;
  --bg-elevated: #0c0c0c;
  --fg: #ffffff;
  --fg-muted: rgba(255, 255, 255, 0.62);
  --fg-faint: rgba(255, 255, 255, 0.38);
  --line: rgba(255, 255, 255, 0.14);
  --accent: #e31b23;
  --game-accent: rgba(255, 255, 255, 0.7);   /* overridden per game with style="--game-accent:…" */
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Chakra Petch", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --space: clamp(1.25rem, 3vw, 3.5rem);
  --max: 110rem;
  --text-max: 46rem;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.sprite { position: absolute; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 1000;
  padding: 0.65rem 1rem; background: var(--fg); color: var(--bg); font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.section-title {
  margin: 0 0 clamp(1.75rem, 4vh, 2.75rem);
  font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; line-height: 1.05;
  letter-spacing: 0.02em; text-transform: uppercase;
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.9rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-muted);
}
.link-arrow:hover { color: var(--fg); text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--fg); background: var(--fg); color: var(--bg);
  font-weight: 600; font-size: 0.95rem; line-height: 1.2; letter-spacing: 0.06em; text-transform: uppercase;
  text-align: center;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: transparent; color: var(--fg); text-decoration: none; }
.btn svg { flex-shrink: 0; }
.btn--ghost { background: transparent; color: var(--fg); border-color: rgba(255, 255, 255, 0.55); }
.btn--ghost:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn--sm { padding: 0.45rem 0.9rem; font-size: 0.75rem; letter-spacing: 0.05em; gap: 0.45rem; }
@media (min-width: 769px) {
  .btn--sm { padding: 0.75rem 1.4rem; font-size: 0.95rem; }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--header-h);
  transition: background-color 0.3s var(--ease);
}
/* legibility overlay while the header floats over the art; it fades out once the header turns solid */
.site-header::before {
  content: ""; position: absolute; inset: 0 0 auto; z-index: -1; pointer-events: none;
  height: calc(var(--header-h) + 3.5rem);
  background: linear-gradient(180deg, rgba(6, 6, 6, 0.78) 0%, rgba(6, 6, 6, 0.45) 55%, transparent 100%);
  transition: opacity 0.3s var(--ease);
}
.site-header.is-scrolled::before,
.page--plain .site-header::before { opacity: 0; }
.site-header.is-scrolled,
.page--plain .site-header { background: rgba(6, 6, 6, 0.88); }
.page--plain .site-header { border-bottom: 1px solid var(--line); }

.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--space);
}
.nav__logo { display: flex; align-items: center; flex-shrink: 0; }
.nav__logo img { height: 2.6rem; width: auto; }
.nav__logo:hover { opacity: 0.85; }

.nav__links { display: none; gap: clamp(1.25rem, 3vw, 2.25rem); }
.nav__links a {
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.86);
}
.nav__links a:hover, .nav__links a[aria-current] { color: var(--fg); text-decoration: none; }

.nav__toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 0.4rem;
  width: 2.75rem; height: 2.75rem; padding: 0.5rem;
}
.nav__toggle-bar { display: block; height: 2px; width: 100%; background: var(--fg); transition: transform 0.25s var(--ease); }
.nav.is-open .nav__toggle-bar:first-child { transform: translateY(4.2px) rotate(45deg); }
.nav.is-open .nav__toggle-bar:last-child { transform: translateY(-4.2px) rotate(-45deg); }

@media (max-width: 767px) {
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    padding: 0.5rem var(--space) 1.25rem;
    background: rgba(6, 6, 6, 0.97); border-bottom: 1px solid var(--line);
  }
  .nav.is-open .nav__links a { display: block; padding: 0.8rem 0; font-size: 1.1rem; }
}
@media (min-width: 768px) {
  .nav__toggle { display: none; }
  .nav__links { display: flex; }
}

/* ---------- Hero (featured game) ---------- */
.hero {
  position: relative; width: 100%; min-height: 100svh;
  display: flex; align-items: center; overflow: hidden; background: var(--bg);
}
.hero__media { position: absolute; inset: 0; z-index: 0; will-change: transform; }
.hero__poster, .hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: center center;
}
.hero__video { opacity: 0; transition: opacity 0.6s var(--ease); }
.hero__video.is-ready { opacity: 1; }
.hero__yt { position: absolute; inset: 0; overflow: hidden; container-type: size; opacity: 0; pointer-events: none; transition: opacity 0.6s var(--ease); }
.hero__yt iframe { position: absolute; top: 50%; left: 50%; width: max(100cqw, 177.78cqh); height: max(100cqh, 56.25cqw); border: 0; transform: translate(-50%, -50%) scale(1.2); }
.hero.is-playing .hero__yt { opacity: 1; }

.hero__overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(6, 6, 6, 0.82) 0%, rgba(6, 6, 6, 0.42) 34%, rgba(6, 6, 6, 0.1) 62%, transparent 82%);
}
.hero__overlay::after {
  content: ""; position: absolute; inset: auto 0 0; height: 28%;
  background: linear-gradient(to top, var(--bg), transparent);
}

.hero__content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem;
  width: 100%; max-width: 38rem; margin-right: auto;
  padding: calc(var(--header-h) + 1rem) 5vw 3rem;
}
/* solid tag: stays legible over any part of the key art */
.hero__status {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.7rem 0.4rem 0.6rem; background: var(--accent); color: #fff;
  font-size: 0.8rem; font-weight: 700; line-height: 1; letter-spacing: 0.14em; text-transform: uppercase;
}
.hero__status .pulse-dot { width: 0.4rem; height: 0.4rem; background: #fff; }
.pulse-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.85); } }

.hero__title {
  width: min(36rem, 100%);
  font-size: clamp(2.5rem, 8vw, 5rem); font-weight: 700; line-height: 0.95; text-transform: uppercase;
}
.hero__title a { display: block; }
.hero__title a:hover { text-decoration: none; }
.hero__logo { width: auto; max-width: 100%; max-height: min(42svh, 22rem); }
.hero__tagline { max-width: 36rem; font-size: clamp(0.95rem, 1.8vw, 1.1rem); color: var(--fg-muted); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 0.35rem; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 32px; z-index: 5; transform: translateX(-50%);
  display: flex; padding: 0.5rem; color: rgba(255, 255, 255, 0.78);
}
.hero__scroll:hover { color: #fff; }
.hero__scroll-mouse { position: relative; width: 1.35rem; height: 2.15rem; border: 1.5px solid currentColor; border-radius: 999px; }
.hero__scroll-wheel {
  position: absolute; left: 50%; top: 0.4rem; width: 0.2rem; height: 0.4rem; margin-left: -0.1rem;
  background: currentColor; border-radius: 999px; animation: scroll-wheel 1.6s ease-in-out infinite;
}
@keyframes scroll-wheel { 0% { opacity: 1; transform: translateY(0); } 70%, 100% { opacity: 0; transform: translateY(0.55rem); } }

/* themed cursor of a game (admin: game -> Themed cursor), fine pointers only; size and click point come from data-* */
.themed-cursor {
  position: fixed; left: 0; top: 0; z-index: 9999; width: 64px; max-width: none; height: auto;
  pointer-events: none; opacity: 0; transition: opacity 120ms ease; will-change: left, top;
}
.themed-cursor.is-visible { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .has-themed-cursor, .has-themed-cursor a, .has-themed-cursor button { cursor: none; }
}

@media (min-width: 1600px) {
  .hero__content { max-width: 48rem; padding-left: clamp(2.5rem, 5vw, 5rem); }
  .hero__title { width: min(40rem, 100%); }
  .hero__tagline { max-width: 40rem; }
}
@media (max-width: 768px) {
  .hero { align-items: flex-end; }
  .hero__video { display: none; }
  .hero__content { max-width: none; padding: calc(var(--header-h) + 1rem) 6vw calc(12vw + 3.25rem); gap: 1rem; }
  .hero__title { width: min(20rem, 88vw); }
  .hero__logo { max-height: 30svh; }
  .hero__actions { flex-wrap: nowrap; width: 100%; gap: 0.55rem; }
  .hero__actions .btn { flex: 1 1 0; min-width: 0; padding: 0.75rem 0.7rem; font-size: 0.78rem; letter-spacing: 0.04em; }
  .hero__scroll { bottom: 20px; }
  .hero__overlay { background: linear-gradient(180deg, rgba(6, 6, 6, 0.25) 0%, rgba(6, 6, 6, 0.55) 45%, rgba(6, 6, 6, 0.88) 100%); }
  .hero__overlay::after { display: none; }
}
@media (max-width: 480px) {
  .hero__scroll { display: none; }
  .hero__content { padding-bottom: 12vw; }
}

/* ---------- "Our Games" intro ---------- */
.games-intro {
  display: grid; place-items: center;
  padding: clamp(2.5rem, 7vh, 5rem) var(--space); border-top: 1px solid var(--line);
}
.games-intro__title {
  font-size: clamp(3.5rem, 14vw, 10rem); font-weight: 700; line-height: 0.9;
  letter-spacing: -0.02em; text-transform: uppercase; text-align: center;
}

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); padding: 1.5rem 0; background: var(--bg); }
.marquee--top { border-top: 0; border-bottom: 1px solid var(--line); }
.marquee__track {
  display: flex; width: max-content; align-items: center; gap: 1.5rem;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--fg-faint); white-space: nowrap; will-change: transform;
}
.marquee__track.is-ready { animation: marquee var(--marquee-duration, 32s) linear infinite; }
.marquee__track--reverse.is-ready { animation-name: marquee-reverse; }
@media (hover: hover) and (pointer: fine) {
  .marquee:hover .marquee__track.is-ready { animation-play-state: paused; }
}
.marquee__link { display: flex; align-items: center; flex-shrink: 0; color: inherit; }
.marquee__link:hover { text-decoration: none; color: var(--fg); }
.marquee__logo { width: auto; max-width: none; height: clamp(1.35rem, 2.8vw, 2rem); object-fit: contain; flex-shrink: 0; opacity: 0.72; transition: opacity 0.2s ease; }
.marquee__link:hover .marquee__logo { opacity: 1; }
.marquee__logo--tall { height: clamp(2.1rem, 4.2vw, 2.9rem); }
.marquee__text, .marquee__dot { flex-shrink: 0; line-height: 1; }
.marquee__dot { color: rgba(255, 255, 255, 0.55); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marquee-reverse { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* ---------- Game blocks ---------- */
/* the featured game is the full-screen hero; the rest are strips only as tall as their info block */
.game-frame {
  position: relative; width: 100%; overflow: hidden; border-top: 1px solid var(--line);
  background: linear-gradient(145deg, var(--bg-elevated) 0%, #141414 100%);
}
.game-frame::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.78) 32%, rgba(0, 0, 0, 0.25) 62%, transparent 80%),
    linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.5) 100%);
}
.game-frame__poster, .game-frame__video {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: center center; transition: opacity 0.4s ease;
}
.game-frame__video { opacity: 0; pointer-events: none; }
.game-frame.is-playing .game-frame__video { opacity: 1; }
/* YouTube preview: the iframe covers the frame like object-fit: cover, slightly zoomed to crop the player chrome */
.game-frame__yt { position: absolute; inset: 0; z-index: 0; overflow: hidden; container-type: size; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.game-frame__yt iframe { position: absolute; top: 50%; left: 50%; width: max(100cqw, 177.78cqh); height: max(100cqh, 56.25cqw); border: 0; transform: translate(-50%, -50%) scale(1.2); }
.game-frame.is-playing .game-frame__yt { opacity: 1; }

.game-info {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: clamp(2.5rem, 7vh, 4.5rem) var(--space) clamp(1.5rem, 4vh, 2.5rem); color: #fff;
}
.game-info__title { margin: 0 0 6px; font-size: 22px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1.1; }
.game-info__title a { display: block; }
.game-info__title a:hover { text-decoration: none; opacity: 0.9; }
.game-info__logo { width: auto; height: auto; max-width: min(22rem, 70vw); max-height: 7.5rem; object-fit: contain; object-position: left bottom; }
.game-info__status {
  margin: 0 0 14px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--game-accent);
}
.game-info__desc { margin: 0 0 14px; max-width: 36rem; font-size: 1.05rem; color: rgba(255, 255, 255, 0.88); }
.game-info__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; margin: 0 0 14px; }

.platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-left: -0.5rem; }
.platforms li { display: flex; line-height: 0; }
.platform { display: flex; padding: 0.5rem; color: rgba(255, 255, 255, 0.85); transition: color 0.2s ease; }
.platform:hover { color: #fff; }

@media (max-width: 768px) {
  .game-info { padding: 3rem 20px 1.25rem; }
  .game-frame::after { background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.72) 45%, rgba(0, 0, 0, 0.9) 100%); }
  .game-info__logo { max-width: min(16rem, 72vw); max-height: 5.5rem; }
  .game-info__status { font-weight: 700; letter-spacing: 0.08em; }
  .game-info__desc { font-size: 0.95rem; }
}

/* ---------- Awards ---------- */
.awards { padding: clamp(4.5rem, 14vh, 9rem) 0; border-top: 1px solid var(--line); }
.awards__inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--space); }
.awards__item {
  display: grid; grid-template-columns: minmax(5.5rem, 7rem) minmax(0, 1fr) auto;
  gap: 1.25rem 1.75rem; align-items: center;
  padding: clamp(1.5rem, 3vh, 2.25rem) 0; border-top: 1px solid var(--line);
}
.awards__item:last-child { border-bottom: 1px solid var(--line); }
.awards__year { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; letter-spacing: 0.04em; line-height: 1; }
.awards__body h3 { margin: 0 0 0.35rem; font-size: clamp(1.25rem, 2.4vw, 1.75rem); font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1.15; }
.awards__event { margin: 0 0 0.65rem; font-size: 0.95rem; color: var(--fg-muted); letter-spacing: 0.04em; }
.awards__game { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); }
.awards__trophy { width: auto; max-width: none; height: clamp(4.5rem, 12vw, 7.5rem); object-fit: contain; justify-self: end; }
@media (max-width: 640px) {
  .awards__item { grid-template-columns: 1fr auto; gap: 0.65rem 1rem; }
  .awards__year { grid-column: 1 / -1; }
  .awards__trophy { height: 4.75rem; }
}

/* ---------- About ---------- */
.about { position: relative; isolation: isolate; padding: clamp(4rem, 12vh, 8rem) 0; border-top: 1px solid var(--line); overflow: hidden; }
/* low-contrast tiled studio emblem behind the section */
.about__pattern {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("../img/studio/emblem.svg") 0 0 / 7rem repeat; opacity: 0.05;
}
.about__inner {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--space);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(1.25rem, 3.5vw, 3rem); align-items: center;
}
.about__copy .section-title { margin-bottom: 1.5rem; }
.about__copy p:not(.eyebrow) { max-width: 42rem; color: var(--fg-muted); font-size: 1.1rem; margin: 0 0 1rem; }
.about__copy p:last-child { margin-bottom: 0; }
/* the cut-outs are trimmed to the character; the reference PNGs carry ~20% transparent margin, hence 0.8 of its sizes */
.about__figure { width: auto; max-width: none; height: clamp(13rem, 29vw, 21rem); object-fit: contain; pointer-events: none; }
.about__figure--left { justify-self: start; }
.about__figure--right { justify-self: end; will-change: transform; }
@media (max-width: 900px) {
  .about__inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .about__figure--left { display: none; }
  .about__figure--right { justify-self: center; height: clamp(9.5rem, 34vw, 14.5rem); }
}
@media (max-width: 520px) {
  .about__figure--right { height: clamp(9rem, 44vw, 12rem); }
}

/* ---------- News ---------- */
.news { max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 10vh, 7rem) var(--space); border-top: 1px solid var(--line); }
.news--page { border-top: 0; padding-top: 0; }
.news__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem; }
.news__item { padding: 1.75rem 0; border-top: 1px solid var(--line); }
.news__item:last-child { border-bottom: 1px solid var(--line); }
.news__item time { display: block; margin-bottom: 0.5rem; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-faint); }
.news__title { margin-bottom: 0.5rem; font-size: clamp(1.2rem, 2.5vw, 1.55rem); font-weight: 600; letter-spacing: 0.01em; }
.news__item p { max-width: 42rem; color: var(--fg-muted); }
.news__item--thumb { display: grid; grid-template-columns: clamp(7rem, 22vw, 18rem) minmax(0, 1fr); gap: clamp(1rem, 2.5vw, 2rem); align-items: start; }
.news__thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-elevated); }
.news__thumb img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.2s; }
.news__thumb:hover img, .news__item--thumb:has(.news__title a:hover) .news__thumb img { opacity: 0.8; }
@media (max-width: 520px) {
  .news__item--thumb .news__title { font-size: 1.1rem; }
}
.empty { color: var(--fg-muted); padding: 2rem 0; border-top: 1px solid var(--line); }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; }
.pagination__pages { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0 auto; color: var(--fg-faint); }
.pagination__pages a, .pagination__pages li[aria-hidden] { display: grid; place-items: center; min-width: 2.75rem; height: 2.75rem; border: 1px solid transparent; color: var(--fg-muted); font-weight: 600; }
.pagination__pages a:hover { color: var(--fg); text-decoration: none; border-color: var(--line); }
.pagination__pages a[aria-current] { color: var(--fg); border-color: var(--fg); }
.pagination__link { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; font-size: 0.9rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted); }
.pagination__link:hover { color: var(--fg); text-decoration: none; }

/* ---------- Plain pages (news, article, legal, 404) ---------- */
.page-head { max-width: var(--max); margin: 0 auto; padding: calc(var(--header-h) + clamp(2.5rem, 8vh, 5rem)) var(--space) clamp(2rem, 5vh, 3rem); }
.page-title { font-size: clamp(2.5rem, 8vw, 5.5rem); font-weight: 700; line-height: 0.95; letter-spacing: -0.01em; text-transform: uppercase; }
.page-title--article { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.05; letter-spacing: 0.01em; max-width: 24ch; text-wrap: balance; }
.page-lead { margin-top: 1.25rem; max-width: var(--text-max); font-size: 1.1rem; color: var(--fg-muted); }
.page-head .eyebrow a:hover { color: var(--fg); }

.article { padding-bottom: clamp(4rem, 10vh, 7rem); }
.article__game { margin-top: 1.25rem; }
.article__cover { width: calc(100% - 2 * var(--space)); max-width: calc(var(--max) - 2 * var(--space)); margin: 0 auto clamp(2rem, 5vh, 3.5rem); max-height: 80svh; object-fit: cover; }
.article__body, .article__back { max-width: calc(var(--text-max) + 2 * var(--space)); margin: 0 auto; padding: 0 var(--space); }
.article__back { margin-top: 3rem; }

.error-page { min-height: 80svh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1.25rem; max-width: var(--max); margin: 0 auto; padding: calc(var(--header-h) + 3rem) var(--space) 4rem; }
.error-page__code { font-size: 0.9rem; font-weight: 600; letter-spacing: 0.16em; color: var(--accent); }
.error-page .page-lead { margin-top: 0; }

/* ---------- Prose (Markdown articles, game "about", legal text) ---------- */
.prose { color: rgba(255, 255, 255, 0.82); font-size: 1.05rem; line-height: 1.65; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.01em; color: var(--fg); }
.prose h2 { margin-top: 2.2em; padding-top: 1.1em; border-top: 1px solid var(--line); font-size: clamp(1.35rem, 2.6vw, 1.75rem); font-weight: 700; line-height: 1.2; text-transform: uppercase; letter-spacing: 0.02em; color: var(--fg); }
.prose h3 { margin-top: 1.8em; font-size: 1.25rem; font-weight: 700; line-height: 1.25; text-transform: uppercase; letter-spacing: 0.02em; color: var(--fg); }
.prose h4, .prose h5, .prose h6 { margin-top: 1.5em; font-size: 1rem; font-weight: 600; color: var(--fg); }
.prose h3 + p, .prose h4 + p { margin-top: 0.45em; }
.prose a { color: var(--fg); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: rgba(255, 255, 255, 0.45); }
.prose a:hover { text-decoration-color: var(--fg); }
.prose strong { color: var(--fg); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: square; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose li > ul, .prose li > ol { margin-top: 0.4em; }
.prose blockquote { margin-left: 0; margin-right: 0; padding-left: 1.25rem; border-left: 2px solid var(--fg); color: var(--fg-muted); }
.prose code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.9em; padding: 0.1em 0.35em; background: #151515; border: 1px solid var(--line); }
.prose pre { padding: 1rem 1.25rem; background: var(--bg-elevated); border: 1px solid var(--line); overflow-x: auto; }
.prose pre code { padding: 0; border: 0; background: none; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose img { margin-left: auto; margin-right: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { padding: 0.6rem 0.8rem; border: 1px solid var(--line); text-align: left; vertical-align: top; font-weight: 400; }
.prose th { width: 32%; font-weight: 600; color: var(--fg); background: var(--bg-elevated); }
.prose address { font-style: normal; }

/* ---------- Legal pages (EULA, Privacy Policy) ---------- */
.legal { max-width: calc(var(--text-max) + 8rem + 2 * var(--space)); margin: 0 auto; padding: calc(var(--header-h) + clamp(2rem, 6vh, 4rem)) var(--space) clamp(4rem, 10vh, 7rem); }
.legal > h1 { margin-bottom: 1.5rem; font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; line-height: 1.05; text-transform: uppercase; }
.legal__body [id] { scroll-margin-top: calc(var(--header-h) + 1rem); }
.legal .eu-brand { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.16em; color: rgba(255, 255, 255, 0.72); }
.legal .eu-brand + h1 { margin-top: 0.5rem; }
.legal .eu-sub { font-size: 1.2rem; color: var(--fg); }
.legal .eu-meta { color: var(--fg-muted); }
.legal .eu-box { padding: 1rem 1.25rem; border: 1px solid var(--line); border-left: 3px solid rgba(255, 255, 255, 0.45); background: var(--bg-elevated); }
.legal .eu-box-strong { border-left-color: var(--fg); color: var(--fg); }
.legal .eu-box > * + * { margin-top: 0.75em; }
.legal .eu-toc, .legal .pp-toc { display: block; padding: 1rem 1.25rem; border: 1px solid var(--line); }
.legal .eu-toc > strong, .legal .pp-toc > strong { display: block; margin-bottom: 0.6rem; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; }
.legal .eu-toc ul, .legal .pp-toc ul { padding: 0; list-style: none; }
.legal .eu-toc ul { column-count: 2; column-gap: 2rem; }
.legal .eu-toc li, .legal .pp-toc li { break-inside: avoid; margin: 0 0 0.35em; }
.legal .eu-copy { font-size: 0.9rem; color: var(--fg-faint); }
@media (max-width: 640px) { .legal .eu-toc ul { column-count: 1; } }

.lang-switch { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem; margin-bottom: 2.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.lang-switch__label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-faint); }
.lang-switch ul { display: flex; flex-wrap: wrap; gap: 0.15rem 0.25rem; }
.lang-switch a { display: block; padding: 0.3rem 0.55rem; font-size: 0.9rem; color: var(--fg-muted); border: 1px solid transparent; }
.lang-switch a:hover { color: var(--fg); text-decoration: none; border-color: var(--line); }
.lang-switch a[aria-current] { color: var(--fg); border-color: rgba(255, 255, 255, 0.55); }

/* ---------- Game page ---------- */
.game-hero { position: relative; min-height: min(88svh, 60rem); display: flex; align-items: flex-end; overflow: hidden; background: var(--bg); }
.game-hero__poster { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center center; }
.game-hero__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 6, 6, 0.35) 0%, transparent 22%, rgba(6, 6, 6, 0.35) 55%, rgba(6, 6, 6, 0.94) 100%); }
.game-hero__content {
  position: relative; z-index: 1; width: 100%; max-width: var(--max); margin: 0 auto;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1rem;
  padding: calc(var(--header-h) + 2rem) var(--space) clamp(2rem, 6vh, 4rem);
}
.game-hero__status { font-size: 0.9rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--game-accent); }
.game-hero__title { font-size: clamp(2.5rem, 8vw, 5.5rem); font-weight: 700; line-height: 0.95; text-transform: uppercase; }
.game-hero__logo { width: auto; height: auto; max-width: min(30rem, 78vw); max-height: min(30svh, 14rem); object-fit: contain; object-position: left bottom; }
.game-hero__tagline { max-width: 40rem; font-size: clamp(1rem, 1.8vw, 1.2rem); color: rgba(255, 255, 255, 0.88); }
.game-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.35rem; }

.game-section { max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 8vh, 5.5rem) var(--space); border-top: 1px solid var(--line); }
.game-section > .prose { max-width: var(--text-max); }
.game-section__caption { margin-top: 1rem; max-width: var(--text-max); color: var(--fg-muted); }
.game-section--sprites { padding-top: clamp(1.5rem, 4vh, 3rem); padding-bottom: clamp(1.5rem, 4vh, 3rem); }

.video-facade { position: relative; width: 100%; max-width: 80rem; aspect-ratio: 16 / 9; background: var(--bg-elevated); overflow: hidden; }
.video-facade__poster { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0.72; transition: opacity 0.3s ease; }
.video-facade:hover .video-facade__poster { opacity: 0.9; }
.video-facade__play { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; color: #fff; }
.video-facade__play svg { box-sizing: content-box; padding: 1.4rem; border: 1px solid rgba(255, 255, 255, 0.7); background: rgba(6, 6, 6, 0.55); transition: background-color 0.2s, color 0.2s; }
.video-facade__play:hover svg, .video-facade__play:focus-visible svg { background: #fff; color: var(--bg); }
.video-facade__note { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.6rem 1rem; font-size: 0.75rem; color: var(--fg-muted); background: linear-gradient(to top, rgba(6, 6, 6, 0.85), transparent); pointer-events: none; }
.video-facade iframe, .video-inline { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.video-inline { position: static; max-width: 80rem; aspect-ratio: 16 / 9; }

.sprites { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: clamp(1rem, 3vw, 2.5rem); }
.sprites__img { width: auto; height: clamp(5rem, 11vw, 9rem); max-width: none; object-fit: contain; image-rendering: pixelated; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.gallery__link { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-elevated); }
.gallery__img { width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform 0.5s var(--ease), opacity 0.3s ease; opacity: 0.92; }
.gallery__link:hover .gallery__img, .gallery__link:focus-visible .gallery__img { transform: scale(1.03); opacity: 1; }
.gallery__play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(6, 6, 6, 0.4); }
@media (min-width: 700px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; } }
@media (min-width: 1300px) { .gallery { grid-template-columns: repeat(4, 1fr); } }

.stores { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.next-game { position: relative; display: flex; align-items: flex-end; min-height: clamp(16rem, 44svh, 28rem); overflow: hidden; border-top: 1px solid var(--line); }
.next-game:hover { text-decoration: none; }
.next-game__poster { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0.45; transition: opacity 0.4s ease, transform 0.8s var(--ease); }
.next-game:hover .next-game__poster, .next-game:focus-visible .next-game__poster { opacity: 0.7; transform: scale(1.02); }
/* legibility overlay across the full width (on the inner block it stopped at --max on wide screens) */
.next-game::after { content: ""; position: absolute; inset: auto 0 0; height: 75%; background: linear-gradient(to top, rgba(6, 6, 6, 0.9), transparent); pointer-events: none; }
.next-game__inner { position: relative; z-index: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: var(--space); }
.next-game__inner .eyebrow { display: block; }
.next-game__title { display: inline-flex; align-items: center; gap: 0.75rem; font-size: clamp(2rem, 6vw, 4rem); font-weight: 700; line-height: 1; text-transform: uppercase; }

/* ---------- Trailer player + lightbox (native <dialog>) ---------- */
.player, .lightbox {
  width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(0, 0, 0, 0.96); color: #fff; overflow: hidden;
}
.player::backdrop, .lightbox::backdrop { background: #000; }
.player[open], .lightbox[open] { display: grid; place-items: center; }
.player__frame { width: min(100vw, calc((100dvh - 7rem) * 16 / 9)); aspect-ratio: 16 / 9; background: #000; }
.player__frame iframe, .player__frame video { display: block; width: 100%; height: 100%; border: 0; }
.player__close, .lightbox__btn {
  position: absolute; display: grid; place-items: center; width: 3rem; height: 3rem;
  background: rgba(0, 0, 0, 0.72); border: 1px solid rgba(255, 255, 255, 0.35); color: #fff;
}
.player__close:hover, .lightbox__btn:hover { background: #fff; color: #000; border-color: #fff; }
.player__close, .lightbox__btn--close { top: 0.75rem; right: 0.75rem; }
.lightbox__btn--prev { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.lightbox__btn--next { right: 0.75rem; top: 50%; transform: translateY(-50%); }
.lightbox__stage { display: grid; place-items: center; width: 100vw; height: 100dvh; padding: 4rem 0; touch-action: pan-y; }
.lightbox__stage img, .lightbox__stage video { max-width: 100vw; max-height: calc(100dvh - 8rem); width: auto; height: auto; object-fit: contain; }
.lightbox__caption { position: absolute; left: 4.5rem; right: 4.5rem; bottom: 1rem; text-align: center; font-size: 0.9rem; color: var(--fg-muted); }
.lightbox__count { position: absolute; left: 1rem; top: 1.4rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; color: var(--fg-muted); }
@media (max-width: 640px) {
  .lightbox__btn--prev, .lightbox__btn--next { top: auto; bottom: 0.75rem; transform: none; }
  .lightbox__caption { bottom: 4.5rem; left: 1rem; right: 1rem; }
}
body.has-dialog { overflow: hidden; }

/* ---------- Footer ---------- */
.footer { padding: clamp(3rem, 8vh, 5rem) var(--space) 2rem; border-top: 1px solid var(--line); background: var(--bg-elevated); }
.footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; max-width: var(--max); margin: 0 auto 2.5rem; }
.footer__logo img { height: 2rem; width: auto; }
.footer__logo:hover { opacity: 0.85; }
.footer__social { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.footer__social a { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; color: var(--fg-muted); transition: color 0.2s; }
.footer__social a:hover { color: var(--fg); }
.footer__grid { display: grid; gap: 2rem; max-width: var(--max); margin: 0 auto 2.5rem; }
.footer__label { margin-bottom: 0.75rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-faint); }
.footer__grid p, .footer__grid a { color: var(--fg-muted); font-size: 0.95rem; overflow-wrap: anywhere; }
.footer__grid a:hover { color: var(--fg); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; max-width: var(--max); margin: 0 auto; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--fg-faint); }
.footer__legal { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer__legal a { color: var(--fg-muted); }
.footer__legal a:hover { color: var(--fg); }
@media (min-width: 700px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer__grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Motion ---------- */
.fade { opacity: 0; transform: translateY(12px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.fade.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .fade { opacity: 1; transform: none; }
  .marquee { overflow-x: auto; }
  .marquee__track.is-ready { animation: none; }
  .hero__video, .hero__yt, .game-frame__video, .game-frame__yt { display: none; }
}
