/* ================================================== */
/* MoroccoNaut B2C – ANIMATIONS & DESIGN BOOST        */
/* ================================================== */

html { scroll-behavior: smooth; }

/* ---- Global Smooth Rendering ---- */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: none;
}

/* ---- Page Loader / Curtain ---- */
@keyframes curtainUp {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100%); }
}

@keyframes loaderPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.95); }
}

#page-loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #006064 0%, #004d52 100%);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

#page-loader .loader-logo {
    width: 100px;
    animation: loaderPulse 1.2s ease-in-out infinite;
}

/* ---- Custom Cursor ---- */
#custom-cursor {
    position: fixed;
    width: 35px; height: 35px;
    border: 2px solid rgba(0, 96, 100, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s, background 0.3s;
    mix-blend-mode: difference;
}

#custom-cursor-dot {
    position: fixed;
    width: 6px; height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background 0.2s;
}

#custom-cursor.hover {
    width: 50px; height: 50px;
    border-color: var(--accent-color);
    background: rgba(232, 169, 8, 0.08);
}

#custom-cursor-dot.hover {
    width: 4px; height: 4px;
    background: var(--accent-color);
}

/* Hide custom cursor on touch/small screens */
@media (pointer: coarse) {
    #custom-cursor, #custom-cursor-dot { display: none !important; }
    body, * { cursor: auto !important; }
}

/* ---- Hero Text Reveal ---- */
@keyframes heroReveal {
    0% { opacity: 0; transform: translateY(35px); clip-path: inset(100% 0 0 0); }
    100% { opacity: 1; transform: translateY(0); clip-path: inset(0 0 0 0); }
}

.hero-title { animation: heroReveal 1s cubic-bezier(0.22,1,0.36,1) 0.3s both; }
.hero-subtitle { animation: heroReveal 0.8s cubic-bezier(0.22,1,0.36,1) 0.55s both; }
.hero-description { animation: heroReveal 0.8s cubic-bezier(0.22,1,0.36,1) 0.75s both; }
.hero-actions { animation: heroReveal 0.8s cubic-bezier(0.22,1,0.36,1) 0.95s both; }
.hero-social { animation: heroReveal 0.7s cubic-bezier(0.22,1,0.36,1) 1.1s both; }

/* ---- Scroll-Down Bounce ---- */
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(12px); opacity: 0.5; }
}
.scroll-down a span { animation: scrollBounce 2s ease-in-out infinite; }

/* ---- Scroll Reveal System ---- */
.feature-card,
.step-h,
.b2b-benefit,
.testimonial-card,
.accordion-item,
.stat-item,
.still-questions,
.section-header,
.b2b-wrapper,
.faq-container {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.step-arrow {
    opacity: 0;
    transform: scale(0);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.download-section,
.newsletter-section,
.section-title,
.app-preview-section .carousel-3d {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Visible state */
.feature-card.visible,
.step-h.visible,
.b2b-benefit.visible,
.testimonial-card.visible,
.accordion-item.visible,
.stat-item.visible,
.still-questions.visible,
.section-header.visible,
.b2b-wrapper.visible,
.faq-container.visible,
.download-section.visible,
.newsletter-section.visible,
.section-title.visible,
.app-preview-section .carousel-3d.visible,
.step-arrow.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Stagger delays */
.feature-card:nth-child(1) { transition-delay: 0s; }
.feature-card:nth-child(2) { transition-delay: 0.1s; }
.feature-card:nth-child(3) { transition-delay: 0.2s; }
.feature-card:nth-child(4) { transition-delay: 0.3s; }
.feature-card:nth-child(5) { transition-delay: 0.4s; }
.feature-card:nth-child(6) { transition-delay: 0.5s; }

.b2b-benefit:nth-child(1) { transition-delay: 0s; }
.b2b-benefit:nth-child(2) { transition-delay: 0.12s; }
.b2b-benefit:nth-child(3) { transition-delay: 0.24s; }
.b2b-benefit:nth-child(4) { transition-delay: 0.36s; }

.testimonial-card:nth-child(1) { transition-delay: 0s; }
.testimonial-card:nth-child(2) { transition-delay: 0.15s; }
.testimonial-card:nth-child(3) { transition-delay: 0.3s; }

.accordion-item:nth-child(1) { transition-delay: 0.05s; }
.accordion-item:nth-child(2) { transition-delay: 0.15s; }
.accordion-item:nth-child(3) { transition-delay: 0.25s; }
.accordion-item:nth-child(4) { transition-delay: 0.35s; }
.accordion-item:nth-child(5) { transition-delay: 0.45s; }

.stat-item:nth-child(1) { transition-delay: 0s; }
.stat-item:nth-child(2) { transition-delay: 0.1s; }
.stat-item:nth-child(3) { transition-delay: 0.2s; }
.stat-item:nth-child(4) { transition-delay: 0.3s; }

/* ---- Feature Cards Hover ---- */
.feature-card {
    transition: all 0.4s cubic-bezier(0.22,1,0.36,1);
}

.feature-card:hover {
    box-shadow: 0 20px 50px rgba(0, 96, 100, 0.15);
}

.feature-card .feature-icon {
    transition: all 0.4s cubic-bezier(0.22,1,0.36,1);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 10px 25px rgba(0, 96, 100, 0.2);
}

/* ---- Step Circle Animation ---- */
.step-circle-h {
    transition: all 0.4s cubic-bezier(0.22,1,0.36,1);
}

.step-h:hover .step-circle-h {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 96, 100, 0.3), 0 0 0 6px rgba(0, 96, 100, 0.1);
}

/* ---- Testimonial Cards Hover ---- */
.testimonial-card {
    transition: all 0.4s cubic-bezier(0.22,1,0.36,1);
}

.testimonial-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

/* ---- B2B Floating Cards Pulse ---- */
@keyframes floatPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.b2b-floating-card {
    animation: floatPulse 3s ease-in-out infinite;
}

.b2b-floating-card.card-2 {
    animation-delay: 1.5s;
}

/* ---- B2B Benefits Hover ---- */
.b2b-benefit {
    transition: all 0.3s ease;
}

.b2b-benefit:hover {
    transform: translateX(8px) !important;
}

[dir="rtl"] .b2b-benefit:hover {
    transform: translateX(-8px) !important;
}

.b2b-benefit:hover .benefit-icon {
    transform: scale(1.15);
    transition: transform 0.3s ease;
}

/* ---- CTA Button Enhanced ---- */
.signup-cta {
    position: relative;
    transition: all 0.3s cubic-bezier(0.22,1,0.36,1);
}

.signup-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(240, 61, 71, 0.45);
    filter: brightness(1.1);
}

/* ---- Bubble Float (FAQ) ---- */
@keyframes bubbleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(2deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

.bubble { animation: bubbleFloat 5s ease-in-out infinite; }
.bubble:nth-child(2) { animation-delay: 0.5s; animation-duration: 6s; }
.bubble:nth-child(3) { animation-delay: 1s; animation-duration: 7s; }
.bubble:nth-child(4) { animation-delay: 1.5s; animation-duration: 5.5s; }
.bubble:nth-child(5) { animation-delay: 2s; animation-duration: 6.5s; }

/* ---- Accordion Smooth Open ---- */
@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 500px; }
}

.accordion-button[aria-expanded="true"] + .accordion-content {
    animation: slideDown 0.4s cubic-bezier(0.22,1,0.36,1) forwards;
}

.accordion-button {
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.accordion-button:hover {
    color: var(--primary-color);
    padding-left: 8px;
}

[dir="rtl"] .accordion-button:hover {
    padding-left: 0;
    padding-right: 8px;
}

/* ---- Download Buttons Hover ---- */
.download-btn {
    transition: all 0.4s cubic-bezier(0.22,1,0.36,1);
}

.download-btn:hover {
    transform: translateY(-5px) scale(1.05);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
}

/* ---- Social Icons Hover ---- */
.hero-social li a,
.footer-social li a {
    transition: all 0.3s cubic-bezier(0.22,1,0.36,1);
}

.hero-social li a:hover,
.footer-social li a:hover {
    transform: translateY(-4px) scale(1.15);
}

/* ---- Section Numbers ---- */
.section-num {
    transition: all 0.4s ease;
}

.section-header:hover .section-num {
    transform: scale(1.1);
}

/* ---- Video Link Pulse ---- */
@keyframes playPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
    50% { box-shadow: 0 0 0 12px rgba(255,255,255,0); }
}

.play-circle {
    animation: playPulse 2.5s ease-in-out infinite;
}

/* ---- Go Top Button ---- */
.go-top {
    transition: all 0.4s cubic-bezier(0.22,1,0.36,1);
}

.go-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 96, 100, 0.3);
}

/* ---- Newsletter Input Focus ---- */
.newsletter-form input:focus {
    box-shadow: 0 0 0 3px rgba(0, 96, 100, 0.2);
    outline: none;
    transition: box-shadow 0.3s ease;
}

/* ---- Header Logo Transition ---- */
#header-logo {
    transition: all 0.4s ease;
}

/* ---- Reduced Motion Support ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .feature-card, .step-h, .step-arrow, .b2b-benefit, .testimonial-card,
    .accordion-item, .stat-item, .still-questions, .download-section,
    .newsletter-section, .section-header, .b2b-wrapper, .faq-container,
    .section-title, .app-preview-section .carousel-3d {
        opacity: 1 !important;
        transform: none !important;
    }
}
