/* ============================================================
   BETONGUARD · стройхимия и гидроизоляция
   Концепция: «Защитный слой» · глубокий графит-синий + safety orange
   ============================================================ */

:root {
  --bg: #070E1A;
  --bg-2: #0C1524;
  --surface: #101C30;
  --surface-2: #15243C;
  --line: rgba(148, 175, 210, 0.14);
  --ink: #E9EFF8;
  --muted: #94A5BC;
  --accent: #FF7A1A;
  --accent-2: #FFA149;
  --blue: #4DA8FF;
  --wa: #2BB741;
  --font-d: "Unbounded", system-ui, sans-serif;
  --font-t: "Manrope", system-ui, sans-serif;
  --header-h: 74px;
  --r: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-t);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 22px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

section[id], div[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

.container {
  width: min(1180px, 100% - 40px);
  margin-inline: auto;
}

/* тонкий grain поверх всего */
.grain {
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 2000;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  animation: grain 9s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

/* ============ Типографика ============ */
.h2 {
  font-family: var(--font-d);
  font-weight: 600;
  font-size: clamp(2.025rem, 4.2vw, 3.075rem);
  line-height: 1.16;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}
.h3 {
  font-family: var(--font-d);
  font-weight: 500;
  font-size: clamp(1.525rem, 2.4vw, 1.875rem);
  line-height: 1.25;
}
.overline {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.155rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.overline .tick {
  width: 26px; height: 2px; background: var(--accent);
  display: inline-block; border-radius: 2px;
  position: relative;
}
.overline .tick::after {
  content: ""; position: absolute; right: -6px; top: -2px;
  width: 6px; height: 6px; background: var(--accent);
  border-radius: 50%;
}
.section-sub { color: var(--muted); max-width: 560px; margin-bottom: 8px; }

.section { padding: clamp(70px, 10vw, 130px) 0; position: relative; }
.section--alt { background: var(--bg-2); }

/* диагональный «слой» между секциями */
.section--alt::before {
  content: ""; position: absolute; left: 0; right: 0; top: -38px; height: 40px;
  background: var(--bg-2);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  pointer-events: none;
}
.section--alt::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -38px; height: 40px;
  background: var(--bg-2);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  pointer-events: none;
}

/* ============ Кнопки ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-t); font-weight: 800; font-size: 1.325rem;
  padding: 15px 28px; border-radius: 14px;
  border: none; cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s;
  will-change: transform;
  position: relative; overflow: hidden;
}
.btn svg { width: 18px; height: 18px; }
.btn--accent {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #16100A;
  box-shadow: 0 10px 34px rgba(255, 122, 26, 0.32);
}
.btn--accent:hover { box-shadow: 0 14px 44px rgba(255, 122, 26, 0.48); }
.btn--wa {
  background: var(--wa); color: #fff;
  box-shadow: 0 10px 34px rgba(43, 183, 65, 0.34);
}
.btn--wa:hover { box-shadow: 0 14px 44px rgba(43, 183, 65, 0.5); }
.btn--accent::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.5) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}
.btn--accent:hover::after { transform: translateX(120%); }
.btn--ghost {
  background: rgba(233, 239, 248, 0.06);
  color: var(--ink);
  border: 1px solid rgba(233, 239, 248, 0.2);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: rgba(233, 239, 248, 0.12); }
.btn--wa { background: var(--wa); color: #fff; padding: 10px 18px; border-radius: 11px; font-size: 1.255rem; }
.btn--wa:hover { background: #26a33a; }
.btn--full { width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; color: var(--accent); font-size: 1.325rem;
  margin-top: 20px;
}
.link-arrow svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.link-arrow:hover svg { transform: translateX(6px); }

/* ============ Header ============ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  transition: background 0.35s, box-shadow 0.35s, transform 0.4s var(--ease);
}
.header.scrolled {
  background: rgba(7, 14, 26, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.header__inner {
  width: min(1440px, 100% - 48px);
  margin-inline: auto;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo__mark { width: 34px; height: 34px; color: var(--ink); flex: none; }
.logo__text {
  font-family: var(--font-d); font-weight: 700; font-size: 1.425rem;
  letter-spacing: 0.04em;
}
.logo__text em { font-style: normal; color: var(--accent); }

.nav { display: flex; align-items: center; gap: 15px; }
.nav a:not(.nav__cta) {
  font-weight: 600; font-size: 1.0rem; color: var(--muted);
  transition: color 0.25s; position: relative; white-space: nowrap;
}
.nav a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 100%; height: 2px; background: var(--accent); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav a:not(.nav__cta):hover { color: var(--ink); }
.nav a:not(.nav__cta):hover::after { transform: scaleX(1); }

.burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 10px; z-index: 1001;
}
.burger span {
  width: 26px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.25s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Hero ============ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  padding-top: var(--header-h);
}
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img {
  width: 100%; height: 112%; object-fit: cover; object-position: center 30%;
  will-change: transform;
}
.hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 14, 26, 0.5), rgba(7, 14, 26, 0.5)),
    linear-gradient(100deg, rgba(7, 14, 26, 0.96) 8%, rgba(7, 14, 26, 0.8) 46%, rgba(9, 18, 34, 0.62) 100%),
    linear-gradient(to top, var(--bg) 2%, transparent 34%);
}
.hero__content { padding: 28px 0 0; }
.hero__overline {
  display: flex; align-items: center; gap: 10px;
  color: var(--accent); font-weight: 800; font-size: 1.175rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  margin-bottom: 22px;
}
.hero__overline .tick { width: 26px; height: 2px; background: var(--accent); border-radius: 2px; }
.hero__title {
  font-family: var(--font-d); font-weight: 700;
  font-size: clamp(2.375rem, 6.4vw, 4.675rem);
  line-height: 1.08; letter-spacing: -0.01em;
  margin-bottom: 24px;
}
.hero__title em { font-style: normal; color: var(--accent); }
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line span {
  display: block;
  transform: translateY(110%);
  animation: rise 1s var(--ease) forwards;
}
.hero__title .line:nth-child(2) span { animation-delay: 0.14s; }
@keyframes rise { to { transform: translateY(0); } }

.hero__sub {
  max-width: 540px; color: #C4D1E2; font-size: 1.435rem;
  margin-bottom: 26px;
}
.hero__sub strong { color: var(--ink); }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.hero__facts {
  display: flex; gap: clamp(24px, 5vw, 56px); list-style: none; flex-wrap: wrap;
}
.hero__facts li { display: flex; flex-direction: column; }
.hero__facts b {
  font-family: var(--font-d); font-weight: 600;
  font-size: clamp(1.775rem, 3vw, 2.375rem); color: var(--accent);
}
.hero__facts span { color: var(--muted); font-size: 1.225rem; max-width: 150px; line-height: 1.4; }

/* плавающий индикатор прокрутки вниз — fixed по центру снизу (как tel/wa кнопки) */
.hero__scroll {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  width: 54px; height: 54px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.42);
  background: rgba(7, 14, 26, 0.6); backdrop-filter: blur(6px);
  color: #fff; z-index: 800;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
  animation: heroScrollIn 0.7s 1s var(--ease) both, heroBounce 1.9s 1.8s var(--ease) infinite;
  transition: opacity 0.4s var(--ease), visibility 0.4s, border-color 0.25s, color 0.25s;
}
.hero__scroll svg { width: 24px; height: 24px; }
.hero__scroll:hover { border-color: var(--accent); color: var(--accent); }
.hero__scroll.is-hidden {
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translate(-50%, 18px); animation: none;
}
@keyframes heroBounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 7px); }
}
@keyframes heroScrollIn {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__scroll { animation: heroScrollIn 0.5s both; }
}

/* бегущая лента */
.marquee {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--accent);
  transform: rotate(-1.2deg) scale(1.02);
  transform-origin: center;
  overflow: hidden;
  padding: 12px 0;
  z-index: 5;
}
.marquee__track {
  display: flex; align-items: center; gap: 28px;
  width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee span {
  font-family: var(--font-d); font-weight: 600; font-size: 1.235rem;
  color: #17100A; text-transform: uppercase; letter-spacing: 0.06em;
  white-space: nowrap;
}
.marquee i {
  width: 7px; height: 7px; background: #17100A; border-radius: 50%;
  flex: none; opacity: 0.75;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ Reveal-анимации ============ */
.rv, .rv-card, .rv-img {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.rv-img {
  transform: none;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.1s var(--ease), opacity 0.6s;
}
.in.rv, .in.rv-card { opacity: 1; transform: translateY(0); }
.in.rv-img { opacity: 1; clip-path: inset(0 0 0 0); }
.hero .rv { animation: heroFade 1s 0.35s var(--ease) forwards; transform: translateY(18px); }
@keyframes heroFade { to { opacity: 1; transform: translateY(0); } }

/* каскад для карточек */
.rv-card { transition-delay: calc(var(--d, 0) * 90ms); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv, .rv-card, .rv-img { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  html { scroll-behavior: auto; }
}

/* ============ О компании ============ */
.about__grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(30px, 5vw, 70px); align-items: center;
}
.about__text p:not(.overline) { color: var(--muted); margin-bottom: 16px; max-width: 520px; }
.about__text strong { color: var(--ink); }
.about__stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px; margin-top: 34px;
  border-top: 1px solid var(--line); padding-top: 28px;
}
.stat b {
  font-family: var(--font-d); font-weight: 600;
  font-size: clamp(1.675rem, 2.6vw, 2.275rem);
  color: var(--accent); display: block; margin-bottom: 4px;
}
.stat span { color: var(--muted); font-size: 1.195rem; line-height: 1.45; display: block; }

.about__media { position: relative; border-radius: var(--r); overflow: hidden; }
.about__media img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; }
.about__media figcaption {
  position: absolute; left: 16px; bottom: 16px;
  display: flex; align-items: center; gap: 10px;
  background: rgba(7, 14, 26, 0.72); backdrop-filter: blur(10px);
  padding: 12px 18px; border-radius: 12px;
  font-weight: 700; font-size: 1.225rem;
  border: 1px solid rgba(233, 239, 248, 0.1);
}
.about__media .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex: none;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 122, 26, 0.5); }
  50% { box-shadow: 0 0 0 7px rgba(255, 122, 26, 0); }
}

/* ============ Направления ============ */
.dirs__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 24px; margin-top: 44px;
}
.dir {
  position: relative; border-radius: var(--r);
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 480px;
  transition: transform 0.45s var(--ease), border-color 0.4s, box-shadow 0.45s var(--ease);
}
.dir:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 122, 26, 0.35);
  box-shadow: 0 26px 60px rgba(3, 8, 18, 0.6);
}
.dir__body { padding: clamp(26px, 4vw, 42px); position: relative; z-index: 2; }
.dir__brand {
  display: inline-block;
  font-family: var(--font-d); font-weight: 700; font-size: 1.175rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  border: 1px solid rgba(255, 122, 26, 0.4);
  padding: 6px 14px; border-radius: 100px;
  margin-bottom: 18px;
}
.dir__brand--m { color: var(--blue); border-color: rgba(77, 168, 255, 0.4); }
.dir__body > p { color: var(--muted); margin-top: 10px; max-width: 420px; }
.dir__list { list-style: none; margin-top: 18px; display: grid; gap: 8px; }
.dir__list li {
  position: relative; padding-left: 22px;
  color: #C3D0E2; font-size: 1.325rem; font-weight: 500;
}
.dir__list li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 10px; height: 3px; border-radius: 2px;
  background: var(--accent);
}
.dir--monohim .dir__list li::before { background: var(--blue); }

.dir__visual { position: absolute; right: -60px; bottom: -55px; width: 300px; z-index: 1; pointer-events: none; }
.dir__visual img {
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.5));
  transition: transform 0.6s var(--ease);
  transform: rotate(-4deg);
}
.dir:hover .dir__visual img { transform: rotate(0deg) translateY(-10px); }
.dir__visual--photo {
  position: absolute; inset: auto 0 0 0; width: auto; height: 46%;
  mask-image: linear-gradient(to top, black 55%, transparent);
  -webkit-mask-image: linear-gradient(to top, black 55%, transparent);
  opacity: 0.6;
}
.dir__visual--photo img { width: 100%; height: 100%; object-fit: cover; transform: none; filter: saturate(0.85); }
.dir--monohim:hover .dir__visual--photo img { transform: scale(1.04); }
.dir--monohim { justify-content: flex-start; }

/* ============ Продукция / карусель ============ */
.products .container:first-child { margin-bottom: 10px; }
.carousel { position: relative; margin-top: 34px; }
.carousel__track {
  display: flex; gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 20px max(calc((100vw - 1180px) / 2), 20px) 30px;
  scrollbar-width: none;
  cursor: grab;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track.dragging { cursor: grabbing; scroll-snap-type: none; }
.pcard {
  flex: 0 0 268px;
  scroll-snap-align: start;
  background: linear-gradient(165deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 22px 26px;
  position: relative;
  transition: transform 0.4s var(--ease), border-color 0.35s;
}
.pcard:hover { transform: translateY(-8px); border-color: rgba(255, 122, 26, 0.4); }
.pcard__img {
  height: 200px; display: flex; align-items: center; justify-content: center;
  margin-top: 8px; margin-bottom: 14px; padding-top: 26px;
  background:
    radial-gradient(80% 60% at 50% 55%, rgba(255, 122, 26, 0.14), transparent 70%);
}
.pcard__img img {
  max-height: 180px; width: auto;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.45));
  transition: transform 0.45s var(--ease);
}
.pcard:hover .pcard__img img { transform: translateY(-8px) scale(1.03); }
.pcard__tag {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 3;
  white-space: nowrap;
  font-size: 1.055rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent);
  background: rgba(9, 16, 28, 0.92);
  border: 1px solid rgba(255, 122, 26, 0.45);
  padding: 5px 11px; border-radius: 100px;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.pcard h3 { font-family: var(--font-d); font-weight: 500; font-size: 1.395rem; margin-bottom: 8px; }
.pcard p { color: var(--muted); font-size: 1.235rem; line-height: 1.55; }

.carousel__nav { display: flex; gap: 12px; }
.cbtn {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.cbtn:hover { background: var(--accent); border-color: var(--accent); color: #17100A; transform: scale(1.06); }
.cbtn svg { width: 20px; height: 20px; }

/* МОНОХИМ категории */
.chem { margin-top: clamp(60px, 8vw, 100px); }
.chem__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px; margin-top: 36px;
}
.chip {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 20px 92px;
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.3s, background 0.3s;
}
.chip:hover { transform: translateY(-4px); border-color: rgba(77, 168, 255, 0.4); background: var(--surface-2); }
.chip i {
  position: absolute; left: 16px; top: 22px; width: 60px;
  font-family: var(--font-d); font-style: normal; font-weight: 700;
  font-size: 2rem; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(77, 168, 255, 0.55);
}
.chip b { display: block; font-size: 1.355rem; font-weight: 800; margin-bottom: 3px; }
.chip span { color: var(--muted); font-size: 1.195rem; line-height: 1.45; }

/* ============ Применение ============ */
.apply__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 210px;
  gap: 18px; margin-top: 44px;
}
.acard {
  position: relative; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line);
  display: flex; align-items: flex-end;
  isolation: isolate;
}
.acard--tall { grid-row: span 2; }
.acard img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -1;
  transition: transform 0.7s var(--ease), filter 0.5s;
  filter: saturate(0.8) brightness(0.82);
}
.acard:hover img { transform: scale(1.06); filter: saturate(1) brightness(0.95); }
.acard::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(to top, rgba(5, 10, 20, 0.92) 8%, rgba(5, 10, 20, 0.25) 55%, transparent);
  transition: opacity 0.4s;
}
.acard__label { position: relative; z-index: 1; padding: 20px 22px; }
.acard__label b {
  display: block; font-family: var(--font-d); font-weight: 500;
  font-size: 1.395rem; margin-bottom: 4px;
}
.acard__label span { color: #AEBDD2; font-size: 1.195rem; line-height: 1.4; display: block; }
.acard--wide { grid-column: span 2; }
.acard--hazard {
  background:
    repeating-linear-gradient(-45deg, rgba(255, 122, 26, 0.08) 0 16px, transparent 16px 32px),
    linear-gradient(160deg, var(--surface), var(--bg));
  flex-direction: column; align-items: flex-start; justify-content: space-between;
}
.acard--hazard::after { display: none; }
.acard__ic { width: 44px; height: 44px; color: var(--accent); margin: 22px 0 0 22px; }

/* ============ Объекты ============ */
.works__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-top: 44px;
}
.wcard {
  position: relative; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
}
.wcard--w2 { grid-column: span 1; aspect-ratio: 4 / 3; }
.wcard img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease);
  filter: saturate(0.9);
}
.wcard:hover img { transform: scale(1.05); }
.wcard figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 34px 18px 14px;
  background: linear-gradient(to top, rgba(5, 10, 20, 0.9), transparent);
  font-weight: 800; font-size: 1.275rem; line-height: 1.3;
}
.wcard figcaption span {
  display: block; color: var(--accent); font-weight: 700;
  font-size: 1.115rem; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 3px;
}

/* ============ Преимущества (bento) ============ */
.why__bento {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px; margin-top: 44px;
}
.bcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(24px, 3vw, 34px);
  position: relative; overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.3s;
}
.bcard:hover { transform: translateY(-5px); border-color: rgba(255, 122, 26, 0.32); }
.bcard--big { grid-column: span 2; }
.bcard__num {
  font-family: var(--font-d); font-weight: 700; font-size: 2.775rem;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255, 122, 26, 0.5);
  display: block; margin-bottom: 14px; line-height: 1;
}
.bcard h3 { font-family: var(--font-d); font-weight: 500; font-size: 1.475rem; margin-bottom: 10px; }
.bcard p { color: var(--muted); font-size: 1.295rem; }
.bcard--accent {
  background: linear-gradient(140deg, rgba(255, 122, 26, 0.16), rgba(255, 122, 26, 0.05));
  border-color: rgba(255, 122, 26, 0.35);
}
.bcard__year {
  font-family: var(--font-d); font-weight: 700;
  font-size: clamp(2.075rem, 3vw, 2.675rem); color: var(--accent);
  display: block; margin-bottom: 10px; line-height: 1.1;
}
.bcard--accent p { color: #D8C9BC; }

/* ============ Партнёрам ============ */
.partners { position: relative; overflow: hidden; }
.partners__bg { position: absolute; inset: 0; z-index: 0; }
.partners__bg img { width: 100%; height: 100%; object-fit: cover; }
.partners__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(95deg, rgba(7, 14, 26, 0.96) 20%, rgba(7, 14, 26, 0.78) 60%, rgba(7, 14, 26, 0.55));
}
.partners__inner { position: relative; z-index: 1; max-width: 660px; margin-left: 0; }
.partners .container { position: relative; }
.overline--light { color: var(--accent); }
.partners__list { list-style: none; margin: 22px 0 30px; display: grid; gap: 12px; }
.partners__list li {
  position: relative; padding-left: 30px; color: #C9D6E6; font-weight: 500;
}
.partners__list li::before {
  content: ""; position: absolute; left: 0; top: 5px;
  width: 16px; height: 16px; border-radius: 5px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  clip-path: polygon(20% 45%, 40% 65%, 80% 20%, 92% 32%, 40% 88%, 8% 57%);
}

/* ============ Контакты ============ */
.contacts__grid {
  display: grid; grid-template-columns: 1fr 0.9fr;
  gap: clamp(30px, 5vw, 70px); align-items: start;
}
.contacts__info > p:not(.overline) { color: var(--muted); max-width: 460px; }
.contacts__list { list-style: none; margin-top: 30px; display: grid; gap: 16px; }
.contacts__list li { display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: 1.395rem; }
.contacts__list a { transition: color 0.25s; }
.contacts__list a:hover { color: var(--accent); }
.contacts__ic {
  width: 44px; height: 44px; flex: none;
  border-radius: 12px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--accent);
}
.contacts__ic svg { width: 20px; height: 20px; }

.cform {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(24px, 3.4vw, 38px);
}
.cform .h3 { margin-bottom: 6px; }
.cform__hint { color: var(--muted); font-size: 1.255rem; margin-bottom: 22px; }
.cform label { display: block; margin-bottom: 16px; }
.cform label span {
  display: block; font-size: 1.175rem; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 7px;
}
.cform input, .cform textarea {
  width: 100%;
  background: rgba(7, 14, 26, 0.6);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--font-t); font-size: 1.375rem;
  padding: 14px 16px;
  transition: border-color 0.25s, box-shadow 0.25s;
  resize: vertical;
}
.cform input:focus, .cform textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.18);
}
.cform input.err, .cform textarea.err { border-color: #E5484D; }
.cform button { margin-top: 6px; }
.cform__done {
  margin-top: 16px; padding: 14px 16px;
  background: rgba(43, 183, 65, 0.12);
  border: 1px solid rgba(43, 183, 65, 0.35);
  border-radius: 12px;
  font-size: 1.275rem; color: #B9E8C0;
}
.cform__done a { color: #6FDD84; font-weight: 800; }

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--line);
  padding: 46px 0 60px;
  background: #050B14;
}
.footer__inner { display: grid; gap: 14px; justify-items: start; }
.logo--footer .logo__mark { width: 30px; height: 30px; }
.footer__brands { color: var(--muted); font-size: 1.275rem; font-weight: 600; }
.footer__legal { color: #5E7089; font-size: 1.195rem; line-height: 1.7; }

/* плавающая WhatsApp-кнопка */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 800;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(43, 183, 65, 0.4);
  transition: transform 0.3s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

/* плавающая кнопка звонка (слева снизу) */
.tel-float {
  position: fixed; left: 20px; bottom: 20px; z-index: 800;
  width: 58px; height: 58px; border-radius: 50%;
  background: #fff; color: #111;
  border: 2px solid #111;
  display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  transition: transform 0.3s var(--ease);
}
.tel-float:hover { transform: scale(1.08); }
.tel-float svg { width: 28px; height: 28px; }

/* ============ Мобильная версия ============ */
/* на планшетах/узких десктопах прячем полное меню в бургер, чтобы шапка не переполнялась */
@media (max-width: 1300px) {
  /* без backdrop-filter у шапки: иначе она создаёт containing block и overlay-меню
     (position:fixed) покрывает фоном только область шапки, а не весь экран */
  .header, .header.scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .header.scrolled { background: rgba(7, 14, 26, 0.95); }

  .nav {
    position: fixed; inset: 0;
    background: #070E1A;
    flex-direction: column; justify-content: center; gap: 10px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.35s;
    z-index: 1000;
  }
  .nav.open { opacity: 1; pointer-events: auto; }
  .nav a:not(.nav__cta) {
    font-family: var(--font-d); font-size: 1.625rem; font-weight: 500;
    color: var(--ink); padding: 10px;
    transform: translateY(14px); opacity: 0;
    transition: transform 0.4s var(--ease), opacity 0.4s;
  }
  .nav.open a:not(.nav__cta) { transform: translateY(0); opacity: 1; }
  .nav.open a:nth-child(1) { transition-delay: 0.05s; }
  .nav.open a:nth-child(2) { transition-delay: 0.1s; }
  .nav.open a:nth-child(3) { transition-delay: 0.15s; }
  .nav.open a:nth-child(4) { transition-delay: 0.2s; }
  .nav.open a:nth-child(5) { transition-delay: 0.25s; }
  .nav.open a:nth-child(6) { transition-delay: 0.3s; }
  .nav.open a:nth-child(7) { transition-delay: 0.35s; }
  .nav__cta { margin-top: 16px; transform: translateY(14px); opacity: 0; transition: transform 0.4s var(--ease) 0.4s, opacity 0.4s 0.4s; }
  .nav.open .nav__cta { transform: translateY(0); opacity: 1; }
  .burger { display: flex; }
}

@media (max-width: 980px) {
  .about__grid, .contacts__grid { grid-template-columns: 1fr; }
  .dirs__grid { grid-template-columns: 1fr; }
  .apply__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 190px; }
  .works__grid { grid-template-columns: repeat(2, 1fr); }
  .wcard--w2 { grid-column: span 1; aspect-ratio: 4 / 3; }
  .why__bento { grid-template-columns: 1fr 1fr; }
  .bcard--big { grid-column: span 2; }
  .about__media img { min-height: 300px; }
}

@media (max-width: 720px) {
  :root { --header-h: 64px; }

  /* на мобиле высота hero по контенту (без 100svh) — иначе на высоких экранах iPhone
     остаётся большой пустой промежуток сверху; контент идёт сразу под шапкой */
  .hero { min-height: auto; justify-content: flex-start; }
  .hero__scroll { width: 50px; height: 50px; }

  .nav {
    position: fixed; inset: 0;
    background: rgba(7, 14, 26, 0.97);
    backdrop-filter: blur(16px);
    flex-direction: column; justify-content: center; gap: 8px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.35s;
    z-index: 1000;
  }
  .nav.open { opacity: 1; pointer-events: auto; }
  .nav a:not(.nav__cta) {
    font-family: var(--font-d); font-size: 1.625rem; font-weight: 500;
    color: var(--ink); padding: 10px;
    transform: translateY(14px); opacity: 0;
    transition: transform 0.4s var(--ease), opacity 0.4s;
  }
  .nav.open a:not(.nav__cta) { transform: translateY(0); opacity: 1; }
  .nav.open a:nth-child(1) { transition-delay: 0.05s; }
  .nav.open a:nth-child(2) { transition-delay: 0.1s; }
  .nav.open a:nth-child(3) { transition-delay: 0.15s; }
  .nav.open a:nth-child(4) { transition-delay: 0.2s; }
  .nav.open a:nth-child(5) { transition-delay: 0.25s; }
  .nav.open a:nth-child(6) { transition-delay: 0.3s; }
  .nav.open a:nth-child(7) { transition-delay: 0.35s; }
  .nav__cta { margin-top: 16px; transform: translateY(14px); opacity: 0; transition: transform 0.4s var(--ease) 0.4s, opacity 0.4s 0.4s; }
  .nav.open .nav__cta { transform: translateY(0); opacity: 1; }
  .burger { display: flex; }

  .container { width: min(1180px, 100% - 32px); }
  .hero__content { padding: 30px 0 60px; }
  .hero__facts {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px; column-gap: 14px;
  }
  .hero__facts li { min-width: 0; }
  .hero__facts b { font-size: 1.7rem; }
  .hero__facts span {
    max-width: none; font-size: 0.98rem; line-height: 1.32;
    overflow-wrap: break-word; hyphens: auto;
  }
  .marquee { padding: 10px 0; transform: rotate(0deg); }
  .marquee span { font-size: 1.115rem; }

  .section { padding: 64px 0; }
  .section--alt::before, .section--alt::after { height: 22px; top: -20px; }
  .section--alt::after { top: auto; bottom: -20px; }

  .about__stats { grid-template-columns: 1fr 1fr; gap: 16px; }
  .about__stats .stat:first-child { grid-column: span 2; }

  .dir { min-height: 0; padding-bottom: 120px; }
  .dir__visual { width: 220px; right: -30px; bottom: -20px; }
  .dir--monohim { padding-bottom: 150px; }

  .carousel__track { padding: 16px 16px 24px; }
  .pcard { flex-basis: 240px; }
  .carousel__nav { padding: 0; justify-content: center; }

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

  .apply__grid { grid-template-columns: 1fr; grid-auto-rows: 200px; }
  .acard--tall { grid-row: span 1; }
  .acard--wide { grid-column: span 1; }

  .works__grid { grid-template-columns: 1fr; }
  .wcard--w2 { grid-column: span 1; aspect-ratio: 16 / 9; }

  .why__bento { grid-template-columns: 1fr; }
  .bcard--big { grid-column: span 1; }

  .partners__inner { max-width: none; }
  .partners__bg img { object-position: 70% center; }

  .wa-float { width: 52px; height: 52px; right: 16px; bottom: 16px; }
  .wa-float svg { width: 26px; height: 26px; }
  .tel-float { width: 52px; height: 52px; left: 16px; bottom: 16px; }
  .tel-float svg { width: 25px; height: 25px; }
}

@media (max-width: 380px) {
  .hero__title { font-size: 2.175rem; }
  .btn { padding: 14px 20px; font-size: 1.255rem; }
}


/* Каталог: карточки продуктов с фото */
.pgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}
.pchip{display:flex;gap:14px;align-items:center;padding:14px 16px;background:var(--surface);border:1px solid var(--line);border-radius:16px;transition:border-color .3s,transform .3s}
.pchip:hover{border-color:rgba(255,122,26,.4);transform:translateY(-3px)}
.pchip__img{flex:0 0 68px;width:68px;height:68px;border-radius:12px;background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden}
.pchip__img img{width:100%;height:100%;object-fit:contain}
.pchip__img--ph{background:linear-gradient(155deg,#1a2536,#0b1220);color:var(--accent);font-weight:800;font-size: 1.095rem}
.pchip__body{display:flex;flex-direction:column;gap:3px;min-width:0}
.pchip__body b{color:#fff;font-size: 1.325rem}
.pchip__body span{color:var(--muted);font-size: 1.195rem;line-height:1.45}

/* Каталог-индекс: карточка категории с миниатюрой */
.chip--img{display:flex;gap:14px;align-items:center}
.chip--img .chip__img{flex:0 0 60px;width:60px;height:60px;border-radius:12px;background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden}
.chip--img .chip__img img{width:100%;height:100%;object-fit:contain}
.chip--img .chip__txt{display:flex;flex-direction:column;gap:3px;min-width:0}
