/* ---------- Floating corner badges (above back-top) ---------- */
.site-floaters {
  position: fixed;
  inset: auto max(1.15rem, env(safe-area-inset-right, 0px))
    max(6.5rem, calc(env(safe-area-inset-bottom, 0px) + 5.85rem)) auto;
  z-index: 1190;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.site-floater {
  pointer-events: auto;
  display: block;
  width: 128px;
  height: auto;
  margin: 0;
  padding: 0;
  border-radius: 0;
  line-height: 0;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transform: translate3d(0, 0, 0);
  transition: transform 0.28s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1));
  filter: drop-shadow(0 4px 10px rgba(40, 40, 40, 0.18));
}

.site-floater img {
  display: block;
  width: 128px;
  height: auto;
  max-height: 96px;
  object-fit: contain;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .site-floater:hover {
    transform: translate3d(0, -3px, 0) scale(1.06);
  }
}

.site-floater:active {
  transform: translate3d(0, 0, 0) scale(0.96);
  transition-duration: 0.08s;
}

.site-floater:focus {
  outline: none;
}

.site-floater:focus-visible {
  outline: 2px solid rgba(40, 65, 140, 0.55);
  outline-offset: 3px;
}

@media (max-width: 768px), (pointer: coarse) {
  .site-floaters {
    inset: auto max(0.85rem, env(safe-area-inset-right, 0px))
      max(5.65rem, calc(env(safe-area-inset-bottom, 0px) + 5.15rem)) auto;
  }
  .site-floater {
    width: 104px;
  }
  .site-floater img {
    width: 104px;
    max-height: 78px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-floater {
    transition: none;
  }
  .site-floater:hover,
  .site-floater:active {
    transform: none;
  }
}

@media print {
  .site-floaters {
    display: none !important;
  }
}

.back-top {
  position: fixed !important;
  inset: auto max(1.25rem, env(safe-area-inset-right, 0px))
    max(1.75rem, calc(env(safe-area-inset-bottom, 0px) + 0.75rem)) auto !important;
  left: auto !important;
  top: auto !important;
  right: max(1.25rem, env(safe-area-inset-right, 0px)) !important;
  bottom: max(1.75rem, calc(env(safe-area-inset-bottom, 0px) + 0.75rem)) !important;
  z-index: 1200;
  width: 54px;
  height: 54px;
  min-width: 54px;
  min-height: 54px;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: visible;
  background: var(--blue);
  color: #fff;
  border: 1px solid rgba(90, 200, 255, 0.55);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 18px, 0) scale(0.9);
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  appearance: none;
  -webkit-appearance: none;
  box-shadow:
    0 0 0 1px rgba(40, 65, 140, 0.35),
    0 0 18px rgba(40, 65, 140, 0.55),
    0 0 36px rgba(90, 200, 255, 0.28);
  transition:
    opacity 0.35s var(--ease-soft),
    visibility 0.35s var(--ease-soft),
    transform 0.35s var(--ease-out),
    background 0.3s var(--ease-soft),
    border-color 0.3s,
    box-shadow 0.3s;
}

.back-top.is-visible {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  animation: backTopGlow 3.2s ease-in-out infinite;
}

@media (hover: hover) and (pointer: fine) {
  .back-top:hover {
    background: var(--earth);
    border-color: rgba(232, 221, 212, 0.7);
    transform: translate3d(0, -4px, 0) scale(1.05);
    box-shadow:
      0 0 0 1px rgba(165, 120, 101, 0.45),
      0 0 22px rgba(165, 120, 101, 0.65),
      0 0 44px rgba(165, 120, 101, 0.35);
    animation: none;
  }
}

.back-top:active {
  background: var(--earth);
  border-color: rgba(232, 221, 212, 0.7);
  transform: translate3d(0, 0, 0) scale(0.94);
  animation: none;
  transition-duration: 0.08s;
}

.back-top:focus,
.back-top:focus-visible,
.back-top:active {
  outline: none !important;
  border: 1px solid rgba(90, 200, 255, 0.55);
}

.back-top svg {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.45));
}

@keyframes backTopGlow {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(40, 65, 140, 0.4),
      0 0 16px rgba(40, 65, 140, 0.5),
      0 0 32px rgba(90, 200, 255, 0.25);
    border-color: rgba(90, 200, 255, 0.5);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(165, 120, 101, 0.45),
      0 0 20px rgba(165, 120, 101, 0.55),
      0 0 40px rgba(165, 120, 101, 0.3);
    border-color: rgba(232, 200, 180, 0.65);
    background: var(--blue-deep);
  }
}

/* Mobile: lower-right thumb zone; drop glow (box-shadow anim blocks tap). */
@media (max-width: 768px), (pointer: coarse) {
  .back-top {
    right: max(1rem, env(safe-area-inset-right, 0px)) !important;
    bottom: max(1.25rem, calc(env(safe-area-inset-bottom, 0px) + 1rem)) !important;
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    animation: none;
    transition:
      opacity 0.18s ease,
      visibility 0.18s ease,
      transform 0.12s ease,
      background 0.12s ease;
  }
  .back-top.is-visible {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-video,
  .hero-media,
  .marquee-track,
  .reveal,
  .orb,
  .btn-glow::after,
  .scroll-hint span,
  .hero-title .word span,
  .hero-accent,
  .hero-kicker,
  .hero-lead,
  .hero-cta,
  .hero-trust-top,
  .hero-proof-line,
  .hero-media-bar,
  .event-card,
  .research-card,
  .pillar,
  .study-strip__link,
  .study-strip__link::before,
  .study-strip__link::after {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .back-top {
    animation: none !important;
    transition: none !important;
  }
  .back-top.is-visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
  .back-top:not(.is-visible) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  .hero.is-listening .hero-content {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  .hero-mute.is-away,
  .back-top:not(.is-visible) {
    opacity: 0 !important;
    visibility: hidden !important;
  }
  .lead-word {
    position: static;
    opacity: 0;
  }
  .lead-word.is-active {
    opacity: 1;
  }
}
