﻿/* mCart landing — desktop layout + bold mobile stage */

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    background: var(--stock-bg);
    color: var(--stock-text);
    overflow-x: hidden;
}

body.landing-page {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body.landing-page img {
    -webkit-user-drag: none;
    user-drag: none;
}

body.landing-page a,
body.landing-page button {
    -webkit-user-select: none;
    user-select: none;
}

a { text-decoration: none !important; }

.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--stock-bg);
}

.loader-ring {
    width: 48px;
    height: 48px;
    border: 3px solid var(--stock-border);
    border-top-color: var(--stock-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

.loader-text {
    font-size: 0.85rem;
    color: var(--stock-muted);
    text-align: center;
}

@keyframes spin { to { transform: rotate(360deg); } }

.page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 70% 50% at 10% 0%, rgba(13, 122, 92, 0.07), transparent),
        linear-gradient(180deg, #fff 0%, var(--stock-bg) 100%);
}

.page-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 30%, black, transparent);
}

.landing {
    position: relative;
    z-index: 1;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.m-stage { display: none; }

.landing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    min-height: 96px;
    background: var(--stock-surface);
    border-bottom: 1px solid var(--stock-border);
}

.brand-logo-icon {
    height: 80px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
}

.header-pill {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--stock-muted);
    padding: 0.45rem 1rem;
    border: 1px solid var(--stock-border);
    border-radius: 999px;
    background: var(--stock-bg);
}

.landing-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 400px;
    grid-template-areas:
        "hero login"
        "features login";
    gap: 2rem 3rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 2rem 3rem;
}

.hero-content { grid-area: hero; }
.features-section { grid-area: features; }
.login-panel { grid-area: login; align-self: center; }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--stock-accent);
    margin-bottom: 1rem;
}

.hero-eyebrow::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--stock-accent);
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.4rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 1rem;
}

.hero-title span { color: var(--stock-accent); }

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--stock-muted);
    line-height: 1.65;
    max-width: 520px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.feature-card {
    padding: 1.25rem;
    background: var(--stock-surface);
    border: 1px solid var(--stock-border);
    border-radius: 16px;
}

.feature-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: var(--stock-accent-soft);
    color: var(--stock-accent);
    border-radius: 12px;
    margin-bottom: 0.85rem;
}

.feature-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    margin: 0 0 0.35rem;
}

.feature-card p {
    font-size: 0.82rem;
    color: var(--stock-muted);
    margin: 0;
}

.login-panel {
    background: var(--stock-surface);
    border: 1px solid var(--stock-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--stock-shadow-lg);
}

.login-panel-header { text-align: center; margin-bottom: 1.75rem; }

.login-panel-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
}

.login-panel-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-panel h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    margin: 0 0 0.4rem;
}

.login-panel-desc {
    font-size: 0.9rem;
    color: var(--stock-muted);
    margin: 0;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--stock-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--stock-border);
}

.btn-mcka-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.95rem 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #0d7a5c, #0a6b50);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(13, 122, 92, 0.35);
}

.btn-mcka-login:hover { color: #fff; }

.landing-install-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.72rem 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--stock-accent);
    background: var(--stock-accent-soft);
    border: 1px solid rgba(13, 122, 92, 0.28);
    border-radius: 12px;
    cursor: pointer;
}

.landing-install-btn img {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    object-fit: cover;
    background: #fff;
}

.landing-install-btn[hidden],
.landing-install-hint[hidden],
    .m-install[hidden],
    .m-install-hint[hidden],
    .m-install-mini[hidden],
    [data-pwa-landing][hidden] {
        display: none !important;
    }

.landing-install-hint,
.m-install-hint {
    margin: 0.4rem 0 0;
    text-align: center;
    font-size: 0.72rem;
    color: var(--stock-muted);
}

.login-note {
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    background: var(--stock-accent-soft);
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--stock-muted);
    text-align: center;
}

.login-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--stock-border);
}

.stat-item { text-align: center; }
.stat-value { font-size: 1.1rem; color: var(--stock-primary); font-weight: 700; }
.stat-label {
    font-size: 0.68rem;
    color: var(--stock-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.landing-footer {
    padding: 1.25rem 2rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--stock-muted);
    background: var(--stock-surface);
    border-top: 1px solid var(--stock-border);
}

.landing-footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1rem;
    margin-bottom: 0.35rem;
}

.landing-footer-link {
    color: var(--theme-accent);
    font-weight: 600;
}

/* ========== MOBILE: photo hero stage ========== */
@media (max-width: 991px) {
    .page-bg,
    .landing-header--desktop,
    .landing-hero--desktop,
    .login-panel--desktop,
    .landing-only-desktop,
    .landing-footer--desktop {
        display: none !important;
    }

    body.landing-page {
        background: #050505;
        overflow: hidden;
        height: 100dvh;
        height: 100svh;
        max-height: 100dvh;
        max-height: 100svh;
        padding: 0;
        box-sizing: border-box;
    }

    .landing {
        height: 100%;
        max-height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .landing-main {
        display: block;
        max-width: none;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
    }

    .m-stage {
        display: flex;
        flex-direction: column;
        position: relative;
        height: 100%;
        min-height: 0;
        overflow: hidden;
        color: #fff;
        padding:
            calc(1rem + env(safe-area-inset-top, 0px))
            1.35rem
            calc(2.75rem + env(safe-area-inset-bottom, 0px));
        background: #050505;
        box-sizing: border-box;
    }

    .m-photo {
        position: absolute;
        inset: 0;
        background:
            url('/public/assets/images/landing/hero-food.jpg') center 28% / cover no-repeat;
        z-index: 0;
    }

    .m-fade {
        position: absolute;
        inset: 0;
        z-index: 1;
        background: linear-gradient(
            180deg,
            rgba(5, 5, 5, 0.35) 0%,
            rgba(5, 5, 5, 0.15) 28%,
            rgba(5, 5, 5, 0.55) 52%,
            rgba(5, 5, 5, 0.92) 78%,
            #050505 100%
        );
        pointer-events: none;
    }

    .m-top {
        position: relative;
        z-index: 2;
        display: flex;
        align-items: center;
        gap: 0.55rem;
        flex-shrink: 0;
    }

    .m-logo {
        height: 60px;
        width: auto;
        max-width: min(80vw, 280px);
        object-fit: contain;
        filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
    }

    .m-install-mini {
        margin-left: auto;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 1px solid rgba(255, 255, 255, 0.35);
        background: rgba(0, 0, 0, 0.35);
        color: #fff;
        display: grid;
        place-items: center;
        cursor: pointer;
        backdrop-filter: blur(8px);
    }

    .m-install-mini[hidden] {
        display: none !important;
    }

    .m-copy {
        position: relative;
        z-index: 2;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        padding: 0 0 1.25rem;
        max-width: 22rem;
    }

    .m-eyebrow {
        margin: 0 0 0.75rem;
        font-size: 0.78rem;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #7ddec8;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }

    .m-title {
        margin: 0;
        font-family: 'Outfit', sans-serif;
        font-size: clamp(2.6rem, 12vw, 3.35rem);
        font-weight: 800;
        line-height: 1.02;
        letter-spacing: -0.045em;
        text-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
    }

    .m-title em {
        font-style: normal;
        color: #3dd4b0;
    }

    .m-caption {
        margin: 1rem 0 0;
        font-size: 0.92rem;
        line-height: 1.45;
        color: rgba(255, 255, 255, 0.78);
        max-width: 18rem;
        text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
    }

    .m-start {
        position: relative;
        z-index: 2;
        align-self: center;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.55rem;
        width: min(100%, 17rem);
        padding: 1rem 1.5rem;
        border-radius: 999px;
        background: var(--theme-primary, #0d7a5c);
        color: #fff;
        font-family: 'Outfit', sans-serif;
        font-size: 1.05rem;
        font-weight: 700;
        letter-spacing: -0.01em;
        box-shadow: 0 12px 32px rgba(13, 122, 92, 0.5);
        margin-bottom: 0.5rem;
        transition: transform 0.15s ease, background 0.15s ease;
    }

    .m-start:hover,
    .m-start:focus-visible {
        color: #fff;
        background: var(--theme-primary-dark, #095c46);
        transform: translateY(-1px);
    }

    .m-start i {
        font-size: 1.15rem;
    }
}

@media (max-width: 575px) {
    .m-stage {
        padding:
            calc(0.9rem + env(safe-area-inset-top, 0px))
            1.15rem
            calc(2.5rem + env(safe-area-inset-bottom, 0px));
    }

    .m-title {
        font-size: 2.55rem;
    }

    .m-logo {
        height: 60px;
        max-width: min(80vw, 280px);
    }
}

/* Installed PWA / standalone: keep Get Started above system UI */
@media (max-width: 991px) and (display-mode: standalone) {
    .m-stage {
        padding-bottom: calc(3.5rem + max(env(safe-area-inset-bottom, 0px), 24px));
    }
}

html.mcart-pwa-standalone .m-stage {
    padding-bottom: calc(3.5rem + max(env(safe-area-inset-bottom, 0px), 24px));
}

@media (max-height: 620px) and (max-width: 991px) {
    .m-caption {
        font-size: 0.85rem;
        margin-top: 0.75rem;
    }

    .m-title {
        font-size: 2.2rem;
    }
}
