/* ============================================
   AI CRM Engine - Professional Stylesheet
   ============================================ */

/* CSS Variables */
:root {
    /* Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --secondary-dark: #7c3aed;

    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;

    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    --white: #ffffff;
    --black: #000000;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-card: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-card: 0 4px 20px rgba(99, 102, 241, 0.15);
    --shadow-card-hover: 0 8px 30px rgba(99, 102, 241, 0.25);

    /* Spacing */
    --container-max: 1200px;
    --section-padding: 100px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

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

ul {
    list-style: none;
}

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

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Header
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-100);
    transition: all var(--transition-base);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

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

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: color var(--transition-fast);
}

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 50%, #fff1f2 100%);
    z-index: -2;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--gray-900);
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.btn-white {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

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

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
}

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

/* ============================================
   Section Headers
   ============================================ */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-badge {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.section-description {
    font-size: 1.125rem;
    color: var(--gray-500);
}

/* ============================================
   Products Section
   ============================================ */
.products {
    padding: var(--section-padding) 0;
    background: var(--white);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 40px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

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

.product-card:hover::before {
    opacity: 1;
}

.product-icon {
    margin-bottom: 24px;
}

.product-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.product-description {
    color: var(--gray-500);
    margin-bottom: 24px;
    line-height: 1.7;
}

.product-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--gray-700);
}

.product-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gray-100);
    color: var(--gray-700);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.product-btn:hover {
    background: var(--primary);
    color: var(--white);
}

/* ============================================
   Features Section
   ============================================ */
.features {
    padding: var(--section-padding) 0;
    background: var(--gray-50);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--gray-100);
    transition: all var(--transition-base);
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: var(--radius-md);
    color: var(--primary);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--gray-500);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   Demos Section
   ============================================ */
.demos {
    padding: var(--section-padding) 0;
    background: var(--white);
}

.demos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
}

.demo-card {
    background: linear-gradient(180deg, var(--white) 0%, var(--gray-50) 100%);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 40px;
    transition: all var(--transition-base);
}

.demo-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.demo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.demo-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
}

.demo-icon.hrm {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.demo-icon.ybc {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

.demo-badge {
    padding: 6px 12px;
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.demo-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.demo-description {
    color: var(--gray-500);
    margin-bottom: 28px;
    line-height: 1.7;
}

.demo-credentials {
    background: var(--gray-900);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 28px;
}

.demo-credentials h4 {
    color: var(--gray-400);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.credential-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.credential-row:last-child {
    margin-bottom: 0;
}

.credential-label {
    color: var(--gray-400);
    font-size: 0.875rem;
    min-width: 80px;
}

.credential-value {
    color: var(--white);
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.95rem;
    background: var(--gray-800);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    flex: 1;
}

.copy-btn {
    padding: 8px;
    color: var(--gray-400);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.copy-btn:hover {
    color: var(--white);
    background: var(--gray-800);
}

.demo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.demo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.demo-btn.ybc {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.demo-btn.ybc:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.demo-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    padding: 16px 24px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: var(--radius-md);
    color: var(--warning);
}

.demo-note p {
    font-size: 0.875rem;
}

/* ============================================
   CTA Section
   ============================================ */
.cta {
    padding: 80px 0;
    background: var(--gradient-primary);
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 16px;
}

.cta p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 32px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 60px 0 30px;
    background: var(--gray-900);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand .logo-text {
    color: var(--white);
}

.footer-brand p {
    color: var(--gray-400);
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-column h4 {
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.footer-column a {
    display: block;
    color: var(--gray-400);
    font-size: 0.95rem;
    margin-bottom: 12px;
    transition: color var(--transition-fast);
}

.footer-column a:hover {
    color: var(--white);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--gray-800);
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ============================================
   Toast Notification
   ============================================ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--gray-900);
    color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 2000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.toast svg {
    color: var(--success);
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 1024px) {
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    .nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        gap: 30px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .products-grid,
    .demos-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .demo-card {
        padding: 24px;
    }

    .cta h2 {
        font-size: 1.75rem;
    }

    .footer-links {
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .product-card {
        padding: 24px;
    }

    .credential-row {
        flex-wrap: wrap;
    }

    .credential-value {
        width: 100%;
    }
}

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

.hero-content > * {
    animation: fadeInUp 0.8s ease forwards;
}

.hero-badge { animation-delay: 0.1s; }
.hero-title { animation-delay: 0.2s; }
.hero-description { animation-delay: 0.3s; }
.hero-actions { animation-delay: 0.4s; }
.hero-stats { animation-delay: 0.5s; }

/* Scroll reveal */
.product-card,
.feature-card,
.demo-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.product-card.visible,
.feature-card.visible,
.demo-card.visible {
    opacity: 1;
    transform: translateY(0);
}
