:root {
    --font: 'Space Grotesk', system-ui, sans-serif;
}

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

html, body {
    height: 100%;
    overflow: hidden;
    touch-action: manipulation;
}

body {
    font-family: var(--font);
    background: #000;
    color: #fff;
    -webkit-font-smoothing: antialiased;
}

#grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.layout {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 3rem;
}

/* ===== HEADER ===== */
header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #fff;
}

/* ===== MAIN ===== */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.logo {
    font-size: clamp(5rem, 20vw, 14rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 0.9;
    text-align: center;
    background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 500;
    margin-top: 1rem;
    color: #fff;
}

.word {
    color: #fff;
    font-weight: 700;
    font-style: italic;
}

.cursor {
    animation: blink 1s step-end infinite;
    color: #fff;
    font-weight: 700;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ===== FOOTER ===== */
footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.links {
    display: flex;
    gap: 2rem;
    position: relative;
}

.links a {
    color: #fff;
    text-decoration: none;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: opacity 0.2s ease;
}

.links a:hover {
    opacity: 0.6;
}

.email-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: opacity 0.2s ease;
}

.email-link:hover {
    opacity: 0.6;
}

/* ===== POPUP ===== */
.popup {
    position: fixed;
    bottom: 5rem;
    left: 3rem;
    width: 400px;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.popup-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.4);
}

.popup-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0;
    font-size: 1.25rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.popup-close:hover {
    color: rgba(255, 255, 255, 0.8);
}

.popup-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    min-height: 100px;
}

.popup-text::after {
    content: '|';
    animation: blink 0.7s step-end infinite;
    color: rgba(255, 255, 255, 0.5);
}

.popup-text.done::after {
    display: none;
}

.popup-cta {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
}

.popup-cta.active {
    display: block;
}

/* ===== CTA BUTTONS ===== */
.cta-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    padding: 0.75rem 1.25rem;
    border: 1px solid #fff;
    border-radius: 2px;
    transition: all 0.25s ease;
    display: inline-block;
}

.btn:hover {
    background: #fff;
    color: #000;
}

.btn-icon {
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-sm {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .layout {
        padding: 1.5rem;
    }

    header {
        font-size: 0.65rem;
        letter-spacing: 0.1em;
    }

    .logo {
        font-size: clamp(3rem, 15vw, 5rem);
    }

    .tagline {
        font-size: 1.1rem;
        margin-top: 0.75rem;
        text-align: center;
    }

    footer {
        flex-direction: column-reverse;
        align-items: center;
        gap: 1.5rem;
    }

    .links {
        gap: 1.25rem;
        justify-content: center;
    }

    .links a {
        font-size: 0.65rem;
    }

    .cta-buttons {
        width: 100%;
        justify-content: center;
    }

    .btn {
        font-size: 0.8rem;
        padding: 0.7rem 1rem;
    }

    /* Mobile popup - centered modal */
    .popup {
        bottom: auto;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) scale(0.95);
        width: calc(100% - 2rem);
        max-width: 420px;
        padding: 1.5rem;
    }

    .popup.active {
        transform: translate(-50%, -50%) scale(1);
    }

    .popup-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .layout {
        padding: 1.25rem;
    }

    header {
        font-size: 0.55rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .logo {
        font-size: clamp(2.5rem, 14vw, 4rem);
    }

    .tagline {
        font-size: 1rem;
    }

    .links {
        gap: 1rem;
    }

    .links a {
        font-size: 0.6rem;
    }

    .btn {
        font-size: 0.75rem;
        padding: 0.6rem 0.9rem;
    }

    .btn-icon {
        padding: 0.6rem;
    }

    .btn-icon svg {
        width: 16px;
        height: 16px;
    }
}
