/* ==========================================================================
   THE CORRELATION POINT - DESIGN SYSTEM & LAYOUT
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-color: #07080a;
    --bg-footer: #040507;
    --text-primary: #f8fafc;
    --text-secondary: #8e9cae;
    --text-muted: #4e5d6c;
    
    /* Glowing accents */
    --accent-color: #00e5ff;
    --accent-glow: rgba(0, 229, 255, 0.4);
    --accent-gradient: linear-gradient(135deg, #00e5ff 0%, #0088ff 100%);
    
    /* Layout Spacing */
    --max-width: 1200px;
    --header-height: 80px;
}

/* Base resets & styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
}

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

/* Selection Highlight */
::selection {
    background: rgba(0, 229, 255, 0.2);
    color: #ffffff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 229, 255, 0.3);
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    background: rgba(7, 8, 10, 0.7);
}

.header-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: default;
}

.logo-wrapper {
    height: 48px;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
}

.brand-logo {
    height: 65px;
    width: 65px;
    object-fit: cover;
    object-position: top;
    mix-blend-mode: screen;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #ffffff;
}

.header-link {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-link:hover {
    color: #ffffff;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.15);
}

/* Sections Global */
.feature-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem 2rem;
}

.section-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    z-index: 10;
}

.feature-section h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #ffffff;
    max-width: 900px;
    text-wrap: balance;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}

.accent-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: transparent;
    padding-top: var(--header-height);
}

.canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

#correlation-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.canvas-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(7, 8, 10, 0.1) 0%, rgba(7, 8, 10, 0.75) 60%, rgba(7, 8, 10, 0.98) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #ffffff 40%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-wrap: balance;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    font-weight: 400;
    color: #94a3b8; /* perfectly in sync with title gradient */
    max-width: 540px;
    margin-bottom: 3.5rem;
    line-height: 1.6;
    letter-spacing: 0.02em;
    text-wrap: balance;
}

/* Waitlist Form */
.waitlist-form {
    width: 100%;
    max-width: 520px;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 5, 10, 0.4);
    border: 1px solid rgba(0, 229, 255, 0.15);
    padding: 0.35rem;
    border-radius: 6px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.input-group:focus-within {
    border-color: rgba(0, 229, 255, 0.5);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.15), inset 0 0 10px rgba(0, 229, 255, 0.05);
    background: rgba(0, 10, 20, 0.6);
}

.input-group input[type="email"] {
    background: transparent;
    border: none;
    outline: none;
    padding: 0.8rem 1.4rem;
    font-size: 1rem;
    color: #ffffff;
    flex-grow: 1;
    font-family: inherit;
    font-weight: 400;
    width: 100%;
}

.input-group input[type="email"]::placeholder {
    color: var(--text-muted);
    font-weight: 300;
}

.cta-button {
    background: rgba(0, 229, 255, 0.08);
    color: #00e5ff;
    border: 1px solid rgba(0, 229, 255, 0.3);
    outline: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.05);
    text-transform: uppercase;
}

.cta-button:hover {
    background: rgba(0, 229, 255, 0.15);
    border-color: rgba(0, 229, 255, 0.8);
    color: #ffffff;
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.25), inset 0 0 12px rgba(0, 229, 255, 0.15);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.cta-button:active {
    transform: translateY(0);
}

/* Button Loading & Success States */
.btn-loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 229, 255, 0.2);
    border-top: 2px solid #00e5ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 0.6rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.waitlist-form.submitting .btn-loader {
    display: inline-block;
}

.waitlist-form.submitting .btn-text {
    opacity: 0.7;
}

.form-feedback {
    margin-top: 0.9rem;
    font-size: 0.9rem;
    font-weight: 400;
    min-height: 20px;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.form-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

.form-feedback.success {
    color: #4ade80;
}

.form-feedback.error {
    color: #f87171;
}

/* Fourth Section preview badge styles */
.preview-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.6rem 1.4rem;
    border-radius: 30px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.pulse-indicator {
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px var(--accent-color);
    position: relative;
}

.pulse-indicator::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--accent-color);
    opacity: 0;
    animation: radar-pulse 2s infinite ease-out;
}

@keyframes radar-pulse {
    0% {
        transform: scale(0.5);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.preview-badge {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

/* Footer styling */
.site-footer {
    background-color: rgba(4, 5, 7, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding: 6rem 2rem 3rem 2rem;
    position: relative;
    z-index: 10;
}

.footer-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4rem;
    margin-bottom: 5rem;
    flex-wrap: wrap;
}

.footer-brand {
    max-width: 320px;
}

.footer-brand-subtext {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    font-weight: 300;
}

.footer-form-wrapper {
    width: 100%;
    max-width: 520px;
}

.footer-form-wrapper h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    color: #ffffff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* Scroll reveal animations (triggered via JS observer) */
.fade-in-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    .footer-top {
        flex-direction: column;
        gap: 3rem;
    }
    
    .footer-brand, .footer-form-wrapper {
        max-width: 100%;
    }
    
    .input-group {
        flex-direction: column;
        border-radius: 6px;
        padding: 0.6rem;
    }
    
    .input-group input[type="email"] {
        padding: 0.6rem 1rem;
        text-align: center;
    }
    
    .cta-button {
        width: 100%;
        border-radius: 4px;
    }
    
    .footer-bottom {
        flex-direction: column-reverse;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-links {
        justify-content: center;
        width: 100%;
    }
}
