/* upsteam.site — светлая страница, тёмная «консоль» пополнения как главный элемент */
:root {
  --paper: #EEF1F4;
  --paper-2: #E3E8ED;
  --ink: #15202B;
  --steel: #5B6B7A;
  --line: #D3DAE1;
  --night: #17222D;
  --night-2: #1F2D3A;
  --night-line: #2C3B49;
  --ice: #5CC2FF;
  --ice-ink: #06263A;
  --go: #38D17A;
  --wait: #F5B642;
  --bad: #F0616D;
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 20px;
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { position: relative; overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column; color: var(--ink); background: var(--paper); font: 400 16px/1.55 var(--font); font-feature-settings: 'tnum' 1; }
main { flex: 1; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
img { display: block; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }

/* ===== Шапка ===== */
.top { position: sticky; top: 0; z-index: 10; background: rgba(238, 241, 244, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 32px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.03em; text-decoration: none; }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { color: var(--steel); font-size: 15px; font-weight: 500; text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.acc { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.acc:hover { border-color: var(--steel); }

/* ===== Первый экран ===== */
.hero { display: grid; grid-template-columns: 1fr 540px; gap: 56px; align-items: start; padding: 64px 0 88px; }
.hero h1 { max-width: 12ch; font-size: clamp(40px, 5.4vw, 64px); font-weight: 800; line-height: 1.02; letter-spacing: -.035em; }
.lead { max-width: 46ch; margin-top: 24px; color: var(--steel); font-size: 19px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; max-width: 520px; margin-top: 44px; border-top: 1px solid var(--line); }
.facts div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--steel); font-size: 14px; }
.facts dd { margin-top: 2px; font-size: 17px; font-weight: 600; }

/* ===== Консоль пополнения ===== */
.console { display: flex; flex-direction: column; gap: 22px; padding: 28px; border-radius: var(--r-l); color: #E8EEF3; background: var(--night); box-shadow: 0 30px 60px -30px rgba(21, 32, 43, .55); }
.f-row { display: flex; flex-direction: column; gap: 8px; border: 0; min-width: 0; }
.f-row > label, .f-row legend, .f-head label { color: #A9B7C4; font-size: 14px; font-weight: 500; }
.f-head { display: flex; justify-content: space-between; align-items: center; }
.opt { color: #6F8293; font-weight: 400; }
.console input:not([type=radio]) { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--night-line); border-radius: var(--r-m); background: var(--night-2); color: #fff; font-size: 16px; }
.console input::placeholder { color: #66798A; }
.console input:focus { outline: none; border-color: var(--ice); }
.login-box { position: relative; }
.login-state { position: absolute; top: 50%; right: 14px; width: 18px; height: 18px; transform: translateY(-50%); }
.login-box.checking .login-state { border: 2px solid #4A5C6C; border-top-color: var(--ice); border-radius: 50%; animation: spin .7s linear infinite; }
.login-box.ok input { border-color: rgba(56, 209, 122, .6); }
.login-box.ok .login-state { background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2338D17A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 10.5 3.5 3.5 7.5-8'/%3E%3C/svg%3E"); }
.login-box.bad input { border-color: rgba(240, 97, 109, .7); }
.hint { color: #7F92A3; font-size: 13px; }
.hint.ok { color: var(--go); }
.hint.bad { color: var(--bad); }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

.cur { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--night-2); }
.cur button { width: 34px; height: 28px; border: 0; border-radius: 7px; background: none; color: #8C9DAD; font-size: 15px; font-weight: 600; cursor: pointer; }
.cur button[aria-checked=true] { color: var(--ice-ink); background: var(--ice); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -8px; }
.chips button { padding: 6px 12px; border: 1px solid var(--night-line); border-radius: 999px; background: none; color: #C5D1DC; font-size: 14px; cursor: pointer; }
.chips button:hover { border-color: #4A5C6C; }
.chips button[aria-pressed=true] { border-color: var(--ice); color: #fff; }

/* Вы платите → Получите в Steam */
.swap { display: grid; grid-template-columns: 1fr 28px 1fr; align-items: center; gap: 8px; }
.side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.side > label, .side .f-head label { color: #A9B7C4; font-size: 14px; font-weight: 500; }
.side .f-head { min-height: 34px; }
.side > label { display: flex; align-items: center; min-height: 34px; }
.side-box { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px; border: 1px solid var(--night-line); border-radius: var(--r-m); background: var(--night-2); transition: border-color .15s; }
.side-box:focus-within { border-color: var(--ice); }
.console .side-box input { width: 100%; min-width: 0; height: auto; padding: 0; border: 0; background: none; font-size: 32px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.side-unit { flex-shrink: 0; color: #8C9DAD; font-size: 18px; font-weight: 600; }
.side.get .side-box { border-color: rgba(56, 209, 122, .35); }
.side.get .side-box input { color: var(--go); }
.side-sub { min-height: 20px; color: #7F92A3; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-sub.bad { color: var(--bad); }
.swap-arrow { display: grid; place-items: center; width: 28px; height: 28px; margin-top: 8px; border-radius: 50%; color: var(--ice); background: var(--night-2); }

/* Способы оплаты — плитки с иконками */
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.method { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px; border: 1px solid var(--night-line); border-radius: var(--r-m); background: none; color: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.method:hover:not(:disabled) { border-color: #4A5C6C; }
.m-ico { display: grid; flex-shrink: 0; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; }
.m-ico img { width: 30px; height: 30px; }
.method.sbp .m-ico img { width: auto; height: 22px; }
.m-txt { display: flex; flex-direction: column; min-width: 0; }
.m-txt b { font-size: 15px; font-weight: 600; line-height: 1.2; }
.m-txt small { color: #7F92A3; font-size: 12px; line-height: 1.3; }
.method[aria-checked=true] { border-color: var(--ice); background: rgba(92, 194, 255, .1); }
.method[aria-checked=true] .m-txt small { color: #9FD8FF; }
.method:disabled { cursor: default; opacity: .4; filter: grayscale(.5); }
.btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 54px; border: 0; border-radius: var(--r-m); background: var(--ice); color: var(--ice-ink); font-size: 17px; font-weight: 700; text-decoration: none; cursor: pointer; transition: filter .15s; }
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .5; cursor: default; filter: none; }
.btn.small { width: auto; height: 46px; padding: 0 22px; font-size: 15px; }
.btn.ghost { border: 1px solid var(--line); color: var(--ink); background: #fff; }
.fine { margin-top: -8px; color: #6F8293; font-size: 12.5px; }
.fine a { color: #A9B7C4; }
.err { color: var(--bad); font-size: 14px; }
.err:empty { display: none; }

/* ===== Секции ===== */
.how, .ways, .faq { padding: 72px 0; border-top: 1px solid var(--line); }
.how h2, .ways h2, .faq h2 { font-size: 32px; font-weight: 800; letter-spacing: -.025em; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 36px; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 16px; border-radius: 50%; background: var(--night); color: var(--ice); font-weight: 700; }
.steps b { font-size: 19px; }
.steps p { max-width: 34ch; margin-top: 6px; color: var(--steel); }
.way-list { max-width: 720px; margin-top: 28px; list-style: none; border-top: 1px solid var(--line); }
.way-list li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.way-list img { width: 32px; height: 32px; }
.way-list .sbp-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 1px solid var(--line); }
.way-list .sbp-ico img { width: auto; height: 20px; }
.way-list span:not(.sbp-ico) { flex: 1; color: var(--steel); }
.way-list b { color: var(--ink); font-weight: 600; margin-right: 6px; }
.way-list em { color: var(--steel); font-style: normal; font-size: 15px; }
.way-list .soon { opacity: .55; }
.faq details { max-width: 760px; border-bottom: 1px solid var(--line); }
.faq details:first-of-type { margin-top: 24px; border-top: 1px solid var(--line); }
.faq summary { padding: 18px 32px 18px 0; font-size: 17px; font-weight: 600; list-style: none; cursor: pointer; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 14px; color: var(--steel); font-size: 24px; font-weight: 400; }
.faq details[open] summary::after { content: '−'; }
.faq details p { max-width: 64ch; padding-bottom: 20px; color: var(--steel); }

/* ===== Подвал ===== */
.foot { margin-top: 40px; padding: 48px 0 40px; color: #A9B7C4; background: var(--night); }
.foot-in { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.foot .logo { color: #fff; }
.foot-brand p { max-width: 40ch; margin-top: 14px; font-size: 14px; }
.foot-nav, .foot-contact { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.foot a { text-decoration: none; }
.foot a:hover { color: #fff; }

/* ===== Заказ ===== */
.order { max-width: 760px; padding: 48px 0 80px; }
.o-load { padding: 80px 0; color: var(--steel); text-align: center; }
.o-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.o-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.o-head p { margin-top: 4px; color: var(--steel); }
.badge { flex-shrink: 0; padding: 6px 12px; border-radius: 999px; background: var(--paper-2); font-size: 14px; font-weight: 600; }
.badge.wait { color: #7A5300; background: #FBEBC6; }
.badge.go { color: #0D5A30; background: #CFF2DD; }
.badge.bad { color: #7E1720; background: #F9D3D6; }
.track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 28px 0; list-style: none; }
.track li { padding-top: 10px; border-top: 3px solid var(--line); color: var(--steel); font-size: 14px; }
.track li.done { border-color: var(--go); color: var(--ink); }
.track li.now { border-color: var(--wait); color: var(--ink); font-weight: 600; }
.pay-box { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding: 28px; border-radius: var(--r-l); color: #E8EEF3; background: var(--night); }
.qr { width: 220px; height: 220px; padding: 12px; border-radius: var(--r-m); background: #fff; }
.qr svg { display: block; width: 100%; height: 100%; }
.pay-fields { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pf span { display: block; color: #8C9DAD; font-size: 13px; }
.pf .val { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.pf .val code { min-width: 0; font: 600 16px/1.4 var(--font); word-break: break-all; color: #fff; }
.pf.big code { font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.copy { flex-shrink: 0; padding: 6px 10px; border: 1px solid var(--night-line); border-radius: var(--r-s); background: none; color: #C5D1DC; font-size: 13px; cursor: pointer; }
.copy.done { border-color: var(--go); color: var(--go); }
.warn { padding: 12px 14px; border-radius: var(--r-m); color: #F7D58C; background: rgba(245, 182, 66, .1); font-size: 14px; }
.timer { color: #A9B7C4; font-size: 14px; }
.timer b { color: #fff; font-variant-numeric: tabular-nums; }
.o-info { margin-top: 28px; border-top: 1px solid var(--line); }
.o-info div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.o-info dt { color: var(--steel); }
.o-info dd { font-weight: 600; text-align: right; word-break: break-all; }
.o-state { padding: 40px 28px; border-radius: var(--r-l); background: #fff; border: 1px solid var(--line); }
.o-state h2 { font-size: 24px; letter-spacing: -.02em; }
.o-state p { max-width: 54ch; margin-top: 8px; color: var(--steel); }
.o-state .btn { margin-top: 20px; }
.o-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

/* ===== Аккаунт ===== */
.acc-page { max-width: 860px; padding: 48px 0 80px; }
.auth { max-width: 420px; padding: 32px; border: 1px solid var(--line); border-radius: var(--r-l); background: #fff; }
.auth h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.auth p { margin-top: 6px; color: var(--steel); }
.auth form { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.auth label { display: flex; flex-direction: column; gap: 6px; color: var(--steel); font-size: 14px; font-weight: 500; }
.auth input { height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); font-size: 16px; }
.auth input:focus { outline: none; border-color: var(--ink); }
.auth .btn { background: var(--night); color: #fff; }
.auth .switch { margin-top: 18px; font-size: 15px; }
.auth .switch button { border: 0; background: none; color: var(--ink); font-weight: 600; text-decoration: underline; cursor: pointer; }
.acc-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.acc-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.acc-head p { color: var(--steel); }
.olist { margin-top: 28px; border-top: 1px solid var(--line); }
.olist a { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 16px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.olist a:hover { background: rgba(255, 255, 255, .6); }
.olist b { font-weight: 600; }
.olist small { display: block; color: var(--steel); font-size: 14px; }
.olist .sum { font-weight: 700; text-align: right; }
.empty { padding: 40px 0; color: var(--steel); }

/* ===== Документы ===== */
.docs { display: grid; grid-template-columns: 240px 1fr; gap: 56px; padding: 48px 0 80px; }
.doc-nav { position: sticky; top: 88px; align-self: start; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.doc-nav a { padding: 8px 0 8px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--steel); font-size: 15px; text-decoration: none; }
.doc-nav a:hover { color: var(--ink); }
.doc-nav a[aria-current] { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.doc { max-width: 68ch; }
.doc h1 { font-size: 36px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.doc-date { margin-top: 8px; color: var(--steel); font-size: 14px; }
.doc h2 { margin: 32px 0 10px; font-size: 20px; font-weight: 700; }
.doc p, .doc li { color: #2B3946; }
.doc p + p { margin-top: 10px; }
.doc > p:first-of-type:not(.doc-date) { margin-top: 20px; }
.doc ul { margin: 8px 0 0 20px; }
.doc li + li { margin-top: 4px; }
.contacts { margin-top: 8px; }
.req { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin-top: 12px; }
.req dt { color: var(--steel); }
.muted { color: var(--steel); }
.nf { padding: 120px 0; }
.nf h1 { font-size: 40px; font-weight: 800; letter-spacing: -.03em; }
.nf p { margin: 10px 0 24px; color: var(--steel); }

/* ===== Мобильные ===== */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 36px 0 56px; }
  .hero h1 { max-width: none; }
  .facts { margin-top: 28px; }
}
@media (max-width: 720px) {
  .wrap { width: calc(100% - 28px); }
  .top-in { gap: 12px; }
  .nav { display: none; }
  .acc { margin-left: auto; }
  .console { padding: 20px; margin-inline: -4px; }
  .console .amount input { font-size: 44px; }
  .methods { grid-template-columns: 1fr 1fr; }
  .swap { grid-template-columns: 1fr; }
  .swap-arrow { margin: -4px auto; transform: rotate(90deg); }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .foot-in { grid-template-columns: 1fr; gap: 28px; }
  .pay-box { grid-template-columns: 1fr; padding: 20px; }
  .qr { margin: 0 auto; width: 200px; height: 200px; }
  .docs { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; }
  .doc-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; border: 0; }
  .doc-nav a { padding: 6px 12px; margin: 0; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
  .doc-nav a[aria-current] { border-color: var(--ink); }
  .doc h1 { font-size: 28px; }
  .contacts { grid-template-columns: 1fr; }
  .olist a { grid-template-columns: 1fr auto; }
  .olist .badge { grid-column: 1 / -1; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.method b small { color: #8FA2B3; font-size: 12px; font-weight: 600; margin-left: 2px; }

/* ===== Сумма в рублях → поступит в Steam ===== */
.side-label { color: #A9B7C4; font-size: 14px; font-weight: 500; white-space: nowrap; }
.side .cur button { width: 28px; }
.side-sub b { color: #fff; font-weight: 600; }
.side-box.out { min-height: 63px; align-items: center; }
.side-box.out output { color: var(--go); font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Море: акула и пузырьки ===== */
.sea { position: absolute; inset: 64px 0 auto; height: 720px; overflow: hidden; pointer-events: none; z-index: 0; }
.hero { position: relative; z-index: 1; }
.shark-swim { position: absolute; top: 560px; left: 0; width: 320px; height: 125px; background: #2B5F86; opacity: .13;
  -webkit-mask: url(/assets/i/shark.svg) no-repeat center/contain; mask: url(/assets/i/shark.svg) no-repeat center/contain;
  animation: swim 40s linear infinite; animation-delay: -19s; will-change: transform; }
@keyframes swim {
  0% { transform: translate(110vw, 0) rotate(-1deg); }
  25% { transform: translate(72vw, -26px) rotate(2deg); }
  50% { transform: translate(35vw, 8px) rotate(-2deg); }
  75% { transform: translate(-2vw, -18px) rotate(1deg); }
  100% { transform: translate(-40vw, 0) rotate(-1deg); }
}
.bub { position: absolute; bottom: -20px; width: 10px; height: 10px; border: 1.5px solid rgba(30, 120, 190, .22); border-radius: 50%; animation: rise 14s linear infinite; }
.bub::after { content: ''; position: absolute; top: 2px; left: 2px; width: 3px; height: 3px; border-radius: 50%; background: rgba(30, 120, 190, .25); }
.b1 { left: 8%; animation-delay: -2s; }
.b2 { left: 22%; width: 6px; height: 6px; animation-duration: 18s; animation-delay: -9s; }
.b3 { left: 41%; width: 14px; height: 14px; animation-duration: 16s; animation-delay: -5s; }
.b4 { left: 47%; width: 7px; height: 7px; animation-duration: 12s; animation-delay: -11s; }
.b5 { left: 30%; width: 9px; height: 9px; animation-duration: 20s; animation-delay: -14s; }
@keyframes rise { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 50% { transform: translate(12px, -360px); } 90% { opacity: 1; } 100% { transform: translate(-6px, -720px); opacity: 0; } }

.console { position: relative; overflow: hidden; }
.console > *:not(.console-shark) { position: relative; z-index: 1; }
.console-shark { position: absolute; right: -40px; bottom: 70px; width: 260px; height: 102px; background: #5CC2FF; opacity: .08;
  -webkit-mask: url(/assets/i/shark.svg) no-repeat center/contain; mask: url(/assets/i/shark.svg) no-repeat center/contain; transform: scaleX(-1); animation: bob 7s ease-in-out infinite; }
@keyframes bob { 50% { transform: scaleX(-1) translate(10px, -8px) rotate(-2deg); } }
.console .btn { position: relative; overflow: hidden; }
.console .btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%); transform: translateX(-120%); }
.console .btn:hover::after { transition: transform .7s ease; transform: translateX(120%); }
.trail { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.foot { position: relative; overflow: hidden; }
.foot::before { content: ''; position: absolute; right: 6%; bottom: 18px; width: 220px; height: 86px; background: #5CC2FF; opacity: .06;
  -webkit-mask: url(/assets/i/shark.svg) no-repeat center/contain; mask: url(/assets/i/shark.svg) no-repeat center/contain; }
@media (max-width: 720px) { .sea { display: none; } .console-shark { width: 180px; height: 70px; } }
@media (prefers-reduced-motion: reduce) { .shark-swim, .bub, .console-shark { animation: none; } .shark-swim { transform: translate(55vw, 0); } }

/* ===== Языки ===== */
.langs { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.langs a { padding: 4px 10px; border-radius: 999px; color: var(--steel); font-size: 13px; font-weight: 600; text-decoration: none; }
.langs a:hover { color: var(--ink); }
.langs a[aria-current] { color: #fff; background: var(--night); }
.nav + .langs { margin-left: 8px; }
body[data-lang=zh] { font-family: 'Onest', 'Noto Sans SC', system-ui, sans-serif; }
body[data-lang=zh] .hero h1 { letter-spacing: 0; line-height: 1.15; }
.ways-note { margin-top: 6px; color: var(--steel); font-size: 14px; }
.way-list em span { color: #8796A4; }
.doc-lang { margin-top: 16px; padding: 12px 14px; border-radius: var(--r-m); background: var(--paper-2); color: var(--steel); font-size: 14px; }
.o-state.done { position: relative; overflow: hidden; }
.o-state.done::after { content: ''; position: absolute; right: -30px; bottom: 10px; width: 220px; height: 86px; background: var(--go); opacity: .12;
  -webkit-mask: url(/assets/i/shark.svg) no-repeat center/contain; mask: url(/assets/i/shark.svg) no-repeat center/contain; animation: swim-in 1.4s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes swim-in { from { transform: translateX(120px); opacity: 0; } }
@media (max-width: 720px) { .langs { margin-left: auto; } .langs a { padding: 4px 8px; } .acc { margin-left: 0; } }

/* ===== Регистрация с кодом, комиссия и ваучер ===== */
.perk { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px dashed #3C5163; border-radius: var(--r-m); color: #C5D1DC; font-size: 14px; }
.perk p { flex: 1; }
.perk-btn { flex-shrink: 0; padding: 7px 14px; border: 1px solid var(--ice); border-radius: 999px; background: none; color: var(--ice); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.perk-btn:hover { background: rgba(92, 194, 255, .12); }
.perk.on { border-style: solid; border-color: rgba(56, 209, 122, .45); background: rgba(56, 209, 122, .08); color: #DDF7E8; }
.perk-tag { display: grid; place-items: center; min-width: 44px; height: 30px; padding: 0 8px; border-radius: 7px; background: var(--go); color: #06301A; font-weight: 800; }
.perk.pop .perk-tag { animation: tag-in .7s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes tag-in { from { transform: scale(.2) rotate(-25deg); opacity: 0; } }
.vtag { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: #CFF2DD; color: #0D5A30; font-size: 12px; font-weight: 600; }
.code-in { font-size: 26px !important; font-weight: 700; letter-spacing: .45em; text-align: center; }
.auth .switch.muted { margin-top: 8px; color: var(--steel); font-size: 14px; }
.auth .switch button:disabled { color: var(--steel); text-decoration: none; cursor: default; }

/* Ваучер — талон с отрывной линией */
.ticket { position: relative; display: grid; grid-template-columns: 1fr auto; margin-top: 28px; border-radius: var(--r-l); color: #E8EEF3; background: var(--night); overflow: hidden; }
.ticket::before, .ticket::after { content: ''; position: absolute; right: 214px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); }
.ticket::before { top: -11px; } .ticket::after { bottom: -11px; }
.t-main { display: flex; align-items: center; gap: 20px; padding: 24px 28px; }
.t-main b { font-size: 18px; } .t-main p { color: #9FB0BF; font-size: 15px; }
.t-big { font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -.04em; color: var(--ice); }
.t-side { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 225px; padding: 20px; border-left: 2px dashed #3C5163; text-align: center; }
.t-side .btn { background: var(--ice); color: var(--ice-ink); }
.t-note { color: #C5D1DC; font-size: 14px; }
.t-go { color: var(--ice); font-size: 14px; font-weight: 600; }
.t-dots { display: flex; gap: 6px; } .t-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--go); } .t-dots i.used { background: #3C5163; }
.ticket.claimed .t-big { color: var(--go); }
.ticket.spent { opacity: .55; }
.ticket.pop { animation: ticket-in .6s cubic-bezier(.2, 1.4, .4, 1); }
.ticket.pop .t-big { animation: big-in .8s .1s cubic-bezier(.2, 1.8, .4, 1) both; }
@keyframes ticket-in { 30% { transform: scale(.97); } }
@keyframes big-in { from { transform: scale(.3) rotate(-20deg); opacity: 0; } }
.t-stamp { position: absolute; top: 50%; left: 46%; padding: 6px 16px; border: 3px solid var(--go); border-radius: 8px; color: var(--go); font-weight: 800; font-size: 20px; transform: translate(-50%, -50%) rotate(-8deg); pointer-events: none; animation: stamp 1.8s ease-out forwards; }
@keyframes stamp { 0% { transform: translate(-50%, -50%) rotate(-8deg) scale(2.4); opacity: 0; } 18% { transform: translate(-50%, -50%) rotate(-8deg) scale(1); opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
@media (max-width: 640px) {
  .ticket { grid-template-columns: 1fr; }
  .ticket::before, .ticket::after { display: none; }
  .t-side { width: auto; border-left: 0; border-top: 2px dashed #3C5163; }
  .t-big { font-size: 42px; }
}
.langs a { white-space: nowrap; }
.t-stamp { background: var(--night); }
@media (max-width: 420px) { .langs a { padding: 4px 6px; font-size: 12px; } .acc { padding: 7px 12px; font-size: 14px; } .top .wrap, .top-in { gap: 10px; } }

/* ===================================================================
   Океан на первом экране: глубина, лучи света, стая рыб, акула-охотник
   =================================================================== */
@property --lvl { syntax: '<length>'; inherits: false; initial-value: .5em; }
@property --wx { syntax: '<length>'; inherits: false; initial-value: 0em; }

body[data-page=home] .top { background: rgba(11, 53, 86, .82); border-bottom-color: rgba(255, 255, 255, .08); color: #EAF6FF; }
body[data-page=home] .top .nav a { color: #9CC3DE; }
body[data-page=home] .top .nav a:hover, body[data-page=home] .top .nav a[aria-current] { color: #fff; }
body[data-page=home] .top .langs { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); }
body[data-page=home] .top .langs a { color: #9CC3DE; }
body[data-page=home] .top .langs a[aria-current] { color: var(--ice-ink); background: var(--ice); }
body[data-page=home] .top .acc { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #fff; }

.ocean { position: relative; overflow: hidden; color: #EAF6FF; isolation: isolate;
  background: radial-gradient(1200px 500px at 30% -10%, rgba(120, 210, 255, .28), transparent 60%), linear-gradient(180deg, #0B3556 0%, #0A2B47 45%, #081E33 100%); }
.ocean .hero { padding: 72px 0 140px; }
.ocean-cv { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.rays { position: absolute; inset: -10% -20% 30%; z-index: 0; pointer-events: none; opacity: .9;
  background: repeating-linear-gradient(105deg, rgba(190, 235, 255, .07) 0 34px, transparent 34px 110px, rgba(190, 235, 255, .04) 110px 150px, transparent 150px 260px);
  -webkit-mask: linear-gradient(180deg, #000 0%, transparent 85%); mask: linear-gradient(180deg, #000 0%, transparent 85%);
  transform-origin: 50% 0; animation: rays 14s ease-in-out infinite alternate; }
@keyframes rays { from { transform: skewX(-6deg) translateX(-2%); } to { transform: skewX(6deg) translateX(2%); } }

/* Акула-охотник: движется скриптом к курсору, без курсора — патрулирует */
.hunter { position: absolute; left: 0; top: 0; z-index: 0; width: 300px; height: 117px; pointer-events: none; will-change: transform; opacity: 0; transition: opacity 1s; }
.hunter.on { opacity: 1; }
.hunter span { display: block; width: 100%; height: 100%; background: linear-gradient(180deg, #3A86B8 0%, #1B5680 100%); opacity: .55;
  -webkit-mask: url(/assets/i/shark.svg) no-repeat center/contain; mask: url(/assets/i/shark.svg) no-repeat center/contain; transition: transform .35s ease; }
.hunter.r span { transform: scaleX(-1); }

/* Волна-кромка: переход из моря в «берег» страницы */
.ocean-edge { position: absolute; left: 0; bottom: -1px; z-index: 1; width: 200%; height: 70px; pointer-events: none; animation: tide 18s linear infinite; }
.ocean-edge .w-back { fill: rgba(238, 241, 244, .35); }
.ocean-edge .w-front { fill: var(--paper); }
@keyframes tide { to { transform: translateX(-50%); } }

/* Заголовок: «UPsteam» — вода поднимается внутри букв */
.ocean .hero h1 { max-width: none; }
.h-brand { display: block; width: fit-content; padding-bottom: .06em; font-size: clamp(64px, 9.5vw, 128px); line-height: .95; letter-spacing: -.055em; color: transparent; cursor: default;
  background-color: rgba(234, 246, 255, .96);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 16' preserveAspectRatio='none'%3E%3Cpath d='M0 8 Q15 0 30 8 T60 8 T90 8 T120 8 V16 H0Z' fill='%235CC2FF'/%3E%3C/svg%3E"), linear-gradient(#5CC2FF, #2E9BE0);
  background-repeat: repeat-x, no-repeat;
  background-size: .9em .14em, 100% var(--lvl);
  background-position: var(--wx) calc(100% - var(--lvl) + .01em), 0 100%;
  -webkit-background-clip: text; background-clip: text;
  --lvl: .5em; animation: fill-up 2.4s cubic-bezier(.3, .7, .2, 1) .2s backwards, wave-x 2.2s linear infinite;
  transition: --lvl .9s cubic-bezier(.3, 1.4, .4, 1); }
.h-brand:hover { --lvl: .78em; }
@keyframes fill-up { from { --lvl: 0em; } to { --lvl: .5em; } }
@keyframes wave-x { to { --wx: .9em; } }
.h-sub { display: block; margin-top: 6px; font-size: clamp(34px, 4.4vw, 54px); font-weight: 800; line-height: 1.04; letter-spacing: -.035em; color: #fff; }
.ocean .lead { color: #A9CBE3; }
.ocean .facts { border-top-color: rgba(255, 255, 255, .14); }
.ocean .facts div { border-bottom-color: rgba(255, 255, 255, .14); }
.ocean .facts dt { color: #86B0CE; }
.ocean .facts dd { color: #fff; }
.ocean .facts div:nth-child(2) dd { color: var(--go); }

/* Консоль на воде: тёмное стекло с ледяной кромкой */
.ocean .console { background: rgba(14, 26, 38, .9); border: 1px solid rgba(92, 194, 255, .18); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6), 0 0 0 6px rgba(92, 194, 255, .04);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.side-sub.good { color: var(--go); }

/* Всплеск по клику */
.ripple { position: absolute; z-index: 0; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid rgba(190, 235, 255, .7); border-radius: 50%; pointer-events: none; animation: ripple 1.1s ease-out forwards; }
.ripple.r2 { animation-delay: .15s; opacity: 0; }
@keyframes ripple { from { transform: scale(.3); opacity: 1; } to { transform: scale(9); opacity: 0; } }

@media (max-width: 720px) {
  .ocean .hero { padding: 40px 0 110px; }
  .hunter { width: 190px; height: 74px; }
}
@media (prefers-reduced-motion: reduce) {
  .h-brand { --lvl: .5em; }
  .ocean-edge { transform: translateX(-25%); }
}
.perk[hidden] { display: none; }

/* ===== Шапка без переносов на средних ширинах ===== */
.nav a, .acc { white-space: nowrap; }
.top-in > * { flex-shrink: 0; }
@media (max-width: 1100px) { .nav { gap: 18px; } .nav a[href="/docs/offer"] { display: none; } }
@media (max-width: 920px) { .nav { display: none; } .langs { margin-left: auto; } }

/* ===== Производительность: без размытия поверх анимации, всё анимируемое — на своём слое ===== */
body[data-page=home] .top { backdrop-filter: none; -webkit-backdrop-filter: none; background: #0B3556; }
.ocean .console { backdrop-filter: none; -webkit-backdrop-filter: none; background: #0F1D2B; }
.rays, .ocean-edge, .hunter, .shark-swim { will-change: transform; }
.ocean-cv, .trail { will-change: contents; }
.h-brand { animation: fill-up 2.4s cubic-bezier(.3, .7, .2, 1) .2s backwards; }
.h-brand:hover { animation: wave-x 1.6s linear infinite; }
@media (max-width: 920px) { .nav + .langs { margin-left: auto; } }
.inv-link { display: inline-block; margin-top: 4px; color: var(--ice); font-size: 14px; font-weight: 600; }
