/*! livepow-web lp-home.css: the home page (/). Tokens and cards come from lp.css. */
/* hero: the photo spans the content frame and starts right under the nav bar (.lp-main's top padding is dropped).
   The photo and .lp-hero-over (H1 when shown, Whistler button, search) share one grid cell: the photo at the top, the
   overlay at the bottom, so the button and search sit on the photo's lower part. That part fades out with a mask (so it
   fades into whatever page background the theme draws) and is fully transparent at the hero's bottom edge. */
.lp-home .lp-main { padding-top: 0; }
.lp-home-hero { display: grid; text-align: center; margin: 0 0 6px; }
.lp-home-hero > * { grid-area: 1 / 1; min-width: 0; }
.lp-hero-over { position: relative; z-index: 2; align-self: end; padding: 0 0 16px; }
.lp-home-hero h1 {
  font-size: 1.08rem; margin: 0 auto 12px; max-width: 34em;
  text-shadow: 0 0 2px var(--lp-bg), 0 0 6px var(--lp-bg), 0 0 14px var(--lp-bg);
}
/* below 700px the photo runs edge to edge: the hero cancels .lp-main's side gutters (no 100vw, so no scrollbar overflow),
   and the overlay gets them back. */
@media (max-width: 699px) {
  .lp-home-hero { margin-left: calc(-1 * var(--lp-gutter)); margin-right: calc(-1 * var(--lp-gutter)); }
  .lp-hero-over { padding-left: var(--lp-gutter); padding-right: var(--lp-gutter); }
}
@media (min-width: 700px) { .lp-home-hero h1 { font-size: 1.3rem; } }

/* hero photo (index.php lpw_home_photo): a fixed aspect-ratio box (no layout shift when the inline script inserts the
   <img>), object-fit cover with object-position from the manifest. Taller boxes on narrow screens keep the top of the
   photo clear of the overlay. --lp-hero-fade: how far up from the bottom the fade starts (a bit more than the overlay). */
.lp-hero-photo {
  --lp-hero-fade: 280px;
  position: relative; overflow: hidden; width: 100%; aspect-ratio: 1 / 1; align-self: start;
  background: var(--lp-surface-2);
  -webkit-mask-image: linear-gradient(#000 calc(100% - var(--lp-hero-fade)), rgba(0, 0, 0, .8) calc(100% - var(--lp-hero-fade) * .85),
    rgba(0, 0, 0, .4) calc(100% - var(--lp-hero-fade) * .6), rgba(0, 0, 0, .14) calc(100% - var(--lp-hero-fade) * .3), transparent);
  mask-image: linear-gradient(#000 calc(100% - var(--lp-hero-fade)), rgba(0, 0, 0, .8) calc(100% - var(--lp-hero-fade) * .85),
    rgba(0, 0, 0, .4) calc(100% - var(--lp-hero-fade) * .6), rgba(0, 0, 0, .14) calc(100% - var(--lp-hero-fade) * .3), transparent);
}
.lp-hero-photo img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
@media (min-width: 500px) { .lp-hero-photo { aspect-ratio: 4 / 3; } }
@media (min-width: 700px) { .lp-hero-photo { aspect-ratio: 16 / 9; --lp-hero-fade: 230px; } }
@media (min-width: 1000px) { .lp-hero-photo { aspect-ratio: 3 / 1; --lp-hero-fade: 210px; } }
html[data-theme=dark] .lp-hero-photo::after {   /* dims the photo a little in dark mode */
  content: ""; position: absolute; inset: 0; pointer-events: none; background: rgba(8, 12, 18, .22);
}

/* the big Whistler Blackcomb button (old home page visitors) */
.lp-wb-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: min(100%, 520px); min-height: 76px; margin: 0 auto 14px; padding: 12px 18px;
  background: linear-gradient(135deg, #2d5886, #4477aa); color: #fff; text-decoration: none;
  border-radius: var(--lp-radius); box-shadow: var(--lp-glow), inset 0 0 10px rgba(255, 255, 255, .5);
}
.lp-wb-btn:hover, .lp-wb-btn:focus-visible { background: linear-gradient(135deg, #24496f, #3a6a9c); text-decoration: none; }
.lp-wb-k { font-size: 1.3rem; font-weight: 700; letter-spacing: .01em; text-shadow: 0 0 4px rgba(100, 100, 255, 1); }
.lp-wb-s { font-size: .82rem; font-weight: 400; opacity: .92; }
@media (min-width: 700px) { .lp-wb-k { font-size: 1.5rem; } }

/* big search */
.lp-search.lp-home-search { position: relative; width: min(100%, 520px); margin: 0 auto; }
.lp-search.lp-home-search input {
  width: 100%; height: 46px; padding: 0 14px; font-size: 16px;
  background: var(--lp-surface); color: var(--lp-input-text); border: 1px solid var(--lp-border-2); border-radius: 8px; box-shadow: 0 0 4px rgba(45, 88, 134, .35);
}
.lp-search.lp-home-search input:focus { width: 100%; outline: 2px solid var(--lp-blue-2); outline-offset: 0; }
.lp-search.lp-home-search .lp-search-list { left: 0; right: 0; top: 50px; width: auto; text-align: left; }

/* favorites / nearby */
.lp-home-empty .lp-heart-inline { width: 1.15em; height: 1.15em; margin: -.2em .05em 0; }
.lp-home-near-bar { margin-bottom: 10px; }
.lp-home-status { margin: 0; flex: 1 1 200px; }

/* biggest snowfalls (regional + worldwide; next / past 48 h side by side from 760px, a toggle below) */
.lp-top-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 10px; }
.lp-top-bar .lp-note { margin: 0; }
@media (min-width: 760px) { .lp-top-bar .lp-toggle { display: none; } }
.lp-top-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .lp-top-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 759px) {
  .lp-top-grid[data-show="next"] > .lp-top-past, .lp-top-grid[data-show="past"] > .lp-top-next { display: none; }
}
.lp-top-col { min-width: 0; }
.lp-top-col h3 { color: var(--lp-accent); margin-bottom: .35em; }
.lp-top-list { margin: 0; padding: 0; list-style: none; counter-reset: top; background: var(--lp-surface); border-radius: 8px; box-shadow: 0 0 3px var(--lp-shadow); overflow: hidden; }
.lp-top-list li {
  counter-increment: top; display: flex; align-items: baseline; gap: 8px; padding: 6px 10px; min-width: 0;
  border-top: 1px solid var(--lp-border);
}
.lp-top-list li:first-child { border-top: 0; }
.lp-top-list li:nth-child(even) { background: var(--lp-zebra); }
.lp-top-list li::before { content: counter(top); flex: none; width: 1.4em; text-align: right; font-size: .78rem; color: var(--lp-muted); font-variant-numeric: tabular-nums; }
.lp-top-n { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-size: .9rem; }
.lp-top-f { margin-right: 4px; font-size: 1rem; line-height: 1; }
.lp-top-p { font-size: .75rem; color: var(--lp-muted); }
@media (max-width: 499px) { .lp-top-p { display: block; } }
.lp-top-t { flex: none; min-width: 3.2em; text-align: right; font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.lp-top-v { flex: none; min-width: 3.6em; text-align: right; font-weight: 700; color: var(--lp-accent); font-variant-numeric: tabular-nums; }
#lp-favorites.lp-skel, #lp-near.lp-skel, #lp-topregion.lp-skel { min-height: 60px; }
#lp-topsnow.lp-skel { min-height: 420px; }
.lp-top-hl { min-width: 0; white-space: nowrap; }
.lp-top-cc { font: inherit; font-size: 16px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--lp-border-2, #bbb); background: var(--lp-surface, #fff); color: var(--lp-input-text, inherit); max-width: 14em; }
