/* LeadUX AI Motion & Visual System v1 (inspired by mt-webdesign.ru/list) */
@property --lx-border-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

/* 1. Top Scroll Progress Indicator */
#lx-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 9999;
  pointer-events: none;
  background: linear-gradient(90deg, #0b6e4f 0%, #19b885 55%, #ffe566 100%);
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
  opacity: 0;
  transition: opacity .2s ease;
}
#lx-scroll-progress.is-active {
  opacity: 1;
}

/* 2. Smart Sticky Header */
header[class*="_header_"] {
  transition: transform .32s cubic-bezier(.22, 1, .36, 1),
              background-color .25s ease,
              box-shadow .25s ease,
              backdrop-filter .25s ease;
  will-change: transform;
}
header[class*="_header_"].lx-header-scrolled {
  background-color: rgba(255, 255, 255, .88) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(16, 35, 28, .08);
}
header[class*="_header_"].lx-header-hidden {
  transform: translateY(-100%);
}

/* 3. Hero Ambient Cursor Glow + Kinetic Entrance */
[class*="_hero_"] {
  position: relative;
  overflow: hidden;
}
[class*="_hero_"]::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--lx-hero-glow, 0);
  transition: opacity .45s ease;
  background: radial-gradient(
    560px circle at var(--lx-hx, 50%) var(--lx-hy, 35%),
    rgba(255, 229, 102, .13),
    rgba(25, 184, 133, .09) 38%,
    transparent 70%
  );
  z-index: 0;
}
[class*="_hero_"] > * {
  position: relative;
  z-index: 1;
}

@keyframes lxHeroFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 4. Magnetic + Iridescent Shimmer Buttons */
[class*="_button_"],
button[type="submit"] {
  position: relative;
  overflow: hidden;
  transition: transform .28s cubic-bezier(.22, 1, .36, 1),
              box-shadow .28s ease,
              background-color .2s ease,
              border-color .2s ease;
  will-change: transform;
}
[class*="_buttonYellow_"]::before,
[class*="_headerCta_"]::before,
button[type="submit"]::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -75%;
  width: 50%;
  height: 180%;
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(255, 255, 255, .42) 50%,
    transparent 100%
  );
  transform: skewX(-22deg);
  pointer-events: none;
  transition: left .65s cubic-bezier(.22, 1, .36, 1);
}
[class*="_buttonYellow_"]:hover::before,
[class*="_headerCta_"]:hover::before,
button[type="submit"]:hover::before {
  left: 135%;
}

/* 5. Cursor-Tracked Card Spotlight & Houdini Glow Border */
.lx-spot-card {
  position: relative;
  overflow: hidden;
  transition: transform .32s cubic-bezier(.22, 1, .36, 1),
              box-shadow .32s ease,
              border-color .28s ease;
}
.lx-spot-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
  background: radial-gradient(
    340px circle at var(--lx-cx, 50%) var(--lx-cy, 50%),
    rgba(11, 110, 79, .10),
    rgba(255, 229, 102, .06) 40%,
    transparent 72%
  );
  z-index: 0;
}
.lx-spot-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(16, 35, 28, .09);
  border-color: rgba(11, 110, 79, .32) !important;
}
.lx-spot-card:hover::after {
  opacity: 1;
}
.lx-spot-card > * {
  position: relative;
  z-index: 1;
}

/* Houdini rotating conic glow on interactive demo cards */
[class*="_demo_108lr_1"],
[class*="_demo_s45v4_1"] {
  position: relative;
  border: 2px solid transparent !important;
  background-clip: padding-box;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1),
              box-shadow .35s ease;
}
[class*="_demo_108lr_1"]:hover,
[class*="_demo_s45v4_1"]:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 52px rgba(10, 35, 28, .26),
              0 0 0 1px rgba(255, 229, 102, .35);
}

/* 6. Infinite Marquee Ticker Strip */
.lx-marquee-wrap {
  width: 100%;
  overflow: hidden;
  background: #0d2b21;
  color: #e6f2ec;
  border-top: 1px solid rgba(255, 255, 255, .08);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  padding: 13px 0;
  user-select: none;
}
.lx-marquee-track {
  display: flex;
  width: max-content;
  gap: 28px;
  animation: lxMarqueeScroll 34s linear infinite;
}
.lx-marquee-wrap:hover .lx-marquee-track {
  animation-play-state: paused;
}
.lx-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  color: #dfece5;
}
.lx-marquee-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffe566;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes lxMarqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* 7. Scroll Reveal Stagger */
.lx-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .62s cubic-bezier(.22, 1, .36, 1),
              transform .62s cubic-bezier(.22, 1, .36, 1);
}
.lx-reveal.lx-in-view {
  opacity: 1;
  transform: translateY(0);
}

/* 8. Animated Gradient Eyebrow Accent */
[class*="_eyebrow"] {
  background: linear-gradient(90deg, #0b6e4f, #17a577, #0b6e4f);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  animation: lxEyebrowFlow 6s ease infinite;
}
[class*="_hero_"] [class*="_eyebrow"] {
  background: linear-gradient(90deg, #ffe566, #9be7c4, #ffe566);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@keyframes lxEyebrowFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* 9. FAQ & Details Micro-interaction */
details {
  transition: border-color .22s ease, box-shadow .22s ease;
}
details[open] {
  border-color: rgba(11, 110, 79, .35);
  box-shadow: 0 8px 24px rgba(16, 35, 28, .05);
}
details summary {
  cursor: pointer;
  transition: color .2s ease;
}
details summary:hover {
  color: #0b6e4f;
}

/* Accessibility & Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  #lx-scroll-progress,
  header[class*="_header_"],
  [class*="_button_"],
  button[type="submit"],
  .lx-spot-card,
  .lx-reveal,
  .lx-marquee-track,
  [class*="_eyebrow"] {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
  .lx-reveal {
    opacity: 1 !important;
  }
  [class*="_hero_"]::before {
    display: none;
  }
}

@media (max-width: 768px) {
  .lx-marquee-wrap {
    padding: 10px 0;
  }
  .lx-marquee-item {
    font-size: .78rem;
  }
}
