/* СИСТЕМАЛАБ — сайт v2. Структура в духе grandmed.ru (светлая, карточки, круги) + блок «С чего начать» в духе persona.ru.
   Фирменный цвет — изумруд из логотипа салона. */
:root {
  --bg: #FFFFFF;
  --soft: #F3F1EC;
  --soft-2: #ECE9E1;
  --emerald: #0B4A3A;
  --emerald-d: #062F27;
  --ink: #18201D;
  --muted: #5B6863;
  --line: #E2DED5;
  --gold: #B3915D;
  --gold-d: #8A6D3B;
  --cream: #F1EDE0;

  --f-sans: 'Golos Text', system-ui, sans-serif;
  --f-logo: 'Forum', 'Georgia', serif;
  --f-hand: 'Bad Script', cursive;

  --wrap: 1360px;
  --pad: clamp(16px, 4vw, 56px);
  --gap-section: clamp(64px, 8vw, 120px);
  --r: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--f-sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -0.01em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.section { margin-top: var(--gap-section); scroll-margin-top: 80px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.h2 { font-size: clamp(32px, 4.2vw, 56px); line-height: 1.08; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: clamp(24px, 3vw, 40px); }
.kicker { font-size: 13px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-d); margin-bottom: 10px; }
.lead { font-size: clamp(16px, 1.25vw, 18px); line-height: 1.6; color: #34403B; }
.muted { color: var(--muted); font-size: 14px; }

/* ---------- логотип (как у салона: знак над словом «СИСТЕМА», «Лаб» рукописным) ---------- */
.logo { --s: 25px; display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--emerald); line-height: 1; }
.logo__mark { width: calc(var(--s) * 1.7); height: calc(var(--s) * 2.45); margin-bottom: calc(var(--s) * 0.32); }
.logo__name { font-family: var(--f-logo); font-size: var(--s); letter-spacing: 0.08em; }
.logo__lab { font-family: var(--f-hand); font-size: calc(var(--s) * 1.15); line-height: 1.1; margin-top: calc(var(--s) * 0.12); transform: translateX(calc(var(--s) * 0.35)); }
.logo--light { color: #EFE3BE; }
/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px; border-radius: 999px; border: 0; font-weight: 500; font-size: 15px; text-decoration: none; cursor: pointer; transition: background-color .2s ease, color .2s ease, transform .15s ease; }
.btn:active { transform: scale(0.98); }
.btn--em { background: var(--emerald); color: #fff; }
.btn--em:hover { background: var(--emerald-d); }
.btn--line { border: 1px solid currentColor; background: transparent; }
.btn--line:hover { background: rgba(11, 74, 58, 0.06); }
.btn--cream { background: var(--cream); color: var(--emerald-d); }
.btn--cream:hover { background: #fff; }
.round { flex: none; width: 52px; height: 52px; border-radius: 999px; border: 1px solid currentColor; display: inline-flex; align-items: center; justify-content: center; background: transparent; cursor: pointer; transition: background-color .2s ease, color .2s ease; text-decoration: none; }
.round:hover { background: var(--emerald); color: #fff; border-color: var(--emerald); }
.round--fill { background: var(--emerald); color: #fff; border-color: var(--emerald); }
.round--fill:hover { background: var(--emerald-d); }
.round svg { width: 18px; height: 18px; }
.more { display: inline-flex; align-items: center; gap: 14px; font-size: 15px; font-weight: 500; text-decoration: none; }
.more .round { width: 48px; height: 48px; }

/* ---------- шапка ---------- */
.top { border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 28px; min-height: 120px; padding-block: 10px; }
.top__info { display: flex; align-items: center; gap: 26px; margin-left: auto; font-size: 14px; color: #34403B; }
.top__info span { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.top__info svg { width: 18px; height: 18px; color: var(--emerald); flex: none; }
.top__phone { font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap; color: var(--ink); padding: 12px 0; }
.nav { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.nav__in { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 40px); min-height: 56px; overflow-x: auto; scrollbar-width: none; }
.nav__in::-webkit-scrollbar { display: none; }
.nav a { white-space: nowrap; text-decoration: none; font-size: 15px; color: #34403B; padding: 16px 0; }
.nav a:hover { color: var(--emerald); }
.burger, .nav__close { display: none; }

/* ---------- первый экран ---------- */
.banner { position: relative; margin-top: 24px; border-radius: 28px; overflow: hidden; background: var(--emerald); color: #fff; }
.banner__text { position: relative; z-index: 2; padding: clamp(32px, 4vw, 64px); display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.banner__title { font-size: clamp(30px, 3.6vw, 52px); line-height: 1.08; }
.banner__sub { font-size: 16px; color: rgba(255, 255, 255, 0.82); max-width: 30em; }
.banner__photo { position: relative; min-height: 460px; }
.banner__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.banner__photo::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; background: linear-gradient(90deg, var(--emerald), rgba(11, 74, 58, 0)); z-index: 1; }
.banner__nav { position: absolute; right: 24px; bottom: 24px; z-index: 3; display: flex; gap: 10px; color: #fff; }
.banner__nav .round { border-color: rgba(255, 255, 255, 0.7); width: 48px; height: 48px; }
.banner__nav .round:hover { background: #fff; color: var(--emerald); }
.banner__dots { position: absolute; left: clamp(32px, 4vw, 64px); bottom: 24px; z-index: 3; display: flex; gap: 8px; }
.banner__dots button { width: 28px; height: 3px; border: 0; padding: 0; border-radius: 2px; background: rgba(255, 255, 255, 0.35); cursor: pointer; }
.banner__dots button[aria-current="true"] { background: #fff; }
.slide { display: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 460px; }
.slide.is-on { display: grid; }
@keyframes fade { from { opacity: 0.4; } to { opacity: 1; } }

.intro { margin-top: clamp(40px, 5vw, 72px); }
.intro__title { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.05; max-width: 15em; }
.intro__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 48px); margin-top: clamp(24px, 3vw, 40px); align-items: start; }
.intro__grid .lead { grid-column: 2 / 3; }
.intro__grid .lead + .lead { grid-column: 3 / 4; }
.circles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: clamp(32px, 4vw, 56px); }
.circle { aspect-ratio: 1; border: 1px solid var(--gold); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12%; max-width: 260px; justify-self: center; width: 100%; }
.circle b { font-weight: 400; font-size: clamp(30px, 3.4vw, 50px); line-height: 1.05; color: var(--emerald); }
.circle span { font-size: 14px; color: var(--muted); line-height: 1.35; margin-top: 6px; }

/* ---------- направления ---------- */
.dirs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.dir { position: relative; aspect-ratio: 0.68; border-radius: var(--r); overflow: hidden; background: var(--emerald); color: #fff; text-decoration: none; isolation: isolate; }
.dir img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); z-index: -1; }
.dir::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(180deg, rgba(6, 47, 39, 0), rgba(6, 47, 39, 0.88)); z-index: -1; }
.dir:hover img { transform: scale(1.04); }
.dir__foot { position: absolute; left: 22px; right: 18px; bottom: 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.dir__name { font-size: clamp(22px, 2vw, 30px); line-height: 1.1; }
.dir__price { display: block; font-size: 14px; color: rgba(255, 255, 255, 0.8); margin-top: 6px; }
.dir .round { border-color: rgba(255, 255, 255, 0.75); color: #fff; width: 48px; height: 48px; }
.dir:hover .round { background: #fff; color: var(--emerald); }
.minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.mini { display: flex; align-items: center; gap: 16px; padding: 12px; border-radius: var(--r); background: var(--soft); text-decoration: none; transition: background-color .2s ease; }
.mini:hover { background: var(--soft-2); }
.mini img { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; flex: none; }
.mini b { display: block; font-weight: 500; font-size: 17px; }
.mini span { font-size: 14px; color: var(--muted); }

/* ---------- ценности ---------- */
.values { background: var(--soft); border-radius: 28px; padding: clamp(32px, 4vw, 64px); }
.values__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.values__quote { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.35; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.values__quote em { font-style: normal; color: var(--emerald); }
.values__sign { margin-top: 18px; color: var(--muted); font-size: 15px; }
.values__list li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.values__list li:first-child { border-top: 0; padding-top: 0; }
.values__list .n { font-size: 15px; color: var(--gold-d); font-weight: 500; padding-top: 3px; }
.values__list b { display: block; font-weight: 500; font-size: 19px; margin-bottom: 4px; }
.values__list p { color: #3E4A45; }

/* ---------- с чего начать ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.step { padding: 28px 24px 0 0; display: flex; flex-direction: column; gap: 16px; }
.step + .step { padding-left: 24px; border-left: 1px solid var(--line); }
.step__top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; }
.step__n { font-size: 72px; line-height: 0.8; font-weight: 400; color: var(--emerald); }
.step__t b { display: block; font-weight: 500; font-size: 19px; line-height: 1.25; }
.step__t span { display: block; font-size: 14px; color: var(--muted); margin-top: 4px; }
.spec li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.spec li span:last-child { font-weight: 500; white-space: nowrap; }
.step .btn { margin-top: auto; width: 100%; border-radius: 12px; }

/* ---------- цены ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.tab { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 10px 20px; cursor: pointer; font-size: 15px; transition: all .2s ease; }
.tab:hover { border-color: var(--emerald); }
.tab[aria-selected="true"] { background: var(--emerald); border-color: var(--emerald); color: #fff; }
.panel { display: none; }
.panel.is-on { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 clamp(24px, 4vw, 64px); }
.price-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.price-list .nm { font-size: 16px; }
.price-list .nm small { display: block; font-size: 13px; color: var(--muted); }
.price-list .pr { font-weight: 500; white-space: nowrap; font-size: 17px; }
.prices__note { margin-top: 18px; }

/* ---------- карусели ---------- */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 14px) / 4); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; padding-bottom: 4px; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.arrows { display: flex; gap: 10px; }

.person { border-radius: var(--r); overflow: hidden; background: var(--soft); display: flex; flex-direction: column; }
.person__ph { aspect-ratio: 0.78; background: var(--emerald); overflow: hidden; }
.person__ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.person__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.person__body b { font-weight: 500; font-size: 18px; }
.person__body span { font-size: 14px; color: var(--muted); line-height: 1.45; }

.review { border-radius: var(--r); background: var(--soft); padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 12px; }
.review__src { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.review__src b { font-weight: 500; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.review__src i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.stars { color: var(--gold); letter-spacing: 2px; font-size: 15px; }
.review__name { font-weight: 500; font-size: 17px; }
.review p { font-size: 15px; line-height: 1.55; color: #2E3935; }

/* ---------- акции ---------- */
.offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.offer { border-radius: var(--r); padding: 26px; background: var(--soft); display: flex; flex-direction: column; gap: 10px; min-height: 220px; }
.offer--em { background: var(--emerald); color: #fff; }
.offer__big { font-size: clamp(44px, 4vw, 64px); line-height: 1; color: var(--emerald); }
.offer--em .offer__big { color: var(--cream); }
.offer p { font-size: 16px; line-height: 1.45; }
.offer small { margin-top: auto; font-size: 13px; color: var(--muted); }
.offer--em small { color: rgba(255, 255, 255, 0.75); }

/* ---------- интерьер ---------- */
.gallery { display: grid; grid-template-columns: 1.3fr 1fr 1fr; grid-template-rows: 280px 280px; gap: 14px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r); }
.gallery img:first-child { grid-row: span 2; }

/* ---------- контакты ---------- */
.contacts { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 14px; }
.contacts__card { background: var(--emerald); color: #fff; border-radius: 28px; padding: clamp(28px, 3.5vw, 56px); display: flex; flex-direction: column; gap: 24px; }
.contacts__card .h2 { color: #fff; }
.addr li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 10px 0; font-size: 16px; line-height: 1.5; }
.addr svg { width: 22px; height: 22px; color: var(--gold); margin-top: 2px; }
.addr a { text-decoration: none; font-size: 26px; display: inline-block; padding: 6px 0; }
.msg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.msg .btn { min-height: 48px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, 0.5); color: #fff; }
.msg .btn:hover { background: rgba(255, 255, 255, 0.1); }
.contacts__media { display: grid; grid-template-rows: minmax(0, 1fr) 280px; gap: 14px; }
.contacts__ph { position: relative; min-height: 280px; border-radius: 28px; overflow: hidden; }
.contacts__ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.map { width: 100%; height: 100%; border: 0; border-radius: 28px; display: block; min-height: 280px; }

/* ---------- подвал ---------- */
.footer { margin-top: var(--gap-section); background: var(--emerald-d); color: rgba(255, 255, 255, 0.75); padding: 48px 0 40px; font-size: 14px; }
.footer__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }

.dock { display: none; }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .top__info span:not(.keep) { display: none; }
  .dirs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .minis { grid-template-columns: minmax(0, 1fr); }
  .rail { grid-auto-columns: calc((100% - 14px) / 2.3); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(3) { border-left: 0; padding-left: 0; }
  .step { padding-bottom: 28px; }
  .values__grid, .contacts { grid-template-columns: minmax(0, 1fr); }
  .offers { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .intro__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .intro__grid .lead, .intro__grid .lead + .lead { grid-column: auto; }
  .intro__grid > :first-child { display: none; }
}
@media (max-width: 720px) {
  body { padding-bottom: 74px; }
  .top__in { min-height: 92px; gap: 12px; }
  .top__info { display: none; }
  .top .btn { display: none; }
  .top .logo { --s: 17px; }
  .top__phone { margin-left: auto; font-size: 15px; }
  .nav__in { min-height: 48px; gap: 22px; }
  .nav a { font-size: 14px; padding: 12px 0; }
  .banner { border-radius: 22px; margin-top: 14px; }
  .slide { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .banner__photo { min-height: 240px; order: -1; }
  .banner__photo::before { inset: auto 0 0 0; width: auto; height: 40%; background: linear-gradient(0deg, var(--emerald), rgba(11, 74, 58, 0)); }
  .banner__text { padding: 24px 22px 76px; gap: 16px; }
  .banner__dots { left: 22px; bottom: 30px; }
  .banner__nav { right: 16px; bottom: 16px; }
  .intro__grid { grid-template-columns: minmax(0, 1fr); }
  .values { padding: 26px 20px; border-radius: 22px; }
  .values__list li { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
  .values__list b { font-size: 17px; }
  .circles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .circle b { font-size: 30px; }
  .circle span { font-size: 13px; }
  .head .more span { display: none; }
  .head .arrows { display: none; }
  .head > .muted { display: none; }
  .kicker { letter-spacing: 0.14em; }
  .dirs { gap: 10px; }
  .dir { aspect-ratio: 0.72; }
  .dir__foot { left: 14px; right: 12px; bottom: 14px; }
  .dir .round { display: none; }
  .dir__name { font-size: 18px; }
  .dir__price { font-size: 13px; }
  .rail { grid-auto-columns: 78%; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step, .step + .step { border-left: 0; padding-left: 0; padding-right: 0; border-top: 1px solid var(--line); }
  .step:first-child { border-top: 0; }
  .step__n { font-size: 56px; }
  .panel.is-on { grid-template-columns: minmax(0, 1fr); }
  .tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--pad)) 20px; padding: 0 var(--pad); scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; }
  .offers { grid-template-columns: minmax(0, 1fr); }
  .offer { min-height: 0; }
  .gallery { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 220px 160px 160px; }
  .gallery img:first-child { grid-column: span 2; grid-row: auto; }
  .gallery img:nth-child(n+6) { display: none; }
  .contacts__media { grid-template-rows: 260px 260px; }
  .msg .btn { font-size: 14px; }
  .addr a { font-size: 22px; }
  .dock { display: grid; grid-template-columns: minmax(0, 1fr) 52px 52px; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
  .dock .btn { min-height: 52px; }
  .dock .round { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  html, .rail { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
