﻿/* style.css: DOM World. The page has two layouts:
   - the ride (html.world-on): the 3D city fills the screen, the page scrolls through .run, and each landmark's
     tag is pinned next to its thing in the world (main.js moves them).
   - the plain page (no JavaScript, or html.no-world when the 3D world can not start): the same content in a
     normal column over a night gradient. html.late-world fades the city in behind it if it arrives late.
   COLOURS AND SIZES: the variables right below. */
@font-face { font-family: 'Anton'; src: url(fonts/anton-latin-400-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Inter'; src: url(fonts/inter-latin-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #07060c;
  --panel: rgba(9, 9, 15, .9);   /* the tags' black (see-through where the browser can dim what is behind) */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");   /* film grain on the black panels */
  --grain-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.1 0 0 0 -.45'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");   /* film grain on the green */
  --grain-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 -1.05 0 0 0 1.42'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");   /* grain in text: specks of each letter fade a little */
  --line: rgba(255, 255, 255, .16);
  --text: #f4f3f8;
  --soft: #c9c7d6;
  --accent: #39ff14;          /* neon green: buttons, the rail, the bar */
  --accent-ink: #0b0b10;
  --chip: #7cf3ff;            /* "Coming soon" chips */
  --display: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --tag-w: 330px;
  --run: 1400vh;              /* how long the ride is: more = slower */
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--body); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100%; overflow-x: hidden; background: var(--bg); }
a { color: inherit; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip { position: fixed; left: 12px; top: 12px; z-index: 50; padding: 10px 14px; background: var(--grain-ink), var(--accent); color: var(--accent-ink); font-weight: 700; border-radius: 6px; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* ---------- shared pieces ---------- */
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; letter-spacing: .01em; text-transform: uppercase; line-height: .95; }
.btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 10px 16px; border: 0; border-radius: 4px; background: var(--grain-ink), var(--accent); color: var(--accent-ink); font-weight: 750; font-size: 15px; text-decoration: none; cursor: pointer; transition: transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.chip { display: inline-block; padding: 5px 9px; border: 1.5px solid var(--chip); border-radius: 3px; color: var(--chip); font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
/* the trademark mark after brand names (added by build.js), in the plain font (its ™ is already a small raised
   glyph); in the big display headings, where it would be huge, it is scaled down and raised */
.tm { font-family: var(--body); font-weight: 600; letter-spacing: 0; text-transform: none; }
h1 .tm, h2 .tm, h3 .tm { font-size: .42em; font-weight: 700; vertical-align: super; line-height: 0; margin-left: .06em; }
/* a studio's games (313 Games): one row each, name, status chip, play link */
.games { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.games li { display: grid; grid-template-columns: minmax(0, 1fr) auto 4.6em; align-items: center; gap: 10px; }   /* one line per game */
.games .game { font-weight: 750; font-size: 16px; color: var(--text); white-space: nowrap; }
.games .chip { justify-self: start; }
.games .chip:last-child { grid-column: 2 / 4; }   /* no Play link (coming soon): the chip takes the button's place too */
.btn.small { min-height: 34px; padding: 5px 10px; font-size: 14px; justify-content: center; }
.tag h2 { font-size: 34px; }
.tag p { margin: 10px 0 0; color: var(--soft); font-size: 15px; }
.more { margin-top: 12px; font-size: 14px; color: var(--soft); }
.more summary { cursor: pointer; font-weight: 700; color: var(--text); min-height: 32px; display: flex; align-items: center; }
.more ul { margin: 6px 0 0; padding-left: 18px; }
.more li + li { margin-top: 4px; }
.end h3 { font-size: 20px; margin-top: 18px; color: var(--text); }
.soon { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; }
.soon li { padding: 4px 8px; border: 1px solid var(--line); border-radius: 3px; font-size: 13px; font-weight: 650; color: var(--soft); }
.btn.mail { margin-top: 10px; word-break: break-all; }
.socials { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; }
.socials a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px; border: 1.5px solid rgba(255, 255, 255, .5); border-radius: 4px; background: rgba(7, 6, 12, .55); text-decoration: none; font-weight: 650; font-size: 14px; }
.socials a:hover { border-color: var(--accent); }
.socials.small { margin-top: 14px; }
.socials.small a { min-height: 40px; padding: 6px 10px; font-size: 13px; }
.roles { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 0; padding: 0; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #e2e0ee; }
.roles li::before { content: '/ '; color: var(--accent); }
.note { font-size: 13px; color: var(--soft); margin: 14px 0 0; }
.note a { color: var(--text); }

/* the hero: the name over the rooftop */
.hero h1 { display: flex; flex-direction: column; }
.h1-big { font-size: clamp(64px, 9vw, 138px); line-height: .86; letter-spacing: .005em; }
.h1-big + .h1-big { margin-top: .09em; }   /* a little air between DOMINIK and MALEGA */
.lede { margin: 14px 0 0; font-size: clamp(16px, 1.5vw, 19px); color: #f0eef8; max-width: 30em; }
.cue { margin: 26px 0 0; font-size: 12px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); }

/* the videos */
.videos-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.videos h2 { font-size: 40px; }
.videos-sub { margin: 8px 0 0; color: var(--soft); }
.vids { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 18px 0 0; padding: 0; }
.vid { min-width: 0; }
.vid-play { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 4px; overflow: hidden; background: #000; cursor: pointer; }
.vid-play img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.1); }
.vid-play::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px); pointer-events: none; }
.vid-views, .vid-on { position: absolute; z-index: 1; padding: 3px 6px; font-size: 11px; font-weight: 800; background: rgba(0, 0, 0, .78); border-radius: 3px; }
.vid-views { left: 6px; bottom: 6px; }
.vid-on { right: 6px; top: 6px; color: var(--accent); }
.vid .frame { position: relative; width: 100%; aspect-ratio: 9 / 16; max-height: 70vh; border-radius: 4px; overflow: hidden; background: #000; }
.vid .frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid-title { margin: 8px 0 0; font-size: 14px; font-weight: 650; line-height: 1.35; }
.vid-link { display: inline-block; margin-top: 4px; font-size: 13px; color: var(--soft); min-height: 24px; }
.x { width: 44px; height: 44px; border: 1.5px solid var(--line); border-radius: 4px; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; }
.x:hover { border-color: var(--accent); }

/* ---------- the plain page (no JavaScript, or the world could not start) ---------- */
.loader, .rail, .radio-hot, #world { display: none; }
html:not(.js) body, html.no-world body {
  background: radial-gradient(120% 70% at 50% 0%, #3a1f3a 0%, #17122a 45%, #07060c 100%) fixed;
}
html:not(.js) main, html.no-world main { max-width: 760px; margin: 0 auto; padding: 56px 20px 40px; display: grid; gap: 22px; }
html:not(.js) .tag, html.no-world .tag, html:not(.js) .videos-box, html.no-world .videos-box { padding: 22px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; }
html:not(.js) .tag, html.no-world .tag { position: relative; border-left: 0; padding-left: 25px; }
html:not(.js) .run, html.no-world .run { display: none; }
html:not(.js) .x, html.no-world .x { display: none; }
html:not(.js) .cue, html.no-world .cue { display: none; }
html:not(.js) .foot, html.no-world .foot { text-align: center; padding: 10px 20px 40px; color: var(--soft); font-size: 14px; }
html.late-world #world { display: block; position: fixed; inset: 0; width: 100vw; height: 100lvh; z-index: -1; opacity: .55; transition: opacity 2s; }

/* ---------- the ride ---------- */
html.js:not(.no-world) #world { display: block; position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 0; }
html.js:not(.no-world) .run { height: calc(var(--run) + var(--tail, 0px)); }   /* the ride, then the tail (state.js) */
html.js:not(.no-world) main { position: fixed; inset: 0; z-index: 2; pointer-events: none; outline: 0; }
html.js:not(.no-world) .foot { position: fixed; left: 0; right: 0; bottom: calc(10px + var(--safe-b)); z-index: 3; text-align: center; font-size: 13px; color: var(--soft); opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s; text-shadow: 0 1px 6px #000; }
html.at-end .foot { opacity: 1 !important; visibility: visible !important; }
html.in-tail .rail { opacity: 0; visibility: hidden; }   /* the very end: just the room and its posters */

/* the hero */
html.js:not(.no-world) .hero { position: fixed; left: clamp(20px, 5vw, 72px); bottom: clamp(56px, 12vh, 120px); max-width: min(640px, 70vw); pointer-events: auto; transition: opacity .35s; }

/* the tags: pinned next to their landmark (desktop), docked at the bottom (phones) */
html.js:not(.no-world) .tag {
  position: fixed; left: 0; top: 0; width: var(--tag-w); padding: 18px 20px 20px 23px;
  background: var(--grain), var(--panel); border: 1px solid var(--line); border-left: 0; border-radius: 4px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  opacity: 0; visibility: hidden; pointer-events: auto; will-change: transform, opacity;
}
/* see-through panels: the city shows behind them, dimmed a little so the words always read */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  html.js:not(.no-world) .tag { --panel: rgba(9, 9, 15, .5); -webkit-backdrop-filter: blur(1.5px) brightness(.6); backdrop-filter: blur(1.5px) brightness(.6); }
}
html.js:not(.no-world) .tag.on { visibility: visible; }
/* the green bar down the left of every tag, grainy like the buttons */
.tag::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 4px 0 0 4px; background: var(--grain-ink), var(--accent); }
.pin, .lead { position: fixed; left: 0; top: 0; z-index: 1; pointer-events: none; opacity: 0; }
.pin { width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid var(--accent); border-radius: 50%; box-shadow: 0 0 0 4px rgba(0, 0, 0, .35), 0 0 14px var(--accent); }
.pin::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--grain-ink), var(--accent); }
.lead { height: 2px; background: var(--grain-ink), linear-gradient(90deg, var(--accent), rgba(57, 255, 20, .2)); transform-origin: 0 50%; }
html.js:not(.no-world) .end { --tag-w: 380px; }

/* the videos: a window over the ride */
html.js:not(.no-world) .videos { position: fixed; inset: 0; z-index: 20; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(3, 3, 6, .8); pointer-events: auto; outline: 0; }
html.js:not(.no-world) .videos.open { display: flex; }
html.js:not(.no-world) .videos-box { width: min(980px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 24px; background: #0c0b13; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 6px; }

/* the rail: where you are on the ride, and buttons to jump */
html.js:not(.no-world) .rail { display: block; position: fixed; right: 14px; top: 50%; z-index: 4; transform: translateY(-50%); transition: opacity .45s, visibility .45s; }
.rail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; position: relative; }
.rail ol::before { content: ''; position: absolute; right: 21px; top: 22px; bottom: 22px; width: 2px; background: rgba(255, 255, 255, .25); }
.rail ol::after { content: ''; position: absolute; right: 21px; top: 22px; width: 2px; height: calc((100% - 44px) * var(--p, 0)); background: var(--grain-ink), var(--accent); }
.rail button { position: relative; display: flex; align-items: center; justify-content: flex-end; width: 44px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; }
.rail button::after { content: ''; position: relative; right: 15px; width: 10px; height: 10px; border-radius: 50%; background: #2a2833; border: 2px solid rgba(255, 255, 255, .7); }
.rail button.passed::after { background: var(--grain-ink), var(--accent); border-color: var(--accent); }
.rail button.here::after { width: 14px; height: 14px; right: 13px; box-shadow: 0 0 12px var(--accent); }
.rail span { position: absolute; right: 44px; white-space: nowrap; padding: 4px 8px; font-size: 12px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; background: rgba(9, 9, 15, .92); border-radius: 3px; opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .2s; pointer-events: none; }
.rail button:hover span, .rail button:focus-visible span, .rail button.here span { opacity: 1; transform: none; }

/* the radio easter egg */
html.js:not(.no-world) .radio-hot:not([hidden]) { display: block; position: fixed; left: 0; top: 0; z-index: 3; width: 48px; height: 48px; margin: -24px 0 0 -24px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.radio-hot i { position: absolute; inset: 12px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 0 10px rgba(255, 255, 255, .6); animation: ping 2.4s ease-out infinite; }
.radio-hot::after { content: '♪'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 18px; font-weight: 800; color: #fff; text-shadow: 0 0 6px #000, 0 0 12px #000; }
.radio-hot.playing i { border-color: var(--accent); }
@keyframes ping { 0% { transform: scale(.7); opacity: 1; } 80%, 100% { transform: scale(1.6); opacity: 0; } }

/* the loading screen */
html.js .loader { display: grid; position: fixed; inset: 0; z-index: 30; place-items: center; background: #050409; transition: opacity .9s, visibility .9s; }
html.loaded .loader { opacity: 0; visibility: hidden; }
.loader-in { width: min(440px, calc(100vw - 48px)); text-align: center; }
.loader-logo { margin: 0; font-family: var(--display); font-size: clamp(64px, 17vw, 104px); line-height: .88; letter-spacing: .01em; text-transform: uppercase; color: #fff; text-shadow: 0 0 30px rgba(57, 255, 20, .25); }
.loader-logo span { display: block; }
.loader-what { margin: 14px 0 0; font-size: 13px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; color: var(--soft); }
.dots::after { content: ''; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.bar { position: relative; height: 12px; margin-top: 18px; border: 2px solid rgba(255, 255, 255, .8); border-radius: 2px; overflow: hidden; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--load, 0) * 100%); background: var(--grain-ink), repeating-linear-gradient(90deg, var(--accent) 0 10px, #24b80c 10px 12px); transition: width .3s; }
.loader-tip { margin: 16px 0 0; font-size: 13px; color: #a9a6ba; }

/* ---------- phones ---------- */
@media (max-width: 640px) {
  :root { --tag-w: auto; --run: 1500vh; }
  .tag h2 { font-size: 28px; }
  .tag p { font-size: 14px; }
  html.js:not(.no-world) .hero { left: 18px; right: 58px; top: calc(28px + env(safe-area-inset-top, 0px)); bottom: auto; max-width: none; }   /* over the sky, leaving the roof (and the radio) clear */
  .h1-big { font-size: 74px; }
  html.js:not(.no-world) .tag { left: 12px !important; right: 58px; top: auto !important; bottom: calc(14px + var(--safe-b)); width: auto; padding: 14px 16px 16px 19px; transform: none !important; }
  html.js:not(.no-world) .end { right: 58px; max-height: 64vh; overflow: auto; }
  .lead { display: none; }
  html.js:not(.no-world) .rail { right: 4px; }
  .rail button { height: 26px; }
  .rail span { display: none; }
  .vids { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  html:not(.js) main, html.no-world main { padding-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .radio-hot i, .dots::after { animation: none; }
  .btn, .rail span, .loader, .foot { transition: none; }
}

/* grain in the coloured and display type: headings, the blue chips (text and border), the green cue and slashes.
   Body text, descriptions and the small print stay clean. */
h2, h3, .chip, .cue, .roles li::before { -webkit-mask-image: var(--grain-mask); mask-image: var(--grain-mask); -webkit-mask-size: 120px 120px; mask-size: 120px 120px; }

/* TV static inside DOMINIK MALEGA (frames made by main.js), looping at 12 frames a second, PS2-sized pixels */
html.has-static .h1-big, html.has-static .loader-logo span {
  background: var(--static) 0 0 / var(--static-w) var(--static-h) repeat; image-rendering: pixelated;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: none;
  animation: tvstatic 1s steps(12) infinite;
}
html.has-static .loader-logo { text-shadow: none; filter: drop-shadow(0 0 22px rgba(57, 255, 20, .22)); }
@keyframes tvstatic { to { background-position: 0 calc(-1 * var(--static-h)); } }
@media (prefers-reduced-motion: reduce) { html.has-static .h1-big, html.has-static .loader-logo span { animation: none; } }
