:root {
    --bg-color: #000000;
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.2); /* 20% opacity */
    --accent-blue: #0A2558; /* Deep rich blue from the design */
    --accent-blue-light: #1A4B9C;
    --transition-speed: 0.8s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* SVG Wave Background */
.svg-wave-bg {
    position: fixed;
    bottom: -30vh; /* Moved significantly lower */
    left: -5vw; /* Start with overflow on left */
    width: 110vw;
    height: auto;
    z-index: -1;
    pointer-events: none;
    overflow: visible;
    animation: svgWaveMove 12s ease-in-out infinite alternate;
}

.svg-wave-bg svg {
    width: 100%; 
    height: auto;
    display: block; /* Ensure it renders properly as a block element */
}

@keyframes svgWaveMove {
    0% { transform: translateX(-3vw); }
    100% { transform: translateX(3vw); }
}

/* Mobile adjustments for SVG */
@media (max-width: 768px) {
    .svg-wave-bg {
        width: 1500px;
        height: 800px;
        left: 50%;
        margin-left: -750px; /* Center it precisely */
        bottom: -300px; /* Bring it up high enough to see the wave peaks */
    }
    
    .svg-wave-bg svg {
        width: 100%;
        height: 100%;
    }

    @keyframes svgWaveMove {
        0% { transform: translateX(-50px); }
        100% { transform: translateX(50px); }
    }
}

/* Navbar */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 40px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.nav-right {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.nav-right:hover, .nav-right.active {
    color: #FFFFFF !important;
}

/* Main Container */
.main-container {
    height: 100vh; /* Fixed height to prevent scrolling */
    overflow: hidden; /* Lock scrolling */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 24px;
}

/* Views (Form & Success) */
.view {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 600px;
    text-align: center;
    transition: all var(--transition-speed) cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.view.hidden {
    opacity: 0;
    visibility: hidden;
    filter: blur(20px);
    transform: translate(-50%, -45%) scale(0.95);
    pointer-events: none;
}

.view.active {
    opacity: 1;
    visibility: visible;
    filter: blur(0px);
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

/* Typography */
.headline {
    font-size: 42px;
    font-weight: 400;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.subheadline {
    font-family: 'Newsreader', serif;
    font-size: 48px;
    font-weight: 400;
    font-style: italic;
    line-height: normal;
    color: var(--text-primary);
    margin-bottom: 48px;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.italic {
    font-family: 'Newsreader', serif;
    font-style: italic;
}

/* Form Header Container (for blurring) */
.form-header {
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

/* Typing Mode State (When user focuses/types) */
.typing-mode .form-header {
    transform: translateY(-20px) scale(0.95);
    opacity: 0.15;
    filter: blur(8px);
    margin-bottom: 24px;
}

.typing-mode .input-wrapper {
    transform: translateY(-20px);
}

/* Form Styles */
.form-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.input-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.typing-mode .mail-icon {
    color: var(--text-primary);
}

.mail-icon {
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: color 0.3s ease;
}

input[type="email"] {
    background: transparent !important;
    border: none;
    color: var(--text-secondary);
    font-size: 64px;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    letter-spacing: -2px;
    width: 320px; /* Initial width, JS will overwrite */
    outline: none;
    padding: 8px 0;
    transition: color 0.3s ease;
}

input[type="email"]::placeholder {
    color: var(--text-secondary);
}

.typing-mode input[type="email"] {
    color: var(--text-primary);
}

/* Fix for Chrome autocomplete yellow/white background */
input[type="email"]:-webkit-autofill,
input[type="email"]:-webkit-autofill:hover, 
input[type="email"]:-webkit-autofill:focus, 
input[type="email"]:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px transparent inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    transition: background-color 5000s ease-in-out 0s;
}

input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Text turns white when typing */
.typing-mode input[type="email"] {
    color: var(--text-primary);
}

/* Submit Button */
.submit-btn {
    margin-top: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    padding: 12px 32px;
    border-radius: 24px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.submit-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.submit-btn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Success View Styles */
.success-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 32px;
}

.success-subheadline {
    color: var(--text-primary);
    margin-bottom: 32px;
}

/* Staggered Text Animation */
.stagger-text {
    overflow: hidden;
    padding-bottom: 10px; /* Prevent clipping */
}

.stagger-text span {
    display: inline-block;
    transform: translateY(150%);
    opacity: 0;
}

.view.active .stagger-text span {
    animation: slideUpChar 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpChar {
    0% { transform: translateY(150%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.success-message {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.submitted-email {
    font-size: 14px;
    color: var(--text-secondary);
}

.submitted-email span {
    color: var(--text-primary);
}

/* Animations (Blur & Fade) */
.fade-in {
    opacity: 0;
    filter: blur(15px);
    transform: translateY(20px);
    animation: blurFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes blurFadeIn {
    to {
        opacity: 1;
        filter: blur(0px);
        transform: translateY(0);
    }
}

/* Content Section (Scrollable) */
.content-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 24px;
    text-align: center;
}

.content-wrapper {
    max-width: 800px;
    opacity: 0;
    filter: blur(20px);
    transform: translateY(40px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.content-wrapper.revealed {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0);
}

.content-headline {
    font-size: 36px;
    font-weight: 500;
    margin-bottom: 24px;
    line-height: 1.2;
    text-align: center;
}

.content-subheadline {
    font-size: 32px;
    color: var(--text-secondary);
    margin-bottom: 64px;
    line-height: 1.4;
}

.content-body p {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 24px;
    }
    .headline, .subheadline {
        font-size: 32px;
    }
    input[type="email"] {
        font-size: 24px;
    }
    .content-headline {
        font-size: 28px;
    }
    .content-subheadline {
        font-size: 24px;
    }
}

/* =========================================
   Legal Footer
========================================= */
.legal-footer {
    position: fixed;
    bottom: 24px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 10;
}
.legal-footer p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}
.legal-footer a, .legal-footer button {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: underline;
    transition: color 0.3s ease;
}
.legal-footer a:hover, .legal-footer button:hover {
    color: #ffffff;
}
.text-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
}

/* =========================================
   Cookie Banner
========================================= */
.cookie-banner {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #151515;
    border-radius: 999px;
    padding: 10px 10px 10px 14px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}
.cookie-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}
.cookie-banner.hidden {
    display: none !important;
}
.cookie-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cookie-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #333333;
    border-radius: 50%;
    color: #ffffff;
}
.cookie-icon svg {
    width: 14px;
    height: 14px;
}
.cookie-content p {
    margin: 0;
    font-size: 13px;
    color: #DDDDDD;
    line-height: 1;
}
.cookie-content a {
    color: rgba(255, 255, 255, 0.3);
    text-decoration: underline;
}
.cookie-content a:hover {
    color: #ffffff;
}
.cookie-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cookie-actions button {
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}
.btn-decline {
    background: #2A2A2D;
    color: #ffffff;
}
.btn-decline:hover {
    background: #3B3B3F;
}
.btn-accept {
    background: #ffffff;
    color: #000000;
}
.btn-accept:hover {
    background: #f0f0f0;
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .legal-footer {
        bottom: 16px;
    }
    .cookie-banner {
        width: calc(100% - 32px);
        flex-direction: column;
        border-radius: 24px;
        padding: 20px;
        bottom: 16px;
        white-space: normal;
        text-align: center;
    }
    .cookie-content {
        flex-direction: column;
    }
    .cookie-actions {
        width: 100%;
        justify-content: stretch;
    }
    .cookie-actions button {
        flex: 1;
    }
}
