/* Пунктир. Сайт как папка эскизов на кальке.
   Правила: углы прямые, один акцент (трансферный фиолетово-синий), пунктир как единственный графический приём. */

:root {
  --paper: oklch(0.965 0.008 85);
  --paper-2: oklch(0.935 0.010 85);
  --ink: oklch(0.22 0.025 270);
  --ink-soft: oklch(0.46 0.02 270);
  --line: oklch(0.78 0.015 270);
  --field: oklch(0.55 0.02 270);
  --placeholder: oklch(0.5 0.02 270);
  --transfer: oklch(0.46 0.19 285);
  --transfer-h: oklch(0.38 0.19 285);
  --night: oklch(0.20 0.045 275);
  --on-night: oklch(0.94 0.01 85);
  --transfer-on-night: oklch(0.80 0.12 285);
  --ok: oklch(0.42 0.12 155);
  --err: oklch(0.45 0.18 25);

  --font-display: "Spectral", Georgia, serif;
  --font-text: "Wix Madefor Text", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --wrap: 1240px;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 8px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-text);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; background: var(--paper-2); }
figure, blockquote, dl, dd, ul, ol, h1, h2, h3, p { margin: 0; }
address { font-style: normal; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 300; text-wrap: balance; }
em { font-style: italic; color: var(--transfer); }
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 0.22em; transition: color 0.2s, text-decoration-color 0.2s; }
a:hover { color: var(--transfer); text-decoration-color: var(--transfer); }
:focus-visible { outline: 2px solid var(--transfer); outline-offset: 3px; }
::selection { background: var(--transfer); color: var(--paper); }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: var(--gutter); top: -4rem; background: var(--ink); color: var(--paper); padding: 0.75rem 1rem; z-index: 30; }
.skip:focus { top: 0.5rem; }

h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.06; letter-spacing: -0.015em; }
h3 { font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 1.9rem); line-height: 1.15; letter-spacing: -0.01em; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; }

section { padding-block: clamp(4.5rem, 10vw, 9rem); }
#ceny, #kak, .band, #otzyvy, #voprosy, #zapis { content-visibility: auto; contain-intrinsic-size: auto 800px; }
.sec-head { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 6vw, 5rem); max-width: 44rem; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.6rem;
  font: 500 1rem/1 var(--font-text); letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  background: var(--transfer); color: var(--paper); border: 1px solid var(--transfer); border-radius: 0;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { background: var(--transfer-h); border-color: var(--transfer-h); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--small { min-height: 44px; padding: 0 1.1rem; }

/* Шапка */
.nav { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px dashed var(--line); }
.nav__in { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem); min-height: var(--nav-h); }
.logo { display: inline-flex; align-items: center; min-height: 44px; font: 400 1.7rem/1 var(--font-display); letter-spacing: -0.01em; text-decoration: none; margin-right: auto; }
.logo:hover { color: var(--transfer); }
.nav__links { display: flex; gap: clamp(1rem, 2.5vw, 2rem); }
.nav__links a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; text-decoration: none; font-size: 0.95rem; }
.nav__links a:hover { text-decoration: underline; text-decoration-color: var(--transfer); }
.nav__phone { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; text-decoration: none; font-variant-numeric: tabular-nums; }

/* Первый экран */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem); }
.hero h1 { font-size: clamp(2.25rem, 7.2vw, 6.25rem); line-height: 1.02; letter-spacing: -0.025em; max-width: 13em; }
.hero__lead { display: grid; grid-template-columns: minmax(0, 34rem) auto; justify-content: space-between; align-items: end; gap: 1.5rem 3rem; margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.hero__lead p { font-size: 1.2rem; color: var(--ink-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero__strip { margin-top: clamp(2.25rem, 5vw, 4rem); display: grid; grid-template-columns: 1.2fr 1fr 0.8fr; gap: clamp(0.75rem, 2vw, 1.5rem); align-items: end; }
.hero__strip figcaption { margin-top: 0.7rem; font-size: 0.9rem; color: var(--ink-soft); }
.hero__strip b { font-weight: 500; color: var(--ink); margin-right: 0.4em; font-variant-numeric: tabular-nums; }

.photo { overflow: hidden; background: var(--paper-2); }
.photo img { width: 100%; transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
@media (hover: hover) { .photo:hover img { transform: scale(1.03); } }

/* Мастера и работы: три колонки, лишнее спрятано в details */
.works { padding-block: clamp(3rem, 6vw, 5rem); }
.works .sec-head { gap: 1rem; margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }
.lane-hint { display: none; font-size: 0.9rem; color: var(--ink-soft); }
.masters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 3rem); align-items: start; }
.master { display: grid; gap: 1.1rem; align-content: start; min-width: 0; }
.master:nth-child(2) { margin-top: 3.5rem; }
.master:nth-child(3) { margin-top: 1.75rem; }
.master__hero img { aspect-ratio: 4 / 5; object-fit: cover; }
.master__body { display: grid; gap: 0.9rem; align-content: start; }
.who { display: grid; grid-template-columns: 4.25rem 1fr; gap: 1rem; align-items: center; }
.who__photo img { aspect-ratio: 4 / 5; object-fit: cover; }
.who p { color: var(--ink-soft); margin-top: 0.3rem; font-size: 0.95rem; line-height: 1.4; }
.master__text { max-width: 38ch; }
.facts { display: flex; gap: 0.25rem 1.5rem; }
.facts dt { font-size: 0.85rem; color: var(--ink-soft); }
.facts dd { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.2; margin-top: 0.1rem; white-space: nowrap; }
.master__link { justify-self: start; }
.more summary { min-height: 52px; padding-block: 0.4rem; font-size: 1.1rem; }
.more__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; padding-bottom: 1rem; }
.more__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.more__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.more__grid img { aspect-ratio: 1; object-fit: cover; }
.more__grid .photo--tall img { aspect-ratio: 4 / 5; }

/* Цены */
.prices { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.prices__aside { display: grid; gap: 2rem; }
.prices__aside figcaption, .wide figcaption, .faq__aside figcaption, .book__info figcaption { margin-top: 0.7rem; font-size: 0.9rem; color: var(--ink-soft); max-width: 46ch; }
.price-list { display: grid; gap: clamp(1.75rem, 3vw, 2.5rem); }
.price__row { display: flex; align-items: baseline; gap: 0.75rem; }
.price__name { font: 400 clamp(1.45rem, 2.4vw, 1.85rem)/1.15 var(--font-display); }
.price__dots { flex: 1; min-width: 1.5rem; height: 0; border-bottom: 2px dotted var(--line); transform: translateY(-0.3em); }
.price__sum { font: 400 clamp(1.45rem, 2.4vw, 1.85rem)/1.15 var(--font-display); color: var(--transfer); white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.price__meta { margin-top: 0.4rem; color: var(--ink-soft); max-width: 48ch; }

/* Этапы */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem); }
.step { border-top: 2px dashed var(--transfer); padding-top: 1.25rem; display: grid; gap: 0.6rem; align-content: start; }
.step__n { font: 300 clamp(2.5rem, 4vw, 3.5rem)/1 var(--font-display); color: var(--transfer); font-variant-numeric: lining-nums; }
.step p { color: var(--ink-soft); }
.wide { margin-top: clamp(3rem, 6vw, 5rem); }
.wide img { aspect-ratio: 21 / 9; object-fit: cover; }

/* Контрастная полоса */
.band { background: var(--night); color: var(--on-night); padding-block: clamp(5rem, 12vw, 10rem); }
.band__in { border-top: 2px dashed color-mix(in oklch, var(--on-night) 40%, transparent); padding-top: clamp(2rem, 4vw, 3.5rem); }
.band h2 { font-size: clamp(2.1rem, 6vw, 5.25rem); line-height: 1.04; letter-spacing: -0.02em; max-width: 15em; }
.band em { color: var(--transfer-on-night); }
.band p { margin-top: clamp(1.5rem, 3vw, 2.5rem); font-size: 1.15rem; max-width: 40ch; color: color-mix(in oklch, var(--on-night) 80%, transparent); }

/* Отзывы */
.reviews { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem) 1.5rem; }
.review { border-top: 1px dashed var(--line); padding-top: 1.25rem; display: grid; gap: 1rem; align-content: start; }
.review:nth-child(1) { grid-column: 1 / 8; }
.review:nth-child(2) { grid-column: 6 / 13; }
.review:nth-child(3) { grid-column: 3 / 10; }
.review p { font: 300 clamp(1.3rem, 2.2vw, 1.7rem)/1.4 var(--font-display); }
.review footer { font-size: 0.95rem; color: var(--ink-soft); }
.review footer b { font-weight: 500; color: var(--ink); }
.reviews__note { margin-top: 1.75rem; font-size: 0.9rem; color: var(--ink-soft); }

/* Вопросы */
.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.faq__aside { display: grid; gap: 2rem; position: sticky; top: calc(var(--nav-h) + 2rem); }
.faq__aside img { aspect-ratio: 4 / 5; object-fit: cover; max-width: 22rem; }
details { border-top: 1px dashed var(--line); }
details:last-child { border-bottom: 1px dashed var(--line); }
summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; padding-block: 0.75rem; cursor: pointer; list-style: none; font: 400 clamp(1.2rem, 2vw, 1.45rem)/1.25 var(--font-display); transition: color 0.2s; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; font: 300 1.8rem/1 var(--font-display); color: var(--transfer); transition: transform 0.25s; }
summary:hover { color: var(--transfer); }
details[open] summary::after { transform: rotate(45deg); }
details p { padding-bottom: 1.5rem; max-width: 56ch; color: var(--ink-soft); }

/* Запись */
.book { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.book__info { display: grid; gap: 2rem; }
.book__info .sec-head { margin-bottom: 0; }
.contacts { display: grid; gap: 1.1rem; }
.contacts dt { font-size: 0.85rem; color: var(--ink-soft); }
.contacts dd { font: 400 1.35rem/1.3 var(--font-display); margin-top: 0.1rem; }
.contacts a { text-decoration: none; }
.contacts a:hover { text-decoration: underline; }
.book__info img { aspect-ratio: 3 / 2; object-fit: cover; }

.form { border: 2px dashed var(--transfer); padding: clamp(1.25rem, 3vw, 2.5rem); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.field { display: grid; gap: 0.4rem; align-content: start; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend { font-size: 0.95rem; font-weight: 500; padding: 0; }
.field input[type="text"], .field input[type="tel"], .field input[type="date"], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 0.7rem 0.9rem;
  font: 400 1rem/1.4 var(--font-text); color: var(--ink); background: var(--paper);
  border: 1px solid var(--field); border-radius: 0; transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 6.5rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--transfer); outline-offset: 1px; border-color: var(--transfer); }
.field input:user-invalid, .field select:user-invalid, .field textarea:user-invalid { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }
fieldset.field { border: 0; margin: 0; padding: 0; }
.slots { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.slot { position: relative; }
.slot input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.slot span { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 4.75rem; padding: 0 0.9rem; border: 1px solid var(--field); font-variant-numeric: tabular-nums; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.slot:hover span { border-color: var(--ink); }
.slot input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.slot input:focus-visible + span { outline: 2px solid var(--transfer); outline-offset: 2px; }
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent__label { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.92rem; color: var(--ink-soft); line-height: 1.5; cursor: pointer; }
.consent__label input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0.15rem 0 0; accent-color: var(--transfer); cursor: pointer; }
.consent__label a { color: var(--ink); text-decoration-color: var(--transfer); }
.form__demo { font-size: 0.92rem; color: var(--ink); padding: 0.85rem 1rem; background: var(--paper-2); border: 1px dashed var(--field); }
.form__status { min-height: 1.5em; font-size: 0.95rem; }
.form__status.is-ok { color: var(--ok); }
.form__status.is-err { color: var(--err); }
.form .btn { width: 100%; }

/* Подвал */
.footer { border-top: 1px dashed var(--line); padding-block: clamp(2.5rem, 5vw, 4rem); color: var(--ink-soft); font-size: 0.95rem; }
.footer__in { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; align-items: start; }
.footer .logo { color: var(--ink); margin-bottom: 0.5rem; }
.footer ul { display: grid; gap: 0; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; }
.footer address p { margin: 0; }
.footer__demo { grid-column: 1 / -1; border-top: 1px dashed var(--line); padding-top: 1.25rem; }

/* Юридические страницы */
.legal { padding-block: clamp(3rem, 7vw, 5rem) clamp(4rem, 8vw, 6rem); max-width: 52rem; }
.legal h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.08; margin-bottom: 1.5rem; }
.legal h2 { font: 400 1.35rem/1.3 var(--font-display); letter-spacing: -0.01em; margin-top: 2.25rem; margin-bottom: 0.75rem; }
.legal p, .legal li { color: var(--ink-soft); max-width: 68ch; }
.legal p + p { margin-top: 0.75rem; }
.legal ul { display: grid; gap: 0.4rem; margin: 0.75rem 0; padding-left: 1.2rem; }
.legal li { list-style: disc; }
.legal strong { color: var(--ink); font-weight: 500; }
.legal__meta { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 1rem; }
.fill { background: color-mix(in oklch, var(--transfer) 14%, transparent); color: var(--ink); padding: 0.05em 0.3em; border: 1px dashed var(--transfer); }
.legal__note { margin-top: 2.5rem; padding: 1rem 1.25rem; border: 1px dashed var(--line); background: var(--paper-2); color: var(--ink-soft); font-size: 0.92rem; }
.legal__action { margin-top: 1.5rem; }
.legal a { color: var(--ink); text-decoration-color: var(--transfer); }
.legal a:hover { color: var(--transfer); }
.legal a.btn { color: var(--paper); }

/* Страница для владельца */
.owner { max-width: 60rem; }
.owner__list { display: grid; gap: 1.25rem; margin: 2rem 0; }
.owner__list li { border-top: 1px dashed var(--line); padding-top: 1rem; max-width: 60ch; }
.owner__list b { font: 400 1.35rem/1.3 var(--font-display); display: block; margin-bottom: 0.2rem; }
.owner__list span { color: var(--ink-soft); }
.msg { margin: 2rem 0; padding: 1.25rem 1.5rem; border: 2px dashed var(--transfer); background: var(--paper-2); font-size: 0.98rem; line-height: 1.65; max-width: 30rem; }
.msg b { font-weight: 600; }
.owner__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* Движение */
@keyframes rise { from { transform: translateY(18px); } }
@keyframes lift { from { transform: translateY(28px); } }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero h1, .hero__lead, .hero__strip figure { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero__lead { animation-delay: 0.15s; }
  .hero__strip figure:nth-child(1) { animation-delay: 0.3s; }
  .hero__strip figure:nth-child(2) { animation-delay: 0.45s; }
  .hero__strip figure:nth-child(3) { animation-delay: 0.6s; }
  @supports (animation-timeline: view()) {
    .reveal { animation: lift linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .photo img, .btn, a, summary, summary::after, .slot span { transition: none; }
  .photo:hover img { transform: none; }
  .btn:active { transform: none; }
}

/* Планшет и телефон */
@media (max-width: 899px) {
  :root { --nav-h: 64px; }
  .nav__links { display: none; }
  .hero__lead { grid-template-columns: 1fr; }
  .hero__strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__strip figure:nth-child(3) { display: none; }
  .prices, .faq, .book { grid-template-columns: 1fr; }
  .faq__aside { position: static; }
  .lane-hint { display: block; }
  .masters { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); padding-bottom: 0.5rem; scrollbar-width: none; overscroll-behavior-x: contain; }
  .masters::-webkit-scrollbar { display: none; }
  .master, .master:nth-child(n) { flex: 0 0 min(86%, 25rem); scroll-snap-align: start; margin-top: 0; }
  .master__hero img { aspect-ratio: 4 / 3; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wide img { aspect-ratio: 4 / 3; }
  .reviews { grid-template-columns: 1fr; }
  .review:nth-child(n) { grid-column: auto; }
  .faq__aside img { max-width: 100%; aspect-ratio: 4 / 3; }
  .footer__in { grid-template-columns: 1fr; }
}
@media (max-width: 559px) {
  body { font-size: 1rem; }
  .logo { font-size: 1.5rem; }
  .nav__in { gap: 0.75rem; }
  .nav__phone { font-size: 0.95rem; }
  .btn--small { padding: 0 0.9rem; }
  .steps { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .price__row { gap: 0.5rem; }
}
