/* ===========================================================
   ГК Алтекс — стили сайта
   Палитра из брендбука: slate (опорный), terracotta (акцент),
   paper (тёплый фон). Без чистого белого, без неонов.
   =========================================================== */

:root {
  /* Slate — опорный INK, поверхности, текст */
  --slate-950: #0F1B27;
  --slate-900: #18283A;
  --slate-700: #2C4258;
  --slate-500: #56708A;
  --slate-300: #A6B7C5;
  --slate-100: #E3E9EF;

  /* Terracotta — акцент: CTA, ссылки, hover, badges */
  --terracotta-800: #8A3C20;
  --terracotta-700: #A8492A;
  --terracotta-600: #C25E3A;
  --terracotta-500: #D27148;
  --terracotta-400: #E08A66;
  --terracotta-100: #FAE5D8;

  /* Paper — фон: поверхности, карточки */
  --paper-white: #FFFFFF;
  --paper-off: #FBF8F2;
  --paper: #F6F1E8;
  --paper-warm: #ECE3D2;
  --amber-500: #E8A04A;
  --amber-700: #B07526;

  /* Системные статусы (тёплые) */
  --success-500: #5E7A3A;
  --warning-500: #D29A2E;
  --danger-500:  #C25542;
  --info-500:    #4978A2;

  /* Семантические алиасы (имена не меняем — чтобы не править HTML/JS) */
  --bg: var(--slate-950);
  --bg-2: var(--slate-900);
  --bg-3: var(--slate-700);
  --surface: var(--paper-off);
  --surface-soft: var(--paper);
  --surface-muted: var(--paper-warm);
  --text: var(--slate-900);
  --text-soft: var(--slate-500);
  --text-mute: var(--slate-500);
  --text-invert: var(--paper-off);
  --border: rgba(15, 27, 39, 0.08);
  --border-strong: rgba(15, 27, 39, 0.16);
  --accent: var(--terracotta-600);
  --accent-2: var(--amber-500);
  --accent-soft: rgba(194, 94, 58, 0.12);
  --accent-deep: var(--terracotta-800);
  --success: var(--success-500);

  --shadow-sm: 0 2px 6px rgba(15,27,39,.06);
  --shadow-md: 0 10px 30px -10px rgba(15,27,39,.22);
  --shadow-lg: 0 30px 60px -20px rgba(15,27,39,.40);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --container: 1240px;

  --ease-out: cubic-bezier(.16,.84,.32,1);
  --ease-in: cubic-bezier(.42, 0, .58, 1);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s var(--ease-out); }
a:hover { color: var(--accent); }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.4rem); letter-spacing: -0.015em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

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

.section {
  padding: clamp(60px, 8vw, 120px) 0;
  position: relative;
}

.section--dark { background: var(--bg); color: var(--text-invert); }
.section--soft { background: var(--surface-soft); }

.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section__eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--accent);
}

.section__title { max-width: 820px; margin-bottom: 16px; }
.section__lead { max-width: 720px; color: var(--text-soft); font-size: 1.075rem; }
.section--dark .section__lead { color: rgba(255,255,255,0.7); }

/* ===========================================================
   HEADER / NAV
   =========================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(15, 27, 39, 0.85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  color: var(--text-invert);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background .25s var(--ease-out);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 1.12rem;
  color: var(--text-invert);
}

.brand:hover { color: var(--text-invert); }

.brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 6px 16px -4px rgba(194,94,58,.45);
}

.brand__mark::before, .brand__mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 47%, rgba(255,255,255,0.4) 50%, transparent 53%);
  border-radius: inherit;
}
.brand__mark::after {
  background: linear-gradient(-45deg, transparent 47%, rgba(0,0,0,0.18) 50%, transparent 53%);
}

.brand__title { display: flex; flex-direction: column; line-height: 1.1; }
.brand__title small { font-size: 0.7rem; font-weight: 500; color: rgba(255,255,255,0.55); letter-spacing: 0.04em; text-transform: uppercase; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }

.nav a {
  position: relative;
  padding: 10px 14px;
  font-size: 0.93rem;
  font-weight: 500;
  color: rgba(255,255,255,0.78);
  border-radius: 8px;
  transition: color .2s var(--ease-out), background-color .2s var(--ease-out);
}

.nav a:hover, .nav a.is-active {
  color: var(--text-invert);
  background: rgba(255,255,255,0.06);
}

.nav a.is-active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.site-header__phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-invert);
  padding-left: 16px;
  border-left: 1px solid rgba(255,255,255,0.1);
}

.site-header__phone:hover { color: var(--accent-2); }

.menu-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 10px; color: var(--text-invert); }
.menu-toggle:hover { background: rgba(255,255,255,0.08); }
.menu-toggle span { display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: transform .25s, background-color .15s; }
.menu-toggle span::before, .menu-toggle span::after { content: ''; position: absolute; left: 0; width: 22px; height: 2px; background: currentColor; transition: transform .25s; }
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }
.menu-toggle.is-open span { background: transparent; }
.menu-toggle.is-open span::before { top: 0; transform: rotate(45deg); }
.menu-toggle.is-open span::after { top: 0; transform: rotate(-45deg); }

/* ===========================================================
   BUTTONS
   =========================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  border-radius: 10px;
  transition: transform .15s var(--ease-out), box-shadow .2s var(--ease-out), background-color .2s var(--ease-out), color .2s var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  box-shadow: 0 12px 24px -8px rgba(194,94,58,0.45);
}
.btn--primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 36px -10px rgba(194,94,58,0.65); }
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--text-invert);
  border: 1px solid rgba(255,255,255,0.2);
}
.btn--ghost:hover { background: rgba(255,255,255,0.08); color: var(--text-invert); }

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn--outline:hover { background: var(--text); color: var(--text-invert); }

.btn--sm { padding: 10px 18px; font-size: 0.85rem; border-radius: 8px; }

.btn .arrow { transition: transform .25s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

/* ===========================================================
   HERO
   =========================================================== */

.hero {
  position: relative;
  color: var(--text-invert);
  background: var(--bg);
  padding: clamp(80px, 12vw, 160px) 0 clamp(80px, 10vw, 140px);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(232,160,74,0.18) 0%, transparent 45%),
    radial-gradient(circle at 88% 90%, rgba(194,94,58,0.12) 0%, transparent 50%),
    linear-gradient(160deg, var(--slate-950) 0%, var(--slate-900) 50%, var(--slate-950) 100%);
  z-index: 0;
}

.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
  animation: gridShift 60s linear infinite;
}

@keyframes gridShift {
  to { background-position: 48px 48px, 48px 48px; }
}

.hero__shape {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  filter: blur(2px);
}
.hero__shape--1 {
  top: -100px;
  right: -120px;
  width: 480px;
  height: 480px;
  background: conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(194,94,58,0.22) 90deg, transparent 180deg);
  border-radius: 50%;
  animation: spinSlow 26s linear infinite;
}
.hero__shape--2 {
  bottom: -180px;
  left: -120px;
  width: 380px;
  height: 380px;
  background: conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(232,160,74,0.16) 90deg, transparent 180deg);
  border-radius: 50%;
  animation: spinSlow 36s linear infinite reverse;
}

@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 60px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 100px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 22px;
}
.hero__badge::before {
  content: '20+';
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: -0.01em;
}

.hero__title {
  font-size: clamp(2.4rem, 5vw + 1rem, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 22px;
  color: #fff;
}

.hero__title span {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__lead {
  color: rgba(255,255,255,0.75);
  font-size: 1.12rem;
  margin-bottom: 36px;
  max-width: 520px;
}

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

.hero__stats {
  display: flex;
  gap: 40px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.hero__stat strong {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1;
}
.hero__stat span { color: rgba(255,255,255,0.5); font-size: 0.85rem; }

/* hero illustration */
.hero__visual {
  position: relative;
  height: 460px;
}
.hero__card {
  position: absolute;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 22px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
  animation: floatY 6s ease-in-out infinite;
}
.hero__card--1 { top: 0; left: 0; width: 240px; animation-delay: 0s; }
.hero__card--2 { top: 110px; right: 0; width: 260px; animation-delay: -2s; }
.hero__card--3 { bottom: 0; left: 60px; width: 240px; animation-delay: -4s; }

.hero__card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  margin-bottom: 14px;
}
.hero__card h4 { color: #fff; margin: 0 0 4px; font-size: 1rem; }
.hero__card p { margin: 0; color: rgba(255,255,255,0.65); font-size: 0.85rem; line-height: 1.45; }

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.4);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.scroll-hint::after {
  content: '';
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(0.6); opacity: 0.3; transform-origin: top; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ===========================================================
   PAGE HEADER (внутренние страницы)
   =========================================================== */
.page-head {
  background: var(--bg);
  color: var(--text-invert);
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}
.page-head__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(circle at 75% 30%, rgba(194,94,58,0.18) 0%, transparent 50%),
    linear-gradient(140deg, var(--slate-950) 0%, var(--slate-700) 100%);
}
.page-head__inner { position: relative; z-index: 1; }
.page-head h1 { color: #fff; margin-bottom: 12px; }
.page-head__lead { color: rgba(255,255,255,0.7); max-width: 700px; font-size: 1.1rem; }
.crumbs { color: rgba(255,255,255,0.5); font-size: 0.85rem; margin-bottom: 18px; }
.crumbs a:hover { color: var(--accent-2); }
.crumbs span { margin: 0 8px; }

/* ===========================================================
   ADVANTAGES
   =========================================================== */

.advantages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.advantage {
  position: relative;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), border-color .2s;
  overflow: hidden;
}
.advantage::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s var(--ease-out);
  pointer-events: none;
}
.advantage:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent-soft); }
.advantage:hover::before { opacity: 1; }

.advantage__num {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}
.advantage h3 { margin-bottom: 6px; }
.advantage p { color: var(--text-soft); margin: 0; font-size: 0.93rem; }

/* ===========================================================
   SERVICES
   =========================================================== */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 40px;
}

.service-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .25s var(--ease-out), box-shadow .25s, border-color .2s;
}
.section--dark .service-card { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent-soft); }
.section--dark .service-card:hover { background: rgba(255,255,255,0.08); border-color: rgba(232,160,74,0.4); }

.service-card__icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.section--dark .service-card__icon { background: rgba(232,160,74,0.18); color: var(--accent-2); }

.service-card h4 { margin: 4px 0 6px; font-size: 1rem; }
.service-card p { margin: 0; font-size: 0.88rem; color: var(--text-soft); line-height: 1.5; }
.section--dark .service-card p { color: rgba(255,255,255,0.6); }

/* ===========================================================
   PRODUCT CARDS
   =========================================================== */

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.product {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s var(--ease-out), box-shadow .3s, border-color .25s;
  position: relative;
}
.product:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--accent-soft); }

.product__image {
  aspect-ratio: 4 / 3;
  background: var(--surface-muted);
  overflow: hidden;
  position: relative;
}
.product__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease-out);
}
.product:hover .product__image img { transform: scale(1.06); }

.product__brand {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(15,27,39,0.78);
  color: #fff;
  padding: 4px 10px;
  border-radius: 100px;
  backdrop-filter: blur(8px);
}

.product__body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.product__title { font-size: 1rem; font-weight: 600; margin: 0; line-height: 1.35; }
.product__title:hover { color: var(--accent); }
.product__short { font-size: 0.86rem; color: var(--text-soft); margin: 0; line-height: 1.5; flex: 1; }
.product__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 6px;
}
.product__link .arrow { transition: transform .2s; }
.product__link:hover .arrow { transform: translateX(4px); }

/* ===========================================================
   FEATURED CAROUSEL
   =========================================================== */

.featured {
  position: relative;
  margin-top: 40px;
}

.featured__track-wrap {
  overflow: hidden;
  padding: 4px;
  margin: 0 -4px;
}

.featured__track {
  display: flex;
  gap: 20px;
  transition: transform .55s var(--ease-out);
}

.featured__slide {
  flex: 0 0 calc((100% - 60px) / 4);
  min-width: 0;
}

.featured__controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 16px;
}

.featured__dots {
  display: flex;
  gap: 8px;
}
.featured__dots button {
  width: 28px;
  height: 4px;
  background: rgba(15,27,39,0.14);
  border-radius: 2px;
  transition: background-color .2s, width .2s var(--ease-out);
}
.featured__dots button.is-active {
  background: var(--accent);
  width: 42px;
}

.featured__buttons { display: flex; gap: 10px; }
.featured__btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  transition: background-color .2s, color .2s, border-color .2s, transform .15s;
}
.featured__btn:hover { background: var(--text); color: var(--text-invert); border-color: var(--text); }
.featured__btn:active { transform: scale(0.94); }
.featured__btn[disabled] { opacity: 0.35; pointer-events: none; }

/* ===========================================================
   CATEGORY GRID
   =========================================================== */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.cat-card {
  position: relative;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: block;
  overflow: hidden;
  transition: transform .25s var(--ease-out), border-color .25s, box-shadow .3s;
  isolation: isolate;
}
.cat-card::after {
  content: '';
  position: absolute;
  inset: auto -40px -40px auto;
  width: 140px; height: 140px;
  background: var(--accent-soft);
  border-radius: 50%;
  z-index: -1;
  transition: transform .4s var(--ease-out);
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent-soft); color: inherit; }
.cat-card:hover::after { transform: scale(3); }

.cat-card__icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  transition: transform .3s var(--ease-out);
}
.cat-card:hover .cat-card__icon { transform: rotate(-8deg) scale(1.08); }

.cat-card h3 { margin: 0 0 6px; }
.cat-card p { margin: 0 0 16px; color: var(--text-soft); font-size: 0.92rem; }

.cat-card__count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
}

/* ===========================================================
   CATALOG PAGE
   =========================================================== */

.catalog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  margin-top: 32px;
}

.catalog-filters {
  position: sticky;
  top: 100px;
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.catalog-filters h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin-bottom: 14px;
}

.filter-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.filter-list button {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  transition: background-color .15s, color .15s;
}
.filter-list button:hover { background: var(--surface-soft); }
.filter-list button.is-active {
  background: var(--accent);
  color: #fff;
}
.filter-list button.is-active .count { background: rgba(255,255,255,0.18); color: #fff; }
.filter-list .count {
  font-size: 0.75rem;
  background: var(--surface-muted);
  color: var(--text-mute);
  padding: 2px 8px;
  border-radius: 100px;
  font-variant-numeric: tabular-nums;
}

.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.catalog-search {
  flex: 1;
  max-width: 360px;
  position: relative;
}
.catalog-search input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.93rem;
  transition: border-color .2s, box-shadow .2s;
}
.catalog-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.catalog-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-mute);
}

.catalog-count { color: var(--text-mute); font-size: 0.9rem; }

.products-empty { padding: 60px 20px; text-align: center; color: var(--text-mute); }

/* ===========================================================
   PRODUCT PAGE
   =========================================================== */

.product-page {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: start;
  margin-top: 32px;
}

.gallery {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gallery__main {
  aspect-ratio: 4 / 3;
  background: var(--surface-muted);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
}
.gallery__main img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: opacity .3s var(--ease-out);
}
.gallery__main img.is-fading { opacity: 0; }

.gallery__btn {
  position: absolute;
  top: 50%;
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.92);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  transform: translateY(-50%);
  transition: background-color .15s, transform .15s;
  z-index: 2;
}
.gallery__btn:hover { background: #fff; }
.gallery__btn--prev { left: 14px; }
.gallery__btn--next { right: 14px; }
.gallery__btn:active { transform: translateY(-50%) scale(0.92); }

.gallery__counter {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,27,39,0.7);
  color: #fff;
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}

.gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 10px;
}
.gallery__thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-muted);
  border: 2px solid transparent;
  transition: border-color .2s, transform .15s;
  padding: 0;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb:hover { transform: translateY(-2px); }
.gallery__thumb.is-active { border-color: var(--accent); }

.product-info h1 { font-size: 2rem; margin-bottom: 12px; }
.product-info__brand { color: var(--accent); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 18px; display: block; }
.product-info__short { color: var(--text-soft); font-size: 1.05rem; margin-bottom: 24px; }
.product-info__description { color: var(--text); line-height: 1.7; margin-bottom: 28px; }
.product-info__description p { margin-bottom: 0.8em; }

.specs {
  border-top: 1px solid var(--border);
  margin-bottom: 28px;
}
.specs__row {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.specs__row dt { color: var(--text-mute); font-size: 0.9rem; }
.specs__row dd { margin: 0; font-weight: 500; }

.features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.features-list li {
  position: relative;
  padding-left: 26px;
  font-size: 0.93rem;
}
.features-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23C25E3A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-position: center;
  background-repeat: no-repeat;
}

.product-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px;
  background: var(--surface-soft);
  border-radius: var(--radius);
  align-items: center;
}
.product-cta p {
  margin: 0;
  flex: 1;
  min-width: 200px;
  font-size: 0.93rem;
  color: var(--text-soft);
}

/* ===========================================================
   LIGHTBOX
   =========================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15,27,39,0.94);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 60px;
  animation: fadeIn .2s var(--ease-out);
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}
.lightbox__close, .lightbox__nav {
  position: absolute;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background-color .15s;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,0.2); }
.lightbox__close { top: 24px; right: 24px; }
.lightbox__nav--prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 24px; top: 50%; transform: translateY(-50%); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===========================================================
   CTA BANNER
   =========================================================== */

.cta-banner {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 70px);
  background: linear-gradient(135deg, var(--slate-700) 0%, var(--slate-950) 100%);
  color: var(--text-invert);
  overflow: hidden;
  isolation: isolate;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle, rgba(194,94,58,0.3) 0%, transparent 50%);
  animation: glowPulse 8s ease-in-out infinite;
  z-index: -1;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}
.cta-banner__inner {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 40px;
  align-items: center;
}
.cta-banner h2 { color: #fff; margin: 0 0 14px; }
.cta-banner p { color: rgba(255,255,255,0.7); margin: 0; font-size: 1.05rem; }
.cta-banner__actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }

/* ===========================================================
   CONTACT FORM
   =========================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  margin-top: 32px;
}

.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-info__row { display: flex; gap: 18px; align-items: flex-start; }
.contact-info__icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-info h4 { margin: 0 0 4px; font-size: 0.95rem; color: var(--text-mute); font-weight: 500; }
.contact-info strong { font-size: 1.1rem; font-weight: 600; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.contact-form h3 { margin-bottom: 6px; }
.contact-form p.intro { color: var(--text-soft); margin-bottom: 22px; }

.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 0.86rem; color: var(--text-soft); font-weight: 500; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { min-height: 110px; }

.contact-form button[type=submit] { width: 100%; padding: 14px; }

.contact-form__success {
  display: none;
  padding: 18px;
  background: rgba(94,122,58,0.1);
  color: var(--success);
  border-radius: 10px;
  font-size: 0.93rem;
  margin-bottom: 16px;
}
.contact-form__success.is-shown { display: block; animation: fadeIn .3s var(--ease-out); }

/* ===========================================================
   FOOTER
   =========================================================== */

.site-footer {
  background: var(--bg);
  color: rgba(255,255,255,0.7);
  padding: 70px 0 30px;
  position: relative;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 50px;
}

.site-footer__col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.site-footer__col a { color: rgba(255,255,255,0.7); display: block; padding: 4px 0; font-size: 0.92rem; }
.site-footer__col a:hover { color: var(--accent-2); }

.site-footer__brand-text { color: rgba(255,255,255,0.55); font-size: 0.9rem; margin-top: 18px; line-height: 1.55; }

.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  flex-wrap: wrap;
  gap: 12px;
}

/* ===========================================================
   ANIMATIONS — reveal on scroll
   =========================================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .4s; }

/* ===========================================================
   ABOUT — двухколоночное интро (десктоп)
   На мобиле/планшете схлопывается через @media-блок ниже.
   =========================================================== */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

/* ===========================================================
   RESPONSIVE — desktop → tablet landscape → tablet portrait → mobile
   Точки: 1100 / 880 / 560 / 380 px
   =========================================================== */

/* — Tablet landscape: широкие 2-колоночные блоки выстраиваются в столбец */
@media (max-width: 1100px) {
  .hero__inner,
  .product-page,
  .contact-grid,
  .cta-banner__inner,
  .about-intro {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero__visual {
    height: 380px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }
  .catalog-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .catalog-filters {
    position: static;
    max-height: none;
    padding: 18px;
  }
  .filter-list {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .filter-list button { width: auto; }
  .featured__slide { flex: 0 0 calc((100% - 40px) / 3); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .cta-banner__actions { justify-content: flex-start; }
  .cta-banner { padding: clamp(28px, 5vw, 50px); }
  .product-info h1 { font-size: 1.75rem; }
}

/* — Tablet portrait: навигация уходит в drawer, advantages 2-кол, hero текст крупный */
@media (max-width: 880px) {
  .container { padding: 0 20px; }

  .nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    z-index: 70; /* ниже шапки (z=80), не перекрывает её */
    background: var(--bg-2);
    padding: 14px 16px 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 24px -12px rgba(0,0,0,0.4);
    /* Закрыт: невидим, не ловит клики, чуть-чуть приподнят для slide-эффекта */
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition:
      opacity .25s var(--ease-out),
      transform .25s var(--ease-out),
      visibility 0s linear .25s;
  }
  .nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition:
      opacity .25s var(--ease-out),
      transform .25s var(--ease-out),
      visibility 0s linear 0s;
  }
  .nav a {
    width: 100%;
    padding: 14px 16px;
    font-size: 0.95rem;
    border-radius: 8px;
  }
  .nav a.is-active::after { display: none; }
  .nav a.is-active { background: rgba(255,255,255,0.10); }
  .menu-toggle { display: flex; order: 3; }
  .site-header__inner { gap: 16px; }
  .site-header__phone {
    margin-left: auto;
    padding-left: 0;
    border-left: 0;
    font-size: 0.88rem;
    order: 2;
  }

  .advantages { grid-template-columns: 1fr 1fr; gap: 16px; }
  .advantage { padding: 24px; }
  .advantage__num { font-size: 2rem; }

  .featured__slide { flex: 0 0 calc((100% - 20px) / 2); }
  .featured__controls {
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }
  .featured__buttons { justify-content: center; }
  .featured__dots { justify-content: center; }

  .hero__stats { gap: 20px 32px; flex-wrap: wrap; margin-top: 36px; padding-top: 24px; }
  .hero__stat strong { font-size: 1.9rem; }
  .gallery { position: static; }

  .specs__row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 0;
  }
  .specs__row dt {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .page-head { padding: 90px 0 56px; }

  .lightbox { padding: 28px; }
}

/* — Mobile: всё в одну колонку, hero сжимается, кнопки растягиваются */
@media (max-width: 560px) {
  .container { padding: 0 16px; }

  h1 { font-size: clamp(1.6rem, 7vw + .4rem, 2.4rem); }
  h2 { font-size: clamp(1.35rem, 4.5vw + .4rem, 1.75rem); }
  h3 { font-size: 1.12rem; }

  .site-header__inner { height: 64px; gap: 10px; }
  .nav { top: 64px; }
  .brand { font-size: 1rem; gap: 10px; }
  .brand__mark { width: 34px; height: 34px; }
  .brand__title small { display: none; }

  .hero { padding: 56px 0 64px; }
  .hero__title {
    font-size: clamp(1.85rem, 8vw + .4rem, 2.6rem);
    margin-bottom: 18px;
  }
  .hero__lead { font-size: 1rem; margin-bottom: 28px; }
  .hero__cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero__cta .btn { width: 100%; }
  .hero__badge { font-size: 0.78rem; margin-bottom: 18px; }
  .hero__stats {
    gap: 18px 28px;
    margin-top: 32px;
    padding-top: 22px;
  }
  .hero__stat strong { font-size: 1.7rem; }
  .hero__shape--1, .hero__shape--2 { display: none; }

  /* Hero-карточки: уходим от absolute, делаем вертикальный стек */
  .hero__visual {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 100%;
  }
  .hero__card {
    position: static;
    width: 100% !important;
    padding: 18px;
    animation: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .hero__card--1, .hero__card--2, .hero__card--3 {
    top: auto; right: auto; bottom: auto; left: auto;
  }

  .scroll-hint { display: none; }

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

  .featured__slide { flex: 0 0 100%; }

  .services { grid-template-columns: 1fr; gap: 12px; }
  .service-card { padding: 20px; }

  .products { grid-template-columns: 1fr 1fr; gap: 14px; }
  .product__body { padding: 14px; gap: 6px; }
  .product__title { font-size: 0.92rem; }
  .product__short { display: none; }

  .cat-grid { grid-template-columns: 1fr; gap: 14px; }
  .cat-card { padding: 22px; }

  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 18px;
  }
  .catalog-search { max-width: 100%; }
  .catalog-filters { padding: 16px; }
  .filter-list { gap: 6px; }
  .filter-list button {
    padding: 8px 12px;
    font-size: 0.86rem;
    border-radius: 100px;
    background: var(--surface-soft);
  }
  .filter-list .count {
    background: rgba(15,27,39,0.06);
    padding: 1px 7px;
    font-size: 0.72rem;
  }

  .gallery__thumbs {
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    gap: 8px;
  }
  .gallery__btn { width: 38px; height: 38px; }
  .gallery__counter { font-size: 0.72rem; padding: 4px 10px; }

  .product-info h1 { font-size: 1.5rem; }
  .product-info__short { font-size: 0.98rem; }
  .product-cta { flex-direction: column; align-items: stretch; padding: 16px; }
  .product-cta .btn { width: 100%; }
  .features-list { grid-template-columns: 1fr; }

  .cta-banner { padding: 28px 22px; border-radius: var(--radius); }
  .cta-banner__actions { flex-direction: column; align-items: stretch; justify-content: stretch; }
  .cta-banner__actions .btn { width: 100%; }

  .contact-form { padding: 22px; }
  .contact-info__icon { width: 42px; height: 42px; }

  .site-footer { padding: 50px 0 24px; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 28px; margin-bottom: 28px; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; gap: 8px; }

  .btn { padding: 12px 20px; }
  .btn--sm { padding: 9px 16px; }

  .page-head { padding: 70px 0 36px; }
  .crumbs { font-size: 0.78rem; margin-bottom: 12px; }

  .lightbox { padding: 16px; }
  .lightbox__close, .lightbox__nav {
    width: 42px; height: 42px;
  }
  .lightbox__close { top: 12px; right: 12px; }
  .lightbox__nav--prev { left: 12px; }
  .lightbox__nav--next { right: 12px; }

  /* Уменьшаем декоративные «эффекты», которые ломают перфоманс на телефонах */
  .hero__bg, .page-head__bg { background-attachment: scroll; }
  .reveal { transform: translateY(16px); }
}

/* — Очень узкие экраны (старые/маленькие телефоны) */
@media (max-width: 380px) {
  .container { padding: 0 14px; }
  .hero__title { font-size: 1.7rem; }
  .hero__stat strong { font-size: 1.4rem; }
  .hero__stat span { font-size: 0.78rem; }
  .products { grid-template-columns: 1fr; }
  .site-header__phone { font-size: 0.82rem; }
  .featured__btn { width: 40px; height: 40px; }
  .advantage__num { font-size: 1.8rem; }
}

/* Высокая плотность пикселей / hover-неспособные устройства — отключаем hover-эффекты,
   чтобы не было «залипания» подсветки на тач-устройствах */
@media (hover: none) {
  .product:hover { transform: none; box-shadow: none; }
  .product:hover .product__image img { transform: none; }
  .advantage:hover { transform: none; box-shadow: none; }
  .service-card:hover { transform: none; box-shadow: none; }
  .cat-card:hover { transform: none; box-shadow: none; }
  .cat-card:hover::after { transform: none; }
  .btn--primary:hover { transform: none; }
}

/* ===========================================================
   UTILITIES
   =========================================================== */
.text-center { text-align: center; }
.mt-1 { margin-top: 12px; }
.mt-2 { margin-top: 24px; }
.mt-3 { margin-top: 40px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 100px;
  letter-spacing: 0.02em;
}

.divider {
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 24px 0;
  border-radius: 100px;
}

/* список выгод */
.benefits-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px 30px; }
.benefits-list li { position: relative; padding-left: 28px; line-height: 1.5; font-size: 0.95rem; }
.benefits-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 5px;
  width: 18px; height: 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23C25E3A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
}
.section--dark .benefits-list li::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23E8A04A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
}
