/* Ludomo portal
   A calm dark studio frame (a deep green-charcoal under the green maze logo) around the game "worlds",
   each with its own palette, ambient effect and sprites.
   --paper is the frame background and --ink its main text colour. */

:root {
  /* studio frame */
  --paper: #121614;
  --paper-2: #1d2320;
  --ink: #f0f2ee;
  --graphite: #a7b0ab;
  --rule: #2a322e;
  --green: #7db928;
  --green-ink: #13200a;
  /* light surfaces inside the dark frame (partner cards carry logos made for white) */
  --card: #ffffff;
  --card-ink: #1b211f;
  --card-muted: #535b57;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 14px;

  /* type scale, ratio 4:3 */
  --t-0: .875rem;
  --t-1: 1.0625rem;
  --t-2: 1.375rem;
  --t-3: 1.875rem;
  --t-4: clamp(2.1rem, 4.2vw, 3.2rem);
  --t-5: clamp(2.8rem, 7.4vw, 6.4rem);

  /* motion tokens */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.45, .64, 1);
  --ease-in: cubic-bezier(.55, 0, .75, .2);
  --d-fast: 160ms;
  --d-med: 420ms;
  --d-slow: 950ms;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-1);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus, var(--ink)); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }
main:focus { outline: none; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: block; padding: 4px 0; }
.brand img { height: 34px; width: auto; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a {
  text-decoration: none; font-weight: 600; font-size: .98rem;
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px;
  color: var(--graphite);
  transition: color var(--d-fast), background-color var(--d-fast);
}
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a[aria-current="page"] { color: var(--ink); }

/* ---------- shared buttons ---------- */
.btn-play {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 0 26px 0 20px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent, var(--ink)); color: var(--accent-ink, var(--paper));
  font-weight: 700; font-size: 1.06rem; text-decoration: none; letter-spacing: .005em;
  box-shadow: 0 10px 30px -12px var(--accent, var(--ink));
  transition: transform var(--d-fast) var(--ease-out), box-shadow var(--d-med) var(--ease-out), filter var(--d-fast);
  touch-action: manipulation;
}
.btn-play svg { width: 22px; height: 22px; flex: none; }
.btn-play:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px var(--accent, var(--ink)); filter: brightness(1.06); }
.btn-play:active { transform: translateY(0) scale(.97); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  background: transparent; color: inherit; border: 1.5px solid color-mix(in srgb, currentColor 35%, transparent);
  font-weight: 600; font-size: .95rem; text-decoration: none;
  transition: border-color var(--d-fast), background-color var(--d-fast);
  touch-action: manipulation;
}
.btn-ghost:hover { border-color: currentColor; background: color-mix(in srgb, currentColor 8%, transparent); }
.btn-ghost svg { width: 18px; height: 18px; }

/* ---------- intro ---------- */
.intro { padding-block: clamp(36px, 6vw, 84px) clamp(76px, 12vw, 190px); overflow: clip; }
.intro h1, .studio-title {
  font-size: var(--t-5); font-weight: 800; font-stretch: 125%;
  line-height: .9; letter-spacing: -.035em; margin: 0;
  text-wrap: balance;
}
.intro h1 .line, .studio-title .line { display: block; }
.intro h1 { margin-bottom: clamp(14px, 1.8vw, 22px); }
.intro-sub { font-size: var(--t-2); line-height: 1.4; color: var(--graphite); margin: 0 0 clamp(32px, 4.5vw, 56px); max-width: 44ch; text-wrap: balance; }

/* ---------- game tiles, rows of three ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 36px) clamp(14px, 1.8vw, 24px); }
.tiles > div { min-width: 0; }

.tile { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
.tile-art {
  position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 616 / 353;
  background: var(--bg, #222);
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 18px 40px -24px rgba(20, 30, 25, .55);
}
.tile-art img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--d-slow) var(--ease-out); }
.tile:hover .tile-art img, .tile:focus-visible .tile-art img { transform: scale(1.045); }
.tile-meta { display: flex; align-items: center; gap: 12px; padding-inline: 2px; }
.tile-meta .txt { min-width: 0; flex: 1; }
.tile-title, .tile-genre { display: block; }
.tile-title { font-weight: 750; font-stretch: 112%; font-size: 1.06rem; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
.tile-genre { font-size: var(--t-0); color: var(--graphite); margin: 2px 0 0; }
.tile-play {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  transition: transform var(--d-med) var(--ease-spring);
}
.tile-play svg { width: 18px; height: 18px; margin-left: 2px; }
.tile:hover .tile-play, .tile:focus-visible .tile-play { transform: scale(1.12); }
.tile:focus-visible { outline-offset: 4px; border-radius: 14px; }
.badge-dev, .pill-dev, .soon {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 700; letter-spacing: .01em; line-height: 1;
}
.badge-dev svg, .pill-dev svg, .soon svg { width: 14px; height: 14px; }
.badge-dev { position: absolute; left: 10px; top: 10px; padding: 7px 10px; border-radius: 999px; background: rgba(10, 14, 20, .78); color: #fff; }
.pill-dev { padding: 5px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--fg); vertical-align: middle; margin-left: 8px; }
.soon { font-size: .98rem; color: var(--fg); gap: 10px; min-height: 44px; }
.soon svg { width: 20px; height: 20px; color: var(--accent); }
.tile.is-dev .tile-art img { filter: saturate(.85); }

/* ---------- game chapters on the home page ---------- */
.chapter {
  position: relative; isolation: isolate; overflow: clip;
  background: var(--bg); color: var(--fg);
  --focus: var(--accent);
}
.chapter-inner {
  position: relative; z-index: 2;
  min-height: min(100svh, 980px);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 96px); align-items: center;
  padding-block: clamp(72px, 10vw, 140px);
}
.chapter.alt .chapter-inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.chapter.alt .scene { order: 2; }
.backdrop {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: var(--backdrop); background-size: cover; background-position: center;
  opacity: .2;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
}

.scene { position: relative; }
.screen {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 616 / 353;
  background: #000; display: block;
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 40px 90px -40px rgba(0,0,0,.9), 0 0 120px -40px var(--glow, transparent);
}
.screen img { width: 100%; height: 100%; object-fit: cover; }
.screen .screen-play {
  position: absolute; right: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; border-radius: 999px;
  background: rgba(0,0,0,.6); color: #fff; font-weight: 650; font-size: .92rem;
  opacity: 0; transform: translateY(6px);
  transition: opacity var(--d-med) var(--ease-out), transform var(--d-med) var(--ease-out);
}
.screen .screen-play svg { width: 16px; height: 16px; }
.screen:hover .screen-play, .screen:focus-visible .screen-play { opacity: 1; transform: none; }

.copy { max-width: 40rem; }
.copy .genre { font-size: var(--t-0); font-weight: 650; color: var(--muted); margin: 0 0 18px; letter-spacing: .01em; }
.copy h2 { margin: 0 0 22px; line-height: 1; }
.copy h2 img { width: auto; max-width: min(100%, 420px); max-height: 150px; }
.copy .tagline { font-size: var(--t-3); font-weight: 600; font-stretch: 106%; line-height: 1.18; letter-spacing: -.015em; margin: 0 0 18px; text-wrap: balance; }
.copy .desc { color: var(--muted); margin: 0 0 32px; max-width: 52ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.also { font-size: var(--t-0); color: var(--muted); }
.also a { color: var(--fg); font-weight: 600; text-underline-offset: 3px; }

/* game logos and title treatments */
.logo-pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
.title-type { font-weight: 800; font-stretch: 125%; font-size: var(--t-4); letter-spacing: -.03em; }
.theme-glimmer .title-type {
  font-family: "Cinzel", Georgia, serif; font-stretch: normal; font-weight: 700;
  letter-spacing: .32em; color: #bfe8ff; font-size: clamp(2.2rem, 4.6vw, 3.6rem); margin-right: -.32em;
  text-shadow: 0 0 18px rgba(90, 190, 255, .75), 0 0 2px rgba(255,255,255,.9);
}

/* ---------- sprites ---------- */
.decor {
  position: absolute; z-index: 3; pointer-events: none;
  left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: calc(var(--wd) * 1%);
}
.decor, .decor-float, .decor-img { display: block; }
.decor-float { width: 100%; }
.decor-img {
  width: 100%; aspect-ratio: var(--fw) / var(--fh);
  background-image: var(--src); background-repeat: no-repeat;
  background-size: calc(var(--frames) * 100%) 100%; background-position: 0 0;
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.35));
}
.decor-img.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
.decor-img.flip { transform: scaleX(-1); }
.decor-img.rim { filter: drop-shadow(0 0 1px #cdeeff) drop-shadow(0 0 12px rgba(120, 190, 255, .75)); }
.is-live .decor-img.anim { animation: sprite calc(var(--frames) / var(--fps) * 1s) steps(var(--frames), jump-none) infinite; }
.is-live .decor-float.float { animation: float 6s ease-in-out infinite; animation-delay: calc(var(--i) * -1.7s); }
.is-live .decor-img.spin { animation: spin 40s linear infinite; }
@keyframes sprite { from { background-position-x: 0%; } to { background-position-x: 100%; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4%); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- chapter reveal: one orchestrated moment per game ---------- */
.js .chapter .screen { clip-path: inset(100% 0 0 0 round var(--radius)); transition: clip-path var(--d-slow) var(--ease-out); }
.js .chapter .screen img { transform: scale(1.14); transition: transform 1.4s var(--ease-out); }
.js .chapter .decor { opacity: 0; transform: translateY(28px) scale(.86); transition: opacity 600ms var(--ease-out), transform 800ms var(--ease-spring); transition-delay: calc(450ms + var(--i) * 110ms); }
.js .chapter .copy > * { opacity: 0; transform: translateY(22px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.js .chapter .copy > *:nth-child(2) { transition-delay: 120ms; }
.js .chapter .copy > *:nth-child(3) { transition-delay: 200ms; }
.js .chapter .copy > *:nth-child(4) { transition-delay: 280ms; }
.js .chapter .copy > *:nth-child(5) { transition-delay: 360ms; }
.js .chapter.is-in .screen { clip-path: inset(0 0 0 0 round var(--radius)); }
.js .chapter.is-in .screen img { transform: none; }
.js .chapter.is-in .decor, .js .chapter.is-in .copy > * { opacity: 1; transform: none; }

/* intro entrance on first load */
.js .intro h1 .line, .js .intro-sub, .js .intro .tiles .tile { opacity: 0; transform: translateY(24px); }
.js .intro.is-in h1 .line, .js .intro.is-in .intro-sub, .js .intro.is-in .tiles .tile {
  opacity: 1; transform: none;
  transition: opacity 800ms var(--ease-out), transform 900ms var(--ease-out);
}
.js .intro.is-in h1 .line:nth-child(2) { transition-delay: 90ms; }
.js .intro.is-in .intro-sub { transition-delay: 150ms; }
.js .intro.is-in .tiles .tile { transition-delay: calc(260ms + var(--i) * 70ms); }

/* ---------- ambient effects ---------- */
.ambient { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.ambient i { position: absolute; display: block; left: calc(var(--l) * 1%); top: calc(var(--t) * 1%); }
.is-live .ambient i { animation-play-state: running; }
.ambient i { animation-play-state: paused; }

/* Blood Rite: embers rising from the fire */
.theme-blood {
  --bg: #120a08; --fg: #f6ece4; --muted: #cdb7ab; --accent: #e3392a; --accent-ink: #fff; --glow: rgba(255, 110, 40, .45);
}
.theme-blood .ambient::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 38%;
  background: radial-gradient(120% 100% at 50% 100%, rgba(255, 98, 28, .38), rgba(200, 30, 20, .12) 45%, transparent 75%);
}
.theme-blood .ambient i {
  top: auto; bottom: -10px; width: 4px; height: 4px; border-radius: 1px;
  background: #ffb347; box-shadow: 0 0 8px 2px rgba(255, 120, 40, .8);
  animation: ember calc(7s + var(--r) * 7s) linear infinite; animation-delay: calc(var(--r) * -14s);
}
@keyframes ember {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translate(calc((var(--r) - .5) * 160px), -95vh); opacity: 0; }
}

/* Glimmer: sparkles that twinkle and drift */
.theme-glimmer {
  --bg: #0c1130; --fg: #f2f0ff; --muted: #bec1e6; --accent: #f4c34d; --accent-ink: #1d1300; --glow: rgba(120, 190, 255, .45);
}
.chapter.theme-glimmer, .game-page.theme-glimmer { background-image: radial-gradient(80% 60% at 70% 20%, #232a66 0%, transparent 70%); }
.theme-glimmer .ambient i {
  width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #b8e3ff 40%, transparent 70%);
  box-shadow: 0 0 12px 3px rgba(150, 210, 255, .55);
  animation: twinkle calc(3s + var(--r) * 4s) ease-in-out infinite; animation-delay: calc(var(--r) * -6s);
}
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: translateY(0) scale(.4); }
  50% { opacity: 1; transform: translateY(-30px) scale(1); }
}

/* Ludoku: golden temple tiles and drifting dust */
.theme-ludoku {
  --bg: #1a1106; --fg: #fff4d6; --muted: #dcc493; --accent: #f5c63c; --accent-ink: #2a1a00; --glow: rgba(245, 198, 60, .4);
}
.theme-ludoku .ambient::before {
  content: ""; position: absolute; inset: -40px;
  background-image:
    linear-gradient(rgba(245, 198, 60, .07) 2px, transparent 2px),
    linear-gradient(90deg, rgba(245, 198, 60, .07) 2px, transparent 2px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000 20%, transparent 80%);
          mask-image: radial-gradient(70% 70% at 50% 50%, #000 20%, transparent 80%);
}
.theme-ludoku .ambient i {
  width: 3px; height: 3px; border-radius: 50%; background: #ffe08a; box-shadow: 0 0 6px 1px rgba(255, 210, 90, .7);
  animation: dust calc(10s + var(--r) * 10s) ease-in-out infinite alternate; animation-delay: calc(var(--r) * -12s);
}
@keyframes dust {
  0% { transform: translate(0, 0); opacity: .2; }
  50% { opacity: 1; }
  100% { transform: translate(calc((var(--r) - .5) * 120px), -80px); opacity: .3; }
}

/* Farm Slider: blue sky with drifting clouds */
.theme-farm {
  --bg: #2c5ed6; --fg: #ffffff; --muted: #dfe8ff; --accent: #ffd447; --accent-ink: #14206e; --glow: rgba(255, 230, 120, .45);
}
.chapter.theme-farm, .game-page.theme-farm { background-image: linear-gradient(180deg, #6c9ceb 0%, #2c5ed6 55%, #15279f 100%); }
.theme-farm .backdrop { opacity: .14; }
.theme-farm .ambient i {
  width: calc(140px + var(--r) * 180px); height: calc(44px + var(--r) * 40px); border-radius: 999px;
  background: rgba(255, 255, 255, .5); filter: blur(14px);
  top: calc(var(--t) * .6%);
  animation: cloud calc(50s + var(--r) * 50s) linear infinite; animation-delay: calc(var(--r) * -90s);
}
.theme-farm .ambient i:nth-child(n+7) { display: none; }
@keyframes cloud { from { transform: translateX(-40vw); } to { transform: translateX(130vw); } }

/* Arcbounce: a brass city at sunset, crackling with electric sparks */
.theme-arcbounce {
  --bg: #1f150d; --fg: #fbf1e0; --muted: #dcc6a3; --accent: #62cdff; --accent-ink: #06202f; --glow: rgba(98, 205, 255, .45);
}
.chapter.theme-arcbounce, .game-page.theme-arcbounce { background-image: radial-gradient(90% 70% at 75% 10%, #4a3018 0%, transparent 70%); }
.theme-arcbounce .backdrop { opacity: .24; }
.theme-arcbounce .ambient i {
  width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(#fff, #7fd8ff); box-shadow: 0 0 10px 2px rgba(98, 205, 255, .8);
  animation: spark calc(2.4s + var(--r) * 3s) ease-out infinite; animation-delay: calc(var(--r) * -5s);
}
@keyframes spark {
  0%, 70% { opacity: 0; transform: translate(0, 0) rotate(calc(var(--r) * 180deg)) scale(.4); }
  74% { opacity: 1; transform: translate(0, 0) rotate(calc(var(--r) * 180deg)) scale(1); }
  100% { opacity: 0; transform: translate(calc((var(--r) - .5) * 60px), 40px) rotate(calc(var(--r) * 180deg)) scale(.6); }
}

/* Chronologica: an enchanted night forest with fireflies */
.theme-chronologica {
  --bg: #0b1b20; --fg: #f2f6e6; --muted: #b8cbb7; --accent: #f2c94c; --accent-ink: #2b1d00; --glow: rgba(242, 201, 76, .4);
}
.chapter.theme-chronologica, .game-page.theme-chronologica { background-image: radial-gradient(80% 60% at 25% 15%, #173a3a 0%, transparent 70%); }
.theme-chronologica .backdrop { opacity: .22; }
.theme-chronologica .ambient i {
  width: 5px; height: 5px; border-radius: 50%;
  background: #e9ff9a; box-shadow: 0 0 12px 4px rgba(210, 255, 120, .55);
  animation: firefly calc(8s + var(--r) * 8s) ease-in-out infinite alternate; animation-delay: calc(var(--r) * -10s);
}
@keyframes firefly {
  0% { transform: translate(0, 0); opacity: .1; }
  30% { opacity: 1; }
  60% { opacity: .3; }
  100% { transform: translate(calc((var(--r) - .5) * 140px), calc((.5 - var(--r)) * 90px)); opacity: .9; }
}

/* ---------- section heads ---------- */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: clamp(20px, 3vw, 32px); }
.section-head h2 { font-size: var(--t-4); font-weight: 800; font-stretch: 125%; letter-spacing: -.03em; line-height: 1; margin: 0; }
.section-head p { margin: 0; color: var(--graphite); max-width: 48ch; }

/* ---------- studio page ---------- */
.studio-hero { padding-block: clamp(44px, 7vw, 104px) clamp(56px, 8vw, 112px); overflow: clip; }
.studio-title { font-size: clamp(2.2rem, 10.6vw, 10.5rem); line-height: .86; letter-spacing: -.045em; margin-bottom: clamp(36px, 5vw, 72px); }
.studio-title .line:last-child { color: var(--graphite); }
.studio-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.studio-copy p { color: var(--graphite); margin: 0 0 18px; max-width: 58ch; }
.studio-copy .lead { font-size: var(--t-2); line-height: 1.45; color: var(--ink); max-width: 44ch; }
.studio-copy .contact a { color: var(--ink); font-weight: 600; }
.maze { width: 100%; height: auto; aspect-ratio: 4 / 3; display: block; }
.maze path { fill: none; stroke: #3a4540; stroke-width: 3.2; stroke-linecap: square; }
.maze .maze-route { stroke: var(--green); stroke-width: 3.2; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.js .studio-page.is-in .maze-route { stroke-dashoffset: 0; transition: stroke-dashoffset 3.2s var(--ease-out) .4s; }

.partners { border-top: 1px solid var(--rule); padding-block: clamp(56px, 8vw, 112px); }
.partner-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
.partner {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--card-ink);
  background: var(--card); border: 1px solid transparent; border-radius: var(--radius); padding: 18px 20px 20px;
  transition: transform var(--d-med) var(--ease-out), box-shadow var(--d-med) var(--ease-out), border-color var(--d-fast);
}
a.partner:hover { transform: translateY(-3px); border-color: var(--green); box-shadow: 0 18px 36px -20px rgba(0, 0, 0, .8); }
.partner-logo { height: 112px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.partner-logo img { width: 78%; height: 100%; object-fit: contain; }
.partner-type { font-weight: 850; font-stretch: 125%; font-size: clamp(1.05rem, 3.4vw, 1.6rem); overflow-wrap: anywhere; letter-spacing: -.03em; line-height: 1; text-align: center; }
.partner-name { font-weight: 700; }
.partner-note { font-size: var(--t-0); color: var(--card-muted); }
.studio-games { border-top: 1px solid var(--rule); padding-block: clamp(56px, 8vw, 104px) clamp(40px, 6vw, 72px); }

.js .studio-title .line, .js .studio-copy > *, .js .studio-page .maze { opacity: 0; transform: translateY(26px); }
.js .studio-page.is-in .studio-title .line, .js .studio-page.is-in .studio-copy > *, .js .studio-page.is-in .maze { opacity: 1; transform: none; transition: opacity 800ms var(--ease-out), transform 900ms var(--ease-out); }
.js .studio-page.is-in .studio-title .line:nth-child(2) { transition-delay: 100ms; }
.js .studio-page.is-in .studio-copy > * { transition-delay: 260ms; }
.js .studio-page.is-in .maze { transition-delay: 320ms; }
.js .partners .partner { opacity: 0; transform: translateY(22px); }
.js .partners.is-in .partner { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out); transition-delay: calc(var(--i) * 80ms); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding-block: 32px 44px; color: var(--graphite); font-size: var(--t-0); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.footer-logo { height: 28px; width: auto; }
.footer-links { display: flex; gap: 6px 18px; flex-wrap: wrap; margin-right: auto; }
.footer-links a { text-decoration: none; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:hover { color: var(--ink); }

/* ---------- game page ---------- */
.game-page {
  position: relative; isolation: isolate; overflow: clip;
  background: var(--bg); color: var(--fg); min-height: calc(100svh - 65px);
  --focus: var(--accent);
}
.game-page .backdrop { opacity: .18; -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%); }
.game-page > .wrap { position: relative; z-index: 2; }
.play-head { display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap; padding-block: 20px 18px; }
.back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding-right: 8px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.back:hover { color: var(--fg); }
.back svg { width: 18px; height: 18px; }
.play-head h1 { margin: 0; font-size: var(--t-2); font-weight: 750; font-stretch: 112%; letter-spacing: -.01em; }
.play-head .genre { color: var(--muted); font-size: var(--t-0); margin: 0; }
.play-head .titles { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }

.play-scene { position: relative; z-index: 2; display: flex; justify-content: center; }

.stage-wrap { width: min(1080px, 100vw - 2 * var(--gutter), (100svh - 230px) * var(--ar)); min-width: min(100%, 320px); }
.stage {
  position: relative; width: 100%; aspect-ratio: var(--ar);
  background: #000; border-radius: 12px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 40px 100px -40px rgba(0,0,0,.95), 0 0 140px -50px var(--glow);
}
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.cover { position: absolute; inset: 0; display: grid; place-items: end center; cursor: pointer; border: 0; padding: 0 0 clamp(16px, 6%, 56px); background: #000; width: 100%; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--d-slow) var(--ease-out), filter var(--d-slow); }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.72) 100%); }
.cover-cta { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; color: #fff; padding: 16px; }
.cover-btn {
  width: clamp(76px, 11vw, 112px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 28%, transparent), 0 20px 50px -10px rgba(0,0,0,.6);
  transition: transform var(--d-med) var(--ease-spring), box-shadow var(--d-med) var(--ease-out);
}
.cover-btn svg { width: 40%; height: 40%; margin-left: 6%; }
.cover-label { font-weight: 750; font-size: clamp(1.05rem, 2vw, 1.35rem); text-shadow: 0 2px 12px rgba(0,0,0,.7); }
.cover-sub { font-size: var(--t-0); opacity: .9; text-shadow: 0 1px 8px rgba(0,0,0,.8); margin-top: -8px; }
.cover:hover img { transform: scale(1.03); }
.cover:hover .cover-btn, .cover:focus-visible .cover-btn { transform: scale(1.08); box-shadow: 0 0 0 16px color-mix(in srgb, var(--accent) 22%, transparent), 0 20px 50px -10px rgba(0,0,0,.6); }
.cover:active .cover-btn { transform: scale(.96); }
.cover:focus-visible { outline-offset: -6px; }

.loader { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: rgba(0,0,0,.72); color: #fff; opacity: 0; pointer-events: none; transition: opacity var(--d-med); }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; font-weight: 600; }
.loader-ring { width: 46px; height: 46px; border-radius: 50%; border: 4px solid rgba(255,255,255,.2); border-top-color: var(--accent); animation: spin .9s linear infinite; }
.stage.is-loading .loader { opacity: 1; }

.stage-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 14px; }
.stage-bar .hint { margin-right: auto; color: var(--muted); font-size: var(--t-0); }
.rotate-hint { display: none; }
.stage:fullscreen { border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; }
.stage-wrap.is-max { position: fixed; inset: 0; z-index: 90; width: 100vw; min-width: 0; background: #000; display: grid; place-items: center; }
.stage-wrap.is-max .stage { width: min(100vw, 100dvh * var(--ar)); border-radius: 0; }
.stage-wrap.is-max .stage-bar { position: fixed; right: 12px; top: 12px; padding: 0; }
.stage-wrap.is-max .stage-bar > :not(.exit-max) { display: none; }
.exit-max { display: none; }
.stage-wrap.is-max .exit-max { display: inline-flex; background: rgba(0,0,0,.6); color: #fff; }

.about-game { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(28px, 5vw, 72px); padding-block: clamp(44px, 6vw, 80px) clamp(56px, 7vw, 96px); }
.about-game .tagline { font-size: var(--t-3); font-weight: 600; font-stretch: 106%; line-height: 1.18; letter-spacing: -.015em; margin: 0 0 18px; text-wrap: balance; }
.about-game .desc { color: var(--muted); margin: 0 0 24px; max-width: 60ch; }
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.features li { display: flex; gap: 12px; align-items: baseline; }
.features li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); transform: translateY(-2px) rotate(45deg); }
.facts { display: grid; gap: 24px; align-content: start; }
.facts h2 { font-size: var(--t-0); font-weight: 650; color: var(--muted); margin: 0 0 10px; }
.facts .stores { display: flex; flex-wrap: wrap; gap: 10px; }
.facts p { margin: 0; }

.more { position: relative; z-index: 2; border-top: 1px solid color-mix(in srgb, var(--fg) 14%, transparent); padding-block: 44px 64px; }
.more .section-head h2 { font-size: var(--t-2); font-weight: 750; font-stretch: 112%; letter-spacing: -.01em; }
.more .tile { color: var(--fg); }
.more .tile-genre { color: var(--muted); }

/* a game that can't be played here (yet) */
.stage.is-closed { display: grid; place-items: center; }
.closed-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.55) saturate(.9); }
.closed-note { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: #fff; padding: 20px; max-width: 34ch; text-shadow: 0 2px 12px rgba(0,0,0,.7); }
.closed-note strong { font-size: clamp(1.2rem, 2.4vw, 1.7rem); font-weight: 750; font-stretch: 112%; }
.closed-icon { width: clamp(56px, 7vw, 76px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.closed-icon svg { width: 52%; height: 52%; }
.js .game-page.is-in .closed-icon svg path { transform-origin: 12px 12px; animation: tick 4s steps(4) infinite; }
@keyframes tick { to { transform: rotate(360deg); } }


/* ---------- view transitions between home and game ---------- */
::view-transition-old(root) { animation: 220ms var(--ease-in) both vt-out; }
::view-transition-new(root) { animation: 380ms var(--ease-out) both vt-in; }
::view-transition-group(game-art) { animation-duration: 620ms; animation-timing-function: var(--ease-out); }
::view-transition-old(game-art), ::view-transition-new(game-art) { animation-duration: 620ms; height: 100%; object-fit: cover; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* ---------- soft transitions between the game sections ----------
   each section slides under the one before it and fades in at the top, so the colours blend instead of meeting in a hard line */
#games { --fade: clamp(56px, 9vw, 150px); }
#games .chapter {
  margin-top: calc(-1 * var(--fade));
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade));
          mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade));
}
#games .chapter:last-child {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
}
#games .chapter-inner { padding-block: calc(var(--fade) + 24px); }

/* ---------- screenshots on the game page ---------- */
.shots-section { position: relative; z-index: 2; padding-bottom: clamp(48px, 6vw, 88px); }
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
.shots.is-portrait { max-width: 820px; margin-inline: auto; }
.shot {
  display: block; padding: 0; border: 0; cursor: zoom-in; background: #000;
  border-radius: 12px; overflow: hidden; aspect-ratio: var(--sa);
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 24px 50px -28px rgba(0,0,0,.9);
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--d-slow) var(--ease-out); }
.shot:hover img, .shot:focus-visible img { transform: scale(1.04); }
.js .shots .shot { opacity: 0; transform: translateY(22px); }
.js .shots-section.is-in .shot { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out); transition-delay: calc(var(--i) * 90ms); }
.shots-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; margin-top: clamp(28px, 4vw, 44px); }
.shots-cta span { color: var(--muted); font-size: var(--t-0); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100vw; height: 100dvh; margin: 0; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(4, 6, 10, .9); }
.lightbox img { max-width: min(94vw, 1600px); max-height: 86dvh; width: auto; height: auto; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lb-btn {
  position: fixed; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff; border: 1.5px solid rgba(255,255,255,.3);
  transition: background-color var(--d-fast);
}
.lb-btn:hover { background: rgba(255,255,255,.24); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox[open] img { animation: lb-in 260ms var(--ease-out); }
@keyframes lb-in { from { opacity: 0; transform: scale(.96); } }

/* ---------- footer social icons ---------- */
.footer-pages, .footer-social { display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; }
.footer-social { gap: 8px; padding-left: 18px; border-left: 1px solid var(--rule); }
.social-icon { width: 44px; height: 44px; justify-content: center; border-radius: 50%; transition: background-color var(--d-fast), color var(--d-fast); }
.social-icon svg { width: 20px; height: 20px; }
.social-icon:hover { background: var(--paper-2); color: var(--ink); }

/* ---------- membership page ----------
   a tilted wall of game art behind the offer (the games sell the membership), then benefits,
   a free-vs-member comparison next to the single price card, and questions */
.membership-page { --accent: var(--green); --accent-ink: var(--green-ink); --focus: var(--green); }
.m-hero {
  position: relative; isolation: isolate; overflow: clip;
  min-height: min(84svh, 760px); display: grid; align-items: center;
  padding-block: clamp(64px, 9vw, 128px) clamp(110px, 13vw, 180px);
}
.m-wall { position: absolute; inset: -35% -25%; z-index: -3; display: grid; place-items: center; }
.m-wall-grid {
  display: grid; grid-template-columns: repeat(6, minmax(170px, 1fr)); gap: clamp(10px, 1.3vw, 18px);
  width: max(150vw, 1500px); transform: rotate(-9deg); opacity: .5;
  animation: wall-drift 70s linear infinite alternate;
}
.m-wall-grid img { width: 100%; height: auto; aspect-ratio: 616 / 353; object-fit: cover; border-radius: 10px; }
@keyframes wall-drift { from { transform: rotate(-9deg) translateX(-3%); } to { transform: rotate(-9deg) translateX(3%); } }
.m-shade {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(58% 60% at 50% 46%, rgba(18, 22, 20, .62), rgba(18, 22, 20, .94) 72%),
    linear-gradient(180deg, rgba(18, 22, 20, .7) 0%, transparent 28%);
}
.m-arc {
  position: absolute; left: -20%; right: -20%; bottom: -90px; height: 180px; z-index: -1;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  border-top: 2px solid var(--green); background: var(--paper);
  box-shadow: 0 -20px 60px -20px rgba(125, 185, 40, .6);
}
.m-hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.m-hero h1 { font-size: var(--t-5); font-weight: 800; font-stretch: 125%; line-height: .92; letter-spacing: -.035em; margin: 0 0 20px; text-wrap: balance; }
.m-lead { font-size: var(--t-3); font-weight: 600; font-stretch: 106%; line-height: 1.2; margin: 0 0 12px; max-width: 32ch; text-wrap: balance; }
.m-price-line { font-size: var(--t-2); color: var(--graphite); margin: 0 0 30px; }
.m-price-line strong { color: var(--ink); }
.m-note { color: var(--graphite); margin: 4px 0 26px; }
.m-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 16px; }
.btn-big { min-height: 64px; padding: 0 34px; font-size: 1.15rem; }
.m-signin { margin: 20px 0 0; color: var(--graphite); font-size: var(--t-0); }
.link-btn {
  background: none; border: 0; padding: 0; min-height: 24px; cursor: pointer;
  color: var(--ink); font: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 3px;
}
.is-busy { cursor: progress; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; flex: none; }

.js .m-hero-inner > * { opacity: 0; transform: translateY(22px); }
.js .membership-page.is-in .m-hero-inner > * { opacity: 1; transform: none; transition: opacity 800ms var(--ease-out), transform 900ms var(--ease-out); }
.js .membership-page.is-in .m-hero-inner > :nth-child(2) { transition-delay: 90ms; }
.js .membership-page.is-in .m-hero-inner > :nth-child(3) { transition-delay: 170ms; }
.js .membership-page.is-in .m-hero-inner > :nth-child(n+4) { transition-delay: 250ms; }
.membership-page.no-anim .m-hero-inner > * { transition: none !important; }

.m-benefits { padding-block: clamp(8px, 2vw, 24px) clamp(56px, 7vw, 96px); }
.benefit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
.benefit { background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px 22px 26px; }
.benefit-icon {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green);
}
.benefit-icon svg { width: 27px; height: 27px; }
.benefit h3 { font-size: 1.15rem; font-weight: 750; font-stretch: 112%; letter-spacing: -.01em; margin: 0 0 8px; }
.benefit p { margin: 0; color: var(--graphite); font-size: .98rem; }

.m-plan { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: start; padding-bottom: clamp(56px, 8vw, 112px); }
.compare h2, .m-faq h2 { font-size: var(--t-4); font-weight: 800; font-stretch: 125%; letter-spacing: -.03em; line-height: 1; margin: 0 0 24px; }
.compare table { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 16px 12px; border-bottom: 1px solid var(--rule); text-align: center; font-size: .98rem; vertical-align: middle; }
.compare tbody th { text-align: left; font-weight: 550; padding-left: 0; }
.compare thead th { font-size: var(--t-0); font-weight: 700; color: var(--graphite); }
.compare .col-member { background: color-mix(in srgb, var(--green) 8%, transparent); }
.compare thead .col-member { color: var(--green); border-radius: 12px 12px 0 0; }
.compare td > span { display: inline-flex; align-items: center; justify-content: center; }
.compare .yes svg { width: 22px; height: 22px; color: var(--green); }
.compare .no svg { width: 20px; height: 20px; color: var(--graphite); opacity: .55; }

.price-card {
  position: sticky; top: 88px; text-align: center;
  background: linear-gradient(180deg, #1b2818 0%, var(--paper-2) 60%);
  border: 1px solid color-mix(in srgb, var(--green) 45%, transparent); border-radius: 18px; padding: 30px 28px 28px;
  box-shadow: 0 30px 80px -40px rgba(125, 185, 40, .5);
}
.price-logo { height: 30px; width: auto; margin: 0 auto 6px; }
.price-name { margin: 0 0 14px; font-weight: 700; font-stretch: 112%; }
.price { margin: 0 0 22px; display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.price strong { font-size: clamp(2.8rem, 5vw, 3.6rem); font-weight: 800; font-stretch: 112%; letter-spacing: -.03em; line-height: 1; }
.price span { color: var(--graphite); }
.price-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; text-align: left; }
.price-list li { display: flex; align-items: center; gap: 10px; }
.price-list svg { width: 20px; height: 20px; flex: none; color: var(--green); }
.price-card .btn-play { width: 100%; justify-content: center; }
.price-member { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 14px; font-weight: 700; color: var(--green); }
.price-member svg { width: 22px; height: 22px; }
.price-manage { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.price-small { margin: 16px 0 0; font-size: .8rem; color: var(--graphite); }
.price-card .m-signin { margin-top: 12px; }

.m-faq { max-width: 880px; padding-bottom: clamp(56px, 8vw, 112px); }
.m-faq details { border-bottom: 1px solid var(--rule); }
.m-faq summary {
  position: relative; cursor: pointer; list-style: none;
  padding: 20px 44px 20px 0; font-weight: 650; font-size: 1.1rem;
}
.m-faq summary::-webkit-details-marker { display: none; }
.m-faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 11px; height: 11px;
  border-right: 2px solid var(--graphite); border-bottom: 2px solid var(--graphite);
  transform: translateY(-70%) rotate(45deg); transition: transform var(--d-fast) var(--ease-out);
}
.m-faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.m-faq details p { margin: 0 0 22px; color: var(--graphite); max-width: 62ch; }
.demo-note { color: var(--graphite); font-size: var(--t-0); padding-bottom: 40px; }
code { font-size: .9em; background: var(--paper-2); padding: 2px 6px; border-radius: 6px; }

/* ---------- account button in the header ---------- */
.account { position: relative; display: flex; align-items: center; }
.account-signin {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 10px; cursor: pointer;
  border-radius: 999px; border: 1.5px solid var(--rule); background: transparent; color: var(--ink); font-weight: 650; font-size: .92rem;
  transition: border-color var(--d-fast), background-color var(--d-fast);
}
.account-signin:hover { border-color: var(--graphite); background: var(--paper-2); }
.account-signin svg { width: 18px; height: 18px; }
.account-face {
  width: 40px; height: 40px; padding: 0; border-radius: 50%; overflow: hidden; cursor: pointer;
  display: grid; place-items: center; border: 2px solid var(--rule); background: var(--paper-2); color: var(--ink); font-weight: 750;
}
.account-face.is-member { border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }
.account-face img { width: 100%; height: 100%; object-fit: cover; }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; min-width: 250px; padding: 14px;
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .85);
}
.account-menu[hidden] { display: none; }
.am-name { margin: 0; font-weight: 700; }
.am-email { margin: 2px 0 0; color: var(--graphite); font-size: var(--t-0); overflow-wrap: anywhere; }
.am-status { display: inline-block; margin: 10px 0 10px; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--rule); }
.am-status.is-member { background: color-mix(in srgb, var(--green) 22%, transparent); color: var(--green); }
.am-link {
  display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 10px; border-radius: 10px; cursor: pointer;
  background: none; border: 0; color: var(--ink); font: inherit; font-weight: 600; text-align: left; text-decoration: none;
}
.am-link:hover { background: var(--rule); }

/* ---------- members-only full screen ---------- */
.fs-icon { display: inline-flex; }
.fs-tag { display: none; padding: 3px 7px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: color-mix(in srgb, currentColor 14%, transparent); }
.fs-btn.is-locked .fs-tag { display: inline-block; }

/* ---------- the paywall over a game ---------- */
.paywall {
  position: absolute; inset: 0; z-index: 5; overflow: auto; padding: 16px;
  display: grid; place-items: center;
  background: rgba(6, 8, 7, .8); backdrop-filter: blur(6px);
  animation: pw-in 320ms var(--ease-out);
}
.paywall-card { max-width: 440px; text-align: center; color: #fff; --accent: var(--green); --accent-ink: var(--green-ink); --focus: var(--green); }
.paywall-icon { width: clamp(44px, 6vw, 58px); aspect-ratio: 1; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: var(--green-ink); }
.paywall-icon svg { width: 50%; height: 50%; }
.paywall h2 { margin: 0 0 10px; font-size: clamp(1.15rem, 2.6vw, 1.9rem); font-weight: 800; font-stretch: 112%; letter-spacing: -.01em; }
.paywall p { margin: 0 0 18px; color: rgba(255, 255, 255, .82); font-size: clamp(.85rem, 1.5vw, 1rem); }
.paywall-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.paywall .btn-ghost { color: #fff; }
@keyframes pw-in { from { opacity: 0; } }

/* ---------- notifications ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 200; max-width: min(92vw, 520px);
  padding: 14px 18px; border-radius: 12px; background: var(--ink); color: var(--paper); font-weight: 600;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8);
  opacity: 0; transform: translate(-50%, 20px); pointer-events: none;
  transition: opacity var(--d-med) var(--ease-out), transform var(--d-med) var(--ease-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .partner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .benefit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-plan { grid-template-columns: minmax(0, 1fr); }
  .price-card { position: static; }
}
@media (max-width: 560px) {
  .account { display: none; } /* on phones, sign-in lives on the Membership page */
  .site-header .wrap { gap: 10px; }
  .brand img { height: 26px; }
  .nav { gap: 0; }
  .nav a { padding: 0 9px; font-size: .9rem; }
  .benefit-grid { grid-template-columns: minmax(0, 1fr); }
  .compare th, .compare td { padding: 12px 6px; font-size: .88rem; }
}
@media (max-width: 720px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .more .tiles > :nth-child(3) { display: none; }
}
@media (max-width: 960px) {
  .chapter-inner, .chapter.alt .chapter-inner { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 48px; }
  .chapter.alt .scene { order: 0; }
  .scene { margin-inline: 6%; }
  .about-game { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .partner-logo { height: 84px; }
  .tiles { gap: 20px 12px; }
  .tile { gap: 8px; }
  .tile-meta { gap: 8px; }
  .tile-play { width: 34px; height: 34px; }
  .tile-play svg { width: 14px; height: 14px; }
  .tile-genre { font-size: .8rem; }
  .badge-dev { left: 6px; top: 6px; padding: 5px 7px; font-size: .7rem; }
  .tile-title { font-size: .98rem; }
  .copy .tagline, .about-game .tagline { font-size: var(--t-2); }
  .stage-wrap { width: 100%; }
  .cover { place-items: end end; padding: 12px; }
  .cover-cta { flex-direction: row; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; background: rgba(0,0,0,.55); }
  .cover-btn { width: 52px; box-shadow: none; }
  .cover-label { font-size: 1rem; }
  .cover-sub { display: none; }
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .btn-play { width: 100%; justify-content: center; }
}
@media (max-width: 700px) and (orientation: portrait) {
  .landscape .rotate-hint { display: block; width: 100%; color: var(--muted); font-size: var(--t-0); }
}
@media (max-width: 960px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .maze { max-width: 520px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .js .chapter .screen { clip-path: none; }
  .js .chapter .screen img, .js .chapter .decor, .js .chapter .copy > *,
  .js .intro h1 .line, .js .intro-sub, .js .intro .tiles .tile, .js .shots .shot,
  .js .studio-title .line, .js .studio-copy > *, .js .studio-page .maze, .js .partners .partner,
  .js .m-hero-inner > * { opacity: 1; transform: none; }
  .maze .maze-route { stroke-dashoffset: 0; }
  .ambient i { display: none; }
  .loader-ring { border-top-color: var(--accent); }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
