/* FiFi Design System — shared across all pages */

body {
    font-family: 'Inter', sans-serif;
    background: #ffffff;
    color: #1a1a1a;
    min-height: 100vh;
    scroll-behavior: smooth;
}

/* --- Section Background Layers --- */

.section-purple {
    background: linear-gradient(180deg, #eedcf5 0%, #e4d4f0 40%, #f0dcf6 100%);
}

.section-white {
    background: #ffffff;
}

/* --- Hero Aurora Effect --- */

.hero-aurora {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #e8d4f3 0%, #eedcf5 60%, #eedcf5 100%);
}

.hero-aurora::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -10%;
    width: 80%;
    height: 120%;
    background: conic-gradient(
        from 200deg at 30% 30%,
        transparent 0deg,
        rgba(217, 80, 245, 0.18) 30deg,
        transparent 60deg,
        rgba(200, 100, 255, 0.12) 100deg,
        transparent 140deg,
        rgba(230, 120, 255, 0.15) 180deg,
        transparent 220deg,
        rgba(217, 80, 245, 0.1) 270deg,
        transparent 310deg
    );
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
    animation: aurora-shift 12s ease-in-out infinite alternate;
}

.hero-aurora > * {
    position: relative;
    z-index: 1;
}

@keyframes aurora-shift {
    0% { transform: rotate(0deg) scale(1); opacity: 0.9; }
    100% { transform: rotate(8deg) scale(1.1); opacity: 1; }
}

/* --- Gradient Section Dividers --- */

.divider-gradient {
    height: 120px;
    background: linear-gradient(180deg, #eedcf5 0%, #ffffff 100%);
    margin: 0;
    border: none;
}

.divider-gradient-reverse {
    height: 120px;
    background: linear-gradient(180deg, #ffffff 0%, #eedcf5 100%);
    margin: 0;
    border: none;
}

.glass-card {
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
}

.bg-pink-gradient {
    background: linear-gradient(90deg, #d96ff5, #e288f7);
}

.text-pink-gradient {
    background: linear-gradient(90deg, #d96ff5, #e288f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */

/* --- Keyframes --- */

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

@keyframes float-delayed {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(3deg); }
}

@keyframes gradient-drift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-down {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scale-in {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slide-left {
    from { opacity: 0; transform: translateX(-60px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slide-right {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(217, 111, 245, 0.2); }
    50% { box-shadow: 0 0 50px rgba(217, 111, 245, 0.45); }
}

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

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0.8; }
}

/* --- Scroll Reveal System --- */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.from-left {
    transform: translateX(-60px);
}

.reveal.from-right {
    transform: translateX(60px);
}

.reveal.from-scale {
    transform: scale(0.92);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Staggered children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.24s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.36s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.48s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.60s; }

.reveal-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* --- Floating Decorative Orbs --- */

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.orb-pink {
    background: radial-gradient(circle, rgba(217, 111, 245, 0.35), rgba(217, 111, 245, 0));
    animation: breathe 8s ease-in-out infinite;
}

.orb-purple {
    background: radial-gradient(circle, rgba(180, 120, 255, 0.3), rgba(180, 120, 255, 0));
    animation: breathe 10s ease-in-out infinite 2s;
}

.orb-lavender {
    background: radial-gradient(circle, rgba(220, 180, 255, 0.3), rgba(220, 180, 255, 0));
    animation: breathe 12s ease-in-out infinite 4s;
}

/* --- Navigation --- */

.nav-glass {
    background: rgba(243, 231, 247, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0);
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.nav-glass.scrolled {
    background: rgba(243, 231, 247, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

/* --- Hero --- */

.hero-title-line {
    display: block;
    opacity: 0;
    animation: fade-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title-line:nth-child(1) { animation-delay: 0.1s; }
.hero-title-line:nth-child(2) { animation-delay: 0.3s; }
.hero-title-line:nth-child(3) { animation-delay: 0.5s; }

.hero-subtitle {
    opacity: 0;
    animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
}

.hero-cta {
    opacity: 0;
    animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
}

.hero-mockup {
    opacity: 0;
    animation: scale-in 1s cubic-bezier(0.16, 1, 0.3, 1) 1.1s forwards;
}

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

/* --- Carousel --- */

.carousel-section {
    position: relative;
    overflow: hidden;
    padding: 5rem 0;
}

.carousel-viewport {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 85%;
    max-width: 85%;
    padding: 0 0.75rem;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform: scale(0.88);
    opacity: 0.4;
    filter: blur(2px);
}

.carousel-slide.active {
    transform: scale(1);
    opacity: 1;
    filter: blur(0);
}

.carousel-slide img {
    width: 100%;
    height: auto;
    border-radius: 1.5rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
    pointer-events: none;
}

@media (min-width: 768px) {
    .carousel-slide {
        flex: 0 0 36%;
        max-width: 36%;
        padding: 0 1rem;
    }
}

@media (min-width: 1024px) {
    .carousel-slide {
        flex: 0 0 28%;
        max-width: 28%;
        padding: 0 1.25rem;
    }
}

/* Carousel navigation */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(217, 111, 245, 0.25);
    border: none;
    cursor: pointer;
    transition: all 0.4s ease;
    padding: 0;
}

.carousel-dot.active {
    background: linear-gradient(90deg, #d96ff5, #e288f7);
    width: 32px;
    border-radius: 5px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    color: #1a1a1a;
    font-size: 1.25rem;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-60%) scale(1.08);
}

.carousel-btn.prev { left: 1rem; }
.carousel-btn.next { right: 1rem; }

@media (max-width: 767px) {
    .carousel-btn { display: none; }
}

/* --- Glass Card Enhancements --- */

.glass-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(217, 111, 245, 0.12);
}

/* --- Pricing Card Glow --- */

.pricing-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pricing-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 30px 70px rgba(217, 111, 245, 0.25);
}

/* --- CTA Glow Effect --- */

.cta-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* --- Download Button Shimmer --- */

.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

/* --- Section Divider --- */

.section-label {
    display: inline-block;
    background: #1a1a1a;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

/* --- Animated Gradient Text --- */

.text-gradient-animated {
    background: linear-gradient(90deg, #d96ff5, #e288f7, #b478ff, #d96ff5);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-drift 6s ease-in-out infinite;
}

/* --- Smooth image animations --- */

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

.img-float-delayed {
    animation: float-delayed 7s ease-in-out infinite 1s;
}

/* --- Email Input Glow --- */

.email-container {
    transition: box-shadow 0.4s ease;
}

.email-container:focus-within {
    box-shadow: 0 0 0 3px rgba(217, 111, 245, 0.3), 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* --- Loading overlay --- */

.page-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #f3e7f7 0%, #e8dff5 50%, #f6e0f7 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-logo {
    animation: breathe 2s ease-in-out infinite;
}

/* --- FAQ Accordion --- */

.faq-answer {
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

.faq-toggle {
    cursor: pointer;
    background: none;
    border: none;
}

/* --- Accessibility: Reduced Motion --- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal, .reveal-stagger > * {
        opacity: 1;
        transform: none;
    }

    .carousel-track {
        transition: none;
    }

    .carousel-slide {
        transform: scale(1);
        opacity: 1;
        filter: none;
    }
}
