/* ================================================================
   Главная — карусели 21:9, glass buttons, parallax
   ================================================================ */

/* Заголовок */
.home-hero-hdr {
  padding: 20px 24px 8px;
  max-width: 1200px;
  margin: 0 auto;
}
.home-hero-hdr h1 {
  font-family: 'Manrope', -apple-system, sans-serif;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--acc-2);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.home-hero-hdr .lead {
  font-size: 16px;
  line-height: 1.5;
  color: var(--mut);
  margin: 0;
  max-width: 640px;
}

/* ================================================================
   Карусель 21:9 (Hero и Partnership)
   ================================================================ */
.carousel {
  position: relative;
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 16px;
}
.carousel-track {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 21 / 9;
  background: var(--acc-soft);
  box-shadow:
    0 8px 32px rgba(1, 105, 111, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.05);
}
.carousel-slides {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}
.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.carousel-slide.is-current img {
  animation: kenBurns 8s ease-out forwards;
}
@keyframes kenBurns {
  0% { transform: scale(1.02); }
  100% { transform: scale(1.08); }
}
.carousel-slide:hover img {
  transform: scale(1.03);
}

/* Стрелки — едва заметные, проступают на hover */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  color: rgba(255, 255, 255, 0.85);
  opacity: 0.35;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
  overflow: hidden;
}
.carousel-arrow::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.6) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.6s;
  pointer-events: none;
}
.carousel:hover .carousel-arrow,
.carousel-arrow:focus-visible {
  opacity: 0.85;
}
.carousel-arrow:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.1);
}
.carousel-arrow:hover::before {
  transform: translateX(100%);
}
.carousel-arrow:active {
  transform: translateY(-50%) scale(0.95);
}
.carousel-arrow.prev { left: 12px; }
.carousel-arrow.next { right: 12px; }
.carousel-arrow svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
  position: relative;
  z-index: 1;
}

/* Точки — pill navigation */
.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 5;
}
.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}
.carousel-dot.is-on {
  width: 22px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(1, 105, 111, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
}
.carousel-dot:hover:not(.is-on) {
  background: rgba(255, 255, 255, 0.85);
  transform: scale(1.2);
}

/* Progress bar на current dot */
.carousel-dot.is-on::after {
  content: '';
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--acc), var(--acc-2));
  transform-origin: left;
  animation: dotProgress var(--carousel-delay, 3000ms) linear;
}
@keyframes dotProgress {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

/* ================================================================
   Секция «Хиты» на главной
   ================================================================ */
.home-hits {
  max-width: 1200px;
  margin: 40px auto 20px;
  padding: 0 16px;
}
.home-hits-hdr {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}
.home-hits-hdr h2 {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 800;
  color: var(--acc-2);
  margin: 0;
  letter-spacing: -0.01em;
}
.home-hits-hdr .subtitle {
  font-size: 14px;
  color: var(--mut);
  margin: 0;
}
.home-hits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
@media (max-width: 640px) {
  .home-hits-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Кнопка «Перейти в каталог» — glass CTA с shimmer */
.home-catalog-cta {
  display: flex;
  justify-content: center;
  margin: 32px auto 40px;
  padding: 0 16px;
}
.btn-glass-lg {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 36px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: linear-gradient(135deg, var(--acc) 0%, var(--acc-2) 100%);
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 8px 24px rgba(1, 105, 111, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
}
.btn-glass-lg::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1);
  pointer-events: none;
}
.btn-glass-lg:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 32px rgba(1, 105, 111, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}
.btn-glass-lg:hover::before {
  transform: translateX(100%);
}
.btn-glass-lg svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
  position: relative;
  z-index: 1;
}
.btn-glass-lg span {
  position: relative;
  z-index: 1;
}

/* ================================================================
   Отклик мобильный
   ================================================================ */
@media (max-width: 640px) {
  .carousel { margin: 12px auto; padding: 0 12px; }
  .carousel-track { border-radius: 14px; }
  /* На мобильных — стрелки маленькие и едва видные, главный способ листания — свайп */
  .carousel-arrow {
    width: 30px; height: 30px;
    opacity: 0.25;
    background: rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
  }
  .carousel-arrow.prev { left: 6px; }
  .carousel-arrow.next { right: 6px; }
  .carousel-arrow svg { width: 12px; height: 12px; }
  .carousel-dots { bottom: 10px; padding: 5px 10px; }

  .home-hero-hdr { padding: 16px 20px 4px; }
  .home-hits { margin: 24px auto 12px; padding: 0 12px; }
  .home-hits-hdr { margin-bottom: 14px; }
  .btn-glass-lg { padding: 14px 28px; font-size: 15px; }
}

/* Уважение reduce-motion */
@media (prefers-reduced-motion: reduce) {
  .carousel-slides { transition: none; }
  .carousel-slide.is-current img { animation: none; }
  .carousel-dot.is-on::after { animation: none; background: var(--acc-2); }
  .btn-glass-lg::before, .carousel-arrow::before { transition: none; }
}
