/* ============================================
   MOBILE CONSOLIDATED FIX
   Version 1.0.7
   Covers: menu overlay, body scroll lock, desktop CTAs,
   mobile click fix, button effects, footer links,
   front page mobile layout
   ============================================ */

/* ============================================
   MOBILE MENU OVERLAY
   ============================================ */

/* Overlay is invisible and non-blocking when closed */
.mobile-menu-overlay {
    pointer-events: none;
}

/* Overlay is interactive when open */
.mobile-menu-overlay.active {
    pointer-events: auto;
}

/* All menu interactive elements */
.mobile-menu-close,
.mobile-menu-link,
.social-icon,
.ft-header__mobile-toggle {
    pointer-events: auto;
    touch-action: manipulation;
    cursor: pointer;
}

/* SVGs inside buttons should not intercept clicks */
.mobile-menu-close svg,
.social-icon svg,
.ft-header__mobile-toggle span {
    pointer-events: none;
}

/* Body scroll lock — no position:fixed (breaks iOS scroll position) */
body.mobile-menu-open {
    overflow: hidden;
}

/* ============================================
   DESKTOP CTA BUTTONS
   ============================================ */

@media (min-width: 769px) {
    .ft-header__cta-section {
        display: flex;
        pointer-events: auto;
        gap: 8px;
        align-items: center;
    }

    .ft-header__cta-section a,
    .ft-header__cta-section button {
        pointer-events: auto;
        cursor: pointer;
    }

    /* Watch Demo — outlined blue with ripple */
    .ft-header__cta-section .theme_Btn:not(.theme_Btn--primary):not(.theme_Btn--secondary) {
        background-color: transparent;
        border: 2px solid #3b82f6;
        color: #3b82f6;
        overflow: hidden;
        position: relative;
    }
    .ft-header__cta-section .theme_Btn:not(.theme_Btn--primary):not(.theme_Btn--secondary)::before {
        background: #9ccafd;
    }
    .ft-header__cta-section .theme_Btn:not(.theme_Btn--primary):not(.theme_Btn--secondary):hover {
        color: #1E3A8A;
    }

    /* Join Waitlist — outlined green with ripple */
    .ft-header__cta-section .theme_Btn--primary {
        background-color: transparent;
        border: 2px solid #10b981;
        color: #10b981;
        overflow: hidden;
        position: relative;
    }
    .ft-header__cta-section .theme_Btn--primary::before {
        background: #a6e58a;
    }
    .ft-header__cta-section .theme_Btn--primary:hover {
        color: #1A5A2E;
    }

    /* Log In — solid blue with ripple */
    .ft-header__cta-section .theme_Btn--secondary {
        background-color: #3b82f6;
        border: 2px solid #3b82f6;
        color: #ffffff;
        overflow: hidden;
        position: relative;
    }
    .ft-header__cta-section .theme_Btn--secondary::before {
        background: #9ccafd;
    }
    .ft-header__cta-section .theme_Btn--secondary:hover {
        color: #1E3A8A;
    }
}

/* ============================================
   MOBILE — UNIVERSAL CLICK FIX
   ============================================ */

@media (max-width: 768px) {
    /* Hide desktop CTA buttons */
    .ft-header__cta-section {
        display: none;
    }

    /* Show hamburger */
    .ft-header__mobile-toggle {
        display: flex;
        pointer-events: auto;
    }

    /* Ensure all interactive elements are tappable */
    a, button, input, select, textarea, label,
    [role="button"], [onclick] {
        pointer-events: auto;
        touch-action: manipulation;
        cursor: pointer;
    }

    /* Body and html should never block touches */
    html, body {
        pointer-events: auto;
        touch-action: auto;
    }

    /* Decorative elements should not intercept taps */
    svg:not(.clickable),
    .cloud-background,
    .background-decoration {
        pointer-events: none;
    }

    /* Menu overlay — non-blocking when closed */
    .mobile-menu-overlay {
        pointer-events: none;
    }

    .mobile-menu-overlay.active {
        pointer-events: auto;
    }

    .mobile-menu-overlay.active * {
        pointer-events: auto;
        touch-action: manipulation;
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    body.mobile-menu-open .mobile-menu-overlay.active,
    body.mobile-menu-open .mobile-menu-overlay.active * {
        pointer-events: auto;
        touch-action: manipulation;
    }

    /* ----------------------------------------
       REMOVE button hover/ripple effects on mobile.
       The ::before ripple, color shifts, and
       transform effects don't suit touch UX.
    ---------------------------------------- */
    .theme_Btn::before,
    .sunrise-btn::before {
        display: none;
    }

    .theme_Btn:hover,
    .theme_Btn:active,
    .sunrise-btn:hover,
    .sunrise-btn:active {
        color: inherit;
        transform: none;
    }

    .blue_Btn:hover > span,
    .white_Btn:hover > span,
    .green_Btn:hover > span,
    .theme_Btn:hover > span,
    .theme_Btn:active > span {
        color: inherit;
    }

    /* ----------------------------------------
       FOOTER LINKS — explicit click enablement
    ---------------------------------------- */
    .footer-column a,
    .footer-links a,
    .footer-social a,
    .footer-logo a,
    #colophon a {
        pointer-events: auto;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
    }
}

/* ============================================
   FRONT PAGE MOBILE LAYOUT
   Hero, video, work-your-way, z-index hierarchy
   ============================================ */

@media (max-width: 1024px) {
    /* Sticky header */
    .ft-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: white;
    }

    /* Hero clears sticky header */
    .header-hero-section {
        padding-top: 100px;
        margin-top: 0;
        min-height: auto;
    }

    /* Stack hero content above video */
    .header-hero-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .header-hero-content {
        order: 1;
    }

    .header-hero-visual {
        order: 2;
        width: 100%;
        margin-top: 20px;
    }

    .video-showcase {
        width: 100%;
        max-width: 100%;
    }

    .hero-video {
        max-width: 100%;
        height: auto;
        display: block;
        position: relative;
        z-index: 1;
    }

    /* Work your way cards stack vertically */
    .work-your-way-cards {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* Z-index hierarchy */
    .mobile-menu-overlay {
        z-index: 9999;
    }

    .ft-header {
        z-index: 1000;
    }

    .hero-new-section,
    .see-things-your-way-section,
    .pain-solutions-fixed,
    .lawft-platform-section {
        position: relative;
        z-index: 1;
        display: block;
        overflow-x: hidden;
    }

    .cloud-layer {
        z-index: 0;
    }

    /* Prevent horizontal scroll */
    html,
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }
}

@media (max-width: 768px) {
    .header-hero-section {
        padding-top: 80px;
    }
}
