/* ==================================================================== *
 * Shared: reset, the 3D canvas, the language switch, transitions, project mockups.
 * Each world owns its look in its own stylesheet, scoped by
 * html[data-world="..."].
 * ==================================================================== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
/* no scrollbar anywhere: the page still scrolls with the wheel, touch and keys */
html, body, * { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar, *::-webkit-scrollbar { display: none; width: 0; height: 0; }
body {
  margin: 0; min-height: 100vh; background: #04050a; color: #fff;
  font: 400 16px/1.55 Onest, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.is-intro { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; touch-action: pan-y; }
body.gl-off #gl { visibility: hidden; }
#world { position: relative; z-index: 2; }

/* ---------- LV / EN / RU: each world puts it in its own header and styles it ---------- */
.wl { display: flex; align-items: center; flex: none; }
.wl button { min-width: 34px; min-height: 36px; padding: 6px 7px; font: inherit; color: inherit; opacity: .5; transition: opacity .2s; }
.wl button:hover { opacity: .85; }
.wl button[aria-pressed="true"] { opacity: 1; cursor: default; }
@media (max-width: 700px) {
  .bz-top .bz-logo, .su-top .su-logo, .tg-top .tg-logo, .mm-top .mm-home { font-size: 20px; }
}

/* ---------- transitions ---------- */
.iris { position: fixed; inset: 0; z-index: 90; pointer-events: none; visibility: hidden; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 95; transform: translate(-50%, 30px);
  padding: 12px 18px; border-radius: 12px; background: #111; color: #fff; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .35s cubic-bezier(.2,.9,.3,1.2);
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- drawn mockups, shown until a project has a real screenshot ---------- */
.mock { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; --c: #888; font-family: Onest, sans-serif; }
.cv-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }

.mock-browser { background: #fff; color: #111; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.mk-bar { display: flex; align-items: center; gap: 5px; height: 9%; min-height: 14px; padding: 0 3%; background: #eceae6; }
.mk-bar i { width: 7px; height: 7px; border-radius: 50%; background: #d3d0ca; flex: none; }
.mk-bar span { margin-left: 4%; flex: 1; height: 50%; max-width: 48%; border-radius: 99px; background: #fff; }
.mk-page { position: absolute; inset: 9% 0 0 0; padding: 5% 6%; display: grid; grid-template-columns: 1.1fr .9fr; gap: 6%; align-content: start; }
.mk-page h5 { margin: 0 0 6%; font-size: clamp(11px, 2.1vw, 22px); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; }
.mk-line { height: 5px; border-radius: 3px; background: rgba(0,0,0,.12); margin-bottom: 5px; }
.mk-line.s { width: 60%; }
.mk-btn { display: inline-block; margin-top: 8%; width: 42%; height: 11px; border-radius: 99px; background: var(--c); }
.mk-art { border-radius: 8px; background: var(--c); aspect-ratio: 1; position: relative; overflow: hidden; }
.mk-art::after { content: ""; position: absolute; width: 70%; height: 70%; left: 30%; top: 30%; border-radius: 50%; background: rgba(255,255,255,.28); }
.mk-row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4%; margin-top: 4%; }
.mk-row span { aspect-ratio: 1; border-radius: 6px; background: color-mix(in srgb, var(--c) 22%, #f3f1ed); }
.mock-dash .mk-page { grid-template-columns: 1fr; }
.mk-bars { display: flex; align-items: flex-end; gap: 4%; height: 42%; min-height: 40px; }
.mk-bars span { flex: 1; background: var(--c); border-radius: 3px 3px 0 0; opacity: .85; }
.mk-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4%; margin-bottom: 5%; }
.mk-kpis span { height: 22px; border-radius: 6px; background: color-mix(in srgb, var(--c) 16%, #f3f1ed); }
.mock-token { background: var(--c); border-radius: 8px; }
.mock-token .mk-bar { background: rgba(0,0,0,.15); }
.mock-token .mk-bar span { background: rgba(255,255,255,.5); }
.mk-coin { position: absolute; right: 7%; top: 30%; width: 26%; aspect-ratio: 1; border-radius: 50%; background: #ffe066; border: 4px solid #111; }
.mk-coin::before, .mk-coin::after { content: ""; position: absolute; top: 30%; width: 22%; aspect-ratio: 1; border-radius: 50%; background: #fff; border: 3px solid #111; }
.mk-coin::before { left: 22%; } .mk-coin::after { right: 22%; }
.mock-token h5 { position: absolute; left: 7%; top: 26%; margin: 0; font: 400 clamp(14px, 3vw, 30px)/1 "Dela Gothic One", sans-serif; color: #fff; -webkit-text-stroke: 1.5px #111; text-transform: uppercase; max-width: 56%; }

.mock-phone { background: color-mix(in srgb, var(--c) 30%, #1b2330); display: grid; place-items: center; border-radius: 8px; }
.mk-device { height: 88%; aspect-ratio: 9 / 17; border-radius: 16px; background: #dfe8ef; border: 5px solid #11151c; overflow: hidden; display: flex; flex-direction: column; }
.mk-top { height: 12%; background: #fff; display: flex; align-items: center; gap: 6%; padding: 0 8%; }
.mk-top i { width: 16%; aspect-ratio: 1; border-radius: 50%; background: var(--c); }
.mk-top b { height: 5px; width: 45%; background: #cfd6de; border-radius: 3px; }
.mk-chat { flex: 1; padding: 8%; display: flex; flex-direction: column; gap: 6%; }
.mk-chat span { height: 12%; border-radius: 8px; background: #fff; width: 76%; }
.mk-chat span.o { align-self: flex-end; background: color-mix(in srgb, var(--c) 35%, #fff); width: 55%; }
.mk-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 4%; padding: 0 8% 8%; }
.mk-keys span { height: 14px; border-radius: 5px; background: rgba(17,21,28,.25); }
.mk-tiles { flex: 1; padding: 8%; display: grid; grid-template-columns: 1fr 1fr; gap: 6%; align-content: start; }
.mk-tiles span { aspect-ratio: .8; border-radius: 8px; background: #fff; box-shadow: inset 0 -40% 0 color-mix(in srgb, var(--c) 30%, #fff); }
.mk-main { margin: 0 8% 8%; height: 16px; border-radius: 6px; background: var(--c); }

.mock-game { background: linear-gradient(#7fd3ff 0 62%, #58c26a 62% 70%, #3c8f47 70%); border-radius: 8px; image-rendering: pixelated; }
.mk-sun { position: absolute; right: 10%; top: 12%; width: 13%; aspect-ratio: 1; background: #ffd23f; box-shadow: 0 0 0 6px rgba(255,210,63,.3); }
.mk-hero { position: absolute; left: 20%; bottom: 30%; width: 8%; aspect-ratio: .8; background: var(--c); box-shadow: inset -4px -4px 0 rgba(0,0,0,.25); }
.mk-block { position: absolute; bottom: 30%; width: 6%; background: #8b5a2b; box-shadow: inset -3px -3px 0 rgba(0,0,0,.3); }
.mk-block.a { left: 52%; height: 12%; } .mk-block.b { left: 74%; height: 20%; }
.mk-cloud { position: absolute; left: 30%; top: 18%; width: 18%; height: 7%; background: #fff; box-shadow: 30px 8px 0 -2px #fff; }
.mk-score { position: absolute; left: 5%; top: 7%; font: 700 clamp(9px, 1.5vw, 14px)/1 "JetBrains Mono", monospace; color: #fff; text-shadow: 2px 2px 0 rgba(0,0,0,.35); }

.mock-term { background: #111418; border-radius: 8px; padding: 6% 7%; font: 400 clamp(8px, 1.35vw, 13px)/1.7 "JetBrains Mono", monospace; color: #9aa4ae; }
.mock-term b { color: var(--c); font-weight: 600; filter: brightness(1.6); }
.mock-term em { color: #e6edf3; font-style: normal; }

/* the label under a mockup, so an example still reads as that project */
.mk-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 9px; font: 600 12px/1.2 Onest, sans-serif; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.55)); text-shadow: 0 1px 2px rgba(0,0,0,.4); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- the logo: "Made on Earth." with the Earth as its full stop (js/brand.js) ---------- */
.moe { position: relative; display: inline-block; height: 1em; aspect-ratio: 7633 / 830; line-height: 0; vertical-align: middle; }
.moe svg { display: block; width: 100%; height: 100%; fill: currentColor; overflow: visible; }
.moe-dot {
  position: absolute; aspect-ratio: 1; border-radius: 50%;
  background: url(../brand/earth-ink-256.png) 0 0 / 100% 100%;
}
.moe-cream .moe-dot { background-image: url(../brand/earth-cream-256.png); }
/* pointed at, the ink full stop fills with colour and turns (planet.webp, from frame 33: Europe and Africa) */
.moe-dot::after {
  content: ""; position: absolute; inset: -5%; border-radius: 50%; opacity: 0;
  background: url(../planet.webp) 0 0 / 3600% 100% no-repeat;
  animation: moe-spin 9s steps(36) -8.25s infinite paused; transition: opacity .45s;
}
@keyframes moe-spin { to { background-position-x: 102.857%; } }
.moe:hover .moe-dot::after, a:focus-visible .moe-dot::after { opacity: 1; animation-play-state: running; }
@media (prefers-reduced-motion: reduce) { .moe-dot::after { animation: none; background-position-x: 94.286%; } }
