/* Visigence: the page's HTML layer over the WebGL cinema.
   A private screening room: near-black and graphite, hairline borders, one typeface (Inter) for everything the house
   says, and colour left to the games: each lends the featured panel its name's face and a single accent mark. */

@font-face { font-family: 'Inter'; src: url('../assets/fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('../assets/fonts/fredoka.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Libre Baskerville'; src: url('../assets/fonts/libre-baskerville.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Lilita One'; src: url('../assets/fonts/lilita-one.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Bebas Neue'; src: url('../assets/fonts/bebas-neue.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../assets/fonts/jetbrains-mono.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Oswald'; src: url('../assets/fonts/oswald.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  /* surfaces */
  --bg: #030304;
  --surface: rgba(18, 18, 21, .72);
  --surface-solid: #111114;
  --raise: rgba(255, 255, 255, .045);
  --raise-hover: rgba(255, 255, 255, .075);
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  /* ink */
  --ink: #f3f3f4;
  --ink-2: rgba(243, 243, 244, .78);
  --ink-3: rgba(243, 243, 244, .56);
  --ink-4: rgba(243, 243, 244, .38);
  /* type */
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --gallery-h: 116px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--sans);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  font-optical-sizing: auto;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; }
img { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 50; padding: 8px 12px; border-radius: 8px;
  background: var(--ink); color: #0b0b0c; font-size: 13px; font-weight: 500; text-decoration: none; transition: top .2s var(--ease);
}
.skip:focus { top: 16px; }

:focus-visible { outline: 2px solid #63d8ff; outline-offset: 2px; }

/* ------------------------------------------------------------------------------------------------ the stage */

.stage { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; }
.stage.is-hot { cursor: pointer; }
.stage.is-dragging { cursor: grabbing; }
.is-inside .stage { cursor: grab; }
.is-inside .stage.is-hot { cursor: pointer; }

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

.marquee {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(20px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
  pointer-events: none; opacity: 0; transition: opacity 1.2s var(--ease) .4s;
}
.is-ready .marquee { opacity: 1; }
.is-ready .marquee > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; line-height: 1; }
/* The studio's own lockup (visigence.com's header): the mark and the wordmark, lit. */
.brand__lockup { display: block; height: 40px; width: auto; opacity: .92; transition: opacity .3s var(--ease); }
.brand:hover .brand__lockup { opacity: 1; }
.is-tall .brand__lockup { height: 32px; }

.ctl {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .025); color: var(--ink-3);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.ctl:hover { color: var(--ink); border-color: var(--line-strong); background: var(--raise); }
.ctl[aria-pressed='true'] { color: var(--ink); }
.ctl svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ctl[aria-pressed='false'] .ctl__waves { display: none; }
.ctl[aria-pressed='true'] .ctl__mute { display: none; }

/* ------------------------------------------------------------------------------------------------ the featured panel */

/* On wide screens the panel is mapped onto the left of the curved screen (a matrix3d from the theater), sized to its
   projected size; every measure inside follows the panel's height (--panel-h). */
.feature {
  --accent: #ffffff;
  --u: calc(var(--panel-h, 420px) / 100);
  position: fixed; left: 0; top: 0; z-index: 10;
  transform-origin: 0 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--u) * 4) calc(var(--u) * 5);
  color: var(--ink);
  outline: none;
  opacity: 0;
  transition: opacity .9s var(--ease);
  pointer-events: none;
}
.is-ready .feature { opacity: 1; pointer-events: auto; }
.is-inside .feature { opacity: 0; pointer-events: none; transition-duration: .4s; }

.feature__card { display: flex; flex-direction: column; max-width: 100%; }
.feature__card > * { animation: enter .55s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 32ms + 80ms); }
.feature__card.is-leaving > * { animation: leave .22s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }
@keyframes leave { to { opacity: 0; } }

/* the rhythm: a small eyebrow, the name, its line, then the reading text and what to do, each block a step apart */
.feature__now {
  display: flex; align-items: center; gap: 8px; margin: 0 0 calc(var(--u) * 3.2);
  font-size: clamp(11px, calc(var(--u) * 2.75), 12.5px); font-weight: 500; color: var(--ink-4); letter-spacing: .005em;
}
.feature__count { font-variant-numeric: tabular-nums; color: var(--ink-3); }
.feature__count::before { content: ''; display: inline-block; width: 1px; height: .9em; margin: 0 8px 0 0; vertical-align: -.1em; background: var(--line-strong); }

.feature__kicker {
  display: flex; align-items: center; gap: 8px; margin: 0 0 calc(var(--u) * 1.6);
  font-size: clamp(11.5px, calc(var(--u) * 2.9), 13px); font-weight: 500; color: var(--ink-3); letter-spacing: -.005em;
}
.feature__kicker::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }

.feature__brand {
  margin: 0; line-height: 1; font-weight: 600; letter-spacing: -.035em; color: var(--ink);
  font-size: clamp(28px, calc(var(--u) * 10.5), 60px); text-wrap: balance;
}
.feature__brand img { height: calc(var(--u) * 18); width: auto; max-width: 88%; object-fit: contain; object-position: left center; }
.feature__brand.has-wordmark { line-height: 0; }
/* the game's name in its own face, set plainly */
.font-serif .feature__brand { font-family: 'Libre Baskerville', Georgia, serif; font-weight: 700; letter-spacing: -.025em; font-size: clamp(25px, calc(var(--u) * 9.4), 54px); }
.font-round .feature__brand { font-family: 'Fredoka', var(--sans); font-weight: 600; letter-spacing: -.015em; }
.font-chunky .feature__brand { font-family: 'Lilita One', var(--sans); font-weight: 400; letter-spacing: 0; }
.font-condensed .feature__brand { font-family: 'Oswald', var(--sans); font-weight: 600; letter-spacing: .01em; text-transform: uppercase; }

.feature__tagline {
  margin: calc(var(--u) * 1.8) 0 0; font-weight: 500; letter-spacing: -.018em; line-height: 1.25; color: var(--ink-2);
  font-size: clamp(15px, calc(var(--u) * 4.6), 22px); text-wrap: balance;
}
.feature__desc {
  margin: calc(var(--u) * 3.4) 0 0; max-width: 31em; color: var(--ink-3); line-height: 1.6; letter-spacing: -.003em;
  font-size: clamp(12.5px, calc(var(--u) * 3.3), 15px); text-wrap: pretty;
}

.feature__facts {
  display: flex; flex-wrap: wrap; align-items: center; margin: calc(var(--u) * 3) 0 0; padding: 0; list-style: none;
  font-size: clamp(11.5px, calc(var(--u) * 2.85), 13px); font-weight: 500; color: var(--ink-2); letter-spacing: -.005em;
  font-variant-numeric: tabular-nums;
}
.feature__facts li { display: inline-flex; align-items: center; }
.feature__facts li + li::before { content: ''; width: 1px; height: 12px; margin: 0 12px; background: var(--line-strong); }

.feature__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: calc(var(--u) * 4.6) 0 0; }
.feature__live {
  display: flex; align-items: center; gap: 8px; margin: calc(var(--u) * 2.6) 0 0; min-height: 1.3em;
  font-size: clamp(11.5px, calc(var(--u) * 2.8), 12.5px); font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.feature__live::before { content: ''; flex: none; width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); }
.feature__live:empty { display: none; }
.feature__status { margin: calc(var(--u) * 1.4) 0 0; font-size: clamp(11px, calc(var(--u) * 2.6), 12px); color: var(--ink-4); }
.feature__status:empty { display: none; }

.is-compact .feature__facts, .is-compact .feature__now { display: none; }
.is-compact .feature__desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.is-tiny .feature__desc, .is-tiny .feature__status { display: none; }

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

.btn {
  --btn-h: clamp(32px, calc(var(--u, 4.2px) * 8.6), 38px);
  display: inline-flex; align-items: center; gap: 8px; height: var(--btn-h); padding: 0 calc(var(--btn-h) * .38);
  border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  font-size: clamp(12.5px, calc(var(--u, 4.2px) * 3.2), 13.5px); font-weight: 500; letter-spacing: -.008em;
  transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), opacity .18s var(--ease);
}
.btn svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* The studio's call to action (visigence.com): signal blue at rest, lit from its top edge, the hot cyan under the hand. */
.btn--primary { color: #02050c; font-weight: 600; background: linear-gradient(180deg, #6aa6ff 0%, #3b86ff 46%, #2f74ea 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 10px 32px -16px rgba(59, 134, 255, .8); }
.btn--primary:hover { background: linear-gradient(180deg, #a6ecff 0%, #63d8ff 52%, #4fc4f2 100%); }
.btn--secondary { color: var(--ink); background: var(--raise); border-color: var(--line-strong); }
.btn--secondary:hover { background: var(--raise-hover); border-color: rgba(255, 255, 255, .22); }
.btn--link { color: var(--ink-3); padding: 0 6px; }
.btn--link:hover { color: var(--ink); }
.btn:active { opacity: .86; }
.btn[aria-disabled='true'] { opacity: .45; cursor: progress; }
.btn[hidden] { display: none; }
.btn kbd {
  font: inherit; font-size: 11px; line-height: 1; padding: 3px 5px; border-radius: 4px; margin-left: 2px;
  color: inherit; opacity: .6; border: 1px solid currentColor;
}

/* ------------------------------------------------------------------------------------------------ the game selector */

.gallery {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; height: var(--gallery-h);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 16px max(20px, env(safe-area-inset-bottom));
  opacity: 0; transform: translateY(8px);
  transition: opacity 1s var(--ease) .3s, transform 1s var(--ease-out) .3s;
  pointer-events: none;
}
.is-ready .gallery { opacity: 1; transform: none; pointer-events: auto; }
.is-inside .gallery { opacity: 0; transform: translateY(8px); pointer-events: none; transition-delay: 0s; transition-duration: .4s; }

.gallery__track {
  position: relative; display: flex; gap: 2px; padding: 4px; max-width: 100%;
  border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(24px) saturate(1.2); -webkit-backdrop-filter: blur(24px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 24px 48px -16px rgba(0, 0, 0, .7);
}

/* the highlight under the selected game, gliding between them; its fine base line takes the game's accent */
.gallery__indicator {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 10px; pointer-events: none;
  background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  transition: transform .5s var(--ease-out), width .5s var(--ease-out);
}
.gallery__indicator::after {
  content: ''; position: absolute; left: 50%; bottom: 5px; width: 14px; height: 2px; margin-left: -7px; border-radius: 1px;
  background: color-mix(in srgb, var(--accent, #fff) 55%, #ffffff);
  transition: background .5s var(--ease);
}
.gallery__indicator.is-still { transition: none; }

.tab {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 100px; padding: 10px 6px 14px; margin: 0; border: 0; border-radius: 10px; background: none; cursor: pointer;
  color: var(--ink-4);
  transition: color .25s var(--ease), background .25s var(--ease);
}
.tab__icon {
  width: 40px; height: 40px; border-radius: 10px; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 4px 12px rgba(0, 0, 0, .4);
  opacity: .55; filter: saturate(.55);
  transition: opacity .3s var(--ease), filter .3s var(--ease), transform .4s var(--ease-out);
}
.tab__name {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; font-weight: 500; letter-spacing: -.005em; line-height: 1;
}
.tab:hover { color: var(--ink-2); background: rgba(255, 255, 255, .025); }
.tab:hover .tab__icon { opacity: .85; filter: saturate(.85); }
.tab[aria-selected='true'] { color: var(--ink); background: none; }
.tab[aria-selected='true'] .tab__icon { opacity: 1; filter: none; }
.tab:focus-visible { outline: none; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .6); }

/* ------------------------------------------------------------------------------------------------ inside the screen */

.inside {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 14; display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 0 16px max(24px, env(safe-area-inset-bottom)); pointer-events: none;
  animation: fade-in .8s var(--ease) .4s both;
}
.inside[hidden] { display: none; }
.inside > * { pointer-events: auto; }
.inside__hint {
  margin: 0; padding: 6px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 450; color: var(--ink-2);
  background: rgba(10, 10, 12, .62); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.inside__actions {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; padding: 4px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
.inside .btn { --btn-h: 34px; }
.is-inside .marquee { opacity: .3; transition-delay: 0s; }
.is-inside .marquee:hover, .is-inside .marquee:focus-within { opacity: 1; }
@keyframes fade-in { from { opacity: 0; } }

/* ------------------------------------------------------------------------------------------------ the opening */

/* While the files load the page is black with a fine line of light; the opening then fades up from black in WebGL. */
.curtain {
  position: fixed; inset: 0; z-index: 40; display: grid; place-content: center; justify-items: center;
  background: #000;
  transition: opacity .5s var(--ease), visibility 0s .5s;
}
.curtain__line { position: relative; width: 96px; height: 1px; overflow: hidden; background: var(--line); }
.curtain__line::after {
  content: ''; position: absolute; inset: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
  animation: scan 1.6s var(--ease) infinite;
}
.is-started .curtain { opacity: 0; visibility: hidden; }

.skip-intro {
  position: fixed; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); z-index: 30;
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .12); background: rgba(0, 0, 0, .35); color: rgba(243, 243, 244, .6);
  font-size: 12.5px; font-weight: 500; letter-spacing: .02em;
  animation: fade-in 1s var(--ease) 1.6s both;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.skip-intro:hover { color: var(--ink); border-color: rgba(255, 255, 255, .28); }
.skip-intro[hidden] { display: none; }
.skip-intro kbd { font: inherit; font-size: 10.5px; line-height: 1; padding: 3px 5px; border-radius: 4px; border: 1px solid currentColor; opacity: .6; }
.is-opening .stage { cursor: default; }
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ------------------------------------------------------------------------------------------------ without WebGL */

.still { display: none; }
.no-gl .stage { display: none; }
.no-gl .still {
  display: block; position: fixed; inset: 0;
  background: radial-gradient(80% 50% at 50% 40%, #121215, var(--bg) 70%);
}
.no-gl .still__screen {
  position: absolute; left: 50%; top: 43%; width: min(94vw, 1500px); aspect-ratio: 3.8; transform: translate(-50%, -50%);
  border-radius: 4px; overflow: hidden; outline: 1px solid var(--line);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .8);
}
.no-gl .still__poster { width: 100%; height: 100%; object-fit: cover; transition: opacity .6s var(--ease); }
.no-gl .still__screen::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3, 3, 4, .94) 0%, rgba(3, 3, 4, .88) 34%, rgba(3, 3, 4, 0) 58%); }
.no-gl .feature { transform: none !important; }
/* wide screens without WebGL: the panel sits on the left of the still screen, as it does on the live one */
.no-gl:not(.is-tall) .feature {
  --u: clamp(3px, .28vw, 4.4px);
  left: calc(50% - min(47vw, 750px) + 3vw); top: 43%; transform: translateY(-50%) !important;
  width: min(33vw, 460px); height: auto; padding: 0;
}
.no-gl:not(.is-tall) .still__screen { top: 41%; }

/* ------------------------------------------------------------------------------------------------ narrow screens */

/* Portrait: the screen fills the top of the view; the panel becomes a card above the selector, which scrolls. */
.is-tall { --gallery-h: 104px; }
.is-tall .marquee { padding-top: max(16px, env(safe-area-inset-top)); }
.is-tall .feature {
  --u: 4px;
  left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); top: auto; bottom: calc(var(--gallery-h) + 4px);
  width: auto !important; height: auto !important; max-height: calc(58vh - var(--gallery-h)); overflow: auto;
  padding: 18px 18px 18px; border-radius: 14px;
  background: rgba(14, 14, 17, .86); border: 1px solid var(--line);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .7);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
.is-tall .feature__brand img { height: 48px; }
.is-tall .feature__now { display: none; }
.is-tall .feature__desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.is-tall .gallery { padding: 0 12px max(12px, env(safe-area-inset-bottom)); }
.is-tall .gallery__track { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.is-tall .gallery__track::-webkit-scrollbar { display: none; }
.is-tall .tab { width: 76px; flex: none; scroll-snap-align: center; padding: 8px 4px 13px; gap: 7px; }
.is-tall .tab__icon { width: 36px; height: 36px; border-radius: 9px; }
.is-tall .tab__name { font-size: 11px; }

@media (max-width: 960px) and (min-aspect-ratio: 1/1) {
  .tab { width: 84px; }
  .tab__name { font-size: 11px; }
}

@media (max-height: 560px) and (min-aspect-ratio: 1/1) {
  :root { --gallery-h: 96px; }
  .tab { width: 80px; padding: 8px 4px 12px; gap: 6px; }
  .tab__icon { width: 32px; height: 32px; border-radius: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

.noscript { position: fixed; inset: 0; z-index: 60; overflow: auto; padding: 40px 24px; background: var(--bg); font-size: 15px; line-height: 1.6; }
.noscript a { color: var(--ink); }
