/* ============================================================
   Homepage: footprint-map hero, story, community,
   baby bells callout, careers.
   ============================================================ */

/* ── Hero ──────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.6rem;
  padding: 3rem 0 5.4rem;
  overflow: hidden;
  background:
    radial-gradient(60rem 34rem at 8% -12%, rgba(239, 231, 250, 0.9) 0%, transparent 58%),
    radial-gradient(48rem 30rem at 100% 8%, rgba(255, 184, 28, 0.13) 0%, transparent 55%),
    radial-gradient(40rem 26rem at 78% 96%, rgba(232, 56, 138, 0.08) 0%, transparent 52%),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 2.4rem;
  align-items: center;
}

/* Optical bias: the map column is tall, so pure centering leaves the
   copy sitting low — nudge it up a touch (two-column layout only). */
.hero-copy { margin-top: -4rem; }

.hero-copy h1 { margin: 0.2rem 0 1.1rem; max-width: 12ch; }
.hero-copy .lead { margin-bottom: 1.6rem; }

.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* Staggered entrance */
.hero .reveal { transition-delay: 0s; }
.hero .reveal:nth-child(2) { transition-delay: 0.08s; }
.hero .reveal:nth-child(3) { transition-delay: 0.16s; }
.hero .reveal:nth-child(4) { transition-delay: 0.24s; }

/* ── Footprint map ─────────────────────────────────────────── */

.hero-map-wrap { position: relative; }

/* Oversized: past 1240px the map escapes the container and bleeds
   to the viewport's right edge; the foot row stays aligned. */
@media (min-width: 1241px) {
  .hero-map-wrap { margin-right: calc((var(--container) - 100vw) / 2); }
  .hero-map-foot { margin-right: calc((100vw - var(--container)) / 2); }
}

#densityMap {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 22px 32px rgba(64, 32, 100, 0.13));
}

.hm-state { transition: filter 0.18s ease, transform 0.22s ease; }
.hm-neutral { animation: hmFadeIn 0.5s ease both; }

.hm-active { cursor: pointer; }
.hm-active:hover, .hm-active:focus {
  filter: brightness(1.14) saturate(1.15) drop-shadow(0 0 8px rgba(255, 184, 28, 0.55));
  transform: translateY(-2px);
  outline: none;
}

/* Depth slab, ambient glow, HQ arcs, count badges (built by heromap.js) */
.hm-slab, .hm-glow, .hm-arcs, .hm-badges { pointer-events: none; }

.hm-slab path { fill: var(--purple-band); opacity: 0.9; }

.hm-arc {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.3;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 0.9s ease 0.1s;
}
#densityMap.hm-final .hm-arc { opacity: 0.55; }

.hm-badge {
  opacity: 0;
  transform: scale(0.6);
  transform-box: fill-box;
  transform-origin: center;
  transition:
    opacity 0.45s ease var(--pop, 0s),
    transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) var(--pop, 0s);
}
#densityMap.hm-final .hm-badge { opacity: 1; transform: scale(1); }
.hm-badge rect {
  fill: #FFFFFF;
  stroke: var(--lavender-deep);
  stroke-width: 1;
  filter: drop-shadow(0 2px 3px rgba(64, 32, 100, 0.22));
}
.hm-badge text {
  fill: var(--purple-deep);
  font-family: var(--font-body);
  font-weight: 800;
  text-anchor: middle;
}

/* States ignite outward from HQ (delay set per-state via --ignite) */
.hm-active.ignite {
  animation: hmIgnite 0.75s ease backwards;
  animation-delay: var(--ignite, 0s);
}

@keyframes hmIgnite {
  0% { opacity: 0; filter: brightness(2.1) saturate(0.4); }
  55% { opacity: 1; filter: brightness(1.4) saturate(1.25) drop-shadow(0 0 10px rgba(255, 184, 28, 0.45)); }
  100% { opacity: 1; filter: none; }
}

@keyframes hmFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Fayetteville HQ pulse */
.pulse-dot {
  fill: var(--gold);
  stroke: #fff;
  stroke-width: 2.5;
  filter: drop-shadow(0 2px 5px rgba(140, 90, 0, 0.45));
}
.pulse-ring {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: hqPulse 3.2s ease-out 1.2s infinite;
}
.pulse-ring-late { animation-delay: 2.8s; }

@keyframes hqPulse {
  0% { opacity: 0.9; transform: scale(0.5); }
  70% { opacity: 0; transform: scale(3.4); }
  100% { opacity: 0; transform: scale(3.4); }
}

.hm-tooltip {
  position: absolute;
  display: none;
  pointer-events: none;
  background: var(--surface);
  border: 1px solid var(--lavender-deep);
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  z-index: 10;
  box-shadow: var(--shadow-md);
}

.hero-map-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.7rem;
}

.hero-map-hint {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.hero-map-legend {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}
.legend-bar-sm {
  width: 86px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #EDE2F8 0%, #C9A6EC 30%, #9A66D6 55%, #702082 80%, #43217A 100%);
  border: 1px solid var(--lavender-deep);
}

/* Pills are a touch-friendly fallback; the map itself covers desktop */
.hero-state-pills { display: none; margin-top: 0.9rem; }

/* ── Stats strip ───────────────────────────────────────────── */

.hero-stats-strip {
  display: flex;
  align-items: center;
  gap: 2.4rem;
  flex-wrap: wrap;
  background: linear-gradient(160deg, #FFFFFF 0%, #FBF6FF 100%);
  border: 1px solid var(--lavender-deep);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.15rem 1.8rem;
}

.hero-stats-strip .stat {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.55rem;
  line-height: 1;
  background: var(--grad-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.3;
  max-width: 170px;
}

.stat-note {
  margin: 0 0 0 auto;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--purple-brand);
}

/* Bottom wave into the white story area */
.hero-wave {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  z-index: 1;
  line-height: 0;
  pointer-events: none;
}
.hero-wave svg { width: 100%; height: 68px; display: block; }

/* ── Story ─────────────────────────────────────────────────── */

.section-story { background: #FFFFFF; padding-top: 2.2rem; }

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
}

.story-card figure { aspect-ratio: 16 / 8.5; }
.story-card h3 { margin-bottom: 0.35rem; }

.card-more {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--pink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.story-card:hover .card-more { text-decoration: underline; text-underline-offset: 4px; }

/* ── Community band ────────────────────────────────────────── */

.section-community {
  position: relative;
  background:
    radial-gradient(52rem 30rem at 110% -10%, rgba(232, 56, 138, 0.16) 0%, transparent 55%),
    radial-gradient(40rem 26rem at -10% 110%, rgba(255, 184, 28, 0.10) 0%, transparent 50%),
    var(--purple-band);
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.1rem;
}

.media-card { border-radius: var(--radius-sm); }
.media-card figure { height: 170px; }
.media-card h4 { font-size: 1.02rem; margin: 0; color: var(--text); }
.media-card .body { padding: 0.95rem 1.05rem 1.1rem; }
.media-card .body p { font-size: 0.9rem; }
.band-dark .card:hover { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4); }

/* ── Baby Bells callout ────────────────────────────────────── */

.section-babybells { padding-top: 4.2rem; padding-bottom: 4.2rem; }

.babybells-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  background:
    radial-gradient(30rem 18rem at 90% 0%, rgba(255, 184, 28, 0.18) 0%, transparent 60%),
    linear-gradient(150deg, #FFF9F0 0%, #FBEFF6 100%);
  border: 1px solid #F4DFC9;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 2.2rem 2.4rem;
}

.babybells-side {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.babybells-peek { display: flex; }
.babybells-peek img {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #FFFFFF;
  box-shadow: var(--shadow-sm);
}
.babybells-peek img + img { margin-left: -16px; }

/* ── Careers ───────────────────────────────────────────────── */

.section-careers { padding-top: 1rem; }

.careers-wrap {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.4rem;
  align-items: start;
}

.careers-panel {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  background: linear-gradient(165deg, var(--lavender) 0%, #F7F1FE 100%);
  border: 1px solid var(--lavender-deep);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.8rem 1.9rem 2rem;
}

.benefits {
  list-style: none;
  margin: 1rem 0 1.4rem;
  padding: 0;
}
.benefits li {
  position: relative;
  padding: 0.42rem 0 0.42rem 2rem;
  font-weight: 700;
  color: var(--ink-body);
}
.benefits li + li { border-top: 1px dashed var(--lavender-deep); }
.benefits li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.72rem;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold);
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
}

.btn-block { width: 100%; }

/* ── Motion preferences ────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .hm-active.ignite, .hm-neutral { animation: none; opacity: 1; }
  .pulse-ring { display: none; }
  .hm-arc, .hm-badge { transition: none; }
  .hm-active:hover, .hm-active:focus { transform: none; }
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 960px) {
  .hero { min-height: auto; padding: 3rem 0 5rem; gap: 1.4rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .hero-copy { margin-top: 0; }
  .hero-map-foot { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .hero-state-pills { display: flex; }
  .hero-stats-strip { gap: 1.1rem 1.8rem; padding: 1.1rem 1.3rem; }
  .stat-value { font-size: 2.2rem; }
  .stat-note { margin-left: 0; flex-basis: 100%; }
  .story-grid { grid-template-columns: 1fr; }
  .careers-wrap { grid-template-columns: 1fr; }
  .careers-panel { position: static; }
  .babybells-callout { padding: 1.8rem 1.5rem; }
}

@media (max-width: 640px) {
  .hm-badges, .hm-arcs { display: none; }
}
