/* Polar Games portfolio
   Polar night base, ice-white type, and each game bringing its own color through --accent, --accent-2 and --tint.
   Motion language: --ease-out for arrivals, --ease-spring for answers to a press, --ease-io for moving between states. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('../fonts/bricolage-grotesque.woff2') format('woff2');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('../fonts/geist.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #071226;
  --abyss: #040b19;
  --deep: #0b1a33;
  --glacier: #12264a;
  --ice: #eaf6fb;
  --frost: #b6c9db;
  --mist: #8299b2;
  --aurora: #6cc4ff;
  --aurora-2: #7ef0c8;
  --line: rgba(234, 246, 251, 0.12);
  --line-strong: rgba(234, 246, 251, 0.26);
  --on-accent: #0a0f1c;

  --accent: #6cc4ff;
  --accent-2: #5b7cff;
  --tint: #0e1e3a;

  --display: 'Bricolage Grotesque', 'Arial Narrow', ui-sans-serif, system-ui, sans-serif;
  --text: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --gutter: clamp(16px, 4vw, 56px);
  --wrap: min(1320px, 100% - 2 * var(--gutter));
  --header-h: 76px;
  --radius: 18px;
  --cut: 18px;
  --section: clamp(72px, 8.5vw, 128px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--night); scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--night);
  color: var(--ice);
  font: 400 1.0625rem/1.62 var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
html.is-locked { overflow: hidden; }
html.is-locked body { padding-right: var(--sbw, 0px); }

img, video, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.02; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
kbd { font: inherit; }
[hidden] { display: none !important; }

.wrap { width: var(--wrap); margin-inline: auto; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--aurora); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
::selection { background: color-mix(in oklab, var(--aurora) 45%, transparent); color: #fff; }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 200;
  padding: 12px 18px; border-radius: 12px; background: var(--ice); color: var(--night);
  font-weight: 600; text-decoration: none; transform: translateY(-160%); transition: transform 0.2s var(--ease-out);
}
.skip:focus { transform: none; }

.i { width: 1.05em; height: 1.05em; flex: none; }

/* ------------------------------------------------------------ buttons */

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ice);
  --btn-bd: var(--line-strong);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 50px; padding: 0 22px;
  border: 1px solid var(--btn-bd); border-radius: 14px;
  background: var(--btn-bg); color: var(--btn-fg);
  font: 600 0.97rem/1.1 var(--text); letter-spacing: 0.005em; text-decoration: none; white-space: nowrap;
  transition: transform 0.38s var(--ease-spring), background-color 0.2s, border-color 0.2s, box-shadow 0.3s var(--ease-out), color 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.955); transition-duration: 0.07s; }
.btn .i { transition: transform 0.35s var(--ease-spring); }
.btn:hover .i:last-child:not(:first-child) { transform: translateX(3px); }
.btn--ice { --btn-bg: var(--ice); --btn-fg: var(--night); --btn-bd: var(--ice); }
.btn--ice:hover { --btn-bg: #fff; box-shadow: 0 10px 30px -10px rgba(170, 220, 255, 0.55); }
.btn--accent { --btn-bg: var(--accent); --btn-fg: var(--on-accent); --btn-bd: var(--accent); }
.btn--accent:hover { box-shadow: 0 12px 34px -12px color-mix(in oklab, var(--accent) 80%, transparent); filter: brightness(1.06); }
.btn--ghost, .btn--line { --btn-bg: rgba(234, 246, 251, 0.04); }
.btn--ghost:hover, .btn--line:hover { --btn-bg: rgba(234, 246, 251, 0.1); --btn-bd: rgba(234, 246, 251, 0.45); }
.btn--small { min-height: 42px; padding: 0 16px; font-size: 0.9rem; border-radius: 12px; }
.btn--big { min-height: 58px; padding: 0 28px; font-size: 1.03rem; border-radius: 16px; }
.btn.is-done { --btn-bd: var(--aurora-2); }

.status {
  display: inline-flex; align-items: center; gap: 0.5em;
  min-height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--frost);
  font: 600 0.82rem/1 var(--text); letter-spacing: 0.01em; white-space: nowrap;
}
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--live { color: #8ff0b8; border-color: rgba(143, 240, 184, 0.35); }
.status--alpha { color: #ffd479; border-color: rgba(255, 212, 121, 0.35); }
.status--dev { color: var(--frost); }

/* ------------------------------------------------------------ header */

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  transition: height 0.32s var(--ease-out), background-color 0.32s, border-color 0.32s, backdrop-filter 0.32s;
  border-bottom: 1px solid transparent;
  view-transition-name: site-header;
}
.site-header.is-scrolled {
  --header-h: 64px;
  height: 64px;
  background: rgba(6, 15, 33, 0.78);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); }
.brand { display: block; flex: none; border-radius: 8px; }
.brand img { width: clamp(132px, 13vw, 168px); transition: width 0.32s var(--ease-out); }
.is-scrolled .brand img { width: clamp(124px, 11vw, 148px); }
.nav { margin-left: auto; }
.nav-list { display: flex; gap: clamp(18px, 2.4vw, 34px); }
.nav-list a {
  position: relative; display: block; padding: 10px 0;
  color: var(--frost); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-list a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; border-radius: 2px;
  background: var(--aurora); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease-out);
}
.nav-list a:hover, .nav-list a[aria-current] { color: var(--ice); }
.nav-list a:hover::after, .nav-list a[aria-current]::after { transform: scaleX(1); }
.lang-switch { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; }
.lang-link {
  display: grid; place-items: center; min-width: 38px; min-height: 34px; padding: 0 6px; border-radius: 9px;
  color: var(--mist); text-decoration: none; font: 600 0.78rem/1 var(--text); letter-spacing: 0.06em;
  transition: color 0.2s, background-color 0.2s;
}
.lang-link:hover { color: var(--ice); }
.lang-link[aria-current] { color: var(--night); background: var(--ice); }
.menu-btn {
  display: none; margin-left: auto; width: 48px; height: 48px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: rgba(234, 246, 251, 0.05);
  place-items: center; transition: transform 0.35s var(--ease-spring);
}
.menu-btn:active { transform: scale(0.92); transition-duration: 0.07s; }
.menu-icon { display: grid; gap: 6px; width: 20px; }
.menu-icon span { display: block; height: 2px; border-radius: 2px; background: var(--ice); }
.menu-icon span:last-child { width: 70%; justify-self: end; }

@media (max-width: 959px) {
  .nav, .site-header .lang-switch { display: none; }
  .menu-btn { display: grid; }
}

.mobile-menu {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(3, 9, 21, 0.72);
  opacity: 0; transition: opacity 0.26s var(--ease-out);
}
.mobile-menu.is-open { opacity: 1; }
.mobile-menu-panel {
  position: absolute; inset: 0 0 auto; max-height: 100dvh; overflow: auto;
  display: grid; gap: 28px; padding: 14px var(--gutter) calc(28px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #0b1a33 0%, #071226 100%);
  border-bottom: 1px solid var(--line);
  transform: translateY(-14px); transition: transform 0.42s var(--ease-out);
}
.mobile-menu.is-open .mobile-menu-panel { transform: none; }
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.mobile-menu-logo { width: 132px; }
.menu-close {
  width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: rgba(234, 246, 251, 0.05); font-size: 28px; line-height: 1;
}
.mobile-nav { display: grid; }
.mobile-nav a {
  display: block; padding: 12px 0; border-bottom: 1px solid var(--line);
  font: 650 clamp(2rem, 9vw, 2.6rem)/1.05 var(--display); font-stretch: 88%; letter-spacing: -0.02em;
  text-decoration: none;
}
.mobile-nav a[aria-current] { color: var(--aurora); }
.mobile-menu-foot { display: grid; gap: 18px; }
.lang-switch--big { justify-self: start; }
.lang-switch--big .lang-link { min-width: 56px; min-height: 44px; font-size: 0.85rem; }
.mobile-mail { display: inline-flex; align-items: center; gap: 10px; color: var(--frost); text-decoration: none; min-height: 44px; }

/* ------------------------------------------------------------ sections */

.section { padding-block: var(--section); position: relative; }
.section-head { display: grid; gap: 14px; max-width: 46rem; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2, .partners-head h2 {
  font-size: clamp(2.5rem, 5.4vw, 4.6rem); font-weight: 720; font-stretch: 88%; letter-spacing: -0.028em; line-height: 0.96;
}
.section-head p { color: var(--frost); font-size: clamp(1.02rem, 1.3vw, 1.15rem); max-width: 38rem; }

/* Reveal: hidden only when JavaScript is running, so content stays readable without it. */
html.js [data-reveal] {
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
html.js [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(22px); }

/* ------------------------------------------------------------ hero: the stage
   Two layers share the stage: the studio scene (glacier, giant word, panda cut-out, snow) and a game preview.
   Choosing a game in the dock swaps them; when idle, the stage cycles through the dock on its own. */

.hero {
  position: relative; isolation: isolate;
  min-height: max(660px, min(100svh, 1040px));
  display: grid; grid-template-rows: minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
  padding-top: calc(var(--header-h) + 8px);
  overflow: clip;
  --g-accent: var(--aurora);
}
.stage { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--night); }
.stage-layer { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.7s var(--ease-out), visibility 0s linear 0.7s; }
.stage-layer.is-active { opacity: 1; visibility: visible; transition: opacity 0.7s var(--ease-out), visibility 0s; }
.st-move, .st-word { position: absolute; inset: -24px; will-change: transform; transition: transform 0.9s var(--ease-out); }
.st-bg, .st-fg { position: absolute; inset: 0; display: block; }
.st-bg img, .st-fg img { width: 100%; height: 100%; object-fit: cover; object-position: 66% 45%; }
.st-bg img { animation: scene-in 1.8s var(--ease-out) both; }
.st-front { z-index: 3; }
.st-fg img { animation: fg-in 1.4s var(--ease-out) 0.15s both; }
.st-word { z-index: 2; display: flex; align-items: flex-start; justify-content: center; padding-top: calc(var(--header-h) + 3svh); pointer-events: none; }
.st-word span {
  display: block;
  font: 800 min(29vw, 50svh) / 0.78 var(--display); font-stretch: 78%; letter-spacing: -0.04em; white-space: nowrap;
  background: linear-gradient(180deg, #ffffff 0%, #e2f4ff 34%, rgba(160, 214, 255, 0.6) 62%, rgba(140, 205, 255, 0) 88%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 20px 60px rgba(4, 16, 40, 0.35));
  animation: word-in 1.5s var(--ease-out) 0.3s both;
}
.st-aurora {
  position: absolute; inset: -10% -10% 40% 20%; z-index: 1; pointer-events: none; mix-blend-mode: screen; opacity: 0.55;
  background:
    radial-gradient(40% 60% at 30% 60%, rgba(126, 240, 200, 0.35), transparent 70%),
    radial-gradient(35% 50% at 65% 40%, rgba(108, 196, 255, 0.35), transparent 70%),
    radial-gradient(30% 45% at 85% 70%, rgba(170, 130, 255, 0.25), transparent 70%);
  filter: blur(30px);
  animation: aurora 14s ease-in-out infinite alternate;
}
.st-snow { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; pointer-events: none; }
.stage-game { background: var(--g-tint, var(--night)); }
.sg-img, .sg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sg-img { transform-origin: 60% 50%; }
.stage-game.is-active .sg-img { animation: kenburns 9s linear both; }
.sg-video { opacity: 0; transition: opacity 0.6s var(--ease-out); }
.sg-video.is-ready { opacity: 1; }
.sg-img.is-pixel, .sg-video.is-pixel { image-rendering: pixelated; }
.stage-shade {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 12, 28, 0.7) 0%, rgba(4, 12, 28, 0.38) 30%, rgba(4, 12, 28, 0) 56%),
    linear-gradient(0deg, var(--night) 0%, rgba(7, 18, 38, 0.88) 22%, rgba(7, 18, 38, 0.35) 44%, rgba(7, 18, 38, 0) 62%),
    linear-gradient(180deg, rgba(4, 12, 28, 0.55) 0%, rgba(4, 12, 28, 0) 20%);
}
.hero[data-mode='game'] .stage-shade {
  background:
    linear-gradient(90deg, color-mix(in oklab, var(--g-tint, #071226) 92%, black) 0%, color-mix(in oklab, var(--g-tint, #071226) 70%, transparent) 34%, transparent 66%),
    linear-gradient(0deg, var(--night) 0%, rgba(7, 18, 38, 0.8) 16%, rgba(7, 18, 38, 0) 48%),
    linear-gradient(180deg, rgba(4, 12, 28, 0.55) 0%, rgba(4, 12, 28, 0) 20%);
}

.hero-body { position: relative; align-self: end; display: grid; padding-block: clamp(20px, 4vh, 48px) clamp(10px, 2vh, 24px); }
.hero-copy { grid-area: 1 / 1; align-self: end; transition: opacity 0.45s var(--ease-out), transform 0.6s var(--ease-out), visibility 0s linear 0.45s; }
.hero-copy--game { opacity: 0; visibility: hidden; transform: translateY(24px); pointer-events: none; }
.hero[data-mode='game'] .hero-copy--studio { opacity: 0; visibility: hidden; transform: translateY(-18px); pointer-events: none; }
.hero[data-mode='game'] .hero-copy--game { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity 0.5s var(--ease-out) 0.1s, transform 0.7s var(--ease-out) 0.1s, visibility 0s; }
.hero-title {
  font-size: clamp(2.6rem, min(5.6vw, 9.5svh), 5.8rem);
  font-weight: 740; font-stretch: 86%; line-height: 0.92; letter-spacing: -0.026em;
  max-width: 16ch; text-shadow: 0 4px 30px rgba(3, 10, 24, 0.45);
}
.hero-title .line { display: block; }
.hero-title .w { display: inline-block; }
.hero-title .w-in { display: inline-block; transform-origin: 50% 100%; animation: land 0.78s var(--ease-out) both; animation-delay: calc(140ms + var(--wi, 0) * 75ms); }
.hero-lede { max-width: 31rem; margin-top: clamp(16px, 2.2vw, 24px); font-size: clamp(1.04rem, 1.35vw, 1.22rem); line-height: 1.6; color: var(--frost); animation: rise 0.8s var(--ease-out) 0.62s both; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(20px, 2.6vw, 30px); animation: rise 0.8s var(--ease-out) 0.72s both; }
.hg-genre { color: var(--g-accent); font-weight: 650; font-size: clamp(0.95rem, 1.2vw, 1.1rem); }
.hg-title { margin-top: 10px; font: 800 clamp(3.4rem, min(9vw, 15svh), 9rem) / 0.86 var(--display); font-stretch: 80%; letter-spacing: -0.035em; max-width: 11ch; text-wrap: balance; text-shadow: 0 6px 40px rgba(0, 0, 0, 0.35); }
.hg-tagline { margin-top: 16px; font-size: clamp(1.15rem, 1.8vw, 1.5rem); font-weight: 500; max-width: 30ch; }
.hg-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(22px, 3vw, 34px); }
.hg-actions .btn--accent { --btn-bg: var(--g-accent); --btn-bd: var(--g-accent); }
.hero.is-swapping .hg-title { animation: title-pop 0.6s var(--ease-spring) both; }
.hero.is-swapping .hg-genre, .hero.is-swapping .hg-tagline, .hero.is-swapping .hg-actions { animation: rise 0.55s var(--ease-out) both; }
.hero.is-swapping .hg-tagline { animation-delay: 0.06s; }
.hero.is-swapping .hg-actions { animation-delay: 0.12s; }

.dock { position: relative; z-index: 2; min-width: 0; padding-bottom: clamp(16px, 3vh, 40px); }
.dock-rail {
  display: flex; gap: clamp(10px, 1.2vw, 18px);
  padding: 20px max(var(--gutter), calc((100% - 1320px) / 2)) 14px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
  scroll-padding-inline: max(var(--gutter), calc((100% - 1320px) / 2));
  -webkit-mask: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 72px), transparent 100%);
  mask: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 72px), transparent 100%);
}
.dock-rail::-webkit-scrollbar { display: none; }
.dock-rail li { flex: none; scroll-snap-align: start; animation: floe-in 0.9s var(--ease-out) both; animation-delay: calc(820ms + var(--n, 0) * 55ms); }
.dock-tile {
  position: relative; display: grid; gap: 9px; width: clamp(140px, 11.6vw, 200px);
  text-decoration: none; border-radius: 14px; outline-offset: 6px;
  transition: transform 0.45s var(--ease-spring);
}
.dock-media {
  position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--tint);
  box-shadow: 0 0 0 1px rgba(234, 246, 251, 0.18), 0 22px 40px -22px rgba(0, 0, 0, 0.9);
  transition: box-shadow 0.35s var(--ease-out), transform 0.45s var(--ease-spring);
}
.dock-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out), filter 0.3s; filter: saturate(0.85) brightness(0.86); }
.dock-tile--studio .dock-media { display: grid; place-items: center; background: linear-gradient(160deg, #12305c, #071226); }
.dock-tile--studio .dock-media img { width: 34%; height: auto; object-fit: contain; filter: none; }
.dock-title { font: 600 0.84rem/1.2 var(--text); color: var(--mist); padding-left: 2px; transition: color 0.25s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-progress { position: absolute; left: 0; right: 0; top: -10px; height: 3px; border-radius: 3px; background: rgba(234, 246, 251, 0.12); overflow: hidden; opacity: 0; transition: opacity 0.3s; }
.dock-progress::after { content: ''; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.dock-tile:hover, .dock-tile:focus-visible, .dock-tile.is-active { transform: translateY(-8px); }
.dock-tile:hover .dock-media img, .dock-tile:focus-visible .dock-media img, .dock-tile.is-active .dock-media img { transform: scale(1.06); filter: none; }
.dock-tile.is-active .dock-media { box-shadow: 0 0 0 2px var(--accent), 0 0 40px -6px color-mix(in oklab, var(--accent) 70%, transparent), 0 22px 40px -22px rgba(0, 0, 0, 0.9); }
.dock-tile.is-active .dock-title, .dock-tile:hover .dock-title { color: var(--ice); }
.dock-tile.is-active .dock-progress { opacity: 1; }
.hero.is-attract .dock-tile.is-active .dock-progress::after { animation: progress var(--attract, 6s) linear both; }

@keyframes land {
  0% { opacity: 0; transform: translateY(-0.75em) scale(0.94, 1.12); }
  48% { opacity: 1; transform: translateY(0) scale(1.07, 0.86); }
  70% { transform: translateY(-0.05em) scale(0.98, 1.04); }
  100% { opacity: 1; transform: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes floe-in { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes scene-in { from { opacity: 0.4; transform: scale(1.08); filter: brightness(0.6); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fg-in { from { opacity: 0; transform: scale(1.04) translateY(2%); } to { opacity: 1; transform: none; } }
@keyframes word-in { from { opacity: 0; transform: translateY(14%) scale(0.96); letter-spacing: 0.01em; } to { opacity: 1; transform: none; } }
@keyframes aurora { 0% { transform: translate3d(-4%, 0, 0) scale(1); } 100% { transform: translate3d(5%, -4%, 0) scale(1.12); } }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1.0); } }
@keyframes title-pop { 0% { opacity: 0; transform: translateY(0.25em) scale(0.92); } 60% { opacity: 1; transform: translateY(-0.03em) scale(1.02); } 100% { transform: none; } }
@keyframes progress { to { transform: scaleX(1); } }

@media (max-width: 700px) {
  .hero { min-height: auto; }
  .stage { bottom: auto; height: min(74svh, 640px); }
  .st-bg img, .st-fg img { object-position: 70% 0%; }
  .st-word { display: none; }
  .stage-shade, .hero[data-mode='game'] .stage-shade {
    background:
      linear-gradient(0deg, var(--night) 0%, rgba(7, 18, 38, 0.9) 18%, rgba(7, 18, 38, 0.2) 48%, rgba(7, 18, 38, 0) 64%),
      linear-gradient(180deg, rgba(4, 12, 28, 0.6) 0%, rgba(4, 12, 28, 0) 22%);
  }
  .hero-body { align-self: end; padding-top: clamp(260px, 50svh, 420px); padding-bottom: 20px; }
  .hero-title { font-size: clamp(2.9rem, 13.4vw, 4.2rem); }
  .hg-title { font-size: clamp(2.8rem, 14vw, 4.4rem); }
  .hero-actions .btn, .hg-actions .btn { flex: 1 1 auto; }
  .dock-tile { width: 136px; }
}

/* ------------------------------------------------------------ cards */

.card { position: relative; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.card-media {
  position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden;
  background: var(--tint);
  -webkit-mask: linear-gradient(225deg, transparent 0 var(--cut), #000 calc(var(--cut) + 0.5px));
  mask: linear-gradient(225deg, transparent 0 var(--cut), #000 calc(var(--cut) + 0.5px));
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease-out);
  view-transition-class: cover;
}
.card-media.is-tilting { transition-duration: 0.12s; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out), filter 0.35s; }
.card-media::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.16), transparent 45%);
  opacity: 0; transition: opacity 0.35s;
}
.card:hover .card-media img { transform: scale(1.045); filter: saturate(1.08) brightness(1.04); }
.card:hover .card-media::before { opacity: 1; }
.card-body { display: grid; gap: 8px; align-content: start; }
.card-genre { color: var(--accent); font-size: 0.86rem; font-weight: 600; letter-spacing: 0.01em; }
.card-title { font-size: clamp(1.55rem, 2.1vw, 1.95rem); font-weight: 700; font-stretch: 90%; letter-spacing: -0.025em; line-height: 1; }
.card-link { text-decoration: none; }
.card-link::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: var(--radius); }
.card-link:focus-visible { outline: none; }
.card-link:focus-visible::after { outline: 2px solid var(--aurora); outline-offset: 6px; }
.card-summary { color: var(--frost); font-size: 0.98rem; line-height: 1.55; max-width: 34rem; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 8px; }
.card-actions .btn { position: relative; z-index: 3; }
.card-more { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--mist); font-size: 0.88rem; font-weight: 500; transition: color 0.2s; }
.card-more .i { transition: transform 0.35s var(--ease-spring); }
.card:hover .card-more { color: var(--ice); }
.card:hover .card-more .i { transform: translateX(4px); }

.ph {
  position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; container-type: inline-size;
  background:
    radial-gradient(110% 90% at 12% 0%, color-mix(in oklab, var(--accent) 62%, transparent), transparent 62%),
    radial-gradient(90% 90% at 100% 100%, color-mix(in oklab, var(--accent-2) 58%, transparent), transparent 64%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 14px),
    var(--tint);
}
.ph-title {
  font: 800 clamp(2.2rem, 16cqi, 10rem)/0.86 var(--display); font-stretch: 80%; letter-spacing: -0.035em;
  text-align: center; text-transform: uppercase; color: rgba(255, 255, 255, 0.88);
  transform: rotate(-7deg) scale(1.08); text-shadow: 0 0.06em 0.2em rgba(0, 0, 0, 0.25); padding: 0 6%;
}

/* ------------------------------------------------------------ marquee */

.marquee {
  position: relative; overflow: hidden; padding: clamp(20px, 3vw, 40px) 0;
  border-block: 1px solid var(--line); background: var(--abyss);
}
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee-row { display: flex; align-items: center; flex: none; }
.marquee-row span {
  font: 800 clamp(3rem, 8.5vw, 8rem) / 1 var(--display); font-stretch: 78%; letter-spacing: -0.03em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.5px rgba(234, 246, 251, 0.34);
  padding: 0 0.32em; transition: color 0.3s, -webkit-text-stroke-color 0.3s;
}
.marquee-row span:nth-of-type(3n + 2) { color: var(--ice); -webkit-text-stroke-color: transparent; }
.marquee-row i { font-style: normal; color: var(--aurora); font-size: clamp(1.4rem, 3vw, 2.6rem); }

/* ------------------------------------------------------------ spotlight: stacked cinematic cards */

.spotlight {
  --spot-bg: var(--night);
  padding: clamp(80px, 10vw, 140px) 0 clamp(60px, 8vw, 110px);
  background: var(--spot-bg);
  transition: background-color 0.8s var(--ease-out);
}
.spot-head { margin-bottom: clamp(32px, 4vw, 56px); }
.spot-stack { display: grid; gap: 7vh; }
.spot {
  position: sticky; top: calc(64px + 2.5vh); z-index: var(--z);
  height: min(84svh, 860px); min-height: 560px;
  border-radius: 32px; overflow: hidden; isolation: isolate;
  background: var(--tint);
  box-shadow: 0 -30px 80px -40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
  transform-origin: 50% 0%;
  transform: scale(var(--spot-scale, 1));
  filter: brightness(var(--spot-dim, 1));
}
.spot-bg { position: absolute; inset: 0; z-index: -2; view-transition-class: cover; }
.spot-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.2s var(--ease-out); }
.spot:hover .spot-bg img { transform: scale(1.02); }
.spot-bg .ph-title { font-size: clamp(4rem, 14cqi, 14rem); }
.spot::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, color-mix(in oklab, var(--tint) 94%, black) 0%, color-mix(in oklab, var(--tint) 78%, transparent) 36%, color-mix(in oklab, var(--tint) 10%, transparent) 70%),
    linear-gradient(0deg, color-mix(in oklab, var(--tint) 85%, black) 0%, transparent 46%);
}
.spot-inner { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); align-items: end; gap: 4vw; padding: clamp(28px, 4.4vw, 64px); }
.spot-body { display: grid; gap: 12px; justify-items: start; align-self: end; }
.spot-index { font: 600 0.9rem/1 var(--text); color: var(--frost); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.spot-index span { color: var(--accent); }
.spot-genre { color: var(--accent); font-weight: 650; font-size: clamp(0.95rem, 1.2vw, 1.1rem); margin-top: 8px; }
.spot-title { font-size: clamp(3rem, 7.4vw, 7.6rem); font-weight: 800; font-stretch: 80%; letter-spacing: -0.035em; line-height: 0.86; max-width: 11ch; }
.spot-title a { text-decoration: none; }
.spot-title a::after { content: ''; position: absolute; inset: 0; z-index: 0; }
.spot-tagline { font-size: clamp(1.15rem, 1.7vw, 1.45rem); font-weight: 550; max-width: 28ch; }
.spot-summary { color: var(--frost); max-width: 34rem; }
.spot-actions { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.spot-shot {
  position: relative; z-index: 2; align-self: center; justify-self: end; display: block; width: min(100%, 640px);
  perspective: 1400px; text-decoration: none;
}
.spot-screen {
  display: block; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 6px rgba(8, 14, 28, 0.88), 0 0 0 7px rgba(255, 255, 255, 0.14), 0 50px 90px -30px rgba(0, 0, 0, 0.9), 0 0 120px -30px color-mix(in oklab, var(--accent) 60%, transparent);
  transform: rotateY(-14deg) rotateX(6deg) rotateZ(1deg) translateZ(0);
  transition: transform 0.9s var(--ease-out);
}
.spot:hover .spot-screen { transform: rotateY(-4deg) rotateX(2deg) rotateZ(0deg); }
.spot-screen img, .spot-screen video { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 899px) {
  .spot { height: auto; min-height: min(78svh, 620px); top: calc(64px + 12px); }
  .spot-inner { grid-template-columns: 1fr; align-content: end; padding-top: 38svh; }
  .spot-shot { display: none; }
  .spot-bg { bottom: auto; height: 62svh; max-height: 520px; }
  .spot-bg img { -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 100%); mask-image: linear-gradient(180deg, #000 45%, transparent 100%); }
  .spot::before { background: linear-gradient(0deg, color-mix(in oklab, var(--tint) 88%, black) 0%, color-mix(in oklab, var(--tint) 70%, transparent) 45%, transparent 75%); }
}
@media (max-width: 599px) { .spot { border-radius: 24px; } .spot-actions .btn { flex: 1 1 auto; } }

/* ------------------------------------------------------------ workshop */

.workshop { background: var(--abyss); }
.ws-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.ws-card { display: grid; gap: 8px; align-content: start; }
.ws-card .ws-thumb { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: var(--tint); margin-bottom: 8px; }
.ws-card .ws-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.ws-card:hover .ws-thumb img { transform: scale(1.05); }
.ws-card .ws-thumb .ph-title { font-size: clamp(1.8rem, 18cqi, 3.6rem); }
.ws-card h3 { font-size: clamp(1.35rem, 1.8vw, 1.7rem); font-stretch: 88%; }
.ws-card h3 a { text-decoration: none; }
.ws-card h3 a:hover { color: var(--accent); }
.ws-card .ws-genre { color: var(--frost); font-size: 0.92rem; }
.ws-card .ws-action { justify-self: start; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0; color: var(--ice); text-underline-offset: 4px; }
.ws-card .ws-action svg { width: 15px; height: 15px; flex: none; transition: transform 0.25s var(--ease-out); }
.ws-card .ws-action:hover { color: var(--accent); }
.ws-card .ws-action:hover svg { transform: translate(2px, -2px); }
@media (max-width: 999px) { .ws-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------------------ partners: devices */

.partners-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 80px); align-items: center; margin-bottom: clamp(56px, 7vw, 100px); }
.partners-top .partners-head { display: grid; grid-template-columns: 1fr; gap: 22px; margin: 0; align-items: start; }
.devices { position: relative; margin: 0; padding: 4% 9% 8% 0; }
.laptop { position: relative; }
.laptop-screen {
  aspect-ratio: 16 / 10; border-radius: 14px 14px 4px 4px; overflow: hidden; background: #000;
  border: clamp(6px, 0.9vw, 12px) solid #0d1526; border-bottom-width: clamp(10px, 1.2vw, 16px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 60px 100px -40px rgba(0, 0, 0, 0.9), 0 0 140px -40px rgba(140, 90, 255, 0.5);
}
.laptop-screen img { width: 100%; height: 100%; object-fit: cover; }
.laptop-base { height: clamp(10px, 1.3vw, 18px); margin: 0 -6%; border-radius: 0 0 18px 18px; background: linear-gradient(180deg, #2b3953, #121a2c); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset; }
.phone {
  position: absolute; right: 0; bottom: 0; width: 25%; aspect-ratio: 9 / 19.5; border-radius: 28px; overflow: hidden;
  border: clamp(5px, 0.6vw, 8px) solid #0d1526; background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 40px 80px -30px rgba(0, 0, 0, 0.95);
}
.phone::before { content: ''; position: absolute; top: 6px; left: 50%; width: 30%; height: 12px; border-radius: 8px; background: #0d1526; transform: translateX(-50%); z-index: 1; }
.phone-screen, .phone-screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.offer { padding-top: 26px; }
.offer-n { display: block; color: var(--aurora); font-size: 1.3rem; line-height: 1; margin-bottom: 4px; }
@media (max-width: 899px) { .partners-top { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ contact: composer */

.contact-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.contact-title .ch { display: inline-block; transition: font-variation-settings 0.25s var(--ease-out); }
.composer {
  display: grid; gap: 16px; padding: clamp(24px, 3vw, 36px); border-radius: 26px;
  background: rgba(4, 11, 25, 0.55); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.composer h3 { font-size: clamp(1.4rem, 2vw, 1.8rem); font-stretch: 88%; }
.composer-opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.composer-opts legend { width: 100%; margin-bottom: 8px; color: var(--mist); font-size: 0.9rem; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt span {
  display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--frost); font-size: 0.92rem; font-weight: 550;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.35s var(--ease-spring);
}
.opt:hover span { color: var(--ice); border-color: rgba(234, 246, 251, 0.45); }
.opt input:checked + span { background: var(--ice); color: var(--night); border-color: var(--ice); }
.opt input:focus-visible + span { outline: 2px solid var(--aurora); outline-offset: 3px; }
.opt:active span { transform: scale(0.94); transition-duration: 0.07s; }
.field { display: grid; gap: 6px; }
.field span { color: var(--mist); font-size: 0.9rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 13px; resize: vertical;
  border: 1px solid var(--line-strong); background: rgba(234, 246, 251, 0.05); color: var(--ice);
  font-family: inherit; font-size: 0.98rem; line-height: 1.45;
  transition: border-color 0.2s, background-color 0.2s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--frost) 50%), linear-gradient(135deg, var(--frost) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.field select option { background: var(--deep); }
.field input::placeholder, .field textarea::placeholder { color: rgba(130, 153, 178, 0.75); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--aurora); background: rgba(234, 246, 251, 0.08); }
.composer-form { display: grid; gap: 16px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field-error { color: #ff9b9b; font-size: 0.86rem; min-height: 0; }
.field-error:empty { display: none; }
.field.has-error input { border-color: #ff8a8a; background: rgba(255, 120, 120, 0.07); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.composer-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.composer.is-sending button[type='submit'] { cursor: progress; }
.composer.is-sending button[type='submit'] svg { animation: send-wiggle 0.7s var(--ease-out) infinite alternate; }
@keyframes send-wiggle { from { transform: translate(-2px, 1px) rotate(-8deg); } to { transform: translate(3px, -2px) rotate(6deg); } }
.composer-status:empty { display: none; }
.composer-status { margin: 0; padding: 12px 14px; border-radius: 13px; font-size: 0.94rem; }
.composer-status.is-error { color: #ffd2d2; background: rgba(255, 110, 110, 0.1); border: 1px solid rgba(255, 130, 130, 0.35); }
.composer-status a { color: var(--ice); font-weight: 600; text-underline-offset: 3px; }
.composer-note { color: var(--mist); font-size: 0.86rem; }
.composer-done { display: grid; gap: 12px; justify-items: start; padding: 12px 0 4px; }
.composer-done h3 { font-size: clamp(1.8rem, 3vw, 2.4rem); outline: none; }
.composer-done p { color: var(--frost); }
.done-mark {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  color: var(--night); background: var(--aurora); box-shadow: 0 0 0 8px rgba(108, 196, 255, 0.16), 0 20px 50px -14px rgba(108, 196, 255, 0.8);
  animation: done-pop 0.7s var(--ease-spring) both;
}
.done-mark path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: done-check 0.45s 0.25s var(--ease-out) forwards; }
@keyframes done-pop { from { transform: scale(0.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes done-check { to { stroke-dashoffset: 0; } }
@media (max-width: 899px) { .contact-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ split headings */

[data-split] .sw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
[data-split] .sw > span { display: inline-block; }
html.js [data-split]:not(.is-in) .sw > span { transform: translateY(105%) rotate(4deg); }
html.js [data-split] .sw > span { transition: transform 0.9s var(--ease-out); transition-delay: calc(var(--si, 0) * 60ms); }

/* ------------------------------------------------------------ cursor, particles */

.cursor {
  position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none;
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  border: 1.5px solid rgba(234, 246, 251, 0.7);
  display: grid; place-items: center;
  opacity: 0; transition: width 0.35s var(--ease-spring), height 0.35s var(--ease-spring), margin 0.35s var(--ease-spring), background-color 0.25s, border-color 0.25s, opacity 0.25s;
}
.cursor.is-on { opacity: 1; }
.cursor.is-big { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: var(--ice); border-color: var(--ice); }
.cursor.is-press { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
.cursor-label { font: 700 0.86rem/1 var(--text); color: var(--night); opacity: 0; transform: scale(0.6); transition: opacity 0.2s, transform 0.35s var(--ease-spring); }
.cursor.is-big .cursor-label { opacity: 1; transform: none; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
.spark { position: fixed; left: 0; top: 0; z-index: 310; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 2px; pointer-events: none; }

/* ------------------------------------------------------------ home: partners */

.partners {
  background:
    radial-gradient(70% 60% at 85% 0%, rgba(108, 196, 255, 0.12), transparent 70%),
    linear-gradient(180deg, var(--abyss) 0%, var(--deep) 100%);
}
.partners-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 5vw, 80px); align-items: end; margin-bottom: clamp(48px, 6vw, 88px); }
.partners-head h2 { max-width: 14ch; }
.partners-head p { color: var(--frost); font-size: clamp(1.02rem, 1.3vw, 1.15rem); max-width: 34rem; }
.offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 48px); }
.offer { display: grid; gap: 14px; align-content: start; padding-top: 22px; border-top: 2px solid var(--line-strong); }
.offer h3 { font-size: clamp(1.7rem, 2.4vw, 2.3rem); font-stretch: 86%; letter-spacing: -0.03em; }
.offer p { color: var(--frost); }
.offer:first-child { border-top-color: var(--aurora); }
.caps {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px);
  margin-top: clamp(56px, 7vw, 104px); padding: clamp(28px, 4vw, 52px);
  border-radius: 28px; background: rgba(4, 11, 25, 0.55); border: 1px solid var(--line);
}
.caps h3 { font-size: clamp(1.4rem, 2vw, 1.8rem); font-stretch: 90%; margin-bottom: 22px; }
.caps-list { display: grid; gap: 14px; }
.caps-list li { position: relative; padding-left: 26px; color: var(--ice); }
.caps-list li::before {
  content: ''; position: absolute; left: 2px; top: 0.55em; width: 9px; height: 9px;
  background: var(--aurora); transform: rotate(45deg); border-radius: 2px;
}
.caps-side { display: grid; gap: 18px; align-content: start; }
.stack-label { color: var(--mist); font-size: 0.9rem; font-weight: 500; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.stack li { padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); color: var(--frost); font-size: 0.88rem; font-weight: 500; }
.caps-side .btn { justify-self: start; }
@media (max-width: 899px) {
  .partners-head, .caps { grid-template-columns: 1fr; }
  .offers { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ home: studio */

.studio-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 7vw, 120px); align-items: center; }
.studio-mark {
  position: relative; margin: 0; aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden; background: var(--deep);
  -webkit-mask: linear-gradient(225deg, transparent 0 28px, #000 28.5px);
  mask: linear-gradient(225deg, transparent 0 28px, #000 28.5px);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
}
.studio-mark > img:first-child { width: 100%; height: 100%; object-fit: cover; object-position: 55% 30%; }
.studio-mark::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4, 11, 25, 0.75) 0%, rgba(4, 11, 25, 0) 40%); }
.studio-badge { position: absolute; left: 24px; bottom: 22px; z-index: 1; width: 44px; height: auto; }
.studio-text { display: grid; gap: 22px; }
.studio-text h2 { font-size: clamp(2.4rem, 5vw, 4.4rem); font-stretch: 84%; letter-spacing: -0.035em; line-height: 0.96; max-width: 13ch; }
.studio-text > p { color: var(--frost); font-size: clamp(1.04rem, 1.3vw, 1.16rem); max-width: 36rem; }
.studio-text > p:first-of-type { color: var(--ice); }
.studio-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 12px; padding-top: 26px; border-top: 1px solid var(--line); }
.studio-facts dt { font: 700 clamp(2.4rem, 4vw, 3.4rem)/1 var(--display); font-stretch: 80%; letter-spacing: -0.03em; }
.studio-facts dd { color: var(--frost); font-size: 0.92rem; line-height: 1.35; margin-top: 6px; }
.studio-portals { color: var(--mist); font-size: 0.95rem; }
@media (max-width: 799px) {
  .studio-grid { grid-template-columns: 1fr; }
  .studio-mark { max-width: 340px; }
}

/* ------------------------------------------------------------ home: contact */

.contact {
  background:
    radial-gradient(60% 50% at 20% 0%, rgba(126, 240, 200, 0.12), transparent 70%),
    radial-gradient(50% 60% at 90% 30%, rgba(108, 196, 255, 0.14), transparent 70%),
    var(--deep);
  overflow: clip;
}
.contact-title { font-size: clamp(4rem, 13vw, 11.5rem); font-weight: 760; font-stretch: 84%; letter-spacing: -0.035em; line-height: 0.86; }
.contact-body { max-width: 34rem; margin-top: clamp(20px, 3vw, 32px); color: var(--frost); font-size: clamp(1.04rem, 1.4vw, 1.2rem); }
.contact-mail { margin-top: clamp(28px, 4vw, 48px); }
.contact-mail a {
  font: 650 clamp(1.5rem, 4.6vw, 3.6rem)/1.1 var(--display); font-stretch: 88%; letter-spacing: -0.025em;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; text-decoration-color: var(--line-strong);
  transition: text-decoration-color 0.25s, color 0.25s; overflow-wrap: anywhere;
}
.contact-mail a:hover { text-decoration-color: var(--aurora); color: #fff; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(28px, 4vw, 44px); }

/* ------------------------------------------------------------ footer */

.site-footer { background: var(--abyss); border-top: 1px solid var(--line); padding-top: clamp(56px, 7vw, 88px); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-brand { display: grid; gap: 10px; align-content: start; color: var(--frost); font-size: 0.95rem; }
.footer-brand img { width: 150px; margin-bottom: 8px; }
.footer-tagline { color: var(--ice); font: 600 1.15rem/1.3 var(--display); }
.site-footer h2 { font: 600 0.9rem/1 var(--text); color: var(--mist); letter-spacing: 0.01em; margin-bottom: 16px; }
.site-footer ul { display: grid; gap: 4px; }
.site-footer ul a { display: inline-block; padding: 6px 0; color: var(--frost); text-decoration: none; font-size: 0.95rem; }
.site-footer ul a:hover, .site-footer ul a[aria-current] { color: var(--ice); }
.footer-base { margin-top: 48px; padding-block: 22px calc(22px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--mist); font-size: 0.88rem; }
@media (max-width: 799px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------ catalog */

.catalog { padding: calc(var(--header-h) + clamp(48px, 7vw, 96px)) 0 var(--section); }
.catalog-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr); gap: 24px clamp(24px, 5vw, 80px); align-items: end; }
.catalog-head h1 { font-size: clamp(3.6rem, 11vw, 9.5rem); font-weight: 760; font-stretch: 84%; letter-spacing: -0.034em; line-height: 0.86; }
.catalog-head p { color: var(--frost); font-size: clamp(1.02rem, 1.3vw, 1.15rem); max-width: 30rem; }
.catalog-controls {
  position: sticky; top: 64px; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  margin: clamp(36px, 5vw, 64px) calc(var(--gutter) * -1) 0; padding: 14px var(--gutter);
  background: rgba(7, 18, 38, 0.86); border-block: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.search {
  position: relative; display: flex; align-items: center; flex: 0 1 280px; min-width: 200px;
}
.search .i { position: absolute; left: 14px; color: var(--mist); pointer-events: none; }
.search input {
  width: 100%; min-height: 46px; padding: 0 14px 0 40px; border-radius: 13px;
  border: 1px solid var(--line-strong); background: rgba(234, 246, 251, 0.05);
  font-size: 0.97rem; transition: border-color 0.2s, background-color 0.2s;
}
.search input::placeholder { color: var(--mist); }
.search input:focus { outline: none; border-color: var(--aurora); background: rgba(234, 246, 251, 0.08); }
.search input::-webkit-search-cancel-button { filter: invert(1); opacity: 0.6; }
.chips, .toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.chip, .toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--frost);
  font-size: 0.9rem; font-weight: 550; transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.35s var(--ease-spring);
}
.chip:hover, .toggle:hover { color: var(--ice); border-color: rgba(234, 246, 251, 0.45); }
.chip:active, .toggle:active { transform: scale(0.94); transition-duration: 0.07s; }
.chip[aria-pressed='true'] { background: var(--ice); color: var(--night); border-color: var(--ice); }
.toggles { margin-left: auto; }
.toggle-dot { width: 26px; height: 16px; border-radius: 99px; background: rgba(234, 246, 251, 0.16); position: relative; transition: background-color 0.25s; }
.toggle-dot::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--frost); transition: transform 0.35s var(--ease-spring), background-color 0.25s; }
.toggle[aria-pressed='true'] { color: var(--ice); border-color: var(--aurora); }
.toggle[aria-pressed='true'] .toggle-dot { background: var(--aurora); }
.toggle[aria-pressed='true'] .toggle-dot::after { transform: translateX(10px); background: var(--night); }
.catalog-count { margin: 28px 0 22px; color: var(--mist); font-size: 0.92rem; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 4.4vw, 64px) clamp(18px, 2.2vw, 32px); }
.catalog-grid .card.is-entering { animation: card-in 0.45s var(--ease-out) both; }
.catalog-empty { display: grid; justify-items: start; gap: 18px; padding: 48px 0; color: var(--frost); font-size: 1.1rem; }
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (max-width: 1099px) { .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 699px) {
  .catalog-head { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: 1fr; }
  .catalog-controls { position: static; background: transparent; border: 0; padding-block: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .search { flex: 1 1 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); width: calc(100% + var(--gutter) * 2); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; min-height: 44px; }
  .toggles { margin-left: 0; }
  .toggle { min-height: 44px; }
}

/* ------------------------------------------------------------ game page */

.page-game { background: color-mix(in oklab, var(--tint) 42%, var(--night)); }
.g-hero {
  position: relative; isolation: isolate; overflow: clip;
  min-height: max(600px, min(94svh, 960px));
  display: grid; align-items: end;
  padding: calc(var(--header-h) + 40px) 0 clamp(44px, 7vw, 100px);
}
.g-hero-media { position: absolute; inset: 0; z-index: -2; background: var(--tint); view-transition-class: cover; }
.g-hero-media picture { display: block; width: 100%; height: 100%; }
.g-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
@media (max-width: 700px) { .g-hero-media img { object-position: var(--focus-m, var(--focus, 50% 50%)); } }
.g-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(0deg, color-mix(in oklab, var(--tint) 42%, var(--night)) 0%, color-mix(in oklab, color-mix(in oklab, var(--tint) 42%, var(--night)) 88%, transparent) 22%, transparent 62%),
    linear-gradient(90deg, rgba(5, 10, 22, 0.82) 0%, rgba(5, 10, 22, 0.42) 42%, rgba(5, 10, 22, 0) 70%),
    linear-gradient(180deg, rgba(5, 10, 22, 0.6) 0%, transparent 22%);
}
.g-hero-body { display: grid; gap: 14px; justify-items: start; }
.crumbs a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: var(--frost); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.crumbs a .i { transform: rotate(180deg); transition: transform 0.35s var(--ease-spring); }
.crumbs a:hover { color: var(--ice); }
.crumbs a:hover .i { transform: rotate(180deg) translateX(4px); }
.g-kicker { color: var(--accent); font-weight: 600; font-size: clamp(0.95rem, 1.2vw, 1.05rem); margin-top: 8px; }
.g-title {
  font-size: clamp(3.2rem, min(9vw, 15svh), 8.8rem); font-weight: 760; font-stretch: 84%;
  letter-spacing: -0.032em; line-height: 0.88; max-width: 12ch;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.35);
}
@media (max-width: 700px) {
  .g-hero { min-height: auto; padding-top: calc(var(--header-h) + clamp(190px, 40svh, 330px)); }
  .g-hero-media { inset: 0 0 auto; height: min(62svh, 520px); }
  .g-hero::before {
    background:
      linear-gradient(0deg, color-mix(in oklab, var(--tint) 42%, var(--night)) 0%, color-mix(in oklab, var(--tint) 42%, var(--night)) 38%, transparent 70%),
      linear-gradient(180deg, rgba(5, 10, 22, 0.6) 0%, transparent 24%);
  }
  .g-actions .btn { flex: 1 1 auto; }
}
.g-title--long { font-size: clamp(2.9rem, min(7.4vw, 13svh), 7.2rem); max-width: 14ch; }
.g-tagline { font-size: clamp(1.2rem, 2.1vw, 1.65rem); font-weight: 500; color: var(--ice); max-width: 32ch; }
.g-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.g-status { margin-top: 4px; }
html.js .page-game .g-hero-body > * { animation: rise 0.7s var(--ease-out) both; }
html.js .page-game .g-hero-body > :nth-child(2) { animation-delay: 0.05s; }
html.js .page-game .g-hero-body > :nth-child(3) { animation-delay: 0.1s; }
html.js .page-game .g-hero-body > :nth-child(4) { animation-delay: 0.16s; }
html.js .page-game .g-hero-body > :nth-child(5) { animation-delay: 0.22s; }
html.js .page-game .g-hero-body > :nth-child(6) { animation-delay: 0.26s; }

.g-intro { padding-top: clamp(56px, 7vw, 104px); }
.g-intro-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 104px); align-items: start; }
.g-lede { display: grid; gap: 20px; }
.g-lede p { color: var(--frost); font-size: 1.08rem; max-width: 38rem; }
.g-lede .g-lead { color: var(--ice); font: 500 clamp(1.45rem, 2.4vw, 2.15rem)/1.28 var(--display); letter-spacing: -0.012em; max-width: 30ch; }
.g-facts { padding: 26px 28px; border-radius: 22px; background: rgba(4, 11, 25, 0.42); border: 1px solid var(--line); }
.g-facts h2 { font: 600 0.92rem/1 var(--text); color: var(--mist); letter-spacing: 0.01em; margin-bottom: 8px; }
.g-facts dl > div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.g-facts dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.g-facts dt { color: var(--mist); font-size: 0.9rem; }
.g-facts dd { font-size: 0.97rem; line-height: 1.45; }
.g-facts dd a { color: var(--ice); text-decoration-color: var(--accent); }
.g-facts dd a:hover { color: var(--accent); }
@media (max-width: 899px) { .g-intro-grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .g-facts dl > div { grid-template-columns: 1fr; gap: 2px; } }

.g-gallery h2, .g-highlights h2, .player-head h2 {
  font-size: clamp(2.2rem, 4.6vw, 3.8rem); font-stretch: 84%; letter-spacing: -0.035em; margin-bottom: clamp(26px, 3.4vw, 44px);
}
.gal-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: clamp(150px, 15vw, 236px); grid-auto-flow: row dense;
  gap: clamp(10px, 1.2vw, 16px);
}
.gal-item { grid-column: span 2; min-width: 0; }
.gal-item--lead { grid-column: span 4; grid-row: span 2; }
.gal-item--w3 { grid-column: span 3; }
.gal-item--w6 { grid-column: span 6; }
.gal-grid--1 { grid-template-columns: 1fr; grid-auto-rows: auto; }
.gal-grid--1 .gal-item--lead { grid-column: auto; grid-row: auto; }
.gal-grid--1 .gal-btn { aspect-ratio: 16 / 8; }
.gal-grid--2 .gal-item:not(.gal-item--lead) { grid-row: span 2; }
.gal-btn {
  position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 16px; overflow: hidden;
  background: var(--tint); cursor: zoom-in;
  transition: transform 0.4s var(--ease-spring);
}
.gal-btn img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.55s var(--ease-out), filter 0.3s; }
.is-portrait .gal-btn img { object-position: 50% 30%; }
@media (max-width: 699px) {
  .gal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(104px, 27vw, 180px); }
  .gal-item, .gal-item--w3 { grid-column: span 1; }
  .gal-item--lead, .gal-item--w6 { grid-column: span 2; }
  .gal-grid--2 .gal-item:not(.gal-item--lead) { grid-column: span 2; grid-row: span 2; }
}
.gal-btn:hover img { transform: scale(1.04); filter: brightness(1.06); }
.gal-btn:active { transform: scale(0.985); transition-duration: 0.08s; }
.gal-btn::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); pointer-events: none; }
.gal-kind {
  position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 9px; background: rgba(4, 10, 22, 0.72); color: var(--ice);
  font-size: 0.78rem; font-weight: 600; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.gal-kind .i { width: 0.9em; height: 0.9em; color: var(--accent); }
img.is-pixel { image-rendering: pixelated; }

.hl-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: clamp(28px, 3vw, 44px) clamp(24px, 3vw, 48px); }
.hl-list li { position: relative; display: grid; gap: 8px; align-content: start; padding-top: 24px; }
.hl-list li::before {
  content: ''; position: absolute; top: 0; left: 0; width: 12px; height: 12px; border-radius: 3px;
  background: var(--accent); transform: rotate(45deg);
  box-shadow: 0 0 22px color-mix(in oklab, var(--accent) 65%, transparent);
}
.hl-list h3 { font-size: clamp(1.35rem, 1.9vw, 1.65rem); font-stretch: 90%; letter-spacing: -0.02em; }
.hl-list p { color: var(--frost); }

.player-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: clamp(20px, 2.6vw, 32px); }
.player-head h2 { margin-bottom: 0; }
.player-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.link-out { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--frost); font-size: 0.95rem; font-weight: 500; }
.link-out:hover { color: var(--ice); }
.player-stage {
  position: relative; display: grid; place-items: center; overflow: hidden;
  height: min(78svh, 860px); min-height: 420px; border-radius: 24px;
  background: #050a16; border: 1px solid var(--line);
}
.player-stage:fullscreen { height: 100dvh; border-radius: 0; border: 0; }
.player-poster { position: absolute; inset: 0; }
.player-poster img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.5) saturate(1.05); transform: scale(1.02); }
.player-start { position: relative; display: grid; justify-items: center; gap: 14px; padding: 24px; text-align: center; }
.player-start p { color: var(--frost); font-size: 0.92rem; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6); }
.player-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player-msg { margin-top: 10px; color: var(--frost); font-size: 0.92rem; min-height: 1.4em; }
@media (max-width: 699px) { .player-stage { height: 76svh; min-height: 380px; border-radius: 18px; } }

.g-howto-grid, .g-notes-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(24px, 6vw, 96px); align-items: start; }
.g-howto h2, .g-notes h2 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); font-stretch: 84%; letter-spacing: -0.035em; }
.g-howto-body { display: grid; gap: 24px; }
.g-howto-body > p, .g-notes p { color: var(--frost); font-size: 1.08rem; max-width: 40rem; }
.g-notes p + p { margin-top: 16px; }
.steps { display: grid; gap: 18px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: 16px; align-items: baseline; font-size: clamp(1.1rem, 1.6vw, 1.35rem); font-weight: 500; }
.steps li::before { content: counter(step); font: 760 clamp(2.2rem, 3.4vw, 3rem)/1 var(--display); font-stretch: 78%; color: var(--accent); }
.controls { width: 100%; max-width: 40rem; border-collapse: collapse; font-size: 0.97rem; }
.controls thead th { color: var(--mist); font-weight: 500; font-size: 0.86rem; text-align: left; padding: 0 0 10px; }
.controls tbody th, .controls td { padding: 11px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; font-weight: 400; }
.controls tbody th { width: 42%; padding-right: 16px; }
.controls kbd {
  display: inline-block; padding: 3px 9px; border-radius: 8px; background: rgba(234, 246, 251, 0.08);
  border: 1px solid var(--line-strong); border-bottom-width: 2px; font-size: 0.88rem; font-weight: 600; line-height: 1.4;
}
.controls td { color: var(--frost); }
@media (max-width: 799px) { .g-howto-grid, .g-notes-grid { grid-template-columns: 1fr; } }

.g-license { padding-block: clamp(40px, 5vw, 72px); }
.g-license-inner {
  display: grid; gap: 18px; justify-items: start;
  padding: clamp(32px, 5vw, 72px); border-radius: 30px;
  background:
    radial-gradient(80% 120% at 0% 0%, color-mix(in oklab, var(--accent) 26%, transparent), transparent 62%),
    radial-gradient(60% 90% at 100% 100%, color-mix(in oklab, var(--accent-2) 22%, transparent), transparent 70%),
    rgba(4, 11, 25, 0.6);
  border: 1px solid var(--line);
}
.g-license-inner h2 { font-size: clamp(2rem, 4.4vw, 3.8rem); font-stretch: 84%; letter-spacing: -0.035em; max-width: 18ch; }
.g-license-inner p { color: var(--frost); font-size: 1.08rem; max-width: 40rem; }
.g-license-inner .btn { margin-top: 8px; }

.g-next { padding-top: clamp(40px, 5vw, 72px); }
.next-card {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: clamp(20px, 4vw, 64px);
  text-decoration: none; border-radius: var(--radius);
}
.next-media {
  position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--tint);
  -webkit-mask: linear-gradient(225deg, transparent 0 var(--cut), #000 calc(var(--cut) + 0.5px));
  mask: linear-gradient(225deg, transparent 0 var(--cut), #000 calc(var(--cut) + 0.5px));
  view-transition-class: cover;
}
.next-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.next-card:hover .next-media img { transform: scale(1.05); }
.next-text { display: grid; gap: 10px; }
.next-label { color: var(--mist); font-weight: 500; }
.next-title { font: 740 clamp(2.4rem, 6vw, 5.4rem)/0.92 var(--display); font-stretch: 86%; letter-spacing: -0.03em; transition: color 0.25s; }
.next-card:hover .next-title { color: var(--accent); }
.next-sub { color: var(--accent); font-weight: 600; }
.g-all { margin-top: clamp(32px, 4vw, 56px); }
@media (max-width: 699px) { .next-card { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ 404 */

.notfound { padding: calc(var(--header-h) + 80px) 0 var(--section); }
.notfound .wrap { display: grid; gap: clamp(32px, 5vw, 72px); align-items: center; }
.nf-text { display: grid; gap: 18px; justify-items: start; }
.notfound.has-art .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); }
.nf-art { margin: 0; border-radius: 28px; overflow: hidden; box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--line); }
.nf-art img { display: block; width: 100%; height: auto; }
@media (max-width: 860px) { .notfound.has-art .wrap { grid-template-columns: 1fr; } }
.nf-code { font: 800 clamp(6rem, 22vw, 16rem)/0.8 var(--display); font-stretch: 75%; letter-spacing: -0.06em; color: transparent; background: linear-gradient(180deg, rgba(108, 196, 255, 0.55), rgba(234, 246, 251, 0.04) 92%); -webkit-background-clip: text; background-clip: text; }
.notfound h1 { font-size: clamp(2.4rem, 6vw, 5rem); font-stretch: 82%; letter-spacing: -0.04em; }
.notfound p { color: var(--frost); max-width: 36rem; }
.nf-alt { color: var(--mist) !important; font-size: 0.95rem; }

/* ------------------------------------------------------------ lightbox */

.lb { position: fixed; inset: 0; z-index: 150; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; color: var(--ice); }
.lb-backdrop { position: absolute; inset: 0; background: rgba(2, 6, 15, 0.97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity 0.34s var(--ease-out); }
.lb.is-open .lb-backdrop { opacity: var(--lb-fade, 1); }
.lb-top, .lb-bottom, .lb-nav { position: relative; z-index: 3; opacity: 0; transition: opacity 0.3s var(--ease-out) 0.08s; }
.lb.is-open .lb-top, .lb.is-open .lb-bottom, .lb.is-open .lb-nav { opacity: 1; }
.lb.is-dragging .lb-top, .lb.is-dragging .lb-bottom, .lb.is-dragging .lb-nav { opacity: 0.25; transition-duration: 0.15s; }
.lb-top { display: flex; align-items: center; gap: 12px; padding: max(12px, env(safe-area-inset-top)) var(--gutter) 10px; }
.lb-count { font: 600 0.92rem/1 var(--text); font-variant-numeric: tabular-nums; }
.lb-kind { color: var(--mist); font-size: 0.86rem; }
.lb-tools { display: flex; gap: 8px; margin-left: auto; }
.lb-icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: rgba(234, 246, 251, 0.06); color: var(--ice);
  transition: background-color 0.2s, transform 0.35s var(--ease-spring);
}
.lb-icon:hover { background: rgba(234, 246, 251, 0.14); }
.lb-icon:active { transform: scale(0.92); transition-duration: 0.07s; }
.lb-icon svg { width: 20px; height: 20px; }
.lb-stage { position: relative; z-index: 2; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.lb-frame { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.lb-frame > img, .lb-frame > video, .lb-frame > iframe { width: 100%; height: 100%; border: 0; border-radius: 10px; background: #000; }
.lb-frame > img { object-fit: contain; background: transparent; }
.lb-frame.is-zoomable { cursor: zoom-in; }
.lb-frame.is-zoomed { cursor: grab; }
.lb-frame.is-panning { cursor: grabbing; }
.lb-inner { width: 100%; height: 100%; transform-origin: 50% 50%; }
.lb-inner > img, .lb-inner > video, .lb-inner > iframe { width: 100%; height: 100%; display: block; border: 0; border-radius: 10px; }
.lb-inner > img { object-fit: contain; -webkit-user-drag: none; }
.lb-inner > video, .lb-inner > iframe { background: #000; }
.lb-inner.is-pixel > img { image-rendering: pixelated; }
.lb-state { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; pointer-events: none; }
.lb-spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(234, 246, 251, 0.16); border-top-color: var(--ice); animation: spin 0.8s linear infinite; }
.lb-error { display: grid; justify-items: center; gap: 14px; padding: 24px; text-align: center; pointer-events: auto; color: var(--frost); }
@keyframes spin { to { transform: rotate(360deg); } }
.lb-nav {
  position: absolute; top: 50%; z-index: 3; width: 56px; height: 56px; margin-top: -28px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line-strong); background: rgba(4, 10, 22, 0.62); color: var(--ice);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background-color 0.2s, transform 0.35s var(--ease-spring), opacity 0.3s;
}
.lb-nav:hover { background: rgba(234, 246, 251, 0.16); }
.lb-nav:active { transform: scale(0.9); transition-duration: 0.07s; }
.lb-nav svg { width: 22px; height: 22px; }
.lb-prev { left: max(12px, calc(var(--gutter) - 8px)); }
.lb-next { right: max(12px, calc(var(--gutter) - 8px)); }
.lb-bottom { display: grid; gap: 12px; padding: 10px var(--gutter) max(16px, env(safe-area-inset-bottom)); }
.lb-caption { max-width: 52rem; color: var(--frost); font-size: 0.97rem; min-height: 1.5em; }
.lb-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.lb-thumbs::-webkit-scrollbar { display: none; }
.lb-thumb {
  flex: none; width: 72px; height: 46px; padding: 0; border-radius: 9px; overflow: hidden; border: 0;
  background: var(--tint); opacity: 0.5; outline: 2px solid transparent; outline-offset: 2px;
  transition: opacity 0.2s, outline-color 0.2s;
}
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumb:hover { opacity: 0.85; }
.lb-thumb[aria-current='true'] { opacity: 1; outline-color: var(--ice); }
@media (max-width: 699px) {
  .lb-nav { top: auto; bottom: max(14px, env(safe-area-inset-bottom)); margin-top: 0; width: 52px; height: 52px; }
  .lb-prev { left: 14px; }
  .lb-next { right: 14px; }
  .lb-bottom { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .lb-thumb { width: 60px; height: 40px; }
}
@media (hover: none) { .lb-zoom { display: none; } }

/* ------------------------------------------------------------ view transitions */

@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 0.52s; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; }
::view-transition-old(*.cover), ::view-transition-new(*.cover) { height: 100%; width: 100%; object-fit: cover; overflow: hidden; }
::view-transition-group(site-header) { animation: none; z-index: 10; }

/* ------------------------------------------------------------ reduced motion */

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important;
  }
  .st-snow, .st-aurora { display: none; }
  .st-move, .st-word { transform: none !important; }
  .spot { transform: none !important; filter: none !important; }
  .marquee-track { transform: none !important; }
  .cursor, .spark { display: none !important; }
  html.js [data-split]:not(.is-in) .sw > span { transform: none; }
  html.js [data-reveal]:not(.is-in) { opacity: 1; transform: none; }
  .card-media { transform: none !important; }
  .lb-spinner { animation: none; border-top-color: rgba(234, 246, 251, 0.16); }
}

@media print {
  .site-header, .mobile-menu, .floe-wrap, .hero-scene, .g-player, .lb { display: none !important; }
  body, .page-game { background: #fff; color: #000; }
}

/* Magnetic buttons follow the pointer a little (values set by site.js). */
.btn[data-magnetic] { transform: translate(var(--mgx, 0px), var(--mgy, 0px)); }
.btn[data-magnetic]:hover { transform: translate(var(--mgx, 0px), calc(var(--mgy, 0px) - 2px)); }
.btn[data-magnetic]:active { transform: translate(var(--mgx, 0px), var(--mgy, 0px)) scale(0.955); }
