/* Moonslayers — motion layer. Effects are chosen per element in Elementor
   (Advanced → "Moonslayers — Animații"); Elementor adds the matching class on the element.
   Only transform / opacity / filter / clip-path animate, so the browser keeps them off the
   main thread. Hidden "before" states exist only under html.ms-motion, which the head script
   sets when motion is allowed — without JS, or with reduced motion, everything is just visible. */

:root {
  --ms-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ms-glow-color: var(--e-global-color-primary, #c8123d);
}

/* ---------- Reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.ms-motion [class*="ms-reveal-"]:not(.ms-reveal-load):not(.ms-reveal-stagger) {
    transition:
      opacity 0.9s var(--ms-ease) var(--ms-delay, 0ms),
      translate 0.9s var(--ms-ease) var(--ms-delay, 0ms),
      scale 0.9s var(--ms-ease) var(--ms-delay, 0ms),
      filter 0.9s var(--ms-ease) var(--ms-delay, 0ms),
      clip-path 1.1s var(--ms-ease) var(--ms-delay, 0ms);
  }
  html.ms-motion .ms-reveal-up:not(.ms-in) { opacity: 0; translate: 0 48px; }
  html.ms-motion .ms-reveal-fade:not(.ms-in) { opacity: 0; }
  html.ms-motion .ms-reveal-zoom:not(.ms-in) { opacity: 0; scale: 0.9; }
  html.ms-motion .ms-reveal-blur:not(.ms-in) { opacity: 0; filter: blur(16px); }
  html.ms-motion .ms-reveal-left:not(.ms-in) { opacity: 0; translate: -64px 0; }
  html.ms-motion .ms-reveal-right:not(.ms-in) { opacity: 0; translate: 64px 0; }
  /* the content is clipped, not the element itself: Chrome never reports a fully clipped
     element as visible, so the reveal would never start. Negative insets leave room for glows. */
  html.ms-motion .ms-reveal-mask > * { clip-path: inset(-25% -12% -25% -12%); transition: clip-path 1.1s var(--ms-ease) var(--ms-delay, 0ms); }
  html.ms-motion .ms-reveal-mask:not(.ms-in) > * { clip-path: inset(-25% -12% 100% -12%); }

  /* "Copiii pe rand": the container's elements arrive one after another */
  html.ms-motion .ms-reveal-stagger > .elementor-element,
  html.ms-motion .ms-reveal-stagger > .e-con-inner > .elementor-element {
    transition:
      opacity 0.8s var(--ms-ease) calc(var(--ms-delay, 0ms) + var(--ms-i, 0) * 110ms),
      translate 0.8s var(--ms-ease) calc(var(--ms-delay, 0ms) + var(--ms-i, 0) * 110ms);
  }
  html.ms-motion .ms-reveal-stagger:not(.ms-in) > .elementor-element,
  html.ms-motion .ms-reveal-stagger:not(.ms-in) > .e-con-inner > .elementor-element { opacity: 0; translate: 0 40px; }

  /* "La incarcare": runs at first paint, no JS needed — for the top of the page */
  .ms-reveal-load { animation: ms-load-up 1s var(--ms-ease) var(--ms-delay, 0ms) both; }
}

@keyframes ms-load-up { from { opacity: 0; translate: 0 40px; } }

/* ---------- Parallax (scroll-driven where supported, JS fallback elsewhere) ---------- */
.ms-par-slow { --ms-par: 40px; }
.ms-par-medium { --ms-par: 80px; }
.ms-par-fast { --ms-par: 140px; }
.ms-par-reverse { --ms-par: -80px; }
@media (max-width: 767px) {
  .ms-par-slow { --ms-par: 20px; }
  .ms-par-medium { --ms-par: 40px; }
  .ms-par-fast { --ms-par: 70px; }
  .ms-par-reverse { --ms-par: -40px; }
}
.ms-par-zoom { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .ms-par-slow, .ms-par-medium, .ms-par-fast, .ms-par-reverse {
      animation: ms-par linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
    .ms-par-zoom img, .ms-par-zoom video {
      animation: ms-par-zoom linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
  }
}
@keyframes ms-par {
  from { transform: translate3d(0, var(--ms-par), 0); }
  to { transform: translate3d(0, calc(var(--ms-par) * -1), 0); }
}
@keyframes ms-par-zoom { from { transform: scale(1.18); } to { transform: scale(1); } }

/* ---------- Neon ---------- */
.ms-neon-glow .elementor-heading-title,
.ms-neon-flicker .elementor-heading-title,
.ms-neon-pulse .elementor-heading-title {
  text-shadow:
    0 0 3px color-mix(in srgb, currentColor 80%, #fff),
    0 0 18px color-mix(in srgb, currentColor 70%, transparent),
    0 0 46px color-mix(in srgb, currentColor 40%, transparent);
}
.ms-neon-glow .elementor-button,
.ms-neon-flicker .elementor-button,
.ms-neon-pulse .elementor-button {
  box-shadow: 0 0 26px color-mix(in srgb, var(--ms-glow-color) 60%, transparent);
}
.ms-neon-border > .e-con-inner,
.e-con-full.ms-neon-border,
.elementor-widget.ms-neon-border img,
.elementor-widget.ms-neon-border video {
  border-radius: inherit;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--ms-glow-color) 55%, transparent),
    0 0 34px color-mix(in srgb, var(--ms-glow-color) 32%, transparent);
}
/* Ambient glow behind a section — two soft wine lights that breathe while visible */
.ms-neon-ambient { position: relative; isolation: isolate; }
.ms-neon-ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42% 52% at 22% 28%, color-mix(in srgb, var(--ms-glow-color) 24%, transparent), transparent 70%),
    radial-gradient(38% 48% at 80% 72%, color-mix(in srgb, var(--e-global-color-secondary, #8c0d2e) 34%, transparent), transparent 70%);
  opacity: 0.85;
}

@media (prefers-reduced-motion: no-preference) {
  .ms-neon-flicker.ms-seen .elementor-heading-title,
  .ms-neon-flicker.ms-seen .elementor-button { animation: ms-flicker 1.5s linear 0.2s 1 both; }
  .ms-neon-pulse.ms-in-view .elementor-heading-title,
  .ms-neon-pulse.ms-in-view .elementor-button { animation: ms-pulse 3.4s ease-in-out infinite alternate; }
  .ms-neon-ambient.ms-in-view::after { animation: ms-breathe 9s ease-in-out infinite alternate; }
  /* the neon half of a two-tone title switches on like a tube, once */
  .ms-title-split .elementor-heading-title span { animation: ms-flicker 1.5s linear 0.9s 1 both; }
}
@keyframes ms-flicker {
  0%, 15%, 21%, 27%, 52%, 57%, 100% { opacity: 1; }
  17%, 24%, 54% { opacity: 0.28; }
}
@keyframes ms-pulse { from { opacity: 0.82; } to { opacity: 1; } }
@keyframes ms-breathe { from { opacity: 0.55; transform: scale(1); } to { opacity: 1; transform: scale(1.08); } }

/* ---------- Hover (mouse only) ---------- */
@media (hover: hover) and (pointer: fine) {
  .ms-hover-lift > *,
  .ms-hover-glow > *,
  .ms-hover-tilt > *,
  .ms-hover-magnetic > * { transition: transform 0.45s var(--ms-ease), box-shadow 0.45s var(--ms-ease), filter 0.45s var(--ms-ease); }
  .ms-hover-tilt > * { transform-style: preserve-3d; will-change: transform; }
  .ms-hover-lift:hover > * {
    transform: translateY(-8px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 30px color-mix(in srgb, var(--ms-glow-color) 30%, transparent);
  }
  .ms-hover-glow:hover > * { filter: drop-shadow(0 0 18px color-mix(in srgb, var(--ms-glow-color) 65%, transparent)); }
  .ms-hover-zoom img { transition: transform 0.9s var(--ms-ease), filter 0.9s var(--ms-ease); }
  .ms-hover-zoom:hover img { transform: scale(1.07); filter: saturate(1.15); }
}
.ms-hover-zoom { overflow: hidden; }

/* ---------- Marquee (container whose elements flow continuously) ---------- */
.ms-marquee-ready,
.ms-marquee-ready > .e-con-inner { display: block !important; overflow: hidden; }
.ms-marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  will-change: transform;
}
.ms-marquee__track > .elementor-element {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  padding-right: var(--ms-marquee-gap, 72px);
}
@media (prefers-reduced-motion: no-preference) {
  .ms-marquee__track { animation: ms-marquee var(--ms-marquee-dur, 32s) linear infinite; }
  .ms-marquee-right .ms-marquee__track { animation-direction: reverse; }
  .ms-marquee-ready.ms-offscreen .ms-marquee__track,
  .ms-marquee-ready:hover .ms-marquee__track,
  .ms-marquee-ready:focus-within .ms-marquee__track { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .ms-marquee-ready, .ms-marquee-ready > .e-con-inner { overflow-x: auto; }
}
@keyframes ms-marquee { to { transform: translate3d(var(--ms-marquee-shift, -50%), 0, 0); } }

/* ---------- Media ratio (images / videos fill the chosen shape) ---------- */
.ms-ratio-916 img, .ms-ratio-916 video { aspect-ratio: 9 / 16; }
.ms-ratio-45 img, .ms-ratio-45 video { aspect-ratio: 4 / 5; }
.ms-ratio-11 img, .ms-ratio-11 video { aspect-ratio: 1 / 1; }
.ms-ratio-169 img, .ms-ratio-169 video { aspect-ratio: 16 / 9; }
[class*="ms-ratio-"] img, [class*="ms-ratio-"] video { width: 100%; height: auto; object-fit: cover; display: block; }

/* ---------- Video "pro" ---------- */
.ms-video-pro { position: relative; }
.ms-video-pro .elementor-wrapper { position: relative; overflow: hidden; border-radius: inherit; }
.ms-video-pro video { display: block; width: 100%; object-fit: cover; background: #000; }
.ms-video__controls {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  gap: 10px;
}
.ms-video__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: rgba(5, 3, 4, 0.72);
  color: #fff;
  line-height: 0;
  cursor: pointer;
  transition: width 0.3s ease, height 0.3s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.ms-video__btn:hover { border-color: var(--ms-glow-color); background: color-mix(in srgb, var(--ms-glow-color) 45%, transparent); }
.ms-video__btn:focus-visible { outline: 2px solid #ff6b86; outline-offset: 3px; }
.ms-video__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ms-video-waiting .ms-video__btn--play { width: 58px; height: 58px; border-color: #ff2d55; background: color-mix(in srgb, var(--ms-glow-color) 70%, transparent); }

/* ---------- Cursor glow + scroll progress + page transitions ---------- */
.ms-cursor-glow {
  position: fixed;
  left: -210px;
  top: -210px;
  z-index: 9998;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--ms-glow-color) 20%, transparent), transparent 65%);
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: transform;
}
.ms-cursor-glow.is-on { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    body.ms-progress-on::before {
      content: "";
      position: fixed;
      inset: 0 0 auto 0;
      z-index: 100001;
      height: 3px;
      background: linear-gradient(90deg, var(--e-global-color-secondary, #8c0d2e), #ff2d55);
      box-shadow: 0 0 12px #ff2d55;
      transform-origin: 0 50%;
      animation: ms-progress linear both;
      animation-timeline: scroll(root);
      pointer-events: none;
    }
  }
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: ms-vt-out 0.3s ease both; }
  ::view-transition-new(root) { animation: ms-vt-in 0.5s var(--ms-ease) both; }
}
@keyframes ms-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ms-vt-out { to { opacity: 0; transform: scale(0.985); } }
@keyframes ms-vt-in { from { opacity: 0; transform: scale(1.015); } }

/* ---------- Editor: everything visible and still, so it can be edited ---------- */
.elementor-editor-active [class*="ms-reveal-"],
.elementor-editor-active .ms-reveal-stagger > .elementor-element,
.elementor-editor-active .ms-reveal-stagger > .e-con-inner > .elementor-element,
.elementor-editor-active .ms-reveal-mask > * {
  opacity: 1 !important;
  translate: none !important;
  scale: none !important;
  filter: none !important;
  clip-path: none !important;
}

/* ---------- Video power-on (first play): neon dot → line → picture ---------- */
.ms-video-pro .elementor-wrapper { background: #050304; }
.ms-video-pro .elementor-wrapper::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  z-index: 3;
  height: 2px;
  margin-top: -1px;
  background: #fff;
  box-shadow: 0 0 10px #fff, 0 0 26px #ff2d55, 0 0 64px #c8123d;
  opacity: 0;
  transform: scaleX(0);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .ms-video-armed video { clip-path: inset(49.6% 50% 49.6% 50%); }
  .ms-video-on video { animation: ms-crt-on 0.9s cubic-bezier(0.7, 0, 0.2, 1) both; }
  .ms-video-on .elementor-wrapper::before { animation: ms-crt-line 0.9s ease-out both; }
}
@keyframes ms-crt-on {
  0% { clip-path: inset(49.6% 50% 49.6% 50%); filter: brightness(3) saturate(1.4); }
  32% { clip-path: inset(49.6% 0 49.6% 0); filter: brightness(2.4) saturate(1.3); }
  100% { clip-path: inset(0 0 0 0); filter: none; }
}
@keyframes ms-crt-line {
  0% { opacity: 1; transform: scaleX(0); }
  32% { opacity: 1; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(1) scaleY(28); }
}
