/* ==========================================================================
   Manrope — свой хостинг вместо Google Fonts.
   Вариативное начертание 400–800: один файл покрывает все веса.
   Наборы символов разделены через unicode-range, поэтому браузер
   скачивает только те, что реально встречаются на странице.
   Лицензия SIL Open Font License 1.1 — размещать у себя разрешено.
   ========================================================================== */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/manrope-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/manrope-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/manrope-latin.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;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Bitter — брусковая антиква для заголовков. Вариативная 400–900,
   лицензия SIL Open Font License 1.1. Только кириллица и латиница:
   в заголовках расширенные наборы не встречаются. */

@font-face {
  font-family: 'Bitter';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/bitter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Bitter';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/bitter-latin.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;
}

/* ==========================================================================
   Братский Паръ — кастомные стили
   Tailwind отвечает за сетку и типографику, здесь — компоненты и анимации.
   ========================================================================== */

:root {
  --bark-50:  #FAF6F1;
  --bark-100: #F3E9DD;
  --bark-200: #E4CFB5;
  --bark-300: #D0B08C;
  --bark-400: #B98C60;
  --bark-500: #A0703F;
  --bark-600: #835932;
  --bark-700: #68462A;
  --bark-800: #4A3120;
  --bark-900: #2E1F15;
  --bark-950: #1A120C;

  --flame-300: #FFC96B;
  --flame-400: #FFB43D;
  --flame-500: #F59220;
  --flame-600: #DB7708;

  --ring: 0 0 0 4px rgba(245, 146, 32, .22);
  --shadow-card: 0 1px 2px rgba(26, 18, 12, .05), 0 12px 28px -18px rgba(26, 18, 12, .35);
  --shadow-lift: 0 18px 40px -22px rgba(26, 18, 12, .55);
  --header-h: 64px;
}

@media (min-width: 1024px) { :root { --header-h: 80px; } }

* { -webkit-tap-highlight-color: transparent; }

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

body { overflow-x: hidden; }
body.is-locked { overflow: hidden; }

section[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

::selection { background: var(--flame-500); color: #fff; }

/* --------------------------------------------------------- Шапка */

.site-header {
  background: rgba(26, 18, 12, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  transition: background .3s ease, box-shadow .3s ease;
}

.site-header.is-scrolled {
  background: rgba(26, 18, 12, .94);
  box-shadow: 0 10px 30px -22px rgba(0, 0, 0, .9);
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  color: var(--flame-400);
  background: linear-gradient(145deg, rgba(245, 146, 32, .18), rgba(245, 146, 32, .04));
  border: 1px solid rgba(245, 146, 32, .28);
}
.logo-mark svg { width: 26px; height: 26px; }

.nav-link { position: relative; transition: color .2s ease; }
.nav-link:hover { color: var(--flame-400); }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  height: 2px; width: 0; border-radius: 2px;
  background: var(--flame-500); transition: width .25s ease;
}
.nav-link:hover::after { width: 100%; }

.burger {
  display: grid; place-content: center; gap: 5px;
  width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .05);
}
.burger span {
  display: block; width: 18px; height: 2px; border-radius: 2px;
  background: var(--bark-100); transition: transform .25s ease, opacity .2s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  border-top: 1px solid rgba(255, 255, 255, .07);
  background: rgba(26, 18, 12, .97);
  animation: slide-down .22s ease both;
}
.mobile-link {
  padding: 12px 4px;
  font-weight: 600; color: var(--bark-100);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.mobile-link:last-child { border-bottom: 0; }

@keyframes slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------- Кнопки */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 14px; font-weight: 700; line-height: 1;
  white-space: nowrap; cursor: pointer;
  transition: transform .16s ease, box-shadow .22s ease, background .22s ease, color .22s ease, border-color .22s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }

.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn-lg { padding: 16px 26px; font-size: 16px; }

.btn-primary {
  color: #22160B;
  background: linear-gradient(135deg, var(--flame-400), var(--flame-600));
  box-shadow: 0 10px 26px -12px rgba(219, 119, 8, .85);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--flame-300), var(--flame-500));
  box-shadow: 0 16px 34px -12px rgba(219, 119, 8, .95);
  transform: translateY(-1px);
}

.btn-outline {
  color: var(--bark-50);
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .04);
}
.btn-outline:hover {
  border-color: var(--flame-400);
  color: var(--flame-400);
  background: rgba(245, 146, 32, .1);
  transform: translateY(-1px);
}

.btn[disabled] { opacity: .6; pointer-events: none; }

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

.hero { position: relative; }
.hero::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 60px;
  background: linear-gradient(to bottom, transparent, var(--bark-50));
  pointer-events: none;
}
.hero-glow {
  position: absolute; top: -160px; right: -140px;
  width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 146, 32, .22) 0%, rgba(245, 146, 32, 0) 62%);
  pointer-events: none;
}

.chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 15px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--bark-200);
  border: 1px solid rgba(245, 146, 32, .3);
  background: rgba(245, 146, 32, .09);
}
.chip-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--flame-400);
  box-shadow: 0 0 0 0 rgba(255, 180, 61, .7);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(255, 180, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 180, 61, 0); }
}

.text-gradient {
  background: linear-gradient(120deg, var(--flame-300), var(--flame-500));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.bullet {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 14px;
  font-size: 14px; font-weight: 600; color: var(--bark-100);
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
}
.bullet-ico {
  flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px;
  fill: none; stroke: var(--flame-400); stroke-width: 2.6;
  stroke-linecap: round; stroke-linejoin: round;
}

.stat-num { font-size: 22px; font-weight: 800; color: var(--flame-400); }
.stat-label { margin-top: 2px; font-size: 12px; color: var(--bark-300); }

.hero-art {
  border-radius: 28px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 40px 80px -50px rgba(0, 0, 0, .9);
  animation: float 7s ease-in-out infinite;
}
.hero-art svg { display: block; width: 100%; height: auto; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.smoke { animation: smoke 4s ease-in-out infinite; transform-origin: 312px 120px; }
@keyframes smoke {
  0%, 100% { opacity: .5; transform: translateY(0); }
  50% { opacity: .85; transform: translateY(-6px); }
}

.hero-badge {
  position: absolute; left: 12px; bottom: -18px;
  padding: 14px 20px; border-radius: 18px;
  background: var(--bark-50); color: var(--bark-950);
  box-shadow: var(--shadow-lift);
}
.hero-badge-value { display: block; font-size: 19px; font-weight: 800; }
.hero-badge-label { display: block; margin-top: 2px; font-size: 12px; color: var(--bark-600); }

@media (min-width: 640px) { .hero-badge { left: -14px; bottom: -22px; } }

/* --------------------------------------------------------- Секции */

.section { padding: 64px 0; }
@media (min-width: 1024px) { .section { padding: 96px 0; } }

.eyebrow {
  display: inline-block; margin-bottom: 12px;
  font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--flame-600);
}
.eyebrow-dark { color: var(--flame-400); }

.section-title {
  font-size: 28px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em;
}
@media (min-width: 640px) { .section-title { font-size: 38px; } }

.section-lead {
  margin-top: 14px; font-size: 16px; line-height: 1.65; color: var(--bark-700);
}

/* --------------------------------------------------------- Карточки калькулятора */

.card {
  padding: 22px; border-radius: 22px;
  background: #fff;
  border: 1px solid var(--bark-100);
  box-shadow: var(--shadow-card);
}
@media (min-width: 640px) { .card { padding: 26px; } }

.card-dark {
  padding: 24px; border-radius: 22px;
  color: var(--bark-50);
  background: linear-gradient(160deg, var(--bark-900), var(--bark-950));
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: var(--shadow-lift);
}

/* legend по умолчанию «врезается» в верхнюю границу fieldset —
   float возвращает его в обычный поток внутри карточки. */
.step-legend {
  float: left; width: 100%; padding: 0;
  display: flex; align-items: center; gap: 12px;
  font-size: 18px; font-weight: 800; letter-spacing: -.01em;
  /* Отступ до содержимого задаётся здесь: clear у соседа
     поглощает его собственный margin-top, но не нижнее поле флоата. */
  margin-bottom: 20px;
}
.step-legend + * { clear: both; }
.step-num {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 10px;
  font-size: 14px; font-weight: 800;
  color: var(--flame-700);
  background: rgba(245, 146, 32, .14);
  border: 1px solid rgba(245, 146, 32, .28);
}

/* Опции: радио и чекбоксы */

.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }

.opt-body {
  display: block; height: 100%;
  padding: 16px; border-radius: 16px;
  border: 1.5px solid var(--bark-100);
  background: var(--bark-50);
  transition: border-color .2s ease, background .2s ease, transform .18s ease, box-shadow .2s ease;
}
.opt:hover .opt-body { border-color: var(--bark-300); transform: translateY(-2px); }
.opt input:checked + .opt-body {
  border-color: var(--flame-500);
  background: rgba(245, 146, 32, .07);
  box-shadow: 0 10px 26px -18px rgba(219, 119, 8, .9);
}
.opt input:focus-visible + .opt-body { box-shadow: var(--ring); }

.opt-shape .opt-body { text-align: center; }
.opt-ico {
  display: block; margin: 2px auto 10px;
  width: 68px; height: 54px; color: var(--bark-500);
  transition: color .2s ease, transform .2s ease;
}
.opt-ico svg { width: 100%; height: 100%; }
.opt input:checked + .opt-body .opt-ico { color: var(--flame-600); transform: scale(1.05); }

.opt-title { display: block; font-size: 15px; font-weight: 700; color: var(--bark-950); }
.opt-note { display: block; margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--bark-600); }
.opt-price { display: block; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--flame-700); }

.opt-len .opt-body { padding: 14px 10px; text-align: center; }
.opt-len-value { display: block; font-size: 18px; font-weight: 800; }
.opt-len-price { display: block; margin-top: 3px; font-size: 12px; font-weight: 600; color: var(--bark-600); }
.opt input:checked + .opt-body .opt-len-price { color: var(--flame-700); }

.opt-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.tag {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
}
.tag-neutral { color: var(--bark-700); background: var(--bark-100); }
.tag-accent { color: #fff; background: var(--flame-600); }

/* Чекбоксы */

.opt-check { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-radius: 16px;
  border: 1.5px solid var(--bark-100); background: var(--bark-50);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.opt-check:hover { border-color: var(--bark-300); }
.opt-check .opt-body { padding: 0; border: 0; background: none; }
.opt-check:has(input:checked) {
  border-color: var(--flame-500);
  background: rgba(245, 146, 32, .07);
  box-shadow: 0 10px 26px -18px rgba(219, 119, 8, .9);
}
.opt-check:has(input:focus-visible) { box-shadow: var(--ring); }

.check-box {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 24px; height: 24px; margin-top: 1px; border-radius: 8px;
  border: 1.5px solid var(--bark-300); background: #fff;
  transition: background .18s ease, border-color .18s ease;
}
.check-box svg {
  width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
  opacity: 0; transform: scale(.6); transition: opacity .18s ease, transform .18s ease;
}
.opt-check:has(input:checked) .check-box { background: var(--flame-600); border-color: var(--flame-600); }
.opt-check:has(input:checked) .check-box svg { opacity: 1; transform: none; }

.opt-add {
  flex: 0 0 auto; margin-left: auto; align-self: center;
  font-size: 14px; font-weight: 800; color: var(--bark-950); white-space: nowrap;
}
.opt-check:has(input:checked) .opt-add { color: var(--flame-700); }

/* Панель итога */

.summary { position: relative; }
.summary-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.summary-row span:first-child { color: var(--bark-300); }
.summary-row span:last-child { font-weight: 700; text-align: right; }
.summary-row-accent span:last-child { color: var(--flame-400); }

.price {
  margin-top: 4px;
  font-size: 34px; font-weight: 800; letter-spacing: -.02em; color: var(--flame-400);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 640px) { .price { font-size: 40px; } }
.price.is-bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.045); } 100% { transform: none; } }

/* --------------------------------------------------------- Комплектация */

.feature {
  padding: 24px; border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.feature:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 146, 32, .38);
  background: linear-gradient(160deg, rgba(245, 146, 32, .1), rgba(255, 255, 255, .02));
}
.feature-ico {
  display: grid; place-items: center;
  width: 50px; height: 50px; border-radius: 15px;
  color: var(--flame-400);
  background: rgba(245, 146, 32, .12);
  border: 1px solid rgba(245, 146, 32, .26);
}
.feature-ico svg { width: 26px; height: 26px; }
.feature-title { margin-top: 16px; font-size: 17px; font-weight: 700; color: var(--bark-50); }
.feature-text { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--bark-300); }

/* --------------------------------------------------------- Доставка */

.info-card {
  padding: 26px; border-radius: 22px;
  background: #fff; border: 1px solid var(--bark-100);
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease;
}
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.info-card-accent { border-color: rgba(245, 146, 32, .4); background: linear-gradient(165deg, #fff, rgba(245, 146, 32, .07)); }

.info-ico {
  display: grid; place-items: center;
  width: 50px; height: 50px; border-radius: 15px;
  color: var(--flame-600); background: rgba(245, 146, 32, .12);
}
.info-ico svg { width: 26px; height: 26px; }
.info-title { margin-top: 16px; font-size: 17px; font-weight: 700; }
.info-price { margin-top: 6px; font-size: 26px; font-weight: 800; color: var(--bark-950); }
.info-text { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--bark-600); }

.note-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 18px; border-radius: 18px;
  border: 1px dashed var(--bark-200); background: rgba(255, 255, 255, .6);
}
.note-card p { font-size: 14px; line-height: 1.55; color: var(--bark-700); }
.note-num { font-size: 14px; font-weight: 800; color: var(--flame-600); }

/* --------------------------------------------------------- Контакты и формы */

.contact-tile {
  display: flex; align-items: center; gap: 13px;
  padding: 16px; border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .04);
  color: var(--bark-100);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.contact-tile:not(.contact-tile-static):hover {
  transform: translateY(-2px);
  border-color: rgba(245, 146, 32, .45);
  background: rgba(245, 146, 32, .1);
}
.contact-tile svg { flex: 0 0 auto; width: 24px; height: 24px; color: var(--flame-400); }
.contact-tile b { display: block; font-size: 15px; font-weight: 700; }
.contact-tile small { display: block; margin-top: 2px; font-size: 12px; color: var(--bark-400); }

.form-card {
  padding: 24px; border-radius: 24px;
  background: linear-gradient(165deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: var(--shadow-lift);
}
@media (min-width: 640px) { .form-card { padding: 30px; } }

.field { display: block; }
.field-label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: var(--bark-200); }
.field input, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 14px;
  font-size: 15px; color: var(--bark-50);
  background: rgba(0, 0, 0, .25);
  border: 1.5px solid rgba(255, 255, 255, .12);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field textarea { resize: vertical; min-height: 92px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(211, 190, 168, .45); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--flame-500);
  background: rgba(0, 0, 0, .35); box-shadow: var(--ring);
}
.field.has-error input, .field.has-error textarea { border-color: #E4635A; }

.field-error { display: none; margin-top: 6px; font-size: 12px; color: #FF9A92; }
.field.has-error .field-error { display: block; }

.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; line-height: 1.5; color: var(--bark-300); cursor: pointer; }
.consent input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--flame-600); }

.form-status { display: none; font-size: 13.5px; line-height: 1.5; text-align: center; }
.form-status.is-visible { display: block; }
.form-status.is-ok { color: #7BD88F; }
.form-status.is-error { color: #FF9A92; }

/* --------------------------------------------------------- Подвал */

.footer-head { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--bark-100); }
.footer-link { transition: color .2s ease; }
.footer-link:hover { color: var(--flame-400); }

.social {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 13px;
  color: var(--bark-200);
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
  transition: transform .2s ease, color .2s ease, border-color .2s ease, background .2s ease;
}
.social:hover { transform: translateY(-2px); color: var(--flame-400); border-color: rgba(245, 146, 32, .45); background: rgba(245, 146, 32, .1); }
.social svg { width: 21px; height: 21px; }

/* --------------------------------------------------------- Мобильная панель цены */

.mobile-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(26, 18, 12, .96);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, .1);
  transform: translateY(110%);
  transition: transform .3s ease;
}
.mobile-bar.is-visible { transform: none; }

/* Чтобы липкая панель не закрывала кнопку заказа */
@media (max-width: 1023px) { #calc { padding-bottom: 104px; } }

/* --------------------------------------------------------- Модальное окно */

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 10, 7, .72); backdrop-filter: blur(4px); animation: fade-in .2s ease both; }

.modal-panel {
  position: relative; width: 100%; max-width: 480px;
  max-height: calc(100dvh - 32px); overflow-y: auto;
  padding: 26px; border-radius: 24px;
  color: var(--bark-50);
  background: linear-gradient(165deg, var(--bark-900), var(--bark-950));
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9);
  animation: modal-in .26s cubic-bezier(.16, 1, .3, 1) both;
}
@media (min-width: 640px) { .modal-panel { padding: 32px; } }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

.modal-close {
  position: absolute; top: 14px; right: 14px;
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 12px;
  color: var(--bark-300);
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .05);
  transition: color .2s ease, background .2s ease;
}
.modal-close:hover { color: var(--bark-50); background: rgba(255, 255, 255, .12); }
.modal-close svg { width: 18px; height: 18px; }

.modal-summary {
  margin-top: 18px; padding: 16px; border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(0, 0, 0, .22);
}

/* --------------------------------------------------------- Тост */

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80;
  transform: translate(-50%, 20px);
  max-width: min(92vw, 420px);
  padding: 14px 20px; border-radius: 16px;
  font-size: 14px; font-weight: 600; color: var(--bark-950);
  background: var(--bark-50);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .8);
  opacity: 0; transition: opacity .25s ease, transform .25s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { color: #fff; background: #C4433A; }

/* --------------------------------------------------------- Анимации появления */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s cubic-bezier(.16, 1, .3, 1); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   ФИРМЕННЫЙ БЛОК И ФОТОГРАФИИ
   Фото подключаются из /img. Если файла нет, JS убирает <img>, и под ним
   остаётся аккуратная заглушка — страница не разваливается.
   ========================================================================== */

.brand { display: flex; align-items: center; gap: 12px; }

.brand-name {
  display: block;
  font-size: 15px; font-weight: 800; letter-spacing: -.01em;
  color: var(--bark-50); line-height: 1.15;
}
.brand-accent { color: var(--flame-400); }

.brand-sub {
  display: none;
  margin-top: 2px;
  font-size: 11px; font-weight: 500; line-height: 1.3;
  color: var(--bark-300);
}

@media (min-width: 640px) {
  .brand-name { font-size: 18px; }
  .brand-sub { display: block; font-size: 12px; }
}

/* Логотип: растр поверх, векторная запаска под ним */
.logo-mark { position: relative; overflow: hidden; }
.logo-ico { display: grid; place-items: center; z-index: 1; }
.logo-mark img {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; object-fit: cover;
}

/* --------------------------------------------------------- Фото на первом экране */

.hero-art {
  position: relative; margin: 0;
  aspect-ratio: 5 / 4;
  background: linear-gradient(155deg, var(--bark-800), var(--bark-950));
}
.hero-art img {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; object-fit: cover;
}
.hero-art::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    linear-gradient(to top, rgba(26, 18, 12, .62), rgba(26, 18, 12, 0) 52%),
    linear-gradient(to right, rgba(26, 18, 12, .3), rgba(26, 18, 12, 0) 45%);
}
.hero-art-empty {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--bark-500);
  font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.hero-art-empty svg { width: 96px; height: 76px; }

/* --------------------------------------------------------- Фото моделей в калькуляторе */

.opt-photo {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 4 / 3; margin-bottom: 14px;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--bark-100), var(--bark-200));
}
.opt-photo img {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.opt-photo .opt-ico { position: absolute; inset: 0; z-index: 1; margin: auto; }

.opt-shape:hover .opt-photo img { transform: scale(1.05); }
.opt input:checked + .opt-body .opt-photo { box-shadow: inset 0 0 0 2px var(--flame-500); }

/* --------------------------------------------------------- Наши работы */

.work { margin: 0; }

.work-btn {
  position: relative; display: block; width: 100%; overflow: hidden;
  aspect-ratio: 4 / 3; border-radius: 18px; cursor: zoom-in;
  border: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.work-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 146, 32, .5);
  box-shadow: 0 22px 44px -26px rgba(0, 0, 0, .9);
}
.work-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.work-btn img {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .45s ease;
}
.work-btn:hover img { transform: scale(1.06); }

.work-empty {
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--bark-500);
}

.work-caption { margin-top: 12px; padding-inline: 2px; }
.work-caption b { display: block; font-size: 15px; font-weight: 700; color: var(--bark-50); }
.work-caption span { display: block; margin-top: 2px; font-size: 13px; color: var(--bark-300); }

.work-cta {
  display: flex; flex-direction: column; justify-content: center;
  padding: 26px; border-radius: 18px;
  border: 1px dashed rgba(245, 146, 32, .38);
  background: linear-gradient(160deg, rgba(245, 146, 32, .12), rgba(255, 255, 255, .02));
}
.work-cta-title { font-size: 19px; font-weight: 800; color: var(--bark-50); }
.work-cta-text { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--bark-300); }
.work-cta .btn { align-self: flex-start; }

/* --------------------------------------------------------- Просмотр фото */

.lightbox { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; }
.lightbox-backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 7, 5, .9); backdrop-filter: blur(6px);
  animation: fade-in .2s ease both;
}

.lightbox-panel {
  position: relative; width: 100%; max-width: 1000px;
  animation: modal-in .28s cubic-bezier(.16, 1, .3, 1) both;
}
.lightbox-panel img {
  display: block; width: 100%; max-height: calc(100dvh - 140px);
  object-fit: contain; border-radius: 16px;
  background: var(--bark-950);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .95);
}

.lightbox-caption {
  margin-top: 14px; text-align: center;
  font-size: 14px; color: var(--bark-200);
}

.lightbox-close {
  position: absolute; top: -46px; right: 0;
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 12px;
  color: var(--bark-200);
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  transition: color .2s ease, background .2s ease;
}
.lightbox-close:hover { color: #fff; background: rgba(255, 255, 255, .18); }
.lightbox-close svg { width: 18px; height: 18px; }

.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  color: var(--bark-100);
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(26, 18, 12, .72);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.lightbox-nav:hover { color: var(--flame-400); background: rgba(26, 18, 12, .92); }
.lightbox-nav svg { width: 22px; height: 22px; }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

@media (min-width: 1100px) {
  .lightbox-prev { left: -66px; }
  .lightbox-next { right: -66px; }
}

/* Первый экран больше не содержит нарисованную баню — дым не нужен */
.smoke { display: none; }

/* Сдвиг кадра для «Гранда» убран: он подгонялся под прежний вертикальный
   снимок 1280×1920, где центральный кроп срезал крышу. Новое фото
   квадратное, крыша попадает в кадр и без сдвига. */

/* У SVG-логотипа своя янтарная обводка и плашка — убираем подложку контейнера,
   чтобы не было двойного кольца. Если файл не загрузился, оформление вернётся
   вместе с векторной запаской. */
.logo-mark:has(img) { background: none; border-color: transparent; }

/* Когда включена инерционная прокрутка, родная плавность браузера
   только мешает — два аниматора начинают тянуть страницу каждый в свою сторону. */
html.has-smooth { scroll-behavior: auto; }

/* ==========================================================================
   ТИПОГРАФИКА: ПАРА ШРИФТОВ
   Bitter (брусковая антиква) — заголовки: даёт сайту характер мастерской
   и перекликается с брусковой «БП» в логотипе.
   Manrope — весь интерфейс, подписи и особенно цифры: у него ровные
   табличные цифры, а в калькуляторе их много и они постоянно меняются.

   Чтобы вернуть всё на Manrope, достаточно закомментировать этот блок.
   ========================================================================== */

:root { --font-display: 'Bitter', Georgia, 'Times New Roman', serif; }

h1,
.section-title,
.feature-title,
.info-title,
.work-cta-title,
.step-legend,
.brand-name,
.form-card h3,
#modal-title {
  font-family: var(--font-display);
  letter-spacing: -.005em;      /* у антиквы засечки уже держат строку, тянуть не нужно */
}

/* Крупный заголовок первого экрана: с засечками он смотрится плотнее,
   даём строкам чуть больше воздуха. */
h1 { line-height: 1.16; }

/* Цифры остаются на Manrope — сравните столбик цен в калькуляторе,
   у брусковой антиквы они шире и «пляшут» при пересчёте. */
.price,
.info-price,
.stat-num,
.opt-len-value,
.opt-len-price,
.opt-price,
.hero-badge-value,
.summary-row,
#modal-price {
  font-family: 'Manrope', system-ui, sans-serif;
}

/* Заголовок первого экрана: размер, вес и межстрочный управляются здесь,
   а не утилитами в разметке — иначе tailwind.css перебивал бы их,
   так как подключается последним. Брусковая антиква шире гротеска,
   поэтому кегль ниже прежнего 54px, иначе строка ломается лишний раз. */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.01em;
}

/* Ссылки на политику обработки данных: под чекбоксом согласия,
   в модальном окне и в подвале — везде на тёмном фоне. */
.consent-link,
.policy-link {
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .2s ease;
}
.consent-link { color: var(--flame-400); }
.consent-link:hover { color: var(--flame-300); }

/* ==========================================================================
   УЗКИЕ ЭКРАНЫ (320–380 px)
   На совсем маленьких телефонах вылезала горизонтальная прокрутка:
   строки надбавок в калькуляторе не сжимались из-за цены с неразрывным
   пробелом, а в шапке не помещалась правая группа кнопок.
   ========================================================================== */

/* Текстовый блок внутри строки-чекбокса должен уметь сжиматься.
   Без min-width:0 flex-элемент не уходит ниже своей min-content ширины. */
.opt-check .opt-body { min-width: 0; }

@media (max-width: 420px) {
  /* У кнопок снят запрет переноса: длинная надпись «Зафиксировать цену
     и заказать» в одну строку требовала 305 px и распирала всю страницу. */
  .btn { white-space: normal; }
  .btn-lg { padding-left: 18px; padding-right: 18px; line-height: 1.25; }

  /* Цена надбавки переезжает под описание, а не теснит его сбоку.
     Здесь именно grid, а не flex-wrap: при переносе flex сначала переносит
     и только потом сжимает, из-за чего строка разъезжалась на три уровня,
     а её высота не учитывала перенесённую цену — та вылезала за карточку. */
  .opt-check {
    display: grid;
    grid-template-columns: 24px 1fr;
    column-gap: 14px;
    row-gap: 6px;
    align-items: start;
  }
  .opt-check .check-box { grid-area: 1 / 1; }
  .opt-check .opt-body  { grid-area: 1 / 2; }
  .opt-check .opt-add   { grid-area: 2 / 2; margin: 0; }
}

@media (max-width: 340px) {
  /* Ниже этой ширины название рядом с логотипом уже не помещается вместе
     с кнопкой и бургером: замер показал, что шапке с именем нужно 302 px
     плюс поля. Знака достаточно для узнавания, имя есть на первом экране. */
  .brand-text { display: none; }
}
