@font-face {
  font-family: "Roboto Flex";
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  font-stretch: 25% 151%;
  src: url(/fonts/roboto-flex-cyrillic.woff2) format("woff2-variations"), url(/fonts/roboto-flex-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Roboto Flex";
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  font-stretch: 25% 151%;
  src: url(/fonts/roboto-flex-latin.woff2) format("woff2-variations"), url(/fonts/roboto-flex-latin.woff2) format("woff2");
  unicode-range: U+0020-007E, U+00A0, U+00A9, U+00AB, U+00AE, U+00B0-00B2, U+00B7, U+00BB, U+00D7, U+2010-2027, U+2030-203A, U+2122, U+2190-2193, U+2197, U+2212, U+2248, U+2264-2265;
}
@font-face {
  font-family: "Roboto Flex";
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  font-stretch: 25% 151%;
  src: url(/fonts/roboto-flex-rub.woff2) format("woff2-variations"), url(/fonts/roboto-flex-rub.woff2) format("woff2");
  unicode-range: U+20BD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/plex-mono-cyrillic-400.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/plex-mono-latin-400.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0d0c0b;
  --graphite: #1b1a18;
  --tile: #2e2c28;
  --paper: #ebe6dc;
  --silver: #b7b3ab;
  --sub-light: #4a4741;
  --line-dark: rgba(235, 230, 220, 0.16);
  --line-light: rgba(13, 12, 11, 0.16);
  --error-dark: #ffb4a8;
  --error-light: #8c2f24;

  --f-display: "Roboto Flex", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --pad: clamp(20px, 3.2vw, 56px);
  --gap: clamp(14px, 1.6vw, 28px);

  --bg: var(--ink);
  --fg: var(--paper);
  --line: var(--line-dark);
  --sub: var(--silver);
  --error: var(--error-dark);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-padding-top: 84px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-display);
  font-size: clamp(0.95rem, 1.05vw, 1.1rem);
  line-height: 1.5;
  font-variation-settings: "wdth" 100, "opsz" 14;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid #cfc6b5; outline-offset: 3px; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 10; padding: 10px 14px;
  background: var(--paper); color: var(--ink); font-family: var(--f-mono); font-size: 12px;
}
.skip:focus { top: 12px; }

.wrap { padding-inline: var(--pad); max-width: 1920px; margin-inline: auto; }

/* Type */
.label {
  font-family: var(--f-mono);
  font-size: clamp(10px, 0.72vw, 12px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sub);
}
.h1 {
  font-size: clamp(2.8rem, 7.4vw, 8rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
  font-weight: 760;
  font-variation-settings: "wdth" 112, "opsz" 144;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(2rem, 4.6vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 720;
  font-variation-settings: "wdth" 104, "opsz" 144;
  text-wrap: balance;
}
.lead {
  font-size: clamp(1.15rem, 1.8vw, 1.8rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  font-weight: 380;
  font-variation-settings: "wdth" 100, "opsz" 72;
  color: var(--sub);
  max-width: 34ch;
  text-wrap: pretty;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--paper);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn:hover { background: #fff; border-color: #fff; }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn--ghost:hover { background: transparent; border-color: var(--fg); }
.btn--dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--dark:hover { background: var(--graphite); border-color: var(--graphite); }
.btn[disabled] { opacity: 0.55; cursor: wait; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(13, 12, 11, 0.94);
  border-bottom: 1px solid var(--line-dark);
}
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; }
.brand b {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variation-settings: "wdth" 130, "opsz" 144;
}
.top__nav { display: flex; gap: 28px; font-size: 0.95rem; }
.top__nav a { color: var(--sub); transition: color 160ms ease; }
.top__nav a:hover { color: var(--paper); }

/* Hero */
.hero { padding-block: clamp(56px, 9vw, 140px) clamp(48px, 6vw, 96px); }
.hero .h1 { margin: 20px 0 24px; max-width: 13ch; }
.hero .actions { margin-top: 32px; }

/* Sections */
.s { padding-block: clamp(64px, 8vw, 128px); background: var(--bg); color: var(--fg); }
.s--paper { --bg: var(--paper); --fg: var(--ink); --line: var(--line-light); --sub: var(--sub-light); --error: var(--error-light); }
.s__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: clamp(28px, 4vw, 56px); }
.s__head .label { display: block; margin-bottom: 14px; }
.s__head p { color: var(--sub); max-width: 38ch; }

/* Filters */
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 20px; margin-bottom: 28px; border-bottom: 1px solid var(--line-dark); }
.chip {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper);
}
.chip:hover { border-color: var(--paper); }
.chip[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px var(--gap); }
.card { display: flex; flex-direction: column; }
.tile { position: relative; }
.card__media { display: block; background: var(--tile); aspect-ratio: 1 / 1.05; padding: 10% 8%; }
.chip--fav span:not(:empty) {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px;
  border-radius: 999px; background: #ff5a1f; color: var(--ink);
}
.fav, .arrow {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(13, 12, 11, 0.55);
  color: var(--paper);
  transition: background-color 160ms ease;
}
.fav:hover, .arrow:hover { background: rgba(13, 12, 11, 0.85); }
.fav { top: 10px; right: 10px; }
.fav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.fav[aria-pressed="true"] svg { fill: #ff5a1f; stroke: #ff5a1f; }
.arrow { top: 50%; margin-top: -22px; }
.arrow--prev { left: 12px; }
.arrow--next { right: 12px; }
.arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile__count { position: absolute; left: 16px; bottom: 14px; color: var(--paper); }
.card__media svg { width: 100%; height: 100%; }
.card__title { margin-top: 16px; font-size: 1.3rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; }
.card__title a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.card .label { margin-top: 6px; }
.card .btn { margin-top: 16px; align-self: flex-start; }
.empty { color: var(--sub); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); counter-reset: step; }
.steps li { border-top: 1px solid var(--line); padding-top: 16px; }
.steps h3 { font-size: 1.3rem; font-weight: 650; letter-spacing: -0.02em; margin: 10px 0 6px; }
.steps p { color: var(--sub); max-width: 32ch; }

/* Form */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(32px, 5vw, 96px); }
.form-grid > div > p { color: var(--sub); margin-top: 16px; max-width: 34ch; }
.form-note { margin-top: 16px; color: var(--fg); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 0.95rem; }
.field input, .field select {
  height: 50px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
}
.field input:focus, .field select:focus { border-color: var(--fg); outline: none; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--error); }
.hint, .field-error { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.04em; }
.hint { color: var(--sub); }
.field-error, .form-error { color: var(--error); }
.form-error { margin-top: 16px; }
#lead > .btn { margin-top: 24px; }
.code-step { display: grid; gap: 18px; max-width: 32rem; }
.code-step .field { max-width: 14rem; }
.success { font-size: 1.3rem; font-weight: 650; letter-spacing: -0.02em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* FAQ */
.faq { border-top: 1px solid var(--line-dark); max-width: 60rem; }
.faq details { border-bottom: 1px solid var(--line-dark); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-mono); color: var(--sub); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 22px; color: var(--sub); max-width: 60ch; }

/* Print page */
.page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 96px); align-items: start; padding-block: clamp(40px, 6vw, 96px); }
.page .card__media { aspect-ratio: 1 / 1.05; }
.page .h2 { margin: 16px 0 20px; }
.page .lead { margin-bottom: 24px; }
.page dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 24px; margin: 0 0 32px; padding-top: 20px; border-top: 1px solid var(--line-dark); }
.page dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sub); padding-top: 3px; }
.page dd { margin: 0; }

/* Footer */
.foot { border-top: 1px solid var(--line-dark); padding-block: 28px 40px; color: var(--sub); font-size: 0.95rem; }
.foot a { color: var(--paper); }
.foot a:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
}
@media (max-width: 820px) {
  .top__nav { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid, .page { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .steps, .fields { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .card__media { padding: 8% 6%; }
  .card__title { font-size: 1rem; margin-top: 10px; }
  .card .label { font-size: 10px; }
  .card .btn { align-self: stretch; height: 40px; padding: 0 10px; margin-top: 10px; }
  .fav { top: 6px; right: 6px; width: 40px; height: 40px; }
  .fav svg { width: 18px; height: 18px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .top__in { height: 60px; }
  .brand .label { display: none; }
  .top .btn { height: 40px; padding: 0 14px; }
  .hero .actions .btn { flex: 1 1 100%; }
}

/* Footer row */
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }

/* Кабинет */
.cab { padding-block: clamp(40px, 6vw, 96px); }
.cab__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 32px; margin-bottom: clamp(28px, 4vw, 48px); }
.cab__head .h2 { margin-top: 12px; }
.cab-login { max-width: 32rem; display: grid; gap: 18px; }
.cab-login .field { max-width: 20rem; }
.panel { border-top: 1px solid var(--line-dark); padding-top: 24px; margin-top: clamp(40px, 5vw, 72px); }
.panel > h2 { font-size: 1.6rem; font-weight: 680; letter-spacing: -0.03em; margin-bottom: 8px; }
.panel > p.sub { color: var(--sub); margin-bottom: 20px; }
.lines { display: grid; gap: 14px; }
.line { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 14px; border: 1px solid var(--line-dark); border-radius: 16px; }
.line__media { background: var(--tile); border-radius: 10px; padding: 6px; }
.line__media svg { width: 100%; height: auto; }
.line__title { font-weight: 650; letter-spacing: -0.02em; }
.line__title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.line .label { margin-top: 4px; display: block; }
.line__opts { display: grid; gap: 12px; margin-top: 12px; justify-items: start; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.size { display: grid; gap: 4px; text-align: center; font-family: var(--f-mono); font-size: 11px; color: var(--sub); }
.size input { width: 54px; height: 40px; border-radius: 10px; border: 1px solid var(--line-dark); background: transparent; text-align: center; color: var(--paper); }
.size input:focus { border-color: var(--paper); outline: none; }
.seg { display: inline-flex; border: 1px solid var(--line-dark); border-radius: 999px; padding: 3px; }
.seg button { height: 34px; padding: 0 12px; border-radius: 999px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sub); }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
.line__qty { font-family: var(--f-mono); font-size: 12px; white-space: nowrap; color: var(--sub); display: grid; justify-items: end; }
.line__qty b { font-family: var(--f-display); font-size: 1.4rem; color: var(--paper); font-weight: 700; }
.icon-btn { width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line-dark); display: inline-grid; place-items: center; color: var(--sub); margin-top: 10px; }
.icon-btn:hover { color: var(--paper); border-color: var(--paper); }
.add-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.add-row select, .cab textarea {
  height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-dark); background: var(--ink); color: var(--paper); font: inherit; max-width: 100%;
}
.cab textarea { height: auto; min-height: 90px; padding: 12px 14px; width: 100%; resize: vertical; }
.total { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 18px 20px; border-radius: 16px; background: var(--graphite); }
.total b { font-size: 1.5rem; letter-spacing: -0.02em; }
.orders { display: grid; gap: 12px; }
.order { border: 1px solid var(--line-dark); border-radius: 16px; padding: 16px 18px; }
.order__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: baseline; }
.order__top b { font-size: 1.15rem; }
.order ul { margin-top: 10px; display: grid; gap: 4px; color: var(--sub); font-size: 0.95rem; }
.badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--line-dark); }
.badge--new { border-color: #ffb347; color: #ffb347; }
.badge--confirmed, .badge--printing { border-color: #7fb7ff; color: #7fb7ff; }
.badge--shipped, .badge--done { border-color: #7ed69a; color: #7ed69a; }
.badge--cancelled { color: var(--sub); }
.fav-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.fav-strip a { display: block; }
.fav-strip .card__media { border-radius: 4px; padding: 8%; }
.fav-strip span { display: block; margin-top: 8px; font-size: 0.95rem; }
@media (max-width: 560px) {
  .line { grid-template-columns: 64px minmax(0, 1fr); }
  .line > div:nth-child(2) { display: contents; }
  .line__media { grid-row: span 2; }
  .line { row-gap: 4px; }
  .line__title, .line .label { grid-column: 2; }
  .line__opts { grid-column: 1 / -1; justify-items: stretch; }
  .sizes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .size input { width: 100%; }
  .line__qty { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
  .line__qty .icon-btn { margin-top: 0; }
  .fav-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .top__nav a { transition: none; }
}
