/* ============================================================
   LAR — Sections: первый экран, услуги, решения, проекты,
   оборудование и бренды, процесс, компания, заявка
   ============================================================ */

/* ---------- Первый экран: фото в «окне» фирменного знака ---------- */
.hero { position: relative; background: var(--black); }

.hero__stage {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(640px, 92svh, 940px);
  padding-top: var(--header-h);
  overflow: hidden;
  background: var(--black) url("../img/pattern.svg") 0 0 / 230px auto;
}
/* Тёплый свет за знаком и затемнение узора под текстом */
.hero__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(50% 60% at 82% 78%, rgba(236, 194, 93, 0.14), transparent 70%),
    radial-gradient(62% 80% at 20% 50%, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.7) 55%, transparent 82%);
}

.hero__inner { position: relative; z-index: 2; padding-block: clamp(2.5rem, 6vh, 5rem); }
.hero__content { max-width: min(38rem, 47%); }
.hero__title {
  margin: 1.5rem 0 1.4rem;
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: var(--tracking-tight);
}
.hero__lead { max-width: 31rem; font-size: var(--text-lg); color: var(--text-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.25rem; }

/* Знак стоит на золотой полосе и уходит за правый край, как на обложке брендбука */
.hero__visual {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  height: min(86%, 52vw);     /* на средних экранах знак уже, чтобы не задеть кнопки */
  aspect-ratio: 368.11 / 240;
  transform: translateX(27%);
}
/* Фото обрезано по внешнему контуру знака чуть внутрь — золото перекрывает край */
.hero__window {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: polygon(0.8% 100%, 41.7% 0.6%, 58.3% 0.6%, 99.2% 100%);
  background: var(--surface-1);
}
.hero__window img {
  position: absolute;
  left: -30%;
  top: 6%;
  width: 140%;
  max-width: none;
  height: auto;
  animation: hero-photo 1.8s var(--ease-out) both;
}
.hero__mark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--gold);
  animation: hero-mark 1.2s var(--ease-out) 0.1s both;
}
@keyframes hero-photo { from { opacity: 0; transform: scale(1.08); } }
@keyframes hero-mark { from { opacity: 0; transform: translateY(6%); } }

.hero__band {
  position: relative;
  z-index: 2;
  margin-top: -1px;           /* без просвета между знаком и полосой */
  background: var(--gold);
  color: var(--black);
}
.hero__facts { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 1.5rem 1.5rem 1.6rem; border-left: 1px solid rgba(0, 0, 0, 0.16); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 1.8vw, 3.1rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat__label { margin-top: 0.45rem; font-size: var(--text-sm); font-weight: 500; line-height: 1.4; color: rgba(0, 0, 0, 0.7); }

/* ---------- Услуги ---------- */
.services {
  padding-block: clamp(3rem, 2rem + 3vw, 5rem);
  border-bottom: 1px solid var(--line-dark);
}
.services__list { display: grid; grid-template-columns: repeat(5, 1fr); }
.service { padding: 0.25rem 1.5rem 0; border-left: 1px solid var(--line-dark); }
.service:first-child { padding-left: 0; border-left: 0; }
.service__icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  margin-bottom: 1.2rem;
  border-radius: var(--r-md);
  background: rgba(236, 194, 93, 0.1);
  color: var(--gold);
}
.service__icon svg { width: 24px; height: 24px; }
.service h3 { font-size: 1.05rem; margin-bottom: 0.45rem; }
.service p { font-size: var(--text-sm); line-height: 1.6; color: var(--text-2); }

/* ---------- Решения ---------- */
.solutions__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 0.5rem + 1.5vw, 1.75rem); }
.solution {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--shadow-light);
}
.solution__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--black); }
.solution__img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out); }
.solution:hover .solution__img { transform: scale(1.04); }
.solution__body { position: relative; flex: 1; padding: 2.6rem 1.6rem 1.8rem; }
.solution__icon {
  position: absolute;
  top: -28px; left: 1.6rem;
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--black);
  color: var(--gold);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 12px 24px -10px rgba(0, 0, 0, 0.55);
}
.solution__icon svg { width: 26px; height: 26px; }
.solution h3 { font-size: var(--text-xl); font-weight: 800; }
.solution p { margin-top: 0.55rem; color: var(--ink-2); }
.solution__list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.2rem; }
.solution__list li {
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: rgba(13, 19, 32, 0.06);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Проекты ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.filter {
  padding: 0.6rem 1.05rem;
  border: 1px solid var(--line-dark-strong);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-2);
  transition: transform var(--dur) var(--ease-spring);
}
.filter:hover { color: var(--white); border-color: rgba(236, 194, 93, 0.6); }
.filter:active { transform: scale(0.96); }
.filter.is-active { border-color: var(--gold); background: var(--gold); color: var(--black); font-weight: 600; }

.projects__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 0.5rem + 1.5vw, 1.75rem); }
.project {
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: var(--r-lg);
  background: var(--surface-1);
  box-shadow: var(--shadow-1);
}
.project.is-hidden { display: none; }
.project__media { aspect-ratio: 800 / 560; overflow: hidden; }
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out); }
.project:hover .project__media img { transform: scale(1.05); }
.project__body { padding: 1.3rem 1.4rem 1.5rem; }
.project__tag {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.project h3 { margin: 0.5rem 0 0.7rem; font-size: 1.15rem; }
.project__loc { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--text-sm); color: var(--text-3); }
.project__loc svg { width: 15px; height: 15px; }
.projects__more { margin-top: 2.5rem; text-align: center; }

/* ---------- Оборудование ---------- */
.equipment__layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 4vw, 5rem);
  align-items: start;
}
.equipment { padding-bottom: clamp(3rem, 2rem + 3vw, 5rem); }
.equipment .section-head { margin-bottom: 0; }
.equip-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.equip-cat {
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--line-dark);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #151515, #0F0F0F);
  box-shadow: var(--shadow-1);
}
.equip-cat__icon { width: 30px; height: 30px; margin-bottom: 1rem; color: var(--gold); }
.equip-cat h3 { font-size: 1.05rem; }
.equip-cat p { margin-top: 0.4rem; font-size: var(--text-sm); line-height: 1.6; color: var(--text-2); }

/* ---------- Бренды: две бегущие ленты навстречу друг другу ---------- */
.brands { margin-top: clamp(3.5rem, 2.5rem + 3vw, 5.5rem); }
.brands__caption {
  margin-bottom: 1.4rem;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-3);
}
.brands__rows { border-block: 1px solid var(--line-dark); }
.marquee {
  --brand-gap: clamp(2.75rem, 1.5rem + 3.5vw, 5rem);
  overflow: hidden;
  padding-block: 1.25rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.marquee + .marquee { border-top: 1px solid var(--line-dark); }
.marquee__track {
  display: flex;
  align-items: center;
  gap: var(--brand-gap);
  width: max-content;
}
/* Без JS ленты стоят на месте и переносятся по строкам */
.marquee:not(.is-ready) .marquee__track { flex-wrap: wrap; justify-content: center; width: auto; row-gap: 1.5rem; }
.marquee.is-ready .marquee__track { animation: marquee var(--marquee-dur, 45s) linear infinite; }
.marquee--reverse.is-ready .marquee__track { animation-direction: reverse; }
.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-1 * var(--marquee-shift, 50%))); } }

.brand { flex: none; display: grid; place-items: center; height: 48px; }
.brand img {
  width: auto;
  max-width: none;
  height: calc(var(--h) * 1px * var(--logo-scale, 1));
  filter: brightness(0) invert(1);   /* любой логотип — светлый силуэт */
  opacity: 0.55;
  transition: opacity var(--dur-fast) ease, transform var(--dur) var(--ease-spring);
}
.brand:hover img { opacity: 1; transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  .marquee.is-ready .marquee__track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; row-gap: 1.5rem; }
  .marquee [data-clone] { display: none; }
}

/* ---------- Процесс ---------- */
.process__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.step {
  position: relative;
  padding: 1.6rem 1.4rem 1.7rem;
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--shadow-light);
}
/* Золотая стрелка-указатель между шагами: порядок здесь важен */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 2.35rem;
  right: -0.82rem;
  z-index: 1;
  width: 0.62rem;
  height: 0.85rem;
  background: var(--gold);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.step__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.step__num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.step__badge {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--black);
  color: var(--gold);
}
.step__badge svg { width: 22px; height: 22px; }
.step h3 { font-size: 1.1rem; }
.step p { margin-top: 0.45rem; font-size: var(--text-sm); line-height: 1.6; color: var(--ink-2); }

/* ---------- Компания ---------- */
.company { overflow: hidden; }
/* Крупный фрагмент знака тоном, как на слайдах «Фирменная айдентика» */
.company::before {
  content: "";
  position: absolute;
  right: -16%;
  bottom: -22%;
  width: min(82vw, 1040px);
  aspect-ratio: 368.11 / 240;
  background: #101010;
  -webkit-mask: url("../img/mark.svg") center / contain no-repeat;
  mask: url("../img/mark.svg") center / contain no-repeat;
  pointer-events: none;
}
.company__layout {
  position: relative;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 6rem);
  align-items: start;
}
.advantages { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.advantage {
  padding: 1.6rem 1.5rem 1.7rem;
  border: 1px solid var(--line-dark);
  border-radius: var(--r-lg);
  background: rgba(17, 17, 17, 0.88);
  box-shadow: var(--shadow-2);
}
.advantage__check {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  margin-bottom: 1.1rem;
  border-radius: 50%;
  background: var(--gold);
  color: var(--black);
}
.advantage__check svg { width: 18px; height: 18px; }
.advantage h3 { font-size: 1.1rem; }
.advantage p { margin-top: 0.45rem; font-size: var(--text-sm); line-height: 1.6; color: var(--text-2); }

/* ---------- Заявка: золотая карточка с чёрной формой, как бейдж из брендбука ---------- */
.cta__panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr minmax(0, 30rem);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
  padding: clamp(1.75rem, 1rem + 3.5vw, 4.5rem);
  border-radius: var(--r-xl);
  background: var(--gold);
  color: var(--black);
}
.cta__panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -10%;
  bottom: -42%;
  width: 64%;
  aspect-ratio: 368.11 / 240;
  background: var(--gold-deep);
  -webkit-mask: url("../img/mark.svg") center / contain no-repeat;
  mask: url("../img/mark.svg") center / contain no-repeat;
}
.cta .eyebrow { color: var(--black); }
.cta .eyebrow__mark { fill: var(--black); }
.cta__title {
  margin-top: 1.1rem;
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: var(--tracking-tight);
}
.cta__text { margin-top: 1rem; max-width: 30rem; font-size: var(--text-lg); color: rgba(0, 0, 0, 0.72); }
.cta__contacts { display: grid; gap: 0.55rem; margin-top: 2rem; }
.cta__contacts a { display: inline-flex; align-items: center; gap: 0.7rem; width: fit-content; font-weight: 600; }
.cta__contacts a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cta__contacts a:active { opacity: 0.7; }
.cta__contacts svg { flex: none; width: 18px; height: 18px; }
.cta :focus-visible { outline-color: var(--black); }
.cta .form-card :focus-visible { outline-color: var(--gold); }

.form-card {
  position: relative;
  padding: clamp(1.5rem, 1rem + 2vw, 2.4rem);
  border-radius: var(--r-lg);
  background: var(--black);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), 0 40px 70px -30px rgba(0, 0, 0, 0.65);
}
.form-card h3 { font-size: var(--text-2xl); font-weight: 800; }
.form-card__sub { margin-top: 0.4rem; font-size: var(--text-sm); color: var(--text-2); }

.form { display: grid; gap: 1rem; margin-top: 1.6rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: var(--text-sm); font-weight: 500; color: var(--text-2); }
.req { color: var(--gold); }
.field input {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line-dark-strong);
  border-radius: var(--r-md);
  background: var(--surface-1);
  color: var(--white);
  font-size: 1rem;
}
.field input::placeholder { color: var(--text-3); }
.field input:hover { border-color: rgba(255, 255, 255, 0.32); }
.field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(236, 194, 93, 0.22); }
.field input.is-invalid { border-color: var(--error); }
.field__error { display: none; font-size: var(--text-xs); color: var(--error); }
.field input.is-invalid + .field__error { display: block; }

.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.consent { display: flex; gap: 0.7rem; align-items: flex-start; font-size: var(--text-sm); line-height: 1.5; color: var(--text-2); cursor: pointer; }
.consent input { flex: none; width: 18px; height: 18px; margin-top: 0.15rem; accent-color: var(--gold); }
.consent a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.consent-error { margin-top: -0.5rem; }
.consent-error.is-visible { display: block; }

.form__note { font-size: var(--text-xs); color: var(--text-3); text-align: center; }
.form-status { display: none; padding: 0.8rem 1rem; border-radius: var(--r-md); font-size: var(--text-sm); }
.form-status.is-visible { display: block; }
.form-status--err { border: 1px solid rgba(255, 138, 120, 0.3); background: rgba(255, 138, 120, 0.1); color: var(--error); }
.form-status--ok { background: rgba(236, 194, 93, 0.1); color: var(--gold); }

.form-success { display: none; padding: 2rem 0 1rem; text-align: center; }
.form-success.is-visible { display: block; }
.form-success__icon {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  background: var(--gold);
  color: var(--black);
}
.form-success__icon svg { width: 30px; height: 30px; }
.form-success h3 { font-size: var(--text-2xl); }
.form-success p { margin-top: 0.4rem; color: var(--text-2); }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .hero__stage { flex-direction: column; align-items: stretch; min-height: 0; }
  .hero__content { max-width: 40rem; }
  .hero__visual {
    position: relative;
    right: auto; bottom: auto;
    width: min(150%, 60rem);
    height: auto;
    margin: 0.5rem 0 0 calc((100% - min(150%, 60rem)) / 2);
    transform: none;
  }
  .hero__facts { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 1.25rem 1rem; }
  .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid rgba(0, 0, 0, 0.16); }

  .services__list { grid-template-columns: repeat(2, 1fr); gap: 2.25rem 2rem; }
  .service, .service:first-child { padding: 0; border-left: 0; }

  .solutions__grid, .projects__grid { grid-template-columns: repeat(2, 1fr); }
  .equipment__layout, .company__layout { grid-template-columns: 1fr; }
  .process__grid { grid-template-columns: repeat(3, 1fr); }
  .step:not(:last-child)::after { display: none; }
  .cta__panel { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --logo-scale: 0.8; }
  /* «Профессиональные» — длинное слово: на 360 px оно должно влезать целиком */
  .hero__title { font-size: clamp(1.95rem, 1rem + 4.9vw, 2.35rem); }
  .hero__actions .btn { flex: 1 1 100%; }
  .services__list,
  .solutions__grid,
  .projects__grid,
  .equip-cats,
  .advantages,
  .process__grid { grid-template-columns: 1fr; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .filter { flex: none; }
  .cta__panel { border-radius: var(--r-lg); }
}
