:root {
  --bg: #0b0b0b;
  --text: #f5f5f5;
  --muted: #a9a9a9;
  --primary: #d1001f;
  --card: #1a1a1a;
  --border: #222;
  --shadow: 0 0 25px rgba(0, 0, 0, 0.5);
  --padding-desktop: 5%;
  --padding-mobile: 4%;
}

/* ===== BASE ===== */
html { -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; scroll-behavior: smooth; min-width: 0; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.5s, color 0.5s;
  font-size: 16px;
}
a { color: var(--primary); text-decoration: none; }
img, video { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4,h5,h6,p,li,a { overflow-wrap: anywhere; }

/* ===== HEADER ===== */
header {
  position: sticky; top: 0; z-index: 50;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--padding-desktop);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; color: var(--text);
  font-size: clamp(18px, 2.5vw, 24px);
}
.logo-mark {
  width: 14px; height: 14px; background: var(--primary);
  border-radius: 3px; box-shadow: 0 0 8px var(--primary);
}
nav { display: flex; gap: 20px; }
nav a {
  color: var(--text); font-weight: 600; position: relative; font-size: 1rem;
}
nav a::after {
  content: ''; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 2px; background: var(--primary); transition: 0.3s;
}
nav a:hover::after { width: 100%; }

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 140px var(--padding-desktop); overflow: hidden; color: var(--text);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.4), rgba(0,0,0,.7)),
    url("img/truba.jpg") center center / cover no-repeat;
  filter: brightness(0.9) contrast(1.1) saturate(1.05);
  z-index: 0; pointer-events: none; background-attachment: fixed;
  animation: lightPulse 14s ease-in-out infinite alternate, moveBg 60s linear infinite;
  will-change: transform, filter; transition: filter 0.8s ease;
}
@keyframes lightPulse {
  0% { filter: brightness(0.9) contrast(1.1) saturate(1.05); }
  50% { filter: brightness(1.03) contrast(1.15) saturate(1.1); }
  100% { filter: brightness(0.92) contrast(1.1) saturate(1.05); }
}
@keyframes moveBg {
  0% { background-position: center center; }
  50% { background-position: center right; }
  100% { background-position: center center; }
}
.hero:hover::before { filter: brightness(1) contrast(1.15) saturate(1.1); }
.hero-text {
  position: relative; z-index: 2; max-width: 1100px; margin: 0 auto; padding: 0 2rem;
  text-shadow: 0 0 20px rgba(0,0,0,.8);
}
.hero h1 {
  font-size: clamp(40px, 6vw, 72px); font-weight: 900; text-transform: uppercase;
  letter-spacing: 2px; color: #fff; margin-bottom: 25px;
  text-shadow: 0 0 25px rgba(0,0,0,.7);
}
.hero h1::after {
  content: ""; display: block; width: 90px; height: 4px; margin: 20px auto 0;
  background: var(--primary); box-shadow: 0 0 20px rgba(209,0,31,.8); border-radius: 2px;
}
.hero p {
  color: var(--muted); font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.7; margin: 30px auto 0; max-width: 650px;
}
.btns { display: flex; justify-content: center; gap: 12px; margin-top: 40px; }
.btn {
  padding: 12px 22px; border-radius: 8px; font-weight: 700; cursor: pointer;
  border: 2px solid var(--primary); transition: 0.3s; text-transform: uppercase; font-size: 0.9rem;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 16px rgba(209,0,31,.4); }

/* ===== ABOUT ===== */
#about {
  position: relative; overflow: hidden; text-align: center;
  padding: 120px var(--padding-desktop);
}
#about::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.85), rgba(0,0,0,.96)),
    url("img/truba.jpg") center/cover no-repeat;
  background-attachment: fixed; filter: brightness(0.55) contrast(1.2);
  z-index: 0; pointer-events: none;
}
#about h2, #about p { position: relative; z-index: 2; }
#about h2 {
  font-size: clamp(32px, 4vw, 46px); font-weight: 800; text-transform: uppercase;
  color: #fff; margin-bottom: 40px;
}
#about p {
  color: var(--muted); font-size: clamp(16px, 1.4vw, 17px);
  line-height: 1.8; max-width: 850px; margin: 60px auto 0;
}

/* ===== КАТАЛОГ ===== */
#catalog {
  padding: 100px var(--padding-desktop); background: #0c0c0c; text-align: left;
}
#catalog h2 {
  font-size: clamp(28px, 4vw, 40px); color: #fff; font-weight: 800;
  text-transform: uppercase; margin-bottom: 50px; text-align: center; position: relative;
}
#catalog h2::after {
  content: ""; position: absolute; bottom: -12px; left: 50%;
  width: 110px; height: 3px; background: var(--primary); border-radius: 3px;
  transform: translateX(-50%);
}
.catalog-grid {
  display: grid; gap: 40px; padding-top: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.catalog-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 0 20px rgba(0,0,0,.4);
  padding: 30px; transition: transform .3s ease, box-shadow .3s ease;
}
.catalog-card:hover { transform: translateY(-5px); box-shadow: 0 0 25px rgba(209,0,31,.4); }
.catalog-card h3 { font-size: 20px; color: #fff; margin-bottom: 15px; }
.catalog-card p { color: var(--muted); font-size: 15px; line-height: 1.6; margin-bottom: 20px; }
.catalog-card .btn {
  display: inline-block; background: var(--primary); color: #fff; border: none;
  border-radius: 6px; padding: 10px 18px; font-size: 14px; text-transform: uppercase; transition: .3s;
}
.catalog-card .btn:hover { background: #b30019; box-shadow: 0 0 10px rgba(209,0,31,.6); }

/* ===== ПАРТНЁРЫ (улучшенные) ===== */
.partners-section {
  background: var(--bg);
  padding: 90px var(--padding-desktop) 70px;
  border-bottom: 2px solid var(--border);
}
.partners-inner { max-width: 1100px; margin: 0 auto; }
.partners-title {
  font-size: clamp(24px, 3vw, 28px);
  color: var(--text);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 70px;
  text-align: center;
  position: relative;
}
.partners-title::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  width: 110px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
  transform: translateX(-50%);
}
.partner-logos-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 70px;
  max-width: 950px;
  margin: 0 auto;
}
.logo-item {
  width: 230px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.logo-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  width: 100%;
}
.logo-item img {
  max-width: 180px;
  max-height: 100px;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity 0.3s, transform 0.3s ease;
}
.logo-item img:hover {
  opacity: 1;
  transform: scale(1.05);
}
.partner-description { margin-top: 18px; }
.company-name { color: var(--text); font-weight: 700; font-size: 15px; }
.company-slogan { color: var(--muted); font-size: 13px; line-height: 1.3; }

/* ===== FOOTER ===== */
footer {
  background: var(--bg); color: var(--text); padding: 40px var(--padding-desktop) 30px;
}
.footer-inner {
  display: flex; justify-content: space-between; gap: 40px;
  max-width: 1100px; margin: 0 auto; padding-bottom: 40px;
}
.footer-column { display: flex; flex-direction: column; }
.footer-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 22px; font-weight: 800; color: #fff; text-transform: uppercase;
}
.footer-logo .logo-mark {
  width: 18px; height: 18px; background: var(--primary);
  border-radius: 3px; box-shadow: 0 0 10px rgba(209,0,31,.4);
}
.footer-tagline { color: var(--muted); font-size: 14px; line-height: 1.6; max-width: 380px; }
.footer-links a { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 13px; letter-spacing: .5px; transition: color .3s; }
.footer-links a:hover { color: var(--primary); }
.footer-contact p { color: var(--text); font-size: 14px; margin: 4px 0; }
.footer-contact strong { font-weight: 600; color: var(--muted); margin-right: 5px; }
.footer-contact a { color: var(--primary); font-weight: 600; text-decoration: none; }
.footer-bottom {
  text-align: center; padding-top: 20px; font-size: 13px; color: var(--muted);
  border-top: 1px solid var(--border); opacity: .8;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 992px) {
  .footer-inner { flex-wrap: wrap; justify-content: space-around; }
  .footer-brand-info, .footer-links, .footer-contact { flex: 1 1 40%; }
}
@media (max-width: 768px) {
  body { font-size: 15px; }
  .topbar { flex-direction: column; gap: 15px; padding: 15px var(--padding-mobile); }
  nav { width: 100%; justify-content: center; gap: 15px; }
  .hero { padding: 100px var(--padding-mobile); }
  .hero h1 { font-size: 32px; }
  .btns { flex-direction: column; }
  #catalog { padding: 60px var(--padding-mobile); }
  .partner-logos-list { flex-direction: column; gap: 30px; }
  .logo-item { width: 200px; }
  .logo-item img { max-width: 150px; max-height: 80px; }
  footer { padding: 40px var(--padding-mobile) 20px; }
  .footer-inner { flex-direction: column; text-align: center; gap: 30px; }
  .footer-logo { justify-content: center; }
  .hero::before, #about::before { background-attachment: scroll; animation: none; }
}
@media (max-width: 400px) {
  .catalog-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

/* ===== Мобильное меню ===== */
.menu-toggle {
  display: none;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 18px;
  cursor: pointer;
}
@media (max-width: 768px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  header nav { display: none; width: 100%; flex-direction: column; gap: 12px; margin-top: 10px; }
  header nav.open { display: flex; }
}
nav a:focus-visible, .footer-links a:focus-visible, .btn:focus-visible, .menu-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
