/**
 * Cinematic landing bridge styles: section wipes, modals, motion utilities
 */

/* Section act transitions */
.lc-wipe {
  position: relative;
  height: clamp(3rem, 8vw, 5rem);
  margin: -1px 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.lc-wipe::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--lc-surface, #121e21);
  clip-path: ellipse(120% 100% at 50% 100%);
}

.lc-wipe--convert::before {
  clip-path: ellipse(120% 100% at 50% 0%);
  background: linear-gradient(180deg, #031427 0%, #020810 100%);
}

.lc-wipe--story::before {
  clip-path: polygon(0 40%, 100% 0, 100% 100%, 0 100%);
  background: #020810;
}

/* UTM slide-in */
.lc-utm-banner {
  animation: lc-utm-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.35s;
}

@keyframes lc-utm-in {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lc-utm-banner {
    animation: none;
  }
}

/* Nav scroll state */
body.landing-cinematic.lc-scrolled .lc-nav {
  top: 0.65rem;
  padding-block: 0.45rem;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
}

/* Testimonials horizontal pin track (scroll variant only) */
.lc-testimonials__stage:has(.lc-testimonials__track--scroll) {
  overflow: hidden;
  min-height: 420px;
}

@media (min-width: 900px) {
  .lc-testimonials__stage .lc-testimonials__track--scroll {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    padding-bottom: 1rem;
  }

  .lc-testimonials__stage .lc-testimonials__track--scroll .lc-testimonial-card {
    flex: 0 0 min(420px, 72vw);
  }
}

.lc-testimonial-card.is-zoomed {
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.55), 0 0 40px rgba(255, 212, 115, 0.12);
}

/* Pricing legendary rune border */
.lc-pricing-card--legend {
  position: relative;
}

.lc-pricing-card--legend::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--lc-radius) + 2px);
  padding: 2px;
  background: conic-gradient(
    from var(--lc-rune-angle, 0deg),
    rgba(255, 212, 115, 0.9),
    rgba(0, 240, 255, 0.5),
    rgba(255, 0, 170, 0.35),
    rgba(255, 212, 115, 0.9)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
}

/* Terminal cursor blink */
.lc-terminal__prompt::after {
  content: "▋";
  display: inline-block;
  margin-left: 0.15rem;
  color: var(--lc-cyan);
  animation: lc-blink 1s step-end infinite;
}

@keyframes lc-blink {
  50% {
    opacity: 0;
  }
}

.lc-input:focus {
  outline: none;
  border-color: var(--lc-cyan);
  box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.35), 0 0 24px rgba(0, 240, 255, 0.15);
}

/* Success ripple */
.lc-form-msg.is-success {
  animation: lc-success-pop 0.55s ease;
}

@keyframes lc-success-pop {
  0% {
    transform: scale(0.92);
    opacity: 0;
  }
  60% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Cinematic modals (when body.landing-cinematic) */
body.landing-cinematic #errorOverlay.error-overlay {
  background: rgba(2, 8, 16, 0.88);
  backdrop-filter: blur(12px);
}

body.landing-cinematic #errorOverlay .error-overlay-content {
  background: rgba(3, 20, 39, 0.95);
  border: 1px solid rgba(255, 0, 100, 0.35);
  border-radius: 14px;
  box-shadow: 0 0 48px rgba(255, 0, 100, 0.15);
  color: #d3e4fe;
  max-width: 420px;
}

body.landing-cinematic #errorOverlay.is-shake .error-overlay-content {
  animation: lc-error-shake 0.45s ease;
}

@keyframes lc-error-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(5px);
  }
}

body.landing-cinematic #ndaModal.modal {
  background: rgba(2, 8, 16, 0.92);
  backdrop-filter: blur(16px);
}

body.landing-cinematic #ndaModal .modal-panel {
  background: rgba(3, 20, 39, 0.98);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 14px;
  color: #d3e4fe;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65), 0 0 40px rgba(0, 240, 255, 0.08);
}

body.landing-cinematic #ndaModal.is-glitch-open .modal-panel {
  animation: lc-glitch-in 0.35s steps(2, end);
}

@keyframes lc-glitch-in {
  0% {
    opacity: 0;
    transform: scale(0.96) skewX(2deg);
    filter: hue-rotate(20deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.01) skewX(-1deg);
  }
  100% {
    transform: none;
    filter: none;
  }
}

body.landing-cinematic .lc-vault-step.is-active {
  animation: lc-vault-slide 0.45s ease;
}

@keyframes lc-vault-slide {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

body.landing-cinematic #successStep .success-icon {
  animation: lc-check-burst 0.6s ease;
}

@keyframes lc-check-burst {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  70% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Storylane curtain */
.lc-storylane__curtain {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #031427 0%, #031427 48%, transparent 52%);
  transform: translateX(0);
  pointer-events: none;
  z-index: 2;
}

.lc-storylane__chamber {
  position: relative;
}

/* Portal eye + visualizer */
.lc-portal__eye {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(120px, 22vw);
  height: min(120px, 22vw);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0%, #00f0ff 25%, #031427 70%);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.45);
  z-index: 1;
}

.lc-portal__eye::after {
  content: "";
  position: absolute;
  width: 28%;
  height: 28%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #031427;
}

.lc-portal__viz {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 28px;
  margin-top: 1rem;
}

.lc-portal__viz span {
  width: 4px;
  border-radius: 2px;
  background: var(--lc-gold);
  animation: lc-viz-bar 0.8s ease-in-out infinite alternate;
}

.lc-portal__viz span:nth-child(2) {
  animation-delay: 0.1s;
}
.lc-portal__viz span:nth-child(3) {
  animation-delay: 0.2s;
}
.lc-portal__viz span:nth-child(4) {
  animation-delay: 0.15s;
}
.lc-portal__viz span:nth-child(5) {
  animation-delay: 0.25s;
}

@keyframes lc-viz-bar {
  from {
    height: 6px;
    opacity: 0.4;
  }
  to {
    height: 22px;
    opacity: 1;
  }
}

.lc-tier-low .lc-fx--grain,
.lc-tier-low .lc-fx--scanlines {
  display: none;
}

.lc-fx-reduced .lc-fx--scanlines {
  opacity: 0.15;
}

@media (prefers-reduced-motion: reduce) {
  .lc-portal__viz span,
  .lc-footer__marquee-track {
    animation: none !important;
  }
}
