/* ===========================
   Landing Page Specific Styles
   =========================== */

/* Container for consistent centering */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    width: 100%;
}

/* Hero Section Enhancements */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin: 2rem auto 2rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 600px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: white;
    color: var(--accent-primary);
    border-color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* Features Section */
.features {
    padding: var(--space-2xl) 0;
    background: var(--bg-primary);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-family: var(--font-display);
}

.section-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--surface-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.15);
    border-color: var(--accent-primary);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--accent-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Demo Section */
.demo-section {
    padding: var(--space-2xl) 0;
    background: var(--surface-primary);
}

.demo-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.demo-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-family: var(--font-display);
}

.demo-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.demo-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.demo-features li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.demo-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1.25rem;
}

.demo-visual {
    position: relative;
}

.demo-screen {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.demo-screen::before {
    content: '• • •';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.5rem;
}

.demo-messages {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.message.character {
    background: var(--surface-secondary);
    margin-right: 20%;
}

.message.user {
    background: var(--accent-gradient);
    color: white;
    margin-left: 20%;
}

.message strong {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Carousel Styles */
.demo-carousel {
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.demo-slide {
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s ease-in-out;
}

.demo-slide.active {
    position: relative;
    opacity: 1;
    transform: translateX(0);
}

.demo-slide.slide-out-left {
    transform: translateX(-100%);
}

.demo-slide.slide-out-right {
    transform: translateX(100%);
}

/* Carousel Navigation */
.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot:hover {
    background: var(--accent-primary);
    opacity: 0.6;
}

.carousel-dot.active {
    background: var(--accent-primary);
    width: 24px;
    border-radius: 6px;
}

/* How It Works Preview */
.how-it-works-preview {
    padding: var(--space-2xl) 0;
    background: var(--bg-primary);
}

.how-it-works-preview h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-family: var(--font-display);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.step-card {
    background: var(--surface-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.15);
    border-color: var(--accent-primary);
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

.step-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.step-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.cta-center {
    text-align: center;
}

/* Testimonials */
.testimonials {
    padding: var(--space-2xl) 0;
    background: var(--surface-primary);
}

.testimonials h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-family: var(--font-display);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
}

.stars {
    color: #fbbf24;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.testimonial-card p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-card cite {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: normal;
}

/* CTA Section */
.cta-section {
    padding: var(--space-2xl) 0;
    background: var(--accent-gradient);
    text-align: center;
}

.cta-content h2 {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    font-family: var(--font-display);
}

.cta-content p {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.cta-section .btn-primary {
    background: white;
    color: var(--accent-primary);
}

.cta-section .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .demo-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .demo-visual {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 75vh;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .section-header h2,
    .demo-text h2,
    .testimonials h2,
    .how-it-works-preview h2 {
        font-size: 2rem;
    }
    
    .cta-content h2 {
        font-size: 2.5rem;
    }
    
    .cta-content p {
        font-size: 1.25rem;
    }
    
    .features-grid,
    .steps-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .message.character,
    .message.user {
        margin: 0;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        max-width: 300px;
    }
}

/* Theme Adjustments */
[data-theme="dark"] .btn-primary {
    background: white;
    color: var(--accent-primary);
}

[data-theme="dark"] .btn-secondary {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
}

[data-theme="dark"] .demo-section {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .feature-card,
[data-theme="dark"] .step-card,
[data-theme="dark"] .demo-screen {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .testimonial-card {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .testimonials {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .hero-content .btn-secondary {
    color: white;
}

[data-theme="light"] .demo-section,
[data-theme="light"] .testimonials {
    background: #f8f9fa;
}

[data-theme="light"] .feature-card,
[data-theme="light"] .step-card,
[data-theme="light"] .testimonial-card {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content > * {
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-title {
    animation-delay: 0.1s;
}

.hero-subtitle {
    animation-delay: 0.2s;
}

.hero-cta {
    animation-delay: 0.3s;
}

.hero-stats {
    animation-delay: 0.4s;
}

/* Accessibility */
.btn:focus,
.feature-card:focus-within,
.step-card:focus-within {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}