/* ===================================================================
   landing.css — Feature Carousel, точное соответствие оригиналу
   =================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:      #62B2FE;
  --bg:         #ffffff;
  --bg2:        #f0f8ff;
  --foreground: #1e3a5f;
  --border:     rgba(59,130,246,0.15);
  --item-h:     65px;
}

html, body {
  height: 100%;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 50%, #dbeafe 100%);
  color: var(--foreground);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  transition: opacity 0.45s ease;
  overflow: hidden;
}

/* ── Auth-identical background layers ── */
.lp-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 50%, #dbeafe 100%);
}

.lp-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
}
.lp-orb--tl {
  width: 384px; height: 384px;
  top: 25%; left: 25%;
  background: rgba(96,165,250,0.18);
  animation: lp-orb-pulse 4s ease-in-out infinite;
}
.lp-orb--br {
  width: 384px; height: 384px;
  bottom: 25%; right: 25%;
  background: rgba(59,130,246,0.18);
  animation: lp-orb-pulse 4s ease-in-out infinite 1s;
}
@keyframes lp-orb-pulse {
  0%,100% { opacity:.7; transform:scale(1); }
  50%     { opacity:1;  transform:scale(1.08); }
}

.lp-grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.025;
  background-image:
    linear-gradient(rgba(59,130,246,0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.5) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* Page wrapper */
.lp-page {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 100vh;
  width: 100%;
  padding: 2rem;
  background: transparent;
}

/* Outer card — max-w-7xl aspect-video
   Ширина ограничена так, чтобы высота (w * 9/16) всегда влезала в viewport */
.lp-wrap {
  position: relative;
  width: min(100%, calc((100vh - 4rem) * 19 / 9), 1600px);
  border-radius: 4rem;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  aspect-ratio: 19 / 9;
  border: 1px solid rgba(59,130,246,0.18);
  box-shadow: 0 8px 64px rgba(59,130,246,0.10);
}

.lp-support {
  position: absolute;
  left: 50%;
  bottom: 1.35rem;
  transform: translateX(-50%);
  z-index: 50;
  width: min(calc(100% - 3rem), 820px);
  padding: 0.9rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(59, 130, 246, 0.16);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: center;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
}

.lp-support__label {
  color: rgba(30, 58, 95, 0.88);
  font-size: 0.85rem;
  font-weight: 500;
}

.lp-support__email {
  margin-left: 0.4rem;
  color: #1d4ed8;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  word-break: break-word;
}

.lp-support__email:hover {
  color: #1e40af;
  text-decoration: underline;
}

/* ── LEFT PANEL ── */
.lp-left {
  width: 24%;
  flex-shrink: 0;
  background: var(--brand);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  z-index: 30;
}
.lp-left::before {
  content: '';
  position: absolute;
  inset-x: 0; top: 0;
  height: 64px;
  background: linear-gradient(to bottom, #62B2FE 0%, rgba(98,178,254,0.8) 60%, transparent 100%);
  z-index: 40;
  pointer-events: none;
}
.lp-left::after {
  content: '';
  position: absolute;
  inset-x: 0; bottom: 0;
  height: 64px;
  background: linear-gradient(to top, #62B2FE 0%, rgba(98,178,254,0.8) 60%, transparent 100%);
  z-index: 40;
  pointer-events: none;
}

/* Feature rail */
.lp-rail-wrap {
  position: relative;
  width: 100%;
  height: calc(var(--item-h) * 5);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  z-index: 20;
}

.lp-feature-item {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--item-h);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.5s cubic-bezier(.34,1.56,.64,1),
    opacity   0.4s ease;
  will-change: transform, opacity;
}

/* Pill button inactive */
.lp-feature-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: var(--lp-feature-btn-width, auto);
  padding: .875rem 2rem;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-size: .8125rem;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .3s, color .3s, background .3s;
  line-height: 1;
}
.lp-feature-btn:hover {
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
.lp-feature-btn.is-active {
  background: #fff;
  color: var(--brand);
  border-color: #fff;
  z-index: 10;
}
.lp-feature-icon {
  display: flex;
  align-items: center;
  color: rgba(255,255,255,0.4);
  transition: color .5s;
  flex-shrink: 0;
}
.lp-feature-btn.is-active .lp-feature-icon {
  color: var(--brand);
}
.lp-feature-icon svg {
  width: 18px; height: 18px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  display: block;
}

/* ── RIGHT PANEL ── */
.lp-right {
  flex: 1;
  position: relative;
  background: rgba(219, 234, 254, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 4rem 6.75rem;
  overflow: visible;
  border-left: 1px solid rgba(59,130,246,0.12);
}

/* Card stack */
.lp-card-stack {
  position: relative;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 3 / 2;
  overflow: visible;
  border-radius: 2.8rem;
}

.lp-card-stack::after {
  display: none;
}

.lp-img-card {
  position: absolute;
  inset: 0;
  border-radius: 2.8rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 8px solid #ffffff;
  background: #ffffff;
  transition:
    transform  0.85s cubic-bezier(.34,1.2,.64,1),
    opacity    0.6s ease;
  transform-origin: center;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  isolation: isolate;
  box-shadow: 0 20px 42px rgba(37, 99, 235, 0.18);
}
.lp-img-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  /* border-radius на самом img — закругления не пропадают при transform */
  border-radius: calc(2.8rem - 8px);
  transition: filter 0.7s ease;
}

.lp-img-card.is-active {
  transform: translateX(0) scale(1) rotate(0deg);
  opacity: 1;
  z-index: 20;
  pointer-events: auto;
}
.lp-img-card.is-active img { filter: none; }

.lp-img-card.is-prev {
  transform: translateX(-18%) scale(0.92) rotate(-4deg);
  opacity: .56;
  z-index: 10;
  pointer-events: auto;
  cursor: pointer;
}
.lp-img-card.is-prev img { filter: grayscale(1) blur(2px) brightness(.75); }

.lp-img-card.is-next {
  transform: translateX(18%) scale(0.92) rotate(4deg);
  opacity: .56;
  z-index: 10;
  pointer-events: auto;
  cursor: pointer;
}
.lp-img-card.is-next img { filter: grayscale(1) blur(2px) brightness(.75); }

.lp-img-card.is-hidden {
  transform: translateX(0) scale(0.7);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}

/* Card caption */
.lp-card-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 8rem 2.5rem 2.5rem;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,.2) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: .75rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.lp-img-card.is-active .lp-card-caption {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease 0.05s, transform 0.3s ease 0.05s;
}
/* AnimatePresence-подобный reset при смене карточки */
.lp-img-card.is-active .lp-card-caption.is-entering {
  opacity: 0;
  transform: translateY(20px);
  transition: none;
}

.lp-card-label {
  display: inline-flex;
  align-self: flex-start;
  background: rgba(255,255,255,0.78);
  color: #1e3a5f;
  border: 1px solid rgba(255,255,255,0.34);
  border-radius: 9999px;
  font-size: .6875rem;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: .35rem 1rem;
  margin-bottom: .75rem;
}

.lp-card-desc {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -.015em;
}

/* Live badge */
.lp-live-badge {
  position: absolute;
  top: 2rem; left: 2rem;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.lp-img-card.is-active .lp-live-badge { opacity: 1; }
.lp-live-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 20px rgba(255,255,255,1), 0 0 36px rgba(255,255,255,0.92);
  animation: lp-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes lp-pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%     { opacity:.5; transform:scale(.7); }
}
.lp-live-text {
  color: #ffffff;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
  font-family: monospace;
  text-shadow: 0 0 16px rgba(255,255,255,0.92), 0 2px 24px rgba(255,255,255,0.62);
}

/* ── CTA button — same style as active pill ── */
.lp-cta {
  position: absolute;
  bottom: 2rem;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  pointer-events: none;
}

.lp-cta-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: var(--lp-feature-btn-width, auto);
  padding: .875rem 2rem;
  border-radius: 9999px;
  border: 1px solid #fff;
  background: #fff;
  color: var(--brand);
  font-size: .8125rem;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease;
}

.lp-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.lp-cta-btn:active {
  transform: translateY(1px) scale(0.98);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .lp-wrap { border-radius: 2.5rem; aspect-ratio: auto; min-height: auto; }
}
@media (max-width: 768px) {
  html, body { overflow: auto; }
  .lp-page { padding: 1.5rem 1rem 6rem; align-items: flex-start; padding-top: 1.5rem; min-height: auto; }
  .lp-wrap { flex-direction: column; border-radius: 1.75rem; aspect-ratio: auto; }
  .lp-right { min-height: 420px; padding: 3rem 1.5rem 1.5rem; border-left: none; border-top: 1px solid rgba(59,130,246,0.12); overflow: hidden; }
  .lp-support {
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    width: min(100%, 30rem);
    margin: 1.25rem auto 0;
    border-radius: 1rem;
    padding: 0.85rem 1rem;
  }
  .lp-left { width: 100%; min-height: 280px; padding: 2rem 2rem; }
  .lp-card-stack { max-width: 280px; overflow: hidden; }
  .lp-card-stack::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 2.8rem;
    box-shadow: inset 0 0 0 8px #ffffff;
    pointer-events: none;
    z-index: 40;
    display: block;
  }
  .lp-img-card.is-prev,
  .lp-img-card.is-next {
    transform: translateX(0) scale(0.96) rotate(0deg);
    opacity: 0;
  }
  .lp-feature-btn { padding: .75rem 1.5rem; font-size: .75rem; }
  .lp-rail-wrap { height: calc(var(--item-h) * 4); }
  .lp-card-desc { font-size: 1rem; }
}
@media (max-width: 480px) {
  .lp-left { padding: 1.5rem 1.25rem; }
  .lp-right { padding: 2rem 1rem 1rem; }
  .lp-support {
    padding: 0.8rem 0.9rem;
    line-height: 1.45;
  }
  .lp-support__label,
  .lp-support__email {
    display: block;
    margin-left: 0;
  }
  .lp-card-stack { max-width: 220px; }
  .lp-feature-btn { padding: .65rem 1.1rem; gap: .6rem; font-size: .7rem; }
  .lp-cta-btn { padding: .65rem 1.1rem; font-size: .7rem; }
  .lp-img-card { border-width: 4px; border-radius: 2rem; }
}
