/* =========================================================
   Виктория Масленцева — landing page
   ========================================================= */

:root {
  --bg: #faf6f0;
  --bg-alt: #f4ede4;
  --card: #f1e9df;
  --card-hover: #ece2d6;
  --line: #e3d7c8;
  --accent: #b59d84;
  --accent-dark: #9c8269;
  --accent-soft: #e9ddcf;
  --text: #2c2723;
  --text-muted: #6e655c;
  --white: #fffdfa;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", cursive;

  --container: 1200px;
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 84px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -.01em;
}

/* ---------- Icons ---------- */
.icon,
.card__icon svg,
.feature__icon svg,
.round-icon svg,
.modal__close svg,
.icon-arrow {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon { width: 30px; height: 30px; flex-shrink: 0; color: var(--accent-dark); }
.icon-arrow { width: 18px; height: 18px; stroke-width: 1.6; transition: transform .3s var(--ease); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease), translate .4s var(--ease);
}

.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: var(--accent-dark); box-shadow: 0 10px 24px -12px rgba(120, 95, 70, .6); }
.btn:hover .icon-arrow { transform: translateX(4px); }

.btn--outline { border-color: var(--accent); color: var(--accent-dark); background: transparent; }
.btn--outline:hover { background: var(--accent-soft); }

.btn--lg { padding: 18px 36px; font-size: 17px; }
.btn__icon { width: 20px; height: 20px; flex-shrink: 0; fill: currentColor; }

.hero__buttons { display: flex; flex-wrap: wrap; gap: 14px; }

.btn:focus-visible,
a:focus-visible,
button:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 3px; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(250, 246, 240, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(60, 40, 20, .35); }

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 16px; }
.brand__logo { width: 56px; height: 56px; color: var(--accent); flex-shrink: 0; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name { font-family: var(--serif); font-size: 25px; font-weight: 500; }
.brand__role { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  position: relative;
  font-size: 15px;
  color: var(--text);
  transition: color .25s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:hover { color: var(--accent-dark); }
.nav a:hover::after { transform: scaleX(1); }
.nav__cta { display: none; }

.burger {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  position: relative;
}
.burger span {
  position: absolute;
  left: 13px; right: 13px;
  height: 1.5px;
  background: var(--text);
  transition: transform .3s var(--ease), opacity .2s;
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--bg) 0%, #f6efe6 100%);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 40px;
  min-height: clamp(560px, calc(100svh - var(--header-h)), 720px);
}
.hero__content { padding: 48px 0 56px; }

.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 4.6vw, 60px);
  line-height: 1.08;
  letter-spacing: -.015em;
  max-width: 600px;
}

.hero__lead {
  margin-top: 24px;
  max-width: 480px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text);
}

.badges { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 32px; }
.badge {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text-muted);
}

.hero__actions { margin-top: 40px; }
.hero__note { margin-top: 16px; font-size: 15px; color: var(--text-muted); }
.hero__note strong { font-weight: 500; color: var(--text); }

.hero__media {
  position: relative;
  align-self: stretch;
  /* фото выходит за контейнер до правого края экрана */
  margin-right: calc(-1 * (max(0px, (100vw - var(--container)) / 2) + 24px));
}

.hero__photo {
  position: absolute;
  inset: 0;
  border-top-left-radius: 300px 50%;
  border-bottom-left-radius: 300px 50%;
  overflow: hidden;
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 45% 30%; }

.hero__arc {
  position: absolute;
  left: -34px;
  top: -4%;
  height: 108%;
  width: 120px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  opacity: .7;
  pointer-events: none;
}

.hero__handwrite {
  position: absolute;
  right: 6%;
  top: 7%;
  font-family: var(--hand);
  font-size: 30px;
  line-height: 1.05;
  color: #5c4e41;
  transform: rotate(-8deg);
  text-shadow: 0 1px 12px rgba(255, 253, 250, .8);
}

/* ---------- Intro & Services ---------- */
.services { background: var(--bg); }

.intro {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 56px;
  align-items: start;
  margin-bottom: 48px;
}

.intro__text {
  margin-top: 16px;
  font-size: 22px;
  line-height: 1.45;
  color: var(--text-muted);
  max-width: 420px;
}

.intro__divider { align-self: stretch; background: var(--line); }

.intro__right { display: flex; align-items: center; gap: 22px; }
.intro__subtitle { font-family: var(--serif); font-size: clamp(26px, 3vw, 34px); font-weight: 500; line-height: 1.15; }

.round-icon {
  display: inline-grid;
  place-items: center;
  width: 56px; height: 56px;
  flex-shrink: 0;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent-dark);
}
.round-icon svg { width: 22px; height: 22px; }

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  padding: 30px 26px 32px;
  background: var(--card);
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: transform .4s var(--ease), background-color .3s, border-color .3s, box-shadow .4s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  background: var(--white);
  border-color: var(--line);
  box-shadow: 0 24px 40px -28px rgba(80, 55, 30, .4);
}

.card__icon {
  display: inline-grid;
  place-items: center;
  width: 56px; height: 56px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent-dark);
  margin-bottom: 20px;
}
.card__icon svg { width: 26px; height: 26px; }

.card__title { font-family: var(--serif); font-size: 23px; font-weight: 600; line-height: 1.2; margin-bottom: 16px; }
.card__text { font-size: 14.5px; color: var(--text-muted); margin-bottom: 14px; }
.card__label { font-size: 14px; font-weight: 500; margin-bottom: 10px; }

.list li {
  position: relative;
  padding-left: 18px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-muted);
}
.list li + li { margin-top: 9px; }
.list li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.list--tags { display: flex; flex-wrap: wrap; gap: 8px; }
.list--tags li {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
.list--tags li + li { margin-top: 0; }
.list--tags li::before { display: none; }

/* ---------- Advantages ---------- */
.advantages { background: var(--bg-alt); padding: 0; }

.advantages__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr);
  align-items: stretch;
}

.advantages__media {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.advantages__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.note {
  position: absolute;
  right: 28px;
  bottom: 32px;
  z-index: 1;
  max-width: 240px;
  padding: 18px 22px 20px;
  background: rgba(255, 253, 250, .92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius-sm);
  box-shadow: 0 18px 36px -20px rgba(60, 40, 20, .45);
  font-family: var(--hand);
  font-size: 26px;
  line-height: 1.1;
  color: #5c4e41;
  transform: rotate(-3deg);
}
.js .advantages__media.is-visible .note { animation: noteIn 1s var(--ease) 1s backwards; }
@keyframes noteIn { from { opacity: 0; transform: translateY(24px) rotate(2deg); } }

.advantages__content {
  padding: 88px 24px 88px 64px;
  max-width: 820px;
}

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 48px;
  margin-top: 44px;
}

.feature { display: flex; gap: 18px; align-items: flex-start; }
.feature__icon {
  display: inline-grid;
  place-items: center;
  width: 50px; height: 50px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--accent-dark);
  box-shadow: 0 6px 16px -10px rgba(80, 55, 30, .4);
}
.feature__icon svg { width: 24px; height: 24px; }
.feature__title { font-family: var(--sans); font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.feature p { font-size: 14.5px; color: var(--text-muted); }

/* ---------- Process ---------- */
.process { background: var(--bg); }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
  counter-reset: none;
}

.step { position: relative; padding-right: 24px; }
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 56px;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--line) 100%);
}

.step__num {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 20px;
}
.step__title { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.step p { font-size: 14.5px; color: var(--text-muted); }

/* ---------- CTA / Contacts ---------- */
.cta { background: var(--bg-alt); padding: 72px 0; }

.cta__inner {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1.15fr;
  gap: 40px;
  align-items: center;
}

.cta__media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.cta__media img { width: 100%; height: 100%; object-fit: cover; }

.cta__title { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 34px); font-weight: 500; line-height: 1.15; margin-bottom: 14px; }
.cta__text p { font-size: 15px; color: var(--text-muted); margin-bottom: 26px; }

.contact-card {
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 50px -40px rgba(80, 55, 30, .45);
}
.contact-card__title { font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.contact-card > p { font-size: 14.5px; color: var(--text-muted); }

.contact-card__free {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 20px;
  color: var(--text) !important;
}
.contact-card__free .icon { width: 22px; height: 22px; }
.contact-card__free strong { font-weight: 600; }

.messengers { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.messenger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px 11px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  transition: background-color .3s, border-color .3s, transform .3s var(--ease);
}
.messenger svg { width: 26px; height: 26px; fill: var(--text); transition: fill .3s; }
.messenger:hover { background: var(--accent); border-color: var(--accent); color: var(--white); transform: translateY(-2px); }
.messenger:hover svg { fill: var(--white); }

.contact-card__small { font-size: 13px !important; }

/* ---------- Footer ---------- */
.footer { background: var(--bg); border-top: 1px solid var(--line); padding: 40px 0 24px; }

.footer__inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 40px;
  align-items: center;
}
.footer .brand__logo { width: 48px; height: 48px; }
.footer .brand__name { font-size: 22px; }

.footer__slogan { font-size: 14px; color: var(--text-muted); justify-self: center; }
.footer__legal { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

.footer__right { display: flex; align-items: center; gap: 24px; }
.footer__geo { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-muted); }
.footer__geo .icon { width: 18px; height: 18px; }

.footer__social { display: flex; gap: 10px; }
.footer__social a {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--text);
  transition: background-color .3s, transform .3s var(--ease);
}
.footer__social svg { width: 20px; height: 20px; fill: var(--white); }
.footer__social a:hover { background: var(--accent); transform: translateY(-2px); }

.footer__bottom { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-muted); }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal[hidden] { display: none; }

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(44, 39, 35, .45);
  backdrop-filter: blur(4px);
  animation: fade .3s var(--ease);
}

.modal__box {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 40px 36px 36px;
  background: var(--bg);
  border-radius: 24px;
  box-shadow: 0 40px 80px -30px rgba(44, 39, 35, .5);
  animation: pop .4s var(--ease);
}

.modal__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  transition: background-color .25s;
}
.modal__close:hover { background: var(--accent-soft); }
.modal__close svg { width: 18px; height: 18px; }

.modal__title { font-family: var(--serif); font-size: 34px; font-weight: 500; line-height: 1.1; }
.modal__lead { margin: 10px 0 24px; font-size: 14.5px; color: var(--text-muted); }

.modal__contacts { display: grid; gap: 12px; }

.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color .3s, transform .3s var(--ease), box-shadow .3s var(--ease);
}
.contact-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -20px rgba(80, 55, 30, .5);
}
.contact-link__icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
}
.contact-link__icon svg { width: 24px; height: 24px; fill: var(--white); }
.contact-link__text { display: grid; flex: 1; line-height: 1.3; }
.contact-link__text strong { font-size: 16px; font-weight: 600; }
.contact-link__text span { font-size: 14px; color: var(--text-muted); }
.contact-link .icon-arrow { color: var(--accent-dark); }
.contact-link:hover .icon-arrow { transform: translateX(4px); }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.97); } }

/* =========================================================
   Animations
   ========================================================= */

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* ---------- Reveal on scroll (только при включённом JS) ----------
   Используем animation с fill-mode: backwards, чтобы после появления
   не мешать собственным transition/hover-эффектам элементов. */
.js .reveal { opacity: 0; }
.js .reveal.is-visible {
  opacity: 1;
  animation: revealUp .9s var(--ease) var(--delay, 0ms) backwards;
}
.js .reveal--zoom.is-visible { animation-name: revealZoom; animation-duration: 1.2s; }
.js .reveal--right.is-visible { animation-name: revealRight; }

@keyframes revealUp { from { opacity: 0; transform: translateY(28px); } }
@keyframes revealZoom { from { opacity: 0; transform: scale(.94); } }
@keyframes revealRight { from { opacity: 0; transform: translateX(40px); } }

/* ---------- Hero: появление при загрузке ---------- */
.hero::before {
  content: "";
  position: absolute;
  top: -160px; left: -200px;
  width: 620px; height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 190, 162, .38) 0%, rgba(214, 190, 162, 0) 65%);
  animation: drift 18s ease-in-out infinite alternate;
  pointer-events: none;
}
.hero__inner { position: relative; }

@keyframes drift {
  50% { transform: translate(180px, 120px) scale(1.15); }
  100% { transform: translate(60px, 260px) scale(.95); }
}

.hero__title .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: .12em;
  margin-bottom: -.12em;
}
.hero__title .w > span {
  display: inline-block;
  animation: rise 1s var(--ease) both;
  animation-delay: calc(.15s + var(--i) * 45ms);
}
@keyframes rise { from { transform: translateY(110%); } }

@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } }
.js .hero__lead { animation: fadeUp .9s var(--ease) .7s both; }
.js .badge { animation: fadeUp .8s var(--ease) both; }
.js .badge:nth-child(1) { animation-delay: .85s; }
.js .badge:nth-child(2) { animation-delay: .95s; }
.js .badge:nth-child(3) { animation-delay: 1.05s; }
.js .hero__actions { animation: fadeUp .9s var(--ease) 1.15s both; }

/* фото раскрывается слева, внутри — лёгкий zoom-out */
.js .hero__photo { animation: unveil 1.5s cubic-bezier(.7, 0, .2, 1) .2s both; }
@keyframes unveil { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }

.hero__photo img { scale: 1.05; will-change: translate; }
.js .hero__photo img { animation: zoomOut 2.2s var(--ease) .2s both; }
@keyframes zoomOut { from { scale: 1.25; } }

/* линия-дуга «прорисовывается» сверху вниз */
.js .hero__arc { animation: drawDown 1.8s var(--ease) .9s both; }
@keyframes drawDown { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }

/* рукописная подпись «пишется» слева направо */
.js .hero__handwrite { animation: write 1.6s ease-out 1.5s both; }
@keyframes write { from { clip-path: inset(-20% 100% -20% 0); } to { clip-path: inset(-20% -10% -20% 0); } }

.heart { display: inline-block; animation: beat 2.6s ease-in-out 3.2s infinite; }
@keyframes beat {
  0%, 60%, 100% { transform: scale(1); }
  15% { transform: scale(1.3); }
  30% { transform: scale(1); }
  45% { transform: scale(1.2); }
}

/* ---------- Кнопки: блик и пульс ---------- */
.btn--primary { position: relative; overflow: hidden; isolation: isolate; }
.btn--primary::before {
  content: "";
  position: absolute;
  top: 0; left: -75%;
  z-index: -1;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg);
  transition: left .8s var(--ease);
}
.btn--primary:hover::before { left: 130%; }

.btn--pulse { animation: pulse 3s ease-out 2.5s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(181, 157, 132, .55); }
  70%, 100% { box-shadow: 0 0 0 18px rgba(181, 157, 132, 0); }
}

/* ---------- Навигация: активный пункт ---------- */
.nav a.is-active { color: var(--accent-dark); }
.nav a.is-active::after { transform: scaleX(1); }

/* ---------- Иконки и карточки ---------- */
.round-icon svg { animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(5px); } }

.card__icon,
.feature__icon {
  transition: background-color .4s, color .4s, border-color .4s, transform .5s var(--ease);
}
.card:hover .card__icon {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  transform: rotate(-8deg) scale(1.06);
}
.feature:hover .feature__icon {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-4px);
}

.list--tags li { transition: border-color .3s, background-color .3s, transform .3s var(--ease); }
.list--tags li:hover { border-color: var(--accent); background: var(--white); transform: translateY(-2px); }

/* ---------- Шаги: линия прорисовывается, номер «выпрыгивает» ---------- */
.js .step:not(:last-child)::after {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s var(--ease) calc(var(--delay, 0ms) + .45s);
}
.js .step.is-visible::after { transform: scaleX(1); }

.js .step .step__num {
  transform: scale(0);
  transition: transform .7s cubic-bezier(.34, 1.56, .64, 1) calc(var(--delay, 0ms) + .15s);
}
.js .step.is-visible .step__num { transform: none; }

/* ---------- Параллакс-картинки ---------- */
.advantages__media img,
.cta__media img { will-change: translate; }
.advantages__media img { scale: 1.15; }
.cta__media img { scale: 1.2; }

/* ---------- Прелоадер ---------- */
.preloader { display: none; }
.js .preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--bg);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1s cubic-bezier(.77, 0, .18, 1);
}
.js.no-preloader .preloader { display: none; }
.preloader.is-done { clip-path: inset(0 0 100% 0); }

.preloader__logo { width: 120px; height: 120px; color: var(--accent); overflow: visible; transition: transform .7s var(--ease), opacity .5s; }
.preloader.is-done .preloader__logo { transform: translateY(-40px); opacity: 0; }
.preloader__logo circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: drawCircle 1.1s cubic-bezier(.65, 0, .35, 1) .1s forwards;
}
.preloader__logo text {
  font-family: var(--serif);
  font-size: 46px;
  font-weight: 500;
  fill: currentColor;
  opacity: 0;
  animation: letterIn .7s var(--ease) forwards;
}
.preloader__logo text:nth-of-type(1) { animation-delay: .55s; }
.preloader__logo text:nth-of-type(2) { animation-delay: .75s; }
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes letterIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* пока идёт прелоадер — hero-анимации стоят на паузе */
.js:not(.is-loaded) .hero *,
.js:not(.is-loaded) .hero::before { animation-play-state: paused !important; }
.js:not(.is-loaded):not(.no-preloader) body { overflow: hidden; }

/* ---------- Hero: парящие карточки ---------- */
.float-card {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px 14px 16px;
  background: rgba(255, 253, 250, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 18px;
  box-shadow: 0 20px 40px -22px rgba(60, 40, 20, .5);
  transition: translate .8s var(--ease);
}
.float-card--exp { left: -40px; bottom: 15%; }
.float-card--free { right: 7%; bottom: 7%; max-width: 260px; }

.float-card__num {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 600;
  line-height: 1;
  color: var(--accent-dark);
  font-variant-numeric: lining-nums tabular-nums;
}
.float-card__text { font-size: 13px; line-height: 1.35; color: var(--text-muted); }
.float-card__text strong { font-size: 15px; font-weight: 600; color: var(--text); }
.float-card__icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
}
.float-card__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.js .float-card { animation: fadeUp .9s var(--ease) both, bob 6s ease-in-out infinite; }
.js .float-card--exp { animation-delay: 1.5s, 2.4s; }
.js .float-card--free { animation-delay: 1.8s, 3.4s; }
@keyframes bob { 50% { transform: translateY(-10px); } }

.hero__handwrite { transition: translate .8s var(--ease); }

/* ---------- Бегущая строка ---------- */
.marquee {
  overflow: hidden;
  padding: 26px 0;
  background: var(--bg);
  border-block: 1px solid var(--line);
}
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__group { display: flex; align-items: center; flex-shrink: 0; }
.marquee span {
  padding: 0 28px;
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 500;
  line-height: 1.1;
  white-space: nowrap;
  color: var(--text);
}
.marquee span.is-outline {
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1px var(--accent-dark);
}
.marquee i { font-style: normal; font-size: 16px; color: var(--accent); }

/* ---------- Заголовки: слова выезжают снизу ---------- */
.js [data-split] .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: .12em;
  margin-bottom: -.12em;
}
.js [data-split] .w > span { display: inline-block; transform: translateY(110%); }
.js [data-split].is-visible .w > span,
.js .is-visible [data-split] .w > span {
  transform: none;
  transition: transform 1s var(--ease) calc(var(--delay, 0ms) + var(--i) * 55ms);
}
.js .reveal[data-split] { opacity: 1; }
.js .reveal[data-split].is-visible { animation: none; }

/* ---------- Картинки: открываются шторкой ---------- */
.js .reveal--curtain { opacity: 1; }
.js .reveal--curtain.is-visible { animation: none; }
.js .reveal--curtain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--accent);
  transform-origin: right;
}
.js .reveal--curtain.is-visible::after {
  transform: scaleX(0);
  transition: transform 1.2s cubic-bezier(.77, 0, .18, 1) var(--delay, 0ms);
}
.js .reveal--curtain img { transition: scale 1.8s var(--ease); }
.js .reveal--curtain:not(.is-visible) img { scale: 1.4; }

/* ---------- Карточки услуг: 3D-наклон и подсветка ---------- */
.card { position: relative; overflow: hidden; }
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(214, 190, 162, .38), transparent 55%);
  opacity: 0;
  transition: opacity .4s;
}
.card:hover::after { opacity: 1; }
.card.is-tilting { transition: transform .12s linear, background-color .3s, border-color .3s, box-shadow .4s var(--ease); }

/* ---------- Курсор ---------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 150;
  width: 36px; height: 36px;
  margin: -18px 0 0 -18px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background-color .3s, border-color .3s, opacity .3s;
}
.cursor.is-visible { opacity: 1; }
.cursor.is-hover {
  width: 64px; height: 64px;
  margin: -32px 0 0 -32px;
  background: rgba(181, 157, 132, .16);
  border-color: transparent;
}
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Кнопка «наверх» с кольцом прогресса ---------- */
.to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 40;
  width: 56px; height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 12px 30px -14px rgba(60, 40, 20, .5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(.9);
  transition: opacity .4s, transform .4s var(--ease), visibility .4s, background-color .3s;
}
.to-top.is-shown { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent-soft); }
.to-top svg { display: block; width: 100%; height: 100%; fill: none; }
.to-top__track { stroke: var(--line); stroke-width: 1.5; }
.to-top__bar { stroke: var(--accent-dark); stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.to-top__arrow { stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.to-top:hover .to-top__arrow { transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .preloader, .cursor { display: none !important; }
  .js [data-split] .w > span { transform: none !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1140px) {
  .nav { gap: 22px; }
  .header__cta { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cta__inner { grid-template-columns: 1fr 1fr; }
  .cta__media { display: none; }
  .footer__inner { grid-template-columns: 1fr auto; }
  .footer__slogan { justify-self: start; }
}

@media (max-width: 960px) {
  :root { --header-h: 72px; }

  .burger { display: block; }
  .brand__logo { width: 46px; height: 46px; }
  .brand__name { font-size: 21px; }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 28px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px -24px rgba(60, 40, 20, .35);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav a::after { display: none; }
  .nav__cta { display: inline-flex; margin-top: 20px; }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
    padding-top: 24px;
  }
  .hero__content { padding: 16px 0 56px; }
  .hero__media { order: -1; margin-right: 0; }
  .hero__photo {
    position: relative;
    inset: auto;
    border-radius: 200px 200px var(--radius) var(--radius);
    aspect-ratio: 4 / 3.4;
  }
  .hero__arc { display: none; }
  .float-card--exp { left: 12px; bottom: 14px; }
  .float-card--free { display: none; }

  .intro { grid-template-columns: 1fr; gap: 28px; }
  .intro__divider { height: 1px; }

  .advantages__inner { grid-template-columns: 1fr; }
  .advantages__media { min-height: 0; aspect-ratio: 16 / 10; border-radius: 0; }
  .advantages__content { padding: 64px 24px; max-width: none; }

  .steps { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .step:nth-child(2)::after { display: none; }

  .cta__inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }

  .brand { gap: 12px; }
  .brand__role { font-size: 11.5px; }

  .hero__lead { font-size: 17px; }
  .hero__handwrite { font-size: 24px; right: 5%; top: 5%; }
  .float-card { padding: 10px 14px 10px 12px; gap: 10px; }
  .float-card__num { font-size: 36px; }
  .float-card__text { font-size: 12px; }
  .marquee { padding: 18px 0; }
  .marquee span { padding: 0 18px; }
  .to-top { right: 16px; bottom: 16px; width: 48px; height: 48px; }
  .badges { flex-direction: column; gap: 16px; }
  .btn--lg { width: 100%; }

  .intro__text { font-size: 19px; }
  .intro__right { gap: 16px; }
  .round-icon { width: 46px; height: 46px; }

  .cards { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; gap: 28px; }
  .advantages__content { padding: 56px 16px; }
  .note { right: 16px; bottom: 16px; max-width: 200px; padding: 14px 16px; font-size: 21px; }

  .steps { grid-template-columns: 1fr; gap: 28px; }
  .step { padding-right: 0; padding-left: 58px; }
  .step__num { position: absolute; left: 0; top: 0; margin: 0; }
  .step::after { display: none; }

  .cta { padding: 56px 0; }
  .contact-card { padding: 24px 20px; }
  .messenger { flex: 1; justify-content: center; }

  .footer__inner { grid-template-columns: 1fr; gap: 20px; }
  .footer__right { flex-wrap: wrap; justify-content: space-between; }

  .modal__box { padding: 32px 20px 24px; }
  .modal__title { font-size: 28px; }
}
