html {
  scroll-behavior: smooth;
}

body {
  -webkit-tap-highlight-color: transparent;
}

/* Offset agar judul seksi tidak tertutup header sticky */
section[id] {
  scroll-margin-top: 5rem;
}

/* Animasi muncul saat halaman di-scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Marquee nama unit usaha */
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 3rem;
  animation: marquee 32s linear infinite;
}

.marquee-wrap:hover .marquee-track {
  animation-play-state: paused;
}

/* Pola grid halus untuk latar hero */
.grid-pattern {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* Aksesibilitas: fokus keyboard yang jelas */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
}

/* Hormati preferensi pengguna yang mengurangi animasi */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .marquee-track,
  .animate-float {
    animation: none !important;
  }
}
