/* Видео-экскурсия: кнопка + модалка (главная, письма) */

.section--video-tour .video-tour-card {
  position: relative;
  margin-bottom: 0;
  padding: 1.35rem 1.5rem 1.45rem;
  border: 2px solid var(--accent);
  border-radius: 16px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(107, 45, 74, 0.08) 0%, transparent 55%),
    radial-gradient(90% 70% at 100% 100%, rgba(143, 61, 98, 0.07) 0%, transparent 50%),
    linear-gradient(135deg, #fffdf9 0%, #f4ebe8 100%);
  box-shadow: var(--shadow);
}

.section--video-tour .video-tour-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(107, 45, 74, 0.14);
  border-radius: 11px;
  pointer-events: none;
}

.section--video-tour .section__title {
  position: relative;
  z-index: 1;
  margin-bottom: 0.65rem;
  text-align: center;
}

.section--video-tour .section__lead--wide {
  position: relative;
  z-index: 1;
  margin-bottom: 1.1rem;
}

.video-tour-highlights {
  list-style: none;
  position: relative;
  z-index: 1;
  margin: 0 0 1.15rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.video-tour-highlights__item {
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid rgba(107, 45, 74, 0.16);
  border-radius: 12px;
  padding: 1rem 1.05rem;
  box-shadow: 0 2px 10px rgba(30, 26, 36, 0.04);
}

.video-tour-highlights__title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--accent);
}

.video-tour-highlights__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
}

.video-tour-cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  position: relative;
  z-index: 1;
  margin: 0;
  width: 100%;
}
.video-tour-cta-wrap .btn--offer-cta {
  width: 100%;
  min-height: 2.75rem;
}

.video-tour-cta__after {
  margin: 0.85rem 0 0;
  max-width: 42rem;
  text-align: center;
  font-size: 0.94rem;
  line-height: 1.58;
  color: var(--muted);
}

.video-tour-cta__after strong {
  color: var(--accent);
}

.video-tour-cta-bob {
  animation: video-tour-glass-float 5.2s ease-in-out infinite;
  animation-delay: 0.35s;
}

.glass-shatter-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  padding: 0.88rem clamp(0.75rem, 2.5vw, 1.45rem);
  border-radius: 18px;
  border: 1px solid rgba(143, 61, 98, 0.42);
  color: #fff8f4;
  font-weight: 800;
  font-size: clamp(0.95rem, 2.6vw, 1.12rem);
  letter-spacing: -0.02em;
  text-shadow: 0 1px 14px rgba(30, 26, 36, 0.45);
  cursor: pointer;
  appearance: none;
  font-family: inherit;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(
      155deg,
      rgba(255, 253, 249, 0.22) 0%,
      rgba(143, 61, 98, 0.18) 38%,
      rgba(74, 28, 52, 0.82) 100%
    ),
    rgba(50, 22, 38, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 0 0 1px rgba(107, 45, 74, 0.28),
    0 18px 44px rgba(30, 26, 36, 0.35),
    0 0 28px rgba(143, 61, 98, 0.14),
    inset 0 1px 0 rgba(255, 253, 249, 0.22);
  transition:
    transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.glass-shatter-cta:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(143, 61, 98, 0.62);
  box-shadow:
    0 0 0 1px rgba(107, 45, 74, 0.4),
    0 22px 52px rgba(30, 26, 36, 0.42),
    0 0 40px rgba(143, 61, 98, 0.22),
    inset 0 1px 0 rgba(255, 253, 249, 0.3);
}

.glass-shatter-cta:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 4px;
}

.glass-shatter-cta__prism {
  position: absolute;
  inset: -40%;
  z-index: 0;
  opacity: 0.32;
  background: conic-gradient(
    from 120deg at 50% 50%,
    rgba(143, 61, 98, 0.55),
    rgba(107, 45, 74, 0.4),
    rgba(255, 253, 249, 0.2),
    rgba(143, 61, 98, 0.5),
    rgba(107, 45, 74, 0.45),
    rgba(143, 61, 98, 0.55)
  );
  animation: video-tour-glass-prism 8s linear infinite;
  pointer-events: none;
}

.glass-shatter-cta__glint {
  position: absolute;
  top: 0;
  left: -30%;
  width: 45%;
  height: 100%;
  z-index: 2;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 35%,
    rgba(255, 253, 249, 0.5) 50%,
    rgba(255, 255, 255, 0) 65%,
    transparent 100%
  );
  transform: skewX(-18deg);
  animation: video-tour-glass-glint 3.2s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.glass-shatter-cta__shards {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.glass-shatter-cta__shard {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  border: 1px solid rgba(255, 253, 249, 0.14);
  background: linear-gradient(135deg, rgba(255, 253, 249, 0.1), transparent 55%);
  animation: video-tour-glass-shard 3.5s ease-in-out infinite;
  transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.35s ease;
}

.glass-shatter-cta__shard--a { clip-path: polygon(0 0, 52% 0, 48% 100%, 0 100%); }
.glass-shatter-cta__shard--b { clip-path: polygon(52% 0, 100% 0, 100% 48%, 48% 52%); animation-delay: 0.25s; }
.glass-shatter-cta__shard--c { clip-path: polygon(48% 52%, 100% 48%, 100% 100%, 42% 100%); animation-delay: 0.5s; }
.glass-shatter-cta__shard--d { clip-path: polygon(0 0, 48% 52%, 42% 100%, 0 100%); animation-delay: 0.15s; }
.glass-shatter-cta__shard--e {
  clip-path: polygon(30% 18%, 70% 12%, 62% 88%, 28% 82%);
  opacity: 0.32;
  animation-delay: 0.4s;
}

.glass-shatter-cta:hover .glass-shatter-cta__shard { opacity: 0.72; }

.glass-shatter-cta__cracks {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.85;
}

.glass-shatter-cta__crack-path {
  stroke: rgba(255, 253, 249, 0.28);
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: video-tour-glass-cracks 2.4s ease-out forwards, video-tour-glass-shimmer 4s ease-in-out 2.4s infinite;
}

.glass-shatter-cta__label {
  position: relative;
  z-index: 3;
  text-align: center;
  line-height: 1.25;
  max-width: 20rem;
}

@keyframes video-tour-glass-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes video-tour-glass-prism { to { transform: rotate(360deg); } }

@keyframes video-tour-glass-glint {
  0%, 12% { left: -35%; opacity: 0; }
  22% { opacity: 1; }
  45%, 100% { left: 120%; opacity: 0; }
}

@keyframes video-tour-glass-shard {
  0%, 100% { opacity: 0.38; }
  50% { opacity: 0.62; }
}

@keyframes video-tour-glass-cracks { to { stroke-dashoffset: 0; } }

@keyframes video-tour-glass-shimmer {
  0%, 100% { stroke: rgba(255, 253, 249, 0.2); }
  50% { stroke: rgba(255, 230, 240, 0.48); }
}

/* Модальное окно */
.video-tour-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  background: rgba(30, 26, 36, 0.92);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.video-tour-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.video-tour-modal__panel {
  position: relative;
  width: min(960px, calc(100vw - 0.7rem));
  max-width: 960px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(107, 45, 74, 0.35);
  background: #000;
  box-shadow: 0 24px 64px rgba(30, 26, 36, 0.45);
  display: flex;
  flex-direction: column;
}

.video-tour-modal__close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fffdf9;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.video-tour-modal__close:hover { background: #f3e8ef; }

.video-tour-modal__stage {
  position: relative;
  width: 100%;
  line-height: 0;
  background: #000;
  flex: 1 1 auto;
  min-height: 0;
}

.video-tour-modal__stage video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: calc(100dvh - 1.25rem);
  vertical-align: top;
  background: #000;
}

@media (max-width: 680px) {
  .section--video-tour .video-tour-card {
    padding: 1.1rem 1rem 1.15rem;
  }
  .section--video-tour .video-tour-card::before {
    inset: 5px;
    border-radius: 10px;
  }
  .video-tour-highlights {
    grid-template-columns: 1fr;
  }
  .video-tour-modal { padding: 0.2rem; }
  .video-tour-modal__panel {
    width: calc(100vw - 0.4rem);
    max-width: calc(100vw - 0.4rem);
    border-radius: 8px;
  }
  .video-tour-modal__stage video {
    max-height: calc(100dvh - 0.75rem);
  }
}

@media (max-width: 920px) and (orientation: landscape) {
  .video-tour-modal {
    padding: 0;
    align-items: stretch;
  }
  .video-tour-modal__panel {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: 0;
  }
  .video-tour-modal__stage {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
  }
  .video-tour-modal__stage video {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
  }
  .video-tour-modal__close {
    top: max(0.5rem, env(safe-area-inset-top, 0px));
    right: max(0.5rem, env(safe-area-inset-right, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-tour-cta-bob { animation: none !important; }
  .glass-shatter-cta__prism,
  .glass-shatter-cta__glint,
  .glass-shatter-cta__shard,
  .glass-shatter-cta__crack-path {
    animation: none !important;
    stroke-dashoffset: 0;
  }
}
