html { scroll-behavior: smooth; }
body { font-family: 'Jost', sans-serif; }

.tracking-widest-lg { letter-spacing: 0.25em; }
.tracking-widest-xl { letter-spacing: 0.35em; }

/* Подчёркивание ссылок */
.underline-anim { position: relative; display: inline-block; }
.underline-anim::after {
  content: ''; position: absolute; left: 0; bottom: -3px;
  width: 0%; height: 1px; background-color: currentColor;
  transition: width 0.4s ease;
}
.underline-anim:hover::after { width: 100%; }

/* Кнопка — светлая заливка при наведении (на тёмном фоне) */
.btn-outline {
  position: relative; overflow: hidden; z-index: 1;
  transition: color 0.5s ease;
}
.btn-outline::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 0%; height: 100%; background-color: #ffffff;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1); z-index: -1;
}
.btn-outline:hover::before { width: 100%; }
.btn-outline:hover { color: #0a0a0a; }

/* Кнопка — тёмная заливка при наведении (на светлом фоне) */
.btn-outline-dark {
  position: relative; overflow: hidden; z-index: 1;
  transition: color 0.5s ease;
}
.btn-outline-dark::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 0%; height: 100%; background-color: #0a0a0a;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1); z-index: -1;
}
.btn-outline-dark:hover::before { width: 100%; }
.btn-outline-dark:hover { color: #ffffff; }

/* Карточки проектов — зум фото при наведении */
.project-card { transition: border-color 0.5s ease; }
.project-card .img-wrap img {
  transition: transform 0.8s cubic-bezier(0.4,0,0.2,1);
}
.project-card:hover .img-wrap img { transform: scale(1.06); }

/* Поля формы на тёмном фоне */
.form-input {
  background: transparent; border: 1px solid rgba(255,255,255,0.2);
  color: #fff; transition: border-color 0.4s ease;
}
.form-input::placeholder { color: rgba(255,255,255,0.3); }
.form-input:focus { outline: none; border-color: rgba(255,255,255,0.8); }

/* Поля формы на светлом фоне */
.form-input-dark {
  background: transparent; border: 1px solid rgba(10,10,10,0.2);
  color: #0a0a0a; transition: border-color 0.4s ease;
}
.form-input-dark::placeholder { color: rgba(10,10,10,0.3); }
.form-input-dark:focus { outline: none; border-color: rgba(10,10,10,0.8); }

input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 0.5; cursor: pointer; }

/* Аккордеон FAQ */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.faq-icon { transition: transform 0.3s ease; }
details[open] .faq-icon { transform: rotate(45deg); }

/* Линия таймлайна этапов работ */
.stage-line {
  background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.3), rgba(255,255,255,0));
}

/* ===== HERO SLIDESHOW (Ken Burns effect) ===== */
.hero-slideshow {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1);
  transition: opacity 4.8s ease, transform 10s ease-out;
  z-index: 0;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1.12);
  z-index: 1;
}

/* Сетка брендов техники */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1px;
  background-color: rgba(255,255,255,0.1);
}
@media (min-width: 640px)  { .brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .brand-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .brand-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.brand-card {
  display: flex;
  flex-direction: column;
  background-color: #000;
  transition: background-color 0.5s ease;
}
a.brand-card:hover { background-color: #141414; }

/* Логотип бренда в карточке: белым силуэтом на тёмном фоне, ярче при наведении */
.brand-logo {
  display: block; height: 40px; width: auto; max-width: 80%;
  object-fit: contain; object-position: left center;
  filter: brightness(0) invert(1); opacity: 0.8;
  transition: opacity 0.5s ease;
}
.brand-logo[src*="vzug."] { height: 58px; }
a.brand-card:hover .brand-logo { opacity: 1; }

/* Поиск и корзина в шапке главной */
.head-icon { position: relative; display: inline-block; color: rgba(255,255,255,0.8); transition: opacity 0.3s ease; }
.head-icon:hover { opacity: 0.6; }
.head-icon svg { display: block; overflow: visible; }
.head-icon path { fill: none; stroke: currentColor; stroke-width: 1; }
.head-badge {
  position: absolute; top: -7px; right: -10px; min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 999px; background: #9b1b30; color: #fff;
  font-size: 9px; line-height: 15px; text-align: center;
}
.head-badge[hidden] { display: none; }

/* Подпись группы брендов */
.brand-group + .brand-group { margin-top: 4.5rem; }

/* Светлая полупрозрачная подложка-чип под логотипом */
.logo-chip {
  display: inline-flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  padding: 2px 20px;
  border-radius: 32px;
}

/* Логотип в футере: всегда в одну строку, размер подстраивается под ширину колонки */
.footer-brand { container-type: inline-size; }
.footer-logo {
  white-space: nowrap;
  font-size: clamp(0.9rem, 5vw, 1.25rem);
  font-size: min(1.25rem, 7cqw);
}

/* Планшеты и небольшие ноутбуки: логотип на всю ширину, остальные колонки в ряд */
@media (min-width: 768px) and (max-width: 1279px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
