/* ═══════════════════════════════════════════════════════════════════════════
   Annapoorna — landing (pickup location picker)
   Single-viewport "ordering app" gateway: full-bleed MapLibre map with a
   floating panel of location cards. Cream + deep green, premium/minimal.
   Depends on brand tokens from app.css (--masala, --paper, --card, --line …).
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --lp-green:      #2f7d33;   /* map/cta green, slightly richer than --masala */
    --lp-green-deep: #245f27;
    --lp-green-ink:  #143b16;
    --lp-cream:      #f4f1e6;   /* map land */
    --lp-header-h:   72px;
    --lp-radius:     22px;
}

/* Lock to one viewport — this page is an app shell, not a scroll page. */
body.page-landing {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    background: var(--lp-cream);
    background-image: none;
    background-attachment: initial;
}

/* ── Header (transparent, floats over the map) ──────────────────────────── */
.lp-header {
    position: absolute; top: 0; left: 0; right: 0; z-index: 30;
    height: var(--lp-header-h);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 clamp(18px, 3vw, 34px);
    pointer-events: none;
}
.lp-header > * { pointer-events: auto; }
.lp-header__brand { display: inline-flex; align-items: center; gap: 12px; }
.lp-header__logo { height: 34px; width: auto; display: block; background: #fff; padding: 6px 11px; border-radius: 10px; box-sizing: content-box; object-fit: contain; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.lp-header__badge {
    font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: var(--lp-green-deep); background: rgba(252, 192, 0, .9);
    padding: 5px 10px; border-radius: 999px; line-height: 1;
}
.lp-header__nav { display: flex; align-items: center; gap: 8px; }
.lp-header__link {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 14px; font-weight: 600; color: var(--lp-green-ink);
    padding: 9px 14px; border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    transition: background .18s, transform .18s;
}
.lp-header__link:hover { background: #fff; transform: translateY(-1px); }
.lp-header__link--muted { color: var(--ink-soft); }
.lp-header__link svg { color: var(--lp-green); }

/* ── App shell: map (fills) + floating panel (right) ────────────────────── */
.lp-app { position: relative; height: 100dvh; width: 100%; overflow: hidden; }

.lp-map { position: absolute; inset: 0; }
/* MapLibre forces position:relative on its container, which cancels inset:0 —
   size it explicitly with width/height:100% so it always fills .lp-map. */
.lp-map__canvas { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--lp-cream); }

/* Cream scrim over the left column, fading to fully transparent before the
   map markers — keeps the logo, heading, sub-copy and trust chips legible over
   the map without washing out the rest of it. Sits above the tiles (z-index:1)
   but below the text overlay/trust chips (z:5).
   Layer 1: full-height left column (main legibility band).
   Layer 2: a soft top band so the header/logo reads across the top. */
.lp-map::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
    background:
        linear-gradient(101deg,
            rgba(244, 241, 230, .97) 0%,
            rgba(244, 241, 230, .90) 14%,
            rgba(244, 241, 230, .64) 26%,
            rgba(244, 241, 230, .30) 37%,
            rgba(244, 241, 230, 0)   47%),
        linear-gradient(180deg,
            rgba(244, 241, 230, .55) 0%,
            rgba(244, 241, 230, 0)   20%);
}

/* MapLibre chrome tuned to the brand */
.lp-map .maplibregl-ctrl-group {
    border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
    border: 1px solid var(--line);
}
.lp-map .maplibregl-ctrl-group button { width: 38px; height: 38px; }
.lp-map .maplibregl-ctrl-bottom-right { right: clamp(470px, 42vw, 520px); }
.lp-map .maplibregl-ctrl-bottom-left  { display: none; }

/* Map loading shimmer */
.lp-map__loading {
    position: absolute; inset: 0; display: grid; place-items: center;
    background: var(--lp-cream); transition: opacity .4s ease; z-index: 2;
}
.lp-map__loading.is-hidden { opacity: 0; pointer-events: none; }
.lp-map__spinner {
    width: 34px; height: 34px; border-radius: 50%;
    border: 3px solid rgba(47, 125, 51, .2); border-top-color: var(--lp-green);
    animation: lp-spin .8s linear infinite;
}
@keyframes lp-spin { to { transform: rotate(360deg); } }

/* Heading overlay (top-left of the map) */
.lp-map__overlay {
    position: absolute; left: clamp(20px, 3.4vw, 56px);
    top: calc(var(--lp-header-h) + clamp(10px, 4vh, 44px));
    max-width: min(460px, 40vw); z-index: 5; pointer-events: none;
}
.lp-map__title {
    font-family: var(--display); font-weight: 600; color: var(--lp-green-ink);
    font-size: clamp(34px, 4.6vw, 62px); line-height: 1.02; letter-spacing: -.015em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}
.lp-map__title em { font-style: italic; color: var(--lp-green); }
.lp-map__sub {
    margin-top: 16px; font-size: clamp(15px, 1.3vw, 18px); font-weight: 500;
    color: #40513f; max-width: 30ch;
}
.lp-map__hint { margin-top: 8px; font-size: 14px; color: var(--ink-soft); }

.lp-map__trust {
    position: absolute; left: clamp(20px, 3.4vw, 56px); bottom: 26px; z-index: 5;
    display: flex; flex-wrap: wrap; gap: 8px; list-style: none;
}
.lp-map__trust li {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: var(--lp-green-ink);
    background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.lp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lp-green); flex: none; }

/* ── Location panel (floating card, right) ──────────────────────────────── */
.lp-panel {
    position: absolute; z-index: 20;
    top: calc(var(--lp-header-h) + 14px);
    right: clamp(14px, 1.6vw, 24px); bottom: 18px;
    width: min(452px, 40vw);
    display: flex; flex-direction: column;
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--lp-radius); box-shadow: var(--shadow-lg);
    padding: 22px 20px 12px;
}
.lp-panel__head {
    display: flex; align-items: baseline; justify-content: space-between;
    padding: 0 4px 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line);
    flex: none;
}
.lp-panel__title { font-family: var(--display); font-size: 24px; color: var(--lp-green-ink); }
.lp-panel__count {
    font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: var(--ink-soft);
}

.lp-cards {
    display: flex; flex-direction: column; gap: 14px;
    overflow-y: auto; padding: 14px 4px; margin: 0 -4px;
    scrollbar-width: thin;
}
.lp-cards::-webkit-scrollbar { width: 8px; }
.lp-cards::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }

/* ── Location card ──────────────────────────────────────────────────────── */
.lp-card {
    position: relative;
    border: 1.5px solid var(--line); border-radius: 18px;
    background: #fff; padding: 16px;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    cursor: pointer; scroll-margin: 12px;
}
.lp-card:hover { border-color: rgba(47, 125, 51, .45); box-shadow: var(--shadow); transform: translateY(-2px); }
.lp-card:focus-visible { outline: 2px solid var(--lp-green); outline-offset: 2px; }
.lp-card.is-selected {
    border-color: var(--lp-green);
    box-shadow: 0 0 0 3px rgba(47, 125, 51, .14), var(--shadow);
    background: linear-gradient(180deg, #f5faf3, #fff 42%);
}

.lp-card__head { display: flex; gap: 13px; align-items: center; }
.lp-card__media {
    width: 58px; height: 58px; flex: none; border-radius: 14px; overflow: hidden;
    background: linear-gradient(135deg, var(--lp-green), var(--lp-green-deep));
    display: grid; place-items: center;
}
.lp-card__media img { width: 100%; height: 100%; object-fit: cover; }
.lp-card__initial { font-family: var(--display); font-size: 26px; font-weight: 600; color: #fff; }
.lp-card__headtext { min-width: 0; flex: 1; }
.lp-card__name {
    font-family: var(--display); font-size: 19px; font-weight: 600; color: var(--ink);
    display: flex; align-items: center; gap: 6px; line-height: 1.1;
}
.lp-card__pin { color: var(--lp-green); flex: none; }
.lp-card__status { margin-top: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lp-badge {
    font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    padding: 4px 9px; border-radius: 999px; line-height: 1;
}
.lp-badge--open   { background: rgba(47, 125, 51, .14); color: var(--lp-green-deep); }
.lp-badge--closed { background: rgba(108, 108, 84, .16); color: #5c5c48; }
.lp-card__statusmeta { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }

.lp-card__addr { margin: 13px 0 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.4; }

.lp-card__facts {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0;
}
.lp-fact {
    background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
    padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.lp-fact__label { font-size: 11px; font-weight: 600; color: var(--ink-soft); letter-spacing: .01em; }
.lp-fact__value { font-size: 15px; font-weight: 700; color: var(--ink); }
.lp-fact__value--accent { color: var(--lp-green-deep); }

.lp-card__cta {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 13px 18px; border-radius: 13px;
    background: var(--lp-green); color: #fff; font-weight: 700; font-size: 15px;
    box-shadow: 0 6px 16px rgba(47, 125, 51, .28);
    transition: background .18s, box-shadow .18s, transform .12s;
}
.lp-card__cta:hover { background: var(--lp-green-deep); box-shadow: 0 10px 22px rgba(47, 125, 51, .36); transform: translateY(-1px); }
.lp-card__cta:active { transform: translateY(0) scale(.995); }
.lp-card__cta svg { transition: transform .18s; }
.lp-card__cta:hover svg { transform: translateX(3px); }
.lp-card__cta--soon {
    background: #d8d6c8; color: #888874;
    box-shadow: none; cursor: default;
    letter-spacing: .04em; font-size: 13px; text-transform: uppercase; font-weight: 700;
}
.lp-card__cta--soon:hover { background: #d8d6c8; box-shadow: none; transform: none; }

.lp-empty { text-align: center; padding: 40px 16px; color: var(--ink-soft); }
.lp-empty h2 { font-family: var(--display); color: var(--ink); margin-bottom: 6px; }

/* ── Map marker (custom, built in JS) ───────────────────────────────────── */
.lp-marker { cursor: pointer; display: block; line-height: 0; }
.lp-marker__pin {
    display: block;
    width: 34px; height: 44px; position: relative;
    filter: drop-shadow(0 4px 6px rgba(20, 59, 22, .35));
    transition: transform .22s cubic-bezier(.2, .8, .2, 1);
    transform-origin: 50% 100%;
}
.lp-marker__pin svg { display: block; width: 100%; height: 100%; }
.lp-marker.is-active .lp-marker__pin { transform: scale(1.18); }
.lp-marker.is-active .lp-marker__ring { opacity: 1; animation: lp-pulse 1.8s ease-out infinite; }
.lp-marker__ring {
    position: absolute; left: 50%; bottom: 3px; width: 20px; height: 20px;
    margin-left: -10px; border-radius: 50%; background: rgba(47, 125, 51, .4);
    opacity: 0; z-index: -1;
}
@keyframes lp-pulse {
    0%   { transform: scale(1); opacity: .5; }
    100% { transform: scale(3.4); opacity: 0; }
}
.lp-marker__label {
    position: absolute; top: -6px; left: 50%; transform: translate(-50%, -100%);
    font-size: 12px; font-weight: 700; color: var(--lp-green-ink);
    background: rgba(255, 255, 255, .92); padding: 3px 9px; border-radius: 999px;
    white-space: nowrap; box-shadow: var(--shadow-sm); pointer-events: none;
    opacity: 0; transition: opacity .18s;
}
.lp-marker.is-active .lp-marker__label,
.lp-marker:hover .lp-marker__label { opacity: 1; }

/* MapLibre popup, brand-styled */
.lp-map .maplibregl-popup { max-width: 260px !important; }
.lp-map .maplibregl-popup-content {
    border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-lg);
    border: 1px solid var(--line); font-family: var(--body);
}
.lp-map .maplibregl-popup-close-button { display: none; }
.lp-map .maplibregl-popup-tip { border-top-color: #fff; }
.lp-pop__badge {
    font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    color: var(--lp-green-deep); background: rgba(47, 125, 51, .14);
    padding: 3px 8px; border-radius: 999px;
}
.lp-pop__badge--closed { color: #5c5c48; background: rgba(108, 108, 84, .16); }
.lp-pop__name { font-family: var(--display); font-size: 17px; font-weight: 600; color: var(--ink); margin: 8px 0 4px; }
.lp-pop__row { font-size: 13px; color: var(--ink-soft); margin-top: 3px; display: flex; gap: 6px; }
.lp-pop__row strong { color: var(--lp-green-deep); }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
    .lp-panel { width: min(400px, 44vw); }
    .lp-map__overlay { max-width: 44vw; }
    .lp-map .maplibregl-ctrl-bottom-right { right: clamp(410px, 46vw, 460px); }
}

/* Stack: map on top, cards below (scrolls). Still fills the viewport. */
@media (max-width: 800px) {
    body.page-landing { overflow: auto; }
    .lp-app { height: auto; min-height: 100dvh; display: flex; flex-direction: column; }
    .lp-map { position: relative; inset: auto; height: 42dvh; min-height: 300px; }
    .lp-map__overlay {
        position: relative; left: 0; top: 0; max-width: none;
        padding: calc(var(--lp-header-h) + 12px) 20px 0; text-align: left;
    }
    .lp-map__title { font-size: clamp(30px, 8vw, 42px); }
    .lp-map__title br { display: none; }
    .lp-map__sub { max-width: none; }
    .lp-map__trust { display: none; }
    .lp-map .maplibregl-ctrl-bottom-right { right: 10px; }
    .lp-panel {
        position: relative; inset: auto; width: auto; margin: -22px 12px 12px;
        bottom: auto; right: auto; box-shadow: var(--shadow-lg); z-index: 20;
    }
    .lp-cards { overflow: visible; }
    .lp-header__link--muted { display: none; }
}

@media (max-width: 460px) {
    .lp-card__facts { grid-template-columns: 1fr; }
    .lp-map__overlay { padding-top: calc(var(--lp-header-h) + 6px); }
}

@media (prefers-reduced-motion: reduce) {
    .lp-marker__pin, .lp-card, .lp-card__cta, .lp-header__link { transition: none; }
    .lp-marker.is-active .lp-marker__ring { animation: none; }
    .lp-map__spinner { animation-duration: 1.6s; }
}
