/* Магазин битов River. Общие стили для /bity/, /bity/zakaz/ и /dokumenty/. Те же цвета и шрифты, что на главной. */
:root {
  --ink: #060609; --night: #0B0912; --panel: #120F1C; --panel-2: #191427;
  --line: rgba(232, 228, 220, .12); --line-2: rgba(232, 228, 220, .24);
  --bone: #EDE8DF; --muted: #A39DAE; --red: #E0163A; --red-deep: #C8102E; --cyan: #5BD8FF; --violet: #9B7BFF; --gold: #FFD166;
  --display: "Syncopate", "Arial Black", sans-serif;
  --body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --data: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { background: var(--ink); scroll-behavior: smooth; }
body { color: var(--bone); font: 400 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh;
  background: radial-gradient(80% 50% at 15% 0%, rgba(224, 22, 58, .16), transparent 60%),
              radial-gradient(70% 50% at 100% 10%, rgba(155, 123, 255, .14), transparent 60%), var(--ink); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
button { font: inherit; color: inherit; }

/* шапка */
.top { position: sticky; top: 0; z-index: 20; background: rgba(6, 6, 9, .78); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; height: 64px; }
.top .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; min-width: 0; }
.top .brand img { height: 30px; width: auto; flex: none; }
.top .brand span { font: 700 11px/1 var(--display); letter-spacing: .24em; white-space: nowrap; }
.top nav { display: flex; gap: 4px; }
.top nav a { text-decoration: none; color: var(--muted); font-size: 14px; padding: 8px 12px; border-radius: 999px; }
.top nav a:hover, .top nav a[aria-current] { color: var(--bone); background: rgba(255, 255, 255, .06); }
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: none; border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: 14px; }
.cart-btn:hover { background: rgba(255, 255, 255, .08); }
.cart-btn b { min-width: 22px; height: 22px; border-radius: 11px; background: var(--red); color: #fff; font-size: 12px; display: grid; place-items: center; padding: 0 6px; }
.cart-btn b:empty, .cart-btn b[data-n="0"] { background: rgba(255, 255, 255, .12); color: var(--muted); }
@media (max-width: 640px) { .top nav { display: none; } .top .brand span { display: none; } }

/* первый экран магазина */
.intro { padding: 56px 0 28px; position: relative; isolation: isolate; }
/* шапка из клипа: site/assets/bity/hero.mp4 (без звука, до 10 с, по кругу). Нет файла — остаётся тёмный фон. */
.intro-bg { position: absolute; z-index: -1; top: 0; left: 50%; width: 100vw; height: 420px; transform: translateX(-50%); object-fit: cover; opacity: .55;
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent); mask-image: linear-gradient(180deg, #000 40%, transparent); }
.kicker { font: 600 12px/1 var(--data); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.intro h1 { font: 700 clamp(30px, 6vw, 64px)/1.02 var(--display); text-transform: uppercase; margin: 14px 0 16px; letter-spacing: -.01em; }
.intro h1 em { font-style: normal; color: var(--red); }
.intro p { max-width: 40em; color: #D5CFDD; font-size: clamp(15px, 2vw, 18px); }
.hero-ai { position: absolute; top: 14px; right: 0; font: 700 11px/1 var(--data); letter-spacing: .1em; padding: 4px 6px; border-radius: 6px; background: rgba(237, 232, 223, .55); color: var(--ink); }
.ai-note { display: inline-flex; gap: 10px; align-items: flex-start; margin-top: 18px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(255, 255, 255, .03); font-size: 14px; color: #D5CFDD; max-width: 40em; }
.ai-note b { flex: none; font: 700 11px/1 var(--data); letter-spacing: .1em; padding: 4px 6px; border-radius: 6px; background: var(--bone); color: var(--ink); margin-top: 1px; }
.test-banner { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 209, 102, .12); border: 1px solid rgba(255, 209, 102, .4); color: var(--gold); font-size: 14px; }

/* лицензии */
.lics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 28px 0 8px; }
.lic { border: 1px solid var(--line); border-radius: 18px; padding: 18px; background: rgba(18, 15, 28, .7); }
.lic h3 { font-size: 15px; font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.lic h3 span { color: var(--bone); font-family: var(--data); font-weight: 600; white-space: nowrap; }
.lic .fmt { color: var(--cyan); font-size: 13px; margin: 6px 0 10px; }
.lic ul { list-style: none; display: grid; gap: 4px; font-size: 13.5px; color: #CFC9D8; }
.lic li::before { content: "— "; color: var(--muted); }
.lic.soon { opacity: .6; }
.lic .soon-tag { display: inline-block; margin-top: 10px; font: 600 11px var(--data); letter-spacing: .08em; color: var(--gold); }
@media (max-width: 900px) { .lics { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .lics { grid-template-columns: 1fr; } }

/* список битов */
.sec-title { font: 700 clamp(20px, 3vw, 28px)/1.1 var(--display); text-transform: uppercase; margin: 44px 0 18px; }
.beats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.sec-title + .sec-lead { margin: -8px 0 18px; color: var(--muted); max-width: 44em; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.jump a { text-decoration: none; font-size: 14px; border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; color: #D5CFDD; }
.jump a:hover { background: rgba(255, 255, 255, .08); }
.svc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.svc-card { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.svc-card h3 { font-size: 17px; }
.svc-card p { font-size: 14px; color: #CFC9D8; }
.svc-card .btn { margin-top: auto; align-self: flex-start; }
.svc-note { margin-top: 16px; }
.pad-bottom { height: 140px; }
@media (max-width: 860px) { .svc { grid-template-columns: 1fr; } }
.beat { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--panel); display: flex; flex-direction: column; transition: border-color .2s, transform .2s; }
.beat:hover { border-color: var(--line-2); }
.beat.playing { border-color: rgba(224, 22, 58, .7); box-shadow: 0 0 0 1px rgba(224, 22, 58, .35), 0 20px 60px rgba(224, 22, 58, .12); }
.cover { position: relative; aspect-ratio: 1; background: #111 center/cover no-repeat; border: 0; cursor: pointer; width: 100%; display: block; }
.cover .play { position: absolute; left: 14px; bottom: 14px; width: 54px; height: 54px; border-radius: 50%; background: rgba(6, 6, 9, .66); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .35); display: grid; place-items: center; transition: background .2s, transform .2s; }
.cover:hover .play { background: var(--red); transform: scale(1.05); }
.cover .play::after { content: ""; margin-left: 4px; border-left: 15px solid var(--bone); border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.beat.playing .cover .play { background: var(--red); }
.beat.playing .cover .play::after { margin: 0; width: 14px; height: 16px; border: 0; background: linear-gradient(90deg, var(--bone) 0 35%, transparent 35% 65%, var(--bone) 65%); }
.cover .ai { position: absolute; right: 12px; top: 12px; font: 700 11px/1 var(--data); padding: 5px 7px; border-radius: 6px; background: rgba(237, 232, 223, .85); color: var(--ink); letter-spacing: .08em; }
.beat .info { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.beat h3 { font: 700 18px/1.15 var(--body); }
.beat .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.beat .tags span { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.beat .text { font-size: 14px; color: #CFC9D8; }
.beat .buy { display: grid; gap: 8px; margin-top: auto; padding-top: 4px; }
.beat select { width: 100%; background: var(--panel-2); color: var(--bone); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 12px; font: 500 14.5px var(--body); appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; transition: background .2s, opacity .2s; }
.btn.red { background: var(--red); color: #fff; }
.btn.red:hover { background: var(--red-deep); }
.btn.ghost { background: none; border: 1px solid var(--line-2); color: var(--bone); }
.btn.ghost:hover { background: rgba(255, 255, 255, .08); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.in-cart { background: rgba(91, 216, 255, .14); color: var(--cyan); }

/* плеер снизу */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: rgba(12, 10, 19, .92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.player .wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; height: 72px; }
.player img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.player .pp { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--bone); cursor: pointer; display: grid; place-items: center; }
.player .pp::after { content: ""; margin-left: 3px; border-left: 13px solid var(--ink); border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.player.on .pp::after { margin: 0; width: 12px; height: 14px; border: 0; background: linear-gradient(90deg, var(--ink) 0 35%, transparent 35% 65%, var(--ink) 65%); }
.player .mid { min-width: 0; display: grid; gap: 6px; }
.player .mid b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .bar { position: relative; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .12); cursor: pointer; }
.player .bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, var(--red), var(--violet)); width: 0; }
.player .time { font: 500 12px var(--data); color: var(--muted); }
.player .left { display: flex; gap: 10px; align-items: center; }

/* корзина и формы (выезжающая панель) */
.drawer { position: fixed; inset: 0; z-index: 40; display: flex; justify-content: flex-end; background: rgba(0, 0, 0, .55); }
.drawer .panel { width: min(460px, 100%); height: 100%; background: var(--night); border-left: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--night); z-index: 1; }
.drawer header h2 { font-size: 18px; }
.drawer .x { background: none; border: 0; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 6px; }
.drawer .body { padding: 18px 20px; display: grid; gap: 14px; align-content: start; flex: 1; }
.line { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.line img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.line b { display: block; font-size: 15px; }
.line small { color: var(--muted); font-size: 13px; }
.line .r { text-align: right; display: grid; gap: 4px; justify-items: end; }
.line .r button { background: none; border: 0; color: var(--muted); font-size: 12.5px; cursor: pointer; text-decoration: underline; }
.total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; padding: 4px 0; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13.5px; color: var(--muted); }
.field input, .field textarea { width: 100%; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; color: var(--bone); font: 400 16px var(--body); }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(155, 123, 255, .2); }
.field small { font-size: 12.5px; color: var(--muted); }
.check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 13.5px; color: #CFC9D8; align-items: start; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); }
.check a { color: var(--cyan); }
.err { color: #FF6B81; font-size: 14px; }
.ok { color: #7EE2A8; font-size: 14px; }
.note { font-size: 13px; color: var(--muted); }

/* страница заказа */
.order { padding: 48px 0 80px; display: grid; gap: 20px; max-width: 760px; }
.order h1 { font: 700 clamp(24px, 4vw, 36px)/1.1 var(--display); text-transform: uppercase; }
.card { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); padding: 20px; display: grid; gap: 14px; }
.card h2 { font-size: 18px; }
.files { display: grid; gap: 8px; }
.file { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px 10px 16px; }
.file span { font-size: 14.5px; }
.file small { display: block; color: var(--muted); font-size: 12.5px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row .field { flex: 1 1 220px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--red); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* документы */
.doc { padding: 48px 0 80px; max-width: 820px; }
.doc h1 { font: 700 clamp(22px, 4vw, 34px)/1.15 var(--display); text-transform: uppercase; margin-bottom: 8px; }
.doc .meta { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.doc h2 { font-size: 18px; margin: 26px 0 10px; }
.doc p, .doc li { color: #D5CFDD; font-size: 15px; margin-bottom: 8px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 10px 0 16px; display: block; overflow-x: auto; }
.doc th, .doc td { border: 1px solid var(--line-2); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc .todo { background: rgba(255, 209, 102, .14); color: var(--gold); padding: 0 4px; border-radius: 4px; }

/* подвал */
.foot { border-top: 1px solid var(--line); padding: 28px 0 120px; color: var(--muted); font-size: 13px; }
.foot .wrap { display: grid; gap: 10px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { color: var(--bone); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
