/* ==========================================
   AIChatToWord Landing Page Styles
   Modern, Responsive, SEO-Optimized
   ========================================== */

/* --- CSS Variables --- */
:root {
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-glow: rgba(59, 130, 246, 0.4);
}

/* --- Base Reset & Typography --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

/* --- Custom Animations --- */
@keyframes blob {
    0%, 100% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

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

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

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 var(--primary-glow);
    }
    70% {
        box-shadow: 0 0 0 15px transparent;
    }
    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

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

/* --- Animation Utilities --- */
.animate-blob {
    animation: blob 7s infinite;
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.animation-delay-100 {
    animation-delay: 0.1s;
}

.animation-delay-200 {
    animation-delay: 0.2s;
}

.animation-delay-300 {
    animation-delay: 0.3s;
}

.animation-delay-400 {
    animation-delay: 0.4s;
}

.animation-delay-500 {
    animation-delay: 0.5s;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* --- CTA Glow Effects --- */
.cta-glow {
    position: relative;
    animation: pulse-ring 2s infinite;
}

.cta-glow::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(139, 92, 246, 0.5), rgba(59, 130, 246, 0.5));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(12px);
}

.cta-glow:hover::before {
    opacity: 1;
}

.cta-glow-white {
    position: relative;
    animation: none;
}

.cta-glow-white::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.3));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(15px);
}

.cta-glow-white:hover::before {
    opacity: 1;
}

/* --- Hero Chat Mockup --- */
.hero-mockup {
    position: relative;
    transform: perspective(1000px) rotateX(5deg);
    transition: transform 0.5s ease;
}

.hero-mockup:hover {
    transform: perspective(1000px) rotateX(0deg);
}

/* --- FAQ Accordion Styles --- */
.faq-item {
    transition: all 0.3s ease;
}

.faq-item.active {
    border-color: var(--primary-500);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
}

.faq-item.active .faq-icon {
    background-color: var(--primary-500);
    color: white;
    transform: rotate(180deg);
}

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

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.faq-item.active .faq-content {
    max-height: 500px;
}

/* --- Navbar Scroll Effect --- */
#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

/* --- Platform Cards --- */
.platform-card {
    transition: all 0.3s ease;
}

.platform-card:hover {
    transform: translateY(-8px);
}

/* --- Feature Cards --- */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
}

/* --- Mobile Menu --- */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.open {
    max-height: 400px;
}

/* --- Scroll Progress Indicator (Optional Enhancement) --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-700));
    z-index: 100;
    transition: width 0.1s ease;
}

/* --- Selection Color --- */
::selection {
    background-color: var(--primary-200);
    color: var(--primary-900);
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- Responsive Typography --- */
@media (max-width: 640px) {
    h1 {
        font-size: 2.25rem !important;
        line-height: 1.2 !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
    
    .cta-glow,
    .cta-glow-white {
        font-size: 1rem !important;
        padding: 0.75rem 1.5rem !important;
    }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* --- Focus Styles for Accessibility --- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* --- Back to Top Button --- */
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: scale(1.1);
}

/* --- Smooth Section Padding for Fixed Header --- */
section[id] {
    scroll-margin-top: 80px;
}

/* --- Loading State (for future use) --- */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
