/* Public landing + login — phone layout */
:root {
    --lp-leaf: #1e5128;
    --lp-ink: #12261a;
    --lp-muted: #5d7264;
    --lp-line: rgba(30, 81, 40, 0.12);
}

.lp-banner,
.lp-appbar,
.lp-hero,
.lp-modules,
.lp-tagline {
    display: none;
}


@media (max-width: 820px) {
    html, body.homepage, body.sm-login, body.lp-phone {
        background: #f3f7f4 !important;
        background-image: none !important;
        overflow-x: hidden;
        max-width: 100%;
    }
    body.homepage,
    body.sm-login,
    body.lp-phone {
        min-height: 100dvh;
    }

    body.homepage > header,
    body.homepage > header.ati-app-header,
    body.homepage > .no-print[style*="background-color: #ffffff"],
    body.sm-login > header,
    body.lp-phone > header,
    body.lp-phone > .no-print:not(.lp-banner):not(.lp-appbar) {
        display: none !important;
    }

    body.homepage > main > .hero,
    body.homepage > main > .modules-container,
    body.homepage > footer.site-footer {
        display: none !important;
    }

    .lp-banner {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 0.55rem;
        padding: calc(0.5rem + env(safe-area-inset-top, 0px)) 0.85rem 0.5rem;
        background: #fff;
        border-bottom: 1px solid #e3e8e4;
    }
    .lp-banner-left {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        min-width: 0;
    }
    .lp-banner img {
        height: 40px;
        width: auto;
        object-fit: contain;
    }
    .lp-banner-txt {
        display: flex;
        flex-direction: column;
        font-family: Arial, Helvetica, sans-serif;
        min-width: 0;
        line-height: 1.1;
    }
    .lp-banner-txt .l1 { font-size: 0.48rem; color: #212529; }
    .lp-banner-txt .l2 { font-size: clamp(0.62rem, 3.4vw, 0.78rem); font-weight: 900; color: #1e8b42; letter-spacing: -0.01em; }
    .lp-banner-txt .l3 { font-size: 0.48rem; color: #1e8b42; }
    .lp-banner-txt .l4 { font-size: 0.4rem; color: #212529; margin-top: 0.08rem; }

    .lp-appbar {
        position: sticky;
        top: 0;
        z-index: 900;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.65rem 0.9rem;
        background: var(--lp-leaf);
        color: #fff;
    }
    .lp-appbar > a:first-child {
        color: #fff;
        text-decoration: none;
        font-weight: 800;
        font-size: 1.15rem;
        letter-spacing: -0.01em;
    }
    .lp-login-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        background: rgba(255, 255, 255, 0.16);
        border: 1px solid rgba(255, 255, 255, 0.35);
        color: #fff !important;
        text-decoration: none;
        font-weight: 700;
        font-size: 0.88rem;
        padding: 0.4rem 0.85rem;
        border-radius: 999px;
        white-space: nowrap;
    }
    .lp-login-btn svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .lp-hero {
        display: block !important;
        position: relative;
        min-height: 210px;
        margin: 0;
        padding: 1.35rem 1rem 1.6rem;
        background-color: #1e5128;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        color: #fff;
    }
    .lp-hero h1 {
        margin: 0;
        font-size: clamp(1.2rem, 6vw, 1.55rem);
        line-height: 1.15;
        letter-spacing: -0.03em;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
        max-width: 16rem;
    }
    .lp-hero p {
        margin: 0.45rem 0 0;
        font-size: 0.82rem;
        line-height: 1.4;
        max-width: 18rem;
        color: rgba(255, 255, 255, 0.92);
        text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
    }
    .lp-hero-side {
        position: absolute;
        right: 0.85rem;
        bottom: 1.1rem;
        width: 6.2rem;
        text-align: right;
        font-size: 0.68rem;
        font-style: italic;
        line-height: 1.25;
        color: #d8f3df;
        text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
    }
    @media (max-width: 420px) {
        .lp-hero-side { display: none; }
        .lp-hero p { max-width: 100%; }
    }
    .lp-dots {
        display: flex;
        gap: 0.3rem;
        margin-top: 1.1rem;
    }
    .lp-dots i {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.45);
        display: block;
    }
    .lp-dots i.is-on { background: #4ade80; }

    .lp-modules {
        display: flex !important;
        flex-direction: column;
        gap: 0.7rem;
        padding: 0.85rem 0.85rem 0.4rem;
        margin-top: -1.1rem;
        position: relative;
        z-index: 2;
    }
    .lp-card {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 0.55rem 0.7rem;
        background: #fff;
        border: 1px solid var(--lp-line);
        border-radius: 1.05rem;
        padding: 0.9rem 0.85rem 0.85rem;
        box-shadow: 0 10px 24px rgba(18, 38, 26, 0.06);
        text-decoration: none;
        color: inherit;
    }
    .lp-card-ico {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        grid-row: span 3;
        align-self: start;
    }
    .lp-card-ico svg {
        width: 24px;
        height: 24px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .lp-card--hris .lp-card-ico { background: #f3e8ff; color: #7c3aed; }
    .lp-card--acc .lp-card-ico { background: #fef3c7; color: #ca8a04; }
    .lp-card--sup .lp-card-ico { background: #ffedd5; color: #ea580c; }
    .lp-card h2 {
        margin: 0;
        font-size: 1.05rem;
        color: var(--lp-ink);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.4rem;
    }
    .lp-card h2 span { color: #9aab9f; font-weight: 700; }
    .lp-card p {
        margin: 0;
        font-size: 0.78rem;
        color: var(--lp-muted);
        line-height: 1.4;
        grid-column: 2;
    }
    .lp-card ul {
        list-style: none;
        margin: 0.15rem 0 0;
        padding: 0;
        grid-column: 2;
        font-size: 0.74rem;
        color: var(--lp-ink);
    }
    .lp-card li {
        position: relative;
        padding-left: 1.1rem;
        margin: 0.18rem 0;
    }
    .lp-card li::before {
        content: "✓";
        position: absolute;
        left: 0;
        color: #16a34a;
        font-weight: 800;
    }
    .lp-open {
        grid-column: 2;
        justify-self: end;
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
        margin-top: 0.35rem;
        background: var(--lp-leaf);
        color: #fff !important;
        text-decoration: none;
        font-size: 0.78rem;
        font-weight: 700;
        padding: 0.42rem 0.75rem;
        border-radius: 999px;
    }

    .lp-tagline {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        margin: 0.55rem 0.85rem 1.1rem;
        padding: 0.85rem 0.95rem;
        border-radius: 0.95rem;
        background: linear-gradient(135deg, #e7f6ec, #f4faf6);
        border: 1px solid var(--lp-line);
        color: var(--lp-leaf);
    }
    .lp-tagline b {
        font-style: italic;
        font-size: 0.88rem;
        font-weight: 700;
    }
    .lp-tagline small {
        display: block;
        max-width: 7.5rem;
        text-align: right;
        font-size: 0.62rem;
        line-height: 1.3;
        color: var(--lp-muted);
    }

    body.sm-login .sm-login-hero { display: none !important; }
    body.lp-phone .sm-login-wrap,
    body.sm-login .sm-login-wrap,
    body.lp-phone > main {
        padding: 0 0 1.25rem !important;
        margin: 0;
    }
    html.lp-show-form .lp-signin,
    body.lp-show-form .lp-signin {
        display: flex;
    }
    html.lp-show-form .lp-login-btn,
    body.lp-show-form .lp-login-btn {
        display: none !important;
    }
    .lp-signin-card {
        padding: 1.6rem 1.15rem 1.15rem;
        max-width: 22rem;
    }
}

/* Scale gutters, type, and cards with phone width (320–820px) */
@media (max-width: 820px) {
    html, body.homepage, body.lp-phone, body.sm-login {
        --lp-gutter: clamp(0.55rem, 4.2vw, 1.05rem);
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    .lp-banner,
    .lp-appbar {
        width: 100%;
        padding-left: var(--lp-gutter) !important;
        padding-right: var(--lp-gutter) !important;
    }
    .lp-banner img { height: clamp(26px, 9vw, 40px); }
    .lp-hero {
        width: 100%;
        min-height: clamp(150px, 48vw, 230px);
        padding: clamp(1rem, 4.5vw, 1.5rem) var(--lp-gutter) clamp(1.15rem, 5vw, 1.7rem) !important;
    }
    .lp-hero h1,
    .lp-hero p {
        max-width: 100% !important;
    }
    .lp-modules {
        width: 100%;
        padding-left: var(--lp-gutter) !important;
        padding-right: var(--lp-gutter) !important;
    }
    .lp-card { min-width: 0; }
    .lp-card p,
    .lp-card ul,
    .lp-card h2 {
        min-width: 0;
        overflow-wrap: anywhere;
    }
    .lp-tagline {
        margin-left: var(--lp-gutter) !important;
        margin-right: var(--lp-gutter) !important;
    }
}

@media (max-width: 400px) {
    .lp-banner-txt .l4 { display: none; }
    .lp-hero-side { display: none !important; }
    .lp-tagline {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
    .lp-tagline small {
        max-width: none;
        text-align: left;
    }
    .lp-appbar > a:first-child { font-size: 1rem; }
    .lp-login-btn {
        padding: 0.35rem 0.65rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .lp-banner-txt .l1 { display: none; }
    .lp-banner img { height: 26px; }
}
