/*
 * Landing page styles. Liquid glass: translucent panels (backdrop blur + saturation), a bright
 * rim light on the top edge, a gradient hairline border and a soft specular highlight that
 * follows the pointer (--mx/--my from site.js). Palette comes from the game itself — gold,
 * emerald, sky — over warm dark "cave" light. No violet.
 */
:root {
  --bg: #0b0a09;
  --ink: #f6f3ee;
  --ink-2: rgba(246, 243, 238, 0.72);
  --ink-3: rgba(246, 243, 238, 0.5);
  --gold: #ffc94d;
  --gold-2: #f29b18;
  --emerald: #2fd48b;
  --sky: #5ac8fa;
  --ruby: #ff5a6a;
  --radius: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  /* System fonts only: SF on Apple, Segoe UI on Windows, Roboto on Android — no web-font download before text shows. */
  font: 400 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ───── ambient light ───── */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
/* Soft glows are plain radial gradients (a blur filter on screen-sized layers was the costliest paint here). */
.ambient i { position: absolute; border-radius: 50%; opacity: .55; will-change: transform; }
.ambient .a1 { width: 60vw; height: 60vw; left: -18vw; top: -22vw; background: radial-gradient(circle, #ff9f1c 0%, rgba(255, 159, 28, 0) 70%); animation: drift 26s var(--ease) infinite alternate; }
.ambient .a2 { width: 55vw; height: 55vw; right: -20vw; top: 18vh; background: radial-gradient(circle, #1fbf82 0%, rgba(31, 191, 130, 0) 70%); opacity: .38; animation: drift 32s var(--ease) infinite alternate-reverse; }
.ambient .a3 { width: 50vw; height: 50vw; left: 22vw; bottom: -30vw; background: radial-gradient(circle, #2e8bff 0%, rgba(46, 139, 255, 0) 70%); opacity: .3; animation: drift 30s var(--ease) infinite alternate; }
@keyframes drift { to { transform: translate3d(6vw, 4vh, 0) scale(1.08); } }
/* (No film-grain overlay: a full-screen blended noise layer blanked the whole page in WebKit/Safari.) */

/* ───── liquid glass ───── */
.glass {
  position: relative; isolation: isolate;
  background: linear-gradient(155deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .04) 42%, rgba(255, 255, 255, .07));
  -webkit-backdrop-filter: blur(22px) saturate(175%); backdrop-filter: blur(22px) saturate(175%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .5),
    inset 0 -1px 1px rgba(255, 255, 255, .1),
    inset 0 0 20px rgba(255, 255, 255, .04),
    0 30px 70px -30px rgba(0, 0, 0, .75),
    0 2px 8px rgba(0, 0, 0, .25);
}
/* hairline border that is brighter where light hits the edge */
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: linear-gradient(150deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .12) 30%, rgba(255, 255, 255, .04) 60%, rgba(255, 255, 255, .35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
}
/* specular highlight, follows the pointer on devices that have one */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  background: radial-gradient(90% 70% at var(--mx, 25%) var(--my, 0%), rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 55%);
  mix-blend-mode: screen; transition: opacity .4s var(--ease); opacity: .9;
}
.glass > * { position: relative; z-index: 3; }
.glass-inset { background: rgba(0, 0, 0, .25); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .45), inset 0 -1px 0 rgba(255, 255, 255, .08); }

/* ───── buttons ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer;
  border-radius: 999px; font: 600 16px/1 inherit; letter-spacing: -.01em; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(.97); }
.btn-sm { padding: 10px 18px; font-size: 15px; }
.btn-lg { padding: 17px 28px; font-size: 17px; }
/* gold: tinted glass — warm fill, a bright rim and a soft inner glow, like light through amber */
.btn-gold {
  color: #1d1300;
  background: linear-gradient(180deg, #ffe08a 0%, #ffc43d 48%, #f5a21e 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -2px 6px rgba(160, 80, 0, .35), 0 10px 30px -8px rgba(255, 170, 30, .55), 0 2px 6px rgba(0, 0, 0, .3);
}
.btn-gold:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -2px 6px rgba(160, 80, 0, .35), 0 14px 40px -8px rgba(255, 170, 30, .7), 0 2px 6px rgba(0, 0, 0, .3); transform: translateY(-1px); }
.btn-glass { color: var(--ink); }
/* Telegram blue, the way Telegram's own buttons look now: bright gradient, light rim, soft blue glow. */
.btn-tg {
  color: #fff; font-weight: 600;
  background: linear-gradient(180deg, #45bdf7 0%, #2aabee 48%, #1c93d1 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -2px 6px rgba(0, 60, 120, .3), 0 10px 30px -8px rgba(42, 171, 238, .65), 0 2px 6px rgba(0, 0, 0, .3);
}
.btn-tg:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -2px 6px rgba(0, 60, 120, .3), 0 14px 40px -8px rgba(42, 171, 238, .8), 0 2px 6px rgba(0, 0, 0, .3); }
.btn .tg-plane { width: 22px; height: 22px; fill: #fff; stroke: none; }
.btn .tg-plane .fold { fill: #c8e8fb; }
.btn-tg:hover .tg-plane { transform: translate(2px, -1px); }
.btn-glass:hover { transform: translateY(-1px); }

/* ───── nav ───── */
.nav-wrap { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; justify-content: center; padding: max(14px, env(safe-area-inset-top)) 16px 0; }
.nav { display: flex; align-items: center; gap: 22px; padding: 8px 8px 8px 20px; border-radius: 999px; width: min(1080px, 100%); }
/* The nav floats over everything: a denser tint keeps it legible where the blur is weak or absent. */
.nav.glass { background: linear-gradient(155deg, rgba(46, 41, 36, .9), rgba(20, 18, 16, .86) 45%, rgba(30, 27, 24, .88)); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; font-size: 16px; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; font-size: 16px; background: linear-gradient(180deg, #ffe08a, #f5a21e); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7); }
.nav-links { display: flex; gap: 22px; margin-left: 12px; font-size: 15px; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang { display: flex; padding: 3px; border-radius: 999px; }
.lang button { border: 0; background: none; color: var(--ink-3); font: 600 13px/1 inherit; padding: 8px 11px; border-radius: 999px; cursor: pointer; }
.lang button.on { color: var(--ink); background: rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }

/* ───── hero ───── */
main { width: min(1160px, 100%); margin: 0 auto; padding: 0 24px; }
.hero { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px; padding: 120px 0 60px; }
.chip { display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px; border-radius: 999px; font-size: 14px; color: var(--ink-2); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 12px var(--emerald); }
h1 { margin: 26px 0 0; font-size: clamp(44px, 5.6vw, 80px); line-height: .98; letter-spacing: -.045em; font-weight: 800; }
.h1-glow { background: linear-gradient(180deg, #fff3cf 5%, #ffc94d 55%, #f29b18 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 8px 30px rgba(255, 170, 30, .25)); }
.lead { margin: 26px 0 0; max-width: 520px; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--ink-2); letter-spacing: -.01em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.cta-row.center { justify-content: center; }
.hero-facts { display: flex; gap: 34px; list-style: none; margin: 46px 0 0; padding: 0; }
.hero-facts li { display: flex; flex-direction: column; gap: 2px; }
.hero-facts b { font-size: 26px; letter-spacing: -.03em; }
.hero-facts span { font-size: 14px; color: var(--ink-3); }

.hero-visual { position: relative; height: 640px; }
.phone {
  position: absolute; width: 272px; aspect-ratio: 780 / 1688; border-radius: 46px; padding: 9px;
  background: linear-gradient(160deg, #3a3631, #121110 45%, #2b2824);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .16), inset 0 1px 1px rgba(255, 255, 255, .35), 0 50px 90px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .6);
}
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 38px; overflow: hidden; background: #0b0d14; }
/* A status-bar strip keeps the app's own header clear of the Dynamic Island, as on a real phone. */
.phone .screen img { position: absolute; left: 0; right: 0; top: 34px; width: 100%; height: auto; }
.phone .status { position: absolute; top: 0; left: 0; right: 0; height: 34px; display: flex; justify-content: space-between; align-items: center; padding: 0 22px 0 26px; font: 600 12px/1 -apple-system, Inter, sans-serif; color: #fff; }
.phone .status i { width: 34px; height: 10px; border-radius: 3px; background: linear-gradient(90deg, #fff 70%, rgba(255,255,255,.35) 70%); }
.phone .island { position: absolute; top: 20px; left: 50%; width: 82px; height: 24px; margin-left: -41px; border-radius: 20px; background: #050505; }
.phone-a { left: 4%; top: 30px; transform: rotate(-6deg); animation: floatA 9s ease-in-out infinite; }
.phone-b { right: 2%; top: 70px; transform: rotate(5deg); animation: floatB 10s ease-in-out infinite; z-index: 1; }
@keyframes floatA { 50% { transform: rotate(-5deg) translateY(-12px); } }
@keyframes floatB { 50% { transform: rotate(4deg) translateY(10px); } }
.float { position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 20px; font-size: 15px; white-space: nowrap; }
.float b { font-weight: 700; }
.f1 { left: -6%; top: 60%; animation: floatB 8s ease-in-out infinite; }
.f2 { right: -7%; top: 58%; animation: floatA 11s ease-in-out infinite; }
.f3 { left: 30%; bottom: 0; animation: floatA 12s ease-in-out infinite; }
.f-gem { width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), inset 0 -3px 0 rgba(0, 0, 0, .2); }
.g-gold { background: linear-gradient(180deg, #ffe07a, #e0a412); }
.g-emerald { background: linear-gradient(180deg, #5cf0ae, #16a866); }
.f-ton { width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #9fe0ff, #2a9df4 60%, #1570c9); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6); }

/* ───── sections ───── */
.section { padding: 110px 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.kicker { margin: 0 0 12px; font-size: 15px; font-weight: 600; letter-spacing: .02em; color: var(--gold); }
h2 { margin: 0; font-size: clamp(36px, 5vw, 64px); line-height: 1.02; letter-spacing: -.04em; font-weight: 800; }
.section-lead { margin: 18px 0 0; font-size: 20px; color: var(--ink-2); }
h3 { margin: 0; font-size: 26px; letter-spacing: -.03em; font-weight: 700; }

.games-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.game-card { border-radius: 36px; overflow: hidden; display: flex; flex-direction: column; }
.game-art { position: relative; margin: 10px 10px 0; border-radius: 28px; overflow: hidden; aspect-ratio: 16 / 11; }
.game-art img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 1.2s var(--ease); }
.game-card:hover .game-art img { transform: scale(1.06); }
.game-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(11, 10, 9, .55)); }
.game-body { padding: 26px 30px 32px; }
.game-body p { margin: 12px 0 0; color: var(--ink-2); font-size: 17px; }
.tag { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #1d1300; background: linear-gradient(180deg, #ffe08a, #f5a21e); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 20px 0 0; padding: 0; }
.facts li { padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--ink); background: rgba(255, 255, 255, .07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; margin: 0; padding: 0; }
.step { border-radius: var(--radius); padding: 30px 28px 32px; }
.step-n { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 26px; border-radius: 14px; font-weight: 700; font-size: 18px; color: #1d1300; background: linear-gradient(180deg, #ffe08a, #f5a21e); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 8px 20px -6px rgba(255, 170, 30, .5); }
.step p { margin: 10px 0 0; color: var(--ink-2); font-size: 16px; }

.fair { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.fair-copy p:last-child { color: var(--ink-2); font-size: 18px; margin: 18px 0 0; max-width: 540px; }
.hash { border-radius: var(--radius); padding: 10px; }
.hash-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px 20px; border-radius: 20px; font-size: 15px; color: var(--ink-3); }
.hash-row + .hash-row { border-top: 1px solid rgba(255, 255, 255, .06); }
.hash-row code { font: 500 15px/1 ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink); }
.hash-row.ok code { color: var(--emerald); }

.final { padding-top: 40px; }
.final-card { border-radius: 40px; padding: 72px 32px; text-align: center; }
.final-card p { margin: 16px auto 0; max-width: 520px; font-size: 19px; color: var(--ink-2); }

/* "One pickaxe." stays on one line on wide screens. */
@media (min-width: 981px) { h1 span { white-space: nowrap; } }
.footer { width: min(1160px, 100%); margin: 0 auto; padding: 30px 24px calc(40px + env(safe-area-inset-bottom)); display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--ink-3); }

/* ───── reveal on scroll ───── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ───── responsive ───── */
@media (max-width: 980px) {
  /* Phones and tablets: still light, no drifting glows, a lighter blur behind glass. */
  .ambient i { animation: none; }
  .glass { -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); }
  .hero { grid-template-columns: 1fr; padding-top: 110px; gap: 10px; min-height: auto; }
  .hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  .hero-facts { justify-content: center; }
  .hero-visual { height: 560px; max-width: 560px; width: 100%; margin: 0 auto; }
  .games-grid, .steps, .fair { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  main { padding: 0 16px; }
  .nav { gap: 10px; padding-left: 14px; }
  .brand span:last-child { display: none; }
  .hero-facts { gap: 22px; }
  .hero-facts b { font-size: 22px; }
  .hero-visual { height: 430px; }
  .phone { width: 176px; border-radius: 34px; padding: 6px; }
  .phone .screen { border-radius: 29px; }
  .phone .island { top: 12px; width: 64px; height: 19px; margin-left: -32px; }
  .phone .screen img { top: 28px; }
  .phone .status { height: 28px; padding: 0 16px 0 20px; font-size: 10px; }
  .phone .status i { width: 26px; height: 8px; }
  .phone-a { left: 6%; top: 10px; }
  .phone-b { right: 6%; top: 50px; }
  .float { font-size: 13px; padding: 10px 13px; border-radius: 16px; }
  /* Small screens: one chip only; two more would cover the phones. */
  .f1, .f2 { display: none; }
  .f3 { left: 50%; bottom: 6px; transform: translateX(-50%); animation: none; }
  .section { padding: 80px 0; }
  .game-body { padding: 22px 22px 26px; }
  .final-card { padding: 54px 22px; border-radius: 32px; }
  .footer { flex-direction: column; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
