/* Transisi tambahan khusus tampilan. Progres & back-to-top dibuat dengan React.js. */
.react-progress {
  position: fixed;
  z-index: 1005;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  pointer-events: none;
  background: linear-gradient(90deg, #e5c78d, #f5f1e8 55%, #b8d3b3);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 90ms linear;
}
.react-back-top {
  position: fixed;
  right: max(22px, env(safe-area-inset-right, 0px));
  bottom: max(22px, env(safe-area-inset-bottom, 0px));
  z-index: 990;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255,255,255,.19);
  border-radius: 17px;
  background: #294936;
  box-shadow: 0 16px 32px rgba(18,45,31,.26);
  color: #fff;
  font: 800 1.6rem/1 system-ui, sans-serif;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 14px, 0) scale(.88);
  transition: opacity 300ms ease, visibility 300ms ease, transform 350ms cubic-bezier(.2,.8,.2,1), background 250ms;
}
.react-back-top.is-shown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0,0,0) scale(1);
}
.react-back-top:hover { background: #1d3828; transform: translateY(-5px) scale(1); }
.react-back-top:active { transform: scale(.94); }
.react-back-top:focus-visible { outline-color: #e5c78d; }

/* Elemen baru disembunyikan hanya setelah React siap mengobservasinya. */
.react-reveal {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 700ms cubic-bezier(.2,.75,.25,1),
              transform 720ms cubic-bezier(.2,.75,.25,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.react-reveal.is-visible { opacity: 1; transform: translate3d(0,0,0); will-change: auto; }

/* Hero masuk bertahap, tetapi ukuran dan tata letak tidak berubah. */
@keyframes baduyHeroEnter {
  from { opacity: 0; transform: translate3d(0, 22px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes baduyDotPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(245,241,232,.13); }
  50% { box-shadow: 0 0 0 9px rgba(245,241,232,0); }
}
.react-hero-ready .hero-label { animation: baduyHeroEnter 750ms 0ms both; }
.react-hero-ready .hero h1 { animation: baduyHeroEnter 820ms 130ms both; }
.react-hero-ready .hero-description { animation: baduyHeroEnter 820ms 260ms both; }
.react-hero-ready .hero-actions { animation: baduyHeroEnter 820ms 390ms both; }
.react-hero-ready .hero-caption { animation: baduyHeroEnter 820ms 500ms both; }
.react-hero-ready .live-dot { animation: baduyDotPulse 2.6s ease-in-out infinite; }

/* Interaksi mikro: lift, zoom foto, indikator link. */
.card, .news-card, .guide article, .shortcut {
  transition: box-shadow 350ms ease, border-color 350ms ease,
              background-color 350ms ease, transform 350ms cubic-bezier(.2,.75,.2,1);
}
.card.is-visible:hover, .news-card.is-visible:hover,
.guide article.is-visible:hover {
  transform: translate3d(0,-6px,0);
  box-shadow: 0 20px 44px rgba(27,53,37,.13);
  border-color: #d7cfbc;
}
.shortcut.is-visible:hover { transform: translateY(-3px); }
.card-img, .news-image { transition: transform 650ms cubic-bezier(.2,.75,.2,1); }
.card:hover .card-img, .news-card:hover .news-image { transform: scale(1.045); }
.hero-actions .btn, .card .btn, .map-bar .btn, .text-link {
  transition: background 250ms ease, box-shadow 250ms ease, transform 250ms ease;
}
.hero-actions .btn:hover, .card .btn:hover, .map-bar .btn:hover { transform: translateY(-3px); }
.hero-actions .btn:active, .card .btn:active, .map-bar .btn:active { transform: translateY(0) scale(.985); }
.shortcut-icon { transition: transform 350ms cubic-bezier(.2,.8,.2,1), background 350ms ease; }
.shortcut:hover .shortcut-icon { transform: rotate(-8deg) scale(1.07); background: #fff; }

@media (max-width: 640px) {
  .react-back-top { width: 46px; height: 46px; border-radius: 14px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
  .react-reveal { transform: translate3d(0, 18px, 0); transition-duration: 560ms; }
}
@media (prefers-reduced-motion: reduce) {
  .react-progress, .react-back-top, .react-reveal, .card-img, .news-image, .shortcut-icon {
    transition: none !important;
  }
  .react-reveal { opacity: 1 !important; transform: none !important; }
  .react-hero-ready .hero-label, .react-hero-ready .hero h1,
  .react-hero-ready .hero-description, .react-hero-ready .hero-actions,
  .react-hero-ready .hero-caption, .react-hero-ready .live-dot { animation: none !important; }
}
