:root {
    --bg-color: #ffd6e6;
    /* Distinct pastel pink */
    --text-main: #2c1a21;
    --text-muted: #8a6b76;
    --accent: #ff2a70;
    /* Vibrant pink */
    --phone-bg: #ffffff;
    --phone-border: #f0e6ea;
    --card-bg: #f9f2f5;
    --glass-shadow: 0 40px 80px rgba(255, 42, 112, 0.15);
    /* Stronger pink native shadow */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    /* Native iOS rounded font prioritizing Apple platforms */
    font-family: ui-rounded, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html,
body {
    overflow-x: hidden;
    /* Critical for stopping mobile side-scroll */
    width: 100%;
    /* Better than 100vw to avoid scrollbar calc issues */
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    /* Base for absolute footer */
}

footer {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 100;
}

.container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    padding: 100px 20px 40px;
    /* Increased top padding to push content down */
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

/* Left Side: Content */
.content-side {
    flex: 1;
    max-width: 500px;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.brand-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
}

.logo {
    font-size: 5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--text-main);
}

.description {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 35px;
    font-weight: 400;
}

.hook-heading {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

/* Custom Signup Form Container */
.signup-container {
    width: 100%;
    max-width: 500px;
    margin-top: 20px;
}

/* Right Side: iPhone Mockup */
.device-side {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.iphone-mockup {
    width: 320px;
    height: 650px;
    background-color: var(--phone-bg);
    border-radius: 50px;
    border: 12px solid #ffffff;
    box-shadow:
        inset 0 0 0 2px #f0e6ea,
        0 0 0 8px #f4f4f5,
        var(--glass-shadow);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Dynamic Island */
.dynamic-island {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 30px;
    background-color: #000;
    border-radius: 20px;
    z-index: 20;
}

/* Notch Camera removal as requested */
.notch-camera {
    display: none;
}

/* App UI Inside Phone (Messaging Style) */
.app-ui {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: #ffffff;
    padding: 80px 20px 20px;
    position: relative;
    gap: 24px;
}

.message-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    animation: fadeIn 0.4s ease forwards;
}

.message-group.partner {
    align-items: flex-end;
}

.message-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
    padding: 0 4px;
}

.message-bubble {
    padding: 16px 20px;
    border-radius: 20px;
    max-width: 90%;
    font-size: 1.05rem;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.app-question {
    background: var(--card-bg);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
    font-weight: 600;
}

.partner-answer {
    background: var(--accent);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    font-weight: 500;
}

/* User Typing Area */
.user-input-area {
    margin-top: auto;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--phone-border);
    border-radius: 99px;
    padding: 6px 6px 6px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.typing-indicator {
    flex: 1;
    color: #aeaeb2;
    font-size: 0.95rem;
}

.send-button {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.send-button svg {
    width: 18px;
    height: 18px;
    margin-right: 2px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Page Load Animation Classes */
@keyframes flyUpFade {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    opacity: 0;
    /* Start hidden */
    animation: flyUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

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

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

/* Responsive */
@media (max-width: 900px) {
    body {
        flex-direction: column;
        align-items: center;
        /* Horizontally center */
        justify-content: flex-start;
        /* Keep to top */
        padding-top: 40px;
        position: relative;
    }

    .container {
        flex-direction: column;
        text-align: center;
        gap: 24px;
        /* Reduced gap from 40px */
        padding: 30px 20px 80px;
        /* Tighter overall padding */
        align-items: center;
        /* Force center all children */
    }

    /* Break out of wrapper to allow custom sorting */
    .content-side {
        display: contents;
    }

    /* 1. Logo at the top */
    .brand-header {
        justify-content: center;
        width: 100%;
        order: 1;
        margin-bottom: -10px;
        /* Pull mockup up slightly */
    }

    /* 2. Phone Mockup in the middle */
    .device-side {
        margin-top: 0;
        width: 100%;
        order: 2;
        display: flex;
        justify-content: center;
    }

    .iphone-mockup {
        transform: scale(0.85);
        transform-origin: top center;
        margin: 0;
        /* Reduce actual space taken up by scaled element */
        margin-bottom: -80px;
        /* Tighter negative margin */
    }

    /* 3. Subscribe Form below the phone */
    .signup-container {
        margin: 0 auto;
        width: 100%;
        max-width: 450px;
        min-height: 240px;
        /* Give iframe more vertical breathing room to stack internally */
        order: 3;
        display: block;
        position: relative;
        z-index: 20;
    }

    /* 4. Text copy at the bottom */
    .hook-heading {
        order: 4;
        margin-top: 10px;
        /* Reduced top margin */
        margin-bottom: 8px;
        /* Tighter bottom margin */
    }

    .description {
        order: 5;
        margin-bottom: 0px;
        font-size: 1.1rem;
        /* Slightly smaller text for tighter fit */
    }





    /* 5. Footer perfectly centered */
    footer {
        position: static;
        text-align: center;
        padding: 40px 20px 20px;
        /* Extra top padding from text */
        margin-top: auto;
        width: 100%;
        order: 6;
    }

    footer p {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        /* Stack copyright and privacy link on top of each other and center */
    }

    /* Fix privacy policy link margin on mobile */
    footer a {
        margin-left: 0 !important;
        /* Remove the left shift so it centers perfectly */
        display: block;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 3.5rem;
    }

    .brand-logo {
        width: 50px;
        height: 50px;
    }

    .hook-heading {
        font-size: 1.35rem;
    }

    .description {
        font-size: 1.15rem;
    }

    .signup-form {
        flex-direction: column;
        border-radius: 20px;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
    }

    .signup-form input {
        border-radius: 99px;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

    .signup-form button {
        margin-top: 10px;
        padding: 16px;
        border-radius: 99px;
        width: 100%;
    }

    .iphone-mockup {
        transform: scale(0.8);
    }
}