/* =====================================
   LANDING.CSS
   Structure:
   1) Base / layout helpers
   2) HERO
   3) VIDEO
   4) ABOUT
   5) CAROUSEL
   6) MY SPACES
   7) Animations + accessibility
   8) Media queries (mobile / tablet / desktop)
   ===================================== */

/* =========
   1) Base
   ========= */

.landing {
  /* если надо — оставь пустым; класс полезен для скопа */
}

/* shared section container for landing */
.landing .section-wrap {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 0 16px;
}


.muted {
  color: var(--muted);
  opacity: 0.8;
}

/* =========
   2) HERO
   ========= */

.hero {
  min-height: calc(70vh - 60px); /* учитываем высоту шапки */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  /* фон приходит из style="background-image: url(...)" */
  background-color: var(--bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  padding: 56px 0;
  position: relative;
  isolation: isolate; /* чтобы оверлей не вылезал */
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 60% at 50% 20%, rgba(79,70,229,.25), transparent 90%),
    linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.25));
  z-index: 0;
  pointer-events: none;
}

/* full-bleed hero helper */
.hero-full {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: 16px;
  padding-right: 16px;
}

.hero-content {
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  z-index: 1; /* над оверлеем */
}

.hero-title {
  font-size: clamp(44px, 9vw, 92px);
  letter-spacing: 0.10em;
  margin: 0 0 12px;
}

.hero-subtitle {
  max-width: 560px;
  margin: 0 auto 28px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* landing buttons */
.hero .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 12px 22px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;

  border: 1px solid var(--border);
}

.hero .btn.primary {
  background: var(--brand);
  color: var(--brand-contrast);
  border-color: var(--brand);
}
.hero .btn.primary:hover { opacity: .92; }

.hero .btn.ghost {
  background: transparent;
  color: var(--text);
}
.hero .btn.ghost:hover { border-color: var(--brand); }

/* =========
   3) VIDEO
   ========= */

.video-section {
  padding: 72px 0;
}

.video-wrapper {
  max-width: 960px;
  margin: 0 auto;
}

.video-placeholder,
.video-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.video-placeholder {
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.video-embed {
  position: relative;
  background: var(--surface);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* =========
   4) ABOUT
   ========= */

.about {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 0 40px;
}

.about h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.about p {
  margin: 0 0 14px;
  line-height: 1.7;
}

/* =========
   5) CAROUSEL
   ========= */

.photo-carousel {
  margin: 56px auto 72px;
  max-width: 100%;
}

.carousel-viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: 16px;

  scrollbar-width: none; /* Firefox */
}
.carousel-viewport::-webkit-scrollbar { display: none; }

.carousel-track {
  display: flex;
  width: 100%;
}

.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);

  /* одинаковая форма */
  aspect-ratio: 16 / 9;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  opacity: 0.7;
}

.carousel-dot.is-active {
  opacity: 1;
  background: var(--brand);
  border-color: var(--brand);
}

/* =========
   6) MY SPACES
   ========= */

.my-spaces {
  margin: 80px auto 120px;
  max-width: 720px;
  padding: 0 16px;
  text-align: center;
}

.my-spaces-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
}

.my-spaces-subtitle {
  font-size: 14px;
  margin-bottom: 32px;
  opacity: 0.7;
}

.my-spaces-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* link button */
.space-link {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 18px 16px;
  border-radius: 14px;

  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;

  color: #fff;
  background: linear-gradient(
    180deg,
    rgba(35, 67, 102, 0.95),
    rgba(20, 45, 70, 0.95)
  );

  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  cursor: pointer;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.space-link:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.space-link:active {
  transform: scale(0.98);
}

/* variants */
.space-link.highlight {
  background: linear-gradient(180deg, #4f46e5, #3b82f6);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.space-link.highlight:hover {
  box-shadow: 0 0 40px rgba(79, 70, 229, 0.45);
}

.space-link.muted {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.65);
  cursor: default;
}

.space-link.muted:hover {
  transform: none;
  box-shadow: none;
}

/* =========
   7) Animations + accessibility
   ========= */

@keyframes floatY {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

.float-slow   { animation: floatY 9s ease-in-out infinite; }
.float-medium { animation: floatY 7s ease-in-out infinite; }
.float-fast   { animation: floatY 5.5s ease-in-out infinite; }

.delay-1 { animation-delay: 0.8s; }
.delay-2 { animation-delay: 1.6s; }
.delay-3 { animation-delay: 2.4s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .float-slow,
  .float-medium,
  .float-fast {
    animation: none !important;
  }

  .space-link,
  .hero .btn {
    transition: none !important;
  }
}

/* =========
   8) Media queries
   ========= */

/* --- Mobile (phones) --- */
@media (max-width: 640px) {
  .hero {
    padding: 44px 0;
    min-height: auto;
  }

  .hero-title {
    letter-spacing: 0.08em;
  }

  .hero-subtitle {
    font-size: 16px;
    margin-bottom: 18px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .hero .btn {
    width: 100%;
  }

  .video-section {
    padding: 56px 0;
  }

  .about {
    padding: 56px 0 32px;
  }

  .my-spaces {
    margin: 64px auto 96px;
  }

  .space-link {
    font-size: 15px;
    padding: 16px 14px;
  }
}

/* --- Tablet (iPad etc) --- */
@media (min-width: 641px) and (max-width: 1024px) {
  .hero {
    min-height: calc(62vh - 60px);
    padding: 56px 0;
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .video-section {
    padding: 64px 0;
  }

  .about {
    padding: 64px 0 36px;
  }

  .my-spaces {
    margin: 72px auto 110px;
    max-width: 680px;
  }

  .space-link {
    padding: 18px 16px;
    font-size: 15px;
  }
}

/* --- Desktop (large screens) --- */
@media (min-width: 1025px) {
  .hero {
    min-height: calc(76vh - 60px);
  }

  .video-wrapper {
    max-width: 1000px;
  }

  .about {
    max-width: 760px;
  }

  .my-spaces {
    max-width: 760px;
  }
}
