*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #0f0f14;
  --color-surface: #1a1a24;
  --color-accent: #6c5ce7;
  --color-accent-light: #a29bfe;
  --color-text: #f0f0f5;
  --color-text-muted: #a0a0b0;
  --font-main: 'Montserrat', sans-serif;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

html {
  overflow-y: scroll;
}

body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Navigation dots */
.dots-nav {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--color-accent-light);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  padding: 0;
}

.dot.active,
.dot:hover {
  background: var(--color-accent);
  transform: scale(1.2);
}

/* Slides */
.slides-container {
  width: 100%;
}

.slide {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.slide-inner {
  width: 100%;
  max-width: 1200px;
  padding: 80px 24px 48px;
}

.slide-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.slide-desc {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  font-size: 0.95rem;
}

/* Slide 1 — Hero */
.slide-hero {
  background: url('../img/sabgb.jpg') left / cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 1) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  margin-top: 20px;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-text-muted);
  animation: fadeInUp 1s ease-out 0.3s both;
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.scroll-hint span {
  display: block;
  width: 28px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  position: relative;
}

.scroll-hint span::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: #fff;
  border-radius: 2px;
  animation: scrollBounce 2s infinite;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(12px); opacity: 0.3; }
}

/* Slide 2 — Mosaic gallery */
.slide-gallery {
  background: var(--color-bg);
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding: 0;
}

.gallery-header {
  flex-shrink: 0;
  padding: 72px 24px 12px;
  text-align: center;
}

.gallery-header .slide-desc {
  margin-bottom: 0;
}

.mosaic {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 28px;
  gap: 4px;
  width: 100%;
  min-height: 0;
  height: calc(100dvh - 140px);
  padding: 0 4px 4px;
  overflow: hidden;
}

.mosaic.mosaic--scroll {
  overflow-y: auto;
}

.mosaic-item {
  position: relative;
  overflow: hidden;
  border: none;
  padding: 0;
  background: var(--color-surface);
  cursor: zoom-in;
  border-radius: 6px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, z-index 0s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .mosaic-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 28px rgba(108, 92, 231, 0.35);
    z-index: 2;
  }
}

.mosaic-item:focus-visible {
  outline: 2px solid var(--color-accent-light);
  outline-offset: 2px;
}

.mosaic-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.mosaic-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-text-muted);
  padding: 48px 24px;
}

.mosaic-empty[hidden] {
  display: none;
}

/* Slide 3 — Reviews */
.slide-reviews {
  background: linear-gradient(180deg, var(--color-bg) 0%, #12121c 100%);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.review-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(108, 92, 231, 0.15);
}

.review-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--color-accent);
}

.review-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.review-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Social links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 24px;
  flex-wrap: wrap;
}

.social-links--hero {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 3;
  justify-content: flex-end;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.social-btn--telegram {
  background: #2AABEE;
}

.social-btn--vk {
  background: #4C75A3;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
  cursor: default;
  transition: opacity 0.15s ease;
}

@media (pointer: coarse) {
  .lightbox {
    cursor: pointer;
  }

  .lightbox-img {
    cursor: pointer;
    pointer-events: none;
  }

  .lightbox-close {
    pointer-events: none;
  }
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 1001;
}

.lightbox-close:hover {
  opacity: 1;
}

/* Responsive */
@media (max-width: 900px) {
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .dots-nav {
    right: 12px;
    gap: 8px;
  }

  .dot {
    width: 10px;
    height: 10px;
  }

  .slide-inner {
    padding: 64px 16px 32px;
  }

  .reviews-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .review-card {
    padding: 16px;
  }

  .gallery-header {
    padding: 56px 16px 8px;
  }

  .mosaic {
    gap: 3px;
    padding: 0 3px 3px;
  }

  .social-links:not(.social-links--hero) .social-btn {
    width: 100%;
    justify-content: center;
  }

  .social-links--hero {
    top: 16px;
    right: 48px;
    gap: 10px;
  }

  .social-links--hero .social-btn {
    padding: 10px 16px;
    font-size: 0.875rem;
  }

  .social-links--hero .social-btn svg {
    width: 20px;
    height: 20px;
  }
}
