/* Dragons & Gems — лендинг. Палитра игры: ночной сапфир, золото рамок, шесть самоцветов. */
@font-face {
  font-family: "MPlus Rounded";
  src: url("../fonts/mplus-rounded-extrabold.woff") format("woff");
  font-weight: 800;
  font-display: swap;
}

:root {
  --night: #070b24;
  --deep: #0c1440;
  --sapphire: #13235f;
  --sapphire-hi: #1d3690;
  --gold: #f4bd50;
  --gold-hi: #ffe09a;
  --gold-deep: #a9651a;
  --ink: #f1f3ff;
  --muted: #aeb7dd;
  --ruby: #e0304a;
  --topaz: #f08a1c;
  --citrine: #ecc81f;
  --emerald: #1aa862;
  --sapphire-gem: #2a5fe0;
  --amethyst: #8a3fe0;
  --display: "MPlus Rounded", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: #1b1200; padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- Шапка ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .25s, box-shadow .25s;
}
.top.is-stuck { background: rgba(7, 11, 36, .9); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(244, 189, 80, .25); }
.top__in { display: flex; align-items: center; gap: 20px; height: 64px; }
.top__brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 17px; white-space: nowrap; }
.top__brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1.5px var(--gold); }
.top__nav { display: flex; gap: 22px; margin-left: auto; }
.top__nav a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600; opacity: .85; }
.top__nav a:hover { opacity: 1; color: var(--gold-hi); }
.lang { display: flex; border: 1.5px solid rgba(244, 189, 80, .55); border-radius: 999px; overflow: hidden; font-size: 13px; font-weight: 700; }
.lang a, .lang span { padding: 5px 11px; text-decoration: none; color: var(--ink); }
.lang span { background: var(--gold); color: #241600; }
@media (max-width: 860px) { .top__nav { display: none; } .lang { margin-left: auto; } }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 22px 12px 16px; border-radius: 14px;
  font-family: var(--display); font-size: 17px; line-height: 1.1; color: #fff; text-decoration: none;
  background: linear-gradient(#2fbf5b, #17853a);
  border: 2px solid #0c5a25;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 6px 0 #0b4a1f, 0 14px 24px rgba(0, 0, 0, .35);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { color: #fff; transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 3px 0 #0b4a1f; }
.btn--store { background: linear-gradient(#1b2a6e, #0d1746); border-color: var(--gold); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .14), 0 6px 0 #060a24, 0 14px 24px rgba(0, 0, 0, .35); cursor: default; }
.btn--store:hover { transform: none; }
.btn--store small { display: block; font: 600 11px/1.2 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--gold-hi); margin-bottom: 3px; }
.btn svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
.stores { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Первый экран ---------- */
.hero { position: relative; isolation: isolate; padding: 104px 0 0; min-height: min(100svh, 900px); display: flex; flex-direction: column; }
.hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 30% 100%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 11, 36, .78) 0%, rgba(7, 11, 36, .25) 30%, rgba(7, 11, 36, .35) 62%, var(--night) 100%),
    radial-gradient(80% 60% at 20% 45%, rgba(7, 11, 36, .72), transparent 70%);
}
.hero__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(24px, 4vw, 56px); align-items: center; flex: 1; padding-bottom: 56px; }
.hero__logo { width: min(560px, 100%); filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .55)); }
.hero__tag { font-family: var(--display); font-size: clamp(26px, 3.6vw, 44px); margin-top: 22px; text-shadow: 0 3px 12px rgba(0, 0, 0, .6); }
.hero__tag em { font-style: normal; color: var(--gold); }
.hero__lead { margin-top: 16px; font-size: clamp(17px, 1.5vw, 19px); max-width: 34em; color: #e3e7ff; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.hero .stores { margin-top: 28px; }
.hero__note { margin-top: 14px; font-size: 14px; color: var(--muted); text-shadow: 0 2px 6px rgba(0, 0, 0, .8); }
.hero__stage { position: relative; padding: 0 0 26px 9%; }
.hero__amber { position: absolute; left: -4%; bottom: 0; width: 30%; z-index: 2; filter: drop-shadow(0 0 14px rgba(255, 170, 60, .45)) drop-shadow(0 14px 12px rgba(0, 0, 0, .55)); animation: breathe 4.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes breathe { 50% { transform: scaleY(1.018) scaleX(.994); } }

.phone { position: relative; border-radius: clamp(18px, 3vw, 34px); padding: clamp(6px, 1vw, 11px); background: linear-gradient(145deg, #2b2f45, #0a0c18 60%); box-shadow: 0 0 0 1.5px #474c6b, 0 30px 60px rgba(0, 0, 0, .6), 0 0 80px rgba(42, 95, 224, .28); }
.phone img { border-radius: clamp(12px, 2.2vw, 24px); width: 100%; aspect-ratio: 852 / 393; object-fit: cover; }
.hero__stage .phone { transform: rotate(1.6deg); }

@media (max-width: 900px) {
  .hero { padding-top: 84px; min-height: 0; }
  .hero__in { grid-template-columns: 1fr; padding-bottom: 36px; }
  .hero__copy { text-align: center; }
  .hero__logo { margin-inline: auto; }
  .hero__lead { margin-inline: auto; }
  .hero .stores { justify-content: center; }
  .hero__stage { padding-left: 12%; }
}

/* ---------- Полоса цифр ---------- */
.stats { background: linear-gradient(180deg, var(--night), var(--deep)); padding: 8px 0 44px; }
.stats ul { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.stats li { text-align: center; padding: 18px 8px; border-radius: var(--radius); background: rgba(29, 54, 144, .28); border: 1px solid rgba(244, 189, 80, .28); }
.stats b { display: block; font: 800 clamp(30px, 4vw, 46px)/1 var(--display); color: var(--gold); text-shadow: 0 3px 0 var(--gold-deep); }
.stats span { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); }
@media (max-width: 720px) { .stats ul { grid-template-columns: repeat(2, 1fr); } .stats li:last-child { grid-column: 1 / -1; } }

/* ---------- Секции ---------- */
.sec { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.sec--deep { background: var(--deep); }
.sec--glow { background: radial-gradient(70% 50% at 50% 0%, rgba(42, 95, 224, .22), transparent 70%), var(--night); }
.sec__head { max-width: 760px; margin: 0 auto clamp(30px, 4vw, 52px); text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 700 13px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.eyebrow::before, .eyebrow::after { content: ""; width: 9px; height: 13px; background: var(--gold); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.sec h2 { font-size: clamp(30px, 4.4vw, 50px); }
.sec__head p { margin-top: 16px; color: var(--muted); font-size: clamp(17px, 1.6vw, 19px); }

/* Окно игры: сапфировая панель в золотой рамке */
.panel {
  position: relative; border-radius: var(--radius); padding: 24px;
  background: linear-gradient(180deg, var(--sapphire-hi), var(--sapphire) 55%, #0e1a4b);
  border: 2px solid var(--gold);
  box-shadow: inset 0 0 0 2px rgba(120, 60, 0, .55), inset 0 2px 30px rgba(0, 0, 0, .35), 0 16px 34px rgba(0, 0, 0, .4);
}
.panel h3 { font-size: 21px; }
.panel p { color: #cfd6f6; margin-top: 8px; font-size: 16px; }

/* ---------- Как играть ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 30px; }
.steps li::before { content: counter(step); position: absolute; top: -20px; left: 20px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; font: 800 20px/1 var(--display); color: #2a1700; background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 55%, var(--gold-deep)); box-shadow: 0 4px 0 #6b3d0a; }
.palette { display: flex; gap: 6px; margin-top: 14px; }
.palette img { width: 30px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 34px; } }

/* ---------- Демо ---------- */
.demo { margin-top: clamp(36px, 5vw, 60px); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: center; }
.demo__board { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; padding: 10px; border-radius: var(--radius); background: #050818; border: 2px solid var(--gold); box-shadow: 0 16px 34px rgba(0, 0, 0, .45); touch-action: manipulation; }
.cell { aspect-ratio: 1; border-radius: 4px; background: var(--c); opacity: .62; position: relative; transition: background-color .28s, opacity .28s, transform .28s; }
.cell::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(135deg, rgba(255, 255, 255, .38) 0 34%, transparent 35% 65%, rgba(0, 0, 0, .3) 66%); }
.cell.p1, .cell.p2 { opacity: 1; }
.cell.p1 { box-shadow: 0 0 0 1px rgba(255, 224, 154, .9); z-index: 1; }
.cell.p2 { box-shadow: 0 0 0 1px rgba(10, 12, 24, .9); filter: saturate(.75) brightness(.8); }
.cell.pop { transform: scale(1.16); }
.c0 { --c: var(--ruby); } .c1 { --c: var(--citrine); } .c2 { --c: var(--emerald); } .c3 { --c: var(--sapphire-gem); } .c4 { --c: var(--topaz); }
.demo__side h3 { font-size: clamp(24px, 2.6vw, 32px); }
.demo__side > p { color: var(--muted); margin-top: 10px; }
.demo__score { display: flex; gap: 12px; margin-top: 20px; }
.demo__score div { flex: 1; padding: 12px 14px; border-radius: 14px; background: rgba(29, 54, 144, .35); border: 1px solid rgba(244, 189, 80, .3); }
.demo__score span { display: block; font-size: 13px; color: var(--muted); }
.demo__score b { font: 800 30px/1.1 var(--display); color: var(--gold); }
.demo__picks { display: flex; gap: 10px; margin-top: 18px; }
.demo__picks button { flex: 1; max-width: 68px; padding: 6px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .07); cursor: pointer; transition: transform .12s, background .12s, opacity .2s; }
.demo__picks button:hover:not(:disabled) { transform: translateY(-4px); background: rgba(255, 255, 255, .16); }
.demo__picks button:disabled { opacity: .25; cursor: not-allowed; }
.demo__picks img { width: 100%; }
.demo__status { margin-top: 16px; min-height: 1.6em; font-weight: 700; color: var(--gold-hi); }
.demo__again { margin-top: 6px; background: none; border: 0; padding: 0; color: var(--gold); font: 600 15px var(--body); text-decoration: underline; cursor: pointer; }
@media (max-width: 860px) { .demo { grid-template-columns: 1fr; } }

/* ---------- Легенда ---------- */
.legend { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.legend__art { position: relative; padding: 0 12% 12% 0; }
.legend__art img { border-radius: var(--radius); border: 2px solid var(--gold); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
.legend__art img + img { position: absolute; right: 0; bottom: 0; width: 52%; transform: rotate(3deg); }
.legend__text h2 { text-align: left; }
.legend__text p { margin-top: 16px; color: #d5dbf7; }
.legend__text p.quote { font-family: var(--display); font-size: 21px; color: var(--gold-hi); padding-left: 18px; border-left: 4px solid var(--gold); }
@media (max-width: 860px) { .legend { grid-template-columns: 1fr; } }

/* ---------- Земли ---------- */
.lands { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.land { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.land__art { position: relative; }
.land__art > img:first-child { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.land__art::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(14, 26, 75, .95)); }
.land__boss { position: absolute; right: 8px; bottom: -14px; height: 78%; width: auto; z-index: 1; filter: drop-shadow(0 0 8px rgba(140, 190, 255, .45)) drop-shadow(0 8px 8px rgba(0, 0, 0, .5)); transition: transform .25s; }
.land:hover .land__boss { transform: translateY(-6px) scale(1.04); }
.land__num { position: absolute; left: 12px; top: 12px; z-index: 1; min-width: 34px; height: 34px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px; font: 800 16px/1 var(--display); color: #2a1700; background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 55%, var(--gold-deep)); box-shadow: 0 3px 0 #6b3d0a; }
.land__body { padding: 18px 20px 20px; }
/* Десятая земля — финал: карточка во всю ширину сетки. */
@media (min-width: 1040px) {
  .lands { grid-template-columns: repeat(3, 1fr); }
  .land:last-child { grid-column: 1 / -1; flex-direction: row; }
  .land:last-child .land__art { flex: 0 0 46%; }
  .land:last-child .land__art > img:first-child { height: 100%; aspect-ratio: 21 / 9; }
  .land:last-child .land__art::after { inset: 0 0 0 55%; background: linear-gradient(90deg, transparent, rgba(20, 38, 104, .96)); }
  .land:last-child .land__body { align-self: center; padding: 28px 36px; }
  .land:last-child h3 { font-size: 30px; }
  .land:last-child dl { font-size: 17px; }
}
.land dl { margin: 10px 0 0; font-size: 15px; }
.land dt { float: left; clear: left; margin-right: 6px; color: var(--gold); font-weight: 700; }
.land dd { margin: 0 0 4px; color: #cfd6f6; }

/* ---------- Тайлы и бусты ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center; }
.tile img { width: 64px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45)); }
.tile--boost img { width: 64px; }
.tile p { margin-top: 4px; font-size: 15px; }
.sub { font-size: clamp(22px, 2.6vw, 30px); text-align: center; margin: clamp(40px, 5vw, 64px) 0 26px; }
.boosts { grid-template-columns: repeat(4, 1fr); }
.boosts .tile { grid-template-columns: 1fr; text-align: center; justify-items: center; }
@media (max-width: 980px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tiles, .boosts { grid-template-columns: 1fr; } .boosts .tile { grid-template-columns: 64px 1fr; text-align: left; } }

/* ---------- Режимы ---------- */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mode { text-align: center; padding-top: 0; }
.mode__emblem { width: 120px; height: 108px; object-fit: contain; margin: -44px auto 8px; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); }
.mode ul { margin-top: 14px; text-align: left; font-size: 15px; color: #cfd6f6; }
.mode li { padding-left: 22px; position: relative; margin-top: 7px; }
.mode li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 9px; height: 13px; background: var(--gold); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
@media (max-width: 860px) { .modes { grid-template-columns: 1fr; gap: 56px; } }

/* ---------- Галерея ---------- */
.gallery { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px var(--gutter) 22px; scrollbar-color: var(--gold) transparent; }
.gallery figure { flex: 0 0 min(78vw, 640px); margin: 0; scroll-snap-align: center; }
.gallery figcaption { margin-top: 10px; text-align: center; font-size: 14px; color: var(--muted); }
.gallery__nav { display: flex; justify-content: center; gap: 12px; margin-top: 6px; }
.gallery__nav button { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--gold); background: var(--sapphire); color: var(--gold-hi); font-size: 20px; cursor: pointer; }
.gallery__nav button:hover { background: var(--sapphire-hi); }

/* ---------- Скины ---------- */
.skins { display: flex; gap: 6px; overflow-x: auto; padding: 10px var(--gutter) 18px; justify-content: safe center; scrollbar-color: var(--gold) transparent; }
.skins li { flex: 0 0 auto; width: clamp(96px, 9vw, 116px); text-align: center; font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.skins img { height: clamp(120px, 12vw, 150px); width: auto; margin: 0 auto 8px; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .5)); transition: transform .2s; }
.skins li:hover img { transform: translateY(-6px); }

/* ---------- Честная игра ---------- */
.fair { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.fair li { padding: 22px; border-radius: var(--radius); background: rgba(29, 54, 144, .22); border: 1px solid rgba(244, 189, 80, .28); }
.fair h3 { font-size: 19px; color: var(--gold-hi); }
.fair p { margin-top: 8px; font-size: 15.5px; color: #cfd6f6; }
@media (max-width: 860px) { .fair { grid-template-columns: 1fr; } }

/* ---------- Вопросы ---------- */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { border-radius: 14px; background: rgba(29, 54, 144, .28); border: 1px solid rgba(244, 189, 80, .3); }
.faq summary { cursor: pointer; padding: 18px 52px 18px 20px; font: 800 18px/1.3 var(--display); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; translate: 0 -50%; font-size: 26px; color: var(--gold); transition: rotate .2s; }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { padding: 0 20px 20px; color: #cfd6f6; }

/* ---------- Финал и подвал ---------- */
.final { text-align: center; position: relative; overflow: hidden; background: radial-gradient(60% 80% at 50% 100%, rgba(244, 189, 80, .2), transparent 70%), var(--deep); }
.final__amber { width: min(240px, 46vw); margin: 0 auto 10px; filter: drop-shadow(0 0 18px rgba(255, 170, 60, .5)); }
.final h2 { font-size: clamp(30px, 4.6vw, 54px); }
.final p { color: var(--muted); margin: 14px auto 28px; max-width: 34em; }
.final .stores { justify-content: center; }
.foot { padding: 30px 0 40px; font-size: 14px; color: var(--muted); border-top: 1px solid rgba(244, 189, 80, .2); }
.foot__in { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
.foot a { color: var(--muted); }

/* Появление при прокрутке */
.rise { opacity: 0; transform: translateY(26px); transition: opacity .6s, transform .6s; }
.rise.in { opacity: 1; transform: none; }
.no-js .rise { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { opacity: 1; transform: none; transition: none; }
  .hero__amber { animation: none; }
  .cell { transition: none; }
}
