/* ============================================
   GLOBAL SCROLL SNAP
   ============================================ */

html {
    scroll-snap-type: y proximity;
    scroll-snap-stop: always;
}

.lottie-placeholder {
    display: block;
    background: transparent;
}
	.animated-counter {
           
            transition: color 0.3s ease; /* Optional: smooth color changes */
        }
        
        .animated-counter.counting {
            /* Optional: Add styles while counting */
             /* Blue while animating */
        }

[class*="fade-in-"],
[class*="slide-in-"],
[class*="scale-in"],
[class*="rotate-in"],
[class*="offset-"],
[class*="from-"] {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: 0s;
    
    /* iOS Safari Performance Fixes */
    will-change: transform, opacity;
    transform: translateZ(0); 
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Ensure floating animations are not affected by scroll-triggered styles */
[class*="float"] {
    opacity: 1 !important;
    transition: none !important;
    /* Keep hardware acceleration for floating too */
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Animate class triggers the animation - iOS Safari Optimized */
[class*="fade-in-"].animate,
[class*="slide-in-"].animate,
[class*="scale-in"].animate,
[class*="rotate-in"].animate,
[class*="offset-"].animate,
[class*="from-"].animate {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg); /* Use 3D transforms */
    -webkit-transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
}

/* =================================
   FADE ANIMATIONS - iOS Safari Optimized
   ================================= */

.fade-in-up {
    transform: translate3d(0, 30px, 0); /* Use 3D transform for iOS */
    -webkit-transform: translate3d(0, 30px, 0);
}

.fade-in-down {
    transform: translate3d(0, -30px, 0);
    -webkit-transform: translate3d(0, -30px, 0);
}

.fade-in-left {
    transform: translate3d(-30px, 0, 0);
    -webkit-transform: translate3d(-30px, 0, 0);
}

.fade-in-right {
    transform: translate3d(30px, 0, 0);
    -webkit-transform: translate3d(30px, 0, 0);
}

.fade-in {
    /* Simple fade with no movement */
    transform: none;
    -webkit-transform: none;
}

/* =================================
   SLIDE ANIMATIONS (More dramatic)
   ================================= */

.slide-in-up {
    transform: translateY(60px);
}

.slide-in-left {
    transform: translateX(-60px);
}

.slide-in-right {
    transform: translateX(60px);
}

/* =================================
   OFFSET ANIMATIONS (Custom distances)
   ================================= */

.offset-up-100 {
    transform: translateY(100px);
}

.offset-up-150 {
    transform: translateY(150px);
}

.offset-up-200 {
    transform: translateY(200px);
}

.offset-down-100 {
    transform: translateY(-100px);
}

.offset-left-100 {
    transform: translateX(-100px);
}

.offset-right-100 {
    transform: translateX(100px);
}

/* Off-screen animations (start from completely outside viewport) */
.from-bottom {
    transform: translateY(100vh);
}

.from-top {
    transform: translateY(-100vh);
}

.from-left {
    transform: translateX(-100vw);
}

.from-right {
    transform: translateX(100vw);
}

/* =================================
   SCALE AND ROTATE ANIMATIONS
   ================================= */

.scale-in {
    transform: scale(0.8);
}

.rotate-in {
    transform: rotate(-10deg) scale(0.9);
}

/* =================================
   FLOATING ANIMATIONS
   ================================= */

.float {
    animation: float 6s ease-in-out infinite;
}

.float-slow {
    animation: float-slow 8s ease-in-out infinite;
}

.float-fast {
    animation: float-fast 4s ease-in-out infinite;
}

.float-x {
    animation: float-horizontal 5s ease-in-out infinite;
}

.float-y {
    animation: float-vertical 4s ease-in-out infinite;
}

[class*="float"] {
    opacity: 1;
    will-change: transform;
}

/* =================================
   FLOATING KEYFRAMES
   ================================= */

@keyframes float {
    0%, 100% {
        transform: translate(0px, 0px) rotate(0deg);
    }

    25% {
        transform: translate(-5px, -10px) rotate(1deg);
    }

    50% {
        transform: translate(3px, -15px) rotate(-1deg);
    }

    75% {
        transform: translate(-3px, -8px) rotate(0.5deg);
    }
}

@keyframes float-slow {
    0%, 100% {
        transform: translate(0px, 0px) rotate(0deg);
    }

    33% {
        transform: translate(-3px, -8px) rotate(0.5deg);
    }

    66% {
        transform: translate(2px, -12px) rotate(-0.5deg);
    }
}

@keyframes float-fast {
    0%, 100% {
        transform: translate(0px, 0px) rotate(0deg);
    }

    20% {
        transform: translate(-4px, -8px) rotate(1deg);
    }

    40% {
        transform: translate(4px, -12px) rotate(-1deg);
    }

    60% {
        transform: translate(-2px, -6px) rotate(0.5deg);
    }

    80% {
        transform: translate(2px, -10px) rotate(-0.5deg);
    }
}

@keyframes float-horizontal {
    0%, 100% {
        transform: translateX(0px) rotate(0deg);
    }

    25% {
        transform: translateX(-8px) rotate(0.5deg);
    }

    50% {
        transform: translateX(6px) rotate(-0.5deg);
    }

    75% {
        transform: translateX(-4px) rotate(0.3deg);
    }
}

@keyframes float-vertical {
    0%, 100% {
        transform: translateY(0px);
    }

    25% {
        transform: translateY(-10px);
    }

    50% {
        transform: translateY(-15px);
    }

    75% {
        transform: translateY(-8px);
    }
}


/* =================================
   SCROLL SCALE
   ================================= */

.scroll-scale-up,
.scroll-scale-down {
    transform-origin: center center;
    will-change: transform;
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
    -webkit-transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000px;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: transform 0.016s linear, -webkit-transform 0.016s linear;
    isolation: isolate;
    contain: layout style paint;
}

/* =================================
   TEXT REVEAL ANIMATIONS
   ================================= */

.text-reveal-chars,
.text-reveal-words {
    overflow: hidden;
}

.reveal-char,
.reveal-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font: inherit;
    color: inherit;
    text-decoration: inherit;
    letter-spacing: inherit;
}

.reveal-char.animate,
.reveal-word.animate {
    opacity: 1;
    transform: translateY(0);
}

.reveal-char.fade-only,
.reveal-word.fade-only,
.reveal-char.fade-only.animate,
.reveal-word.fade-only.animate {
    transform: none;
}

.reveal-char.slide-up,
.reveal-word.slide-up {
    transform: translateY(30px);
}

.reveal-char.slide-down,
.reveal-word.slide-down {
    transform: translateY(-30px);
}

.reveal-char.scale-in,
.reveal-word.scale-in {
    transform: scale(0.8);
}

.reveal-char.rotate-in,
.reveal-word.rotate-in {
    transform: rotate(-10deg) scale(0.9);
}

/* =================================
   TIMING MODIFIERS
   ================================= */

/* Delay classes */
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }
.delay-4 { transition-delay: 0.8s; }
.delay-5 { transition-delay: 1.0s; }
.delay-6 { transition-delay: 1.2s; }
.delay-7 { transition-delay: 1.4s; }
.delay-8 { transition-delay: 1.6s; }
.delay-9 { transition-delay: 1.8s; }
.delay-10 { transition-delay: 2.0s; }

/* Duration classes */
.fast {
    transition-duration: 0.4s;
}

.slow {
    transition-duration: 1.2s;
}

.extra-slow {
    transition-duration: 1.8s;
}

/* =================================
   EASING MODIFIERS
   ================================= */

.ease-bounce {
    transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.ease-smooth {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.ease-sharp {
    transition-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
}



/* ============================================
   TESTIMONIALS
   ============================================ */

.kk-testimonials-wrap {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 5px 0;
}

.kk-track-right,
.kk-track-left {
    display: flex;
    gap: 20px;
    padding-right: 20px;
    width: max-content;
    will-change: transform;
}

.kk-track-right {
    animation: scrollMarquee 30s linear infinite;
}

.kk-track-left {
    margin-top: 20px;
    animation: scrollMarqueeRev 30s linear infinite;
}

.kk-track-right:hover,
.kk-track-left:hover {
    animation-play-state: paused;
}

.kk-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 24px;
    width: 500px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 0 7px 2px rgba(0, 0, 0, 0.15);
}

.kk-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kk-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #5F1C8C;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 20px;
    color: #ffffff;
    flex-shrink: 0;
    font-family: inherit;
}

.kk-name {
    font-weight: 400;
    font-size: 18px;
    color: rgb(118, 41, 162);
    line-height: 1.2;
    font-family: inherit;
}

.kk-stars {
    display: flex;
    gap: 3px;
}

.kk-stars svg {
    width: 30px;
    height: 30px;
    fill: #5F1C8C;
}

.kk-quote {
    font-family: Helvetica, sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: rgb(72, 70, 73);
    line-height: 1.6;
}

@media (max-width: 767px) {
    .kk-card {
        width: 90vw;
    }
}

@keyframes scrollMarquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-50% - 10px));
    }
}

@keyframes scrollMarqueeRev {
    from {
        transform: translateX(calc(-50% - 10px));
    }
    to {
        transform: translateX(0);
    }
}

/* ============================================
   KASHKICK HOW IT WORKS
   Single responsive section
   Uses .kk-hiw HTML, but matches old mobile + desktop behavior
   ============================================ */

.kk-hiw {
    position: relative;
    width: 100%;
    background: #5F1C8C;
    color: #ffffff;
    overflow: visible;
}

.kk-hiw *,
.kk-hiw *::before,
.kk-hiw *::after {
    box-sizing: border-box;
}

.kk-hiw .lottie-placeholder {
    display: block;
    background: transparent;
}

/* ============================================
   SHARED STRUCTURE
   ============================================ */

.kk-hiw__layout {
    position: relative;
    width: 100%;
}

.kk-hiw__visual-wrap {
    position: relative;
    z-index: 10;
}

.kk-hiw__visual {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.kk-hiw__panning-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.kk-hiw__panning-bg {
    width: 400%;
    height: 100%;
    background-image: url("https://kashkick.com/wp-content/uploads/2025/10/CLIFF-LAYERED-MULTIPLANE-BG-scaled.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
}

.kk-hiw__ninja-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 30;
    transform: translateZ(1px);
    -webkit-transform: translateZ(1px);
}

.kk-hiw__ninja {
    position: absolute;
    transition: left 0.8s ease-in-out, margin-left 0.8s ease-in-out;
    will-change: transform, left, margin-left;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
}

.kk-hiw__ninja lottie-player,
.kk-hiw__ninja .lottie-placeholder {
    display: block;
}

/* ============================================
   SHARED STEP TEXT
   ============================================ */

.kk-hiw__step-text {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.kk-hiw__step-text h2 {
    color: #ffffff;
    margin: 0 0 0.25rem;
    line-height: 120%;
    padding: 0;
    text-align: left;
}

.kk-hiw__step-text p {
    color: #ffffff;
    line-height: 150%;
    margin: 0;
    padding: 0;
}

/* ============================================
   DESKTOP
   Matches old .kashkick-animation-section-desk
   ============================================ */

@media only screen and (min-width: 1024px) {
    .kk-hiw {
        padding: 0;
    }

    .kk-hiw__layout {
        display: flex;
        align-items: flex-start;
        width: 100%;
    }

    .kk-hiw__visual-wrap {
        position: sticky;
        top: 280px;
        left: 0;
        width: 50%;
        height: 60vh;
        overflow: visible;
        z-index: 50;
    }

    .kk-hiw__visual {
        width: 100%;
        height: 60vh;
        border-radius: 1rem;
        overflow: hidden;
    }

    .kk-hiw__mobile-header {
        display: none;
    }

    .kk-hiw__panning-wrapper {
        width: 100%;
        height: 60vh;
        overflow: hidden;
        border-radius: 1rem;
    }

    .kk-hiw__mobile-gradient {
        display: none;
    }

    .kk-hiw__steps {
        position: relative;
        width: 50%;
        z-index: 80;
    }

    .kk-hiw__desktop-step-gradient {
        position: sticky;
        top: 0;
        z-index: 10000;
        height: 90vh;
        pointer-events: none;
    }

    .kk-hiw__desktop-step-gradient::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(
            #5F1C8C 280px,
            transparent 325px
        );
        opacity: 1;
    }

    .kk-hiw__step {
        height: 60vh;
        display: flex;
        flex-direction: row;
        gap: 1rem;
        justify-content: center;
        align-items: flex-start;
        text-align: left;
        margin: 0;
        padding-left: 1rem;
        position: relative;
        z-index: 120;
    }

    .kk-hiw__step--last {
        height: 50vh;
        margin-bottom: 10rem;
    }

    .kk-hiw__number {
        min-width: 100px;
        width: 100px;
        height: 100px;
        background: #91F2B2;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 4rem;
        font-weight: bold;
        color: #5F1C8C;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        z-index: 76;
    }

    .kk-hiw__step-text h2 {
        font-size: 2rem;
    }

    .kk-hiw__step-text p {
        font-size: 1rem;
    }

    .kk-hiw__snap-buffer {
        height: 10vh;
    }

    .kk-hiw__ninja--one {
        width: 250px;
        height: 250px;
        top: 25%;
        left: 50%;
        margin-left: -125px;
    }

    .kk-hiw__ninja--two {
        width: 450px;
        height: 450px;
        top: 18%;
        left: 100vw;
        margin-left: 0;
    }

    .kk-hiw__ninja--three {
        width: 300px;
        height: 300px;
        bottom: 20vh;
        left: 100vw;
        margin-left: 0;
    }

    .kk-hiw__ninja--one.slide-left {
        left: -100vw;
    }

    .kk-hiw__ninja--two.slide-center {
        left: 50%;
        margin-left: -150px;
    }

    .kk-hiw__ninja--two.slide-left {
        left: -100vw;
    }

    .kk-hiw__ninja--three.slide-center {
        left: 50%;
        margin-left: -150px;
    }
}

/* ============================================
   MOBILE / TABLET
   Matches old .kashkick-animation-section
   ============================================ */

@media only screen and (max-width: 1023px) {
    .kk-hiw__layout {
		display: flex;
        flex-direction: column;
        gap: 80px;
        height: 100%;
    }

    .kk-hiw__visual-wrap {
        width: 100%;
        height: 55vh;
        overflow: hidden;
        position: sticky;
        top: 0;
        left: 0;
        z-index: 100;
    }

    .kk-hiw__visual {
        width: 100%;
        height: 55vh;
        overflow: hidden;
        border-radius: 0;
		z-index: 20;
    }

    .kk-hiw__mobile-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        color: #ffffff;
        background: #5F1C8C;
        text-align: center;
        padding: 1rem;
        font-size: 2rem;
        font-weight: bold;
        z-index: 100;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .kk-hiw__panning-wrapper {
        width: 100%;
        height: 100%;
        overflow: hidden;
        border-radius: 0;
    }

    .kk-hiw__mobile-gradient {
        position: absolute;
        inset: 0;
        z-index: 20;
        pointer-events: none;
		display: none;
    }

    .kk-hiw__mobile-gradient::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(
            #5F1C8C 0%,
            transparent 10%,
            transparent 70%,
            #5F1C8C 80%,
            #5F1C8C 100%
        );
        opacity: 1;
    }

    .kk-hiw__desktop-step-gradient {
        display: none;
    }

    .kk-hiw__steps {
        position: relative;
        z-index: 40;
    }

    .kk-hiw__step {
        height: 50vh;
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        margin: 0;
        gap: 1rem;
        padding: 0 1rem;
        position: relative;
        z-index: 50;
    }

    .kk-hiw__step--last {
        height: 30vh;
        margin-bottom: 0;
    }

    .kk-hiw__number {
        min-width: 50px;
        width: 50px;
        height: 50px;
        background: #91F2B2;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2.5rem;
        font-weight: bold;
        color: #5F1C8C;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }

    .kk-hiw__step-text h2 {
        font-size: 1.5rem;
    }

    .kk-hiw__step-text p {
        font-size: 1rem;
    }

    .kk-hiw__snap-buffer {
        height: 10vh;
    }

    .kk-hiw__ninja--one {
        width: 250px;
        height: 250px;
        top: 50%;
        left: 50%;
        margin-top: -100px;
        margin-left: -125px;
    }

    .kk-hiw__ninja--two {
        width: 450px;
        height: 450px;
        top: 50%;
        left: 100vw;
        margin-top: -125px;
        margin-left: 0;
    }

    .kk-hiw__ninja--three {
        width: 300px;
        height: 300px;
        top: 50%;
        left: 100vw;
        margin-top: -125px;
        margin-left: 0;
    }

    .kk-hiw__ninja--one.slide-left {
        left: -100vw;
    }

    .kk-hiw__ninja--two.slide-center {
        left: 50%;
        margin-left: -150px;
    }

    .kk-hiw__ninja--two.slide-left {
        left: -100vw;
    }

    .kk-hiw__ninja--three.slide-center {
        left: 50%;
        margin-left: -150px;
    }
}

/* ============================================
   TABLET TYPOGRAPHY
   ============================================ */

@media only screen and (min-width: 768px) and (max-width: 1023px) {
    .kk-hiw__step-text h2 {
        font-size: 2.5rem;
    }

    .kk-hiw__step-text p {
        font-size: 1.25rem;
    }
}
