/* MONOLITH: ARSENAL — магазин. Поверх chrome.css (токены, иконки, фокус). */

:root {
  --bg: #09090b; --bg-2: #121215; --bg-3: #1a1a1f; --line: #2a2a31;
  --text: #ecebe8; --dim: #a09fa8; --accent: #e30613; --accent-hot: #ff2f3d;
  --ok: #4ade80; --bone: #d8d2c4;
  --head: "Bahnschrift", "Roboto Condensed", "Arial Narrow", "Avenir Next Condensed", "Helvetica Neue", Arial, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bar-h: 60px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 16px); color-scheme: dark; }
body {
  background: var(--bg); color: var(--text); font: 16px/1.55 var(--body); min-height: 100vh;
  /* сетка HUD и красное свечение: отсылка к коврику */
  background-image:
    radial-gradient(60% 40% at 85% 0%, rgba(227, 6, 19, 0.16), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: auto, 56px 56px, 56px 56px;
  background-attachment: fixed;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.1; letter-spacing: 0.01em; }
.wrap { width: min(1180px, 100% - 40px); margin: 0 auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; z-index: 999; }
.skip:focus { left: 8px; }

/* ---------- кнопки ---------- */
.btn {
  min-height: 48px; padding: 0 26px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; border: 0; font: 700 15px var(--body); text-decoration: none; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn:hover { background: var(--accent-hot); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn.ghost { background: none; border: 1px solid var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); color: #fff; }
.link { color: var(--dim); text-underline-offset: 4px; }
.link:hover { color: var(--text); }

/* ---------- шапка ---------- */
.bar { position: sticky; top: 0; z-index: 50; height: var(--bar-h); background: rgba(9, 9, 11, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.bar .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 15px var(--head); letter-spacing: 0.12em; margin: 0; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 14px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.brand b { color: var(--accent); font-weight: 700; }
.bar nav { display: flex; gap: 22px; margin-right: auto; font-size: 14px; }
.bar nav a { color: var(--dim); text-decoration: none; padding: 6px 0; }
.bar nav a:hover { color: var(--text); }
.bar .main-site { font-size: 14px; color: var(--dim); text-decoration: none; }
.bar .main-site:hover { color: var(--text); }
.cart-btn { position: relative; min-height: 42px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); color: var(--text); font: 600 14px var(--body); cursor: pointer; }
.cart-btn:hover { border-color: var(--accent); }
.cart-btn .i { margin: 0; font-size: 18px; }
.cart-count { min-width: 20px; height: 20px; padding: 0 5px; display: none; place-items: center; background: var(--accent); color: #fff; font-size: 12px; line-height: 1; }
.cart-count.show { display: grid; }

/* ---------- первый экран ---------- */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; }
.hero .wrap > * { min-width: 0; }
.hero h1 { font-size: clamp(40px, 6.4vw, 84px); margin-bottom: 18px; }
.hero h1 b { display: block; margin-top: 6px; color: var(--bone); font-weight: 700; letter-spacing: 0.05em; font-size: min(0.5em, 7.2vw); }
.hero h1 b i { color: var(--accent); font-style: normal; }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--dim); max-width: 34em; margin-bottom: 26px; }
.cta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin-bottom: 36px; }
.facts { display: grid; gap: 14px; max-width: 30em; }
.facts div { padding-left: 14px; border-left: 2px solid var(--line); }
.facts dt { font-size: 13px; color: var(--dim); }
.facts dd { font-size: 15px; }

/* Рамка с угловыми скобками из HUD коврика */
.frame { position: relative; margin: 0; padding: 12px; background: var(--bg-2); }
.frame::before, .frame::after, .shot::before, .shot::after { content: ""; position: absolute; width: 26px; height: 26px; border: 2px solid var(--accent); pointer-events: none; z-index: 2; }
.frame::before, .shot::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.frame::after, .shot::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.frame img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.frame figcaption { padding: 10px 2px 0; font-size: 14px; color: var(--dim); }

/* ---------- каталог ---------- */
section { padding: 36px 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 38px); }
.sec-head p { color: var(--dim); font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-bottom: 40px; }

.card { display: grid; grid-template-rows: auto 1fr; background: var(--bg-2); border: 1px solid var(--line); }
.shot { position: relative; background: #000; margin: 10px 10px 0; }
.shot img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.grid.wide .shot img { aspect-ratio: 9 / 4; }
.code { position: absolute; top: 10px; right: 10px; z-index: 3; padding: 3px 8px; background: rgba(9, 9, 11, 0.82); border: 1px solid var(--line); font: 600 13px/1.2 ui-monospace, Menlo, Consolas, monospace; color: var(--bone); }
.mock { position: absolute; left: 10px; bottom: 10px; z-index: 3; padding: 3px 8px; background: rgba(9, 9, 11, 0.82); font-size: 12px; color: var(--dim); }
.info { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.info h3 { font-size: 26px; }
.desc { color: var(--dim); font-size: 15px; }
.buy { margin-top: auto; padding-top: 12px; display: grid; gap: 14px; }
.price { font: 700 26px var(--head); }
.price.soon { font: 600 16px var(--body); color: var(--dim); }
fieldset { border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
legend { font-size: 13px; color: var(--dim); margin-bottom: 8px; float: left; width: 100%; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { min-width: 48px; min-height: 44px; padding: 0 14px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--bg-3); font-size: 15px; }
.chip input:hover + span { border-color: var(--dim); }
.chip input:checked + span { border-color: var(--accent); background: rgba(227, 6, 19, 0.14); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--accent-hot); outline-offset: 2px; }
.single-opt { font-size: 14px; color: var(--dim); }
.single-opt b { color: var(--text); font-weight: 600; }
.row { display: flex; align-items: center; gap: 12px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); }
.qty button { width: 44px; height: 46px; background: var(--bg-3); border: 0; color: var(--text); font: 600 20px var(--body); cursor: pointer; }
.qty button:hover { background: var(--line); }
.qty output { min-width: 40px; text-align: center; font-weight: 600; }
.row .btn { flex: 1; }
.card.added { border-color: var(--accent); }

/* ---------- как это работает ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: step; list-style: none; }
.steps li { counter-increment: step; padding: 20px 22px; background: var(--bg-2); border: 1px solid var(--line); }
.steps li::before { content: counter(step); display: block; margin-bottom: 14px; font: 700 40px/1 var(--head); color: var(--accent); }
.steps h3 { font-size: 22px; margin-bottom: 8px; }
.steps p { color: var(--dim); font-size: 15px; }

details { border-bottom: 1px solid var(--line); }
summary { padding: 18px 4px; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { padding: 0 4px 18px; color: var(--dim); max-width: 46em; }

footer { margin-top: 40px; padding: 32px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 32px; }
footer a { text-underline-offset: 4px; }

.notice { padding: 20px; border: 1px dashed var(--line); color: var(--dim); }
.notice b { color: var(--text); }

/* ---------- мобильная панель корзины ---------- */
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: none; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(9, 9, 11, 0.94); border-top: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.cart-bar .btn { width: 100%; }

/* ---------- корзина и форма ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.66); opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0s 0.2s; }
.scrim.open { opacity: 1; visibility: visible; transition: opacity 0.2s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; width: min(460px, 100%); display: flex; flex-direction: column; background: var(--bg-2); border-left: 2px solid var(--accent); transform: translateX(104%); visibility: hidden; transition: transform 0.25s, visibility 0s 0.25s; }
.drawer.open { transform: none; visibility: visible; transition: transform 0.25s; }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer header h2 { font-size: 24px; }
.x { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 20px; }
.x:hover { color: var(--text); }
.x .i { margin: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; overscroll-behavior: contain; }
.lines { list-style: none; display: grid; gap: 12px; margin-bottom: 18px; }
.line { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.line img { width: 56px; height: 56px; object-fit: cover; background: #000; }
.line .t { font-size: 15px; line-height: 1.3; }
.line .t small { display: block; color: var(--dim); font-size: 13px; margin-top: 2px; }
.line .qty button { width: 34px; height: 34px; font-size: 17px; }
.line .qty output { min-width: 30px; }
.line .rm { background: none; border: 0; color: var(--dim); font: 13px var(--body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; }
.sum { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0 18px; font-weight: 600; }
.sum span:last-child { text-align: right; }
.empty { text-align: center; padding: 40px 10px; color: var(--dim); }

form { display: grid; gap: 14px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field small { display: block; color: var(--dim); font-size: 13px; margin-top: 5px; }
.field input, .field textarea { width: 100%; min-height: 46px; padding: 11px 13px; background: var(--bg-3); border: 1px solid var(--line); color: var(--text); font: 16px var(--body); }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field.bad input { border-color: var(--accent-hot); }
.agree { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--dim); }
.agree input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.agree a { color: var(--text); }
.status { display: none; padding: 11px 14px; font-size: 14px; border-left: 3px solid; }
.status.show { display: block; }
.status.err { color: #ff8d8d; border-color: var(--accent); background: rgba(227, 6, 19, 0.09); }
.hint { font-size: 13px; color: var(--dim); }

.done { text-align: center; padding: 36px 6px; }
.done .i { font-size: 44px; color: var(--ok); margin: 0 0 14px; }
.done h3 { font-size: 28px; margin-bottom: 10px; }
.done p { color: var(--dim); margin-bottom: 8px; }
.done .num { font: 700 36px var(--head); color: var(--text); margin: 8px 0 16px; }

/* ---------- узкие экраны ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 30px; }
  .hero { padding-top: 32px; }
  .steps { grid-template-columns: 1fr; }
  .bar nav, .bar .main-site { display: none; }
  .cart-label { display: none; }
  .bar .wrap { justify-content: space-between; }
  .cart-bar.show { display: block; }
  body.has-bar { padding-bottom: 76px; }
}
@media (max-width: 640px) {
  .brand { letter-spacing: 0.06em; font-size: 14px; }
  .grid { grid-template-columns: 1fr; }
  .wrap { width: calc(100% - 32px); }
  .info h3 { font-size: 24px; }
  .drawer { border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
