/* Ди-Эйч-Дентал · longread-эссе
   Токены: тёплая бумага, один зелёный акцент, Cormorant (проза) + Inter (интерфейс) */

:root {
  --paper: #F7F2E9;
  --paper-raised: #FCF9F1;
  --paper-input: #FFFDF7;
  --ink: #26241F;
  --ink-soft: #4E4A3F;
  --muted: #6F6859;
  --green: #315C44;
  --green-deep: #24462F;
  --green-wash: #E9ECDF;
  --green-line: #C9D2BC;
  --line: #DCD3C0;
  --line-strong: #B9AE97;
  --error: #9A3B26;
  --serif: "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1180px;
  --radius: 2px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, figure, blockquote, pre { margin: 0; }
button { font: inherit; cursor: pointer; }
section { scroll-margin-top: calc(var(--header-h) + 16px); }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 4.5vw, 48px);
}

::selection { background: var(--green); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 60;
  background: var(--green);
  color: var(--paper);
  padding: 12px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: top .18s ease;
}
.skip:focus { top: 12px; }

/* ---------- Шапка ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 242, 233, .96);
  border-bottom: 1px solid var(--line);
}
.header__in {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand { text-decoration: none; color: var(--ink); margin-right: auto; }
.brand__name {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.15;
}
.brand__sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  padding: 12px 10px;
  border-radius: var(--radius);
}
.nav a:hover { color: var(--green); }
.header__phone {
  color: var(--green);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  padding-block: 10px;
}
.header__phone:hover { text-decoration: underline; text-underline-offset: 4px; }
.burger {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 12px 10px;
}
.burger span {
  display: block;
  height: 2px;
  background: var(--ink);
  margin-block: 5px;
  transition: transform .18s ease, opacity .18s ease;
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Общие элементы ---------- */
.kicker {
  color: var(--green);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}
.kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--green);
  flex: none;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--green);
  color: var(--paper);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.3;
  padding: 15px 26px;
  min-height: 48px;
  text-decoration: none;
  text-align: center;
  transition: background-color .16s ease, border-color .16s ease, transform .1s ease;
}
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn:active { transform: translateY(1px); }
.btn--ghost {
  background: transparent;
  color: var(--green);
  border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--paper); border-color: var(--green); color: var(--green-deep); }
.btn--wide { width: 100%; }
.quiet-link {
  color: var(--ink-soft);
  font-size: 14px;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 5px;
  padding-block: 10px;
}
.quiet-link:hover { color: var(--green); text-decoration-color: var(--green); }
.text-link {
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: var(--green-line);
  text-underline-offset: 4px;
}
.text-link:hover { text-decoration-color: var(--green); }
.note-link {
  display: inline-block;
  color: var(--green);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--green-line);
  text-underline-offset: 4px;
  padding-block: 8px;
  background: none;
  border: 0;
}
.note-link:hover { text-decoration-color: var(--green); }

/* ---------- Hero: узкий кроп слева + редакционный комментарий ---------- */
.hero { padding-top: clamp(40px, 6vw, 84px); }
.hero__grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.hero__figure { order: -1; }
.hero__crop {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper-raised);
}
.hero__crop img { width: 100%; height: 100%; object-fit: cover; }
.hero__tag {
  position: absolute;
  left: 0;
  bottom: 0;
  background: var(--green);
  color: var(--paper);
  font-size: 12px;
  padding: 7px 12px;
}
.hero__figure figcaption {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 36ch;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.35rem, 4.4vw, 3.9rem);
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin-top: 22px;
  max-width: 16.5ch;
  text-wrap: balance;
}
.standfirst {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  line-height: 1.45;
  color: var(--ink-soft);
  margin-top: 26px;
  max-width: 46ch;
}
.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 34px;
}
.hero__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 32px;
  border-top: 1px solid var(--line);
  margin-top: clamp(44px, 6vw, 76px);
  padding-block: 18px;
  font-size: 13px;
  color: var(--muted);
}
.hero__foot a { color: var(--green); text-decoration: none; }
.hero__foot a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Лонгрид ---------- */
.chapter { padding-block: clamp(56px, 8vw, 108px); }
.chapter + .chapter { border-top: 1px solid var(--line); }
.chapter__body { max-width: 780px; }
.chapter__no {
  color: var(--green);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
}
.chapter h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.95rem, 3.6vw, 3.05rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 22ch;
  text-wrap: balance;
  margin-bottom: 34px;
}
.chapter__body > p,
.thread__text > p,
.thread--plain > p {
  font-family: var(--serif);
  font-size: 1.375rem;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 24px;
  max-width: 62ch;
}
.chapter__body strong { font-weight: 600; }
.chapter__body h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.2;
  margin-bottom: 14px;
}

.dropcap::first-letter {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 4.3em;
  line-height: .78;
  float: left;
  padding: 8px 14px 0 0;
  color: var(--green);
}

.pullquote {
  border-left: 2px solid var(--green);
  padding-left: 26px;
  margin-block: 38px;
}
.pullquote p {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.55rem, 2.7vw, 2.05rem);
  line-height: 1.3;
  color: var(--green-deep);
  max-width: 26ch;
}

/* Вкладной лист с примером плана */
.sheet { margin-block: 44px 8px; }
.sheet__paper {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 16px 36px -30px rgba(38, 36, 31, .45);
}
.sheet__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 16px;
}
.sheet__head h3 { margin: 0; font-size: 1.9rem; }
.sheet__stamp {
  flex: none;
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  font-size: 12px;
  padding: 4px 10px;
}
.sheet__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding-block: 14px;
  border-bottom: 1px dashed var(--line);
}
.sheet__row dt { font-size: 15px; color: var(--ink-soft); }
.sheet__row dd {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  white-space: nowrap;
}
.sheet__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin-top: 20px;
}
.sheet__total span:first-child { font-size: 14px; color: var(--ink-soft); }
.sheet__total span:last-child {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--green);
  white-space: nowrap;
}
.sheet__note { margin-top: 16px; font-size: 13px; color: var(--muted); }
.sheet figcaption { margin-top: 16px; font-size: 13px; line-height: 1.6; color: var(--muted); max-width: 60ch; }

/* Услуги в тексте: маргиналии, сноски, цифры, словарик, письмо */
.thread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 236px;
  gap: 40px;
  margin-block: 46px;
}
.thread--plain { display: block; }
.thread h3 { margin-bottom: 14px; }

.margin-note {
  align-self: start;
  border-top: 2px solid var(--green);
  padding-top: 14px;
}
.margin-note__name { font-size: 14px; font-weight: 600; }
.margin-note__price {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--green);
  line-height: 1.2;
  margin-top: 6px;
}
.margin-note__price span {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
}
.margin-note .note-link { margin-top: 8px; }

.footnote {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  max-width: 62ch;
}
.footnote p { font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.footnote__mark { color: var(--green); font-weight: 600; margin-right: 6px; }

.figures {
  align-self: start;
  display: grid;
  gap: 22px;
  border-left: 1px solid var(--line-strong);
  padding-left: 24px;
}
.figures__num {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.15;
  color: var(--green);
  white-space: nowrap;
}
.figures__cap {
  display: block;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 6px;
}

.qa { max-width: 62ch; }
.qa__row { border-top: 1px solid var(--line); padding-block: 20px; }
.qa__row dt {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.25;
}
.qa__row dd { font-size: 15px; line-height: 1.65; color: var(--ink-soft); margin-top: 10px; }

.letter {
  background: var(--green-wash);
  border: 1px solid var(--green-line);
  border-radius: var(--radius);
  padding: clamp(22px, 3.5vw, 34px);
  margin-block: 46px 0;
}
.letter__label { color: var(--green); font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.letter p:not(.letter__label) {
  font-family: var(--serif);
  font-size: 1.375rem;
  line-height: 1.5;
  max-width: 56ch;
}
.letter .note-link { margin-top: 10px; }

/* Колофон с контактами */
.colophon { font-style: normal; margin-top: 40px; border-top: 1px solid var(--line); max-width: 640px; }
.colophon__row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 16px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}
.colophon__row > span { font-size: 13px; color: var(--muted); padding-top: 2px; }
.colophon__row p { font-size: 15px; }

/* ---------- Запись: финал истории ---------- */
.booking {
  background: var(--green-wash);
  border-top: 1px solid var(--green-line);
  padding-block: clamp(60px, 8vw, 110px);
}
.booking__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}
.booking__intro h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.3rem, 4vw, 3.4rem);
  line-height: 1.08;
  margin-bottom: 24px;
}
.booking__intro > p:not(.chapter__no) {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 20px;
  max-width: 46ch;
}
.booking__honest {
  border-left: 2px solid var(--green);
  padding-left: 18px;
  font-size: 13.5px !important;
}
.booking__panel {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3.5vw, 40px);
  box-shadow: 0 16px 36px -30px rgba(38, 36, 31, .4);
}

.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}
.label-hint { font-weight: 400; font-size: 12.5px; color: var(--muted); margin-left: 6px; }
.field input:not([type="checkbox"]),
.field select {
  width: 100%;
  min-height: 50px;
  background: var(--paper-input);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  padding: 12px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field select { appearance: auto; }
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(49, 92, 68, .16);
}
.field.has-error input,
.field.has-error select { border-color: var(--error); }
.err { color: var(--error); font-size: 13px; margin-top: 7px; }
.err:empty { display: none; }

.consent { display: flex; gap: 12px; align-items: flex-start; font-weight: 400 !important; }
.consent input {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 2px;
  accent-color: var(--green);
}
.consent span { font-size: 13px; line-height: 1.6; color: var(--ink-soft); }
.field--consent { margin-bottom: 24px; }
.form-foot { margin-top: 14px; font-size: 12.5px; color: var(--muted); text-align: center; }
.noscript-note { font-size: 14px; line-height: 1.6; color: var(--ink-soft); }

/* Экран готовой заявки */
.done__kicker { color: var(--green); font-size: 13px; font-weight: 500; }
.done h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1.15;
  margin: 10px 0 14px;
}
.done__text { font-size: 14px; line-height: 1.65; color: var(--ink-soft); }
.done__message {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 16px;
  margin-block: 20px;
}
.done__actions { display: grid; gap: 12px; }
.copy-status { color: var(--green); font-size: 13px; margin-top: 12px; min-height: 20px; }
.done__back { margin-top: 10px; }

/* ---------- Подвал ---------- */
.footer { padding-block: 44px 32px; }
.footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px 48px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.footer__brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.25;
}
.footer__brand span {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  margin-top: 10px;
}
.footer__nav { display: grid; gap: 6px; align-content: start; }
.footer__nav a {
  color: var(--ink-soft);
  font-size: 14px;
  text-decoration: none;
  padding-block: 6px;
}
.footer__nav a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.footer__bottom { margin-top: 30px; display: grid; gap: 8px; }
.footer__bottom p { font-size: 12px; line-height: 1.65; color: var(--muted); max-width: 100ch; }

/* ---------- Адаптив ---------- */
@media (max-width: 1020px) {
  .hero__grid { grid-template-columns: 260px minmax(0, 1fr); gap: 40px; }
  .thread { grid-template-columns: minmax(0, 1fr) 210px; gap: 28px; }
}

@media (max-width: 880px) {
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 12px 20px 20px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 8px; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .burger { display: block; }
  .booking__grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .hero__figure { order: 0; }
  .hero__crop { aspect-ratio: 4 / 3; max-height: 440px; }
  .hero__crop img { object-position: 50% 18%; }
  .hero__figure figcaption { max-width: 100%; }
  .hero h1 { max-width: 100%; }
  .hero__foot { flex-direction: column; gap: 6px; }
  .thread { grid-template-columns: 1fr; gap: 18px; margin-block: 40px; }
  .margin-note { border-top: 0; border-left: 2px solid var(--green); padding: 2px 0 2px 18px; }
  .figures { border-left: 0; padding-left: 0; gap: 16px; }
  .chapter__body > p,
  .thread__text > p,
  .thread--plain > p,
  .letter p:not(.letter__label) { font-size: 1.25rem; }
  .header__in { gap: 16px; }
  .header__phone { font-size: 13.5px; }
  .brand__name { font-size: 1.35rem; }
  .brand__sub { font-size: 11px; }
}

@media (max-width: 420px) {
  .header__phone { display: none; }
  .sheet__row dt { font-size: 14px; }
  .sheet__total span:last-child { font-size: 2rem; }
  .colophon__row { grid-template-columns: 1fr; gap: 4px; }
  .hero__actions .btn { width: 100%; }
}

/* ---------- Движение: минимум и по делу ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
