/* Сайт Poor to Rich: Business Tycoon — тёмно-синий с золотом, как экраны игры. Одна тема сознательно — у игры её нет второй. */
:root {
    color-scheme: dark;
    --ink: #05060f;
    --navy: #0a1033;
    --navy-2: #111a4d;
    --navy-3: #1a2566;
    --line: rgba(246, 214, 128, .18);
    --line-strong: rgba(246, 214, 128, .45);
    --gold: #f6d680;
    --gold-2: #be8c34;
    --gold-deep: #8a6220;
    --text: #eef0fa;
    --muted: #a7add0;
    --danger: #ff8a7a;
    --radius: 18px;
    --gutter: clamp(16px, 4vw, 40px);
    --display: 'Forum', 'Times New Roman', serif;
    --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background:
        radial-gradient(1200px 600px at 50% -200px, rgba(40, 60, 190, .45), transparent 70%),
        linear-gradient(180deg, var(--navy) 0%, var(--ink) 900px) var(--ink);
    background-repeat: no-repeat;
    color: var(--text);
    font: 400 16px/1.6 var(--body);
    min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: .01em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.5rem; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 760px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--gold); color: var(--ink); padding: 8px 12px; border-radius: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.kicker {
    font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 14px;
}
.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--muted); max-width: 58ch; margin-top: 18px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* Кнопки — как в игре: золотая пилюля с тёмным текстом. */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 24px; border: 0; border-radius: 999px; cursor: pointer;
    font: 800 .95rem/1 var(--body); letter-spacing: .02em; color: #2a1a03;
    background: linear-gradient(180deg, #fbe7a6 0%, var(--gold) 45%, var(--gold-2) 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 8px 24px rgba(190, 140, 52, .25);
    text-decoration: none !important;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--small { padding: 9px 16px; font-size: .85rem; }
.btn--ghost { background: transparent; color: var(--gold); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--ghost:hover { background: rgba(246, 214, 128, .08); }

.notice {
    margin-top: 16px; padding: 12px 16px; border-radius: 12px;
    background: rgba(246, 214, 128, .1); border: 1px solid var(--line-strong); color: var(--gold);
}
.notice--error { background: rgba(255, 138, 122, .1); border-color: rgba(255, 138, 122, .45); color: var(--danger); }

/* Шапка */
.topbar {
    position: sticky; top: 0; z-index: 5;
    background: rgba(7, 10, 31, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding-top: env(safe-area-inset-top, 0px);
}
.topbar__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font: 400 1.6rem/1 var(--display); text-decoration: none !important; }
.nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 26px); flex-wrap: wrap; }
.nav a:not(.btn) { color: var(--text); font-weight: 500; font-size: .95rem; }
.nav a[aria-current] { color: var(--gold); }
.nav__lang { font-size: .8rem !important; letter-spacing: .1em; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; }

/* Первый экран */
.hero { padding-block: clamp(40px, 8vw, 96px) clamp(32px, 6vw, 72px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; }
.hero__text #download { margin-top: 32px; }
.hero__art { position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; justify-self: center; }
.hero__ring {
    position: absolute; inset: 2%; border-radius: 50%;
    background: radial-gradient(circle, rgba(246, 214, 128, .22) 0%, transparent 62%);
    box-shadow: 0 0 0 1px var(--line), 0 0 0 22px rgba(246, 214, 128, .03), 0 0 0 23px var(--line);
}
.hero__coin { position: relative; width: 82%; margin: 9%; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .55)); animation: float 6s ease-in-out infinite; }
.hero__spark { position: absolute; animation: twinkle 3.2s ease-in-out infinite; }
.hero__spark--a { top: 10%; right: 12%; }
.hero__spark--b { bottom: 16%; left: 6%; animation-delay: 1.4s; }
@keyframes float { 50% { transform: translateY(-12px) rotate(-2deg); } }
@keyframes twinkle { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .hero__coin, .hero__spark { animation: none; } }

/* Кнопки сторов */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
    display: inline-flex; align-items: center; gap: 12px; min-width: 190px;
    padding: 10px 20px 10px 16px; border-radius: 14px;
    background: #000; color: #fff; border: 1px solid rgba(255, 255, 255, .28);
    text-decoration: none !important; transition: border-color .15s, transform .15s;
}
.store:hover { border-color: var(--gold); transform: translateY(-1px); }
.store svg { width: 28px; height: 28px; flex: none; }
.store span { display: flex; flex-direction: column; font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.store small { font-weight: 500; font-size: .7rem; letter-spacing: .02em; opacity: .85; }

/* Секции */
.section { padding-block: clamp(40px, 7vw, 88px); }
.section--tight { padding-block: 8px 72px; }
.section--panel { background: linear-gradient(180deg, rgba(26, 37, 102, .35), rgba(10, 16, 51, .2)); border-block: 1px solid var(--line); }
.section__title { margin-bottom: 28px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.feature {
    overflow: hidden;
    display: flex; flex-direction: column; gap: 10px; padding: 28px;
    border-radius: var(--radius); border: 1px solid var(--line);
    background: linear-gradient(160deg, rgba(26, 37, 102, .55), rgba(10, 16, 51, .55));
}
.feature--dark { background: linear-gradient(160deg, rgba(60, 18, 22, .55), rgba(10, 8, 20, .7)); border-color: rgba(255, 138, 122, .2); }
.feature p { color: var(--muted); }
.feature__art { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 150px; margin-bottom: 8px; }
.feature__art--grid { display: grid; grid-template-columns: repeat(6, 1fr); }
.feature__art--grid img { width: 100%; max-width: 72px; justify-self: center; }
.feature__art--pair img { width: 120px; }
.feature__art--cards { position: relative; padding-inline: 8%; }
.feature__art--cards img { width: 36%; border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.feature__art--cards img:nth-child(1) { transform: rotate(-8deg) translateX(18%); }
.feature__art--cards img:nth-child(2) { z-index: 1; transform: translateY(-6px); }
.feature__art--cards img:nth-child(3) { transform: rotate(8deg) translateX(-18%); }

.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.split .btn { margin-top: 24px; }

.panel {
    padding: 24px; border-radius: var(--radius); border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, rgba(17, 26, 77, .9), rgba(7, 10, 31, .9));
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.panel > * + * { margin-top: 14px; }
.panel__title { font-size: 1.6rem; color: var(--gold); }

/* Рейтинг */
.ranking { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.ranking__head, .ranking__row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.ranking__head { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 0 12px 8px; }
.ranking__head span:last-child { text-align: right; }
.ranking__row { padding: 12px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.ranking__place { font: 400 1.35rem/1 var(--display); color: var(--muted); text-align: center; }
.ranking__row--top .ranking__place { color: var(--gold); }
.ranking__name { color: var(--text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking__wealth { color: var(--gold); font-weight: 700; text-align: right; }

.page-head { padding-block: clamp(36px, 6vw, 72px) 32px; }

.search { display: flex; gap: 10px; margin-top: 28px; max-width: 460px; }
input[type=search], input[type=email], input[type=password], input[type=text], select, textarea {
    flex: 1; min-width: 0; padding: 12px 16px; border-radius: 12px;
    border: 1px solid var(--line-strong); background: rgba(5, 6, 15, .6); color: var(--text);
    font: 500 1rem var(--body);
}
input::placeholder { color: #6f75a0; }

.forbes { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.ranks { display: flex; flex-direction: column; gap: 8px; }
.ranks__item {
    display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 16px;
    border-radius: 12px; border: 1px solid var(--line); color: var(--text); text-decoration: none !important;
    background: rgba(17, 26, 77, .35);
}
.ranks__item:hover { border-color: var(--line-strong); }
.ranks__item.is-current { border-color: var(--gold); background: rgba(246, 214, 128, .1); }
.ranks__item.is-empty { opacity: .55; }
.ranks__name { font-weight: 700; grid-column: 1 / -1; }
.ranks__range { color: var(--gold); font-size: .85rem; font-variant-numeric: tabular-nums; }
.ranks__count { color: var(--muted); font-size: .85rem; text-align: right; }

/* Профиль */
.profile { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.profile__badge {
    width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; flex: none;
    font: 400 3.6rem/1 var(--display); color: #2a1a03;
    background: radial-gradient(circle at 35% 30%, #fff3c8, var(--gold) 45%, var(--gold-2) 80%, var(--gold-deep));
    box-shadow: 0 0 0 6px rgba(246, 214, 128, .15), 0 20px 40px rgba(0, 0, 0, .5);
}
.profile__wealth { font: 400 clamp(1.8rem, 4vw, 2.6rem)/1.2 var(--display); color: var(--gold); margin-top: 8px; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 0; }
.stat { padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(17, 26, 77, .45); }
.stat dt { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stat dd { margin: 6px 0 0; font: 400 2rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.stat small { font: 500 .9rem var(--body); color: var(--muted); }
.row-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Новости */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.news-card {
    display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: var(--radius);
    border: 1px solid var(--line); background: rgba(17, 26, 77, .45); color: var(--text); text-decoration: none !important;
}
.news-card:hover { border-color: var(--line-strong); }
.news-card img { border-radius: 12px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; margin-bottom: 6px; }
.news-card time, .article time { font-size: .8rem; color: var(--gold); letter-spacing: .08em; }
.news-card p { color: var(--muted); font-size: .95rem; }
.article { padding-block: 48px 80px; }
.article h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 10px 0 28px; }
.article p { font-size: 1.08rem; color: #d5d9ee; margin-top: 18px; max-width: 65ch; }
.article__image { border-radius: var(--radius); margin-bottom: 12px; }
.back { display: inline-block; margin-bottom: 24px; font-size: .95rem; }

/* Магазин */
.shop { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.shop__account { position: sticky; top: 88px; }
.shop__who { font: 400 1.8rem/1.1 var(--display); color: var(--gold); }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; color: var(--muted); }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.product {
    position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px;
    border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(170deg, rgba(26, 37, 102, .6), rgba(10, 16, 51, .6));
}
.product__art { display: grid; place-items: center; height: 130px; }
.product__art img { max-height: 120px; width: auto; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .45)); }
.product h3 { font-size: 1.35rem; }
.product__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.product__price { font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.product__badge {
    position: absolute; top: 14px; right: 14px; padding: 4px 10px; border-radius: 999px;
    background: var(--gold); color: #2a1a03; font-size: .72rem; font-weight: 800; letter-spacing: .04em;
}
.tag { font-size: .8rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--gold); }

/* Призыв внизу */
.cta__box {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px;
    padding-block: 48px; border-radius: 28px; border: 1px solid var(--line-strong);
    background:
        linear-gradient(135deg, transparent 0 46%, var(--line) 46% 46.4%, transparent 46.4% 53.6%, var(--line) 53.6% 54%, transparent 54%),
        radial-gradient(600px 300px at 50% 0, rgba(246, 214, 128, .14), transparent 70%),
        rgba(10, 16, 51, .7);
}
.cta__box p { color: var(--muted); max-width: 46ch; }
.cta__box .stores { justify-content: center; margin-top: 8px; }

/* Подвал */
.footer { border-top: 1px solid var(--line); padding-block: 32px calc(32px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: .9rem; }
.footer__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.footer__brand { display: flex; align-items: center; gap: 10px; font: 400 1.3rem var(--display); color: var(--text); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer__nav a { color: var(--muted); }
.footer__copy { width: 100%; font-size: .8rem; }

@media (max-width: 880px) {
    .hero__grid, .split, .forbes, .shop { grid-template-columns: 1fr; }
    .hero__art { max-width: 300px; order: -1; }
    .features { grid-template-columns: 1fr; }
    .shop__account { position: static; }
    .ranks { flex-direction: row; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
    .ranks__item { flex: 0 0 220px; scroll-snap-align: start; }
}

@media (max-width: 560px) {
    .nav a:not(.btn):not(.nav__lang) { font-size: .88rem; }
    .topbar__row { padding-block: 8px; }
    .feature { padding: 20px; }
    .feature__art--grid { grid-template-columns: repeat(3, 1fr); }
    .store { min-width: 0; flex: 1 1 160px; }
    .ranking__head, .ranking__row { grid-template-columns: 40px minmax(0, 1fr) auto; }
    .search { flex-direction: column; }
}

.code-input { letter-spacing: .5em; font-size: 1.4rem !important; text-align: center; font-variant-numeric: tabular-nums; }
.linklike { background: none; border: 0; padding: 0; color: var(--gold); font: 500 .9rem var(--body); cursor: pointer; }
.linklike:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Политика конфиденциальности */
.policy h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 40px; color: var(--gold); }
.policy ul { margin: 14px 0 0; padding-left: 1.2em; max-width: 65ch; }
.policy li { font-size: 1.02rem; color: #d5d9ee; margin-top: 10px; }
.policy a { color: var(--gold); text-underline-offset: 3px; }
.policy code { font-size: .9em; color: var(--gold); }
.policy__form { margin-top: 48px; max-width: 560px; }
.policy .policy__form h2 { margin-top: 0; }
.policy__form textarea { resize: vertical; font: 500 1rem/1.4 var(--body); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
