/* ============================================================
   ЛАМАКОРД — лендинг. Рафинированный минимализм, шрифт Onest.
   ============================================================ */

:root {
  --bg:        #fefdfc;   /* тёплый почти-белый (под фото верёвок) */
  --bg-soft:   #f5f3ee;   /* тёплая панель секций */
  --ink:       #15140f;   /* почти-чёрный тёплый */
  --ink-2:     #4a473f;
  --ink-soft:  #807c72;   /* приглушённый текст */
  --line:      #e9e7df;   /* волосяные линии */
  --accent:    #6e7045;   /* хаки */
  --accent-d:  #585a36;
  --olive:     #6e7150;
  --jute:      #c8a16a;
  --shadow:    0 1px 2px rgba(21,20,15,.04), 0 12px 40px -12px rgba(21,20,15,.12);
  --shadow-lg: 0 2px 4px rgba(21,20,15,.05), 0 30px 70px -24px rgba(21,20,15,.22);
  --r:   18px;
  --r-lg: 26px;
  --maxw: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Onest', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 28px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------------- Buttons ---------------- */
.btn {
  --bg-btn: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--bg-btn);
  border: none;
  border-radius: 999px;
  padding: 14px 24px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), background .25s, box-shadow .25s;
}
.btn svg { width: 16px; height: 16px; transition: transform .25s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -10px rgba(21,20,15,.45); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(0); }
.btn--sm { padding: 11px 20px; font-size: 14px; }
.btn--lg { padding: 17px 32px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--dark { background: var(--ink); }
.btn--accent { background: var(--accent); }
.btn--accent:hover { background: var(--accent-d); }

/* ---------------- Header ---------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.header.scrolled { border-bottom-color: var(--line); }
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 28px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  font-size: 18px;
}
.logo__mark {
  height: 54px;
  width: auto;
  display: block;
}
.logo__word { line-height: 1; }

.nav { display: flex; gap: 30px; }
.nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  position: relative;
  transition: color .2s;
}
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: -5px;
  width: 100%; height: 1.5px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .28s;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

.header__right { display: flex; align-items: center; gap: 20px; }
.header__phone { font-weight: 600; font-size: 15px; white-space: nowrap; }

/* ---------------- Hero ---------------- */
.hero { position: relative; padding: 56px 0 60px; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(90% 70% at 88% -5%, rgba(110,112,69,.08), transparent 55%);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: stretch;
}
.hero__text { display: flex; flex-direction: column; }

.hero__title {
  font-size: clamp(2.3rem, 4.4vw, 3.9rem);
  line-height: 1.0;
  font-weight: 800;
  letter-spacing: -.035em;
  margin: 0 0 4px;
  white-space: nowrap;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .accent { color: var(--accent); }
.hero__sub {
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 28em;
  line-height: 1.5;
}

/* строка преимуществ с иконками */
.hero__features {
  display: flex;
  gap: 34px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.hero__features.fly { display: flex; }   /* .fly иначе делает inline-block */
.feat {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.22;
}
.feat__ic {
  width: 46px; height: 46px;
  flex: none;
  border-radius: 50%;
  background: #efece4;
  display: grid; place-items: center;
  color: var(--ink);
}
.feat__ic svg { width: 23px; height: 23px; }

/* фото мотков верёвки — выезжает снизу-слева */
.hero__ropes {
  width: 115%;
  max-width: none;
  height: auto;
  margin-top: 6px;
  margin-left: -7.5%;
  align-self: flex-start;
  filter: drop-shadow(0 24px 26px rgba(21,20,15,.16));
  opacity: 0;
  transform: translate(-34px, 52px) scale(.94);
  animation: ropesIn 1.15s cubic-bezier(.16,.84,.26,1) .5s forwards;
}
@keyframes ropesIn { to { opacity: 1; transform: translate(0,0) scale(1); } }

.hero__stats {
  display: flex;
  gap: 38px;
  margin-top: 38px;
  flex-wrap: wrap;
}
.hero__stats.fly { display: flex; }   /* .fly иначе делает inline-block и ломает строку */
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat__num { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; }
.stat__cap { font-size: 13.5px; color: var(--ink-soft); max-width: 11em; line-height: 1.3; }

/* ---------------- Lead form ---------------- */
.hero__form-col { position: relative; }
.lead {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px 30px 26px;
  box-shadow: var(--shadow-lg);
  position: relative;
  /* при переходе по якорю #lead учитываем липкую шапку (76px) — видна вся форма */
  scroll-margin-top: 104px;
}
.lead__head { text-align: center; }
.lead__title { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.lead__promo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 9px 14px 9px 9px;
  background: rgba(110,112,69,.09);
  border: 1px solid rgba(110,112,69,.24);
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink);
}
.lead__promo-tag {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.lead__promo b { color: var(--accent-d); font-weight: 700; }
.lead__sub { font-size: 14.5px; color: var(--ink-soft); margin-top: 14px; line-height: 1.45; }

.lead__fields { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.input {
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 15px 18px;
  width: 100%;
  transition: border-color .2s, background .2s;
}
.input::placeholder { color: #a9a59a; }
.input:focus { outline: none; background: #fff; border-color: var(--accent); }

.lead__note { font-size: 11.5px; color: #a9a59a; text-align: center; margin-top: 14px; line-height: 1.4; }
.lead__ok {
  text-align: center;
  padding: 26px 6px 10px;
  animation: okIn .5s cubic-bezier(.2,.7,.2,1) both;
}
.lead__ok-ic {
  width: 66px; height: 66px; margin: 0 auto 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(110,112,69,.12);
  color: var(--accent);
  animation: okPop .5s cubic-bezier(.2,1.4,.4,1) .1s both;
}
.lead__ok-ic svg { width: 33px; height: 33px; }
.lead__ok h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.lead__ok p { color: var(--ink-soft); margin-top: 12px; font-size: 1rem; line-height: 1.55; max-width: 30ch; margin-inline: auto; }
.lead__ok-phone { display: inline-block; margin-top: 20px; font-weight: 700; font-size: 1.2rem; color: var(--ink); transition: color .2s; }
.lead__ok-phone:hover { color: var(--accent); }
@keyframes okIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes okPop { from { opacity: 0; transform: scale(.5); } }

/* ---------------- Отдельная страница «Спасибо» (/spasibo/) ---------------- */
.ty { min-height: 76vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.ty__inner { display: flex; flex-direction: column; align-items: center; }
.ty__ic {
  width: 86px; height: 86px; border-radius: 50%;
  background: rgba(110,112,69,.12); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 26px;
  animation: okPop .5s cubic-bezier(.2,1.4,.4,1) both;
}
.ty__ic svg { width: 44px; height: 44px; }
.ty__title { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 800; letter-spacing: -.02em; }
.ty__text { color: var(--ink-soft); margin-top: 16px; font-size: 1.12rem; line-height: 1.55; max-width: 34ch; }
.ty__phone { margin-top: 24px; font-weight: 700; font-size: 1.45rem; color: var(--ink); transition: color .2s; }
.ty__phone:hover { color: var(--accent); }
.ty__back { margin-top: 32px; }

/* ---------------- Flip timer ---------------- */
.timer {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  user-select: none;
}
.timer__group { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.timer__cap { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.timer__colon { font-size: 2.1rem; font-weight: 700; color: var(--ink); line-height: 1.55; align-self: flex-start; }

.flip { display: flex; gap: 5px; }

/* отдельная цифра-«барабан» */
.flip-digit {
  position: relative;
  width: 38px;
  height: 56px;
  font-size: 2.1rem;
  font-weight: 700;
  border-radius: 8px;
  color: #f4f1ea;
  perspective: 260px;
  box-shadow: 0 2px 5px rgba(21,20,15,.18);
}
.flip-digit > div {
  position: absolute;
  left: 0; right: 0;
  height: 28px;
  overflow: hidden;
  background: #1c1b16;
  backface-visibility: hidden;
}
.flip-digit > div span {
  display: block;
  height: 56px;
  line-height: 56px;
  text-align: center;
}
.flip-digit .upper {
  top: 0;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid rgba(0,0,0,.45);
}
.flip-digit .lower {
  bottom: 0;
  border-radius: 0 0 8px 8px;
  background: #211f19;
}
.flip-digit .lower span { margin-top: -28px; }
.flip-digit .fold-upper {
  top: 0;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid rgba(0,0,0,.45);
  transform-origin: bottom;
  z-index: 3;
  background: #1c1b16;
}
.flip-digit .fold-lower {
  bottom: 0;
  border-radius: 0 0 8px 8px;
  transform-origin: top;
  transform: rotateX(90deg);
  z-index: 3;
  background: #211f19;
}
.flip-digit .fold-lower span { margin-top: -28px; }
.flip-digit.go .fold-upper { animation: foldUp .5s cubic-bezier(.4,0,.3,1) forwards; }
.flip-digit.go .fold-lower { animation: foldDown .5s cubic-bezier(.4,0,.3,1) .5s forwards; }
@keyframes foldUp   { to { transform: rotateX(-90deg); } }
@keyframes foldDown { to { transform: rotateX(0deg); } }

/* ---------------- Sections ---------------- */
.section { padding: 60px 0; position: relative; }
/* Разделитель сверху — по ширине контейнера (как ряд блоков), не на всю ширину */
.section::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: calc(100% - 56px);
  max-width: calc(var(--maxw) - 56px);
  border-top: 1px solid var(--line);
}
.section--soft { background: var(--bg-soft); }
.section__head { max-width: 640px; margin-bottom: 52px; }
.section__head--center { max-width: none; text-align: center; margin-bottom: 44px; }
.section__title {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.08;
  margin-top: 14px;
}
.section__lead { color: var(--ink-soft); margin-top: 16px; font-size: 1.08rem; }

/* ---------------- Product grid (4 в ряд, подпись внутри) ---------------- */
.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  max-width: 1160px;
  margin-inline: auto;
}
.card {
  position: relative;
  width: calc((100% - 3 * 18px) / 4);
  height: 250px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: box-shadow .3s, border-color .3s;
}
.card:hover { box-shadow: var(--shadow-lg); border-color: transparent; }
.card__pic {
  position: absolute;
  left: 50%; top: 43%;
  transform: translate(-50%, -50%);
  max-width: 95%;
  max-height: 85%;
  width: auto;
  object-fit: contain;
  /* тень — родная на фото (сток), CSS-тень не добавляем */
}
.card__name {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 12px 15px;
  text-align: center;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.25;
  color: var(--ink);
  background: linear-gradient(transparent, #fff 48%);
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
  transform-origin: center bottom;
}
.card:hover .card__name { transform: scale(1.06); }

/* ---------------- About ---------------- */
.section__head--center .section__lead { margin-inline: auto; }
.about { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.about__card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 22px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s, border-color .3s;
}
.about__card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.about__head { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 12px; }
.about__ic {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 13px;
  background: rgba(110,112,69,.1);
  color: var(--accent);
  display: grid; place-items: center;
}
.about__ic svg { width: 23px; height: 23px; }
.about__card h3 { font-size: 1.18rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.about__card p { color: var(--ink-soft); font-size: 14px; line-height: 1.55; max-width: 26ch; }

/* ---------------- Reviews ---------------- */
.reviews__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 38px;
}
.reviews__nav { display: flex; gap: 10px; flex: none; }
.rev-btn {
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, transform .2s;
}
.rev-btn svg { width: 20px; height: 20px; }
.rev-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.rev-btn:active { transform: scale(.94); }

.reviews__track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 4px 12px;
  margin: -4px -4px 0;
  scrollbar-width: none;
}
.reviews__track::-webkit-scrollbar { display: none; }
.review {
  flex: 0 0 calc((100% - 2 * 22px) / 3);
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 28px 26px;
  display: flex;
  flex-direction: column;
}
.review__stars { color: #e2a534; font-size: 1.05rem; letter-spacing: 2px; }
.review__text {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
  margin: 14px 0 22px;
  flex: 1;
}
.review__author { display: flex; align-items: center; gap: 12px; }
.review__avatar {
  width: 46px; height: 46px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 15px;
}
.review__author strong { display: block; font-size: 15px; font-weight: 600; }
.review__author span { font-size: 13px; color: var(--ink-soft); }

/* ---------------- Кнопка-CTA в подвале ---------------- */
.footer__col a.footer__cta {
  display: inline-flex;
  color: #fff;
  margin-top: 20px;
  margin-bottom: 0;
}
.footer__col a.footer__cta:hover { color: #fff; }

/* ---------------- Полоса-CTA над подвалом (только моб.) ---------------- */
.endcta { display: none; }

/* ---------------- Footer ---------------- */
.footer { background: var(--bg-soft); padding: 64px 0 30px; border-top: 1px solid var(--line); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
}
.logo--light { font-size: 17px; }
.logo--light .logo__mark { height: 60px; }
.footer__brand p { color: var(--ink-soft); font-size: 14.5px; margin-top: 16px; max-width: 32em; line-height: 1.55; }
.footer__col h4 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 16px; }
.footer__col a, .footer__col span { display: block; font-size: 15px; color: var(--ink-2); margin-bottom: 10px; transition: color .2s; }
.footer__col a:hover { color: var(--accent); }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 26px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-soft);
}
.footer__bottom a:hover { color: var(--accent); }

/* ============================================================
   Анимации: вылет слева + reveal на скролле
   ============================================================ */
.fly {
  display: inline-block;
  opacity: 0;
  transform: translateX(-44px);
  animation: flyIn .85s cubic-bezier(.16,.84,.3,1) forwards;
  animation-delay: calc(var(--i) * .11s + .15s);
}
@keyframes flyIn { to { opacity: 1; transform: translateX(0); } }

.hero__form-col {
  opacity: 0;
  transform: translateX(48px);
  animation: flyInR .9s cubic-bezier(.16,.84,.3,1) forwards;
  animation-delay: .42s;
}
@keyframes flyInR { to { opacity: 1; transform: translateX(0); } }

.reveal {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity .8s cubic-bezier(.16,.84,.3,1), transform .8s cubic-bezier(.16,.84,.3,1);
  transition-delay: calc(var(--d, 0) * .08s);
}
.reveal.in { opacity: 1; transform: translateX(0); }

@media (prefers-reduced-motion: reduce) {
  .fly, .hero__form-col, .reveal, .hero__ropes { animation: none !important; opacity: 1 !important; transform: none !important; }
  .flip-digit.go .fold-upper, .flip-digit.go .fold-lower { animation: none !important; }
}

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; gap: 44px; }
  .hero { padding-top: 44px; }
  .hero__ropes { width: 100%; margin-left: 0; }
  .nav { display: none; }
  .card { width: calc((100% - 2 * 18px) / 3); }
  .about { grid-template-columns: repeat(2, 1fr); }
  .review { flex-basis: calc((100% - 22px) / 2); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding-inline: 18px; }
  .header__phone { display: none; }
  .header__inner { height: 66px; }
  .logo__mark { height: 46px; }
  .hero__title { white-space: normal; font-size: clamp(2.1rem, 9vw, 2.8rem); }
  .hero__features { gap: 20px; }
  .card { width: calc((100% - 18px) / 2); height: 190px; }
  .review { flex-basis: 86%; }
  .about { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 24px 20px; padding-bottom: 32px; }
  .footer__col h4 { margin-bottom: 12px; }
  /* Кнопка прайс-листа — полосой на всю ширину НАД подвалом */
  .endcta { display: block; padding: 30px 0 26px; background: #fff; }
  .endcta__btn { padding: 17px; font-size: 16px; border-radius: 14px; }
  .footer__col a.footer__cta { display: none; }
  .cta__inner { padding: 38px 28px; }
  .section { padding: 70px 0; }
  .lead { padding: 24px 20px 22px; }
  .flip-digit { width: 32px; height: 48px; font-size: 1.7rem; }
  .flip-digit > div { height: 24px; }
  .flip-digit > div span { height: 48px; line-height: 48px; }
  .flip-digit .lower span, .flip-digit .fold-lower span { margin-top: -24px; }
  .timer__colon { font-size: 1.7rem; }
}
