/* WO-367 + WO-384 — Homepage hero / Campfire experience (homepage-scoped)
   Extends WO-383 .exp-hero; does not fork a second hero system.
   Does not modify assets/branding/duderv-globe.css (WO-366 owned). */

.hp-hero {
  --hp-ink: #f8fafc;
  --hp-muted: #cbd5e1;
  --hp-soft: #94a3b8;
  --hp-gold: #fbbf24;
  --hp-gold-deep: #b45309;
  --hp-cta-ink: #0f172a;
  --hp-overlay-top: rgba(15, 23, 42, 0.72);
  --hp-overlay-bottom: rgba(15, 23, 42, 0.88);
}

/* When paired with .exp-hero, defer layout to experience-hero.css grid */
.exp-hero.hp-hero {
  text-align: left;
  padding: 0;
  background-size: cover;
  background-position: center;
  /* WO-393A: let floating Trudy bridge into the map (eye flow) */
  overflow: visible;
}

.hp-hero__copy {
  text-align: left;
  max-width: 38rem;
}

.hp-hero__visual {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

/* WO-393A — Large floating Trudy (logo-sticker). No rectangular card.
   Integrated into hero plane; eye flows Hero → Trudy → Adventure Map. */
.hp-hero__trudy {
  position: relative;
  margin: 0;
  padding: 0;
  width: min(100%, 28rem);
  background: transparent;
  border: 0;
  box-shadow: none;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.45))
    drop-shadow(0 4px 10px rgba(245, 179, 1, 0.18));
  z-index: 3;
}

.hp-hero__trudy[hidden] {
  display: none !important;
}

.hp-hero__trudy-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(70vh, 28rem);
  object-fit: contain;
  background: transparent;
}

@media (min-width: 900px) {
  .hp-hero__trudy {
    width: min(100%, 30rem);
    margin-bottom: -2.5rem;
    transform: translateY(0.35rem) rotate(-1.5deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hp-hero__trudy {
    animation: hp-trudy-float 5.5s ease-in-out infinite;
  }
  .hp-hero__trudy:hover,
  .hp-hero__trudy:focus-within {
    animation-play-state: paused;
    transform: translateY(-0.35rem) rotate(-0.5deg) scale(1.02);
    transition: transform 0.28s ease;
  }
}

@keyframes hp-trudy-float {
  0%, 100% { transform: translateY(0.35rem) rotate(-1.5deg); }
  50% { transform: translateY(-0.55rem) rotate(-0.75deg); }
}

@media (max-width: 899px) {
  @keyframes hp-trudy-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-0.4rem); }
  }
}

/* Legacy companion card styles retained for recovery; unused on homepage after WO-393A */
.hp-hero__companion {
  position: relative;
  width: min(100%, 22rem);
  padding: 0;
  overflow: hidden;
  background: rgba(6, 26, 51, 0.55);
}

.hp-hero__companion-photo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 22rem;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

.hp-hero__companion-seal {
  position: absolute;
  right: 0.75rem;
  bottom: 3.25rem;
  width: 5.5rem;
  height: 5.5rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(248, 245, 240, 0.95);
  border: 2px solid rgba(245, 179, 1, 0.85);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.hp-hero__companion-seal img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.hp-hero__companion-caption {
  margin: 0;
  padding: 0.65rem 0.85rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.35;
  color: #f8fafc;
  background: linear-gradient(180deg, rgba(6, 26, 51, 0.2), rgba(6, 26, 51, 0.92));
}

@media (prefers-reduced-motion: no-preference) {
  .hp-hero__companion {
    transition: transform 0.28s ease;
  }
  .hp-hero__companion:hover,
  .hp-hero__companion:focus-within {
    transform: scale(1.02);
  }
}

/* WO-384A/B + WO-384C contrast + WO-384E Map Table star presentation
   (Atlas mount behavior / JS / pins / tiles untouched)
   Hierarchy: PAGE → warm lodge stage → headline whisper → darker tabletop →
   frame → dark inset → live Atlas (majority mass) → quiet explore CTA → soft exit.
   Impression Order: eyes (map) → heart (desire) → content (tools/words). */
.hp-map-stage {
  --hp-map-navy: #061a33;
  --hp-map-navy-deep: #041222;
  --hp-map-gold: #f5b301;
  --hp-map-warm-gold: #fbbf24;
  --hp-map-orange: #d97706;
  --hp-map-canvas: #f8f5f0;
  --hp-map-canvas-deep: #ebe3d6;
  --hp-map-parchment: #d4c4a8;
  --hp-map-wood: #6b4f2f;
  --hp-map-wood-mid: #8a6840;
  --hp-map-wood-deep: #3f2c18;
  --hp-map-leather: #8b5a3c;
  --hp-map-leather-deep: #5c3a24;
  --hp-map-ink: #1c1917;
  --hp-map-muted: #57534e;
  position: relative;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  /* Keep #adventure-map headline clear of sticky site nav */
  scroll-margin-top: 5rem;
  /* Extra bottom breath before Featured Adventures (WO-384E soft exit) */
  padding: 2.15rem 0 3.25rem;
  /* Warm neutral transition into darker lodge band — no bright white field */
  background:
    radial-gradient(ellipse 88% 55% at 50% 12%, rgba(217, 119, 6, 0.2), transparent 52%),
    radial-gradient(ellipse 65% 50% at 78% 92%, rgba(245, 179, 1, 0.12), transparent 50%),
    linear-gradient(
      180deg,
      #061a33 0%,
      var(--hp-map-navy-deep) 18%,
      #0a243f 36%,
      #2a1c12 68%,
      #1a120c 100%
    );
  box-shadow:
    inset 0 22px 44px rgba(0, 0, 0, 0.36),
    inset 0 -14px 30px rgba(0, 0, 0, 0.22);
}

.hp-map-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 47px,
      rgba(255, 236, 200, 0.03) 47px,
      rgba(255, 236, 200, 0.03) 48px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 3px,
      rgba(0, 0, 0, 0.05) 3px,
      rgba(0, 0, 0, 0.05) 4px
    );
}

/* Soft exit coda — lodge darkness holds a beat before the next section */
.hp-map-stage::after {
  content: "";
  display: block;
  position: relative;
  z-index: 1;
  height: 1.25rem;
  margin-top: 0.35rem;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(26, 18, 12, 0) 0%,
    rgba(26, 18, 12, 0.55) 100%
  );
}

.hp-map-table {
  position: relative;
  z-index: 1;
  /* WO-384E: wider table → map claims more of the section band */
  width: min(100% - 0.5rem, 86rem);
  margin: 0 auto;
  padding: 0.45rem 0.4rem 0.5rem;
  border-radius: 0.45rem;
  /* Darker lodge tabletop — map rests on furniture, not a white card */
  background:
    linear-gradient(180deg, rgba(245, 179, 1, 0.07), transparent 38%),
    linear-gradient(90deg, rgba(4, 18, 34, 0.22), transparent 18%, transparent 82%, rgba(4, 18, 34, 0.22)),
    repeating-linear-gradient(
      92deg,
      #4a3420 0px,
      #5c4128 12px,
      #3f2c18 26px,
      #2e2014 38px,
      #4a3420 52px
    );
  border: 1px solid rgba(4, 18, 34, 0.55);
  box-shadow:
    0 32px 60px rgba(0, 0, 0, 0.5),
    0 10px 20px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(245, 179, 1, 0.14),
    inset 0 -3px 8px rgba(0, 0, 0, 0.4);
}

.hp-map-table::before {
  content: "";
  position: absolute;
  inset: 0.3rem;
  border-radius: 0.3rem;
  pointer-events: none;
  border: 1px solid rgba(245, 179, 1, 0.1);
  box-shadow: inset 0 0 32px rgba(0, 0, 0, 0.28);
}

.hp-map-frame {
  --hp-frame-wood: var(--hp-map-wood);
  --hp-frame-wood-deep: var(--hp-map-wood-deep);
  --hp-frame-mat: #2a1c12;
  --hp-frame-ink: var(--hp-map-canvas);
  --hp-frame-muted: var(--hp-map-parchment);
  position: relative;
  background:
    linear-gradient(
      155deg,
      var(--hp-map-leather-deep) 0%,
      var(--hp-map-wood) 32%,
      var(--hp-frame-wood-deep) 72%,
      #24180f 100%
    );
  /* WO-384E: thinner furniture so the canvas is the subject */
  padding: 0.32rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(4, 18, 34, 0.5);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.38),
    0 3px 8px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(245, 179, 1, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    inset 1px 0 0 rgba(245, 179, 1, 0.08),
    inset -1px 0 0 rgba(0, 0, 0, 0.2);
}

.hp-map-frame__mat {
  position: relative;
  /* Warm deep gallery mat — parchment undertone, not bright white */
  background:
    radial-gradient(ellipse 70% 45% at 25% 0%, rgba(245, 179, 1, 0.1), transparent 55%),
    linear-gradient(
      180deg,
      #3a2a1a 0%,
      var(--hp-frame-mat) 55%,
      #1a120c 100%
    );
  /* Map-only framed object — no intro competing inside the mat */
  padding: 0.35rem 0.4rem 0.4rem;
  border: 1px solid rgba(4, 18, 34, 0.45);
  box-shadow:
    inset 0 0 0 1px rgba(212, 196, 168, 0.1),
    inset 0 12px 28px rgba(0, 0, 0, 0.28);
}

/* Headline above the table — soft invitation, never a second hero */
.hp-map-intro {
  position: relative;
  z-index: 1;
  width: min(100% - 1rem, 42rem);
  margin: 0 auto 0.85rem;
  padding: 0 0.35rem;
  text-align: center;
}

.hp-map-intro__title {
  margin: 0 0 0.22rem;
  font-size: clamp(1.12rem, 2vw, 1.42rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  color: rgba(248, 245, 240, 0.9);
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.hp-map-intro__voice {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(212, 196, 168, 0.82);
  line-height: 1.45;
}

.hp-map-intro__you {
  color: var(--hp-map-warm-gold);
  font-weight: 800;
}

/* Quiet desire CTA below the framed map — Wonder after eyes lock */
.hp-map-cta {
  position: relative;
  z-index: 1;
  width: min(100% - 1rem, 36rem);
  margin: 0.95rem auto 0;
  padding: 0 0.5rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(245, 179, 1, 0.88);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  line-height: 1.4;
}

.hp-map-frame__mount {
  border-radius: 0.2rem;
  border: 1px solid rgba(4, 18, 34, 0.7);
  /* Dark inset / mat immediately around live Atlas — no bright bezel bleed */
  padding: 0.18rem;
  background:
    linear-gradient(180deg, #0a1a2e 0%, var(--hp-map-navy-deep) 100%);
  /* WO-384E: canvas dominates the section — terrain is the gravity well */
  min-height: min(68vh, 42rem);
  box-shadow:
    inset 0 0 0 1px rgba(245, 179, 1, 0.1),
    inset 0 4px 14px rgba(0, 0, 0, 0.55),
    inset 0 -2px 8px rgba(0, 0, 0, 0.35);
}

/* Presentation seam only — do not alter Atlas chrome readability or tiles */
.hp-map-frame__mount .atlas-map-root,
.hp-map-frame__mount [data-atlas-map],
.hp-map-frame__mount .atlas-map-canvas {
  border-radius: 0.12rem;
}

.hp-map-frame__mount .atlas-map-root {
  border-color: rgba(4, 18, 34, 0.35);
}

/* Grow Atlas shell with the mount (presentation height only) */
.hp-map-frame__mount[data-atlas-mount],
.hp-map-frame__mount#atlas-map,
.hp-map-frame__mount .atlas-map-root {
  min-height: min(68vh, 42rem);
}

.hp-map-frame__mount .atlas-map-canvas,
.hp-map-frame__mount .leaflet-container {
  min-height: min(58vh, 36rem);
}

/* Quiet Atlas chrome — tools after wonder (functionality untouched) */
.hp-map-frame__mount .atlas-map-status {
  font-size: 0.72rem;
  opacity: 0.72;
  letter-spacing: 0.01em;
  background: rgba(248, 250, 252, 0.92);
}

.hp-map-frame__mount .atlas-layer-filters {
  font-size: 0.78rem;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
  opacity: 0.9;
}

.hp-map-frame__mount:focus-within .atlas-map-status,
.hp-map-frame__mount:focus-within .atlas-layer-filters {
  opacity: 1;
}

/* Featured sidebar slightly narrower — more canvas % without removing FA sync */
@media (min-width: 900px) {
  .hp-map-frame__mount.atlas-map-root,
  .hp-map-frame__mount .atlas-map-root {
    grid-template-columns: minmax(220px, 280px) 1fr;
  }
}

/* Soft exit: slight top breath on Featured without rewriting FA section styles */
.hp-map-stage + .fa-section {
  padding-top: 2.5rem;
}

@media (min-width: 768px) {
  .hp-map-stage {
    padding: 2.65rem 0 3.5rem;
  }
  .hp-map-table {
    width: min(100% - 1rem, 86rem);
    padding: 0.55rem 0.5rem 0.6rem;
  }
  .hp-map-frame {
    padding: 0.36rem;
  }
  .hp-map-frame__mat {
    padding: 0.4rem 0.45rem 0.45rem;
  }
  .hp-map-frame__mount {
    padding: 0.2rem;
  }
  .hp-map-intro {
    margin: 0 auto 1rem;
  }
}

/* Mobile: full-width table, height gain over side padding, no overflow */
@media (max-width: 767px) {
  .hp-map-stage {
    padding: 1.35rem 0 2.35rem;
  }
  .hp-map-table {
    width: 100%;
    border-radius: 0;
    padding: 0.4rem 0.35rem 0.45rem;
  }
  .hp-map-table::before {
    display: none;
  }
  .hp-map-frame {
    padding: 0.28rem;
    border-radius: 0.25rem;
    box-shadow:
      0 10px 20px rgba(0, 0, 0, 0.32),
      inset 0 1px 0 rgba(245, 179, 1, 0.16),
      inset 0 -1px 0 rgba(0, 0, 0, 0.35);
  }
  .hp-map-frame__mat {
    padding: 0.3rem 0.32rem 0.35rem;
  }
  .hp-map-frame__mount {
    padding: 0.16rem;
    min-height: min(62vh, 28rem);
  }
  .hp-map-frame__mount[data-atlas-mount],
  .hp-map-frame__mount#atlas-map,
  .hp-map-frame__mount .atlas-map-root {
    min-height: min(62vh, 28rem);
  }
  .hp-map-intro {
    width: min(100% - 1rem, 100%);
    margin: 0 auto 0.65rem;
    text-align: left;
  }
  .hp-map-cta {
    margin-top: 0.75rem;
    font-size: 0.85rem;
  }
}

/* Legacy logo-frame alias */
.hp-hero__logo-frame {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  max-width: 24rem;
}

.hp-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  color: var(--hp-gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 900;
  font-size: 0.75rem;
  line-height: 1.3;
}

.hp-hero__globe {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-block;
  vertical-align: middle;
}

.hp-hero__globe img {
  width: 100%;
  height: 100%;
  display: block;
}

.hp-hero__title {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
}

.hp-hero__title-em {
  color: var(--hp-gold);
}

.hp-hero__pillars {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.hp-hero__pillars li {
  color: #e2e8f0;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
}

.hp-hero__body {
  margin: 0 0 1.75rem;
  color: var(--hp-muted);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.65;
  max-width: 34rem;
}

.hp-hero__body-em {
  color: #fff;
  font-weight: 800;
}

.hp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.hp-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: #f59e0b;
  color: var(--hp-cta-ink);
  font-weight: 800;
  font-size: 1rem;
  padding: 0.9rem 1.5rem;
  border-radius: 0.75rem;
  border-bottom: 4px solid var(--hp-gold-deep);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.hp-hero__cta:hover,
.hp-hero__cta:focus-visible {
  background: #fbbf24;
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.hp-hero__cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  padding: 0.9rem 1.5rem;
  border-radius: 0.75rem;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  transition: background-color 0.2s ease;
}

.hp-hero__cta-secondary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.hp-hero__cta-yt {
  background: #dc2626;
  border-bottom: 4px solid #991b1b;
}

.hp-hero__cta-yt:hover,
.hp-hero__cta-yt:focus-visible {
  background: #b91c1c;
}

.hp-hero__cta-crew {
  background: #2563eb;
  border-bottom: 4px solid #1e3a8a;
}

.hp-hero__cta-crew:hover,
.hp-hero__cta-crew:focus-visible {
  background: #1d4ed8;
}

@media (min-width: 768px) {
  .hp-hero__eyebrow {
    font-size: 0.875rem;
  }

  .hp-hero__globe {
    width: 1.75rem;
    height: 1.75rem;
  }

  .hp-hero__pillars li {
    font-size: 1.125rem;
  }

  .hp-hero__body {
    font-size: 1.05rem;
  }

  .hp-hero__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 479px) {
  .hp-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hp-hero__cta,
  .hp-hero__cta-secondary {
    width: 100%;
  }
}

/* WO-384 — Videos & stories cards */
.hp-story-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(245, 179, 1, 0.28);
  border-radius: 1rem;
  padding: 1rem;
  min-height: 44px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.hp-story-card:hover,
.hp-story-card:focus-visible {
  border-color: #f5b301;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.hp-story-card:focus-visible {
  outline: 3px solid #f5b301;
  outline-offset: 2px;
}

.hp-story-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0.65rem;
  background: #0f172a;
}

.hp-story-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, #0f172a, #14532d 55%, #d97706);
  color: #f8fafc;
  font-weight: 800;
  font-size: 0.95rem;
  text-align: center;
  padding: 1rem;
}

.site-discover {
  background: #061a33;
  border-color: rgba(245, 179, 1, 0.45);
}

@media (forced-colors: active) {
  .hp-hero__cta,
  .hp-hero__cta-secondary {
    border: 2px solid CanvasText;
  }

  .hp-hero__globe img {
    forced-color-adjust: auto;
  }
}
