/* ═══════════════════════════════════════════════════════
   Вжух Landing — style.css
   Архитектура из Лотос: scroll-snap, scale-анимация,
   боковая навигация СЛЕВА, анимированный фон
   ═══════════════════════════════════════════════════════ */

:root {
  --primary-text-color: #18181b;
  --brand-color: #6366f1;
  --nav-dot-inactive-color: rgba(0, 0, 0, 0.3);
  --nav-dot-active-color: #6366f1;
  --animation-duration-fast: 50ms;
  --animation-duration-medium: 300ms;
  --animation-duration-slow: 500ms;
  --animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #e0e7ff;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--primary-text-color);
  -webkit-font-smoothing: antialiased;
}

/* ── Фон (анимированный градиент, как в лотосе) ──── */
#gradient-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(45deg, #e0e7ff, #ddeaf6, #f0f0ff, #faf5ff);
  background-size: 220% 220%;
  animation: gradient-animation 10s ease infinite;
}
@keyframes gradient-animation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ── Утилиты ───────────────────────────────────────── */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-underline {
  text-decoration: none;
}

/* ── Preloader ─────────────────────────────────────── */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #eef2ff;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition:
    opacity 0.4s ease-out,
    visibility 0.4s ease-out;
  visibility: visible;
}
#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--brand-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Slide Container ─────────────────────────────────────── */
#slide-container {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow-y: scroll;
  touch-action: pan-y;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#slide-container::-webkit-scrollbar {
  display: none;
}

.slide {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 1rem;
  box-sizing: border-box;
  scroll-snap-align: start;
}

@media (min-width: 640px) {
  .slide {
    padding: 2rem;
  }
}

/* ── Анимация масштабирования при скролле ──────────── */
.slide .content-wrapper {
  transition: transform var(--animation-duration-fast) linear;
  transform-origin: center;
  will-change: transform;
}

#about-main-block {
  transition: transform var(--animation-duration-fast) linear;
  will-change: transform;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  #about-main-block {
    height: 85vh;
    max-height: 700px;
  }
}

/* ── Боковая навигация (СЛЕВА, как в лотосе) ──────── */
#slide-nav {
  position: fixed;
  top: 50%;
  left: 2rem;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 10;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: var(--nav-dot-inactive-color);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-dot.active {
  background-color: var(--nav-dot-active-color);
  height: 32px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ── Верхняя навигация ─────────────────────────────── */
header > nav {
  background-color: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.top-nav-link {
  padding: 0.5rem 1.25rem;
  border-radius: 0.75rem;
  transition:
    color var(--animation-duration-medium),
    background-color var(--animation-duration-medium),
    box-shadow var(--animation-duration-medium);
  font-weight: 500;
}

.top-nav-link.active {
  background-color: white;
  color: var(--primary-text-color);
  font-weight: 600;
  box-shadow:
    0 4px 10px -1px rgb(0 0 0 / 0.07),
    0 2px 6px -2px rgb(0 0 0 / 0.07);
}

/* ── Демо карусель (Секция 2) ──────────────────────── */
.demo-carousel-container {
  overflow: visible;
}

.demo-slides-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem 2rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
  scrollbar-width: none;
}

.demo-slide-card {
  flex-shrink: 0;
  width: 280px;
  border-radius: 1rem;
  overflow: hidden;
  scroll-snap-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}
.demo-slide-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.18);
}
.demo-slide-card img {
  width: 100%;
  height: auto;
  display: block;
}

.demo-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: var(--nav-dot-inactive-color);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}
.demo-dots .dot.active {
  background-color: var(--brand-color);
  width: 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* ── Карусель примеров (О сервисе) ─────────────────── */
.examples-track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 1.5rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
  scrollbar-width: none;
}
.examples-track::-webkit-scrollbar {
  display: none;
}
.examples-card {
  flex-shrink: 0;
  width: 180px;
  height: 240px;
  border-radius: 1rem;
  overflow: hidden;
  scroll-snap-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
  position: relative;
  display: block;
}
.examples-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.18);
}
.examples-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (min-width: 640px) {
  .examples-card {
    width: 220px;
    height: 300px;
  }
}
@media (min-width: 768px) {
  .examples-track {
    gap: 1rem;
    padding: 1rem 2rem;
    justify-content: center;
  }
  .examples-card {
    width: 240px;
    height: 320px;
  }
}

/* ── Интерфейс — Phone Mockup ──────────────────────── */
.phone-mockup {
  position: relative;
  width: 240px;
  height: 490px;
  background: #1a1a1a;
  border-radius: 38px;
  padding: 10px;
  box-shadow:
    0 0 0 2px #333,
    0 0 0 4px #1a1a1a,
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(99, 102, 241, 0.1);
  touch-action: pan-y;
}
/* Large phone mockup for mobile interface slide */
.phone-mockup.phone-mockup-lg {
  width: 56vw;
  max-width: 280px;
  height: auto;
  aspect-ratio: 9 / 19.2;
  padding: 2.5vw;
  border-radius: 10vw;
}
@media (min-width: 400px) {
  .phone-mockup.phone-mockup-lg {
    max-width: 300px;
    border-radius: 42px;
    padding: 11px;
  }
}
@media (min-width: 640px) {
  .phone-mockup {
    width: 260px;
    height: 530px;
    padding: 12px;
    border-radius: 42px;
  }
  .phone-mockup.phone-mockup-lg {
    max-width: 320px;
  }
}
@media (min-width: 768px) {
  .phone-mockup {
    width: 320px;
    height: 650px;
    padding: 16px;
    border-radius: 52px;
  }
}
.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: #1a1a1a;
  border-radius: 0 0 14px 14px;
  z-index: 10;
}
.phone-mockup-lg .phone-notch {
  top: 2.5vw;
  width: 18vw;
  max-width: 80px;
  height: 5vw;
  max-height: 24px;
}
@media (min-width: 400px) {
  .phone-mockup-lg .phone-notch {
    top: 11px;
    width: 80px;
    height: 24px;
  }
}
@media (min-width: 640px) {
  .phone-notch {
    top: 12px;
    width: 90px;
    height: 26px;
  }
}
@media (min-width: 768px) {
  .phone-notch {
    top: 16px;
    width: 120px;
    height: 32px;
  }
}
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  position: relative;
}
@media (min-width: 640px) {
  .phone-screen {
    border-radius: 32px;
  }
}
@media (min-width: 768px) {
  .phone-screen {
    border-radius: 36px;
  }
}
.phone-carousel {
  width: 100%;
  height: 100%;
  position: relative;
}
.phone-carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1), opacity 0.35s cubic-bezier(.4,0,.2,1);
  transform: translateX(40px);
  pointer-events: none;
}
.phone-carousel-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.phone-carousel-slide.slide-out-left {
  opacity: 0;
  transform: translateX(-40px);
}
.phone-carousel-slide.slide-out-right {
  opacity: 0;
  transform: translateX(40px);
}
.phone-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: var(--nav-dot-inactive-color);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}
.phone-dot.active {
  background-color: var(--brand-color);
  width: 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* ── О сервисе — Showcase (как курсы в лотосе) ─────── */
.showcase-square {
  position: absolute;
  top: 50%;
  left: 50%;
  will-change: transform, opacity;
  cursor: pointer;
}
.showcase-square .showcase-img-wrapper {
  width: 10rem;
  height: 10rem;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.3s ease;
}
.showcase-square:hover .showcase-img-wrapper {
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.25);
}
.showcase-square .showcase-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (min-width: 768px) {
  .showcase-square .showcase-img-wrapper {
    width: 12rem;
    height: 12rem;
  }
}

#showcase-scroll-container {
  -webkit-overflow-scrolling: touch;
  scroll-padding: 0 1rem;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
  scrollbar-width: none;
}
#showcase-scroll-container::-webkit-scrollbar {
  display: none;
}
.showcase-mobile-card {
  flex-shrink: 0;
  width: 64vw;
  max-width: 280px;
  scroll-snap-align: center;
}
.showcase-mobile-card .showcase-mobile-img {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: relative;
}
.showcase-mobile-card .showcase-mobile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#showcase-nav .showcase-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: var(--nav-dot-inactive-color);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}
#showcase-nav .showcase-dot.active {
  background-color: var(--brand-color);
  width: 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* ── О сервисе (Секция 3) — old about tabs (unused but safe) ── */
#about-content-container {
  position: relative;
  flex-grow: 1;
  min-height: 0;
  overflow: visible;
}

@media (min-width: 768px) {
  #about-content-container {
    overflow: hidden;
    padding: 1rem;
    margin: -1rem;
  }
}

[data-about-content-wrapper] {
  position: relative;
  height: 100%;
}

.about-content-item {
  display: none;
  height: 100%;
  overflow-y: auto;
  padding: 0 0.5rem 1rem;
  box-sizing: border-box;
}
.about-content-item.is-active {
  display: block;
}

@keyframes about-content-flow {
  0% {
    opacity: 0;
    transform: translateX(-20px) scale(0.9);
  }
  40% {
    opacity: 1;
    transform: translateX(0) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}
.about-content-item.is-animating {
  animation: about-content-flow 900ms ease-in-out forwards;
}

/* ── Навигация табов "О сервисе" ───────────────────── */
[data-about-nav] {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
}

[data-about-nav] .about-nav-dot,
#features-slider-nav .about-nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: var(--nav-dot-inactive-color);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}
[data-about-nav] .about-nav-dot.active,
#features-slider-nav .about-nav-dot.active {
  background-color: var(--primary-text-color);
  width: 32px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* ── Feature Cards (грид фич) ──────────────────────── */
@keyframes feature-item-appear {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.features-grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 0;
  padding: 0;
  margin: 0;
  scrollbar-width: none;
}
.features-grid::-webkit-scrollbar {
  display: none;
}

.features-page {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.375rem;
  padding: 0 0.5rem;
}

.feature-card {
  border-radius: 0.75rem;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  opacity: 0;
}
.feature-card.is-appearing {
  animation: feature-item-appear 600ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.feature-card.is-visible {
  opacity: 1;
  transform: none;
}

@media (hover: hover) and (pointer: fine) {
  .feature-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow:
      0 12px 24px rgba(0, 0, 0, 0.08),
      0 4px 8px rgba(0, 0, 0, 0.04);
  }
}

.feature-card .card-title {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.feature-card .card-text {
  font-size: 0.75rem;
  line-height: 1.3;
}

.about-footer-nav {
  padding: 0 0.5rem 0.5rem;
}

/* ── Glassmorphism навигация для табов ──────────────── */
.glassmorphism-nav {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1.25rem;
  padding: 0.125rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.about-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #374151;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s ease-in-out;
}
.about-nav-item .icon-wrapper {
  padding: 0.5rem;
  border-radius: 0.75rem;
  transition: all 0.2s ease-in-out;
}
.about-nav-item.active {
  color: var(--brand-color);
}
.about-nav-item.active .icon-wrapper {
  background-color: var(--brand-color);
  color: white;
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.1),
    0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* ── Шаги (Секция 4) ──────────────────────────────── */
.step-card {
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
}

@media (min-width: 768px) {
  .step-card {
    padding: 2rem;
    border-radius: 1.5rem;
  }
}

.step-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.step-card:nth-child(2) {
  transition-delay: 0.15s;
}
.step-card:nth-child(3) {
  transition-delay: 0.3s;
}
.step-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-color);
  opacity: 0.2;
  margin-bottom: 0.5rem;
  line-height: 1;
}

@media (min-width: 768px) {
  .step-number {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }
}

/* ── Horizontal swipers (steps, platforms) ────────── */
.steps-swiper,
.platforms-swiper {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

/* ── Cookie Banner ───────────────────────────────── */
#cookie-consent-banner {
  background-color: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(5px);
  color: white;
  z-index: 1000;
}
#cookie-consent-banner button {
  background-color: #a5b4fc;
  color: var(--primary-text-color);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}
#cookie-consent-banner button:hover {
  background-color: #818cf8;
}

/* ── Footer ────────────────────────────────────────── */
footer a {
  color: inherit;
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  #slide-nav {
    display: none;
  }
  .nav-dot {
    width: 6px;
    height: 6px;
  }
  .nav-dot.active {
    height: 24px;
  }
  .slide {
    padding: 3rem 0;
  }

  .top-nav-menu-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-grow: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .top-nav-menu-container::-webkit-scrollbar {
    display: none;
  }
  .top-nav-menu-container .top-nav-link {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .demo-slide-card {
    width: 220px;
  }
}

@media (min-width: 768px) {
  [data-about-content-wrapper] {
    display: flex;
    transition: transform 550ms cubic-bezier(0.4, 0, 0.2, 1);
  }
  .about-content-item {
    display: block;
    width: 100%;
    flex-shrink: 0;
    overflow: visible;
    padding: 0 1rem;
  }

  .features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 42rem;
    margin: 0 auto;
    overflow: visible;
  }
  .features-page {
    display: contents;
    padding: 0;
  }
  .feature-card {
    border-radius: 1.25rem;
    padding: 1.25rem;
  }
  .feature-card .card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }
  .feature-card .card-text {
    font-size: 1rem;
  }

  .top-nav-menu-container {
    display: flex;
    position: static;
    flex-direction: row;
    background-color: transparent;
    border-radius: 1.25rem;
    padding: 0.25rem;
    gap: 0.25rem;
  }

  /* Десктопные кнопки навигации "О сервисе" */
  .about-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 4rem;
    height: 4rem;
    padding: 0.5rem;
    background: transparent !important;
    z-index: 20;
    border-radius: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
  }
  .about-nav-button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #ffffff;
    border-radius: inherit;
    z-index: 0;
  }
  .about-nav-button:hover {
    transform: translateY(-50%) scale(1.05);
  }
  #about-prev-btn {
    left: -1.5rem;
  }
  #about-next-btn {
    right: -1.5rem;
  }
  .about-nav-button .icon-container {
    height: 1.75rem;
    position: relative;
    z-index: 1;
  }
  .about-nav-button .text-container {
    font-size: 0.625rem;
    font-weight: 600;
    color: #4b5563;
    line-height: 1.25;
    margin-top: 0.25rem;
    position: relative;
    z-index: 1;
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(160px, auto);
    gap: 1.25rem;
    max-width: 56rem;
  }
}

@media (max-width: 480px) {
  .demo-slide-card {
    width: 180px;
  }
  .top-nav-link {
    font-size: 0.75rem;
    padding: 0.4rem 0.75rem;
  }
}
