/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark Mode (Default) */
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent: #ff0000;
    --border: #333333;
    --card-bg: #111111;
}

body.light-mode {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #000000;
    --text-secondary: #333333;
    --accent: #ff0000;
    --border: #e0e0e0;
    --card-bg: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

/* Landing Page */
.landing {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
    overflow: hidden;
}

body.light-mode .landing {
    background-color: #ffffff;
}

/* Grid Background */
.landing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 100px 100px;
    opacity: 0.5;
    z-index: 0;
}

body.light-mode .landing::before {
    opacity: 0.4;
}

/* Interactive Grid Overlay */
.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-wrap: wrap;
}

.grid-square {
    width: 100px;
    height: 100px;
    pointer-events: auto;
    transition: background-color 0.1s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.grid-square:hover {
    background-color: #ff0000;
}

.grid-square.fading {
    background-color: #ff0000;
    animation: fade-out 1s ease-out forwards;
    pointer-events: none;
}

@keyframes fade-out {
    0% {
        background-color: #ff0000;
        opacity: 1;
    }
    100% {
        background-color: transparent;
        opacity: 0;
    }
}

.landing-content {
    position: relative;
    z-index: 20;
    text-align: center;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    pointer-events: none;
}

.brand-name {
    font-size: 7rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    text-transform: uppercase;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-stretch: condensed;
    letter-spacing: 0.05em;
    pointer-events: none;
}

.brand-subtitle {
    font-size: 0.3em;
    font-weight: 400;
    text-transform: lowercase;
    margin-left: 0.5em;
    vertical-align: middle;
}

.red-letter {
    color: #ff0000;
    transition: color 0.2s ease;
}

.red-letter.inverted {
    color: var(--bg-primary);
}

body.light-mode .red-letter.inverted {
    color: var(--bg-primary);
}

.slogan {
    font-size: 0.85rem;
    font-weight: 400;
    margin: 0 auto 4.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 900px;
    text-align: center;
    pointer-events: none;
}

.cta-buttons {
    display: flex;
    gap: 0;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    pointer-events: auto;
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3);
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 2.5rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    text-align: center;
}

/* Form Styles */
.waitlist-form {
    margin-top: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group {
    margin-top: 2rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
    cursor: pointer;
}

.btn-submit {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1.25rem;
    font-size: 1.1rem;
}

.form-success {
    text-align: center;
    padding: 3rem 2rem;
}

.form-success svg {
    color: #00ff00;
    margin-bottom: 1.5rem;
}

.form-success h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.form-success p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 2px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle .icon-sun {
    opacity: 0;
    transform: rotate(90deg);
}

.theme-toggle .icon-moon {
    opacity: 1;
    transform: rotate(0deg);
}

body.light-mode .theme-toggle .icon-sun {
    opacity: 1;
    transform: rotate(0deg);
}

body.light-mode .theme-toggle .icon-moon {
    opacity: 0;
    transform: rotate(-90deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .brand-name {
        font-size: 5rem;
        line-height: 0.9;
        margin-bottom: 2rem;
        position: relative;
    }

    .brand-subtitle {
        display: none;
    }

    .red-letter {
        color: var(--bg-primary);
        position: relative;
    }

    .red-letter::before {
        content: '';
        position: absolute;
        width: 0.85em;
        height: 0.85em;
        background-color: #ff0000;
        left: -0.15em;
        top: 0.05em;
        z-index: -1;
    }

    .slogan {
        font-size: 0.9rem;
        text-align: center;
        max-width: 85%;
        margin-left: auto;
        margin-right: auto;
    }

    .btn {
        width: auto;
        max-width: 200px;
        padding: 1rem 2rem;
    }

    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
}
