/* ============================================================
   OX TAXIS — shared scroll animations (reveal, count-up, hero zoom)
   Loaded on all 7 pages. Progressive enhancement: hidden states only
   apply once JS confirms it can run the reveal (html.js), so content
   stays visible if JS fails to load.
   ============================================================ */

html.js section h2 {
  opacity: 0;
  transform: translateY(28px);
}

html.js .grid[class*="gap-gutter"] > * {
  opacity: 0;
  transform: translateY(28px);
}

section h2,
.grid[class*="gap-gutter"] > * {
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.revealed {
  opacity: 1 !important;
  transform: none !important;
}

/* Hero background photo — slow continuous zoom */
header .absolute.inset-0.z-0 > img {
  animation: kenburns 18s ease-out forwards;
  transform-origin: center center;
  will-change: transform;
}

@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.14); }
}

@media (prefers-reduced-motion: reduce) {
  html.js section h2,
  html.js .grid[class*="gap-gutter"] > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
  header .absolute.inset-0.z-0 > img {
    animation: none;
  }
}

/* Back-to-top button */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: #008500;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
}
.back-to-top:hover {
  background: #00a300;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity 0.2s linear;
  }
}
