/* ArkifiCommerce — public landing pages: phones & small tablets */

/* iOS: avoid automatic zoom on focus when inputs are smaller than 16px */
@media (max-width: 575.98px) {
    input.form-control,
    select.form-select,
    textarea.form-control {
        font-size: 16px;
    }
}

/* Notched devices: respect safe area */
@supports (padding: max(0px)) {
    .lp-nav-shell {
        padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
        padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
    }

    main.lp-main {
        padding-left: max(0px, env(safe-area-inset-left, 0px));
        padding-right: max(0px, env(safe-area-inset-right, 0px));
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    }
}

main.lp-main img,
main.lp-main video {
    max-width: 100%;
    height: auto;
}

/* Home: hero primary actions — full-width stack,48px touch height */
@media (max-width: 767.98px) {
    .lp-hero-ctas {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.65rem !important;
    }

    .lp-hero-ctas .hero-cta-btn {
        width: 100%;
        max-width: none;
        min-height: 48px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
}

/* Trust strip: wrap instead of tiny horizontal scroll when possible */
@media (max-width: 575.98px) {
    .lp-trust-inner {
        flex-wrap: wrap;
        justify-content: center;
        overflow-x: visible;
        gap: 0.45rem 0.65rem;
        -webkit-overflow-scrolling: auto;
        padding-left: 0;
        padding-right: 0;
    }

    .lp-trust-item {
        white-space: normal;
        font-size: 0.78rem;
        line-height: 1.35;
        max-width: 100%;
    }
}

/* Product screenshot scroller: larger tap targets */
@media (max-width: 991.98px) {
    .lp-slide-dot {
        width: 10px;
        height: 10px;
        padding: 16px;
        box-sizing: content-box;
        background-clip: content-box;
        border-radius: 50%;
    }

    .lp-slide-dot.active {
        background-color: var(--arkifi-purple);
        background-clip: content-box;
    }

    .lp-slide-arrow {
        min-width: 44px;
        min-height: 44px;
    }
}

@media (max-width: 575.98px) {
    .lp-slide-scroller {
        height: min(52vh, 440px) !important;
        border-radius: 16px;
    }

    .lp-slide-pane img {
        max-height: min(46vh, 400px) !important;
    }

    .lp-slide-hint {
        font-size: 0.8125rem;
        line-height: 1.45;
    }

    .lp-slide-hint .fa-computer-mouse {
        display: none;
    }
}

/* Integrations logo row: tighter on narrow screens */
@media (max-width: 575.98px) {
    .lp-integ-grid {
        gap: 0.85rem 1rem;
        justify-content: center;
    }

    .lp-integ-icon img {
        max-height: 48px !important;
        max-width: 120px !important;
    }
}

/* Feature / Pricing heroes: primary buttons */
@media (max-width: 575.98px) {
    .fe-hero .mt-4.d-flex.flex-wrap .btn,
    .pr-hero .d-flex.flex-wrap.gap-2 .btn {
        width: 100%;
        min-height: 48px;
        justify-content: center;
    }

    .ca-hero .d-flex.flex-wrap.gap-2 .btn {
        width: 100%;
        min-height: 48px;
        justify-content: center;
    }
}

/* Store demo: hero + section rhythm */
@media (max-width: 767.98px) {
    .sd-hero {
        padding: clamp(1.5rem, 4vw, 2.5rem) 0 1.35rem;
    }

    .sd-hero h1.display-5 {
        font-size: clamp(1.4rem, 5vw + 0.45rem, 1.85rem) !important;
        line-height: 1.2;
    }

    .sd-hero .lead {
        font-size: clamp(0.95rem, 2.5vw + 0.55rem, 1.05rem) !important;
        line-height: 1.55;
    }

    .sd-section {
        padding: 2rem 0 2.5rem;
    }

    .sd-video-wrap {
        border-radius: 12px;
    }
}

/* Footer: clear home indicator / gesture bar on notched phones */
@supports (padding: max(0px)) {
    @media (max-width: 767.98px) {
        .footer.mt-auto {
            padding-bottom: max(2rem, calc(env(safe-area-inset-bottom, 0px) + 0.35rem));
        }
    }
}

/* Login & register: safe area + readable stacking (same _Layout as marketing) */
@media (max-width: 767.98px) {
    .login-hero,
    .register-hero {
        min-height: 100vh;
        min-height: 100dvh;
        padding-top: max(1rem, env(safe-area-inset-top, 0px));
        padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    }

    .login-hero .hero-content .d-flex.gap-4,
    .register-hero .hero-content .d-flex.gap-4 {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.65rem !important;
    }

    .registration-form-container {
        padding-left: max(0.25rem, env(safe-area-inset-left, 0px));
        padding-right: max(0.25rem, env(safe-area-inset-right, 0px));
    }
}

@media (max-width: 991.98px) {
    .login-hero .row,
    .register-hero .row {
        row-gap: 1.5rem;
    }
}

/* In-page anchors (e.g. #features, #faq): smooth scroll when motion is allowed */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}
