/* =========================================================
   BARQUE 42 — showcase
   The whole screen is gameplay. A name, one button, and a
   thin line per game showing how far the clip has played.
   Scroll down and the game on screen opens up below, in its
   own colours: alternating rows of words and moving art.
   ========================================================= */

:root {
  --red: #ec1419;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --vh: 100vh;
  --m: clamp(20px, 4.5vw, 64px); /* the margin everything lines up to */
  --ease: cubic-bezier(0.2, 0.7, 0, 1);
}
@supports (height: 100svh) { :root { --vh: 100svh; } }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: #000; }
html { scroll-behavior: smooth; }
body { color: #fff; font-family: var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, video { display: block; }
:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }

/* ---------- the screen ---------- */
.hero { position: relative; height: var(--vh); min-height: 520px; overflow: hidden; background: #000; touch-action: pan-y; }

.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.1s ease; }
.slide.is-on { opacity: 1; }
.slide img, .slide video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* a slow push-out while a game is on screen */
.slide.is-on video, .slide.is-on img { animation: settle 12s var(--ease) both; }
@keyframes settle { from { transform: scale(1.08); } to { transform: scale(1); } }
/* pixel art stays still: a slowly changing zoom makes its crisp pixels shimmer */
.slide[data-pixel].is-on video, .slide[data-pixel].is-on img { animation: none; }

/* games without footage yet: a soft, slowly moving teaser background */
.slide--soon { background: #07070a; overflow: hidden; }
.slide--soon::before, .slide--soon::after {
  content: ""; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%;
  filter: blur(90px); opacity: 0.55; animation: float 16s ease-in-out infinite alternate;
}
.slide--soon::before { left: -15vmax; top: -20vmax; background: var(--a); }
.slide--soon::after { right: -20vmax; bottom: -25vmax; background: var(--b); animation-delay: -8s; }
@keyframes float { to { transform: translate(12vmax, 8vmax) scale(1.15); } }

/* creator reels: YouTube's player, scaled to fill the screen like our own clips.
   It fades in only once real frames are moving; until then the creator's thumbnail shows */
.slide--yt .yt { position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity 0.8s ease; pointer-events: none; }
.slide--yt.is-playing .yt { opacity: 1; }
.slide--yt .yt iframe {
  position: absolute; top: 50%; left: 50%; border: 0;
  width: max(100%, calc(var(--vh) * 1.7778)); height: max(100%, 56.25vw);
  transform: translate(-50%, -50%) scale(1.15);
}

/* shade where the words sit, top and bottom */
.veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 22%),
    linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3) 34%, transparent 58%);
}

/* ---------- creators floating up, like reactions on a live stream ----------
   Each bubble is a creator's channel picture with a heart; small hearts
   drift up in between. Hover stops a bubble and shows the name. */
.fans { position: absolute; z-index: 3; right: calc(var(--m) - 14px); bottom: calc(var(--m) + 64px); width: 110px; height: min(58vh, 540px); pointer-events: none; }
.fan, .pop { position: absolute; left: 50%; bottom: 0; will-change: transform, opacity; }
.fan { z-index: 1; width: 58px; height: 58px; margin-left: -29px; pointer-events: auto; cursor: pointer; }
/* the side-to-side sway, separate from the climb so each stays smooth */
.fan__in, .pop__in { position: relative; display: block; width: 100%; height: 100%; animation: fan-sway var(--sway, 2.2s) ease-in-out var(--phase, 0s) infinite alternate; }
.fan__face {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  border: 2px solid #fff; background: #1c1c1f; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
  font-size: 22px; font-weight: 700; transition: transform 0.2s;
}
.fan__face img { width: 100%; height: 100%; object-fit: cover; }
.fan__heart {
  position: absolute; right: -5px; bottom: -3px; width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: 50%; background: #ff2d55; color: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}
.fan__heart svg { width: 13px; height: 13px; }
.fan__name {
  position: absolute; right: calc(100% + 12px); top: 50%; transform: translate(6px, -50%);
  padding: 7px 13px 8px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  background: rgba(10, 10, 12, 0.8); font-size: 13px; font-weight: 600; opacity: 0; transition: opacity 0.2s, transform 0.2s;
}
.fan__name small { display: block; font-size: 11px; font-weight: 500; opacity: 0.7; }
.fan:hover { z-index: 2; }
.fan:hover .fan__in { animation-play-state: paused; }
.fan:hover .fan__face { transform: scale(1.12); }
.fan:hover .fan__name { opacity: 1; transform: translate(0, -50%); }
.pop { z-index: 0; width: var(--size, 26px); height: calc(var(--size, 26px) * 1.08); margin-left: calc(var(--size, 26px) / -2); }
.pop__in svg { display: block; width: 100%; height: 100%; }
@keyframes fan-sway { from { transform: translateX(-11px) rotate(-6deg); } to { transform: translateX(11px) rotate(6deg); } }
/* reduced motion: the same creators, standing still */
.fans.is-static { display: flex; flex-direction: column-reverse; align-items: center; gap: 12px; }
.fans.is-static .fan { position: relative; left: auto; margin: 0; animation: none; }
/* keyboard way in: the same links, shown when focused */
.fans-list { position: absolute; z-index: 4; right: var(--m); bottom: calc(var(--m) + 64px); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.fans-list a { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fans-list a:focus { position: static; width: auto; height: auto; clip: auto; padding: 9px 16px; border-radius: 999px; background: #fff; color: #000; font-size: 14px; font-weight: 600; }

/* ---------- top bar ---------- */
.top { position: absolute; inset: 0 0 auto 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(18px, 3vw, 36px) var(--m); }
.logo { display: inline-flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.logo img { width: 21px; height: 24px; image-rendering: pixelated; }
.top nav { display: flex; gap: clamp(18px, 2.6vw, 40px); font-size: 15px; font-weight: 500; }
.top nav a { opacity: 0.75; transition: opacity 0.2s; white-space: nowrap; }
.top nav a:hover, .top nav a[aria-current] { opacity: 1; }
.top nav a[target="_blank"]::after { content: " ↗"; font-size: 0.85em; }

/* ---------- the game's name and one button ---------- */
.captions { position: absolute; left: var(--m); right: var(--m); bottom: calc(var(--m) + 70px); z-index: 2; display: grid; }
.cap { grid-area: 1 / 1; align-self: end; display: grid; justify-items: start; gap: clamp(18px, 2.4vw, 28px); visibility: hidden; transition: visibility 0s 0.9s; }
.cap.is-on { visibility: visible; transition-delay: 0s; }
.cap :is(h1, h2) {
  margin: 0; overflow: hidden; padding-bottom: 0.06em;
  font-size: clamp(46px, 10vw, 168px); font-weight: 700; line-height: 0.92; letter-spacing: -0.045em; text-wrap: balance;
}
.cap :is(h1, h2) span { display: block; transform: translateY(108%); transition: transform 0.55s var(--ease); }
.cap.is-on :is(h1, h2) span { transform: none; transition: transform 1s var(--ease) 0.3s; }
.cta, .soon {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600; white-space: nowrap;
  opacity: 0; transform: translateY(12px); transition: opacity 0.35s, transform 0.35s, background 0.2s, color 0.2s;
}
.cap.is-on .cta, .cap.is-on .soon { opacity: 1; transform: none; transition: opacity 0.6s 0.65s, transform 0.8s var(--ease) 0.65s, background 0.2s, color 0.2s; }
.cap__acts { display: flex; align-items: center; gap: 12px; }
.cap__kick { margin: 0 0 calc(-1 * clamp(8px, 1.2vw, 14px)); font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.8); }
.cta { background: #fff; color: #000; }
.cta::after { content: "↗"; font-weight: 500; }
.cta:hover { background: var(--red); color: #fff; }
.soon { border: 1px solid rgba(255, 255, 255, 0.45); font-weight: 500; }
.down {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45); opacity: 0; transform: translateY(12px);
  transition: opacity 0.35s, transform 0.35s, background 0.2s, color 0.2s, border-color 0.2s;
}
.cap.is-on .down { opacity: 1; transform: none; transition: opacity 0.6s 0.75s, transform 0.8s var(--ease) 0.75s, background 0.2s, color 0.2s, border-color 0.2s; }
.down:hover { background: #fff; color: #000; border-color: #fff; }
.down svg { width: 14px; height: 14px; }

/* ---------- one line per game ---------- */
.bar { position: absolute; left: var(--m); right: var(--m); bottom: var(--m); z-index: 3; display: flex; align-items: center; gap: clamp(16px, 2.5vw, 32px); }
.dots { flex: 1; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 20px); }
.dot { position: relative; padding-top: 14px; text-align: left; font-size: 13px; font-weight: 500; letter-spacing: 0.01em; color: rgba(255, 255, 255, 0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.3s; }
.dot::before, .dot i { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 2px; }
.dot::before { background: rgba(255, 255, 255, 0.22); }
.dot i { background: #fff; transform: scaleX(var(--p, 0)); transform-origin: left; }
.dot:not(.is-on) i { transform: scaleX(0); }
.dot:hover, .dot.is-on { color: #fff; }
.pause { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.35); transition: border-color 0.2s; }
.pause:hover { border-color: #fff; }
.pause svg { width: 12px; height: 12px; }

@media (max-width: 640px) {
  .top nav { gap: 14px; font-size: 14px; }
  .top nav a[aria-current] { display: none; }
  .fans { right: 2px; bottom: calc(var(--m) + 56px); width: 76px; height: 40vh; }
  .fan { width: 46px; height: 46px; margin-left: -23px; }
  .fan__heart { width: 20px; height: 20px; right: -4px; }
  .fan__heart svg { width: 11px; height: 11px; }
  .captions { bottom: calc(var(--m) + 46px); }
  .dot { font-size: 0; padding-top: 10px; }
}
/* the studio's name stays beside the ship on every phone, a touch smaller on the narrowest */
@media (max-width: 380px) {
  .logo { gap: 9px; font-size: 15px; }
  .top nav { gap: 12px; }
}
@media (max-width: 340px) {
  .top { gap: 14px; }
  .logo { font-size: 14px; }
  .top nav { gap: 10px; font-size: 13px; }
  .top nav a[target="_blank"]::after { content: none; }
}

/* =========================================================
   The game, scrolled into
   ========================================================= */
.game {
  --bg: #0b0b0c; --fg: #f4f2ec; --muted: rgba(244, 242, 236, 0.62); --card: #161618; --line: rgba(244, 242, 236, 0.18);
  position: relative; overflow: hidden; background: var(--bg); color: var(--fg);
  padding: clamp(96px, 16vh, 180px) var(--m) clamp(80px, 12vh, 140px);
}
.game[data-theme="light"] { --bg: #f5f2eb; --fg: #121212; --muted: rgba(18, 18, 18, 0.62); --card: #e8e3d8; --line: rgba(18, 18, 18, 0.18); }
.game[data-theme="navy"] { --bg: #012264; --fg: #ffffff; --muted: rgba(255, 255, 255, 0.72); --card: #0a2f7f; --line: rgba(255, 255, 255, 0.2); }
.game[hidden] { display: none; }

.game__intro { max-width: 1100px; margin: 0 auto clamp(56px, 11vh, 130px); text-align: center; }
.game__name { margin: 0 0 22px; font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.game__logo { display: block; width: min(320px, 62vw); height: auto; margin: 0 auto 26px; animation: float 7s ease-in-out infinite; }
.game__line { margin: 0; font-size: clamp(38px, 6.2vw, 96px); font-weight: 700; line-height: 1; letter-spacing: -0.045em; text-wrap: balance; }
.game__line em { font-style: normal; color: var(--accent); }

/* rows: words on one side, art on the other, swapping sides each row */
.row {
  max-width: 1180px; margin: 0 auto; padding: clamp(36px, 8vh, 96px) 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 7vw, 120px);
}
.row:nth-of-type(odd) .art { order: -1; }
.row__text { max-width: 460px; }
.row:nth-of-type(odd) .row__text { justify-self: end; }
.row__kick { margin: 0 0 16px; font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.row h3 { margin: 0 0 18px; font-size: clamp(32px, 4.2vw, 60px); font-weight: 700; line-height: 1.02; letter-spacing: -0.04em; text-wrap: balance; }
.row__text p:last-child { margin: 0; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.55; color: var(--muted); }

/* the art: a soft glow in the game's colour, and gentle movement */
.art { position: relative; margin: 0; width: min(100%, 500px); justify-self: center; }
.art::before {
  content: ""; position: absolute; inset: 12% 8%; border-radius: 50%; background: var(--accent);
  filter: blur(70px); opacity: 0.32; z-index: 0;
}
.game[data-theme="light"] .art::before { opacity: 0.22; }
.game[data-theme="navy"] .art::before { opacity: 0.28; }
.game[data-theme="navy"] .btn:hover { color: #012264; }
.art > * { position: relative; z-index: 1; }
.art img, .ph { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.55); }
.art--cutout img { aspect-ratio: auto; object-fit: contain; border-radius: 0; box-shadow: none; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.35)); }
.art--float > * { animation: float 7s ease-in-out infinite; }
.art--sway > * { animation: sway 9s ease-in-out infinite; transform-origin: 50% 90%; }
.art--drift > * { animation: drift 11s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(-14px); } 50% { transform: translateY(14px); } }
@keyframes sway { 0%, 100% { transform: rotate(-3.5deg); } 50% { transform: rotate(3.5deg); } }
@keyframes drift { 0%, 100% { transform: translateY(-10px) rotate(-2deg); } 50% { transform: translateY(10px) rotate(2deg); } }

/* a cut-out hero springing off a cut-out island (BOINGBOUND). One 2.4 s loop drives three things:
   the hero squashes onto his spring, launches high, hangs and falls back to land; the island dips
   as he pushes off and as he lands (while it also floats on its own slower loop); and his shadow
   on the island shrinks and fades while he's in the air */
.art--jump { aspect-ratio: 1 / 1; }
.art > .jump__ground { position: absolute; left: 0; bottom: 2%; width: 78%; animation: isle 6.5s ease-in-out infinite, isle-kick 2.4s ease-in-out infinite; }
.art .jump__ground img { width: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; filter: drop-shadow(0 28px 34px rgba(0, 0, 0, 0.45)); }
.jump__shadow { position: absolute; left: 71.6%; top: 58%; width: 24%; height: 6%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); transform: translate(-50%, -50%); animation: jump-shadow 2.4s infinite; }
/* (the hero's spring pad rests on the island; transforms turn about the pad) */
.art img.jump__hero { position: absolute; left: 31.2%; top: 10.7%; z-index: 2; width: 66%; height: auto; aspect-ratio: auto; border-radius: 0; box-shadow: none; transform-origin: 37.5% 99%; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.35)); animation: boing 2.4s infinite; }
@keyframes isle { 0%, 100% { transform: translateY(-1.2%) rotate(-0.7deg); } 50% { transform: translateY(1.2%) rotate(0.7deg); } }
@keyframes isle-kick { 0%, 6% { translate: 0 0; } 13% { translate: 0 1.6%; } 24% { translate: 0 -0.4%; } 32%, 80% { translate: 0 0; } 87% { translate: 0 1.4%; } 96%, 100% { translate: 0 0; } }
@keyframes boing {
  0% { transform: none; animation-timing-function: ease-in; }
  10% { transform: translateY(1%) rotate(-4deg) scale(1.06, 0.88); animation-timing-function: cubic-bezier(0.2, 0.7, 0.3, 1); }
  16% { transform: translateY(-8%) rotate(2deg) scale(0.95, 1.08); animation-timing-function: cubic-bezier(0.25, 0.6, 0.4, 1); }
  46% { transform: translate(6%, -36%) rotate(9deg); animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0.4); }
  78% { transform: translate(1%, -2%) rotate(1deg) scale(0.96, 1.06); animation-timing-function: ease-out; }
  84% { transform: translateY(1%) rotate(-3deg) scale(1.07, 0.9); animation-timing-function: ease-out; }
  100% { transform: none; }
}
@keyframes jump-shadow {
  0%, 10%, 84%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  16% { transform: translate(-50%, -50%) scale(0.85); opacity: 0.8; animation-timing-function: cubic-bezier(0.25, 0.6, 0.4, 1); }
  46% { transform: translate(-50%, -50%) scale(0.4); opacity: 0.25; animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0.4); }
  78% { transform: translate(-50%, -50%) scale(0.92); opacity: 0.85; }
}

/* the climb (BOINGBOUND): five cut-out worlds stacked from the forest floor to the stars, each
   drifting on its own beat; as the row comes into view they rise into place, the ground first */
.art--climb { aspect-ratio: 1 / 1.45; }
.art--climb > img {
  position: absolute; height: auto; aspect-ratio: auto; object-fit: contain; border-radius: 0; box-shadow: none;
  filter: drop-shadow(0 22px 26px rgba(0, 0, 0, 0.35)); animation: climb-drift var(--t, 6.5s) ease-in-out var(--d, 0s) infinite;
}
.art .climb__moon { left: 14%; top: 0; z-index: 1; width: 64%; --t: 7.4s; --d: -3s; }
.art .climb__meadow { left: 54%; top: 16.5%; z-index: 2; width: 46%; --t: 5.6s; --d: -1.8s; }
.art .climb__ice { left: 2%; top: 20%; z-index: 3; width: 54%; --t: 6.8s; --d: -2.5s; }
.art .climb__castle { left: 44%; top: 44%; z-index: 4; width: 56%; --t: 6.2s; --d: -1s; }
.art .climb__forest { left: 2%; bottom: 0; z-index: 5; width: 88%; --t: 7s; }
@keyframes climb-drift { 0%, 100% { transform: translateY(-1.5%) rotate(-0.5deg); } 50% { transform: translateY(1.5%) rotate(0.5deg); } }
.js .row.reveal .art--climb > img { opacity: 0; translate: 0 48px; transition: opacity 0.8s ease, translate 1.1s var(--ease); }
.js .row.reveal.in .art--climb > img { opacity: 1; translate: 0 0; }
.js .row.reveal.in .art--climb > .climb__forest { transition-delay: 0.1s; }
.js .row.reveal.in .art--climb > .climb__castle { transition-delay: 0.25s; }
.js .row.reveal.in .art--climb > .climb__ice { transition-delay: 0.4s; }
.js .row.reveal.in .art--climb > .climb__meadow { transition-delay: 0.55s; }
.js .row.reveal.in .art--climb > .climb__moon { transition-delay: 0.7s; }

/* a missed landing (BOINGBOUND): the hero tumbles in free fall, rocking and turning,
   while streaks of wind rush up past him */
.art--tumble { aspect-ratio: 1 / 1; }
.art img.tumble__hero {
  position: absolute; left: 6%; top: 6%; width: 88%; height: auto; aspect-ratio: auto; border-radius: 0; box-shadow: none;
  filter: drop-shadow(0 26px 30px rgba(0, 0, 0, 0.4)); animation: tumble 3.2s ease-in-out infinite;
}
@keyframes tumble {
  0%, 100% { transform: translateY(-2%) rotate(-7deg); }
  25% { transform: translateY(2%) rotate(9deg) scale(1.02); }
  50% { transform: translateY(-1%) rotate(-3deg); }
  75% { transform: translateY(3%) rotate(12deg) scale(0.98); }
}
.art > .tumble__wind {
  position: absolute; inset: -6% 0; z-index: 0; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
}
.tumble__wind i { position: absolute; bottom: 0; width: 3px; height: 22%; border-radius: 3px; background: linear-gradient(to top, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.5)); opacity: 0; animation: gust var(--g, 1.2s) linear var(--gd, 0s) infinite; }
.tumble__wind i:nth-child(1) { left: 9%; height: 18%; --g: 1.3s; --gd: -0.2s; }
.tumble__wind i:nth-child(2) { left: 23%; height: 26%; --g: 1s; --gd: -0.7s; }
.tumble__wind i:nth-child(3) { left: 41%; height: 15%; --g: 1.5s; --gd: -1.1s; }
.tumble__wind i:nth-child(4) { left: 60%; height: 24%; --g: 1.15s; --gd: -0.4s; }
.tumble__wind i:nth-child(5) { left: 77%; height: 19%; --g: 1.4s; --gd: -0.9s; }
.tumble__wind i:nth-child(6) { left: 91%; height: 14%; --g: 1.05s; --gd: -0.1s; }
@keyframes gust { 0% { transform: translateY(40%); opacity: 0; } 20%, 75% { opacity: 1; } 100% { transform: translateY(-470%); opacity: 0; } }

/* artwork placeholder */
.ph {
  aspect-ratio: 1 / 1;
  background:
    radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--accent) 60%, transparent), transparent 62%),
    radial-gradient(circle at 75% 80%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 55%),
    var(--card);
  outline: 1px dashed var(--line); outline-offset: -14px;
}
.ph::after {
  content: "Artwork"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}

/* end of a game: one button, and the way on to the next game */
.game__end { max-width: 1180px; margin: clamp(48px, 9vh, 100px) auto 0; padding-top: 36px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 26px; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: 16px; font-weight: 600; transition: background 0.2s, color 0.2s; }
.btn[target="_blank"]::after { content: "↗"; font-weight: 500; }
.btn:hover { background: var(--accent); color: #fff; }
.next { display: inline-flex; align-items: baseline; gap: 12px; font-size: 16px; font-weight: 500; color: var(--muted); transition: color 0.2s; }
.next b { font-size: clamp(24px, 2.4vw, 34px); font-weight: 700; letter-spacing: -0.03em; color: var(--fg); transition: color 0.2s; }
.next:hover b { color: var(--accent); }
.next svg { width: 18px; height: 18px; align-self: center; color: var(--accent); }

/* things slide in as they scroll into view */
.js .reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s var(--ease), transform 1.1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .row.reveal .art { opacity: 0; transform: scale(0.94); transition: opacity 1s var(--ease) 0.15s, transform 1.2s var(--ease) 0.15s; }
.js .row.reveal.in .art { opacity: 1; transform: none; }

/* ---------- footer ---------- */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 28px var(--m) 32px; background: #000; color: rgba(255, 255, 255, 0.5); font-size: 14px; }
.foot span:last-child { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.foot a { display: inline-flex; align-items: center; gap: 7px; }
.foot a:hover { color: #fff; }
/* (Steam, LinkedIn and Discord marks: Simple Icons, CC0; they take the link's colour) */
.foot svg { flex: none; width: 15px; height: 15px; fill: currentColor; }

@media (max-width: 760px) {
  .row { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 40px 0; }
  .row:nth-of-type(odd) .art { order: 0; }
  .row:nth-of-type(odd) .row__text { justify-self: start; }
  .art { width: min(88%, 420px); }
  .game__end { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   Studio page
   ========================================================= */
/* moving between our pages crossfades instead of flashing (where supported) */
@view-transition { navigation: auto; }

/* ---------- the opening: the ship close up, drawn by ship.js, with the crew aboard ---------- */
.shero { position: relative; height: var(--vh); min-height: 560px; overflow: hidden; background: #000; }
/* the whole screen; ship.js draws the ship close up, its bow on the right */
.stage { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity 1.4s ease; }
.stage.is-on { opacity: 1; }
/* a small canvas blown up with square, unblurred pixels */
.scene { position: absolute; left: 0; top: 0; display: block; image-rendering: crisp-edges; image-rendering: pixelated; }
.shero .captions { bottom: calc(var(--m) * 0.55); }
/* the ship fills the screen, so its name sits small in the sea below it, the arrow beside it */
.shero .cap { display: flex; flex-wrap: wrap; align-items: center; column-gap: 18px; row-gap: 6px; }
.shero .cap__kick { flex-basis: 100%; margin: 0; }
.shero .cap :is(h1, h2) { font-size: clamp(28px, 3vw, 52px); }
.shero .down { width: 40px; height: 40px; }
.cap__hint { font-size: 14px; color: rgba(255, 255, 255, 0.62); }
.cap__hint--touch { display: none; }
@media (hover: none) { .cap__hint--point { display: none; } .cap__hint--touch { display: inline; } }
.shero .cap__acts { gap: 16px; }

/* ---------- the six of us, clickable aboard the ship ---------- */
.aboard { position: absolute; left: 0; top: 0; z-index: 2; }
.aboard a { position: absolute; left: 0; top: 0; border-radius: 10px; cursor: pointer; }
.aboard a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.aboard span {
  position: absolute; left: 50%; bottom: calc(100% + 12px); padding: 8px 14px; border-radius: 14px;
  background: #fff; color: #000; font-size: 13px; line-height: 1.3; white-space: nowrap; text-align: center;
  opacity: 0; transform: translate(-50%, 6px); pointer-events: none; transition: opacity 0.2s, transform 0.25s var(--ease);
}
.aboard span b { display: block; font-size: 15px; font-weight: 700; }
.aboard a:hover span, .aboard a:focus-visible span { opacity: 1; transform: translate(-50%, 0); }

/* ---------- the crew: one row each, photo and words ---------- */
.crew .art { width: min(100%, 360px); }
.crew__photo img, .crew__pixel { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 24px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6); }
.crew__pixel { image-rendering: crisp-edges; image-rendering: pixelated; background: radial-gradient(circle at 50% 62%, rgba(255, 74, 79, 0.18), transparent 62%), linear-gradient(#18181b, #0b0b0c); }
.crew .row__text .crew__about { margin: 0; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.55; color: var(--muted); }
.crew .row__text .crew__aboard { margin: 14px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.crew__back { display: inline-block; margin-top: 22px; font-size: 14px; font-weight: 600; color: var(--accent); }
.crew__back:hover { text-decoration: underline; text-underline-offset: 4px; }
/* arriving from the ship: a red glow pulses round the photo */
.row.is-called .crew__photo > * { animation: called 1.4s var(--ease) 0.45s 2; }
@keyframes called {
  0%, 100% { box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6), 0 0 0 0 rgba(255, 74, 79, 0); }
  45% { box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6), 0 0 0 10px rgba(255, 74, 79, 0.45); }
}
.row[id^="crew-"] { scroll-margin: 80px; }
/* the ship's own row: our ship, big and crisp */
.crew .crew__photo--ship { width: min(100%, 300px); }
.crew__photo--ship canvas { display: block; width: 100%; height: auto; aspect-ratio: 14 / 16; image-rendering: crisp-edges; image-rendering: pixelated; }
/* the anchor chain, paying out down the middle between pictures and words as you scroll (ship.js sets --drop) */
.crew__rows { position: relative; }
.chain { position: absolute; left: 50%; top: 0; bottom: 0; width: 24px; margin-left: -12px; pointer-events: none; }
.chain__links { position: absolute; left: 0; top: 0; width: 100%; height: calc(var(--drop, 1) * 100%); background-repeat: repeat-y; background-size: 100% auto; image-rendering: crisp-edges; image-rendering: pixelated; }
/* the anchor never wider than the gap between pictures and words */
.chain__anchor { --aw: clamp(40px, 5.2vw, 78px); position: absolute; left: 50%; top: calc(var(--drop, 1) * 100%); width: var(--aw); margin: -6px 0 0 calc(var(--aw) / -2); }
.chain__anchor svg { display: block; width: 100%; height: auto; }
/* the ship's own link aboard: its label sits by the bow */
.aboard a.is-ship span { bottom: auto; transform: translate(-85%, calc(-100% + 6px)); }
.aboard a.is-ship:hover span, .aboard a.is-ship:focus-visible span { transform: translate(-85%, -100%); }
@media (max-width: 760px) {
  .chain { left: 10px; margin-left: 0; width: 16px; }
  .chain__anchor { --aw: 36px; }
  .crew .row { padding-left: 40px; }
}
@keyframes twinkle { 50% { opacity: 0.5; } }

/* ---------- the story: the games' rows, joined by a timeline ---------- */
.story { position: relative; max-width: 1180px; margin: 0 auto; }
.story::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px;
  background: linear-gradient(to bottom, transparent, var(--line) 4%, var(--line) 96%, transparent);
}
.story .row { position: relative; }
.story .row::before { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; background: var(--accent); box-shadow: 0 0 0 7px var(--bg); }
.story .row:nth-child(odd) .art { order: 0; }
.story .row:nth-child(odd) .row__text { justify-self: start; }
.story .row:nth-child(even) .art { order: -1; }
.story .row:nth-child(even) .row__text { justify-self: end; }
.game__intro--end { margin: clamp(72px, 12vh, 140px) auto 0; }

/* pixel scenes, in the same frame as the screenshots */
.pxart {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 24px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #1c1d3d, #0b0c1a 72%); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.55);
}
.pxart svg { position: absolute; inset: 0; width: 100%; height: 100%; shape-rendering: crispEdges; }
.pxart .twinkle { opacity: 0.25; animation: twinkle 5s steps(2) infinite; }
.pxart .bob { animation: px-bob 1.6s steps(1) infinite; }
@keyframes px-bob { 50% { transform: translateY(1px); } }
.pxart .queue { opacity: 0.28; transition: opacity 0.5s; }
.pxart .queue.is-first { opacity: 1; }
.pxart .qstar { transition: transform 0.6s cubic-bezier(0.5, 0, 0.2, 1.4); }
.pxart .spark { opacity: 0; animation: spark 2.8s steps(1) infinite; }
@keyframes spark { 0% { opacity: 0; } 12% { opacity: 1; } 30% { opacity: 0.4; } 42%, 100% { opacity: 0; } }
.pxart .route { opacity: 0.15; animation: route 2.4s steps(1) infinite; }
@keyframes route { 0% { opacity: 0.15; } 10%, 40% { opacity: 0.95; } 55%, 100% { opacity: 0.15; } }
.pxart .flag { animation: px-bob 1.2s steps(1) infinite; }
/* the XP card */
.pxart--ui { display: grid; place-items: center; }
.xpc { width: 78%; display: grid; gap: 16px; color: #fff; }
.xpc__top { display: flex; justify-content: space-between; align-items: flex-end; }
.xpc__lv { display: grid; line-height: 0.9; }
.xpc__lv small { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); margin-bottom: 4px; }
.xpc__lv b { font-size: clamp(42px, 5vw, 64px); font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.xpc__rank { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.xpc__rank.is-captain { color: #ffc83d; }
.xpc__bar { display: grid; grid-template-columns: repeat(25, 1fr); gap: 3px; }
.xpc__bar i { height: 12px; background: #2a2b4a; }
.xpc__bar i.on { background: #ff4a4f; }
.xpc__sizes { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255, 255, 255, 0.6); }
.xpc__sizes b { color: #fff; font-weight: 600; }
.xpc__split { display: flex; gap: 3px; height: 26px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.xpc__split span { display: flex; align-items: center; padding-left: 8px; overflow: hidden; white-space: nowrap; }
.xpc__split span:nth-child(1) { background: #2a2b4a; color: rgba(255, 255, 255, 0.7); }
.xpc__split span:nth-child(2) { background: #3a3c63; }
.xpc__split span:nth-child(3) { background: #ec1419; }
/* two pictures, overlapping like prints */
.art--pair { aspect-ratio: 4 / 3; }
.art--pair img { position: absolute; width: 76%; height: auto; aspect-ratio: 16 / 10; }
.art--pair img:nth-child(1) { left: 0; top: 4%; rotate: -4deg; }
.art--pair img:nth-child(2) { right: 0; bottom: 4%; rotate: 5deg; animation-delay: -3s; }

@media (max-width: 760px) {
  .story::before { left: 5px; }
  .story .row { padding-left: 30px; }
  .story .row::before { left: 5px; top: 52px; }
  .story .row .art { order: 0 !important; }
  .story .row .row__text { justify-self: start !important; }
}

/* ---------- ultra-wide screens ----------
   Wider than 2:1, a full-width video would be zoomed in and lose a quarter
   or more of the picture at the top and bottom. There the game keeps a 2:1
   stage in the middle, the sides glow softly with the same footage, and the
   words line up with the stage instead of the far edges of the screen. */
.ambient { display: none; }
@media (min-aspect-ratio: 2/1) and (min-width: 1200px) {
  .hero { --side: calc((100% - var(--vh) * 2) / 2); }
  /* the Studio's scene is drawn to fit any width, so it stays full-bleed; only its words line up with the Games page */
  .shero { --side: calc((100% - var(--vh) * 2) / 2); }
  .ambient {
    display: block; position: absolute; left: -4%; top: -6%; width: 108%; height: 112%;
    filter: blur(34px) saturate(1.3); opacity: 0.6;
  }
  .hero::after {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.55), transparent calc(var(--side) * 0.9), transparent calc(100% - var(--side) * 0.9), rgba(0, 0, 0, 0.55));
  }
  .slides {
    position: absolute; top: 0; bottom: 0; left: var(--side); right: var(--side); z-index: 0; overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
  }
  .top { padding-left: calc(var(--m) + var(--side)); padding-right: calc(var(--m) + var(--side)); }
  .captions, .bar { left: calc(var(--m) + var(--side)); right: calc(var(--m) + var(--side)); }
  .fans { right: calc(var(--m) - 14px + var(--side)); }
  .fans-list { right: calc(var(--m) + var(--side)); }
}

/* no JavaScript: the first game only */
html:not(.js) .slide ~ .slide, html:not(.js) .cap ~ .cap, html:not(.js) .bar, html:not(.js) .down { display: none; }
html:not(.js) .cap { visibility: visible; }
html:not(.js) .cap :is(h1, h2) span { transform: none; }
html:not(.js) .cap .cta { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
