:root {
  --bg: #f5efe6;
  --bg-alt: #ede5d8;
  --paper: #fffdf9;
  --ink: #241e19;
  --ink-soft: #4a4038;
  --muted: #6f6458;
  --line: rgba(36, 30, 25, 0.12);
  --line-strong: rgba(36, 30, 25, 0.22);
  --accent: #9a5728;
  --accent-hover: #7e461f;
  --accent-soft: #f1e1cf;
  --forest: #22362c;
  --forest-2: #2c4539;
  --on-forest: #efe8dc;
  --on-forest-muted: #b9c2b8;
  --gold: #d9a865;

  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', 'Segoe UI', Roboto, Arial, sans-serif;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(36, 30, 25, 0.06), 0 8px 24px rgba(36, 30, 25, 0.08);
  --shadow-lg: 0 2px 6px rgba(36, 30, 25, 0.08), 0 24px 48px rgba(36, 30, 25, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 68px;
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

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

.skip-link:focus {
  top: 12px;
}

/* Типографика */
h1,
h2 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.12;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 5.2vw, 3.9rem);
}

h1 em,
h2 em {
  font-style: normal;
  color: var(--accent);
}

h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

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

.btn-sm {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn-lg {
  min-height: 54px;
  padding: 15px 28px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn:active {
  transform: translateY(1px);
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

/* Шапка */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 239, 230, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 20px rgba(36, 30, 25, 0.06);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.logo-mark {
  width: 34px;
  height: 34px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
}

.logo-name em {
  font-style: normal;
  color: var(--accent);
}

.logo-sub {
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.nav a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-phone {
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}

.burger {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.burger span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }

.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}

.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  padding-top: 8px;
  padding-bottom: 20px;
}

.mobile-menu a:not(.btn) {
  padding: 13px 0;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.mobile-menu .btn {
  margin-top: 18px;
}

/* Первый экран */
.hero {
  padding: 56px 0 88px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-lead {
  margin-top: 22px;
  max-width: 34em;
  font-size: 1.12rem;
  color: var(--ink-soft);
}

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

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hero-facts dt {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.1;
}

.hero-facts dd {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.hero-media {
  position: relative;
}

.hero-photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.hero-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero-quote {
  position: absolute;
  left: -28px;
  bottom: 32px;
  max-width: 270px;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  font-family: var(--serif);
  line-height: 1.35;
}

.hero-quote span {
  display: block;
  color: var(--ink-soft);
}

.hero-quote strong {
  font-weight: 600;
  color: var(--accent);
  font-size: 1.15rem;
}

/* Секции */
.section {
  padding: 96px 0;
}

.section-tight {
  padding-top: 24px;
}

.section-alt {
  background: var(--bg-alt);
}

.section-dark {
  background: var(--forest);
  color: var(--on-forest);
}

.section-dark .eyebrow {
  color: var(--gold);
}

.section-head {
  max-width: 680px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-head > p:not(.eyebrow) {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.05rem;
}

.section-dark .section-head > p:not(.eyebrow) {
  color: var(--on-forest-muted);
}

.section-head-left {
  text-align: left;
  margin: 0;
}

/* Чипсы-фильтры */
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.chip {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.chip small {
  font-weight: 500;
  opacity: 0.7;
  margin-left: 4px;
}

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

/* Работы */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.work {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.work-media {
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-alt);
}

.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.work-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(36, 30, 25, 0.72);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.work-body {
  padding: 18px 20px 22px;
}

.work-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.work-body h3 {
  margin: 6px 0;
}

.work-body p {
  font-size: 0.92rem;
  color: var(--muted);
}

/* Кнопка «Показать все работы» нужна только на телефоне */
.works-more {
  display: none;
  justify-content: center;
  margin-top: 24px;
}

/* До / После */
.compare-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  align-items: center;
}

.compare-copy p:not(.eyebrow) {
  margin-top: 16px;
  color: var(--ink-soft);
}

.compare {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  user-select: none;
}

.compare-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-before {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.compare-handle::after {
  content: '‹ ›';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lg);
}

.compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
}

.compare-range:focus-visible ~ .compare-handle::after,
.compare:has(.compare-range:focus-visible) .compare-handle::after {
  outline: 3px solid var(--accent);
}

.compare-label {
  position: absolute;
  top: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(36, 30, 25, 0.72);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  pointer-events: none;
}

.compare-label-before { left: 14px; }
.compare-label-after { right: 14px; }

/* Как работаем */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.step {
  background: var(--forest-2);
  border: 1px solid rgba(239, 232, 220, 0.1);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}

.step-num {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
}

.step h3 {
  margin: 18px 0 10px;
  color: #fff;
}

.step p {
  font-size: 0.93rem;
  color: var(--on-forest-muted);
}

/* Цены */
.prices {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.price-main {
  background: var(--paper);
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

.price-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.price-tag,
.price-hit {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}

.price-tag {
  background: var(--accent-soft);
  color: var(--accent);
}

.price-hit {
  background: var(--accent);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.price-main h3 {
  font-size: 1.3rem;
}

.price-list {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 8px 28px;
}

.price-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.price-row:last-child {
  border-bottom: none;
}

.price-row p {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.service-lead {
  margin: 10px 0 18px;
  color: var(--ink-soft);
}

.service-steps {
  margin: 0 0 26px;
}

.field-hint {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.price-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}

.price-row-side strong {
  font-size: 1.1rem;
  white-space: nowrap;
}

.price-row-side .link-btn {
  margin-top: 6px;
  font-size: 0.88rem;
}

/* Палитра */
.brand-info {
  max-width: 760px;
  margin: -12px auto 28px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.brand-info .rate {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.brand-info .rate span {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.colors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}

.color {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.color.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.color-zoom {
  display: block;
  border: none;
  padding: 0;
  background: var(--bg-alt);
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.color-zoom img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s var(--ease);
}

.color-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.color-body h3 {
  font-size: 0.98rem;
}

.color-brand {
  font-size: 0.78rem;
  color: var(--muted);
}

.color-pick-btn {
  margin-top: 10px;
  align-self: flex-start;
  min-height: 34px;
  padding: 6px 14px;
  font-size: 0.82rem;
}

.color.is-selected .color-pick-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Свёрнутая палитра */
.palette-teaser {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.palette-swatches {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 820px;
}

.palette-swatches img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--line);
  background: var(--paper);
}

.palette-selected {
  font-weight: 700;
  color: var(--accent);
  text-align: center;
}

/* Панель внизу открытой палитры прилипает к низу экрана, пока листаешь оттенки */
.palette-bar {
  position: sticky;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 5;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  width: fit-content;
  margin: 28px auto 0;
  padding: 8px;
  background: rgba(237, 229, 216, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.palette-bar .btn-ghost {
  background: var(--paper);
}

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

/* Калькулятор */
.calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.calc-copy > p:not(.eyebrow) {
  margin-top: 16px;
  color: var(--ink-soft);
}

.checklist {
  list-style: none;
  margin-top: 26px;
  display: grid;
  gap: 12px;
}

.checklist li {
  position: relative;
  padding-left: 30px;
  font-weight: 600;
}

.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%239a5728' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.calc-alt {
  margin-top: 28px;
  color: var(--muted);
}

.calc-alt a {
  font-weight: 700;
  color: var(--ink);
}

.calc-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.field {
  margin-bottom: 22px;
}

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.field output {
  color: var(--accent);
}

select,
input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 1rem;
}

select:focus,
input[type="text"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.area-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.area-row input[type="range"] {
  flex: 1;
  min-width: 0;
}

.area-row input[type="number"] {
  width: 96px;
  min-height: 48px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.area-row input[type="number"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.color-pick {
  display: flex;
  gap: 10px;
}

.color-pick input {
  flex: 1;
  min-width: 0;
  font-weight: 600;
}

.color-pick .btn {
  min-height: 48px;
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 18px;
  cursor: pointer;
}

.consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.consent a {
  color: var(--accent);
}

.consent-error {
  margin: -8px 0 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #b3261e;
}

/* Вопросы */
.faq-wrap {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 56px;
  align-items: start;
}

.faq details {
  border-bottom: 1px solid var(--line-strong);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 40px 20px 0;
  font-weight: 700;
  font-size: 1.05rem;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.25s var(--ease);
}

.faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq details p {
  padding: 0 40px 22px 0;
  color: var(--ink-soft);
}

/* Контакты */
.contacts {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: start;
}

.contacts-phone {
  display: inline-block;
  margin-top: 20px;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
}

.contacts-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.contacts-insta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.copy-handle {
  border: 1px dashed var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.footnote {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}

.contacts-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  gap: 10px;
}

.contacts-card h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
}

/* Подвал */
.footer {
  background: var(--forest);
  color: var(--on-forest);
  padding: 48px 0 28px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(239, 232, 220, 0.14);
}

.footer-brand p {
  margin-top: 6px;
  color: var(--on-forest-muted);
  font-size: 0.92rem;
}

.footer .logo-name em {
  color: var(--gold);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.footer-links a,
.footer-cookie {
  color: var(--on-forest);
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(239, 232, 220, 0.35);
  background: none;
  border: none;
  cursor: pointer;
}

.footer-legal {
  padding-top: 20px;
  display: grid;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--on-forest-muted);
}

/* Просмотр фото */
.lightbox {
  border: none;
  padding: 0;
  margin: auto;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  background: transparent;
  color: #fff;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop {
  background: rgba(16, 13, 10, 0.92);
}

.lb-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 140px);
}

.lb-figure img {
  max-width: 100%;
  max-height: calc(100dvh - 120px);
  border-radius: 10px;
  object-fit: contain;
}

.lb-figure figcaption {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.lb-close,
.lb-nav {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  line-height: 1;
  transition: background 0.2s;
}

.lb-close {
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  font-size: 2rem;
}

.lb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 2.2rem;
}

.lb-prev { left: 16px; }
.lb-next { right: 16px; }

.lb-figure .btn {
  margin-top: 4px;
}

/* Нижняя панель на телефоне */
.mobile-cta {
  display: none;
}

/* Уведомление */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 300;
  width: min(480px, calc(100% - 32px));
  transform: translate(-50%, 140%);
  opacity: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 16px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 2px;
  pointer-events: none;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

.toast.is-shown {
  transform: translate(-50%, 0);
  opacity: 1;
}

.toast span {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Cookie */
.cookie {
  position: fixed;
  left: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 250;
  width: min(420px, calc(100% - 32px));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.cookie a {
  color: var(--accent);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

/* Появление блоков при прокрутке (только если работает JS) */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0ms);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}


/* ================= Анимации ================= */
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

@keyframes curtain {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@keyframes settle {
  from { scale: 1.14; }
  to { scale: 1; }
}

@keyframes pop {
  0% { opacity: 0; transform: translateY(14px) scale(0.92); }
  70% { opacity: 1; transform: translateY(-3px) scale(1.03); }
  100% { opacity: 1; transform: none; }
}

@keyframes sheen {
  0% { transform: translateX(-130%) skewX(-20deg); }
  30%, 100% { transform: translateX(260%) skewX(-20deg); }
}

@keyframes flame {
  0%, 100% { transform: rotate(-6deg) scale(1); }
  50% { transform: rotate(6deg) scale(1.15); }
}

@keyframes swatch-in {
  from { opacity: 0; transform: translateY(14px) rotate(-8deg) scale(0.8); }
  to { opacity: 1; transform: none; }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* Полоска прогресса прокрутки под шапкой */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--accent));
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

/* Первый экран: текст поднимается по очереди */
.js .hero-copy > * {
  animation: rise 0.9s var(--ease) both;
}

.js .hero-copy > :nth-child(1) { animation-delay: 0.05s; }
.js .hero-copy > :nth-child(2) { animation-delay: 0.15s; }
.js .hero-copy > :nth-child(3) { animation-delay: 0.3s; }
.js .hero-copy > :nth-child(4) { animation-delay: 0.42s; }
.js .hero-copy > :nth-child(5) { animation-delay: 0.55s; }

/* Шторки на фото: две половинки со складками разъезжаются от центра к краям */
.hero-photo::before,
.hero-photo::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 50.5%;
  background: repeating-linear-gradient(90deg, #d8cab4 0, #f1e9dc 20px, #d8cab4 40px);
  box-shadow: 0 0 18px rgba(36, 30, 25, 0.28);
  transform: scaleX(0);
  pointer-events: none;
}

.hero-photo::before {
  left: 0;
  transform-origin: left center;
}

.hero-photo::after {
  right: 0;
  transform-origin: right center;
}

.js .hero-photo::before,
.js .hero-photo::after {
  animation: curtain 1.3s cubic-bezier(0.76, 0, 0.24, 1) 0.3s both;
}

.js .hero-media img {
  animation: settle 2.2s var(--ease) 0.25s both;
}

.hero-quote {
  z-index: 2;
}

.js .hero-quote {
  animation: pop 0.7s var(--ease) 1.25s both;
}

/* Блик, пробегающий по главным кнопкам */
.btn-shine {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-shine::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: translateX(-130%) skewX(-20deg);
  animation: sheen 4.5s ease-in-out 2s infinite;
  pointer-events: none;
}

/* Хит: огонёк покачивается, по значку пробегает блик */
.price-hit {
  position: relative;
  overflow: hidden;
}

.price-hit::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 50%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: translateX(-130%) skewX(-20deg);
  animation: sheen 3.2s ease-in-out 1.5s infinite;
}

.flame {
  display: inline-block;
  animation: flame 1.4s ease-in-out infinite;
  transform-origin: 50% 90%;
}

/* Превью палитры появляется «волной» */
.js .palette-teaser .palette-swatches img {
  opacity: 0;
}

.js .palette-teaser.is-in .palette-swatches img {
  animation: swatch-in 0.55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 45ms + 0.15s);
}

/* Карточки оттенков появляются по очереди при подгрузке */
.color {
  animation: card-in 0.5s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 35ms);
}

/* На тач-экранах карточки и кнопки слегка «вжимаются» при нажатии */
@media (hover: none) {
  .work,
  .color,
  .btn {
    transition: scale 0.15s var(--ease), opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }

  .work:active,
  .color:active {
    scale: 0.98;
  }

  .btn:active {
    scale: 0.96;
  }
}

/* Наведение — только для мыши */
@media (hover: hover) and (pointer: fine) {
  .nav a:hover,
  .header-phone:hover {
    color: var(--accent);
  }

  .btn-primary:hover {
    background: var(--accent-hover);
  }

  .btn-ghost:hover {
    border-color: var(--ink);
  }

  .link-btn:hover {
    text-decoration: underline;
  }

  .chip:hover:not([aria-pressed="true"]) {
    border-color: var(--ink);
    color: var(--ink);
  }

  .work:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
  }

  .work:hover .work-media img,
  .color-zoom:hover img {
    transform: scale(1.05);
  }

  .lb-close:hover,
  .lb-nav:hover {
    background: rgba(255, 255, 255, 0.24);
  }

  .footer-links a:hover,
  .footer-cookie:hover {
    text-decoration-color: currentColor;
  }
}

/* Адаптивность */
@media (max-width: 1080px) {
  .nav,
  .header-cta {
    display: none;
  }

  .burger {
    display: block;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hero {
    padding: 32px 0 64px;
  }

  .hero-grid,
  .compare-grid,
  .prices,
  .calc,
  .faq-wrap,
  .contacts {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-media {
    max-width: 520px;
  }

  .hero-quote {
    left: 16px;
  }

  .section {
    padding: 72px 0;
  }

  .section-tight {
    padding-top: 8px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .hero-lead {
    font-size: 1.02rem;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .hero-facts {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 36px;
  }

  .hero-facts > div {
    display: flex;
    align-items: baseline;
    gap: 12px;
  }

  .hero-facts dt {
    font-size: 1.4rem;
    min-width: 88px;
  }

  .hero-facts dd {
    margin-top: 0;
  }

  .hero-media img {
    aspect-ratio: 4 / 4.4;
  }

  .hero-quote {
    bottom: 16px;
    padding: 12px 16px;
    max-width: 230px;
  }

  .section {
    padding: 56px 0;
  }

  .section-head {
    margin-bottom: 32px;
  }

  .chips {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    margin-left: -16px;
    margin-right: -16px;
    padding: 0 16px 4px;
    scrollbar-width: none;
  }

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

  .chip {
    flex-shrink: 0;
  }

  .works-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .works-more {
    display: flex;
  }

  .works-grid.is-collapsed .work:nth-child(n+5) {
    display: none;
  }

  .colors-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .color-pick-btn {
    min-height: 40px;
    align-self: stretch;
  }

  .palette-swatches {
    grid-template-columns: repeat(6, 1fr);
  }

  .palette-teaser .btn {
    width: 100%;
  }

  .palette-bar {
    width: 100%;
    flex-wrap: nowrap;
    border-radius: 18px;
  }

  .palette-bar .btn {
    flex: 1;
    padding-left: 10px;
    padding-right: 10px;
  }

  .mobile-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    gap: 10px;
    padding: 10px 16px max(10px, env(safe-area-inset-bottom));
    background: rgba(245, 239, 230, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    transform: translateY(110%);
    transition: transform 0.3s var(--ease);
  }

  .mobile-cta.is-shown {
    transform: none;
  }

  .mobile-cta .btn {
    flex: 1;
  }

  .toast {
    bottom: max(84px, calc(env(safe-area-inset-bottom) + 74px));
  }

  .price-main,
  .calc-form {
    padding: 24px 18px;
  }

  .price-list {
    padding: 4px 18px;
  }

  .price-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .price-row-side {
    align-items: flex-start;
    text-align: left;
  }

  .color-pick {
    flex-direction: column;
  }

  .lb-figure {
    max-width: 100vw;
    padding: 0 8px;
  }

  .lb-nav {
    top: auto;
    bottom: 20px;
    transform: none;
  }

  .lb-figure img {
    max-height: calc(100dvh - 180px);
  }

  .cookie {
    left: 16px;
    right: 16px;
    width: auto;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .btn-shine::after,
  .price-hit::after,
  .flame {
    animation: none;
  }
}
