/* Cavalry.ai - Custom styles */

.anti-flicker, .anti-flicker * {visibility: hidden !important; opacity: 0 !important;}


@media only screen and (min-width: 1440px) {
	body {font-size: 14.4px;}
}

a {
	color: inherit;
}

.visual_cms_item {
    height: var(--visual-height, auto);
}

/* Updated smooth fill animation */
@keyframes smoothFill {
    0% {
        width: 0%;
        opacity: 1;
    }
    90% {
        width: 100%;
        opacity: 1;
    }
    100% {
        width: 100%;
        opacity: 1;
    }
}

/* Clear animation for reset */
@keyframes clearFill {
    0% {
        width: 100%;
        opacity: 1;
    }
    100% {
        width: 0%;
        opacity: 0;
    }
}

/* UPDATED - Removed fixed animation to allow JavaScript control */
.is-inview .cards_cms_item.is--current .card_fill {
    opacity: 1;
    /* Let JavaScript handle the width animation with custom durations */
}

/* Cards that should remain filled */
.cards_cms_item.filled .card_fill {
    opacity: 1;
    width: 100%;
}

/* Cards being cleared */
.cards_cms_item.clearing .card_fill {
    animation: clearFill 0.5s ease-out forwards;
}

/* Remove old individual colors - gradient applied */
.cards_cms_item.active.first {
	/* Gradient applied */
}

/* UPDATED - Removed fixed animation to allow JavaScript control */
.cards_cms_item.is--current .card_fill {
    border-radius: 0 1.5rem 1.5rem 0;
    opacity: 1;
    /* Let JavaScript handle the width animation with custom durations */
}

/* All fill states use gradient */
.cards_cms_item.is--current.first .card_fill,
.cards_cms_item.is--current.second .card_fill,
.cards_cms_item.is--current.third .card_fill {
	/* Gradient applied */
}

/* Ensure card_fill is positioned correctly for left-to-right animation */
.card_fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    border-radius: 0 1.5rem 1.5rem 0;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Layout sections */
section.leadspace-section {
    overflow-x: clip;
}

.onboarding-section-card {
    backdrop-filter: blur(19.200000762939453px);
}

.testimonial-section-card {
	backdrop-filter: blur(19.200000762939453px);
    height: max-content;
}

.testimonial-section {
   overflow-x: clip;
}

.position-sticky-2 {
	perspective: 1100px;
}

.testimonial-card-wrapper {
    transform: rotateX(calc(var(--x-rotate)* 1deg)) rotateY(0deg) rotateZ(0deg) translate(0px, calc(var(--y-pos)* 1%));
    transition: transform 0.3s ease, opacity 0.25s ease;
    opacity: 0;
}

.scroll-number.active .scroll-number-heading {
    font-size: 21px;
    line-height: 2;
    transition: font-size 0.3s ease, line-height 0.3s ease;
}

/* Enhanced card styles for better animation */
.cards_cms_item {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cards_cms_item:hover {
    transform: translateY(-2px);
}

.card_wrap {
    position: relative;
    z-index: 2;
}

/* Scroll blocking visual feedback */
.testimonial-section.scroll-blocked {
    position: relative;
}

.testimonial-section.scroll-blocked::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    z-index: 10;
    pointer-events: none;
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 0; 
    }
    50% { 
        opacity: 1; 
    }
}

/* Performance optimizations */
.testimonial-card-wrapper,
.card_fill {
    will-change: transform, opacity;
}

.testimonial-section-card,
.onboarding-section-card {
    transform: translateZ(0);
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .testimonial-card-wrapper {
        transition: opacity 0.25s ease;
        transform: none;
    }
    
    .is-inview .cards_cms_item.is--current .card_fill {
        animation: none;
        width: 100%;
        opacity: 1;
    }
    
    .cards_cms_item.clearing .card_fill {
        animation: none;
        width: 0%;
        opacity: 0;
    }
    
    .scroll-number.active .scroll-number-heading {
        transition: none;
    }
}

/* Responsive improvements */
@media only screen and (max-width: 768px) {
    .testimonial-card-wrapper {
        transform: translate(0px, calc(var(--y-pos) * 1%));
    }
    
    .scroll-number.active .scroll-number-heading {
        font-size: 18px;
        line-height: 1.8;
    }
}

/* Focus states for accessibility */
.cards_cms_item:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}


/* === Extracted inline style block === */

:root{
  --nav-bg-height: calc(20em + calc(2em + 3em + 2.5em + 3em));
  --cubic-default: cubic-bezier(0.525, 0, 0, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.450s;
  --color-dark: #2b1d15;

  /* Theming + animation */
  --nav-fg-closed: #fff;        /* navbar text when menu is NOT open */
  --nav-fg-open: var(--color-dark);
  --mm-slide-distance: 16px;     /* how far the mega menu slides up */
  --mm-slide-duration: 320ms;    /* keep in sync with JS ANIM_MS */
}

/* Base */
a{ color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible{ outline: 1px solid var(--color-dark); }
.nav{ transition: color var(--duration-fast) var(--cubic-default); color: var(--nav-fg-closed); }
.nav-button{ transition: all var(--duration-fast) var(--cubic-default); }
.nav-bg{ transition: height var(--duration-normal) var(--cubic-default); height: 0; will-change: height; }
.page-bg{ transition: opacity var(--duration-fast) var(--cubic-default); opacity: 0; will-change: opacity; }

/* Burger */
.menu-button{
  background: white; border: none; padding: 8px; border-radius: 4px; cursor: pointer;
}
.menu-button__line{
  display: block; width: 20px; height: 2px; background-color: black; margin: 3px 0;
  transition: all var(--duration-normal) var(--cubic-default);
}
@media (max-width: 991px){ .menu-button{ display: inline-flex; align-items: center; justify-content: center; } }
@media (min-width: 992px){ .menu-button{ display: none; } }

/* Mega menu base transitions */
.nav-dropdown{
  transition:
    opacity var(--duration-fast) var(--cubic-default),
    transform var(--mm-slide-duration) var(--cubic-default),
    visibility var(--duration-fast) var(--cubic-default);
  will-change: transform, opacity;
  transform: translateY(0);
}

/* Desktop (≥992px): hover/focus opens — suppressed while scrolling */
@media (min-width: 992px){
  body:not([data-nav-suppress="true"]) [data-dropdown-toggle]:hover + .nav-dropdown,
  body:not([data-nav-suppress="true"]) [data-dropdown-toggle]:focus-visible + .nav-dropdown,
  body:not([data-nav-suppress="true"]) .nav-dropdown:hover,
  body:not([data-nav-suppress="true"]) .nav-dropdown:focus-within{
    opacity: 1; visibility: visible; pointer-events: auto;
  }

  .nav-link__dropdown-icon{ transition: transform var(--duration-normal) var(--cubic-default); }
  [data-dropdown-toggle]:hover .nav-link__dropdown-icon,
  [data-dropdown-toggle]:focus .nav-link__dropdown-icon,
  [data-dropdown-toggle]:focus-within .nav-link__dropdown-icon,
  [data-dropdown-toggle]:has(+ .nav-dropdown:hover) .nav-link__dropdown-icon,
  [data-dropdown-toggle]:has(+ .nav-dropdown:focus-within) .nav-link__dropdown-icon{
    transform: rotate(180deg);
  }

  [data-dropdown-toggle]{ transition: background-color var(--duration-fast) var(--cubic-default); }
  [data-dropdown-toggle]:hover,
  [data-dropdown-toggle]:focus,
  [data-dropdown-toggle]:focus-within,
  [data-dropdown-toggle]:has(+ .nav-dropdown:hover),
  [data-dropdown-toggle]:has(+ .nav-dropdown:focus-within){
    background-color: rgba(255,255,255,.1);
  }
}

/* Dropdown list items animation (existing look) */
.nav-dropdown__content-li{
  transition: all var(--duration-normal) var(--cubic-default);
  transition-delay: .18s; opacity: 0; transform: translate(4em,0);
}
.nav-dropdown__content-li:nth-child(2){ transition-delay: .24s; }
.nav-dropdown__content-li:nth-child(3){ transition-delay: .30s; }
.nav-dropdown__content-li:nth-child(4){ transition-delay: .36s; }
.nav-dropdown__content-li:nth-child(5){ transition-delay: .44s; }

body:has([data-dropdown-toggle]:hover) [data-dropdown-toggle]:hover + .nav-dropdown .nav-dropdown__content-li,
body:has([data-dropdown-toggle]:focus-visible) .nav-dropdown__content-li,
body:has([data-dropdown-toggle]:focus-within) .nav-dropdown__content-li,
body:has(.nav-dropdown:hover) .nav-dropdown__content-li,
body:has(.nav-dropdown:focus-within) .nav-dropdown__content-li{
  opacity: 1; transform: translate(0,0);
}

/* Image/link hovers */
.nav-dropdown__link:hover .nav-dropdown__img-overlay,
.nav-dropdown__link:focus-visible .nav-dropdown__img-overlay{ opacity: 0; }
.nav-dropdown__link:hover .nav-dropdown__img,
.nav-dropdown__link:focus-visible .nav-dropdown__img{ transform: scale(1.1); }
.nav-dropdown__link.is--static:hover,
.nav-dropdown__link.is--static:focus-visible{ background: rgba(255,255,255,.1); }

/* Link underline */
a.nav-link .nav-link__label::after{
  content:''; position:absolute; left:0; bottom:-1px; width:100%; height:1px; background: currentColor;
  transition: transform var(--duration-normal) var(--cubic-default);
  transform: scale(0,1); transform-origin: right center;
}
a.nav-link:hover .nav-link__label::after,
a.nav-link:focus-visible .nav-link__label::after{
  transform: scale(1,1); transform-origin: left center;
}

/* Open-like global styling (keep white text while hovering/open) */
:is(
  body:has([data-dropdown-toggle]:hover),
  body:has([data-dropdown-toggle]:focus-visible),
  body:has([data-dropdown-toggle]:focus-within),
  body:has(.nav-dropdown:hover),
  body:has(.nav-dropdown:focus-within)
){
  .nav-bg{ height: var(--nav-bg-height); }
  .page-bg{ opacity: 1; }
  .nav{ color: var(--nav-fg-closed); }
  .nav-button{ border-color: currentColor; color: currentColor; }
}

/* ---- Force slide-up + fade WHILE/AFTER scrolling ---- */
/* During the animation window */
body[data-nav-sliding="true"] .nav-dropdown{
  transform: translateY(calc(var(--mm-slide-distance) * -1));
  opacity: 0;
  pointer-events: none;
}
/* For the whole scroll burst: hide overlays & keep nav readable */
body[data-nav-scrolling="true"] .nav-dropdown{
  opacity: 0 !important; visibility: hidden !important; pointer-events: none !important;
  transform: translateY(-12px); /* small upward nudge even after anim */
}
body[data-nav-scrolling="true"] .nav-bg{ height: 0 !important; }
body[data-nav-scrolling="true"] .page-bg{ opacity: 0 !important; } /* ← ensures page overlay disappears while scrolling */
body[data-nav-scrolling="true"] .nav{ color: var(--nav-fg-closed) !important; }
body[data-nav-scrolling="true"] .nav-button{ color: currentColor !important; border-color: currentColor !important; }

/* Mobile & Tablet (≤991px): burger-driven */
@media (max-width: 991px){
  :root{ --nav-bg-height: 100dvh; }

  .nav-center{
    opacity: 0; visibility: hidden; transform: translate(0,-1em);
    transition: all var(--duration-normal) var(--cubic-default), opacity var(--duration-fast) var(--cubic-default);
  }

  .nav-dropdown__overflow{
    display: grid; grid-template-rows: 0fr; overflow: hidden;
    transition: grid-template-rows var(--duration-normal) var(--cubic-default);
  }

  .menu-button__line{ transition: all var(--duration-normal) var(--cubic-default); }

  :is([data-menu-status="open"]){
    color: var(--nav-fg-open);
    .menu-button { background: black; }
    .menu-button__line:nth-of-type(1){ transform: translate(0,.125em) rotate(135deg); background-color:#FFF; }
    .menu-button__line:nth-of-type(2){ transform: translate(0,-.175em) rotate(-135deg); background-color:#FFF; }
    .nav-bg{ height: var(--nav-bg-height); }
    .page-bg{ opacity: 1; }
    .nav-center{ opacity: 1; visibility: visible; transform: translate(0,0); transition-delay:.1s; }
  }

  /* Prevent body scroll when menu is open */
  body:has([data-menu-status="open"]) { overflow: hidden; }

  /* Dropdowns opened via attribute */
  [data-dropdown-toggle="open"] + .nav-dropdown .nav-dropdown__overflow{ grid-template-rows: 1fr; }
  [data-dropdown-toggle="open"] + .nav-dropdown .nav-dropdown__content-li{ opacity: 1; transform: translate(0,0); }
  [data-dropdown-toggle="open"] .nav-link__dropdown-icon{ transform: rotate(180deg); }

  /* If scrolling, hide the nav list too */
  body[data-nav-scrolling="true"] [data-menu-status] .nav-center{
    opacity: 0 !important; visibility: hidden !important; transform: translate(0,-1em) !important;
  }
}


/* === Extracted inline style block === */

.leadspace-gif-control {
  width: 80%;
  display: block;
  animation: loopAnimation 5s infinite; /* Adjust time as per GIF duration */
}

@keyframes loopAnimation {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}


/* === Extracted inline style block === */

@keyframes logo_marquee_timeline {
	from { transform: translateX(0%); }
	to { transform: translateX(-50%); }
}


/* === Extracted inline style block === */


@keyframes scrollLogo {
  from {
  	transform: translateX(calc(-100% - 24px));
  }
  to {
    transform: translateX(0);
  }
}

.section-scroll-logo-wrapper {
  animation: scrollLogo 40s linear infinite;
}

.section-scroll-logo {
	width: max-content;
  }


/* === Extracted inline style block === */


@keyframes scrollLogo {
  from {
  	transform: translateX(calc(-100% - 24px));
  }
  to {
    transform: translateX(0);
  }
}

.section-scroll-logo-wrapper {
  animation: scrollLogo 40s linear infinite;
}

.section-scroll-logo {
	width: max-content;
  }


/* === Extracted inline style block === */


@keyframes scrollLogo {
  from {
  	transform: translateX(calc(-100% - 24px));
  }
  to {
    transform: translateX(0);
  }
}

.section-scroll-logo-wrapper {
  animation: scrollLogo 40s linear infinite;
}

.section-scroll-logo {
	width: max-content;
  }


/* === Extracted inline style block === */

.container-testimonials {
    position: relative;
    overflow: hidden;
}

/* Add fade overlay on left and right edges */
.container-testimonials::before,
.container-testimonials::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    pointer-events: none;
    z-index: 10;
}

/* Left fade */
.container-testimonials::before {
    left: 0;
    background: linear-gradient(to right, 
        #faf7fb 0%, 
        rgba(250, 247, 251, 0.9) 20%, 
        rgba(250, 247, 251, 0.7) 40%, 
        rgba(250, 247, 251, 0.3) 70%, 
        transparent 100%
    );
}

/* Right fade */
.container-testimonials::after {
    right: 0;
    background: linear-gradient(to left, 
        #faf7fb 0%, 
        rgba(250, 247, 251, 0.9) 20%, 
        rgba(250, 247, 251, 0.7) 40%, 
        rgba(250, 247, 251, 0.3) 70%, 
        transparent 100%
    );
}

.testimonials-layout {
    position: relative;
    height: 500px;
}

.testimonials_slide_list {
    display: flex;
    /* Natural easing: fast start, slow end */
    transition: transform 0.7s cubic-bezier(0.4, 0.0, 0.2, 1);
    height: 100%;
    /* Optimize for smoother animations */
    will-change: transform;
    /* Enable hardware acceleration */
    transform: translateZ(0);
}

.testimonial-slide {
    min-width: 100%;
    display: flex;
    align-items: center;
    gap: 120px; /* Increased from 60px to 120px */
    /* Smooth opacity transitions for content */
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

/* Add subtle fade effect during transitions */
.testimonials_slide_list.transitioning .testimonial-slide {
    opacity: 0.85;
}

.carousel-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    /* Smoother dot transitions */
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    /* Add subtle scale effect */
    transform: scale(1);
}

.dot:hover {
    background: #666;
    transform: scale(1.1);
}

.dot.active {
    background: #333;
    transform: scale(1.2);
}

/* Add subtle scale effect for images during transitions */
.testimonial_image {
    transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
    /* Start slightly scaled up */
    transform: scale(1.05);
    transform-origin: center center;
}

/* Scale to normal size when slide is active */
.testimonial-slide.active .testimonial_image {
    transform: scale(1);
}

/* Hover effect (separate from slide animation) */
.testimonial-slide:hover .testimonial_image {
    transform: scale(1.02);
}

/* Smooth content animations */
.testimonial-content {
    transition: transform 0.3s ease-out;
}

@media (max-width: 991px) {
    .testimonial-slide {
        flex-direction: column-reverse !important;
        gap: 30px !important; /* Keep mobile gap smaller */
        text-align: center !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding-top: 20px !important;
    }

    .testimonials-layout {
        height: auto !important;
        min-height: 500px !important;
        padding-bottom: 25px !important; /* Add space for dots at bottom */
    }
    
    /* Remove fade overlays on tablet and mobile */
    .container-testimonials::before,
    .container-testimonials::after {
        display: none !important;
    }
    
    /* Show dots on tablet and mobile at bottom */
    .carousel-dots {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        justify-content: center !important;
        margin-top: 0px !important;
    }
}

@media (max-width: 768px) {
    .testimonial-slide {
        flex-direction: column-reverse !important;
        gap: 30px !important;
        text-align: center !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding-top: 20px !important;
    }

    .testimonial_image {
        width: 200px !important;
        height: 200px !important;
        order: 2 !important;
    }

    .testimonial-content {
        order: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .testimonials-layout {
        height: auto !important;
        min-height: 500px !important;
    }
    
    /* Faster transitions on mobile for better performance */
    .testimonials_slide_list {
        transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1) !important;
    }
    
    /* Image scaling already disabled from tablet breakpoint */
    
    /* Fades already hidden from tablet breakpoint */
    
    /* Dots already hidden from tablet breakpoint */
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .testimonials_slide_list {
        transition: transform 0.3s ease;
    }
    
    .dot {
        transition: background 0.2s ease;
    }
    
    .testimonial_image,
    .testimonial-content {
        transition: none;
    }
}

/* Remove image scaling animations on mobile and tablet */
@media (max-width: 991px) {
    .testimonial_image {
        transition: none !important;
        transform: none !important;
    }
    
    .testimonial-slide.active .testimonial_image {
        transform: none !important;
    }
    
    .testimonial-slide:hover .testimonial_image {
        transform: none !important;
    }
}


/* === Extracted inline style block === */

@keyframes rightToLeftAnimation {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - 20px));
  }
}

@keyframes leftToRightAnimation {
  from {
    transform: translateX(calc(-100% - 20px));
  }
  to {
    transform: translateX(0);
  }
}

.animate .right-to-left{
  animation: none; /* Default: no animation */
  opacity: 0; /* Initially hidden */
  transition: opacity 0.3s ease; /* Smooth fade-in */
}

.in-view.animate .right-to-left {
  animation: rightToLeftAnimation 100s linear infinite; /* Infinite animation */
  opacity: 1;
}

.in-view.animate .left-to-right {
  animation: leftToRightAnimation 100s linear infinite; /* Infinite animation */
  opacity: 1;
}




/* === Extracted inline style block === */

@media screen and (min-width:1024px){
  .impact-grid:nth-last-child(2),
  .impact-grid:last-child{
   	border-bottom: none;
  }
}

.green.fourth code{
	text-decoration: underline;
  font-family: inherit;
  font-size:inherit;
  line-height:inherit;
}

.h1{
	font-variation-settings: normal !important;
}

/* === Customer cards hover expand === */

.customer_grid_inner {
  position: relative;
}

.customer_grid_hover_over {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  z-index: 6;
  transition:
    opacity .25s ease,
    transform .35s cubic-bezier(.2,.7,.3,1),
    visibility 0s linear .35s;
}

.customer_grid_inner:hover .customer_grid_hover_over,
.customer_grid_inner:focus-within .customer_grid_hover_over {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition:
    opacity .25s ease,
    transform .35s cubic-bezier(.2,.7,.3,1),
    visibility 0s;
}

.customer_grid_bottom {
  opacity: 1;
  transition: opacity .28s ease .12s;
}

.customer_grid_inner:hover .customer_grid_bottom,
.customer_grid_inner:focus-within .customer_grid_bottom {
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease 0s;
}

@media (max-width: 991px) {
  .customer_grid_inner:hover .customer_grid_hover_over,
  .customer_grid_inner:focus-within .customer_grid_hover_over {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
  }

  .customer_grid_inner[aria-expanded="true"] .customer_grid_hover_over {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .customer_grid_inner[aria-expanded="true"] .customer_grid_bottom {
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease 0s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .customer_grid_hover_over {
    transition: none;
    transform: none;
  }
}
