/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --panel: #f5f5f4;
  --text: #191d21;
  --text-2: #4a4f55;
  --text-3: #80858b;
  --line: #e7e7e5;

  --teal: #2f8f96;
  --teal-bg: linear-gradient(160deg, #6cc1c4 0%, #2f8f96 100%);
  --violet: #6a55c9;
  --violet-bg: linear-gradient(160deg, #a99cf0 0%, #6a55c9 100%);
  --orange: #c4652a;
  --orange-bg: linear-gradient(160deg, #f2b27c 0%, #d47a3c 100%);
  --magenta: #c23b6b;
  --magenta-bg: linear-gradient(160deg, #f287ad 0%, #d1477a 100%);

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --max: 1120px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 112px 0 0; }

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 40px;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Nav ---------- */
/* Fixed bar that slides up when scrolling down and back when scrolling up */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.nav.is-hidden { transform: translateY(-110%); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--text-2);
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover { background: var(--panel); color: var(--text); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
}

/* ---------- Hero ---------- */
.hero {
  margin-top: 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 56px;
  padding: 64px;
  background: linear-gradient(180deg, var(--panel) 0%, #fbfbfa 100%);
  border-radius: var(--radius-lg);
}

/* Quiet greeting: violet is kept for "easy to use" only */
.hero-hello {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.8vw, 21px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-2);
}

.hero h1 {
  max-width: 15ch;
  text-wrap: balance;
  font-size: clamp(36px, 4.4vw, 54px);
  letter-spacing: -0.03em;
}

.hero h1 em {
  font-style: normal;
  color: var(--violet);
  background: linear-gradient(transparent 68%, #e6e1fb 68%);
}

.hero-lead {
  max-width: 460px;
  margin: 20px 0 0;
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--text-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-top: 36px;
}


.hero-link { font-weight: 500; color: var(--text); }
.hero-link span { display: inline-block; transition: transform 0.2s; }
.hero-link:hover span { transform: translateX(4px); }

/* Portrait card: a nod to game character-select screens */
.player-card {
  margin: 0;
  justify-self: end;
  width: 260px;
  max-width: 100%;
  padding: 10px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 24px 48px rgba(25, 29, 33, 0.12);
  transform: rotate(2deg);
  transition: transform 0.4s ease;
}

.player-card:hover { transform: rotate(0deg) translateY(-4px); }

.player-stage {
  position: relative;
  aspect-ratio: 4 / 4.4;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.35) 0%, transparent 55%),
    var(--violet-bg);
}

/* Pixel grid overlay */
.player-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 16px 16px;
}

.player-stage img {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 84%;
  height: auto;
  transform: translateX(-50%);
  image-rendering: pixelated;
}

.player-plate {
  display: grid;
  gap: 2px;
  padding: 12px 6px 4px;
}

.player-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
}

.player-class {
  font-size: 13px;
  color: var(--text-3);
}

.player-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.player-stats li {
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--panel);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
}

/* ---------- Case studies ---------- */
.cases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px 32px;
}

.case { display: block; }

.case-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: grid;
  place-items: center;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.case:hover .case-media { transform: translateY(-6px); }

.case-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gym card: live chart drawn over the static screenshot (coords in 1600x1200 image px) */
.gym-live { position: absolute; inset: 0; pointer-events: none; }
.gym-live i { position: absolute; display: block; }
.gl-bar {
  left: calc(var(--x) / 1600 * 100%);
  top: calc(var(--t) / 1200 * 100%);
  width: calc(51 / 1600 * 100%);
  height: calc((644 - var(--t)) / 1200 * 100%);
  background: #fff;
  box-shadow: 0 0 0 1px #fff;
}
.gl-bar::after, .gl-mix::after {
  content: "";
  position: absolute;
  inset: 0;
}
/* Replays from empty every time the card scrolls into view (main.js toggles .is-playing) */
.gym-live.is-armed:not(.is-playing) i::after { transform: scale(0); }
.gym-live.is-playing .gl-bar::after, .gym-live.is-playing .gl-mix::after {
  animation: gl-grow 7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d) infinite both;
}
.gl-bar::after { background: #dcd8fb; border-radius: 2px 2px 0 0; transform-origin: 50% 100%; }
.gl-bar--now::after { background: #6453e0; }
.gl-mix {
  left: calc(1050 / 1600 * 100%);
  top: calc(var(--y) / 1200 * 100%);
  width: calc(var(--w) / 1600 * 100%);
  height: calc(6 / 1200 * 100%);
  background: #f3f3f7;
  box-shadow: 0 0 0 1px #f3f3f7;
}
.gl-mix::after { background: var(--c); border-radius: 3px; transform-origin: 0 50%; }
.gym-live.is-playing .gl-mix::after { animation-name: gl-fill; }
.gl-ping {
  left: calc(1172 / 1600 * 100%);
  top: calc(170 / 1200 * 100%);
  width: calc(16 / 1600 * 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid #6453e0;
  opacity: 0;
}
.gym-live.is-playing .gl-ping { animation: gl-ping 3.5s ease-out infinite; }
@keyframes gl-grow {
  0% { transform: scaleY(0); }
  14%, 90% { transform: scaleY(1); }
  100% { transform: scaleY(0); }
}
@keyframes gl-fill {
  0% { transform: scaleX(0); }
  14%, 90% { transform: scaleX(1); }
  100% { transform: scaleX(0); }
}
@keyframes gl-ping {
  0% { transform: scale(0.6); opacity: 0.9; }
  60%, 100% { transform: scale(2.4); opacity: 0; }
}

.case--teal .case-media { background: var(--teal-bg); }
.case--violet .case-media { background: var(--violet-bg); }
.case--orange .case-media { background: var(--orange-bg); }
.case--magenta .case-media { background: var(--magenta-bg); }
.case--teal .case-cat { color: var(--teal); }

/* Exhibition card: the live site in a browser window on the exhibition's blue */
.case--kv .case-media { background: linear-gradient(160deg, #8f9bff 0%, #1f2fff 100%); }
.case--kv .case-cat { color: #1f2fff; }
.kv-browser { width: 86%; border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 0 16px 40px rgba(10, 16, 90, .3); }
.kv-browser-bar { display: flex; align-items: center; gap: 3px; height: 12px; padding: 0 6px; background: #eceef4; }
.kv-browser-bar i { width: 4px; height: 4px; border-radius: 50%; background: #c8ccd8; }
.case-media .kv-browser .kv-fallback { width: 100%; height: auto; aspect-ratio: 1440 / 900; }
.kv-hero { display: grid; place-items: center; gap: 16px; padding: clamp(24px, 6vw, 72px); border-radius: var(--radius-md); background: linear-gradient(160deg, #8f9bff 0%, #1f2fff 100%); }
.kv-hero .kv-browser { width: 100%; border-radius: 10px; }
.kv-hero .kv-browser-bar { gap: 6px; height: 28px; padding: 0 12px; }
.kv-hero .kv-browser-bar i { width: 9px; height: 9px; }
.kv-fallback { display: block; width: 100%; height: auto; }
.kv-live-note { max-width: 60ch; font-size: .875rem; text-align: center; color: rgba(255, 255, 255, .88); }
@media (max-width: 640px) {
  .kv-hero .kv-browser-bar { gap: 4px; height: 16px; padding: 0 8px; }
  .kv-hero .kv-browser-bar i { width: 5px; height: 5px; }
}

/* Live recreation of the exhibition home page. Every size is in units of the
   1440px-wide original (--u), so it scales with the browser frame */
.kv-browser { container-type: inline-size; }
.kv-live { display: none; }
@supports (container-type: inline-size) {
  .kv-browser .kv-fallback { display: none; }
  .kv-live { display: block; }
}
.kv-live {
  --u: calc(100cqw / 1440);
  position: relative; overflow: hidden; aspect-ratio: 1440 / 900;
  background: #fff; color: #000;
  font-family: 'Open Sans', Arial, sans-serif; line-height: 1.35;
}
.kv-live > * { position: absolute; margin: 0; }
.kv-live-cables {
  inset: 0; width: 100%; height: 100%;
  /* Same as the live site: the cable layer drifts up to 5% against the pointer */
  transform: translate(calc(var(--kx, 0) * var(--u) * -72), calc(var(--ky, 0) * var(--u) * -45));
  transition: transform 1s cubic-bezier(0, .33, .07, 1.03);
}
.kv-live-head { top: calc(var(--u) * 22); left: calc(var(--u) * 150); right: calc(var(--u) * 40); display: flex; align-items: flex-start; }
.kv-live-logo { margin-top: calc(var(--u) * 18); font-weight: 800; font-size: calc(var(--u) * 18); line-height: 1; letter-spacing: .08em; white-space: nowrap; }
/* .kv-live prefix beats the generic .case-media img cover rule */
.kv-live .kv-live-partners { flex: none; width: calc(var(--u) * 202); height: auto; margin: calc(var(--u) * 18) 0 0 calc(var(--u) * 40); object-fit: contain; }
.kv-live-nav {
  /* One line, as on the live site */
  display: flex; flex: 1; flex-wrap: nowrap; justify-content: flex-end; gap: calc(var(--u) * 32);
  margin: calc(var(--u) * 18) 0 0 calc(var(--u) * 40); padding: 0; list-style: none;
  font-size: calc(var(--u) * 12); line-height: 1.6; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
}
.kv-live-intro { top: calc(var(--u) * 162); left: calc(var(--u) * 160); font-size: calc(var(--u) * 12.5); line-height: 1.85; text-transform: uppercase; }
.kv-live-title {
  top: calc(var(--u) * 318); left: calc(var(--u) * 156);
  display: flex; flex-direction: column;
  font-weight: 800; line-height: .98; text-transform: uppercase; letter-spacing: -.005em;
}
.kv-live-title span:first-child { font-size: calc(var(--u) * 136); }
.kv-live-title span:last-child { font-size: calc(var(--u) * 103); }
.kv-live-tags { top: calc(var(--u) * 128); right: calc(var(--u) * 15); display: flex; flex-direction: column; align-items: flex-end; gap: calc(var(--u) * 14); }
.kv-live-tag {
  padding: calc(var(--u) * 10); background: #c6ff00;
  font-size: calc(var(--u) * 11.5); line-height: 1.45; text-align: right;
  transition: transform .25s ease, box-shadow .25s ease;
}
.kv-live-tag--pale { background: #effcd0; color: #8b977a; }
.kv-live-tag b { font-weight: 800; color: #ff2e8b; }
.kv-live-tag:hover { transform: translateX(calc(var(--u) * -8)); box-shadow: calc(var(--u) * 6) calc(var(--u) * 6) 0 #1a2cff; }
.kv-live-claim { top: calc(var(--u) * 678); left: calc(var(--u) * 160); font-size: calc(var(--u) * 12.5); text-transform: uppercase; }
.kv-live-claim p { margin: 0 0 calc(var(--u) * 14); }
.kv-live-marquee { left: 0; right: 0; bottom: 0; height: calc(var(--u) * 46); overflow: hidden; background: #1a1aff; }
.kv-live-track {
  display: flex; width: max-content; height: 100%; align-items: center;
  font-weight: 700; font-size: calc(var(--u) * 24); color: #fff; text-transform: uppercase; white-space: nowrap;
  animation: kv-marquee 28s linear infinite;
}
.kv-live.is-paused .kv-live-track { animation-play-state: paused; }
@keyframes kv-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .kv-live-track { animation: none; }
  .kv-live-cables { transform: none; transition: none; }
}
.case--violet .case-cat { color: var(--violet); }
.case--orange .case-cat { color: var(--orange); }
.case--magenta .case-cat { color: var(--magenta); }

/* Placeholder device frames, replaced by real mockup images later */
.mock-laptop {
  width: 72%;
  aspect-ratio: 16 / 10;
  background: #fff;
  border: 8px solid #1f2328;
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
  position: relative;
}

.mock-laptop::after {
  content: "";
  position: absolute;
  left: -14%;
  right: -14%;
  bottom: -20px;
  height: 12px;
  background: #2b3036;
  border-radius: 0 0 10px 10px;
}

.mock-phones { display: flex; gap: 18px; }

.mock-phone {
  width: 96px;
  aspect-ratio: 9 / 19;
  background: #fff;
  border: 6px solid #1f2328;
  border-radius: 20px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

.mock-phone:nth-child(2) { transform: translateY(18px); }

.mock-screen {
  height: 100%;
  padding: 10%;
  display: flex;
  flex-direction: column;
  gap: 8%;
}

.mock-screen i {
  display: block;
  height: 8%;
  border-radius: 4px;
  background: #eceef0;
}

.mock-screen i:first-child { width: 50%; background: #d6d9dc; }
.mock-screen i:nth-child(3) { flex: 1; }

/* CVM Scanner card: two live v2 screens from assets/cvm/proto.js */
.cvm-phones { display: flex; align-items: center; gap: 7%; width: 70%; }
/* patipaw card: same visual weight as the other mockups */
.case-media .pp-duo.pp-duo--sm { width: 90%; }
.cvm-phones > [data-cvp] { flex: 1; min-width: 0; }
.cvm-phones .cvp-phone {
  width: 100%;
  max-width: none;
  border-width: 5px;
  border-radius: 22px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

.case-cat {
  margin: 20px 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.case h3 { margin-top: 20px; font-size: 26px; }

.case-desc {
  margin: 8px 0 0;
  color: var(--text-2);
}

/* Card without a case study yet */
.case.is-soon { cursor: default; }
.case.is-soon:hover .case-media { transform: none; }
.case-soon {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ---------- Game art ---------- */
.game-art {
  margin-top: 88px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.game-art-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.game-art h3 { font-size: 26px; }
.game-art-head p { margin: 0; color: var(--text-3); font-size: 16px; }

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.game-tile {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: var(--panel);
  display: grid;
  place-items: center;
  color: var(--text-3);
  font-size: 14px;
  overflow: hidden;
  transition: transform 0.3s;
}

.game-tile:hover { transform: scale(1.03); }
.game-tile img { width: 100%; height: 100%; object-fit: cover; }
.game-grid--clips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.game-grid--clips .game-tile { aspect-ratio: 4 / 5; width: 100%; height: auto; object-fit: cover; display: block; }
.game-grid--portrait { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.game-grid--portrait .game-tile { aspect-ratio: 9 / 16; }
.game-grid--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.game-grid--pair .game-tile { aspect-ratio: 9 / 16; }
.game-grid--clips.game-grid--single { grid-template-columns: minmax(0, 360px); justify-content: center; }
.game-grid--renders { margin-top: 16px; }
.game-grid--renders .game-tile img { object-fit: contain; padding: 8%; }
.game-grid--sea .game-tile { background: radial-gradient(circle at 50% 35%, #2a8fa8, #0d5d78 75%); }
.game-grid--wide { margin-top: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.game-grid--wide .game-tile { aspect-ratio: 16 / 9; margin: 0; }
.game-grid--wide .game-tile--hero { grid-column: 1 / -1; }
.game-grid--sun .game-tile { background: #f7cf4a; }

/* Compact project cards */
.game-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.game-card-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm);
  background: var(--tint, var(--panel));
  overflow: hidden;
  transition: transform 0.3s;
}

.game-card-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-card:hover .game-card-media { transform: scale(1.03); }
.game-card:focus-visible { outline: none; }
.game-card:focus-visible .game-card-media { outline: 3px solid var(--text); outline-offset: 3px; }

.game-card-body { display: flex; flex-direction: column; gap: 2px; }
.game-card-title { font-size: 17px; font-weight: 600; }
.game-card-kicker { color: var(--text-3); font-size: 14px; }

/* Home: one row of five small thumbnails; looping clips play only while on screen */
.game-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.game-thumb {
  display: block;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: var(--tint, var(--panel));
  overflow: hidden;
  transition: transform 0.3s;
}
.game-thumb img,
.game-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-thumb--wheels video { object-position: 50% 45%; }
.game-thumb--contain img { object-fit: contain; padding: 12%; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25)); }
.game-card:hover .game-thumb { transform: scale(1.03); }
.game-card:focus-visible .game-thumb { outline: 3px solid var(--text); outline-offset: 3px; }

.game-art-more { display: inline-block; margin-top: 24px; font-weight: 600; font-size: 16px; }
.game-art-more::after { content: " \2192"; }

/* Game art archive page */
.ga-page { padding-top: 140px; }
.ga-intro { max-width: 640px; margin-bottom: 24px; }
.ga-intro h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 12px; }
.ga-intro p { color: var(--text-2); font-size: 18px; line-height: 1.6; }
.ga-back { display: inline-block; margin-bottom: 32px; color: var(--text-3); font-size: 15px; }
.ga-back::before { content: "\2190  "; }
.ga-project { padding: 56px 0; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.ga-project h2 { font-size: 30px; }
.ga-project .game-dialog-body { padding: 24px 0 0; }

.game-card--feature {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 32px;
  margin-bottom: 8px;
}
.game-card--feature .game-card-media { flex: 0 0 58%; aspect-ratio: 16 / 9; }
.game-card--feature .game-card-body { gap: 8px; }
.game-card--feature .game-card-kicker { order: -1; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.game-card--feature .game-card-title { font-size: 26px; }
.game-card-text { color: var(--text-2); font-size: 16px; line-height: 1.55; }
.game-card-more { margin-top: 8px; font-weight: 600; font-size: 15px; }
.game-card-more::after { content: " \2192"; }

.game-card-media--dream {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4%;
  background: radial-gradient(circle at 50% 30%, #2fa7b3, #0f4f5c 78%);
}
.dream-cover-logo { width: 58%; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25)); }
.dream-cover-icons { display: flex; gap: 3%; justify-content: center; width: 70%; }
.dream-cover-icons img { width: 20%; aspect-ratio: 1; padding: 2.5%; border-radius: 18%; background: rgba(255, 255, 255, 0.16); }

/* Detail dialog */
.game-dialog {
  width: min(960px, calc(100% - 32px));
  max-height: calc(100% - 48px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}
.game-dialog::backdrop { background: rgba(20, 20, 20, 0.55); }
.game-dialog[open] { animation: dialog-in 0.25s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px); } }

.game-dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.game-dialog-head h3 { font-size: 24px; }
.game-dialog-kicker { margin: 0 0 4px; color: var(--text-3); font-size: 14px; }
.game-dialog-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.game-dialog-close:hover { background: var(--line); }

.game-dialog-body { padding: 24px 28px 32px; }
.game-dialog-body h4 { margin: 32px 0 10px; font-size: 18px; font-weight: 600; }
.game-dialog-body p { color: var(--text-2); line-height: 1.6; }
.game-dialog-lead { margin-top: 0; font-size: 17px; }
.game-dialog-note { font-size: 15px; }

/* Dream Games: before / after */
.dream-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 300px));
  justify-content: center;
  gap: 32px;
  margin: 20px 0;
}
.dream-compare figure, .dream-headers figure, .dream-elements { margin: 0; }
.dream-compare img { display: block; width: 100%; border-radius: var(--radius-sm); }
.dream-compare figcaption, .dream-headers figcaption { margin-top: 10px; color: var(--text-3); font-size: 14px; text-align: center; }

.dream-fixes { margin: 0; padding-left: 20px; color: var(--text-2); line-height: 1.6; }
.dream-fixes li + li { margin-top: 6px; }
.dream-fixes strong { color: var(--text); }

.dream-headers { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; align-items: end; }
.dream-headers img { display: block; width: 100%; border-radius: var(--radius-sm); }
.dream-header-main img { padding: 8% 10%; background: radial-gradient(circle at 50% 30%, #2fa7b3, #0f4f5c 78%); }
.dream-elements img { display: block; width: 100%; border-radius: var(--radius-sm); }

/* Revised offer screen, sized in container units so it scales as one piece */
.uw {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 600 / 1301;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #0f4a52 0%, #146a70 45%, #0e4d55 100%);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  color: #fff;
}
.uw .uw-deco { position: absolute; bottom: 0; border-radius: 0; pointer-events: none; }
.uw .uw-deco--l { left: -6cqw; width: 34cqw; }
.uw .uw-deco--r { right: -6cqw; width: 34cqw; }
.uw .uw-deco--coins { left: 50%; bottom: -4cqw; width: 40cqw; transform: translateX(-50%); }
.uw-top, .uw-title, .uw-sub, .uw-grid { position: relative; z-index: 1; }

.uw-top { display: flex; justify-content: space-between; align-items: center; padding: 6cqw 6cqw 0; }
.uw-timer {
  display: inline-flex;
  align-items: center;
  gap: 2cqw;
  padding: 1.6cqw 4cqw 1.6cqw 1.6cqw;
  border-radius: 99px;
  background: #b3123d;
  font-size: 4.6cqw;
  font-weight: 700;
}
.uw-timer svg { width: 7cqw; height: 7cqw; }
.uw-close {
  display: grid;
  place-items: center;
  width: 10cqw;
  height: 10cqw;
  border-radius: 50%;
  background: #b3123d;
  font-size: 7cqw;
  line-height: 1;
}
.uw-title { margin: 6cqw 0 0; color: #ffd75e !important; font-size: 7.4cqw; font-weight: 700; text-align: center; line-height: 1.1 !important; }
.uw-sub { margin: 1.6cqw 0 0; color: #fff !important; font-size: 4cqw; font-weight: 600; text-align: center; line-height: 1.3 !important; }

.uw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6.4cqw;
  margin: 6.4cqw 0 0;
  padding: 0 6.4cqw;
  list-style: none;
}
.uw-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2.6cqw;
  padding: 2.6cqw;
  border-radius: 5cqw;
  background: #3fc4d6;
  box-shadow: inset 0 -1.2cqw 0 #1e8fa3;
}
.uw-card:nth-child(1) { grid-area: 1 / 1; }
.uw-card:nth-child(2) { grid-area: 1 / 2; }
.uw-card:nth-child(3) { grid-area: 2 / 2; }
.uw-card:nth-child(4) { grid-area: 2 / 1; }
.uw-card:nth-child(5) { grid-area: 3 / 1; }
.uw-card:nth-child(6) { grid-area: 3 / 2; }
.uw-card.is-free { background: #ffc531; box-shadow: inset 0 -1.2cqw 0 #d88e00; }

.uw-items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.6cqw;
  aspect-ratio: 4 / 3;
  border-radius: 3.4cqw;
  background: linear-gradient(180deg, #e9fbff, #b8eef7);
}
.is-free .uw-items { background: linear-gradient(180deg, #fff7e0, #ffe2a0); }
.uw-item { position: relative; width: 60%; }
.is-pair .uw-item { width: 40%; }
.uw .uw-item img { border-radius: 0; display: block; width: 100%; aspect-ratio: 1; filter: drop-shadow(0 0.8cqw 0.8cqw rgba(0, 0, 0, 0.18)); }
.uw-item b {
  position: absolute;
  right: -2.2cqw;
  bottom: -1.2cqw;
  min-width: 7.4cqw;
  padding: 0.6cqw 1.4cqw;
  border-radius: 99px;
  background: #0f4a52;
  font-size: 3.4cqw;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

.uw-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.6cqw;
  height: 8.8cqw;
  border-radius: 2.6cqw;
  background: #53b52a;
  box-shadow: inset 0 -0.8cqw 0 #3a8a1a;
  font-size: 4.2cqw;
  font-weight: 700;
}
.uw-btn svg { width: 3cqw; height: 3.5cqw; fill: #ffc531; color: #ffc531; }

/* Connectors point to the next offer in unlock order */
.uw-card[data-next]::after {
  content: "";
  position: absolute;
  width: 5.4cqw;
  height: 5.4cqw;
  border-radius: 1.4cqw;
  background: #53b52a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M3.5 2l3 3-3 3' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
  z-index: 1;
}
.uw-card[data-next="right"]::after { right: -6cqw; top: 50%; transform: translateY(-50%); }
.uw-card[data-next="left"]::after { left: -6cqw; top: 50%; transform: translateY(-50%) rotate(180deg); }
.uw-card[data-next="down"]::after { bottom: -6cqw; left: 50%; transform: translateX(-50%) rotate(90deg); }

/* ---------- About ---------- */
/* Photo left, text right; stacks on small screens */
.about-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 64px;
}

.about-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin: 8px 0 0;
  border-radius: var(--radius-md);
  background: #d9d9d6;
  border: 6px solid #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  transform: rotate(-3deg);
  display: grid;
  place-items: center;
  color: var(--text-3);
  object-fit: cover;
}

.about .section-title { margin-bottom: 24px; }

.about-text {
  max-width: 680px;
  color: var(--text-2);
  font-size: 17px;
}

.about-text p { margin: 0 0 16px; }
.about-text p:last-child { margin-bottom: 0; }

/* ---------- Contact ---------- */
.contact {
  margin: 112px 0 24px;
  background: linear-gradient(180deg, #fbfbfa 0%, var(--panel) 100%);
  border-radius: var(--radius-lg);
  padding: 72px 24px;
  text-align: center;
}

/* Same label style as .case-cat */
.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--violet);
}

.contact h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 32px; text-wrap: balance; }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-block;
  min-width: 160px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  border: 1px solid var(--text);
  transition: transform 0.2s, background 0.2s;
}

.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--text); color: #fff; }
.btn-secondary { background: #fff; }
.btn-secondary:hover { background: var(--panel); }

.contact-mail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  color: var(--text-2);
  font-size: 16px;
}

.contact-mail:hover { color: var(--text); }

.footer-note {
  margin: 24px 0 0;
  font-size: 13px;
  color: var(--text-3);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .nav, .case-media, .game-tile, .game-card-media, .game-thumb, .btn, .player-card { transition: none; }
  .game-dialog[open] { animation: none; }
  .gym-live { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { gap: 40px; padding: 48px 40px; }
  .player-card { width: 220px; }
  .about-grid { grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
}

@media (max-width: 760px) {
  .container { padding: 0 16px; }
  .section { padding-top: 80px; }

  .nav-inner { padding: 14px 8px 14px 16px; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    flex-direction: column;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 16px; }

  .hero { grid-template-columns: 1fr; margin-top: 80px; gap: 28px; padding: 36px 20px 32px; border-radius: 24px; }
  .hero-actions { gap: 16px 24px; margin-top: 28px; }
  /* Portrait card turns into a compact side-by-side badge */
  .player-card {
    justify-self: stretch;
    width: 100%;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    transform: none;
  }
  .player-card:hover { transform: none; }
  .player-plate { padding: 0; }

  .cases { grid-template-columns: 1fr; gap: 48px; }
  .case h3 { font-size: 22px; }
  .mock-phone { width: 76px; }

  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-grid--clips { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .game-grid--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-grid--renders,
  .game-grid--wide { gap: 10px; }

  /* The row becomes a swipe strip that runs to the screen edges */
  .game-row {
    display: flex;
    gap: 12px;
    margin: 0 -16px;
    padding: 4px 16px 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    scrollbar-width: none;
  }
  .game-row::-webkit-scrollbar { display: none; }
  .game-row .game-card { flex: 0 0 44%; scroll-snap-align: start; }

  .ga-page { padding-top: 104px; }
  .ga-project { padding: 40px 0; }
  .ga-project h2 { font-size: 24px; }
  .ga-project .game-dialog-body { padding: 16px 0 0; }

  .game-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .game-card--feature { flex-direction: column; align-items: stretch; gap: 12px; }
  .game-card--feature .game-card-media { flex: none; }
  .game-card--feature .game-card-title { font-size: 22px; }
  .game-card-title { font-size: 16px; }
  .game-card-kicker { font-size: 13px; }

  .game-dialog { width: 100%; max-width: none; max-height: 100%; height: 100%; margin: 0; border-radius: 0; }
  .game-dialog-head { padding: 16px; }
  .game-dialog-head h3 { font-size: 20px; }
  .game-dialog-body { padding: 16px 16px 32px; }
  .dream-compare { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .dream-headers { grid-template-columns: 1fr 1fr; }
  .dream-header-main { grid-column: 1 / -1; }

  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-photo { width: 160px; }
  .section-title { margin-bottom: 32px; }
  .game-art h3 { font-size: 22px; }

  .contact { margin-top: 80px; padding: 56px 20px; border-radius: 24px; }
  .contact-actions { flex-direction: column; }
  .btn { width: 100%; }
}

/* Game projects: role summary under the title */
.game-role {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0;
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}
.game-role > div { padding: 14px 18px; min-width: 0; }
.game-role > div + div { border-left: 1px solid var(--line); }
.game-role dt {
  margin: 0 0 4px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.game-role dd { margin: 0; color: var(--text); font-size: 15px; line-height: 1.45; }
.game-role > div:first-child dd { font-family: var(--font-display); font-size: 17px; font-weight: 600; white-space: nowrap; }
.game-role-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.game-role-tools span {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 13px;
  line-height: 1.5;
}
@media (max-width: 720px) {
  .game-role { grid-template-columns: 1fr; }
  .game-role > div + div { border-left: 0; border-top: 1px solid var(--line); }
}
