:root {
  --bg: #0a0a0a;
  --text: #f2f2f2;
  --accent: #d6001c;
  --line: #2a2a2a;
  --line-strong: #3a3a3a;
  --muted: #9a9a9a;
  --ink: #141414;
  --paper: #f2f0eb;

  --font-body: "Inter", Arial, sans-serif;
  --font-display: Oswald, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}
h1,
h2,
h3 {
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
.header {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 20px max(24px, calc((100% - 1280px) / 2));
  border-bottom: 1px solid var(--line);
}
a {
  color: inherit;
  text-decoration: none;
}
nav,
.contracts,
.btn {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
nav {
  display: flex;
  gap: 24px;
}
.barcode {
  display: flex;
  gap: 2px;
  height: 30px;
}
.barcode span {
  width: 2px;
  background: currentColor;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.22em;
}
.barcode span:nth-child(1) {
  width: 3px;
}
.barcode span:nth-child(2) {
  width: 1px;
}
.barcode span:nth-child(3) {
  width: 4px;
}
.barcode span:nth-child(4) {
  width: 1px;
}
.barcode span:nth-child(6) {
  width: 4px;
}
.barcode span:last-child {
  width: 3px;
  background: var(--accent);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-right input[type="search"] {
  background: #121212;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0 14px;
  min-height: 44px;
  font-family: var(--font-mono);
}
.contracts {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  padding: 0 14px;
  min-height: 44px;
}

.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
}
main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 48px 0;
  gap: 40px;
}
.hero-text {
  display: flex;
  flex: 1 1 460px;
  flex-direction: column;
  gap: 22px;
}
.kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--accent);
}
.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 11vw, 84px);
  line-height: 0.98;
  text-transform: uppercase;
}
.accent {
  color: var(--accent);
}
.hero-text p {
  margin: 0;
  max-width: 470px;
  line-height: 1.65;
  color: #c4c4c4;
}
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 28px;
  border: 0;
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: color-mix(in oklch, var(--accent), white 15%);
}
.btn-secondary {
  border: 1px solid var(--line-strong);
}
.btn-secondary:hover {
  border-color: var(--text);
}
.btn:disabled {
  background: var(--line-strong);
  color: var(--muted);
  cursor: not-allowed;
}
.dossier {
  flex: 1 1 420px;
  position: relative;
  background: var(--paper);
  padding: 30px 26px 26px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  transform: rotate(0.6deg);
}
.dossier-head {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid var(--ink);
  font-family: var(--font-mono);
  padding-bottom: 10px;
  font-size: 12px;
}
.stamp-small {
  background-color: var(--ink);
  color: var(--paper);
  padding: 2px 8px;
}
.dossier-body {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.photo {
  flex: 0 0 170px;
  height: 190px;
  background: #d0ccc3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 0 solid var(--accent);
}
.corner:nth-child(1) {
  top: 10px;
  left: 10px;
  border-top-width: 2px;
  border-left-width: 2px;
}
.corner:nth-child(2) {
  top: 10px;
  right: 10px;
  border-top-width: 2px;
  border-right-width: 2px;
}
.corner:nth-child(3) {
  bottom: 10px;
  left: 10px;
  border-bottom-width: 2px;
  border-left-width: 2px;
}
.corner:nth-child(4) {
  bottom: 10px;
  right: 10px;
  border-bottom-width: 2px;
  border-right-width: 2px;
}
.specs {
  flex: 1 1 180px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
}
.specs dt {
  color: #5e5e5e;
}
.specs dd {
  margin: 0;
}
.specs .status {
  color: var(--accent);
  font-weight: 600;
}
.dossier-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  line-height: 1;
}
.stamp {
  padding: 6px 12px;
  border: 3px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.1em;
  transform: rotate(-6deg);
}
.photo-icon,
.tile-icon,
.product-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.1;
  stroke-linecap: round;
}
.photo-icon {
  width: 100px;
  height: 100px;
}
.photo-caption {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #5e5e5e;
}
.clip {
  position: absolute;
  top: -52px;
  left: 46px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 3;
  stroke-linecap: round;
}
.arsenal {
  padding-bottom: 48px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 18px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.section-note {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
.arsenal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 130px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #111;
  transition:
    border-color 0.2s,
    transform 0.2s;
  animation: appear 0.4s backwards;
  animation-delay: calc(sibling-index() * 60ms);
}
.tile:hover,
.tile.is-active,
.product-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.tile:hover .tile-icon,
.tile.is-active .tile-icon {
  color: var(--accent);
}
.tile-icon {
  width: 40px;
  height: 40px;
  stroke-width: 1.3;
  color: #cfcfcf;
  transition: color 0.2s;
}
.tile-count {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
}
.tile-label {
  font-family: var(--font-display);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tile,
  .product-card {
    animation: none;
  }
}
.catalog {
  padding-bottom: 64px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: #111;
  border: 1px solid var(--line);
  color: var(--text);
  transition:
    border-color 0.2s,
    transform 0.2s;
  animation: appear 0.4s backwards;
  animation-delay: calc(sibling-index() * 60ms);
}
.product-card:has(.is-out) {
  opacity: 0.6;
}
.product-shot {
  position: relative;
  height: 160px;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a8a8a;
  overflow: hidden;
  transition: color 0.2s;
}
.product-card:hover .product-shot {
  color: #fff;
}
.product-shot .corner {
  border-color: #4a4a4a;
  transition: border-color 0.2s;
}
.product-card:hover .corner {
  border-color: var(--accent);
}
.grain {
  position: absolute;
  inset: 0;
  background-image: repeating-radial-gradient(
    circle,
    rgba(255, 255, 255, 0.08) 0 1px,
    transparent 1px 3px
  );
  pointer-events: none;
}
.cam,
.scan {
  position: absolute;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.cam {
  bottom: 12px;
  color: #6a6a6a;
}
.scan {
  top: 12px;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
}
.product-card:hover .scan {
  opacity: 1;
}
.product-icon {
  width: 80px;
  height: 80px;
}
.product-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px 20px;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.product-meta span:first-child {
  color: var(--accent);
}
.product-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.product-specs {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #c4c4c4;
}
.product-specs li::before {
  content: "— ";
  color: var(--muted);
}
.product-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.product-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
}
.product-status {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.product-status.is-out {
  color: var(--accent);
}
.product-body .btn {
  justify-content: center;
  min-height: 44px;
  font-size: 14px;
}
.product-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 48px 20px;
  border: 1px dashed var(--line-strong);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  min-height: 28px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.filter-chip:hover {
  background: var(--accent);
}
.modal {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: 640px;
  width: calc(100% - 32px);
  overflow: visible;
}
.modal::backdrop {
  background: rgba(0, 0, 0, 0.75);
}
.modal[open] {
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 0.25s,
    transform 0.25s;
}
@starting-style {
  .modal[open] {
    opacity: 0;
    transform: scale(0.95);
  }
}
.modal .dossier {
  transform: none;
}
.modal-close {
  background: transparent;
  border: 0;
  padding: 0 4px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}
.modal-close:hover {
  color: var(--accent);
}
@media (prefers-reduced-motion: reduce) {
  .modal[open] {
    transition: none;
  }
}
.cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  max-height: 50vh;
  overflow-y: auto;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed #b8b3a8;
}
.cart-name {
  flex: 1;
  font-weight: 600;
}
.cart-sum {
  white-space: nowrap;
  color: #5e5e5e;
}
.cart-item button {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--font-mono);
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}
.cart-item button:hover {
  background: var(--ink);
  color: var(--paper);
}
.cart-item [data-action="remove"]:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.cart-empty {
  padding: 24px 0;
  text-align: center;
  color: #5e5e5e;
}
#cart-modal .price {
  font-size: 28px;
}
.cart-item button:disabled {
  background: transparent;
  color: var(--ink);
  opacity: 0.3;
  cursor: not-allowed;
}
.cart-signed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 0;
  text-align: center;
}
.cart-signed strong {
  padding: 6px 14px;
  border: 3px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: rotate(-4deg);
}
.cart-signed span {
  color: #5e5e5e;
}
.build {
  padding: 48px 0 64px;
}
.build-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px;
}
.build-slots {
  flex: 1 1 520px;
  display: grid;
  gap: 12px;
}
.build-summary {
  flex: 0 1 380px;
  position: sticky;
  top: 24px;
  transform: none;
}
.build-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.slot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #111;
  font-family: var(--font-mono);
  transition: border-color 0.2s;
}
.slot:has(select:focus) {
  border-color: var(--accent);
}
.slot-label {
  flex: 0 0 170px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.slot select {
  flex: 1 1 220px;
  min-height: 44px;
  padding: 0 12px;
  background: #121212;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
}
.slot select:focus {
  border-color: var(--accent);
  outline: none;
}
.build-checks .is-ok {
  color: #3f7a4a;
}
.build-checks .is-fail {
  color: var(--accent);
  font-weight: 600;
}
.build-power-line {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #5e5e5e;
}

@media (max-width: 900px) {
  .header {
    flex-wrap: wrap;
    gap: 12px 20px;
  }
  nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  nav::-webkit-scrollbar {
    display: none;
  }
  .header-right {
    flex: 1 1 auto;
  }
  .header-right input[type="search"] {
    flex: 1;
    min-width: 0;
  }
  .build-summary {
    position: static;
  }
}

@media (max-width: 480px) {
  main {
    padding: 0 16px;
  }
  .header {
    padding: 16px;
  }
  .cart-item {
    flex-wrap: wrap;
  }
  .cart-name {
    flex-basis: 100%;
  }
  .cart-sum {
    margin-right: auto;
  }
  .dossier-foot {
    flex-wrap: wrap;
    gap: 12px;
  }
  .arsenal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

