/* CTA Section — default (marketplace, pricing): video + overlay + .container as direct children of section */
.cta-section {
    padding: 120px 24px;
    background: linear-gradient(135deg, #040f3a, #1b49ff);
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-section > .container {
    position: relative;
    z-index: 2;
}

.cta-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(4, 15, 58, 0.9), rgba(8, 24, 84, 0.82));
    z-index: 1;
    pointer-events: none;
}

.cta-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    margin-bottom: 24px;
    color: #fff !important;
}

.cta-section p {
    font-size: 20px;
    margin-bottom: 40px;
    color: #fff !important;
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: white;
    padding: 80px 24px 40px;
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

.footer-column h4 {
    font-weight: 600;
    margin-bottom: 16px;
    color: white;
}

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

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

.footer-column a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

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

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

    .marketplace-categories {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .marketplace-categories::-webkit-scrollbar {
        height: 4px;
    }

    .marketplace-categories::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 2px;
    }
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Deployment Choice Section - ensure it's interactive */
#deployment-choice {
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
}

#deployment-choice * {
    pointer-events: auto !important;
}

.deployment-choice-btn {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative;
    z-index: 11;
    border-radius: 50px !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    font-family: 'Space Grotesk', sans-serif;
}

.deployment-choice-btn:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.15);
    transform: translateY(-4px);
}

.deployment-choice-btn.selected {
    border-color: var(--primary-blue);
    background: rgba(0, 102, 255, 0.05);
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.2);
}

/* Footer Selection Popup */
.footer-selection-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 0px solid var(--primary-blue);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 30px 24px;
    z-index: 1000;
    display: none;
    animation: slideUp 0.4s ease-out;
}

.footer-selection-popup.visible {
    display: block;
}

.footer-selection-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-selection-info {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    flex: 1;
}

.footer-selection-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-selection-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-selection-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.footer-selection-value.highlight {
    color: var(--primary-blue);
}

#footer-specs-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.footer-selection-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.footer-deploy-btn {
    background: linear-gradient(135deg, #040f3a, #1b49ff);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-deploy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 102, 255, 0.3);
}

.footer-deploy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.footer-deploy-btn::after {
    content: '🚀';
    font-size: 18px;
}

@media (max-width: 768px) {
    .footer-selection-popup {
        padding: 10px 12px calc(8px + env(safe-area-inset-bottom, 0px));
        max-height: 38vh;
        overflow-y: auto;
    }

    .footer-selection-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .footer-selection-info {
        width: auto;
        min-width: 0;
        gap: 8px;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .footer-selection-actions {
        width: auto;
        margin-top: 0;
        flex-shrink: 0;
    }

    .footer-selection-label {
        display: none;
    }

    .footer-selection-value {
        font-size: 12px;
        line-height: 1.2;
        white-space: nowrap;
    }

    #footer-specs-item {
        display: none !important;
    }

    #footer-server-item {
        display: none !important;
    }

    .footer-deploy-btn {
        width: auto;
        justify-content: center;
        padding: 8px 12px;
        font-size: 13px;
        min-height: 34px;
    }

    .footer-deploy-btn::after {
        font-size: 14px;
    }

    body.footer-popup-visible .email-collection-section.visible,
    body.footer-popup-visible .email-collection-section[style*="display: block"] {
        padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
    }

    .email-collection-section.visible,
    .email-collection-section[style*="display: block"] {
        justify-content: flex-start;
        align-items: stretch;
        min-height: auto;
        padding-top: 64px;
        text-align: center;
    }

    .email-collection-header {
        margin-bottom: 20px;
    }

    .email-collection-header h2 {
        font-size: 30px;
        margin-bottom: 12px;
    }

    .email-collection-header p {
        font-size: 16px;
    }
}

/* Email Collection Section */
.email-collection-section {
    padding: 120px 24px;
    background: linear-gradient(135deg, #040f3a, #1b49ff);
    color: white;
    display: none;
}

.email-collection-section.visible,
.email-collection-section[style*="display: block"] {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 90vh;
    text-align: center;
}

.email-collection-section .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.email-collection-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    width: 100%;
}

.email-collection-header {
    margin-bottom: 40px;
}

.email-collection-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #FFFFFF !important;
}

.email-collection-header p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.95) !important;
    margin-bottom: 0;
}

.email-collection-section * {
    color: inherit;
}

.email-collection-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
    max-width: 520px;
    margin: 0 auto;
}

.email-collection-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
    width: 100%;
}

.email-collection-consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    text-align: left;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.88);
    cursor: pointer;
}

.email-collection-consent-input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: white;
    cursor: pointer;
}

.email-collection-consent a {
    color: white;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.email-collection-consent a:hover {
    color: rgba(255, 255, 255, 0.85);
}

.email-collection-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 16px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.email-collection-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.email-collection-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.email-collection-submit {
    padding: 16px 32px;
    background: white;
    color: var(--primary-blue);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.email-collection-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.3);
}

.email-collection-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    .email-collection-row {
        flex-direction: column;
    }

    .email-collection-submit {
        width: 100%;
    }
}
