/* ============================================================================
   Homepage
   ============================================================================ */

/* Full-bleed sections, so not a .container */
.home-container {
  display: flex;
  flex-direction: column;
}

/* Hero */
.hero-section {
  padding: 4rem 2rem 3rem;
  text-align: center;
}

.hero-content {
  max-width: 50rem;
  margin: 0 auto;
}

/* Who runs the hub, small and above the name */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: var(--text-md);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--clr-text-muted);
}

/* Only the name underlines, not the logo beside it */
.hero-eyebrow:hover {
  text-decoration: none;
}

.hero-eyebrow:hover span {
  text-decoration: underline;
}

.hero-eyebrow-logo {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
}

.hero-section h1 {
  font-size: var(--text-5xl);
  font-weight: 700;
  margin: 0 0 1rem 0;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: var(--text-3xl);
  color: var(--clr-text-muted);
  margin: 0 0 1.5rem 0;
  font-weight: 400;
}

.hero-description {
  font-size: var(--text-xl);
  line-height: 1.7;
  color: var(--clr-text-muted);
  margin: 0 auto 2.5rem;
  max-width: 43.75rem;
}

/* Map of recent and coming events */
.home-map-section {
  padding: 0 2rem 3rem;
}

.home-map-inner {
  max-width: 64rem;
  margin: 0 auto;
}

.home-map-section h2 {
  margin: 0 0 0.25rem;
  font-size: var(--text-2xl);
  text-align: center;
}

.home-map-lead {
  margin: 0 0 1rem;
  text-align: center;
  color: var(--clr-text-muted);
}

/* Retry line takes the lead's place, so no box of its own */
.home-map-lead .load-error {
  padding: 0;
}

.home-map {
  height: 26rem;
}

/* Leaflet clears the outline, and focus must stay visible */
.home-map:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 2px;
}

.home-map-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
  margin: 0.75rem 0 0;
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
}

.home-map-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Same fills as the pins, without the radio-button ring */
.map-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
}

.map-dot--upcoming { background: var(--clr-accent); }
.map-dot--past { background: var(--clr-border-strong); }

/* The pins as a list, for keyboard and screen readers */
/* Date tile with the title and "date · place" stacked beside it, as on the
   event cards */
.home-map-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
  gap: 1rem 2rem;
  margin: 1.25rem 0 0;
  font-size: var(--text-md);
}

.home-map-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.home-map-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.home-map-list a {
  font-weight: 600;
}

.home-map-place {
  color: var(--clr-text-muted);
  font-size: var(--text-sm);
}

/* Marker popups: title, date, place */
.map-popup-title {
  display: block;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.map-popup-line {
  display: block;
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
}

/* About WikiPortraits, under the map */
.home-about {
  padding: 0 2rem 4rem;
}

.home-about-inner {
  max-width: 43.75rem;
  margin: 0 auto;
  text-align: center;
}

.home-about h2 {
  margin: 0 0 0.5rem;
  font-size: var(--text-2xl);
}

.home-about p {
  color: var(--clr-text-muted);
  line-height: 1.7;
  margin: 0 0 1.25rem;
}

@media (max-width: 768px) {
  .hero-section h1 {
    font-size: var(--text-4xl);
  }

  .hero-subtitle {
    font-size: var(--text-2xl);
  }

  .hero-description {
    font-size: var(--text-lg);
  }

  /* Shorter, so a scrolling thumb is not stuck on the map */
  .home-map {
    height: 20rem;
  }
}

/* Square Leaflet's corners, first and last named for its touch rule */
.home-map .leaflet-bar,
.home-map .leaflet-bar a,
.home-map .leaflet-bar a:first-child,
.home-map .leaflet-bar a:last-child,
.home-map .leaflet-popup-content-wrapper {
  border-radius: var(--radius);
}
