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

body {
    font-family: 'Neue Montreal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #FFFFF9;
    color: #000;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 1400px;
    height: 920px;
    position: relative;
    transform: scale(min(calc(100vw / 1400), calc(100vh / 920)));
    transform-origin: center center;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 32px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.logo {
    height: 24px;
    width: auto;
    display: block;
}

.cta-button {
    font-family: 'Neue Montreal', sans-serif;
    background-color: #000;
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -1px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    transform: scale(1.02);
    background-color: #404040;
}

/* Main Content */
.main-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 0;
}

/* Waitlist Container */
.waitlist-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

/* Logo Icon */
.logo-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Title */
.title {
    font-family: 'Editorial New', Georgia, serif;
    font-size: 70px;
    font-weight: 300;
    letter-spacing: -3.5px;
    line-height: 1.3;
    text-align: center;
    margin-bottom: 0;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    position: relative;
    height: 105px;
    padding: 0 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.title-text,
.title-thank-you {
    display: block;
    width: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    will-change: transform, opacity;
}

.title-text {
    transform: translateY(0);
    opacity: 1;
}

.title-thank-you {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-150%);
    opacity: 0;
}

.title.success .title-text {
    transform: translateY(-100%);
    opacity: 0;
}

.title.success .title-thank-you {
    transform: translateY(-50%);
    opacity: 1;
    transition-delay: 0.15s;
}

/* Description */
.description {
    font-family: 'Neue Montreal', sans-serif;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: -0.32px;
    line-height: 1.5;
    text-align: center;
    color: #737373;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.3s forwards;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.description.hide {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

/* Waitlist Form */
.waitlist-form {
    width: 410px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.4s forwards;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.waitlist-form.hide {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

.name-input,
.email-input {
    font-family: 'Neue Montreal', sans-serif;
    width: 100%;
    height: 56px;
    padding: 16px 22px;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0;
    border: 1px solid #EBEBDE;
    border-radius: 8px;
    background-color: #fff;
    color: #000;
    box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.name-input::placeholder,
.email-input::placeholder {
    color: #9D9D9D;
}

.name-input:focus,
.email-input:focus {
    outline: none;
    border-color: #404040;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.08);
}

.submit-button {
    font-family: 'Neue Montreal', sans-serif;
    width: 100%;
    height: 54px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -1px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.submit-button:hover {
    transform: scale(1.02);
    background-color: #404040;
}

.submit-button:active {
    transform: scale(0.98);
}

/* Referral Text */
.referral-text {
    font-family: 'Neue Montreal', sans-serif;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: -0.8px;
    text-align: center;
    margin-top: 18px;
    color: #000;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.5s forwards;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.referral-text.hide {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

/* Footer */
.footer {
    font-family: 'Neue Montreal', sans-serif;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 30px 38px;
    font-size: 16px;
    color: #b3b3a8;
    letter-spacing: -0.32px;
    z-index: 100;
}

.footer-left,
.footer-right {
    font-weight: 400;
}

.footer-right a {
    color: #b3b3a8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-right a:hover {
    color: #000;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideDownIn {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    100% {
        transform: translateY(-100%);
        opacity: 1;
    }
}

/* Referral Popup */
.referral-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.referral-popup.show {
    opacity: 1;
    visibility: visible;
}

.referral-popup-content {
    background-color: #FFFFF9;
    border-radius: 12px;
    padding: 40px;
    max-width: 480px;
    width: calc(100% - 40px);
    position: relative;
    box-shadow: 0px 20px 40px rgba(0, 0, 0, 0.15);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.referral-popup.show .referral-popup-content {
    transform: scale(1);
}

.referral-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 32px;
    color: #9D9D9D;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.referral-popup-close:hover {
    color: #000;
}

.referral-popup-title {
    font-family: 'Editorial New', Georgia, serif;
    font-size: 32px;
    font-weight: 300;
    letter-spacing: -1.6px;
    line-height: 1.2;
    margin-bottom: 0;
    color: #000;
}

.referral-popup-text {
    font-family: 'Neue Montreal', sans-serif;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: -0.32px;
    line-height: 1.5;
    color: #737373;
    margin-bottom: 24px;
}

.referral-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.referral-email-input {
    font-family: 'Neue Montreal', sans-serif;
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0;
    border: 1px solid #EBEBDE;
    border-radius: 6px;
    background-color: #fff;
    color: #000;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.referral-email-input::placeholder {
    color: #9D9D9D;
}

.referral-email-input:focus {
    outline: none;
    border-color: #404040;
    box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.06);
}

.referral-submit-button {
    font-family: 'Neue Montreal', sans-serif;
    width: 100%;
    height: 48px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: -0.8px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    margin-top: 4px;
}

.referral-submit-button:hover {
    transform: scale(1.02);
    background-color: #404040;
}

.referral-submit-button:active {
    transform: scale(0.98);
}

.referral-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    body {
        overflow: hidden;
        height: 100vh;
    }

    .container {
        display: flex;
        flex-direction: column;
        height: 100vh;
        max-height: 100vh;
        overflow: hidden;
    }

    /* Header - Same as home */
    .header {
        position: relative;
        padding: 32px 24px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        order: 1;
    }

    .logo {
        width: 140px;
        height: auto;
    }

    .cta-button {
        position: static;
        width: auto;
        height: auto;
        font-size: 18px;
        padding: 14px 24px;
        letter-spacing: -0.9px;
        white-space: nowrap;
    }

    /* Main Content - Centered vertically */
    .main-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0;
        flex: 1;
        overflow: hidden;
    }

    .waitlist-container {
        padding: 0 32px;
        width: 100%;
    }

    /* Logo Icon */
    .logo-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 16px;
    }

    /* Title */
    .title {
        font-size: 40px;
        letter-spacing: -2px;
        margin-bottom: 8px;
        text-align: center;
        height: auto;
        line-height: 1.1;
        padding: 0;
    }

    /* Description */
    .description {
        font-size: 16px;
        letter-spacing: -0.32px;
        line-height: 1.5;
        text-align: center;
        max-width: 360px;
        margin-bottom: 16px;
    }

    /* Form - Wider */
    .waitlist-form {
        width: 360px;
        max-width: 100%;
        gap: 10px;
    }

    .name-input,
    .email-input {
        height: 56px;
        font-size: 20px;
        padding: 16px 22px;
    }

    .submit-button {
        height: 54px;
        font-size: 20px;
        letter-spacing: -1px;
    }

    /* Footer - Hidden */
    .footer {
        display: none;
    }

    /* Referral Popup */
    .referral-popup-content {
        padding: 32px;
        max-width: calc(100% - 64px);
    }

    .referral-popup-title {
        font-size: 28px;
        letter-spacing: -1.4px;
    }

    .referral-popup-text {
        font-size: 14px;
    }

    .referral-email-input {
        font-size: 16px;
        height: 44px;
    }

    .referral-submit-button {
        font-size: 16px;
        height: 44px;
    }
}
