/* ABOUTME: Main stylesheet for X-Scraper landing page */
/* ABOUTME: Contains responsive styles, component designs, and animations */

/* CSS Variables */
:root {
    --primary: #1d9bf0;
    --primary-dark: #1a8cd8;
    --primary-light: #e8f5fd;
    --secondary: #0f1419;
    --text: #0f1419;
    --text-muted: #536471;
    --background: #ffffff;
    --background-alt: #f7f9fa;
    --border: #eff3f4;
    --success: #00ba7c;
    --warning: #ffad1f;
    --error: #f4212e;
    --gradient: linear-gradient(135deg, #1d9bf0 0%, #1a8cd8 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 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);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

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

a:hover {
    color: var(--primary-dark);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--secondary);
}

h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    gap: 8px;
}

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

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

.btn-secondary {
    background: var(--background);
    color: var(--text);
    border: 2px solid var(--border);
}

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

.btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

.btn-nav {
    padding: 8px 20px;
    font-size: 0.9375rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

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

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    text-decoration: none;
}

.logo:hover {
    color: var(--secondary);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gradient);
    color: white;
    border-radius: var(--radius);
    margin-right: 4px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    font-weight: 500;
    transition: color var(--transition);
}

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

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

/* Hero Section */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--background) 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.hero h1 {
    margin-bottom: 24px;
}

.hero .highlight {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
}

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

/* Code Window */
.hero-visual {
    display: flex;
    justify-content: center;
}

.code-window {
    width: 100%;
    max-width: 480px;
    background: #1e1e1e;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: #2d2d2d;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-title {
    margin-left: 12px;
    font-size: 0.8125rem;
    color: #999;
}

.code-content {
    padding: 24px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #e6e6e6;
    overflow-x: auto;
}

.code-content .keyword { color: #c586c0; }
.code-content .function { color: #dcdcaa; }
.code-content .property { color: #9cdcfe; }
.code-content .string { color: #ce9178; }
.code-content .number { color: #b5cea8; }
.code-content .boolean { color: #569cd6; }
.code-content .comment { color: #6a9955; }

/* Problem Section */
.problem-section {
    padding: 100px 0;
    background: var(--background);
}

.problem-section h2 {
    text-align: center;
    margin-bottom: 64px;
}

.problems-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 64px;
}

.problem-card {
    padding: 32px;
    background: var(--background-alt);
    border-radius: var(--radius-lg);
    text-align: center;
}

.problem-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.problem-card h3 {
    margin-bottom: 12px;
    color: var(--error);
}

.problem-card p {
    color: var(--text-muted);
}

.solution-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.solution-text {
    font-size: 1.25rem;
    color: var(--text);
}

/* Features Section */
.features-section {
    padding: 100px 0;
    background: var(--background-alt);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-top: 16px;
}

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

.feature-card {
    padding: 32px;
    background: var(--background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

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

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* Use Cases Section */
.use-cases-section {
    padding: 100px 0;
    background: var(--background);
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.use-case-card {
    padding: 32px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

.use-case-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.use-case-card h3 {
    color: var(--primary);
    margin-bottom: 12px;
}

.use-case-card p {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 0.9375rem;
}

.use-case-card ul {
    list-style: none;
}

.use-case-card li {
    padding: 4px 0;
    font-size: 0.875rem;
    color: var(--text);
}

.use-case-card li::before {
    content: "✓";
    color: var(--success);
    margin-right: 8px;
    font-weight: 700;
}

/* Testimonials Section */
.testimonials-section {
    padding: 100px 0;
    background: var(--secondary);
    color: white;
}

.testimonials-section .section-header h2,
.testimonials-section .section-header p {
    color: white;
}

.testimonials-section .section-header p {
    opacity: 0.8;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 64px;
}

.testimonial-card {
    padding: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.testimonial-card p {
    font-size: 1.0625rem;
    line-height: 1.7;
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-card footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
}

.testimonial-card cite {
    font-style: normal;
}

.testimonial-card strong {
    display: block;
    font-weight: 600;
}

.testimonial-card span {
    font-size: 0.875rem;
    opacity: 0.7;
}

.trust-logos {
    text-align: center;
}

.trust-logos p {
    margin-bottom: 24px;
    opacity: 0.7;
}

.logos-row {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.logo-placeholder {
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    font-weight: 600;
    opacity: 0.7;
}

/* Pricing Section */
.pricing-section {
    padding: 100px 0;
    background: var(--background-alt);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    align-items: start;
}

.pricing-card {
    padding: 40px;
    background: var(--background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    position: relative;
}

.pricing-card.featured {
    border: 2px solid var(--primary);
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 16px;
    background: var(--primary);
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 100px;
}

.pricing-header {
    text-align: center;
    margin-bottom: 32px;
}

.pricing-header h3 {
    margin-bottom: 16px;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.price .currency {
    font-size: 1.5rem;
    font-weight: 600;
}

.price .amount {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--secondary);
}

.price .period {
    font-size: 1rem;
    color: var(--text-muted);
}

.pricing-desc {
    color: var(--text-muted);
    margin-top: 8px;
}

.pricing-features {
    list-style: none;
    margin-bottom: 32px;
}

.pricing-features li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9375rem;
}

.pricing-features li::before {
    content: "✓";
    color: var(--success);
    margin-right: 12px;
    font-weight: 700;
}

.pricing-note {
    text-align: center;
    margin-top: 32px;
    color: var(--text-muted);
}

/* FAQ Section */
.faq-section {
    padding: 100px 0;
    background: var(--background);
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item summary {
    padding: 24px 0;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: "+";
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-muted);
    transition: transform var(--transition);
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    padding-bottom: 24px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    background: var(--gradient);
    text-align: center;
    color: white;
}

.cta-section h2 {
    color: white;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 32px;
}

.cta-section .btn-primary {
    background: white;
    color: var(--primary);
}

.cta-section .btn-primary:hover {
    background: var(--background-alt);
}

/* Contact Section */
.contact-section {
    padding: 100px 0;
    background: var(--background-alt);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 64px;
    align-items: start;
}

.contact-info h2 {
    margin-bottom: 16px;
}

.contact-info > p {
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.7;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-method {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.method-icon {
    font-size: 1.5rem;
}

.contact-method strong {
    display: block;
    margin-bottom: 4px;
}

.contact-method p {
    color: var(--text-muted);
    margin: 0;
}

.contact-form-container {
    background: var(--background);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    font-size: 0.9375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-note {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: -8px;
}

/* Footer */
.footer {
    padding: 64px 0 32px;
    background: var(--secondary);
    color: white;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    margin-top: 16px;
    opacity: 0.7;
    font-size: 0.9375rem;
}

.footer-brand .logo {
    color: white;
}

.footer-links h4 {
    color: white;
    font-size: 0.9375rem;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: white;
    opacity: 0.7;
    font-size: 0.9375rem;
    transition: opacity var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    color: white;
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    opacity: 0.7;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .features-grid,
    .use-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin: 0 auto;
    }

    .pricing-card.featured {
        transform: none;
        order: -1;
    }

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--background);
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

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

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 32px;
    }

    .hero-visual {
        order: -1;
    }

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

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

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

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

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .footer-brand .logo {
        justify-content: center;
    }
}

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

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

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .btn-large {
        padding: 14px 24px;
        font-size: 1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .feature-card,
    .use-case-card,
    .testimonial-card {
        padding: 24px;
    }

    .pricing-card {
        padding: 32px 24px;
    }

    .contact-form-container {
        padding: 24px;
    }
}

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

.hero-content,
.hero-visual {
    animation: fadeIn 0.6s ease-out;
}

.hero-visual {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

/* Form States */
.contact-form.loading .btn {
    opacity: 0.7;
    pointer-events: none;
}

.contact-form.success {
    display: none;
}

.success-message {
    padding: 40px;
    text-align: center;
    display: none;
}

.success-message.show {
    display: block;
}

.success-message h3 {
    color: var(--success);
    margin-bottom: 12px;
}

.success-message p {
    color: var(--text-muted);
}
