html { scroll-behavior: smooth; }

/* <picture> не влияет на вёрстку: стили и сетка работают с <img> как раньше */
picture { display: contents; }
/* <source> иначе становится пустой ячейкой сетки и сдвигает фото в галерее */
picture > source { display: none; }
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); }
/* Варианты выпадающих списков: без этого браузер рисует белый фон, а текст наследует белый цвет */
select.form-input { color-scheme: dark; }
select.form-input option { background-color: #111; color: #fff; }

/* Поля формы на светлом фоне */
.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); }

/* Атрибут hidden сильнее классов вроде .flex */
[hidden] { display: none !important; }

/* Подсказки городов в поле «Другой город» */
.city-combo { position: relative; }
#cityOtherWrap { margin-top: 12px; }
.city-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 30;
  margin: 0; padding: 4px 0; list-style: none;
  max-height: 264px; overflow-y: auto;
  background: #111; border: 1px solid rgba(255,255,255,0.3); border-top: none;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}
.city-list li {
  padding: 10px 16px; font-size: 14px; font-weight: 300;
  color: rgba(255,255,255,0.8); cursor: pointer;
}
.city-list li:hover, .city-list li[aria-selected="true"] { background: rgba(255,255,255,0.1); color: #fff; }

/* Отправка формы заявки */
.form-link { text-decoration: underline; text-underline-offset: 3px; }
.form-link:hover { color: #fff; }
.form-status-error { color: #f87171; }
button:disabled { opacity: 0.5; cursor: wait; }

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;
}

/* Светлая полупрозрачная подложка-чип под логотипом */
.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;
}

/* Стеклянная круглая стрелка в стиле шапки (карусель на главной и листание проектов) */
.glass-arrow {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  color: #fff;
  background: rgba(10, 10, 10, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}
.glass-arrow svg { width: 22px; height: 22px; }
.glass-arrow:hover { background: #fff; color: #0a0a0a; }
.glass-arrow:disabled { opacity: 0; pointer-events: none; }

/* Карусель проектов на главной */
.carousel { position: relative; }
.carousel-track {
  display: flex; gap: 32px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > .project-card { flex: 0 0 85%; scroll-snap-align: start; }
@media (min-width: 640px) { .carousel-track > .project-card { flex-basis: calc((100% - 32px) / 2); } }
@media (min-width: 1024px) { .carousel-track > .project-card { flex-basis: calc((100% - 64px) / 3); } }
/* Стрелки — по центру фото карточек (фото 4:5, подпись ниже) */
.carousel .glass-arrow { position: absolute; top: 38%; z-index: 5; transform: translateY(-50%); }
.carousel-prev { left: 8px; }
.carousel-next { right: 8px; }
@media (min-width: 1280px) {
  .carousel-prev { left: -26px; }
  .carousel-next { right: -26px; }
}

/* Листание проектов: стрелки закреплены посередине экрана слева и справа */
.project-arrow { position: fixed; top: 50%; z-index: 40; transform: translateY(-50%); }
.project-arrow.prev { left: 16px; }
.project-arrow.next { right: 16px; }
.project-arrow .project-arrow-name {
  position: absolute; top: 50%; transform: translateY(-50%);
  white-space: nowrap; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 32px;
  background: rgba(10, 10, 10, 0.6); border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: #fff; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.project-arrow.prev .project-arrow-name { left: 64px; }
.project-arrow.next .project-arrow-name { right: 64px; }
@media (hover: hover) { .project-arrow:hover .project-arrow-name { opacity: 1; } }
@media (max-width: 767px) {
  .glass-arrow { width: 42px; height: 42px; }
  .glass-arrow svg { width: 18px; height: 18px; }
  .project-arrow.prev { left: 8px; }
  .project-arrow.next { right: 8px; }
}

/* Плавающие кнопки WhatsApp / Telegram — только на телефонах (до 768px) */
.messenger-float {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.messenger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  background: rgba(10, 10, 10, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: background-color 0.3s ease, color 0.3s ease;
}
.messenger-btn svg { width: 24px; height: 24px; }
.messenger-btn:active { background: #fff; color: #0a0a0a; }
@media (min-width: 768px) { .messenger-float { display: none; } }
/* Пока заполняют форму, кнопки не перекрывают поля и подсказки */
body:has(input:focus, textarea:focus, select:focus) .messenger-float { display: none; }

/* Логотип в футере: всегда в одну строку, размер подстраивается под ширину колонки */
.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; }
}
