/* ===== CSS Variables ===== */
:root {
    --primary: #6C5CE7;
    --primary-dark: #5a4bd6;
    --primary-light: #a855f7;
    --secondary: #2d3748;
    --accent: #f093fb;
    --bg: #ffffff;
    --bg-alt: #f8f9fc;
    --bg-dark: #0f0f23;
    --text: #1a1a2e;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.938rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
}

.btn-outline {
    border-color: var(--border);
    color: var(--text);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(108, 92, 231, 0.04);
}

.btn-ghost {
    color: var(--text);
    background: transparent;
}

.btn-ghost:hover {
    color: var(--primary);
    background: rgba(108, 92, 231, 0.06);
}

.btn-white {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.05rem;
    border-radius: 12px;
}

.btn-block {
    width: 100%;
}

/* ===== Header / Navigation ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
}

.logo-icon {
    width: 36px;
    height: 36px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.938rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu {
    display: none;
    padding: 16px 24px 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.mobile-menu.active {
    display: block;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.mobile-nav-links a {
    display: block;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.mobile-nav-links a:hover {
    background: var(--bg-alt);
    color: var(--primary);
}

.mobile-nav-actions {
    display: flex;
    gap: 12px;
}

.mobile-nav-actions .btn {
    flex: 1;
}

/* ===== Hero Section ===== */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    background: linear-gradient(180deg, #f8f6ff 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(108, 92, 231, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 50%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(168, 85, 247, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 100px;
    background: rgba(108, 92, 231, 0.08);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 28px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* ===== Playground Section ===== */
.playground {
    padding: 100px 0;
    background: var(--bg);
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.swap-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 40px;
    background: var(--bg-alt);
    border-radius: 12px;
    padding: 4px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.tab {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.tab.active {
    background: #fff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.tab:hover:not(.active) {
    color: var(--text);
}

.swap-workspace {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px;
    max-width: 900px;
    margin: 0 auto;
}

.upload-area {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.upload-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    min-height: 240px;
}

.upload-box:hover {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.02);
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.upload-text {
    font-size: 0.938rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.upload-text span {
    color: var(--primary);
    font-weight: 600;
}

.upload-hint {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.upload-format {
    font-size: 0.813rem;
    color: var(--text-light);
}

.swap-arrow {
    width: 40px;
    height: 40px;
    color: var(--text-light);
    flex-shrink: 0;
}

.swap-btn {
    width: 100%;
    padding: 18px;
    font-size: 1.05rem;
}

/* ===== How It Works ===== */
.how-it-works {
    padding: 100px 0;
    background: var(--bg-alt);
}

.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.step {
    flex: 1;
    text-align: center;
    padding: 0 24px;
    position: relative;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-weight: 700;
    font-size: 0.938rem;
    margin-bottom: 20px;
}

.step-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: var(--primary);
}

.step h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.step p {
    font-size: 0.938rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.step-connector {
    width: 60px;
    height: 2px;
    background: var(--border);
    margin-top: 48px;
    flex-shrink: 0;
}

/* ===== Features ===== */
.features {
    padding: 100px 0;
    background: var(--bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    padding: 36px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
    background: var(--bg);
}

.feature-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 26px;
    height: 26px;
}

.feature-icon.purple {
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary);
}

.feature-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.feature-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.feature-icon.orange {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.feature-icon.pink {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

.feature-icon.indigo {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.938rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== Showcase Section ===== */
.showcase {
    padding: 100px 0;
    background: var(--bg-alt);
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.showcase-item {
    background: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.showcase-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.showcase-img {
    height: 200px;
    background: linear-gradient(135deg, #e0d4fc, #c4b5fd);
}

.showcase-item:nth-child(2) .showcase-img {
    background: linear-gradient(135deg, #bfdbfe, #93c5fd);
}

.showcase-item:nth-child(3) .showcase-img {
    background: linear-gradient(135deg, #bbf7d0, #86efac);
}

.showcase-item h3 {
    font-size: 1.25rem;
    font-weight: 700;
    padding: 24px 24px 8px;
}

.showcase-item p {
    padding: 0 24px;
    font-size: 0.938rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.showcase-item .btn {
    margin: 20px 24px 24px;
}

/* ===== Pricing ===== */
.pricing {
    padding: 100px 0;
    background: var(--bg);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

.pricing-card {
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    position: relative;
    transition: var(--transition);
}

.pricing-card:hover {
    box-shadow: var(--shadow);
}

.pricing-card.popular {
    border-color: var(--primary);
    box-shadow: 0 8px 40px rgba(108, 92, 231, 0.15);
    transform: scale(1.03);
}

.popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border-radius: 100px;
    font-size: 0.813rem;
    font-weight: 600;
    white-space: nowrap;
}

.pricing-tier {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.pricing-price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.pricing-desc {
    font-size: 0.938rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.pricing-features {
    margin-bottom: 32px;
}

.pricing-features li {
    padding: 10px 0;
    font-size: 0.938rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-features li::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ===== FAQ ===== */
.faq {
    padding: 100px 0;
    background: var(--bg-alt);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
}

.faq-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 0.938rem;
    font-weight: 600;
    color: var(--text);
    gap: 12px;
}

.faq-question svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--text-light);
    transition: var(--transition);
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    padding: 0 24px 20px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== CTA Section ===== */
.cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.08), transparent 60%);
    pointer-events: none;
}

.cta h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}

.cta p {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 36px;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    padding: 80px 0 32px;
    color: rgba(255,255,255,0.7);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-brand .logo {
    color: #fff;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.938rem;
    line-height: 1.7;
    max-width: 300px;
}

.footer-links h4 {
    color: #fff;
    font-size: 0.938rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    font-size: 0.875rem;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    transition: var(--transition);
}

.social-links a:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.social-links svg {
    width: 18px;
    height: 18px;
}

/* ===== Responsive: Tablet (768px - 1024px) ===== */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }

    .nav-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        padding: 140px 0 80px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .showcase-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .showcase-item:last-child {
        grid-column: span 2;
        max-width: 500px;
        justify-self: center;
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 700px;
        margin: 0 auto;
    }

    .pricing-card:last-child {
        grid-column: span 2;
        max-width: 340px;
        justify-self: center;
    }

    .pricing-card.popular {
        transform: none;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }

    .footer-brand {
        grid-column: span 2;
    }

    .steps {
        flex-direction: column;
        align-items: center;
        gap: 32px;
    }

    .step {
        max-width: 400px;
    }

    .step-connector {
        width: 2px;
        height: 40px;
        margin-top: 0;
    }
}

/* ===== Responsive: Mobile (< 768px) ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 6px 14px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 320px;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-divider {
        height: 30px;
    }

    .swap-tabs {
        flex-direction: column;
        max-width: 100%;
    }

    .swap-workspace {
        padding: 24px 16px;
    }

    .upload-area {
        flex-direction: column;
    }

    .swap-arrow {
        transform: rotate(90deg);
    }

    .upload-box {
        min-height: 180px;
        padding: 32px 16px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .showcase-grid {
        grid-template-columns: 1fr;
    }

    .showcase-item:last-child {
        grid-column: span 1;
        max-width: none;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .pricing-card:last-child {
        grid-column: span 1;
        max-width: none;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .cta {
        padding: 80px 0;
    }

    .cta h2 {
        font-size: 1.75rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .playground,
    .how-it-works,
    .features,
    .showcase,
    .pricing,
    .faq {
        padding: 72px 0;
    }
}

/* ===== Responsive: Small Mobile (< 480px) ===== */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .feature-card {
        padding: 24px;
    }

    .pricing-card {
        padding: 32px 24px;
    }

    .faq-question {
        padding: 16px 18px;
        font-size: 0.875rem;
    }

    .faq-answer p {
        padding: 0 18px 16px;
    }
}
