/* =========================================================================
   National landing page (view=landing, logged-out). Namespaced .lp-* so it
   never collides with the app's own .hero/.cta/.chip/.note/.stat classes.
   Ground matches the Places page (--bg-2). Fonts (Figtree/Public Sans) and
   colour tokens come from design.css. Revert: drop the landing.css <link>
   in index.php and this file; restore landingPage() from the .bak.
   ========================================================================= */

body.v-landing{background:var(--bg-2)}
/* full-bleed shell: no 2-col grid, no sidebar (mirrors .app-onboarding) */
.app-landing{display:block;max-width:none;padding:0;gap:0}
.app-landing .side{display:none!important}
.app-landing .feed{min-width:0;width:100%;border:0;background:none}

.lp{color:var(--text)}
.lp .wrap{max-width:1200px;margin:0 auto;padding-inline:24px}
.lp a{color:inherit}
.lp img{max-width:100%}
.lp-eyebrow{font-size:11px;font-weight:700;letter-spacing:.13em;text-transform:uppercase;color:var(--green)}

/* ---------- hero ---------- */
.lp-hero{padding-block:52px 40px}
.lp-hero-grid{display:grid;grid-template-columns:1.02fr .98fr;gap:48px;align-items:center}
.lp-head{font-family:var(--display);font-size:clamp(34px,5vw,55px);line-height:1.05;font-weight:800;letter-spacing:-.03em;margin:13px 0 0;text-wrap:balance}
.lp-head em{font-style:normal;color:var(--green)}
.lp-lede{font-size:18px;color:var(--copy);margin:16px 0 0;max-width:40ch;line-height:1.55}
.lp-search{margin-top:24px;display:flex;align-items:center;gap:8px;background:var(--surface);border:1.5px solid var(--line-2);border-radius:999px;padding:6px 6px 6px 18px;box-shadow:0 1px 2px rgba(20,30,25,.05),0 12px 30px -18px rgba(20,30,25,.35);max-width:470px}
.lp-search svg{stroke:var(--faint);flex:none}
.lp-search input{flex:1;min-width:0;border:0;background:none;font:inherit;font-size:16px;color:var(--text)}
.lp-search input:focus{outline:none}
.lp-search input::placeholder{color:var(--faint)}
.lp-search .primary{background:var(--green);color:#fff;font-weight:700;border-radius:999px;padding:11px 20px;white-space:nowrap;border:0;cursor:pointer}
.lp-search .primary:hover{filter:brightness(1.05)}
/* hero search typeahead dropdown (items reuse .sh-result from design.css, like the header search) */
.lp-search{position:relative}
.lp-results{position:absolute;top:calc(100% + 8px);left:0;right:0;background:var(--surface);border:1px solid var(--line-2);border-radius:14px;box-shadow:0 14px 34px -16px rgba(0,0,0,.3);overflow:hidden auto;z-index:60;max-height:340px}
.lp-stats{display:flex;gap:30px;margin-top:26px;flex-wrap:wrap}
.lp-stat b{font-family:var(--display);font-size:26px;font-weight:800;display:block;line-height:1;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.lp-stat span{font-size:12px;color:var(--faint);letter-spacing:.02em;text-transform:uppercase}

.lp-collage{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:repeat(2,1fr);gap:14px;aspect-ratio:1/1;max-height:452px}
.lp-ctile{position:relative;overflow:hidden;border-radius:16px;box-shadow:0 1px 2px rgba(20,30,25,.05),0 14px 34px -18px rgba(20,30,25,.45);display:block}
.lp-ctile.lp-lead{grid-row:span 2}
.lp-ctile img,.lp-ctile .lp-fallback{width:100%;height:100%;object-fit:cover;display:block}
.lp-clabel{position:absolute;left:0;right:0;bottom:0;padding:24px 14px 12px;color:#fff;font-family:var(--display);font-weight:700;font-size:17px;line-height:1.1;background:linear-gradient(transparent,rgba(18,26,20,.62))}
.lp-clabel small{display:block;font-family:var(--sans);font-weight:500;font-size:12px;opacity:.92;margin-top:2px}

/* fallback tile when a town has no captured photo yet */
.lp-fallback{background:linear-gradient(155deg,hsl(var(--h,150) 42% 52%),hsl(calc(var(--h,150) + 24) 46% 34%));display:grid;place-items:center;color:rgba(255,255,255,.9);font-family:var(--display);font-weight:800;font-size:30px;letter-spacing:-.02em}

/* ---------- section shell ---------- */
.lp-band{padding-block:42px}
.lp-sechead{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px;flex-wrap:wrap}
.lp-sechead h2{font-family:var(--display);font-size:clamp(23px,3vw,31px);font-weight:800;margin:6px 0 0;line-height:1.1;letter-spacing:-.02em}
.lp-sechead p{color:var(--muted);font-size:14.5px;margin:6px 0 0;max-width:56ch;line-height:1.5}
.lp-seeall{font-size:14px;font-weight:700;color:var(--green);white-space:nowrap}
.lp-seeall:hover{color:var(--green-strong,#0b7f45)}

/* near you */
.lp-locbar{display:inline-flex;align-items:center;gap:9px;background:var(--surface);border:1px solid var(--line-2);border-radius:999px;padding:6px 8px 6px 14px;font-size:13px;color:var(--copy);box-shadow:0 1px 2px rgba(20,30,25,.05);margin-bottom:8px}
.lp-locbar b{color:var(--text);font-weight:700}
.lp-locbar .dot{width:7px;height:7px;border-radius:50%;background:var(--green)}
.lp-locbar .chg{color:var(--green);font-weight:700;padding:3px 10px;border-radius:999px;background:var(--green-bg)}
.lp-note{font-size:12.5px;color:var(--muted);margin:10px 0 0;display:flex;gap:7px;align-items:flex-start;max-width:62ch;line-height:1.5}
.lp-note svg{color:var(--green);flex:none;margin-top:2px;stroke:currentColor}
.lp-near{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.lp-nearcard{background:var(--surface);border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:0 1px 2px rgba(20,30,25,.05);transition:transform .15s,box-shadow .15s;display:flex;flex-direction:column}
.lp-nearcard:hover{transform:translateY(-3px);box-shadow:0 2px 4px rgba(20,30,25,.07),0 22px 46px -20px rgba(20,30,25,.5)}
.lp-nearimg{position:relative;aspect-ratio:4/3;display:block}
.lp-nearimg img,.lp-nearimg .lp-fallback{width:100%;height:100%;object-fit:cover;display:block}
.lp-mi{position:absolute;top:10px;left:10px;background:rgba(255,255,255,.92);color:var(--green-strong,#0b7f45);font-size:11px;font-weight:700;padding:4px 9px;border-radius:999px}
.lp-nearbody{padding:12px 14px 14px}
.lp-nearbody b{font-family:var(--display);font-weight:700;font-size:16px;display:block}
.lp-nearbody small{font-size:12.5px;color:var(--muted)}

/* national grid */
.lp-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.lp-card{background:var(--surface);border:1px solid var(--line);border-radius:18px;overflow:hidden;box-shadow:0 1px 2px rgba(20,30,25,.05),0 12px 30px -18px rgba(20,30,25,.35);transition:transform .15s,box-shadow .15s;display:flex;flex-direction:column}
.lp-card:hover{transform:translateY(-3px);box-shadow:0 2px 4px rgba(20,30,25,.07),0 22px 46px -20px rgba(20,30,25,.5)}
.lp-cardimg{aspect-ratio:16/10;display:block}
.lp-cardimg img,.lp-cardimg .lp-fallback{width:100%;height:100%;object-fit:cover;display:block}
.lp-cardbody{padding:14px 16px 16px}
.lp-cardname{font-family:var(--display);font-weight:700;font-size:19px;display:block}
.lp-cardstate{font-size:12.5px;color:var(--muted)}
.lp-metrics{display:flex;gap:16px;margin-top:11px;padding-top:11px;border-top:1px solid var(--line)}
.lp-metrics>span{font-size:12px;color:var(--muted)}
.lp-metrics b{display:block;font-size:15px;color:var(--text);font-weight:700;font-variant-numeric:tabular-nums}

/* state chips */
.lp-chips{display:flex;flex-wrap:wrap;gap:10px}
.lp-chip{display:inline-flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--line-2);border-radius:12px;padding:10px 14px;font-size:14px;font-weight:600;color:var(--text);transition:.13s}
.lp-chip:hover{border-color:var(--green-line);color:var(--green)}
.lp-chip .n{color:var(--faint);font-size:12.5px;font-variant-numeric:tabular-nums}
.lp-chip:hover .n{color:var(--green)}

/* what you'll find */
.lp-feats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.lp-feat{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:22px 20px;box-shadow:0 1px 2px rgba(20,30,25,.05)}
.lp-feat .ic{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:var(--green-bg);color:var(--green);margin-bottom:14px}
.lp-feat .ic svg{stroke:currentColor}
.lp-feat h3{font-family:var(--display);font-size:18px;font-weight:700;margin:0 0 6px}
.lp-feat p{font-size:13.5px;color:var(--muted);margin:0;line-height:1.5}

/* cta */
.lp-cta{background:var(--green-strong,#0b7f45);color:#fff;border-radius:24px;padding:48px 40px;text-align:center;position:relative;overflow:hidden}
.lp-cta::before{content:"";position:absolute;inset:0;background:radial-gradient(60% 120% at 12% 0%,rgba(255,255,255,.16),transparent 58%),radial-gradient(50% 120% at 92% 100%,rgba(245,166,35,.30),transparent 55%)}
.lp-cta>*{position:relative}
.lp-cta h2{font-family:var(--display);font-size:clamp(26px,3.4vw,37px);font-weight:800;margin:0;text-wrap:balance}
.lp-cta p{opacity:.92;margin:12px auto 0;max-width:46ch;font-size:16px}
.lp-cta .lp-ctabtn{margin-top:22px;background:#fff;color:var(--green-strong,#0b7f45);font-size:15px;font-weight:700;padding:13px 24px;display:inline-block;border-radius:999px}
.lp-cta .lp-ctabtn:hover{box-shadow:0 10px 26px rgba(0,0,0,.2)}

/* footer + credits */
.lp-foot{border-top:1px solid var(--line);margin-top:24px;padding-block:34px 44px;color:var(--muted)}
.lp-foot-top{display:flex;justify-content:space-between;gap:24px;flex-wrap:wrap}
.lp-foot-tag{margin-top:12px;max-width:30ch;font-size:13.5px}
.lp-foot-cols{display:flex;gap:44px;flex-wrap:wrap}
.lp-foot-cols h4{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--text);margin:0;font-weight:700}
.lp-foot-cols a{display:block;margin-top:9px;color:var(--muted);font-size:13.5px}
.lp-foot-cols a:hover{color:var(--green)}
.lp-credits{margin-top:30px;padding-top:18px;border-top:1px solid var(--line)}
.lp-credits h4{font-size:10.5px;letter-spacing:.09em;text-transform:uppercase;color:var(--faint);font-weight:700;margin:0 0 10px}
.lp-credits ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:4px 28px}
.lp-credits li{font-size:11.5px;color:var(--faint);line-height:1.5}
.lp-credits li b{color:var(--muted);font-weight:600}
.lp-credits a{color:var(--muted);text-decoration:underline;text-underline-offset:2px}
.lp-credits a:hover{color:var(--green)}
.lp-credits .note2{margin-top:12px;font-size:11.5px;color:var(--faint);max-width:78ch;line-height:1.5}
.lp-legal{margin-top:18px;font-size:12px;color:var(--faint)}
.lp-legal a{color:var(--muted)}

@media(max-width:920px){
  .lp-hero-grid{grid-template-columns:1fr;gap:34px}
  .lp-collage{max-height:380px}
  .lp-near{grid-template-columns:repeat(2,1fr)}
  .lp-grid{grid-template-columns:repeat(2,1fr)}
  .lp-feats{grid-template-columns:repeat(2,1fr)}
  .lp-credits ul{grid-template-columns:1fr}
}
@media(max-width:620px){
  .lp .wrap{padding-inline:16px}
  .lp-grid{grid-template-columns:1fr}
  .lp-feats{grid-template-columns:1fr}
  .lp-near{grid-template-columns:1fr 1fr}
}

/* ---------- embedded explore map (reuses explore.css .xp-* overlays + explore.js) ---------- */
.lp-map{position:relative;height:460px;border:1px solid var(--line);border-radius:20px;overflow:hidden;background:var(--bg-2);box-shadow:0 1px 2px rgba(20,30,25,.05),0 20px 44px -22px rgba(20,30,25,.4)}
.lp-map #xpMap{width:100%;height:100%;display:block}
/* use the site display face (Figtree) in the caption, not the explore page's Bricolage */
.lp-map .xp-caption h2,.lp-map .xp-stat b{font-family:var(--display)}
@media(max-width:620px){
  .lp-map{height:360px}
  .lp-map #xpMap{touch-action:pan-y} /* let the page scroll past the map on touch; +/- buttons still zoom */
}

/* ---------- zero-state card CTA (replaces per-town metrics until landing_town_stats is on) ---------- */
.lp-cardstate{display:block}
.lp-cardcta{display:flex;align-items:center;gap:6px;margin-top:11px;padding-top:11px;border-top:1px solid var(--line);font-weight:700;font-size:13.5px;color:var(--green)}
.lp-cardcta svg{stroke:currentColor}
.lp-card:hover .lp-cardcta{color:var(--green-strong,#0b7f45)}
.lp-nearcta{color:var(--green);font-weight:700}
.lp-nearcard:hover .lp-nearcta{color:var(--green-strong,#0b7f45)}
