/* ============================================================
   داینامیک استودیو — Cinematic glassmorphism redesign (RTL)
   Reference: framed "window", purple gradient, frosted glass,
   playful rounded display, Apple-like smooth scroll.
   Fonts: Lalezar (display) + Vazirmatn (body)
   ============================================================ */

:root {
  /* frame / passe-partout */
  --frame: #140e22;                 /* dark purple margin around the window */
  --frame-inset: 12px;
  --frame-radius: 30px;

  /* cinematic surfaces */
  --bg-top: #2a1b4d;
  --bg-bottom: #160f28;
  --text: #F1EEFB;
  --muted: #B7B0D8;
  --border: rgba(255, 255, 255, .10);

  /* glass */
  --glass-bg: rgba(255, 255, 255, .055);
  --glass-brd: rgba(255, 255, 255, .14);
  --glass-blur: 18px;

  /* accents */
  --violet: #8B5CF6;
  --magenta: #FF2E97;
  --cyan: #22D3EE;
  --lime: #A3E635;
  --amber: #FBBF24;
  --red: #FF3B5C;                   /* reference red CTA */
  --red-2: #E11D48;

  --grad: linear-gradient(100deg, #FF6FB5, #A78BFA 55%, #5EE7FF);
  --grad-red: linear-gradient(180deg, #FF5C77, #E11D48);

  --maxw: 1180px;
  --radius: 22px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow: 0 30px 70px -30px rgba(0, 0, 0, .8);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  color: var(--text);
  font-family: "Vazirmatn", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background: var(--bg-bottom);
}
/* cinematic fixed backdrop (reliable vs background-attachment:fixed) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70vw 60vh at 80% 4%, rgba(255, 46, 151, .18), transparent 60%),
    radial-gradient(60vw 55vh at 10% 26%, rgba(139, 92, 246, .22), transparent 60%),
    radial-gradient(60vw 60vh at 55% 100%, rgba(34, 211, 238, .12), transparent 60%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom) 50%, var(--bg-bottom));
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { margin: 0; line-height: 1.18; }
button { font-family: inherit; cursor: pointer; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 26px; }

.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- a11y ---------- */
.skip-link { position: absolute; right: -999px; top: 8px; z-index: 200; background: var(--violet); color: #fff; padding: 8px 16px; border-radius: 8px; }
.skip-link:focus { right: 22px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }

/* ============ FIXED ROUNDED WINDOW FRAME ============ */
.frame {
  position: fixed;
  inset: var(--frame-inset);
  border-radius: var(--frame-radius);
  border: 1.5px solid rgba(255, 255, 255, .16);
  /* huge solid spread fills the gap between rounded rect and viewport edges */
  box-shadow: 0 0 0 100vmax var(--frame);
  pointer-events: none;
  z-index: 80;
}

/* ---------- glass utility ---------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-brd);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), var(--shadow);
}

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: calc(var(--frame-inset) + 6px); z-index: 70;
  margin: 0 var(--frame-inset);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; height: 62px;
  padding-inline: 22px; border-radius: 999px;
  background: rgba(26, 18, 46, .55);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--glass-brd);
  box-shadow: 0 12px 30px -16px rgba(0, 0, 0, .6);
  max-width: var(--maxw); margin-inline: auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-logo { width: 36px; height: 36px; object-fit: contain; border-radius: 9px; }
.brand-name { font-size: 1.02rem; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 500; transition: color .2s var(--ease), background .2s var(--ease); }
.main-nav a:hover, .main-nav a.is-current { color: var(--text); background: rgba(255, 255, 255, .08); }
.nav-cta { background: var(--grad-red); color: #fff !important; font-weight: 700; margin-inline-start: 6px; box-shadow: 0 8px 20px -8px rgba(225, 29, 72, .8); }
.nav-cta:hover { filter: brightness(1.07); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px; align-items: center; justify-content: center; background: none; border: 0; }
.nav-toggle span { width: 24px; height: 2.4px; background: var(--text); border-radius: 2px; transition: .25s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.4px) rotate(-45deg); }

/* ============ HERO ============ */
.hero { position: relative; padding: clamp(60px, 10vw, 130px) 0 0; overflow: hidden; }
.atmos { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; mix-blend-mode: screen; will-change: transform; }
.blob-1 { width: 46vw; height: 46vw; left: -8vw; top: -6vw; background: radial-gradient(circle, #b14bff, transparent 65%); animation: drift1 18s ease-in-out infinite; }
.blob-2 { width: 40vw; height: 40vw; right: -6vw; top: 4vw; background: radial-gradient(circle, #ff3d8b, transparent 65%); animation: drift2 22s ease-in-out infinite; }
.blob-3 { width: 36vw; height: 36vw; left: 30vw; top: 28vw; background: radial-gradient(circle, #2bd6ff, transparent 65%); opacity: .35; animation: drift1 26s ease-in-out infinite reverse; }
.fog { position: absolute; inset: 0; background: radial-gradient(120% 60% at 50% 120%, rgba(20, 14, 34, .9), transparent 70%); }
@keyframes drift1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(4vw, 3vw); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-3vw, 4vw); } }

.embers { position: absolute; inset: 0; }
.ember { position: absolute; bottom: -10px; width: 4px; height: 4px; border-radius: 50%; background: #ffd28a; box-shadow: 0 0 8px 2px rgba(255, 190, 120, .8); opacity: 0; animation: rise linear infinite; }
@keyframes rise { 0% { transform: translateY(0) scale(1); opacity: 0; } 12% { opacity: .9; } 100% { transform: translateY(-92vh) scale(.4); opacity: 0; } }

.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(28px, 5vw, 60px); }
.hero-header-banner { width: 100%; border-radius: 24px; margin-bottom: clamp(24px, 4vw, 44px); border: 1px solid var(--glass-brd); box-shadow: 0 34px 80px -36px rgba(139, 92, 246, .75); }

/* ---- game announce slider ---- */
.hero-slider { justify-self: center; width: 100%; max-width: 430px; }
.gslide-card { position: relative; display: grid; border-radius: 26px; padding: 18px; background: rgba(255, 255, 255, .055); border: 1px solid var(--glass-brd); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), var(--shadow); perspective: 1400px; }
/* all slides share one grid cell so the card height stays constant; slides flip in 3D */
.gslide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: rotateY(75deg); transform-origin: center; backface-visibility: hidden; transition: opacity .5s var(--ease), transform .6s var(--ease), visibility 0s linear .6s; pointer-events: none; }
.gslide.is-active { opacity: 1; visibility: visible; transform: rotateY(0deg); transition: opacity .45s var(--ease), transform .6s var(--ease); pointer-events: auto; }
.gslide-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.gslide-title { font-family: "Lalezar", sans-serif; font-size: 1.45rem; }
.gslide-online { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 600; color: var(--cyan); background: color-mix(in srgb, var(--cyan) 14%, transparent); border: 1px solid color-mix(in srgb, var(--cyan) 34%, transparent); padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.gslide-online .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.gslide-rule { display: block; height: 2px; border-radius: 2px; background: linear-gradient(270deg, var(--cyan), transparent); margin-bottom: 16px; }
.gslide-art { border-radius: 16px; overflow: hidden; border: 1px solid var(--glass-brd); }
.gslide-art img { display: block; width: 100%; height: auto; }
.gslide-desc { text-align: center; font-size: .98rem; margin: 16px 0 12px; min-height: 2.7em; display: flex; align-items: center; justify-content: center; }
.gslide-rate { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 9px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--glass-brd); }
.gslide-stars { color: var(--amber); letter-spacing: 3px; font-size: .95rem; }
.gslide-score { color: var(--muted); font-size: .9rem; font-weight: 600; }
.gslide-dots { display: flex; justify-content: center; gap: 8px; width: max-content; margin: 16px auto 0; padding: 9px 14px; border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid var(--glass-brd); }
.gslide-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .25); cursor: pointer; transition: background .25s var(--ease), width .25s var(--ease); }
.gslide-dot:hover { background: rgba(255, 255, 255, .5); }
.gslide-dot.is-active { width: 24px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.hero-copy { max-width: 640px; display: flex; align-items: flex-start; gap: clamp(16px, 2vw, 28px); }
.hero-text { flex: 1; min-width: 0; }
.hero-logo { flex: none; width: 150px; height: auto; filter: drop-shadow(0 14px 30px rgba(139, 92, 246, .6)); animation: heroLogoSpin 14s linear infinite; }
@keyframes heroLogoSpin { to { transform: rotate(360deg); } }
.hero-art { justify-self: center; }

/* ---- fantasy frame ---- */
.hero-frame { position: relative; width: 100%; max-width: 460px; padding: 7px; border-radius: 34px; background: linear-gradient(140deg, #FFD9A8, #FF6FB5 30%, #A78BFA 60%, #5EE7FF); box-shadow: 0 44px 90px -30px rgba(139, 92, 246, .95), inset 0 0 0 1.5px rgba(255, 255, 255, .35); animation: heroArtFloat 6.5s var(--ease) infinite; }
/* rotating magical aura behind the frame */
.hero-frame-aura { position: absolute; inset: -26%; z-index: -1; border-radius: 50%; background: conic-gradient(from 0deg, var(--magenta), var(--cyan), var(--violet), var(--amber), var(--magenta)); filter: blur(50px); opacity: .55; animation: heroGlowSpin 16s linear infinite; }
.hero-frame-inner { position: relative; border-radius: 27px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35); }
.hero-banner { display: block; width: 100%; border-radius: 27px; }
/* glossy diagonal shine sweeping across the art */
.hero-frame-shine { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .35) 48%, transparent 58%); transform: translateX(-120%); animation: heroShine 6s ease-in-out 1.5s infinite; }
/* twinkling sparkles */
.hero-spark { position: absolute; width: 22px; height: 22px; background: #fff; clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); filter: drop-shadow(0 0 7px var(--cyan)); animation: heroTwinkle 3.4s ease-in-out infinite; }
.hero-spark--1 { top: -14px; inset-inline-end: 26px; }
.hero-spark--2 { bottom: 18px; inset-inline-start: -16px; width: 16px; height: 16px; filter: drop-shadow(0 0 7px var(--magenta)); animation-delay: 1.1s; }
.hero-spark--3 { top: 42%; inset-inline-end: -12px; width: 13px; height: 13px; filter: drop-shadow(0 0 6px var(--amber)); animation-delay: 2.1s; }
@keyframes heroArtFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes heroGlowSpin { to { transform: rotate(360deg); } }
@keyframes heroShine { 0% { transform: translateX(-120%); } 28%, 100% { transform: translateX(120%); } }
@keyframes heroTwinkle { 0%, 100% { transform: scale(.55) rotate(0deg); opacity: .45; } 50% { transform: scale(1) rotate(90deg); opacity: 1; } }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 20px; padding: 7px 16px; border: 1px solid var(--glass-brd); border-radius: 999px; background: rgba(255, 255, 255, .05); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--muted); font-size: .9rem; font-weight: 500; }
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); }
.hero-title {
  font-family: "Lalezar", "Vazirmatn", sans-serif; font-weight: 400;
  font-size: clamp(2.9rem, 8vw, 5.6rem); line-height: 1.05;
  text-shadow: 0 4px 40px rgba(139, 92, 246, .5), 0 0 80px rgba(255, 46, 151, .25);
}
.hero-sub { font-size: clamp(1rem, 2.2vw, 1.22rem); color: var(--muted); margin: 24px 0 32px; max-width: 58ch; }
.hero-define { max-width: 560px; margin: 0 0 30px; padding: 15px 20px; border-radius: 16px; text-align: left; background: rgba(255, 255, 255, .04); border: 1px solid var(--glass-brd); border-left: 3px solid var(--violet); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.define-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 0; }
.define-word { font-family: "Lalezar", "Vazirmatn", sans-serif; font-size: 1.5rem; color: var(--text); }
.define-pron { color: var(--muted); font-size: .92rem; }
.define-pos { color: var(--violet); font-style: italic; font-size: .85rem; }
.define-text { margin: 6px 0 0; color: var(--muted); font-size: .98rem; line-height: 1.65; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 15px 30px; border-radius: 999px; font-weight: 700; font-size: 1.02rem; border: 1px solid transparent; transition: transform .25s var(--ease), filter .25s var(--ease), background .25s var(--ease); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: var(--grad-red); color: #fff; box-shadow: 0 16px 36px -12px rgba(225, 29, 72, .75), 0 0 0 0 rgba(255, 59, 92, .5); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-2px); }
.btn-ghost { background: rgba(255, 255, 255, .06); border-color: var(--glass-brd); color: var(--text); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); transform: translateY(-2px); }

.hero-stats { display: flex; flex-wrap: wrap; gap: clamp(26px, 6vw, 60px); margin: 52px 0 0; padding: 0; }
.stat-num { font-family: "Lalezar", sans-serif; font-size: clamp(2.1rem, 5vw, 3rem); line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { color: var(--muted); font-size: .92rem; margin-top: 4px; }

/* arcade ticker */
.ticker { position: relative; z-index: 1; margin-top: clamp(54px, 8vw, 90px); border-block: 1px solid var(--border); background: rgba(255, 255, 255, .03); padding: 14px 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: inline-flex; white-space: nowrap; will-change: transform; animation: marquee 40s linear infinite; }
.ticker-track span { font-family: "Lalezar", sans-serif; font-size: 1.3rem; letter-spacing: 1px; color: var(--muted); padding-inline: 6px; }
.ticker-track .tk-word { font-family: "Lalezar", sans-serif; font-size: 1.3rem; letter-spacing: 1px; padding-inline: 6px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ticker-track .tk-def { font-family: "Vazirmatn", sans-serif; font-size: .92rem; font-weight: 500; letter-spacing: 0; color: var(--text); opacity: .82; padding-inline: 6px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============ SECTIONS ============ */
.section { position: relative; z-index: 1; padding: clamp(64px, 11vw, 130px) 0; }
.section-head { max-width: 700px; margin-bottom: 46px; }
.section-kicker { display: inline-block; margin: 0 0 12px; color: var(--cyan); font-weight: 700; font-size: .82rem; letter-spacing: 2px; text-transform: uppercase; }
.section-title { font-family: "Lalezar", sans-serif; font-weight: 400; font-size: clamp(2.1rem, 5.5vw, 3.6rem); text-shadow: 0 2px 30px rgba(139, 92, 246, .35); }
.section-lead { color: var(--muted); margin: 16px 0 0; font-size: 1.08rem; }

/* ---------- About (statement w/ art placeholder) ---------- */
.about-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 70px); align-items: center; }
.art-frame { position: relative; border-radius: 26px; aspect-ratio: 4 / 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; overflow: hidden; padding: 26px; text-align: center; }
.art-frame::before { content: ""; position: absolute; inset: 0; z-index: 0; background: radial-gradient(90% 70% at 50% 25%, rgba(255, 46, 151, .35), transparent 60%), radial-gradient(80% 80% at 30% 100%, rgba(139, 92, 246, .4), transparent 65%); }
.art-frame > * { position: relative; z-index: 1; }
.art-banner { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 0; }
.art-badge { font-family: "Lalezar", sans-serif; letter-spacing: 1px; font-size: 1.05rem; padding: 7px 18px; border-radius: 999px; background: var(--grad-red); color: #fff; box-shadow: 0 10px 24px -10px rgba(225, 29, 72, .8); }
.art-ph { font-size: .82rem; color: var(--muted); opacity: .85; border: 1px dashed var(--glass-brd); padding: 6px 14px; border-radius: 999px; }
.about-text { color: var(--muted); margin: 18px 0; font-size: 1.05rem; max-width: 56ch; }
.about-copy .btn { margin-top: 12px; }

/* ---------- Games grid ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.chip { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255, 255, 255, .04); color: var(--muted); font-weight: 600; font-size: .92rem; transition: .2s var(--ease); }
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, .25); }
.chip.is-active { background: var(--grad-red); color: #fff; border-color: transparent; box-shadow: 0 8px 20px -10px rgba(225, 29, 72, .8); }

.games-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); }
.game-card { position: relative; padding: 26px 22px 22px; border-radius: var(--radius); overflow: hidden; transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease); }
.game-card::before { content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0; background: radial-gradient(120% 90% at 50% -10%, color-mix(in srgb, var(--c) 40%, transparent), transparent 60%); transition: opacity .3s var(--ease); }
.game-card > * { position: relative; z-index: 1; }
.game-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--c) 60%, transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 26px 54px -24px color-mix(in srgb, var(--c) 65%, transparent); }
.game-card:hover::before { opacity: 1; }
.game-ic { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; margin-bottom: 18px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 38%, transparent); box-shadow: inset 0 0 20px color-mix(in srgb, var(--c) 22%, transparent); transition: box-shadow .3s var(--ease); }
.game-ic svg { width: 30px; height: 30px; }
.game-ic.game-ic--art { display: block; width: calc(100% + 44px); margin: -26px -22px 16px; height: auto; aspect-ratio: 324 / 112; border: 0; border-radius: 0; background: none; box-shadow: none; padding: 0; overflow: hidden; }
.game-ic.game-ic--art img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.game-card:hover .game-ic.game-ic--art { box-shadow: none; }
.game-card:hover .game-ic { box-shadow: 0 0 26px color-mix(in srgb, var(--c) 60%, transparent), inset 0 0 20px color-mix(in srgb, var(--c) 28%, transparent); }
.game-name { font-size: 1.18rem; font-weight: 700; }
.game-desc { color: var(--muted); font-size: .92rem; margin: 7px 0 16px; min-height: 2.6em; }
.game-tag { display: inline-block; padding: 4px 13px; border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 32%, transparent); }
.game-card--soon { border-style: dashed; opacity: .82; }
.game-card.is-hidden { display: none; }

/* playable cards (have video) */
.game-card.has-video { cursor: pointer; }
.game-card.has-video:focus-visible { outline: 2px solid var(--c); outline-offset: 3px; }
.play-badge { position: absolute; top: 16px; left: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: .72rem; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 18%, rgba(0,0,0,.4)); border: 1px solid color-mix(in srgb, var(--c) 42%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.play-badge svg { width: 11px; height: 11px; }
.game-card.has-video:hover .play-badge { box-shadow: 0 0 18px color-mix(in srgb, var(--c) 55%, transparent); }

/* ---------- Game video modal ---------- */
.vmodal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.vmodal[hidden] { display: none; }
.vmodal-backdrop { position: absolute; inset: 0; background: rgba(8,5,18,.74); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: vfade .25s var(--ease); }
.vmodal-panel { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 16px; width: auto; max-width: 94vw; max-height: 92vh; padding: 0; animation: vpop .3s var(--ease); }
.vmodal-close { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 5; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--text); background: rgba(10,7,19,.55); border: 1px solid var(--glass-brd); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); cursor: pointer; transition: background .2s var(--ease); }
.vmodal-close:hover { background: rgba(10,7,19,.8); }
.vmodal-close svg { width: 18px; height: 18px; }
/* visually-hidden title kept for the dialog's accessible name */
.vmodal-title { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* phone frame around the movie */
.vmodal-phone { position: relative; height: min(76vh, 720px); aspect-ratio: 9 / 19; background: linear-gradient(160deg, #241a40, #120c22); border-radius: 46px; padding: 11px; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 44px 90px -30px rgba(139,92,246,.9), inset 0 0 0 2px rgba(255,255,255,.05); }
.vmodal-notch { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); width: 118px; height: 26px; border-radius: 99px; background: #0a0713; z-index: 2; }
.vmodal-screen { height: 100%; width: 100%; border-radius: 36px; overflow: hidden; background: #000; }
.vmodal-video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
.vmodal-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.vmodal-tabs[hidden] { display: none; }
.vmodal-tab { padding: 7px 16px; border-radius: 999px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--muted); background: rgba(255,255,255,.05); border: 1px solid var(--glass-brd); cursor: pointer; transition: color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease); }
.vmodal-tab:hover { color: var(--text); }
.vmodal-tab.is-active { color: #fff; background: var(--grad-red); border-color: transparent; }
body.vmodal-open { overflow: hidden; }
@keyframes vfade { from { opacity: 0; } }
@keyframes vpop { from { opacity: 0; transform: translateY(16px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { .vmodal-backdrop, .vmodal-panel { animation: none; } }

/* ---------- Mission strip ---------- */
.mission-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(28px, 5vw, 56px); align-items: center; border-radius: 28px; padding: clamp(30px, 4vw, 52px); }
.mission-values { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mv { padding: 20px; border-radius: 18px; background: rgba(255, 255, 255, .05); border: 1px solid var(--border); }
.mv-num { display: block; font-family: "Lalezar", sans-serif; font-size: 1.9rem; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 6px; }
.mv-label { color: var(--muted); font-size: .9rem; }

/* ---------- Apps ---------- */
.app-feature { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 64px); align-items: center; padding: clamp(30px, 4vw, 52px); border-radius: 30px; }
.app-mock { display: flex; justify-content: center; position: relative; }
.phone { position: relative; width: 220px; aspect-ratio: 9 / 18.5; border-radius: 36px; background: linear-gradient(160deg, #241a40, #120c22); padding: 12px; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 40px 80px -28px rgba(139, 92, 246, .9), inset 0 0 0 2px rgba(255, 255, 255, .05); }
.phone-notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 70px; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .16); }
.phone-screen { height: 100%; border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: radial-gradient(120% 80% at 50% 0%, rgba(255, 46, 151, .3), transparent 60%), #100a20; text-align: center; padding: 20px; }
.phone-logo { width: 64px; height: 64px; object-fit: contain; border-radius: 16px; }
.phone-title { font-family: "Lalezar", sans-serif; font-size: 1.3rem; }
.phone-sub { color: var(--muted); font-size: .85rem; }
.phone-cta { margin-top: 10px; padding: 9px 22px; border-radius: 999px; background: var(--grad-red); color: #fff; font-weight: 700; font-size: .88rem; }
.phone-screen--shot { padding: 0; overflow: hidden; background: #100a20; }
.phone-shot { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }

/* ---- Floating dice (image) ---- */
.dice { --dz: 48px; position: absolute; width: calc(var(--dz) * 2); height: calc(var(--dz) * 2); z-index: 3; perspective: 760px; animation: diceFloat 4.6s var(--ease) infinite; }
.dice--start { top: 4%; inset-inline-start: 0; }
.dice--end { top: 40%; inset-inline-end: 0; animation-delay: -2.2s; }
.dice--end .dice-img { animation-direction: reverse; animation-delay: -3.4s; }
.dice-img { width: 100%; height: 100%; object-fit: contain; display: block; transform-origin: center; filter: drop-shadow(2px 4px 6px black) }
@keyframes diceWobble {
  0%   { transform: rotateX(0deg)  rotateY(0deg)   rotateZ(-8deg); }
  50%  { transform: rotateX(16deg) rotateY(-16deg) rotateZ(8deg); }
  100% { transform: rotateX(0deg)  rotateY(0deg)   rotateZ(-8deg); }
}
@keyframes diceFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
.app-title { font-family: "Lalezar", sans-serif; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 400; }
.app-text { color: var(--muted); margin: 14px 0 26px; max-width: 50ch; }
.store-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 470px; }
.store-badge { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid var(--border); transition: .2s var(--ease); }
.store-badge:hover { background: rgba(255, 255, 255, .11); border-color: rgba(255, 255, 255, .28); transform: translateY(-2px); }
.store-ic { width: 26px; height: 26px; flex-shrink: 0; color: var(--text); }
.store-text { display: flex; flex-direction: column; line-height: 1.2; }
.store-text small { color: var(--muted); font-size: .72rem; }
.store-text strong { font-size: .98rem; font-weight: 700; }
.store-note { color: var(--muted); font-size: .8rem; margin: 16px 0 0; opacity: .8; }

/* ============ FOOTER ============ */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--border); margin-top: 30px; padding-top: 56px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 32px; padding-bottom: 40px; align-items: start; }
.footer-tag { color: var(--muted); margin: 14px 0 0; max-width: 34ch; }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { color: var(--muted); transition: color .2s var(--ease); }
.footer-links a:hover { color: var(--text); }
.footer-contact { display: flex; flex-direction: column; gap: 16px; }
.footer-mail { font-weight: 600; color: var(--cyan); }
.footer-mail:hover { text-decoration: underline; }
.socials { display: flex; gap: 12px; }
.social { width: 42px; height: 42px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .05); border: 1px solid var(--border); color: var(--muted); transition: .2s var(--ease); }
.social svg { width: 20px; height: 20px; }
.social:hover { color: #fff; transform: translateY(-3px); border-color: transparent; background: var(--grad-red); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; margin-bottom: var(--frame-inset); border-top: 1px solid var(--border); color: var(--muted); font-size: .88rem; }
.to-top { color: var(--muted); transition: color .2s var(--ease); }
.to-top:hover { color: var(--text); }

/* ============ STORY / TIMELINE ============ */
.timeline { position: relative; list-style: none; max-width: 760px; margin: 0 auto; padding-inline-start: 34px; }
.timeline::before { content: ""; position: absolute; inset-block: 6px; inset-inline-start: 7px; width: 2px; background: linear-gradient(to bottom, var(--violet), var(--magenta) 55%, transparent); }
.tl-item { position: relative; padding: 0 0 30px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; inset-inline-start: -34px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg-bottom); border: 2px solid var(--magenta); box-shadow: 0 0 0 4px color-mix(in srgb, var(--magenta) 22%, transparent); }
.tl-year { display: inline-block; font-size: .82rem; font-weight: 700; color: var(--magenta); letter-spacing: .04em; margin-bottom: 4px; }
.tl-title { font-size: 1.12rem; font-weight: 700; margin-bottom: 5px; }
.tl-text { color: var(--muted); font-size: .94rem; line-height: 1.75; }

/* ============ TEAM ============ */
.team-grid { list-style: none; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.member { position: relative; overflow: hidden; padding: 28px 20px 24px; border-radius: var(--radius); text-align: center; transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease); }
.member::before { content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0; background: radial-gradient(120% 90% at 50% -10%, color-mix(in srgb, var(--c) 38%, transparent), transparent 60%); transition: opacity .3s var(--ease); }
.member > * { position: relative; z-index: 1; }
.member:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--c) 60%, transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 26px 54px -24px color-mix(in srgb, var(--c) 65%, transparent); }
.member:hover::before { opacity: 1; }
.member-avatar { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin-bottom: 16px; border-radius: 50%; font-size: 1.5rem; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); box-shadow: inset 0 0 22px color-mix(in srgb, var(--c) 24%, transparent); }
.member:hover .member-avatar { box-shadow: 0 0 28px color-mix(in srgb, var(--c) 55%, transparent), inset 0 0 22px color-mix(in srgb, var(--c) 28%, transparent); }
.member-name { font-size: 1.1rem; font-weight: 700; }
.member-role { color: var(--muted); font-size: .9rem; margin-top: 5px; }
.team-note { color: var(--muted); font-size: .82rem; text-align: center; margin-top: 22px; opacity: .8; }

/* ============ FAQ PAGE ============ */
.faq-wrap { display: grid; gap: 30px; max-width: 860px; margin: 0 auto; }
.faq-group { display: grid; gap: 12px; }
.faq-group-title { display: flex; align-items: center; gap: 11px; font-size: 1.18rem; font-weight: 700; margin-bottom: 4px; }
.faq-group-ic { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; color: var(--violet); background: color-mix(in srgb, var(--violet) 16%, transparent); border: 1px solid color-mix(in srgb, var(--violet) 36%, transparent); box-shadow: inset 0 0 16px color-mix(in srgb, var(--violet) 20%, transparent); }
.faq-group-ic svg { width: 21px; height: 21px; }

.faq-item { border: 1px solid var(--glass-brd); border-radius: 16px; background: var(--glass-bg); -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur)); overflow: hidden; transition: border-color .25s var(--ease), background .25s var(--ease); }
.faq-item[open] { border-color: color-mix(in srgb, var(--violet) 48%, transparent); }
.faq-item summary { display: flex; align-items: center; gap: 12px; padding: 17px 20px; font-size: 1rem; font-weight: 600; color: var(--text); cursor: pointer; list-style: none; transition: color .2s var(--ease); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: #fff; }
.faq-item summary::after { content: ""; flex: none; width: 11px; height: 11px; margin-inline-start: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .3s var(--ease); opacity: .75; }
.faq-item[open] summary::after { transform: rotate(225deg); }
.faq-body { padding: 0 20px 18px; }
.faq-body p { color: var(--muted); font-size: .95rem; line-height: 1.9; }
.faq-body strong { color: var(--text); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .faq-item[open] .faq-body { animation: faqIn .3s var(--ease); }
  @keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } }
}

.faq-cta { max-width: 860px; margin: 44px auto 0; padding: 34px 28px; border-radius: var(--radius); text-align: center; }
.faq-cta-title { font-size: 1.35rem; font-weight: 800; }
.faq-cta-text { color: var(--muted); margin: 8px 0 20px; }

/* ============ LEGAL PAGE (rules + privacy) ============ */
.legal-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 30px; }
.legal-tab { padding: 9px 20px; border-radius: 999px; font-size: .92rem; font-weight: 600; color: var(--muted); background: var(--glass-bg); border: 1px solid var(--glass-brd); transition: color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease); }
.legal-tab:hover { color: #fff; background: color-mix(in srgb, var(--violet) 22%, transparent); border-color: color-mix(in srgb, var(--violet) 45%, transparent); }

.legal-content { display: grid; gap: 26px; max-width: 860px; margin: 0 auto; }
.legal-seg { padding: 30px 30px 34px; border-radius: var(--radius); scroll-margin-top: 100px; }
.legal-seg-head { display: flex; align-items: center; gap: 13px; }
.legal-seg-ic { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 13px; color: var(--violet); background: color-mix(in srgb, var(--violet) 16%, transparent); border: 1px solid color-mix(in srgb, var(--violet) 36%, transparent); box-shadow: inset 0 0 16px color-mix(in srgb, var(--violet) 20%, transparent); }
.legal-seg-ic svg { width: 23px; height: 23px; }
.legal-seg-title { font-size: 1.35rem; font-weight: 800; }
.legal-meta { color: var(--muted); font-size: .82rem; margin-top: 8px; opacity: .8; }

.legal-doc { margin-top: 18px; }
.legal-doc > p { color: var(--muted); font-size: .96rem; line-height: 1.95; }
.legal-doc h4 { font-size: 1.04rem; font-weight: 700; color: var(--text); margin: 24px 0 8px; }
.legal-doc ul { list-style: none; margin: 6px 0; display: grid; gap: 8px; }
.legal-doc li { position: relative; color: var(--muted); font-size: .94rem; line-height: 1.85; padding-inline-start: 20px; }
.legal-doc li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--magenta); }
.legal-doc strong { color: var(--text); font-weight: 600; }
.legal-doc a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.legal-disclaimer { max-width: 860px; margin: 26px auto 0; text-align: center; color: var(--muted); font-size: .82rem; opacity: .8; }

/* ============ SCROLL REVEAL ============ */
.reveal { opacity: 0; transform: translateY(26px) scale(.99); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { max-width: none; }
  .hero-art { order: -1; max-width: 360px; }
  .about-inner { grid-template-columns: 1fr; }
  .art-frame { aspect-ratio: 16 / 10; max-width: 520px; }
  .mission-inner { grid-template-columns: 1fr; }
  .app-feature { grid-template-columns: 1fr; text-align: center; }
  .app-mock { order: -1; }
  .dice { --dz: 34px; }
  .dice--start { top: 2%; }
  .dice--end { top: 10%; }
  .store-badges { margin-inline: auto; }
  .about-text, .app-text, .section-lead { margin-inline: auto; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --frame-inset: 8px; --frame-radius: 22px; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; inset: 80px 8px auto 8px; flex-direction: column; align-items: stretch; gap: 6px;
    padding: 14px; border-radius: 22px;
    background: rgba(22, 15, 40, .96); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border: 1px solid var(--glass-brd);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform .32s var(--ease), opacity .32s var(--ease), visibility .32s; z-index: 75;
  }
  .main-nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .main-nav a { padding: 13px 16px; }
  .nav-cta { text-align: center; }
}

@media (max-width: 560px) {
  .container { padding-inline: 18px; }
  .hero-stats { gap: 22px 38px; }
  .games-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .game-card { padding: 20px 16px 18px; }
  .game-ic { width: 48px; height: 48px; }
  .game-ic.game-ic--art { width: calc(100% + 32px); margin: -20px -16px 14px; }
  .game-ic svg { width: 26px; height: 26px; }
  .game-desc { min-height: 0; }
  .mission-values { grid-template-columns: 1fr 1fr; }
  .store-badges { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 380px) {
  .games-grid { grid-template-columns: 1fr; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track, .blob, .ember { animation: none !important; }
  .embers { display: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .01ms !important; }
}
