:root {
    --bg-color: #03050c;
    /* Deep, almost black blue */
    --text-primary: #ffffff;
    --text-secondary: #9da3af;
    --accent-color: #3b82f6;
    /* Electric blue */
    --accent-glow: rgba(59, 130, 246, 0.4);
    --surface-color: rgba(255, 255, 255, 0.03);
    --surface-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* Spline requirement */
}

/* Typography & Utilities */
h1 {
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.text-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary.large,
.btn-secondary.large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-color);
    border: none;
}

.btn-primary:hover {
    background: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--surface-border);
}

.btn-secondary:hover {
    background: var(--surface-color);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

/* Nav */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--surface-border);
    background: rgba(3, 5, 12, 0.7);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a:not(.btn-primary) {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:not(.btn-primary):hover {
    color: var(--text-primary);
}

/* Spline 3D Integration */
.spline-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: auto;
    /* Allows interacting with 3D model */
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
}

.spline-fallback {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--bg-color);
    background-image:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 40%),
        radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.05), transparent 40%);
    display: none;
}

/* Ensure content sits above Spline */
.content-layer {
    position: relative;
    z-index: 1;
    pointer-events: none;
    /* Let clicks pass through to 3D scene where there is no content */
}

.content-layer * {
    pointer-events: auto;
    /* Re-enable clicks on content itself */
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    padding-top: 5rem;
}

.hero-content {
    max-width: 800px;
}

.hero p {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInAnimation 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.mt-2 {
    margin-top: 2rem;
}

@keyframes fadeInAnimation {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sections General */
section {
    padding: 8rem 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
    max-width: 700px;
    margin-inline: auto;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-top: 1rem;
}

/* Features Section */
.features {
    background: linear-gradient(to bottom, transparent, rgba(3, 5, 12, 0.95) 20%);
    position: relative;
    z-index: 2;
    /* Needs to sit above the fixed Spline background so it isn't transparent forever */
}

/* Ensure the full-page Spline interaction isn't blocked by empty space in sections */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--surface-border);
    border-radius: 1rem;
    padding: 3rem 2rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, -20%), rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.feature-card:hover::before {
    opacity: 1;
}

.icon-placeholder {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 2rem;
    font-size: 1.25rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* CTA Section */
.cta-section {
    text-align: center;
    background: var(--bg-color);
    position: relative;
    z-index: 2;
}

.glass-panel {
    margin: 0 5%;
    padding: 6rem 3rem;
    border-radius: 2rem;
    background: rgba(59, 130, 246, 0.03);
    border: 1px solid rgba(59, 130, 246, 0.1);
    backdrop-filter: blur(20px);
    max-width: 1000px;
    margin-inline: auto;
    position: relative;
}

.glass-panel::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: var(--accent-color);
    filter: blur(120px);
    opacity: 0.1;
    z-index: -1;
    pointer-events: none;
}

.cta-section p {
    color: var(--text-secondary);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 1.5rem auto 0;
}

/* Footer */
.footer {
    background: #010206;
    padding: 4rem 5% 2rem;
    border-top: 1px solid var(--surface-border);
    position: relative;
    z-index: 2;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 800;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: clamp(2.5rem, 10vw, 3rem);
    }

    h2 {
        font-size: clamp(1.75rem, 8vw, 2rem);
    }

    section {
        padding: 5rem 1rem;
    }

    .navbar {
        padding: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a:not(.btn-primary) {
        display: none;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary.large,
    .btn-secondary.large {
        width: 100%;
        padding: 0.875rem 1rem;
    }

    .glass-panel {
        padding: 3rem 1rem;
        margin: 0;
        border-radius: 1rem;
    }

    .feature-card {
        padding: 2rem 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Clever Watermark Cover */
.watermark-cover {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 145px;
    height: 38px;
    background-color: #000000;
    /* Matches the pure black edge of the Spline scene seamlessly */
    border-radius: 8px;
    z-index: 10;
    pointer-events: none;
    /* Let clicks pass through if the user interacts there, though there is nothing there */
}

/* Waitlist Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 5, 12, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-content {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--surface-border);
    border-radius: 1.5rem;
    padding: 3rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.hidden .modal-content {
    transform: translateY(20px);
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: var(--text-primary);
}

#waitlist-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#waitlist-form input[type="email"] {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--surface-border);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#waitlist-form input[type="email"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

#success-message h3 {
    color: #10b981;
    /* Success green */
    margin-bottom: 0.5rem;
}

/* Transparent Overlay Button to cover the Spline "Join Waitlist" button */
.spline-overlay-btn {
    position: fixed;
    left: 50%;
    top: 70%;
    /* Approximate position for the button */
    transform: translateX(-50%);
    width: 320px;
    height: 140px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 20;
}