:root {
  --green-50: #effaf3;
  --green-100: #d9f3e3;
  --green-500: #12a150;
  --green-600: #0c8a42;
  --green-700: #0a6e36;
  --ink: #0f1f17;
  --muted: #5b6b62;
  --line: #e3ebe6;
  --bg: #f6f9f7;
  --card: #ffffff;
  --radius: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 31, 23, .06), 0 1px 3px rgba(15, 31, 23, .05);
  --shadow-md: 0 10px 30px -10px rgba(15, 31, 23, .18);
  --shadow-lg: 0 24px 50px -18px rgba(12, 138, 66, .35);
  --header-h: 100px;
  --container: 1180px;
}
@media (min-width: 1440px) { :root { --container: 1320px; } }
@media (min-width: 1900px) { :root { --container: 1440px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 90% -10%, var(--green-100), transparent 60%),
    radial-gradient(700px 400px at -10% 20%, #e6f3ff, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--green-600); text-decoration: none; transition: color .2s; }
a:hover { color: var(--green-700); }
.container { width: min(var(--container), 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
#header {
  position: sticky; top: 0; z-index: 100;
  padding-top: 12px;
  pointer-events: none;
}
.header-inner {
  pointer-events: auto;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px;
  padding: 10px 12px 10px 18px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 28px;
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 10px 30px -12px rgba(15, 31, 23, .25), 0 2px 6px rgba(15, 31, 23, .05);
}
.logo { display: block; line-height: 0; }
.logo img { height: 52px; width: auto; mix-blend-mode: multiply; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.logo:hover img { transform: scale(1.05); }

/* Shared "capsule" look for menu and phones: same height, border, radius */
.nav, #telephones {
  display: flex; align-items: center;
  height: 52px; padding: 4px; margin: 0;
  list-style: none;
  background: #f3f8f5; border: 1px solid var(--green-100); border-radius: 999px;
}
#navbar { min-width: 0; justify-self: center; }
.nav { gap: 2px; }
.nav li { display: flex; }
.nav a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  height: 42px; padding: 0 12px; border-radius: 999px;
  font-size: 15px; font-weight: 600; letter-spacing: -.005em; color: #2b3b32;
  transition: background .25s, color .25s, box-shadow .25s;
}
.nav a i { font-size: 14px; width: 16px; text-align: center; color: var(--green-600); transition: color .25s; }
.nav a:hover { background: #fff; color: var(--green-700); box-shadow: 0 1px 3px rgba(15, 31, 23, .08); }
.nav a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  box-shadow: 0 8px 18px -8px rgba(12, 138, 66, .8);
}
.nav a.active i { color: #fff; }

#telephones { gap: 0; padding-right: 8px; }
#telephones > span {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 10px;
  font-size: 14px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#telephones > span + span::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 18px; margin-top: -9px; background: var(--green-100);
}
#telephones > span > span { color: var(--green-600); margin-right: -4px; font-weight: 800; }
#telephones > span:first-child { padding-left: 0; }
#telephones > span:first-child > i {
  display: inline-grid; place-items: center; width: 42px; height: 42px; margin-right: 0; border-radius: 50%;
  background: linear-gradient(135deg, var(--green-500), var(--green-700)); color: #fff !important; font-size: 15px;
  box-shadow: 0 8px 16px -8px rgba(12, 138, 66, .9);
}
#telephones > span:not(:first-child) > i { display: none; }
#telephones .lang {
  display: inline-grid; place-items: center; flex: 0 0 auto; height: 34px; min-width: 40px; padding: 0 10px; margin-left: 6px;
  border-radius: 999px; background: #fff; border: 1px solid var(--green-100);
  font-size: 13px; font-weight: 800; letter-spacing: .04em; color: var(--green-700);
  transition: background .25s, color .25s;
}
#telephones .lang:hover { background: var(--green-600); color: #fff; }
.green { color: var(--green-500); }

/* ---------- Sections ---------- */
section { padding: 72px 0 0; }
#equipment { padding-top: 56px; }
.box { position: relative; }
.box h2 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; letter-spacing: -.02em; font-weight: 800;
  background: linear-gradient(120deg, var(--green-700), var(--green-500));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.center { text-align: left; }
.box h2::after {
  content: ""; display: block; width: 56px; height: 5px; border-radius: 99px; margin-top: 14px;
  background: linear-gradient(90deg, var(--green-500), #7fd9a3);
}
.lead { max-width: 70ch; font-size: 18px; color: var(--muted); margin: 18px 0 0; }

.grid {
  display: grid; gap: 22px; margin-top: 32px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--green-100); }
.thumbnail { display: block; overflow: hidden; background: #fff; }
.thumbnail a { display: block; }
.thumbnail img {
  width: 100%; aspect-ratio: 242 / 200; object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.card:hover .thumbnail img { transform: scale(1.06); }
.card.doc .thumbnail { background: linear-gradient(160deg, var(--green-50), #fff); padding: 18px 0 0; }
.card.doc .thumbnail img { aspect-ratio: 170 / 188; object-fit: contain; max-height: 190px; margin-inline: auto; width: auto; }
.card.catalog .thumbnail { background: linear-gradient(160deg, var(--green-50), #fff); padding: 16px 16px 0; }
.card.catalog .thumbnail img { aspect-ratio: 242 / 342; object-fit: contain; max-height: 280px; margin-inline: auto; width: auto; border-radius: 8px 8px 0 0; box-shadow: var(--shadow-md); }
.card.brand .thumbnail img { object-fit: contain; padding: 8px; }
.caption { padding: 16px 18px 20px; }
.card .caption { flex: 1; border-top: 1px solid var(--line); }
.caption h4 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.card:hover .caption h4 { color: var(--green-700); }

/* ---------- Contacts ---------- */
.contacts-grid { display: grid; gap: 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 32px; }
.contact-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 30px; box-shadow: var(--shadow-sm);
}
.contact-card .caption { padding: 0; border: 0; }
.contact-card h4 { font-size: 20px; color: var(--green-700); margin-bottom: 12px; }
address { font-style: normal; font-size: 16px; color: var(--muted); line-height: 1.9; }
address a { font-weight: 600; }
.map {
  position: relative; display: block; margin-top: 22px; height: 360px;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: url("../images/address.png") center / cover no-repeat;
  box-shadow: var(--shadow-md);
  transition: box-shadow .3s, transform .3s;
}
.map:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.map::after {
  content: "\f041"; font-family: FontAwesome; position: absolute; right: 18px; bottom: 18px;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-600); color: #fff; font-size: 22px; box-shadow: var(--shadow-md);
}
.map span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

#footer { padding: 56px 0 40px; }
#footer .container { border-top: 1px solid var(--line); padding-top: 1px; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card, .card:hover, .thumbnail img { transition: none; transform: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .contacts-grid { grid-template-columns: 1fr; }
  section { padding-top: 52px; }
  .caption h4 { font-size: 14px; }
  .caption { padding: 12px 12px 16px; }
  .map { height: 260px; }
}

.contact-card .caption h4 { font-size: 20px; }
@media (max-width: 760px) {
  .contact-card { padding: 22px 20px; }
  .contact-card .caption h4 { font-size: 18px; }
  address { font-size: 15px; line-height: 1.8; }
  .lead { font-size: 16px; }
}

@media (min-width: 761px) and (max-width: 1020px) {
  #equipment .grid, #brands .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  #equipment .caption h4, #brands .caption h4 { font-size: 14px; }
}

@media (min-width: 1021px) {
  #equipment-selection .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #catalogs .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
  #catalogs .caption h4 { font-size: 15px; }
}

/* ---------- Header: responsive ---------- */
/* Two rows: logo (left) + phones (right) on top, full-width menu capsule below */
@media (max-width: 1439px) {
  .header-inner { grid-template-columns: auto 1fr; gap: 12px 16px; padding: 12px 14px; }
  #navbar { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
  #telephones { justify-self: end; }
  .nav { justify-content: space-between; }
  .nav li { flex: 1 1 auto; }
  .nav a { width: 100%; }
}
/* Phone */
@media (max-width: 760px) {
  #header { padding-top: 8px; }
  .header-inner { grid-template-columns: 1fr; border-radius: 24px; padding: 12px; gap: 10px; }
  .logo { grid-row: 1; }
  .logo img { height: 44px; }
  #telephones { grid-row: 2; justify-self: stretch; justify-content: space-between; height: 46px; padding: 3px 6px 3px 3px; }
  #telephones > span { flex: 1 1 auto; justify-content: center; height: 40px; padding: 0 6px; font-size: 13.5px; }
  #telephones > span:first-child { flex: 0 0 auto; padding: 0 6px 0 0; }
  #telephones > span:first-child > i { width: 40px; height: 40px; font-size: 14px; }
  #navbar { grid-row: 3; }
  .nav { flex-wrap: wrap; height: auto; border-radius: 26px; gap: 4px; }
  .nav li { flex: 1 1 auto; }
  .nav a { height: 40px; padding: 0 10px; font-size: 14px; }
}
@media (max-width: 520px) {
  .nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .nav li { grid-column: span 2; }
  .nav li:nth-child(n+4) { grid-column: span 3; }
  .nav a { white-space: normal; text-align: center; line-height: 1.15; padding: 0 4px; font-size: 13px; min-height: 40px; height: 100%; }
  .nav a i { display: none; }
  #telephones > span { font-size: 12.5px; padding: 0 3px; }
  #telephones > span > span { margin-right: -2px; }
}
@media (max-width: 420px) {
  .header-inner { padding: 10px 8px; }
  #telephones { padding: 3px 4px; }
  #telephones > span { font-size: 12px; padding: 0 2px; }
  #telephones > span:first-child > i { display: none; }
  #telephones > span:first-child { padding: 0 2px; flex: 1 1 auto; }
}
