/* Sanatorium Life — лендинг. Палитра снята с макета docs/design-chatgpt.png */
:root {
  --espresso: #231b14;
  --espresso-2: #2b221a;
  --brown: #3a2f25;
  --brown-2: #4d4034;
  --beige: #e6dbcf;
  --beige-2: #efe6dc;
  --gold: #b38f5b;
  --gold-2: #c6a678;
  --gold-3: #dcc196;
  --star: #e7b452;
  --cream: #f3ede4;
  --cream-2: rgba(243, 237, 228, .8);
  --cream-3: rgba(243, 237, 228, .58);
  --ink: #2a2119;
  --ink-2: #5a4c3f;
  --ink-3: #7d6d5e;
  --danger: #b4533b;

  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --container: 1200px;
  --gutter: 24px;
  --header-h: 88px;
  --radius: 14px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--espresso);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

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

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--cream); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  border: 1px solid transparent; border-radius: 999px;
  padding: 16px 28px;
  font-weight: 600; font-size: 15px; line-height: 1.2; letter-spacing: .01em;
  white-space: nowrap;
  transition: background-color .25s, color .25s, border-color .25s, box-shadow .25s, transform .25s;
}
.btn .icon { font-size: 18px; transition: transform .25s; }
.btn:hover .icon { transform: translateX(3px); }
.btn--gold {
  background: linear-gradient(180deg, #c09b67 0%, #a9824f 100%);
  color: #fffaf2;
  box-shadow: 0 10px 26px rgba(150, 112, 62, .3);
}
.btn--gold:hover { background: linear-gradient(180deg, #caa673 0%, #b38c58 100%); box-shadow: 0 12px 30px rgba(150, 112, 62, .4); }
.btn--outline {
  border-color: rgba(198, 166, 120, .8);
  color: var(--cream);
  padding: 12px 22px;
  font-size: 14px;
}
.btn--outline:hover { background: rgba(198, 166, 120, .14); border-color: var(--gold-3); }
.btn[disabled] { opacity: .65; cursor: progress; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 600; font-size: 15px;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  transition: color .25s, border-color .25s;
}
.link-arrow .icon { font-size: 18px; transition: transform .25s; }
.link-arrow:hover .icon { transform: translateX(4px); }
.link-arrow:hover { color: var(--gold); }
.link-arrow--light { color: var(--cream); border-bottom-color: rgba(243, 237, 228, .45); }
.link-arrow--light:hover { color: var(--gold-3); border-bottom-color: var(--gold-3); }

.eyebrow {
  margin: 0;
  font-size: 12px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold-2);
}

.h2 {
  margin: 0;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(36px, 3.7vw, 54px); line-height: 1.04; letter-spacing: -.005em;
  color: var(--ink);
}

.section { padding: clamp(68px, 8vw, 112px) 0; }
.section-lead { margin: 18px 0 28px; max-width: 360px; font-size: 16.5px; color: var(--ink-2); }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center;
  color: var(--cream);
  transition: height .3s, background-color .3s, box-shadow .3s, backdrop-filter .3s;
}
.header.is-scrolled {
  height: 72px;
  background: rgba(35, 27, 20, .9);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  box-shadow: 0 1px 0 rgba(243, 237, 228, .08);
}
.header__inner { display: flex; align-items: center; gap: 28px; }

.logo { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; color: var(--cream); flex: none; }
.logo__mark { width: 88px; height: 20px; color: var(--gold-2); margin-bottom: 5px; }
.logo__name { font-weight: 500; font-size: 21px; letter-spacing: .07em; text-transform: uppercase; }
.logo__tag { margin-top: 7px; font-size: 8.5px; font-weight: 500; letter-spacing: .25em; text-transform: uppercase; color: var(--cream-2); }

.nav { display: flex; gap: clamp(18px, 2.2vw, 32px); margin-left: auto; }
.nav a {
  position: relative; padding: 6px 0;
  font-size: 12px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: var(--cream); opacity: .92;
  transition: color .2s, opacity .2s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--gold-2); transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.nav a:hover { color: var(--gold-3); opacity: 1; }
.nav a:hover::after { transform: scaleX(1); }

.header__actions { display: flex; align-items: center; gap: 22px; margin-left: clamp(12px, 2vw, 36px); }

.lang { position: relative; }
.lang summary {
  display: flex; align-items: center; gap: 6px; padding: 8px 2px;
  list-style: none; cursor: pointer;
  font-size: 13.5px; font-weight: 600; letter-spacing: .05em;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary .icon { font-size: 15px; transition: transform .2s; }
.lang[open] summary .icon { transform: rotate(180deg); }
.lang__menu {
  position: absolute; right: -10px; top: calc(100% + 8px);
  min-width: 170px; padding: 6px;
  background: var(--espresso-2); border: 1px solid rgba(243, 237, 228, .12); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
}
.lang__menu a {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 12px; border-radius: 8px; font-size: 14.5px; color: var(--cream);
}
.lang__menu a span { color: var(--cream-3); font-size: 12px; font-weight: 600; letter-spacing: .06em; }
.lang__menu a:hover { background: rgba(243, 237, 228, .07); }
.lang__menu a[aria-current="page"] { color: var(--gold-3); }

.burger {
  display: none; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: transparent; border: 1px solid rgba(243, 237, 228, .28);
}
.burger .icon { font-size: 22px; }
.burger .icon--close { display: none; }
.menu-open .burger .icon--open { display: none; }
.menu-open .burger .icon--close { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(700px, min(100svh, 920px));
  display: flex; flex-direction: column;
  color: var(--cream);
  background: var(--espresso);
}
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 68% 42%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(35, 27, 20, .96) 0%, rgba(35, 27, 20, .84) 26%, rgba(35, 27, 20, .4) 52%, rgba(35, 27, 20, .05) 74%),
    linear-gradient(0deg, rgba(35, 27, 20, .96) 0%, rgba(35, 27, 20, .6) 20%, rgba(35, 27, 20, 0) 42%),
    linear-gradient(180deg, rgba(35, 27, 20, .6) 0%, rgba(35, 27, 20, 0) 20%);
}
.hero__content {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: calc(var(--header-h) + 44px);
  padding-bottom: 44px;
}
.hero h1 {
  margin: 20px 0 26px;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(46px, 5.7vw, 84px); line-height: 1.02; letter-spacing: -.008em;
  text-wrap: initial;
}
.hero__lead { margin: 0 0 38px; max-width: 480px; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.65; color: var(--cream-2); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 34px; }

.callbox { display: flex; align-items: center; gap: 14px; }
.callbox__icon {
  display: grid; place-items: center; flex: none;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px solid rgba(243, 237, 228, .75);
}
.callbox__icon .icon { font-size: 19px; }
.callbox__nums { display: flex; flex-direction: column; gap: 3px; font-size: 15px; font-weight: 500; }
.callbox__nums a { transition: color .2s; }
.callbox__nums a:hover { color: var(--gold-3); }
.callbox__nums b { display: inline-block; min-width: 26px; margin-right: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; color: var(--gold-2); }

.features { padding: 30px 0 42px; }
.features__list { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 0; list-style: none; }
.features__item {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 2px 14px;
  text-align: center; font-size: 15.5px; line-height: 1.35; color: var(--cream);
}
.features__item + .features__item::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px;
  background: rgba(243, 237, 228, .2);
}
.features__item .icon { font-size: 42px; stroke-width: 1.1; color: var(--cream); }
.features__item span { max-width: 15ch; }

/* ---------- Programs ---------- */
.programs { background: linear-gradient(180deg, #ebe2d8 0%, #e3d7ca 100%); }
.programs .h2, .steps .h2 { font-size: clamp(34px, 3.1vw, 46px); }
.programs__grid { display: grid; grid-template-columns: minmax(270px, 1fr) 3fr; gap: clamp(28px, 3.5vw, 52px); align-items: center; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.pcard, .scard {
  position: relative; isolation: isolate; overflow: hidden; display: block;
  border-radius: var(--radius);
  color: var(--cream);
  background: var(--brown);
}
.pcard { aspect-ratio: 1 / 1.02; box-shadow: 0 16px 36px rgba(58, 47, 37, .2); }
.pcard img, .scard img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s cubic-bezier(.2, .7, .2, 1);
}
.pcard::after, .scard::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(35, 27, 20, .9) 0%, rgba(35, 27, 20, .5) 32%, rgba(35, 27, 20, 0) 60%);
}
.pcard:hover img, .scard:hover img { transform: scale(1.05); }
.pcard__body {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px 14px;
  padding: 22px;
}
.pcard__title { grid-column: 1 / -1; margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 2.3vw, 32px); line-height: 1.05; }
.pcard__sub { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--cream-2); }
.circle-arrow {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid rgba(243, 237, 228, .85);
  transition: background-color .25s, color .25s;
}
.circle-arrow .icon { font-size: 17px; }
.pcard:hover .circle-arrow { background: var(--cream); color: var(--ink); }

/* ---------- Sanatoriums ---------- */
.sanatoriums {
  color: var(--cream);
  background:
    radial-gradient(1100px 520px at 75% 0%, rgba(110, 90, 72, .55) 0%, rgba(110, 90, 72, 0) 62%),
    linear-gradient(180deg, #3b3027 0%, #2e251d 100%);
}
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 38px; }
.sanatoriums .h2 { margin-top: 12px; color: var(--cream); }
.cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.scard { aspect-ratio: 1 / .86; box-shadow: 0 20px 44px rgba(0, 0, 0, .28); }
.scard__body { position: absolute; left: 20px; right: 20px; bottom: 18px; }
.scard__name { margin: 0 0 6px; font-family: var(--serif); font-weight: 500; font-size: clamp(25px, 2.2vw, 30px); line-height: 1.05; }

.stars { position: relative; display: inline-block; line-height: 0; }
.stars__row { display: flex; gap: 3px; }
.stars__row .icon { font-size: 15px; stroke: none; fill: currentColor; }
.stars__base { color: rgba(231, 180, 82, .32); }
.stars__fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--star); white-space: nowrap; }

/* ---------- Steps ---------- */
.steps { background: linear-gradient(180deg, #ece3d9 0%, #e4d9cc 100%); }
.steps__grid { display: grid; grid-template-columns: minmax(270px, 1fr) 3fr; gap: clamp(28px, 3.5vw, 52px); align-items: start; }
.steps__list { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 8px 0 0; list-style: none; }
.steps__list::before {
  content: ""; position: absolute; top: 27px; left: 12.5%; right: 12.5%; height: 1px;
  background: linear-gradient(90deg, var(--gold-2), var(--gold-2));
  opacity: .75;
}
.step { position: relative; padding: 0 12px; text-align: center; }
.step__num {
  position: relative;
  display: grid; place-items: center;
  width: 40px; height: 40px; margin: 0 auto 20px; border-radius: 50%;
  background: var(--gold-2); color: #fffaf2;
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  box-shadow: 0 0 0 7px #e9e0d5;
}
.step__title { margin: 0 0 8px; font-size: 17px; font-weight: 700; color: var(--ink); }
.step__text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }

/* ---------- About / brand ---------- */
.about { position: relative; isolation: isolate; overflow: hidden; color: var(--cream); background: #3c3027; }
.about__media { position: absolute; inset: 0 42% 0 0; z-index: -2; }
.about__media img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 35%; }
.about::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(60, 48, 39, 0) 0%, rgba(60, 48, 39, .12) 30%, rgba(60, 48, 39, .9) 50%, #3c3027 57%);
}
.about__inner { display: grid; grid-template-columns: 1fr 1fr; min-height: 560px; align-items: center; }
.about__content { grid-column: 2; padding: 90px 0 90px clamp(0px, 2vw, 32px); }
.tagline { margin: 16px 0 24px; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(36px, 3.6vw, 54px); line-height: 1.08; }
.gold-rule { display: block; width: 60px; height: 1px; margin: 0 0 24px; background: var(--gold-2); }
.about__sub { margin: 0 0 14px; font-size: 18px; color: var(--cream); }
.about__text { margin: 0 0 32px; max-width: 470px; font-size: 15.5px; color: var(--cream-2); }

/* ---------- Contacts & form ---------- */
.contacts { color: var(--cream); background: linear-gradient(180deg, #2a2119 0%, #201913 100%); }
.contacts__grid { display: grid; grid-template-columns: 1fr 1.08fr; gap: clamp(36px, 5.5vw, 80px); align-items: start; }
.contacts .h2 { margin-top: 12px; color: var(--cream); }
.contacts__lead { margin: 20px 0 34px; max-width: 440px; color: var(--cream-2); font-size: 16.5px; }
.phones { display: grid; gap: 14px; max-width: 440px; }
.phone-card {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; border-radius: var(--radius);
  border: 1px solid rgba(243, 237, 228, .13); background: rgba(243, 237, 228, .03);
  transition: border-color .25s, background-color .25s;
}
.phone-card:hover { border-color: rgba(198, 166, 120, .65); background: rgba(198, 166, 120, .07); }
.phone-card__code {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(198, 166, 120, .15); color: var(--gold-3);
  font-size: 12px; font-weight: 700; letter-spacing: .07em;
}
.phone-card__text { display: flex; flex-direction: column; }
.phone-card__label { font-size: 13px; color: var(--cream-3); }
.phone-card__num { font-size: 20px; font-weight: 600; letter-spacing: .01em; }

.form {
  position: relative;
  padding: clamp(24px, 3vw, 40px);
  border-radius: 22px;
  color: var(--ink); background: var(--beige-2);
  box-shadow: 0 34px 70px rgba(0, 0, 0, .35);
}
.form__title { margin: 0 0 22px; font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.1; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d5c5b2; border-radius: 11px;
  background: #fbf8f3; color: var(--ink);
  font: inherit; font-size: 16px; line-height: 1.35;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
  -webkit-appearance: none; appearance: none;
}
.field select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a4c3f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 18px;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #c4ae95; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); background: #fff;
  box-shadow: 0 0 0 3px rgba(179, 143, 91, .22);
}
.field [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180, 83, 59, .15); }
.form .btn { width: 100%; margin-top: 4px; }
.form__status { min-height: 0; margin: 10px 0 0; font-size: 14px; }
.form__status:empty { display: none; }
.form__status.is-error, .form__error { color: var(--danger); }
.form__error { margin: 10px 0 0; font-size: 14px; }
.form__error a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.form__consent { margin: 14px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form__success { display: none; padding: 34px 6px; text-align: center; outline: none; }
.form.is-sent .form__fields { display: none; }
.form.is-sent .form__success { display: block; }
.form__check {
  display: grid; place-items: center;
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
  background: rgba(179, 143, 91, .16); color: var(--gold);
}
.form__check .icon { font-size: 30px; stroke-width: 2; }
.form__success h3 { margin: 0 0 10px; font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.1; }
.form__success p { margin: 0 auto; max-width: 380px; color: var(--ink-2); }

.btn.is-loading .icon { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .2; } }

/* ---------- Footer ---------- */
.footer { padding: 46px 0 30px; font-size: 14px; color: var(--cream-3); background: #19130e; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 26px 40px; }
.footer .logo__name { font-size: 18px; }
.footer .logo__mark { width: 74px; height: 17px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.footer__nav a, .footer__phones a { transition: color .2s; }
.footer__nav a:hover, .footer__phones a:hover { color: var(--cream); }
.footer__phones { display: flex; flex-direction: column; gap: 4px; text-align: right; color: var(--cream-2); }
.footer__phones b { margin-right: 6px; font-size: 11.5px; letter-spacing: .08em; color: var(--gold-2); }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  margin-top: 30px; padding-top: 22px;
  border-top: 1px solid rgba(243, 237, 228, .08);
  font-size: 13px;
}

/* ---------- Mobile menu ---------- */
.mnav {
  position: fixed; inset: 0; z-index: 55;
  display: flex; flex-direction: column; gap: 28px;
  padding: 96px var(--gutter) 32px;
  overflow-y: auto;
  color: var(--cream);
  background: radial-gradient(800px 400px at 80% 0%, rgba(110, 90, 72, .45), rgba(110, 90, 72, 0)), var(--espresso);
}
.mnav[hidden] { display: none; }
.mnav__nav { display: flex; flex-direction: column; }
.mnav__nav a {
  padding: 12px 0;
  border-bottom: 1px solid rgba(243, 237, 228, .09);
  font-family: var(--serif); font-size: 32px; font-weight: 500; line-height: 1.15;
}
.mnav__langs { display: flex; gap: 10px; }
.mnav__langs a {
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid rgba(243, 237, 228, .2);
  font-size: 14px; font-weight: 600; letter-spacing: .05em;
}
.mnav__langs a[aria-current="page"] { border-color: var(--gold-2); color: var(--gold-3); }
.mnav .btn { align-self: stretch; }
.mnav__phones { display: flex; flex-direction: column; gap: 6px; font-size: 17px; font-weight: 500; }
.mnav__phones b { display: inline-block; min-width: 30px; font-size: 12px; letter-spacing: .08em; color: var(--gold-2); }
html.menu-open, html.menu-open body { overflow: hidden; }
html.menu-open .header { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.cards-3 .reveal:nth-child(2), .cards-4 .reveal:nth-child(2), .steps__list .reveal:nth-child(2) { transition-delay: .08s; }
.cards-3 .reveal:nth-child(3), .cards-4 .reveal:nth-child(3), .steps__list .reveal:nth-child(3) { transition-delay: .16s; }
.cards-4 .reveal:nth-child(4), .steps__list .reveal:nth-child(4) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1140px) {
  .nav { gap: 18px; }
  .nav a { font-size: 11.5px; letter-spacing: .06em; }
  .header__actions { gap: 16px; }
}

@media (max-width: 1020px) {
  :root { --header-h: 74px; }
  .nav, .header__actions .btn--outline, .header__actions .lang { display: none; }
  .burger { display: grid; }
  .header__actions { margin-left: auto; }
  .logo__name { font-size: 18px; }
  .logo__mark { width: 74px; height: 17px; }
  .logo__tag { font-size: 7.5px; }

  .features__list { grid-template-columns: repeat(2, 1fr); gap: 28px 0; }
  .features__item:nth-child(odd)::before { display: none; }
  .features__item:last-child { grid-column: 1 / -1; }

  .programs__grid, .steps__grid, .contacts__grid { grid-template-columns: 1fr; }
  .section-lead { max-width: 560px; }
  .cards-4 { grid-template-columns: repeat(2, 1fr); }

  .about { display: flex; flex-direction: column; }
  .about::before { display: none; }
  .about__media { position: relative; inset: auto; z-index: 0; height: clamp(320px, 62vw, 500px); }
  .about__media::after {
    content: ""; position: absolute; inset: auto 0 0 0; height: 45%;
    background: linear-gradient(180deg, rgba(60, 48, 39, 0) 0%, #3c3027 100%);
  }
  .about__inner { position: relative; z-index: 1; display: block; min-height: 0; }
  .about__content { padding: 0 0 72px; margin-top: -36px; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  body { font-size: 15.5px; }
  .hero { min-height: 100svh; }
  .hero::before {
    background:
      linear-gradient(0deg, rgba(35, 27, 20, .97) 0%, rgba(35, 27, 20, .78) 38%, rgba(35, 27, 20, .35) 70%, rgba(35, 27, 20, .55) 100%);
  }
  .hero__bg img { object-position: 72% 40%; }
  .hero__content { justify-content: flex-end; padding-top: calc(var(--header-h) + 90px); padding-bottom: 28px; }
  .hero h1 { font-size: clamp(40px, 11.5vw, 54px); margin: 16px 0 20px; }
  .hero__lead { margin-bottom: 28px; }
  .hero__actions { flex-direction: column; align-items: stretch; gap: 22px; }
  .hero__actions .btn { width: 100%; }
  .features { padding: 24px 0 34px; border-top: 1px solid rgba(243, 237, 228, .1); }
  .features__item { font-size: 14px; gap: 10px; padding: 0 10px; }
  .features__item .icon { font-size: 34px; }

  .cards-3, .cards-4 {
    display: flex; gap: 14px;
    margin: 0 calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 14px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .cards-3::-webkit-scrollbar, .cards-4::-webkit-scrollbar { display: none; }
  .cards-3 > * { flex: 0 0 80%; scroll-snap-align: start; }
  .cards-4 > * { flex: 0 0 74%; scroll-snap-align: start; }
  .js .cards-3 .reveal, .js .cards-4 .reveal { transition-delay: 0s; }

  .sec-head { flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 28px; }

  .steps__list { grid-template-columns: 1fr; gap: 26px; padding-top: 4px; }
  .steps__list::before { display: none; }
  .step:not(:last-child)::after {
    content: ""; position: absolute; left: 20px; top: 40px; bottom: -26px; width: 1px;
    background: var(--gold-2); opacity: .75;
  }
  .step { display: grid; grid-template-columns: 40px 1fr; gap: 2px 18px; padding: 0; text-align: left; }
  .step__num { grid-row: span 2; margin: 0; }
  .step__title { margin: 7px 0 4px; }

  .form__row { grid-template-columns: 1fr; }
  .form__title { font-size: 27px; }
  .phone-card__num { font-size: 18px; }

  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__phones { text-align: left; }
}

@media (max-width: 380px) {
  .logo__name { font-size: 16px; }
  .logo__tag { letter-spacing: .2em; }
}
