/* ============================================================
   HERO / PHASE OF LIFE SLIDER
   Versioned in functions.php (wwm-slider-css). Bump that
   number any time you edit this file.
   Font sizes follow the site type scale (see --fs-* tokens in
   Additional CSS): display 44 / body 16 / small 14 / label 12.
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  background: #0a1f12;
}
.hero-slider {
  position: relative;
  min-height: clamp(420px, 50vw, 560px);
  display: grid;
  touch-action: pan-y; /* vertical page scroll still works; horizontal swipes go to the slider */
}
.hero-slide {
  position: relative;
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}
.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}
.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.hero-slide-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(5, 20, 10, 0.82) 0%,
    rgba(5, 20, 10, 0.65) 35%,
    rgba(5, 20, 10, 0.3) 65%,
    rgba(5, 20, 10, 0.15) 100%
  );
}
.hero-slide-content {
  position: relative;
  z-index: 2;
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
  padding: var(--section-pad) 1.5rem;
  color: var(--wwm-white);
}
.hero-eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-sm, 0.875rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wwm-brass-soft);
  margin-bottom: 0.75rem;
}
/* Slide 1 title is an <h1>, slides 2-6 are <h2>. Both use .hero-title
   and must look identical, so color and accent line are pinned here
   in case any global h2 rule tries to restyle them. */
.hero-title {
  font-family: var(--font-display);
  font-size: var(--fs-display, clamp(2rem, 4.5vw, 2.75rem));
  line-height: 1.25;
  font-weight: 700;
  color: inherit;
  max-width: 520px;
  margin: 0 0 1rem;
}
.hero-title::after { content: none; }
.hero-desc {
  font-size: var(--fs-body, 1rem);
  line-height: 1.7;
  max-width: 440px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.5rem;
}
.hero-btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  font-family: var(--font-body);
  font-size: var(--fs-sm, 0.875rem);
  font-weight: 600;
  color: var(--wwm-text);
  background: var(--wwm-white);
  border-radius: 3px;
  transition: background 0.2s, color 0.2s;
}
.hero-btn:hover {
  background: var(--wwm-brass-soft);
  color: var(--wwm-white);
}

/* Wrapper holds both rows (nav pills + prev/pause/next) stacked and centered.
   Absolute positioning lives on the wrapper only, so the two rows just stack
   in normal flow beneath it. */
.hero-controls-wrap {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Slider nav pills */
.hero-nav {
  display: flex;
  gap: 3px;
  background: rgba(0,0,0,0.4);
  padding: 0.3rem 0.4rem;
  border-radius: 3px;
  backdrop-filter: blur(4px);
}
.hero-nav button {
  background: rgba(255,255,255,0.25);
  border: none;
  padding: 0.4rem 0.45rem; /* taller tap target; horizontal stays tight so six labels fit in two rows */
  font-family: var(--font-body);
  font-size: var(--fs-label, 0.75rem);
  font-weight: 600;
  letter-spacing: 0;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.25s, color 0.25s;
  white-space: nowrap;
}
.hero-nav button.active,
.hero-nav button:hover {
  background: var(--wwm-white);
  color: var(--wwm-green);
}

/* Prev / pause / next row, sits directly under the pill row */
.hero-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.4);
  padding: 0.3rem 0.5rem;
  border-radius: 3px;
  backdrop-filter: blur(4px);
}
.hero-arrow,
.hero-pause-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  border: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--fs-label, 0.75rem);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.hero-arrow:hover,
.hero-pause-btn:hover {
  background: rgba(255,255,255,0.45);
}

/* Touch targets: 44px tap area around the smaller visible circles.
   Gaps are sized so neighboring tap areas don't overlap. */
.hero-arrow,
.hero-pause-btn { position: relative; }
.hero-arrow::before,
.hero-pause-btn::before {
  content: '';
  position: absolute;
  inset: -11px; /* 22px circle + 11px each side = 44px */
}

/* Visible focus ring for keyboard users (not shown on mouse clicks) */
.hero-nav button:focus-visible,
.hero-arrow:focus-visible,
.hero-pause-btn:focus-visible {
  outline: 2px solid var(--wwm-brass-soft);
  outline-offset: 2px;
}

/* Progress bar: width is set by slider.js, so it pauses and
   resumes in step with the actual slide timer */
.hero-nav button.active {
  position: relative;
  overflow: hidden;
}
.hero-nav button.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: calc(var(--progress, 0) * 100%);
  background: var(--wwm-green);
}

/* Visitors who turn on "reduce motion" get instant slide changes */
@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-nav button,
  .hero-arrow,
  .hero-pause-btn,
  .hero-btn {
    transition: none;
  }
}

/* Desktop: larger pills and controls */
@media (min-width: 769px) {
  .hero-slider { min-height: clamp(500px, 50vw, 600px); }
  .hero-slide-content { padding-bottom: calc(var(--section-pad) + 7rem); }
  .hero-controls-wrap { bottom: 1.75rem; gap: 14px; }
  .hero-nav { gap: 4px; padding: 0.4rem 0.5rem; }
  .hero-nav button {
    font-size: var(--fs-sm, 0.875rem);
    padding: 0.45rem 1.1rem;
    letter-spacing: 0.03em;
  }
  .hero-controls { gap: 12px; padding: 0.4rem 0.65rem; }
  .hero-arrow,
  .hero-pause-btn {
    width: 32px;
    height: 32px;
    font-size: var(--fs-sm, 0.875rem);
  }
  .hero-arrow::before,
  .hero-pause-btn::before { inset: -6px; } /* 32px circle + 6px each side = 44px */
  .hero-nav button.active::after { height: 3px; }
}

/* Mobile */
@media (max-width: 768px) {
  .hero-slider { min-height: 400px; }
  .hero-controls-wrap {
    position: static;
    transform: none;
    width: 100%;
    padding: 0.75rem 1rem 1rem;
    background: #0a1f12;
  }
  .hero-nav { flex-wrap: wrap; justify-content: center; }
  .hero-controls { gap: 22px; } /* room for the 44px tap areas */
  .hero-slide-bg::after {
    background: linear-gradient(
      to bottom,
      rgba(5, 20, 10, 0.75) 0%,
      rgba(5, 20, 10, 0.5) 50%,
      rgba(5, 20, 10, 0.3) 100%
    );
  }
}