/* Baunti map hero (v6). Loaded after the app CSS and baunti-glass.css. */

/* ------------------------------------------------------------- layout */
.bt-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
}
.bt-hero__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 78% 42%, rgb(42 64 112 / 0.55), transparent 70%),
    radial-gradient(28rem 22rem at 70% 80%, rgb(255 107 91 / 0.10), transparent 70%),
    linear-gradient(180deg, rgb(12 21 41 / 0.0), rgb(12 21 41 / 0.35));
}
.bt-hero__inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: max(100svh, 760px);
  padding: calc(72px + clamp(2rem, 5vw, 3.5rem)) 1.25rem clamp(3rem, 6vw, 4.5rem);
  display: grid;
  gap: clamp(2.5rem, 5vw, 3rem);
  align-items: center;
}
@media (min-width: 640px) { .bt-hero__inner { padding-left: 2rem; padding-right: 2rem; } }
@media (min-width: 1024px) {
  .bt-hero__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem; padding-top: calc(72px + 2rem); }
}

/* --------------------------------------------------------------- copy */
.bt-hero__title {
  max-width: 13ch;
  font-size: clamp(2.6rem, 1.5rem + 3.3vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.bt-hero__sub {
  margin-top: 1.6rem;
  max-width: 34rem;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}
.bt-hero__ctas { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.bt-hero__legend {
  margin-top: 2.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.875rem;
  color: var(--ink-2);
}
.bt-hero__legend li { display: inline-flex; align-items: center; gap: 0.5rem; }
.bt-hero__legend img { width: 28px; height: 28px; filter: drop-shadow(0 4px 6px rgb(0 0 0 / 0.35)); }

/* ---------------------------------------------------------------- map */
.bt-hero__stage { position: relative; min-width: 0; }
.bt-map {
  position: relative;
  margin: 0;
  width: 100%;
  min-height: 420px;
  touch-action: pan-y;
}
.bt-map__canvas { position: absolute; inset: 0; display: block; }
.bt-map__cards { position: absolute; inset: 0; pointer-events: none; }

/* activity cards: anchored above (or below) their city */
.bt-ev {
  --dx: 0px;
  position: absolute;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.625rem;
  width: max-content;
  max-width: min(19rem, 70vw);
  padding: 0.5rem 0.875rem 0.5rem 0.5rem;
  border-radius: 14px;
  background: rgb(27 42 75 / 0.78);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgb(244 237 224 / 0.12), 0 0 0 1px rgb(244 237 224 / 0.1), 0 18px 36px -16px rgb(0 0 0 / 0.65);
  transform: translate(calc(-50% + var(--dx)), calc(-100% - 22px)) translateY(8px) scale(0.96);
  transform-origin: 50% 100%;
  opacity: 0;
  filter: blur(6px);
  clip-path: inset(30% 20% 30% 20% round 14px);
  transition: transform 560ms cubic-bezier(0.16, 1, 0.3, 1), opacity 360ms ease, filter 460ms cubic-bezier(0.16, 1, 0.3, 1), clip-path 560ms cubic-bezier(0.16, 1, 0.3, 1);
}
.bt-ev::after { /* stem to the pin */
  content: "";
  position: absolute;
  left: calc(50% - var(--dx));
  top: 100%;
  width: 1px;
  height: 16px;
  background: linear-gradient(rgb(244 237 224 / 0.45), rgb(244 237 224 / 0));
}
.bt-ev.is-below { transform: translate(calc(-50% + var(--dx)), 22px) translateY(-8px) scale(0.96); transform-origin: 50% 0; }
.bt-ev.is-below::after { top: auto; bottom: 100%; background: linear-gradient(rgb(244 237 224 / 0), rgb(244 237 224 / 0.45)); }
.bt-ev.is-in { opacity: 1; filter: none; clip-path: inset(0 0 0 0 round 14px); transform: translate(calc(-50% + var(--dx)), calc(-100% - 22px)); }
.bt-ev.is-below.is-in { transform: translate(calc(-50% + var(--dx)), 22px); }
.bt-ev.is-out { opacity: 0; filter: blur(4px); transition-duration: 420ms; transition-timing-function: cubic-bezier(0.4, 0, 1, 1); }
.bt-ev img { width: 40px; height: 40px; filter: drop-shadow(0 5px 6px rgb(0 0 0 / 0.4)); }
.bt-ev__body { display: grid; min-width: 0; }
.bt-ev__title { font-size: 0.8125rem; font-weight: 600; line-height: 1.25; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-ev__meta { margin-top: 1px; font-size: 0.75rem; line-height: 1.3; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-ev__amt { font-size: 0.875rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); padding-left: 0.25rem; }
.bt-ev--payment .bt-ev__amt { color: #ffb4a9; }

/* the client's account: where every payment lands */
.bt-account {
  position: absolute;
  right: 0;
  bottom: 16%;
  display: grid;
  gap: 0.15rem;
  padding: 0.875rem 1.125rem 0.9rem;
  border-radius: 16px;
  background: rgb(244 237 224 / 0.96);
  color: #14213d;
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.6) inset, 0 24px 48px -22px rgb(0 0 0 / 0.7);
  transition: box-shadow 400ms ease;
}
.bt-account__label { font-size: 0.75rem; font-weight: 600; color: #3e4961; }
.bt-account__total { font-size: clamp(1.35rem, 1rem + 1vw, 1.75rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bt-account__counts { font-size: 0.75rem; color: #3e4961; font-variant-numeric: tabular-nums; }
.bt-account.is-hit { animation: bt-acct 900ms cubic-bezier(0.16, 1, 0.3, 1); }
.bt-account.is-hit .bt-account__total { animation: bt-acct-num 700ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes bt-acct {
  0% { box-shadow: 0 1px 0 rgb(255 255 255 / 0.6) inset, 0 0 0 0 rgb(255 140 90 / 0.55), 0 24px 48px -22px rgb(0 0 0 / 0.7); }
  100% { box-shadow: 0 1px 0 rgb(255 255 255 / 0.6) inset, 0 0 0 12px rgb(255 140 90 / 0), 0 24px 48px -22px rgb(0 0 0 / 0.7); }
}
@keyframes bt-acct-num { 0% { color: #c2412f; transform: translateY(2px); } 100% { color: #14213d; transform: none; } }

/* Baunti's base: label sits to the left of the Guatemala marker, over the Pacific */
.bt-base { position: absolute; width: 0; height: 0; pointer-events: none; }
.bt-base span {
  position: absolute;
  left: 0;
  top: 22px;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #14213d;
  background: #ff8a7d;
  box-shadow: 0 8px 18px -10px rgb(0 0 0 / 0.7);
}
html.bt-hero-ready .bt-base { animation: bt-hero-in 900ms 700ms cubic-bezier(0.16, 1, 0.3, 1) both; }

/* mascot, standing in the Pacific and keeping an eye on things */
.bt-mascot {
  position: absolute;
  left: calc(var(--map-x, 0px) - 2%);
  bottom: -2%;
  width: min(24%, calc(var(--map-w, 300px) * 0.4));
  aspect-ratio: 440 / 480;
  pointer-events: none;
}
.bt-mascot::before { /* contact shadow */
  content: "";
  position: absolute;
  left: 22%; right: 18%; bottom: 9%;
  height: 9%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / 0.45), transparent);
  filter: blur(4px);
}
.bt-mascot img, .bt-mascot canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.bt-mascot canvas { opacity: 0; transition: opacity 600ms ease; }
.bt-mascot.is-3d canvas { opacity: 1; }
.bt-mascot.is-3d img { opacity: 0; transition: opacity 600ms ease; }

.bt-map__foot { margin-top: 0.75rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.bt-map__note { font-size: 0.75rem; color: var(--ink-3); }
.bt-map__toggle { order: -1; flex-shrink: 0; }
.bt-map__toggle {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0 0.875rem;
  border-radius: 999px;
  font-size: 0.8125rem; font-weight: 500; color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: color 150ms ease, box-shadow 150ms ease;
}
.bt-map__toggle svg { fill: currentColor; }
.bt-map__toggle .i-play { display: none; }
.bt-hero.is-paused .bt-map__toggle .i-play { display: inline; }
.bt-hero.is-paused .bt-map__toggle .i-pause { display: none; }
@media (hover: hover) and (pointer: fine) { .bt-map__toggle:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-2); } }
.bt-map__toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* --------------------------------------------------------- entrance */
/* one authored moment: the map powers up from Guatemala City (canvas), while
   the copy settles in once */
html.bt-hero-ready .bt-hero__copy > * { animation: bt-hero-in 900ms cubic-bezier(0.16, 1, 0.3, 1) both; }
html.bt-hero-ready .bt-hero__copy > :nth-child(2) { animation-delay: 90ms; }
html.bt-hero-ready .bt-hero__copy > :nth-child(3) { animation-delay: 170ms; }
html.bt-hero-ready .bt-hero__copy > :nth-child(4) { animation-delay: 260ms; }
html.bt-hero-ready .bt-account { animation: bt-hero-in 900ms 500ms cubic-bezier(0.16, 1, 0.3, 1) both; }
html.bt-hero-ready .bt-mascot { animation: bt-mascot-in 1100ms 300ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes bt-hero-in { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes bt-mascot-in { from { opacity: 0; transform: translateY(30px) scale(0.92); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------- small screens */
@media (max-width: 1023px) {
  .bt-hero__inner { min-height: 0; }
  .bt-hero__stage { max-width: 44rem; width: 100%; margin: 0 auto; }
}
@media (max-width: 639px) {
  .bt-hero__sub { font-size: 1.0625rem; }
  .bt-hero__legend { margin-top: 2rem; display: grid; grid-template-columns: repeat(2, max-content); gap: 0.75rem 1.75rem; }
  .bt-hero__stage { margin: 0 -1rem; width: auto; }
  .bt-map__foot { padding: 0 1rem; }
  .bt-account { padding: 0.6rem 0.75rem; border-radius: 12px; bottom: 4%; right: 0; }
  .bt-account__label, .bt-account__counts { font-size: 0.6875rem; }
  .bt-account__total { font-size: 1.125rem; }
  .bt-ev { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 0.45rem; padding: 0.375rem 0.625rem 0.375rem 0.375rem; border-radius: 12px; max-width: 17.5rem; }
  .bt-ev img { width: 30px; height: 30px; }
  .bt-ev__title { font-size: 0.75rem; }
  .bt-ev__meta { font-size: 0.6875rem; }
  .bt-ev__amt { font-size: 0.75rem; }
  .bt-mascot { width: 22%; left: 0; bottom: -2%; }
  .bt-account__counts { display: none; }
  .bt-account__label { max-width: 9rem; }
  .bt-map__foot { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html.bt-hero-ready .bt-hero__copy > *, html.bt-hero-ready .bt-account, html.bt-hero-ready .bt-mascot { animation: none; }
  .bt-ev { transition: opacity 200ms ease; filter: none; clip-path: none; }
  .bt-account.is-hit, .bt-account.is-hit .bt-account__total { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .bt-ev { background: #1b2a4b; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ------------------------------------------- the original hero, moved */
#top.bt-moved > .mx-auto {
  min-height: 0;
  padding-top: clamp(5rem, 10vw, 9rem);
  padding-bottom: clamp(5rem, 10vw, 8rem);
}
#top.bt-moved h1 { font-size: clamp(2.5rem, 1.5rem + 3.4vw, 4.5rem); }

/* ------------------------------------------------- 3D industry icons */
.bt-3d-holder { width: 3.5rem !important; height: 3.5rem !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.bt-3d-holder > svg { display: none; }
.bt-3d-holder .bt-3d { width: 3.5rem; height: 3.5rem; filter: drop-shadow(0 8px 10px rgb(20 33 61 / 0.22)); transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1); }
@media (hover: hover) and (pointer: fine) { #sectores li:hover .bt-3d { transform: translateY(-3px) rotate(-4deg) scale(1.06); } }
/* on cream, the paper clay needs a seat */
[data-theme="dark"] .bt-3d--light, :root:not([data-theme="dark"]) .bt-3d--dark { display: none; }
[data-theme="dark"] .bt-3d-holder .bt-3d { filter: drop-shadow(0 8px 10px rgb(0 0 0 / 0.4)); }

/* ------------------------------------------- pupils that follow you */
svg circle[r="2"][cy="40"] { transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1); }
@media (prefers-reduced-motion: reduce) { svg circle[r="2"][cy="40"] { transition-duration: 0ms; } }

/* ------------------------------------------ heat on every control */
.bt-heatlayer {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  overflow: hidden;
  animation: bt-heat-ring 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.bt-heatlayer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle var(--hr, 64px) at var(--hx, 50%) var(--hy, 50%),
    rgb(255 226 196 / 0.55) 0%,
    rgb(255 170 110 / 0.38) 24%,
    rgb(255 107 91 / 0.2) 52%,
    rgb(255 107 91 / 0) 100%);
  transform-origin: var(--hx, 50%) var(--hy, 50%);
  mix-blend-mode: multiply;
  animation: bt-heat 950ms linear both;
}
.bt-heatlayer.is-dark::after { mix-blend-mode: screen; background: radial-gradient(circle var(--hr, 64px) at var(--hx, 50%) var(--hy, 50%), rgb(255 236 214 / 0.55) 0%, rgb(255 170 110 / 0.42) 24%, rgb(255 107 91 / 0.24) 52%, rgb(255 107 91 / 0) 100%); }
@media (prefers-reduced-motion: reduce) {
  .bt-heatlayer { animation: none; }
  .bt-heatlayer::after { animation: bt-heat-calm 320ms ease both; transform: none; }
}

/* ---------------------------------------------------- browser surfaces */
::selection { background: rgb(255 107 91 / 0.32); color: inherit; }
.theme-navy ::selection { background: rgb(255 107 91 / 0.45); color: #fff; }
