/* БыстроПечать — прототип первой страницы.
   Испания, слой B; словарь «промышленный люкс / каталог» (2а: Anglada, Savenzo) + плотность Genesal.
   Три цвета: белый, чёрный, красный. Красный интерфейса — цена, «Оставить заявку», «Отправить заявку».
   Красный внутри SVG — оттиск на предмете, не интерфейс.
   Без oklch, clamp, light-dark, rounded-full; шкала типа — медиазапросами. */

:root {
  --white: #ffffff;
  --black: #000000;
  --red: #c81e1e;
  --max: 1160px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--black);
  background: var(--white);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--black); outline-offset: 3px; }
.btn-red:focus-visible, .btn-black:focus-visible { outline-color: var(--black); }
.site-footer :focus-visible, .cookie :focus-visible { outline-color: var(--white); }
main:focus { outline: none; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  background: var(--white); border: 2px solid var(--black); padding: 10px 14px;
}
.skip:focus { top: 12px; }

/* Кнопки — прямоугольные, без скруглений */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 20px;
  font: inherit; font-size: 16px; font-weight: 700; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
}
.btn-red { background: var(--red); border-color: var(--red); color: var(--white); }
.btn-black { background: var(--black); border-color: var(--black); color: var(--white); }
.btn-black:hover { background: var(--white); color: var(--black); }
.btn-white { background: var(--white); border-color: var(--white); color: var(--black); }
.btn-ghost { background: transparent; border-color: var(--white); color: var(--white); }

/* 1. Шапка */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--white); border-bottom: 1px solid var(--black);
}
.bar { display: flex; align-items: center; gap: 32px; min-height: var(--header-h); }
.brand { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; text-decoration: none; }
.nav { flex: 1; }
.nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 8px 0; text-decoration: none; }
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.bar-actions { display: flex; align-items: center; gap: 20px; }
.phone { font-weight: 700; text-decoration: none; white-space: nowrap; }
.nav-toggle {
  display: none; min-height: 44px; padding: 8px 14px;
  background: var(--white); border: 2px solid var(--black); color: var(--black);
  font: inherit; font-weight: 700; cursor: pointer;
}

/* Секции */

.section { padding: 64px 0; border-top: 1px solid var(--black); }
h2 { margin: 0 0 16px; font-size: 32px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.25; font-weight: 700; }
.lead { margin: 0 0 24px; font-size: 18px; max-width: 60ch; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.two > * > p:first-child { margin-top: 0; }

/* 2. Герой: claim > имя изделия > техстрока */

.hero { padding: 56px 0 72px; }
.hero-grid {
  display: grid; grid-template-columns: 1fr 1.1fr; column-gap: 56px; row-gap: 0;
  grid-template-areas: "head field" "buy field";
}
.hero-head { grid-area: head; align-self: end; }
.hero-field { grid-area: field; align-self: center; }
.hero-buy { grid-area: buy; align-self: start; }
.hero-cta { margin: 0; }
.claim {
  margin: 0 0 24px; font-size: 96px; line-height: 0.95; font-weight: 800; letter-spacing: -0.045em;
}
.hero h1 { margin: 0 0 4px; font-size: 22px; line-height: 1.3; font-weight: 700; }
.hero-for { margin: 0 0 32px; font-size: 18px; }
.hero-product { border-top: 1px solid var(--black); padding-top: 20px; margin-bottom: 24px; }
.product-name { margin: 0 0 6px; font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; max-width: 22ch; }
.product-spec { margin: 0 0 16px; font-size: 16px; letter-spacing: 0.04em; text-transform: uppercase; }
.price { margin: 0 0 20px; font-size: 44px; line-height: 1; font-weight: 800; color: var(--red); letter-spacing: -0.02em; }

/* Предмет на светлом поле */
.field { margin: 0; background: var(--white); border: 1px solid var(--black); }
.hero-field img { width: 100%; }

/* 3. Задачи плитками */

.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-left: 1px solid var(--black); }
.tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  min-height: 168px; height: 100%; padding: 20px;
  border: 1px solid var(--black); border-left: 0; text-decoration: none;
}
.tile strong { font-size: 24px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; }
.tile span { font-size: 16px; }
.tile:hover { background: var(--black); color: var(--white); }

/* 4. Оснастка картинками */

.types {
  list-style: none; margin: 0 0 16px; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 16px;
}
.types li { display: flex; }
.type {
  display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0;
  background: var(--white); color: var(--black); border: 1px solid var(--black);
  font: inherit; text-align: left; cursor: pointer;
}
.type img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.type span { display: block; flex: 1; padding: 12px 16px; border-top: 1px solid var(--black); font-size: 18px; font-weight: 700; }
.type:hover span { text-decoration: underline; text-underline-offset: 4px; }
.type[aria-pressed="true"] { outline: 3px solid var(--black); outline-offset: -3px; }
.type[aria-pressed="true"] span { background: var(--black); color: var(--white); }
.picked { margin: 0; font-size: 16px; }

/* 5. Цена */

.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.breakdown { margin: 0; border-top: 1px solid var(--black); }
.breakdown div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--black); }
.breakdown dt, .breakdown dd { margin: 0; }
.breakdown dd { font-weight: 700; white-space: nowrap; }
.breakdown-total { border-bottom-width: 3px !important; }
.breakdown-total dt, .breakdown-total dd { font-weight: 800; font-size: 18px; }

/* 6. Два срока */

.term { border-top: 3px solid var(--black); padding-top: 16px; }
.term p { margin: 0; max-width: 46ch; }

/* 9. Доставка */

.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--black); }
.facts li { padding: 16px 24px 16px 0; font-size: 18px; }
.facts li + li { padding-left: 24px; border-left: 1px solid var(--black); }

/* 10. Контакты: кто / где / телефон */

.contacts { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--black); }
.contacts div { padding: 16px 24px 16px 0; }
.contacts div + div { padding-left: 24px; border-left: 1px solid var(--black); }
.contacts dt { margin: 0 0 4px; font-size: 16px; letter-spacing: 0.04em; text-transform: uppercase; }
.contacts dd { margin: 0; font-size: 20px; font-weight: 700; }
.contacts a { text-decoration: none; }

/* 11. Форма */

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; max-width: 880px; }
.form p { margin: 0; }
.form-full { grid-column: 1 / -1; }
.form label { display: block; margin-bottom: 6px; font-size: 16px; font-weight: 700; }
.form input[type="tel"], .form input[type="text"], .form select, .form textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  font: inherit; font-size: 16px; color: var(--black);
  background: var(--white); border: 1px solid var(--black); border-radius: 0;
}
.form input[type="file"] { width: 100%; min-height: 48px; padding: 10px 0; font: inherit; font-size: 16px; }
.form textarea { resize: vertical; }
.form [aria-invalid="true"] { border-width: 3px; }
.err { display: block; margin-top: 6px; font-weight: 700; }
.err[hidden] { display: none; }
.context { padding: 12px 16px; border: 1px solid var(--black); }
.context[hidden] { display: none; }
.form-msg { max-width: 880px; margin: 24px 0 0; padding: 16px; border: 3px solid var(--black); font-size: 18px; font-weight: 700; }
.form-msg[hidden] { display: none; }

/* 12. Подвал */

.site-footer { background: var(--black); color: var(--white); padding: 48px 0 64px; }
.brand-foot { margin: 0 0 24px; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.site-footer .contacts { border-top-color: var(--white); }
.site-footer .contacts div + div { border-left-color: var(--white); }

/* 13. Cookie */

.cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--black); color: var(--white); padding: 16px 0; }
.cookie[hidden] { display: none; }
.cookie-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.cookie p { margin: 0; font-size: 16px; }
.cookie-actions { display: flex; gap: 12px; flex-shrink: 0; }
body.has-cookie { padding-bottom: 96px; }

/* Узкий экран */

@media (max-width: 1060px) {
  .bar { gap: 16px; flex-wrap: wrap; }
  .brand { margin-right: auto; }
  .nav-toggle { display: inline-block; }
  .nav { order: 3; flex-basis: 100%; display: none; border-top: 1px solid var(--black); }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px 0 16px; }
  .nav a { padding: 12px 0; font-size: 18px; }
  .bar-actions { order: 2; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .claim { font-size: 72px; }
}

@media (max-width: 760px) {
  :root { --header-h: 120px; }
  .wrap { padding: 0 16px; }
  .bar { padding-top: 10px; padding-bottom: 10px; row-gap: 10px; }
  .bar-actions { order: 3; flex-basis: 100%; justify-content: space-between; }
  .nav { order: 4; }
  /* Первый экран 390×844: claim, схема, изделие, цена и кнопка без прокрутки */
  .hero { padding: 16px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "head" "field" "buy"; row-gap: 12px; }
  .claim { font-size: 44px; margin-bottom: 8px; }
  .hero h1 { font-size: 18px; }
  .hero-for { margin-bottom: 0; }
  .hero-field { justify-self: start; }
  .hero-field img { width: auto; height: 136px; }
  .hero-product { padding-top: 12px; margin-bottom: 12px; }
  .hero .product-name { font-size: 22px; }
  .hero .product-spec { margin-bottom: 8px; }
  .hero .price { font-size: 36px; margin-bottom: 0; }
  .two, .price-grid { grid-template-columns: 1fr; gap: 32px; }
  .product-name { font-size: 24px; }
  .price { font-size: 40px; }
  .section { padding: 48px 0; }
  h2 { font-size: 28px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile { min-height: 132px; padding: 16px; }
  .tile strong { font-size: 20px; }
  .types { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .type span { padding: 10px 12px; font-size: 16px; }
  .facts, .contacts { grid-template-columns: 1fr; }
  .facts li, .facts li + li, .contacts div, .contacts div + div { padding: 14px 0; border-left: 0; }
  .facts li + li, .contacts div + div { border-top: 1px solid var(--black); }
  .site-footer .contacts div + div { border-top-color: var(--white); }
  .form { grid-template-columns: 1fr; }
  .cookie-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .cookie-actions .btn { flex: 1; }
  body.has-cookie { padding-bottom: 168px; }
}

@media (max-width: 400px) {
  .claim { font-size: 40px; }
  .tiles { grid-template-columns: 1fr; }
  .phone { font-size: 16px; }
  .bar-actions .btn { padding: 10px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
