/* ArkifiBusiness — scroll reveals, 3D-style depth, stagger. Respects prefers-reduced-motion. */

@media (prefers-reduced-motion: reduce) {
    .lp-observe,
    .lp-observe-feature-grid .lp-feature-cols > [class*="col-"],
    .lp-observe-steps-grid .lp-step-cols > [class*="col-"],
    .lp-observe-pr-grid .lp-pr-cols > [class*="col-"],
    .lp-observe-fe-categories .container > .fe-category,
    .lp-depth-orb,
    [data-lp-tilt],
    .lp-word,
    .lp-trust-track,
    .lp-scroll-bar,
    .lp-cta-shimmer,
    .lp-cta-particle,
    .pricing-card-v2.featured::after,
    .pricing-badge-v2,
    .lp-ripple,
    .lp-faq-section .accordion-collapse,
    .pr-faq .accordion-collapse {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
    .lp-word { display: inline; }
    .lp-trust-track { display: flex; flex-wrap: wrap; }
    .pricing-card-v2.featured::after { display: none !important; }
}

/* ---- Scroll reveal (3D “rise into frame”) ---- */
.lp-observe {
    opacity: 0;
    transform: translate3d(0, 48px, -100px) rotateX(8deg);
    transform-origin: 50% 80%;
    transition:
        opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.lp-observe.lp-observe--in {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotateX(0deg);
    will-change: auto;
}

.lp-observe--soft {
    transform: translate3d(0, 28px, -40px) rotateX(4deg);
}

/* Staggered columns when section is in */
@keyframes lpStaggerRise {
    from {
        opacity: 0;
        transform: translate3d(0, 36px, -60px) rotateX(6deg) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) rotateX(0deg) scale(1);
    }
}

.lp-observe-feature-grid.lp-observe--in .lp-feature-cols > [class*="col-"],
.lp-observe-steps-grid.lp-observe--in .lp-step-cols > [class*="col-"],
.lp-observe-pr-grid.lp-observe--in .lp-pr-cols > [class*="col-"] {
    opacity: 0;
    animation: lpStaggerRise 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.lp-observe-feature-grid.lp-observe--in .lp-feature-cols > [class*="col-"]:nth-child(1) { animation-delay: 0.04s; }
.lp-observe-feature-grid.lp-observe--in .lp-feature-cols > [class*="col-"]:nth-child(2) { animation-delay: 0.1s; }
.lp-observe-feature-grid.lp-observe--in .lp-feature-cols > [class*="col-"]:nth-child(3) { animation-delay: 0.16s; }
.lp-observe-feature-grid.lp-observe--in .lp-feature-cols > [class*="col-"]:nth-child(4) { animation-delay: 0.22s; }
.lp-observe-feature-grid.lp-observe--in .lp-feature-cols > [class*="col-"]:nth-child(5) { animation-delay: 0.28s; }
.lp-observe-feature-grid.lp-observe--in .lp-feature-cols > [class*="col-"]:nth-child(6) { animation-delay: 0.34s; }
.lp-observe-feature-grid.lp-observe--in .lp-feature-cols > [class*="col-"]:nth-child(7) { animation-delay: 0.4s; }
.lp-observe-feature-grid.lp-observe--in .lp-feature-cols > [class*="col-"]:nth-child(8) { animation-delay: 0.46s; }
.lp-observe-feature-grid.lp-observe--in .lp-feature-cols > [class*="col-"]:nth-child(9) { animation-delay: 0.52s; }

.lp-observe-steps-grid.lp-observe--in .lp-step-cols > [class*="col-"]:nth-child(1) { animation-delay: 0.06s; }
.lp-observe-steps-grid.lp-observe--in .lp-step-cols > [class*="col-"]:nth-child(2) { animation-delay: 0.14s; }
.lp-observe-steps-grid.lp-observe--in .lp-step-cols > [class*="col-"]:nth-child(3) { animation-delay: 0.22s; }

.lp-observe-pr-grid.lp-observe--in .lp-pr-cols > [class*="col-"]:nth-child(1) { animation-delay: 0.05s; }
.lp-observe-pr-grid.lp-observe--in .lp-pr-cols > [class*="col-"]:nth-child(2) { animation-delay: 0.1s; }
.lp-observe-pr-grid.lp-observe--in .lp-pr-cols > [class*="col-"]:nth-child(3) { animation-delay: 0.15s; }
.lp-observe-pr-grid.lp-observe--in .lp-pr-cols > [class*="col-"]:nth-child(4) { animation-delay: 0.2s; }
.lp-observe-pr-grid.lp-observe--in .lp-pr-cols > [class*="col-"]:nth-child(5) { animation-delay: 0.25s; }
.lp-observe-pr-grid.lp-observe--in .lp-pr-cols > [class*="col-"]:nth-child(6) { animation-delay: 0.3s; }

/* Feature page: category blocks stagger */
.lp-observe-fe-categories.lp-observe--in .container > .fe-category {
    opacity: 0;
    animation: lpStaggerRise 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.lp-observe-fe-categories.lp-observe--in .container > .fe-category:nth-child(1) { animation-delay: 0.04s; }
.lp-observe-fe-categories.lp-observe--in .container > .fe-category:nth-child(2) { animation-delay: 0.1s; }
.lp-observe-fe-categories.lp-observe--in .container > .fe-category:nth-child(3) { animation-delay: 0.16s; }
.lp-observe-fe-categories.lp-observe--in .container > .fe-category:nth-child(4) { animation-delay: 0.22s; }
.lp-observe-fe-categories.lp-observe--in .container > .fe-category:nth-child(5) { animation-delay: 0.28s; }
.lp-observe-fe-categories.lp-observe--in .container > .fe-category:nth-child(6) { animation-delay: 0.34s; }
.lp-observe-fe-categories.lp-observe--in .container > .fe-category:nth-child(7) { animation-delay: 0.4s; }
.lp-observe-fe-categories.lp-observe--in .container > .fe-category:nth-child(8) { animation-delay: 0.46s; }

/* ---- Ambient depth orbs (hero) ---- */
.lp-motion-hero {
    position: relative;
    overflow: hidden;
}

.lp-depth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
    opacity: 0.32;
    pointer-events: none;
    z-index: 0;
    animation: lpOrbDrift 16s ease-in-out infinite;
}

.lp-depth-orb--a {
    width: min(320px, 55vw);
    height: min(320px, 55vw);
    background: radial-gradient(circle, rgba(255, 222, 89, 0.55) 0%, transparent 70%);
    top: -5%;
    left: -8%;
}

.lp-depth-orb--b {
    width: min(260px, 45vw);
    height: min(260px, 45vw);
    background: radial-gradient(circle, rgba(122, 59, 168, 0.45) 0%, transparent 70%);
    bottom: 0;
    right: -6%;
    animation-delay: -8s;
}

@keyframes lpOrbDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(18px, -22px) scale(1.06); }
    66% { transform: translate(-14px, 12px) scale(0.98); }
}

/* Hero mock float polish */
.lp-hero .lp-mock-float {
    animation: lpMockFloat 5s ease-in-out infinite;
}

.lp-hero .lp-mock-float.lp-mock-bills {
    animation-delay: -2.2s;
}

@keyframes lpMockFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ---- 3D tilt target (mouse; applied via inline style from JS) ---- */
[data-lp-tilt] {
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out;
}

[data-lp-tilt].lp-tilt-ready {
    will-change: transform;
}

/* Cards: subtle hover depth when revealed */
.lp-observe--in .feature-card,
.lp-observe--in .ca-card,
.lp-observe--in .fe-item {
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.lp-observe--in .feature-card:hover,
.lp-observe--in .ca-card:hover {
    transform: translateY(-4px) translateZ(0);
}

/* ---- Scroll progress bar ---- */
.lp-scroll-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--arkifi-purple) 0%, var(--arkifi-yellow) 60%, var(--arkifi-purple) 100%);
    background-size: 200% 100%;
    z-index: 9999;
    pointer-events: none;
    border-radius: 0 2px 2px 0;
    transition: width 0.1s linear;
    animation: lpScrollBarShimmer 3s linear infinite;
}

@keyframes lpScrollBarShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---- Hero headline word-by-word reveal ---- */
.lp-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(22px) rotateX(12deg);
    transform-origin: 50% 100%;
    transition:
        opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.lp-word.lp-word--in {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
    will-change: auto;
}

/* ---- Trust strip marquee ---- */
.lp-trust-marquee-wrap {
    overflow: hidden;
    position: relative;
}

.lp-trust-marquee-wrap::before,
.lp-trust-marquee-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}

.lp-trust-marquee-wrap::before {
    left: 0;
    background: linear-gradient(90deg, #fff 0%, transparent 100%);
}

.lp-trust-marquee-wrap::after {
    right: 0;
    background: linear-gradient(270deg, #fff 0%, transparent 100%);
}

.lp-trust-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 0 2rem;
    animation: lpTrustScroll 28s linear infinite;
    width: max-content;
}

.lp-trust-track:hover {
    animation-play-state: paused;
}

@keyframes lpTrustScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ---- Feature card icon: hover-only float + glow ---- */
.lp-channel-card .lp-channel-icon {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.lp-channel-card:hover .lp-channel-icon {
    transform: translateY(-6px) scale(1.08);
    box-shadow: 0 12px 28px rgba(94, 37, 144, 0.35);
}

/* Stop the global icon-float on feature cards (it runs on all simultaneously) */
.lp-channel-card .feature-icon {
    animation: none;
}

/* ---- Testimonial: quote decoration + stagger ---- */
.lp-testimonial-card {
    position: relative;
    overflow: hidden;
}

.lp-testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: -0.15rem;
    left: 1rem;
    font-size: 5rem;
    line-height: 1;
    font-family: Georgia, serif;
    color: var(--arkifi-purple);
    opacity: 0.1;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.lp-testimonial-card:hover::before {
    opacity: 0.18;
}

.lp-testimonial-card .lp-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--arkifi-gradient);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(94, 37, 144, 0.3);
}

/* Testimonial stagger (reuse lp-observe-feature-grid stagger) */
.lp-observe-testimonials.lp-observe--in .lp-testimonial-cols > [class*="col-"] {
    opacity: 0;
    animation: lpStaggerRise 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.lp-observe-testimonials.lp-observe--in .lp-testimonial-cols > [class*="col-"]:nth-child(1) { animation-delay: 0.05s; }
.lp-observe-testimonials.lp-observe--in .lp-testimonial-cols > [class*="col-"]:nth-child(2) { animation-delay: 0.14s; }
.lp-observe-testimonials.lp-observe--in .lp-testimonial-cols > [class*="col-"]:nth-child(3) { animation-delay: 0.23s; }

/* ---- CTA section: shimmer layer + floating particles ---- */
.lp-cta-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(255, 255, 255, 0.06) 50%,
        transparent 70%
    );
    background-size: 300% 100%;
    animation: lpCtaShimmer 5s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes lpCtaShimmer {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -100% 0; }
}

.lp-cta-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    animation: lpParticleFly 8s ease-in-out infinite;
}

.lp-cta-particle:nth-child(1) {
    width: 6px; height: 6px;
    background: var(--arkifi-yellow);
    left: 12%; top: 20%;
    animation-delay: 0s;
}
.lp-cta-particle:nth-child(2) {
    width: 4px; height: 4px;
    background: rgba(255,255,255,0.6);
    left: 28%; top: 65%;
    animation-delay: 1.4s;
}
.lp-cta-particle:nth-child(3) {
    width: 8px; height: 8px;
    background: var(--arkifi-yellow);
    left: 55%; top: 15%;
    animation-delay: 2.8s;
}
.lp-cta-particle:nth-child(4) {
    width: 5px; height: 5px;
    background: rgba(255,255,255,0.5);
    left: 72%; top: 70%;
    animation-delay: 0.7s;
}
.lp-cta-particle:nth-child(5) {
    width: 7px; height: 7px;
    background: var(--arkifi-yellow);
    left: 88%; top: 30%;
    animation-delay: 2s;
}

@keyframes lpParticleFly {
    0% { opacity: 0; transform: translateY(0) scale(0.5); }
    15% { opacity: 0.9; }
    85% { opacity: 0.6; }
    100% { opacity: 0; transform: translateY(-60px) scale(1.2); }
}

/* ---- Pricing card: post-inject stagger ---- */
@keyframes lpPriceCardIn {
    from {
        opacity: 0;
        transform: translate3d(0, 32px, -50px) rotateX(5deg) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) rotateX(0deg) scale(1);
    }
}

.pricing-card-v2.lp-pr-animate {
    opacity: 0;
    animation: lpPriceCardIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ---- Pricing page hero: floating stat chips ---- */
.pr-float-chip {
    position: absolute;
    padding: 0.55rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 3;
    pointer-events: none;
    animation: lpPrChipFloat 5s ease-in-out infinite;
}

.pr-float-chip:nth-child(1) { animation-delay: 0s; }
.pr-float-chip:nth-child(2) { animation-delay: 1.8s; }
.pr-float-chip:nth-child(3) { animation-delay: 3.2s; }

@keyframes lpPrChipFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ---- Counter animation ---- */
.lp-counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ---- Depth orb polish: extra orb for pricing hero ---- */
.lp-depth-orb--c {
    width: min(200px, 35vw);
    height: min(200px, 35vw);
    background: radial-gradient(circle, rgba(255, 222, 89, 0.4) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -4s;
    opacity: 0.2;
}

/* ---- Featured pricing card: subtle shine sweep (children above via z-index) ---- */
.pricing-card-v2.featured {
    position: relative;
}

.pricing-card-v2.featured > * {
    position: relative;
    z-index: 1;
}

.pricing-card-v2.featured::after {
    content: '';
    position: absolute;
    top: -60%;
    left: -80%;
    width: 55%;
    height: 220%;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(255, 255, 255, 0) 40%,
        rgba(255, 255, 255, 0.35) 50%,
        rgba(255, 255, 255, 0) 60%,
        transparent 100%
    );
    transform: rotate(28deg);
    animation: lpPricingShine 5.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes lpPricingShine {
    0%, 12% { transform: rotate(28deg) translateX(-30%); opacity: 0; }
    18% { opacity: 1; }
    45% { transform: rotate(28deg) translateX(180%); opacity: 0.9; }
    55%, 100% { transform: rotate(28deg) translateX(220%); opacity: 0; }
}

.pricing-badge-v2 {
    animation: lpBadgePulse 2.8s ease-in-out infinite;
}

@keyframes lpBadgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 222, 89, 0.35); }
    50% { box-shadow: 0 0 0 6px rgba(255, 222, 89, 0); }
}

/* ---- FAQ accordions: smoother open/close ---- */
.lp-faq-section .accordion-item,
.pr-faq .accordion-item {
    border-radius: 12px !important;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(94, 37, 144, 0.1) !important;
}

.lp-faq-section .accordion-button,
.pr-faq .accordion-button {
    font-weight: 600;
    transition: background 0.25s ease, color 0.2s ease, box-shadow 0.25s ease;
}

.lp-faq-section .accordion-button:not(.collapsed),
.pr-faq .accordion-button:not(.collapsed) {
    box-shadow: inset 3px 0 0 var(--arkifi-yellow);
}

.lp-faq-section .accordion-collapse,
.pr-faq .accordion-collapse {
    transition: height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.lp-faq-section .accordion-body,
.pr-faq .accordion-body {
    transition: opacity 0.3s ease;
}

/* ---- CTA / primary buttons: material-style ripple target ---- */
.btn-arkifi,
.btn-arkifi-outline,
.hero-cta-btn,
#mainNavbar .btn-nav-cta {
    position: relative;
    overflow: hidden;
}

.lp-ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    opacity: 0.55;
    pointer-events: none;
    animation: lpRippleExpand 0.6s ease-out forwards;
}

@keyframes lpRippleExpand {
    to {
        transform: scale(2.8);
        opacity: 0;
    }
}
