/* ==========================================================================
   AIAgens Clean CSS - Mobile First Approach
   ========================================================================== */

/* ==========================================================================
   1. CSS RESET & BASE
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: #ffffff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Mobile scroll fix */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
}

ul {
    list-style: none;
}

/* ==========================================================================
   2. VARIABLES & UTILITIES
   ========================================================================== */

:root {
    /* Colors */
    --primary: #EC4899;
    --secondary: #8B5CF6;
    --accent: #3B82F6;
    --dark: #1f2937;
    --gray: #6b7280;
    --light-gray: #f3f4f6;
    --white: #ffffff;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;

    /* Border radius */
    --radius: 0.5rem;
    --radius-lg: 1rem;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

/* Tailwind-compatible utility classes */
.mx-auto { margin-left: auto; margin-right: auto; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.pt-16 { padding-top: 4rem; }
.pb-12 { padding-bottom: 3rem; }
.text-center { text-align: center; }
.relative { position: relative; }
.absolute { position: absolute; }
.z-10 { z-index: 10; }
.overflow-hidden {
    overflow: hidden;
}
.grid { display: grid; }
.flex { display: flex; }
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.shadow-xl { box-shadow: var(--shadow-lg); }
.bg-white { background-color: white; }
.text-white { color: white; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* Responsive utilities */
@media (min-width: 640px) {
    .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .md\:pt-20 { padding-top: 5rem; }
    .md\:pb-16 { padding-bottom: 4rem; }
    .md\:flex { display: flex; }
    .md\:hidden { display: none; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Gradient text */
.gradient-text,
.beauty-gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* Text colors from existing design */
.text-accent-purple { color: var(--secondary); }
.text-primary { color: var(--primary); }
.text-gray-600 { color: #6b7280; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-blue-600 { color: #3B82F6; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.font-medium { font-weight: 500; }
.hover\:text-blue-600:hover { color: #3B82F6; }
.hover\:-translate-y-0\.5:hover { transform: translateY(-0.125rem); }
.transition-all { transition: all 0.3s ease; }
.duration-200 { transition-duration: 200ms; }

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
    margin-bottom: var(--space-sm);
}

/* ==========================================================================
   4. BUTTONS
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--white);
    color: var(--dark);
    border: 2px solid var(--light-gray);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ==========================================================================
   5. HEADER & NAVIGATION
   ========================================================================== */

.header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
}

.logo {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: var(--space-lg) var(--space-sm);
    box-shadow: var(--shadow-lg);
}

.nav-menu.active {
    display: block;
}

.nav-menu li {
    margin-bottom: var(--space-sm);
}

.nav-menu a {
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary);
}

.btn-nav {
    background: var(--primary);
    color: var(--white);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius);
}

/* Mobile menu button */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: var(--space-xs);
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--dark);
    transition: all 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ==========================================================================
   6. HERO SECTION
   ========================================================================== */

.hero {
    padding: var(--space-xl) 0;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #fef5f9 0%, #f3e8ff 100%);
}

.hero-content {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.hero-title {
    margin-bottom: var(--space-md);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--gray);
    margin-bottom: var(--space-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

/* Hero Stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray);
}

/* Widget Mockup */
.hero-demo {
    margin-top: var(--space-xl);
}

.widget-mockup {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    margin: 0 auto;
    overflow: hidden;
}

.widget-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.widget-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.widget-status {
    margin-left: auto;
    font-size: 0.75rem;
    background: #10b981;
    padding: 2px 8px;
    border-radius: 12px;
}

.widget-body {
    padding: var(--space-md);
    min-height: 200px;
}

.message {
    padding: var(--space-sm);
    border-radius: var(--radius);
    margin-bottom: var(--space-sm);
}

.message-ai {
    background: var(--light-gray);
    margin-right: var(--space-lg);
}

.message-user {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    margin-left: var(--space-lg);
    text-align: right;
}

/* Typing indicator */
.widget-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: var(--space-sm);
    margin-right: var(--space-lg);
}

.widget-typing span {
    width: 8px;
    height: 8px;
    background: var(--gray);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.widget-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.widget-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-10px);
    }
}

/* Recording animation */
.widget-mic.recording {
    animation: pulse 1s infinite;
    background: #ef4444;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.widget-footer {
    padding: var(--space-sm);
    border-top: 1px solid var(--light-gray);
    display: flex;
    gap: var(--space-xs);
}

.widget-input {
    flex: 1;
    padding: var(--space-xs);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius);
    outline: none;
}

.widget-mic {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   7. SECTIONS
   ========================================================================== */

.section {
    padding: var(--space-2xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Problem Section */
.problem {
    background: var(--light-gray);
}

.problem-grid {
    display: grid;
    gap: var(--space-md);
}

.problem-card {
    background: var(--white);
    padding: var(--space-md);
    border-radius: var(--radius);
    text-align: center;
}

.problem-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

/* Features Grid */
.features-grid {
    display: grid;
    gap: var(--space-md);
}

.feature-card {
    background: var(--white);
    padding: var(--space-md);
    border-radius: var(--radius);
    border: 1px solid var(--light-gray);
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

/* How it Works */
.how-it-works {
    background: var(--light-gray);
}

.steps {
    display: grid;
    gap: var(--space-lg);
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

/* Pricing */
.pricing-grid {
    display: grid;
    gap: var(--space-md);
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
}

.price {
    margin: var(--space-md) 0;
}

.currency {
    font-size: 1.25rem;
    color: var(--gray);
}

.amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--dark);
}

.period {
    color: var(--gray);
}

.pricing-features {
    margin: var(--space-lg) 0;
    text-align: left;
}

.pricing-features li {
    padding: var(--space-xs) 0;
    color: var(--gray);
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    text-align: center;
}

.cta-title {
    color: var(--white);
}

.cta-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-content {
    display: grid;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-logo {
    filter: brightness(0) invert(1);
    margin-bottom: var(--space-sm);
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: var(--space-sm);
}

.footer-section ul {
    color: rgba(255, 255, 255, 0.7);
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-md);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* ==========================================================================
   8. TABLET STYLES (768px and up)
   ========================================================================== */

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-md);
    }

    /* Navigation */
    .mobile-menu-btn {
        display: none;
    }

    .nav-menu {
        display: flex !important;
        position: static;
        padding: 0;
        box-shadow: none;
        align-items: center;
        gap: var(--space-lg);
    }

    .nav-menu li {
        margin: 0;
    }

    /* Hero */
    .hero-cta {
        flex-direction: row;
        justify-content: center;
    }

    /* Grids */
    .problem-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   9. DESKTOP STYLES (1024px and up)
   ========================================================================== */

@media (min-width: 1024px) {
    /* Hero with side-by-side layout */
    .hero .container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2xl);
        align-items: center;
    }

    .hero-content {
        text-align: left;
    }

    .hero-cta {
        justify-content: flex-start;
    }

    /* Grids */
    .problem-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .steps {
        grid-template-columns: repeat(4, 1fr);
    }

    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================================================
   10. ANIMATIONS
   ========================================================================== */

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

.hero-content,
.section {
    animation: fadeIn 0.8s ease-out;
}

/* ==========================================================================
   11. MOBILE SCROLL FIX - CRITICAL
   ========================================================================== */

/* Ensure smooth scrolling on mobile */
@media (max-width: 767px) {
    html, body {
        /* Allow natural scrolling */
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: none;
    }

    /* Prevent horizontal scroll */
    * {
        max-width: 100vw;
    }
}

/* ==========================================================================
   12. PRINT STYLES
   ========================================================================== */

@media print {
    .header,
    .footer,
    .hero-demo,
    .cta,
    button {
        display: none;
    }
}