/* AXPO.PRO — «Мастерская с биркой». Токены: research/08-prototype-design.md */
:root {
  --ink: #151B2B;
  --ink-2: #26304A;
  --accent: #FBBA36;
  --accent-hover: #F2A80F;
  --accent-ink: #8A5C00;
  --bg: #ECEEF0;
  --surface: #FFFFFF;
  --line: #D5D8DD;
  --muted: #535A6B;
  --on-dark: #E9ECF2;
  --on-dark-muted: #AEB5C4;
  --success: #1A7240;
  --error: #B8322A;

  --f-display: "Unbounded", "Onest", system-ui, sans-serif;
  --f-body: "Onest", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --r-s: 6px;
  --r-m: 12px;
  --r-l: 20px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --sec: clamp(56px, 8vw, 104px);
  --shadow: 0 1px 2px rgba(21, 27, 43, .06), 0 8px 24px rgba(21, 27, 43, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--f-body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.12; font-weight: 600; }
h1, h2 { font-family: var(--f-display); letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4.6vw, 52px); }
h2 { font-size: clamp(24px, 3.2vw, 38px); }
h3 { font-size: 20px; font-weight: 700; line-height: 1.25; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible, .footer :focus-visible { outline-color: var(--accent); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sec { padding: var(--sec) 0; }
.sec--white { background: var(--surface); }
.sec--dark { background: var(--ink); color: var(--on-dark); }
.sec__head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.sec__head p { color: var(--muted); font-size: 18px; margin-top: 14px; }
.sec--dark .sec__head p { color: var(--on-dark-muted); }
.eyebrow { display: inline-block; font: 500 13px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; }
.sec--dark .eyebrow { color: var(--accent); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--accent); padding: 10px 16px; z-index: 100; border-radius: var(--r-s); font-weight: 600; }
.skip:focus { top: 8px; }

/* ---------- черновик ---------- */
.draft-bar { background: repeating-linear-gradient(-45deg, var(--accent) 0 14px, #FFD675 14px 28px); color: var(--ink); font: 500 13px/1.4 var(--f-mono); padding: 8px var(--gutter); text-align: center; }
.draft-bar[hidden] { display: none; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: var(--r-m); border: 2px solid transparent; font-weight: 600; font-size: 17px; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, transform .15s; }
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: var(--accent-hover); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-2); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.sec--dark .btn--ghost { border-color: var(--on-dark); color: var(--on-dark); }
.sec--dark .btn--ghost:hover { background: var(--on-dark); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn--block { width: 100%; }
.link-arrow { font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.link-arrow:hover { border-color: var(--ink); }

/* ---------- логотип и шапка ---------- */
.logo { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font: 800 22px/1 var(--f-body); letter-spacing: .02em; color: var(--ink); }
.logo__tag { font: 600 14px/1 var(--f-mono); background: var(--accent); padding: 5px 7px; border-radius: 4px; }
.footer .logo { color: #fff; }
.footer .logo__tag { color: var(--ink); }

.header { position: sticky; top: 0; z-index: 50; background: rgba(236, 238, 240, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header__in { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 4px; }
.nav a { display: block; white-space: nowrap; padding: 10px 12px; border-radius: var(--r-s); text-decoration: none; font-weight: 500; font-size: 16px; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(21, 27, 43, .07); }
.header__phone { font: 600 17px/1 var(--f-mono); text-decoration: none; white-space: nowrap; }
.header__cta { min-height: 44px; padding: 0 18px; font-size: 16px; white-space: nowrap; }
.burger, .header__call { display: none; }

@media (max-width: 1180px) {
  .nav { position: fixed; inset: 72px 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; display: none; margin: 0; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { padding: 14px 8px; font-size: 18px; }
  .burger { display: inline-flex; margin-left: auto; width: 48px; height: 48px; align-items: center; justify-content: center; border: 0; background: transparent; cursor: pointer; border-radius: var(--r-s); }
  .burger span, .burger span::before, .burger span::after { display: block; width: 22px; height: 2px; background: var(--ink); position: relative; transition: transform .2s; }
  .burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
  .burger span::before { top: -7px; } .burger span::after { top: 7px; }
  .burger[aria-expanded="true"] span { background: transparent; }
  .burger[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }
  .header__call { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: var(--r-m); background: var(--accent); }
  .header__phone, .header__cta { display: none; }
  .header__in { gap: 8px; }
}

/* ---------- бирка (фирменный элемент) ---------- */
.tag {
  --hole: 14px;
  position: relative;
  background: var(--accent);
  color: var(--ink);
  border-radius: 10px 18px 18px 10px;
  padding: 22px 24px 22px calc(24px + var(--hole) + 14px);
  clip-path: polygon(22px 0, 100% 0, 100% 100%, 22px 100%, 0 calc(100% - 22px), 0 22px);
}
.tag::before { content: ""; position: absolute; left: 22px; top: 50%; width: var(--hole); height: var(--hole); margin-top: calc(var(--hole) / -2); border-radius: 50%; background: var(--bg); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); }
.sec--white .tag::before { background: var(--surface); }
.tag__label { font: 500 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.tag__value { font: 600 22px/1.2 var(--f-mono); margin-top: 6px; }

/* ---------- hero ---------- */
.hero { padding: clamp(28px, 5vw, 64px) 0 var(--sec); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 56px); align-items: stretch; }
.hero__lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); margin: 20px 0 28px; max-width: 34em; }
.hero__lead strong { color: var(--ink); font-weight: 600; }
.hero__visual { position: relative; background: var(--accent); border-radius: var(--r-l); overflow: hidden; min-height: 420px; }
.hero__visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.hero__note { position: absolute; left: 16px; bottom: 16px; background: rgba(21, 27, 43, .82); color: #fff; font: 500 12px/1.3 var(--f-mono); padding: 6px 10px; border-radius: 6px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.door { display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: var(--r-m); background: var(--surface); text-decoration: none; border: 2px solid transparent; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.door:hover { border-color: var(--ink); transform: translateY(-2px); }
.door__who { font: 500 13px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); }
.door__title { font-size: 21px; font-weight: 700; line-height: 1.2; }
.door__text { color: var(--muted); font-size: 15px; margin: 0; }
.door__go { margin-top: auto; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }
.door--dark { background: var(--ink); color: #fff; }
.door--dark .door__who { color: var(--accent); }
.door--dark .door__text { color: var(--on-dark-muted); }
.door--dark:hover { border-color: var(--accent); }

/* ---------- статус заказа ---------- */
.status { margin-top: clamp(28px, 4vw, 40px); }
.status__form { display: grid; grid-template-columns: 1.1fr 1fr auto; gap: 10px; align-items: end; margin-top: 12px; }
.status .field input { background: rgba(255, 255, 255, .7); border-color: rgba(21, 27, 43, .25); font-family: var(--f-mono); }
.status__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.status__head h2 { font: 700 20px/1.2 var(--f-body); }
.status__head p { margin: 0; font-size: 15px; }
.status .form-msg { margin-top: 12px; }
.status .consent, .status .consent a { color: var(--ink); }

/* ---------- списки услуг ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { background: var(--surface); border-radius: var(--r-m); padding: 26px; box-shadow: var(--shadow); }
.sec--white .card { background: var(--bg); box-shadow: none; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); margin: 0; }
.card__list { margin-top: 12px; color: var(--muted); }
.card__list li { padding: 7px 0 7px 22px; position: relative; border-top: 1px solid var(--line); font-size: 16px; }
.card__list li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 10px; height: 2px; background: var(--accent-ink); }
.icon { width: 44px; height: 44px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.icon svg { width: 24px; height: 24px; stroke: var(--ink); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card--link { text-decoration: none; display: block; transition: transform .15s; }
.card--link:hover { transform: translateY(-2px); }

/* ---------- шаги ремонта ---------- */
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; position: relative; }
.step { position: relative; padding: 0 16px 0 0; }
.step__n { display: inline-flex; align-items: center; gap: 8px; font: 600 14px/1 var(--f-mono); background: var(--accent); padding: 8px 12px 8px 22px; border-radius: 3px 8px 8px 3px; position: relative; margin-bottom: 18px; }
.step__n::before { content: ""; position: absolute; left: 8px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--bg); }
.sec--white .step__n::before { background: var(--surface); }
.step::after { content: ""; position: absolute; top: 16px; left: 72px; right: 8px; border-top: 2px dashed var(--line); }
.step:last-child::after { display: none; }
.steps--4 { grid-template-columns: repeat(4, 1fr); }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- цены ---------- */
.prices { background: var(--surface); border-radius: var(--r-m); box-shadow: var(--shadow); overflow: hidden; }
.price-row { display: flex; justify-content: space-between; gap: 16px; padding: 16px 24px; border-top: 1px solid var(--line); align-items: baseline; }
.price-row:first-child { border-top: 0; }
.price-row__name { font-weight: 500; }
.price-row__note { display: block; color: var(--muted); font-size: 14px; font-weight: 400; }
.price-row__val { font: 600 18px/1.2 var(--f-mono); white-space: nowrap; }
.price-principle { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }

/* ---------- медиаблоки ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.split__img { border-radius: var(--r-l); overflow: hidden; background: #DDE0E3; }
.split__img img { width: 100%; height: 100%; object-fit: cover; }
.figcap { font: 400 12px/1.4 var(--f-mono); color: var(--muted); margin-top: 8px; }
.sec--dark .figcap { color: var(--on-dark-muted); }
.checks li { position: relative; padding: 8px 0 8px 32px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 13px; width: 18px; height: 10px; border-left: 3px solid var(--accent-ink); border-bottom: 3px solid var(--accent-ink); transform: rotate(-45deg); }
.sec--dark .checks li::before { border-color: var(--accent); }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 44px 20px 0; font-weight: 600; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font: 400 28px/1 var(--f-mono); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 12px; max-width: 70ch; }

/* ---------- формы ---------- */
.form-card { background: var(--surface); border-radius: var(--r-l); padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow); color: var(--ink); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field legend { font-weight: 600; font-size: 15px; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { min-height: 52px; padding: 12px 14px; border: 1.5px solid #7D8595; border-radius: var(--r-s); background: #fff; font-size: 17px; width: 100%; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(251, 186, 54, .6); }
.field.has-error input, .field.has-error select { border-color: var(--error); }
.field__err { color: var(--error); font-size: 14px; min-height: 0; }
.field__err:empty { display: none; }
.choice { display: flex; flex-wrap: wrap; gap: 10px; border: 0; padding: 0; margin: 0; }
.choice legend { margin-bottom: 8px; }
.choice label { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; border: 1.5px solid #7D8595; border-radius: var(--r-s); cursor: pointer; font-weight: 500; }
.choice input { width: 20px; height: 20px; accent-color: var(--ink); }
.choice label:has(input:checked) { border-color: var(--ink); background: #FFF6DE; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.consent input { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--ink); }
.consent a { color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { border-radius: var(--r-s); padding: 14px 16px; font-size: 16px; }
.form-msg:empty { display: none; }
.form-msg--ok { background: #E3F3E9; color: #11522D; }
.form-msg--err { background: #FBE7E5; color: #8A2219; }
.form-msg--info { background: #FFF3D6; color: #5E4000; }
.form-msg a { font-weight: 600; }
.form-done h3 { font-size: 24px; margin-bottom: 8px; }

/* ---------- калькулятор ---------- */
.calc { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; }
.calc__row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.calc__row:first-child { border-top: 0; }
.calc__row label { font-weight: 600; }
.calc__row small { display: block; color: var(--on-dark-muted); font-weight: 400; font-size: 14px; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid rgba(255, 255, 255, .35); border-radius: var(--r-s); overflow: hidden; }
.stepper button { width: 48px; height: 48px; border: 0; background: transparent; color: #fff; font-size: 22px; cursor: pointer; }
.stepper button:hover { background: rgba(255, 255, 255, .1); }
.stepper input { width: 64px; height: 48px; border: 0; background: transparent; color: #fff; text-align: center; font: 600 18px var(--f-mono); -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc__result .tag::before { background: var(--ink); }
.calc__result .tag__value { font-size: 28px; }
.calc__result p { color: var(--on-dark-muted); font-size: 15px; margin-top: 14px; }

/* ---------- контакты ---------- */
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.contacts dl { margin: 0; display: grid; gap: 18px; }
.contacts dt { font: 500 13px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.contacts dd { margin: 0; font-size: 20px; font-weight: 600; }
.contacts dd a { text-decoration: none; border-bottom: 2px solid var(--accent); }
.map-link { display: flex; flex-direction: column; justify-content: flex-end; min-height: 260px; border-radius: var(--r-l); padding: 24px; text-decoration: none; color: #fff; background:
  linear-gradient(0deg, rgba(21, 27, 43, .92), rgba(21, 27, 43, .2)),
  repeating-linear-gradient(0deg, transparent 0 38px, rgba(255, 255, 255, .08) 38px 40px),
  repeating-linear-gradient(90deg, transparent 0 38px, rgba(255, 255, 255, .08) 38px 40px),
  var(--ink-2); }
.map-link strong { font-size: 22px; }
.map-link span { color: var(--on-dark-muted); }

/* ---------- футер ---------- */
.footer { background: var(--ink); color: var(--on-dark-muted); padding: 56px 0 24px; font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.footer h3 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer li { padding: 4px 0; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__phone { font: 600 20px/1.2 var(--f-mono); color: #fff; }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); }
.credit { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; font-size: 13px; color: var(--on-dark-muted); text-decoration: none; }
a.credit:hover { color: #fff; border-color: var(--accent); text-decoration: none; }
.credit b { color: #fff; font-weight: 600; }

/* ---------- нижняя панель на телефоне ---------- */
.mbar { display: none; }
@media (max-width: 760px) {
  .mbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: rgba(236, 238, 240, .96); border-top: 1px solid var(--line); transition: transform .2s; }
  .mbar.is-hidden { transform: translateY(110%); }
  .mbar .btn { min-height: 48px; font-size: 16px; padding: 0 12px; white-space: nowrap; }
  .footer { padding-bottom: 96px; }
}

/* ---------- адаптив ---------- */
@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
  .step:nth-child(3)::after { display: none; }
  .steps--4 { grid-template-columns: repeat(2, 1fr); }
  .steps--4 .step:nth-child(3)::after { display: block; }
  .steps--4 .step:nth-child(2)::after { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero__grid, .split, .contacts, .calc, .price-principle { grid-template-columns: 1fr; }
  .hero__visual { min-height: 0; aspect-ratio: 16 / 10; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .status__form { grid-template-columns: 1fr 1fr; }
  .status__form .btn { grid-column: 1 / -1; }
  .split__img { max-height: 420px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .doors, .grid-3, .grid-2, .form-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step::after { display: none; }
  .step { padding: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
  .step__n { margin: 0; grid-row: span 2; align-self: start; }
  .status__form { grid-template-columns: 1fr; }
  .tag { padding: 18px 18px 18px calc(18px + var(--hole) + 14px); }
  .hero__actions .btn { width: 100%; }
  .footer__grid { grid-template-columns: 1fr; }
  .price-row { padding: 14px 16px; flex-wrap: wrap; }
  .card { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
