@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    /* Colors */
    --color-bg: #000000;
    --color-surface: #111111;
    --color-text-primary: #ffffff;
    --color-text-secondary: #888888;
    --color-accent: #ffffff;
    --color-accent-glow: rgba(255, 255, 255, 0.3);

    /* Spacing */
    --spacing-sm: 1rem;
    --spacing-md: 2rem;

    /* Typography */
    --font-main: 'Outfit', system-ui, sans-serif;

    /* Borders */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    width: 100vw;
}

/* Background Layers */
.bg-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url('assets/hero-bg.png');
    background-size: cover;
    background-position: center;
    filter: grayscale(100%) brightness(0.6);
}

.bg-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(to bottom, rgba(15, 17, 21, 0.4) 0%, rgba(15, 17, 21, 0.9) 100%);
}

/* Layout Utilities for Perfect Centering */
header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 20;
    animation: fadeIn 1s ease-out;
}

footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    text-align: center;
    color: var(--color-text-secondary);
    /* Explicitly set gray color */
    opacity: 0.6;
    /* Higher base opacity instead of 0.4 */
    z-index: 20;
    /* Removed animation to prevent flash */
}

main {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
}

/* Typography & Components */
.brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    font-style: italic;
    border-bottom: 2px solid var(--color-accent);
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    animation: slideUp 0.8s ease-out 0.2s backwards;
}

@media (min-width: 768px) {
    h1 {
        font-size: 4.5rem;
    }
}

p.subtitle {
    font-size: 1.125rem;
    color: #ccc;
    max-width: 42rem;
    margin-bottom: 3rem;
    font-weight: 300;
    animation: slideUp 0.8s ease-out 0.4s backwards;
}

@media (min-width: 768px) {
    p.subtitle {
        font-size: 1.5rem;
    }
}

/* Form Styles */
.email-container {
    width: 100%;
    max-width: 28rem;
    animation: slideUp 0.8s ease-out 0.6s backwards;
    position: relative;
    min-height: 160px;
    /* Prevent layout jump */
}

/* Success State Handling */
.success-message {
    display: none;
    text-align: center;
    animation: fadeIn 0.6s ease-out;
}

.success-message h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--color-accent);
}

.email-container.success form {
    display: none;
}

.email-container.success .success-message {
    display: block;
}

.input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

input[type="email"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 1.125rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

input[type="email"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-accent);
    box-shadow:
        0 0 0 1px var(--color-accent-glow),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Validation Styling */
input[type="email"]:not(:placeholder-shown):invalid {
    border-color: rgba(255, 100, 100, 0.8);
    box-shadow:
        0 0 15px rgba(255, 50, 50, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="email"]:not(:placeholder-shown):valid {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow:
        0 0 15px rgba(255, 255, 255, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.error-msg {
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.2s ease;
    color: #ffcccc;
    font-size: 0.875rem;
    position: absolute;
    top: -24px;
    left: 0.5rem;
    text-align: left;
    pointer-events: none;
}

input[type="email"]:not(:placeholder-shown):invalid+.error-msg {
    opacity: 1;
    transform: translateY(0);
}

.btn {
    width: 100%;
    background: var(--color-accent);
    color: black;
    border: none;
    padding: 1rem 2rem;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 1.125rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

.btn:hover {
    background: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.disclaimer {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
    opacity: 0.6;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}