:root {
  --paper: #f4f1eb;
  --surface: #fffdf9;
  --ink: #1b2540;
  --ink-2: #4b5468;
  --ink-3: #737b8c;
  --line: #e3dccf;
  --line-2: #cec5b5;
  --accent: #9b4d41;
  --accent-soft: #f2e5de;
  --on-ink: #f4f1eb;
  --on-ink-2: rgba(244, 241, 235, 0.72);
  --on-ink-line: rgba(244, 241, 235, 0.2);

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --max: 1200px;
  --gutter: 20px;
  --header-h: 64px;
  --chips-h: 56px;
  --r-card: 16px;
  --r-control: 999px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

@media (min-width: 768px) {
  :root {
    --gutter: 40px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.nw {
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 8px;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* Кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--r-control);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 160ms var(--ease),
    border-color 160ms var(--ease),
    color 160ms var(--ease),
    transform 120ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn--ink {
  background: var(--ink);
  color: var(--on-ink);
}

.btn--ghost {
  border-color: var(--line-2);
  background: transparent;
}

.btn--line {
  min-height: 40px;
  padding: 0 18px;
  border-color: var(--ink);
  background: transparent;
  font-size: 14px;
}

.btn--paper {
  background: var(--on-ink);
  color: var(--ink);
}

.btn--ghost-light {
  border-color: var(--on-ink-line);
  background: transparent;
  color: var(--on-ink);
}

.btn--small {
  min-height: 36px;
  padding: 0 16px;
  font-size: 14px;
}

@media (hover: hover) and (pointer: fine) {
  .btn--ink:hover {
    background: #2a3658;
  }
  .btn--ghost:hover,
  .btn--line:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--on-ink);
  }
  .btn--paper:hover {
    background: #fff;
  }
  .btn--ghost-light:hover {
    border-color: var(--on-ink);
  }
}

/* Шапка */

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 241, 235, 0.88);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.1;
  margin-right: auto;
}

.brand__name {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.brand__tail {
  color: var(--accent);
}

.brand__tagline {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

.nav {
  display: none;
  gap: 28px;
  font-size: 15px;
}

.nav a {
  text-decoration: none;
  color: var(--ink-2);
}

@media (hover: hover) and (pointer: fine) {
  .nav a:hover {
    color: var(--ink);
  }
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }
}

.phone {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: var(--r-control);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 380px) {
  .phone {
    padding: 0 12px;
    font-size: 13px;
  }
}

/* Первый экран */

.hero {
  padding: 48px 0 56px;
}

.hero__inner {
  display: grid;
  gap: 40px;
}

@media (min-width: 960px) {
  .hero {
    padding: 88px 0 80px;
  }
  .hero__inner {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 72px;
    align-items: end;
  }
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.hero h1 {
  margin: 20px 0 20px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.hero__lead {
  max-width: 34em;
  font-size: 18px;
  color: var(--ink-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
}

.toc__title {
  padding: 18px 22px 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  transition: background-color 160ms var(--ease);
}

.toc__num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.toc__name {
  font-size: 15px;
  line-height: 1.4;
}

.toc__count {
  min-width: 24px;
  font-size: 13px;
  color: var(--ink-3);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) and (pointer: fine) {
  .toc a:hover {
    background: var(--paper);
  }
}

/* Производители */

.makers {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.makers__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 32px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.makers__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.makers ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--serif);
  font-size: 18px;
}

.makers li span {
  margin-left: 4px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-3);
}

/* Каталог */

.catalog {
  padding-bottom: 32px;
}

.chips {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  background: rgba(244, 241, 235, 0.94);
  border-bottom: 1px solid var(--line);
}

.chips__inner {
  display: flex;
  gap: 8px;
  height: var(--chips-h);
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chips__inner::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-control);
  background: var(--surface);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 160ms var(--ease),
    border-color 160ms var(--ease),
    color 160ms var(--ease);
}

.chip[aria-current="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}

@media (hover: hover) and (pointer: fine) {
  .chip:not([aria-current="true"]):hover {
    border-color: var(--ink);
  }
}

.category {
  padding-top: 56px;
  scroll-margin-top: calc(var(--header-h) + var(--chips-h));
}

.category__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 16px;
  align-items: baseline;
  margin-bottom: 24px;
}

.category__num {
  grid-row: span 2;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--accent);
}

.category__head h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.category__count {
  font-size: 14px;
  color: var(--ink-3);
}

.grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

.card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  scroll-margin-top: calc(var(--header-h) + var(--chips-h) + 16px);
  transition:
    border-color 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

@media (min-width: 768px) {
  .card {
    padding: 28px;
  }
}

.card.is-added {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card__glyph {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.glyph {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card__volume {
  padding: 5px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-control);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.card__name {
  margin-top: 22px;
  font-size: 27px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.card__sub {
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-3);
}

.card__spec {
  margin: 20px 0 0;
}

.card__spec > div {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.card__spec dt {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.card__spec dd {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.5;
}

@media (min-width: 1100px) {
  .card__spec > div {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 16px;
  }
  .card__spec dt {
    padding-top: 3px;
  }
  .card__spec dd {
    margin: 0;
  }
}

.card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.card__price {
  font-size: 14px;
  color: var(--ink-2);
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ink);
  border-radius: var(--r-control);
  background: var(--ink);
  color: var(--on-ink);
}

.qty button {
  width: 40px;
  height: 38px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--r-control);
  -webkit-tap-highlight-color: transparent;
}

.qty output {
  min-width: 28px;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Как заказать */

.how {
  padding: 80px 0 88px;
}

.how h2,
.request h2 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
}

.steps {
  display: grid;
  gap: 32px;
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
  }
}

.steps li {
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}

.steps__num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
}

.steps h3 {
  margin: 10px 0 8px;
  font-size: 24px;
  line-height: 1.2;
}

.steps p {
  color: var(--ink-2);
}

/* Запрос */

.request {
  padding: 80px 0 96px;
  background: var(--ink);
  color: var(--on-ink);
  scroll-margin-top: var(--header-h);
}

.request__inner {
  display: grid;
  gap: 40px;
}

@media (min-width: 960px) {
  .request__inner {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 72px;
    align-items: start;
  }
}

.request__intro p {
  max-width: 30em;
  margin-top: 18px;
  color: var(--on-ink-2);
}

.request__phone {
  display: inline-block;
  margin-top: 28px;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 34px);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--on-ink-line);
}

.panel {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--on-ink-line);
  border-radius: var(--r-card);
  background: rgba(244, 241, 235, 0.05);
}

@media (min-width: 768px) {
  .panel {
    padding: 32px;
  }
}

.panel__empty {
  color: var(--on-ink-2);
}

.panel__list {
  display: grid;
  list-style: none;
  margin: 0;
  padding: 0;
}

.panel__list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--on-ink-line);
}

.panel__list li:first-child {
  border-top: 1px solid var(--on-ink-line);
}

.panel__item-name {
  font-weight: 500;
  overflow-wrap: anywhere;
}

.panel__item-volume {
  display: block;
  font-size: 13px;
  color: var(--on-ink-2);
}

.panel .qty {
  background: transparent;
  border-color: var(--on-ink-line);
}

.panel .qty button {
  width: 36px;
  height: 34px;
}

.field {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--on-ink-2);
}

.field em {
  font-style: normal;
  opacity: 0.7;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--on-ink-line);
  border-radius: 12px;
  background: rgba(244, 241, 235, 0.06);
  color: var(--on-ink);
  font-size: 16px;
  transition: border-color 160ms var(--ease);
}

.field input {
  min-height: 48px;
}

.field textarea {
  resize: vertical;
  min-height: 88px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--on-ink);
}

.panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.panel__actions .btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.panel__status {
  min-height: 1.5em;
  font-size: 14px;
  color: var(--on-ink-2);
}

/* Подвал */

.footer {
  padding: 32px 0 40px;
  font-size: 14px;
  color: var(--ink-3);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
}

.footer__name {
  color: var(--ink);
  margin-right: auto;
}

.footer a {
  text-decoration: none;
}

/* Плашка запроса */

.request-bar {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100% - 32px);
  padding: 6px 6px 6px 20px;
  border-radius: var(--r-control);
  background: var(--ink);
  color: var(--on-ink);
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(27, 37, 64, 0.25);
  transform: translateX(-50%);
}

@media (prefers-reduced-motion: no-preference) {
  .request-bar {
    animation: bar-in 240ms var(--ease);
  }
  @keyframes bar-in {
    from {
      opacity: 0;
      transform: translate(-50%, 12px);
    }
  }
}
