/* The front door: a large logo, then the place search high enough that its menu fits. */

.home-page {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  padding: 1.25rem var(--page-gutter) 2rem;
}

.home-backdrop {
  position: fixed;
  z-index: 0;
  aspect-ratio: var(--home-map-w) / var(--home-map-h);
  width: max(100vw, calc(100vh * var(--home-map-w) / var(--home-map-h)));
  height: auto;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
}

/* A phone is too tall for the whole country, so show Maine through the Jersey shore. */
@media (max-width: 40rem) {
  .home-backdrop {
    width: 1000vw;
    top: 0;
    left: 55vw;
    transform: translate(-90.5%, -11%);
  }
}

/* Photo and report pins, already grey, fade back so they read as a hint
   and not as live data. */
.home-backdrop-marks {
  opacity: 0.45;
}

.home-backdrop-ocean,
.home-backdrop-land {
  opacity: 0.72;
}

.home-backdrop-ocean {
  fill: var(--map-ocean);
}

.home-backdrop-land {
  fill: var(--map-land);
  stroke: var(--map-land);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

/* One screen pixel, and only a whisper of the label color, so the lines disappear unless you look. */
.home-backdrop-states {
  fill: none;
  stroke: var(--map-label);
  stroke-width: 1;
  stroke-linejoin: round;
  stroke-opacity: 0.08;
}

/* Made-up storm reports (Forecasts::HomeStorm). About the map page's pin
   size on a phone, where the crop is close. The whole country is drawn
   much smaller on a wide screen, so they grow there, from the tip. */
.home-report {
  transform: scale(1.3);
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

@media (max-width: 40rem) {
  .home-report {
    transform: none;
  }
}

.home-report-badge {
  fill: var(--map-report-badge);
  stroke: var(--map-report-badge-ink);
  stroke-width: 0.4;
}

.home-report-value {
  fill: var(--map-report-badge-ink);
  font-family: system-ui, sans-serif;
  font-size: 4.2px;
  font-weight: 700;
  text-anchor: middle;
}

/* 100vh sits under the phone browser bar, which pushed the footer off screen. */
body:has(.home-page) {
  min-height: 100svh;
}

body:has(.home-page) .site-footer {
  position: relative;
  z-index: 1;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

.home-logo {
  position: relative;
  z-index: 1;
  margin: 0.5rem 4.5rem 0;
  line-height: 0;
}

.home-logo img {
  display: block;
  width: min(22rem, 100%);
  height: auto;
}

.home-search {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  width: 100%;
  max-width: min(36rem, 100%);
  margin-top: 1.75rem;
  overflow: visible;
}

@media (max-width: 40rem) {
  .home-logo {
    margin-top: 1.5rem;
  }

  body:has(.home-page) .site-footer {
    font-size: 0.75rem;
  }

  body:has(.home-page) .site-footer p {
    flex-wrap: nowrap;
    column-gap: 0.45rem;
  }
}

/* The menu is positioned from the search row. Drop it past the tile padding
   so the card border does not cut through the results. */
.home-search .place-suggestions {
  top: calc(100% + var(--tile-pad) + 0.35rem);
}

.home-blurb {
  position: relative;
  z-index: 1;
  max-width: 32rem;
  margin: 1.25rem 0 0;
  color: var(--color-muted);
  font-size: 0.9375rem;
  text-align: center;
}
