/* Mobile responsiveness overrides for the landing page and demo */

/* Tablet and below: neutralize decorative elements that crowd small screens */
@media (max-width: 900px) {
    /* Remove inline negative margin from the right explainer title */
    .demo-explain.right .explain-steps > div > div {
        margin-top: 0 !important;
    }
}

/* Common small-screen adjustments */
@media (max-width: 768px) {
    /* Prevent top bar overlap (it becomes taller when stacked) */
    body {
        padding-top: 96px;
        overflow-x: hidden;
    }

    /* Tighter horizontal padding to avoid overflow */
    .container {
        padding: 2rem 1.25rem;
    }

    /* Hero demo layout spacing */
    .hero-demo {
        gap: 1.25rem;
    }

    .demo-explain {
        max-width: 100%;
        text-align: center;
    }

    .demo-explain .explain-steps {
        font-size: 1.05rem;
        padding-left: 0;
    }

    .help-line {
        font-size: 1.05rem;
    }

    /* Phone mock: scale to viewport while preserving feel */
    .phone-frame {
        width: 92vw;
        max-width: 420px;
        height: 75vh;
        border-radius: 22px;
    }

    .phone-notch {
        width: 40%;
    }

    /* Features fall into a single column on small screens */
    .feature-grid {
        grid-template-columns: 1fr;
    }

    /* Waitlist form stacks for easier input */
    .waitlist-input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        border-radius: 16px;
        width: 100%;
    }

    /* Make input field card-like on mobile for clarity */
    .waitlist-input-group input[type="email"] {
        width: 100%;
        background: #111111;
        border: 1px solid #2a2a2a;
        border-radius: 14px;
        padding: 12px 16px;
        height: 48px;
        font-size: 1rem;
    }

    .waitlist .cta-button {
        width: 100%;
        text-align: center;
        min-height: 48px;
        padding: 0.85rem 1rem;
        border-radius: 14px;
    }
}

/* Phones */
@media (max-width: 480px) {
    .container {
        padding: 1.5rem 1rem;
    }

    .phone-frame {
        width: 94vw;
        height: 70vh;
        border-radius: 20px;
        padding: 10px;
    }

    .demo-timer,
    .demo-points {
        font-size: 0.95rem;
    }

    .add-habit-button {
        padding: 8px 12px;
    }

    .badge-img {
        height: 48px;
    }
}

/* Very narrow devices */
@media (max-width: 360px) {
    .container {
        padding: 1.25rem 0.75rem;
    }

    .phone-frame {
        width: 96vw;
    }
}

/* Top bar responsiveness */
.top-bar-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    gap: 1rem;
}

/* Slightly tighter layout on medium screens */
@media (max-width: 1024px) {
    .top-bar-content {
        padding: 0 1rem;
        justify-content: space-between;
    }
}

/* Stack items and make CTA full width on small screens */
@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .top-bar .cta-button {
        width: 100%;
        text-align: center;
    }
    .top-bar .logo {
        font-size: 1.25rem;
        text-align: center;
    }
}

/* Fine-tune for very small phones */
@media (max-width: 480px) {
    .top-bar .cta-button {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }
    .top-bar .logo {
        font-size: 1.15rem;
    }
}

/* Waitlist fine-tuning on very small phones */
@media (max-width: 480px) {
    .waitlist-input-group input[type="email"] {
        height: 50px;
        font-size: 1.05rem;
        padding: 12px 16px;
    }
    .waitlist .cta-button {
        min-height: 50px;
        font-size: 1.05rem;
    }
}
