/* ==========================================================================
   HAILAN ART — эстетическая стоматология и косметология (Хэйхэ)
   Редакционная типографика: антиква, воздух, тонкие линии, чёрные врезки.
   ========================================================================== */

:root {
  --paper: #eceae4;
  --paper-2: #f6f4ef;
  --ink: #121211;
  --ink-soft: #3b3b36;
  --muted: #6f6f68;
  --line: rgba(18, 18, 17, .16);
  --line-soft: rgba(18, 18, 17, .09);
  --bronze: #8a6a44;
  --white: #fff;
  --serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --pad: clamp(18px, 3.6vw, 56px);
  --max: 1560px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; font-family: var(--serif); letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding-left: 1.1em; }

/* ---------- типографика ---------- */
.d1 { font-family: var(--serif); font-size: clamp(44px, 8.4vw, 132px); line-height: .92; letter-spacing: -.025em; font-weight: 300; }
.d2 { font-family: var(--serif); font-size: clamp(34px, 5.6vw, 82px); line-height: .98; letter-spacing: -.02em; font-weight: 300; }
.d3 { font-family: var(--serif); font-size: clamp(26px, 3.4vw, 48px); line-height: 1.06; font-weight: 300; }
.d4 { font-family: var(--serif); font-size: clamp(21px, 2.2vw, 30px); line-height: 1.18; font-weight: 400; }
em, .it { font-style: italic; }
.serif { font-family: var(--serif); }

.label {
  font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted);
}
.label--ink { color: var(--ink); }
.lead { font-size: clamp(16px, 1.35vw, 19px); line-height: 1.65; color: var(--ink-soft); max-width: 58ch; }
.body { font-size: 16px; line-height: 1.7; color: var(--ink-soft); }
.body p + p { margin-top: 1em; }
.small { font-size: 13.5px; line-height: 1.6; color: var(--muted); }

/* ---------- сетка ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(14px, 1.6vw, 26px); }
.sec { padding: clamp(56px, 9vw, 140px) 0; position: relative; }
.sec--tight { padding: clamp(36px, 5vw, 72px) 0; }
.sec--flush { padding: 0; }
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }
.dark { background: #101010; color: #e9e7e1; }
.dark .label, .dark .muted, .dark .small { color: rgba(233, 231, 225, .55); }
.dark .body, .dark .lead { color: rgba(233, 231, 225, .78); }
.dark .hr { background: rgba(255, 255, 255, .16); }
.paper-2 { background: var(--paper-2); }

/* ---------- шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 90;
  background: rgba(236, 234, 228, .88);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.top__in {
  display: flex; align-items: center; gap: 26px;
  min-height: 74px; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad);
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand__mark {
  font-family: var(--serif); font-size: 25px; letter-spacing: .02em; line-height: 1;
}
.brand__cn { font-family: var(--serif); font-size: 15px; color: var(--muted); letter-spacing: .1em; }
.nav { display: flex; align-items: center; gap: clamp(10px, 1.6vw, 26px); margin-left: auto; }
.nav a {
  font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft);
  padding: 6px 0; position: relative;
}
.nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.top__cta { display: flex; align-items: center; gap: 14px; }
.top__phone { font-size: 13px; letter-spacing: .04em; color: var(--ink); white-space: nowrap; }
.burger { display: none; width: 40px; height: 40px; border: 0; background: none; padding: 0; }
.burger i { display: block; height: 1px; background: var(--ink); margin: 5px 0; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 28px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper); font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); background: transparent; }
.dark .btn { background: #eceae4; color: #101010; border-color: #eceae4; }
.dark .btn:hover { background: transparent; color: #eceae4; }
.dark .btn--ghost { background: transparent; color: #eceae4; border-color: rgba(255,255,255,.3); }
.dark .btn--ghost:hover { border-color: #eceae4; }
.btn--sm { padding: 11px 20px; font-size: 11px; }
.btn--wide { width: 100%; }

/* ---------- hero ---------- */
.hero { position: relative; padding-top: clamp(26px, 3vw, 48px); overflow: hidden; }
.hero__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.hero__title { margin-top: clamp(18px, 3vw, 40px); }
.hero__title .d1 { display: block; }
.hero__title em { display: block; }
.hero__media {
  margin-top: clamp(22px, 3vw, 40px); position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.2vw, 18px);
  align-items: stretch;
}
.hero__media figure img { display: block; }
.hero__media figure { margin: 0; overflow: hidden; align-self: start; }
.hero__media figure img { display: block; }
.hero__media img { width: 100%; object-fit: cover; }
.hero__media .m1 img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; }
.hero__media .m2 img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; }
.hero__meta {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding-top: 18px; border-top: 1px solid var(--line);
}
.hero__meta > div { max-width: 30ch; }

/* ---------- полоса направлений ---------- */
.directions { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.direction {
  background: var(--paper); padding: clamp(22px, 3vw, 44px); display: flex; flex-direction: column;
  gap: 18px; min-height: clamp(280px, 32vw, 460px); transition: background .4s var(--ease);
}
.direction:hover { background: var(--paper-2); }
.direction__num { font-family: var(--serif); font-size: 13px; letter-spacing: .12em; color: var(--bronze); }
.direction h2 { font-size: clamp(30px, 3.6vw, 54px); line-height: 1.02; }
.direction ul { list-style: none; padding: 0; margin: 0; }
.direction li { border-top: 1px solid var(--line-soft); padding: 9px 0; font-size: 15px; color: var(--ink-soft); display: flex; justify-content: space-between; gap: 12px; }
.direction li span { color: var(--muted); font-size: 13px; }
.direction__more { margin-top: auto; }

/* ---------- список услуг (строки) ---------- */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 60px 1.4fr 1.2fr auto; gap: 18px; align-items: baseline;
  padding: clamp(16px, 2vw, 26px) 0; border-bottom: 1px solid var(--line);
  transition: padding .3s var(--ease), color .3s;
}
.row:hover { padding-left: 10px; }
.row__n { font-family: var(--serif); font-size: 14px; color: var(--bronze); letter-spacing: .08em; }
.row__t { font-family: var(--serif); font-size: clamp(21px, 2.3vw, 32px); line-height: 1.1; }
.row__d { font-size: 14px; color: var(--muted); }
.row__a { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--bronze); }

/* ---------- кейсы ---------- */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.2vw, 18px); }
.case { margin: 0; }
.case__frame { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: #ddd; }
.case__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.case__after { clip-path: inset(0 0 0 50%); }
.case__bar { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: rgba(255,255,255,.9); }
.case__dot {
  position: absolute; top: 50%; left: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center;
  font-size: 11px; letter-spacing: .05em; color: #121211;
}
.case figcaption { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.case figcaption b { font-weight: 500; color: var(--ink); font-family: var(--serif); font-size: 15px; letter-spacing: 0; }

/* ---------- галерея-полоса ---------- */
.strip { display: flex; gap: clamp(8px, 1vw, 14px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.strip img { height: clamp(180px, 24vw, 320px); width: auto; object-fit: cover; scroll-snap-align: start; filter: saturate(.96); }

/* ---------- цитата / философия ---------- */
.quote { max-width: 22ch; font-family: var(--serif); font-size: clamp(30px, 4.6vw, 70px); line-height: 1.02; }
.mark { font-family: var(--serif); font-size: clamp(54px, 9vw, 120px); line-height: 1; color: rgba(255,255,255,.14); }

/* ---------- статистика ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }
.stat { background: var(--paper); padding: clamp(18px, 2.4vw, 34px); }
.stat b { display: block; font-family: var(--serif); font-size: clamp(32px, 4vw, 56px); font-weight: 300; line-height: 1; margin-bottom: 8px; }
.stat span { font-size: 13px; color: var(--muted); }

/* ---------- технологии / шаги ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 30px); }
.step { border-top: 1px solid var(--line); padding-top: 18px; }
.step b { font-family: var(--serif); font-size: 13px; letter-spacing: .1em; color: var(--bronze); display: block; margin-bottom: 12px; }
.step h4 { font-size: 19px; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--muted); }

/* ---------- карточки журнала ---------- */
.articles { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 28px); }
.article { display: flex; flex-direction: column; gap: 12px; }
.article__cover { aspect-ratio: 4 / 3; background: #171717; overflow: hidden; position: relative; }
.article__cover svg { width: 100%; height: 100%; display: block; }
.article__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article__cat { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--bronze); }
.article h3 { font-size: clamp(19px, 1.7vw, 24px); line-height: 1.2; }
.article:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* ---------- форма ---------- */
.form { display: grid; gap: clamp(14px, 1.6vw, 22px); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 1.6vw, 22px); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select {
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 10px 0; font-family: var(--sans); font-size: 16px; color: var(--ink);
  border-radius: 0; width: 100%;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field textarea { min-height: 80px; resize: vertical; }
.field--check { flex-direction: row; align-items: flex-start; gap: 10px; }
.field--check input { width: 16px; height: 16px; margin-top: 4px; }
.field--check label { text-transform: none; letter-spacing: 0; font-size: 12.5px; line-height: 1.5; }
.dark .field input, .dark .field textarea { color: #eceae4; border-color: rgba(255,255,255,.22); }
.dark .field input::placeholder, .dark .field textarea::placeholder { color: rgba(233,231,225,.4); }
.form-msg { display: none; font-size: 14px; }
.form-msg.is-ok { display: block; color: #2f6b4f; }
.form-msg.is-err { display: block; color: #a03b2c; }
.dark .form-msg.is-ok { color: #8fd3b0; }
.dark .form-msg.is-err { color: #f0a99b; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* ---------- мессенджеры ---------- */
.links { display: flex; flex-wrap: wrap; gap: 18px; }
.links a { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.links a:hover { border-color: var(--ink); }

/* ---------- футер ---------- */
.foot { background: #101010; color: #cfccc4; padding: clamp(40px, 6vw, 80px) 0 26px; }
.foot__brand { font-family: var(--serif); font-size: clamp(48px, 11vw, 190px); line-height: .82; letter-spacing: -.03em; color: #eceae4; margin-bottom: clamp(24px, 4vw, 48px); }
.foot__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 26px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.14); }
.foot h4 { font-family: var(--sans); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(233,231,225,.5); margin-bottom: 14px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 8px; font-size: 14px; }
.foot a:hover { color: #fff; }
.foot__bottom { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); font-size: 12px; color: rgba(233,231,225,.45); }

/* ---------- страница-заголовок ---------- */
.page-head { padding: clamp(28px, 4vw, 64px) 0 clamp(20px, 3vw, 44px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: clamp(18px, 2.4vw, 34px); }
.crumbs a:hover { color: var(--ink); }
.crumbs i { font-style: normal; opacity: .5; }

/* ---------- контент процедуры ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 4vw, 70px); align-items: start; }
.split__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(24px, 2.6vw, 34px); margin: 1.6em 0 .5em; line-height: 1.1; }
.prose h3 { font-size: clamp(19px, 1.9vw, 24px); margin: 1.4em 0 .4em; }
.prose p { margin-bottom: 1em; color: var(--ink-soft); }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.15em; color: var(--ink-soft); }
.prose li { margin-bottom: .4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 14.5px; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }
.prose th { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.prose blockquote { margin: 1.4em 0; padding-left: 20px; border-left: 1px solid var(--bronze); font-family: var(--serif); font-size: 22px; line-height: 1.3; }
.prose .note { background: var(--paper-2); border: 1px solid var(--line-soft); padding: 18px 20px; font-size: 15px; margin: 1.4em 0; }

/* ---------- аккордеон ---------- */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  width: 100%; background: none; border: 0; text-align: left; padding: 18px 36px 18px 0;
  font-family: var(--serif); font-size: clamp(18px, 1.8vw, 23px); color: var(--ink); position: relative;
}
.faq__q::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--bronze); transition: transform .25s; }
.faq__item.is-open .faq__q::after { transform: translateY(-50%) rotate(45deg); }
.faq__a { display: none; padding: 0 36px 20px 0; font-size: 15px; color: var(--ink-soft); }
.faq__item.is-open .faq__a { display: block; }

/* ---------- прайс ---------- */
.price-tabs { display: flex; gap: 22px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.price-tabs button {
  background: none; border: 0; padding: 12px 0; font-size: 11.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); position: relative;
}
.price-tabs button.is-active { color: var(--ink); }
.price-tabs button.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ink); }
.price-list { list-style: none; padding: 0; margin: 0; }
.price-list li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.price-list li b { font-family: var(--serif); font-weight: 500; font-size: 18px; white-space: nowrap; }
.price-list li span em { font-style: normal; color: var(--muted); font-size: 13px; display: block; }

/* ---------- видео ---------- */
.video { position: relative; overflow: hidden; background: #000; }
.video img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: .92; }
.video video { width: 100%; aspect-ratio: 16 / 9; display: block; }
.video__btn { position: absolute; left: 20px; bottom: 20px; }

/* ---------- служебное ---------- */
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 999; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- адаптив ---------- */
@media (max-width: 1180px) {
  .nav { gap: 14px; }
  .nav a { font-size: 10.5px; letter-spacing: .12em; }
  .foot__cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .burger { display: block; margin-left: auto; }
  .top__phone { display: none; }
  .nav.is-open {
    display: flex; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column;
    align-items: flex-start; gap: 0; background: var(--paper); padding: 14px var(--pad) 24px;
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open a { padding: 12px 0; font-size: 13px; }
  .directions { grid-template-columns: 1fr; }
  .hero__media { grid-template-columns: 1fr; }
  .hero__media .m2 { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .case-grid { grid-template-columns: 1fr 1fr; }
  .articles { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .row { grid-template-columns: 36px 1fr; gap: 8px; }
  .row__d, .row__a { grid-column: 2; }
  .form__row { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .case-grid, .articles, .steps { grid-template-columns: 1fr; }
  .hero__meta { gap: 12px; }
  .price-tabs { gap: 14px; }
  .foot__cols { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
