/* ============================================================
   Clipper Nusantara — scroll reveal (fade-in-up)
   ------------------------------------------------------------
   Lapisan aditif. Markup body referensi TIDAK diubah; elemen
   dipilih lewat selektor struktural pada section landing.

   Kenapa `animation`, bukan `transition`?
   1. Animasi CSS menang atas deklarasi author biasa, sehingga
      state awal (opacity:0) tidak perlu di-override !important.
   2. Tidak menimpa `transition-*` milik Tailwind pada kartu,
      jadi hover:border / hover:scale tetap hidup.

   Tailwind v4 memakai properti `translate:`/`scale:` yang
   terpisah dari `transform:`, sehingga translateY() di sini
   tidak merusak -translate-x-1/2 maupun hover:scale-105.

   Grid FAQ (.grid-rows-[0fr]) dan grid footer sengaja
   DIKECUALIKAN: keduanya punya mekanika sendiri.
   ============================================================ */

@keyframes cn-reveal {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- sasaran ---------- */
/* Grid kartu di dalam <section> — hanya yang pakai gap-6, dan
   bukan grid accordion (grid-rows-[0fr]) maupun grid footer (max-w-7xl). */
html.reveal-on section .grid.gap-6:not([class*="grid-rows-"]) > *,

/* Blok judul section */
html.reveal-on section > div > .mb-12.text-center,
html.reveal-on section > div > .mb-16.text-center,

/* Baris chip platform di hero-lower */
html.reveal-on section .mb-12.flex:not(.text-center) > *,

/* Daftar accordion FAQ */
html.reveal-on section .space-y-3 > * {
  opacity: 0;
  transform: translateY(22px);
}

/* ---------- tampil ---------- */
html.reveal-on .rv-in {
  animation: cn-reveal 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

/* ---------- stagger ---------- */
html.reveal-on .rv-in.rv-s1 { animation-delay: 80ms; }
html.reveal-on .rv-in.rv-s2 { animation-delay: 160ms; }
html.reveal-on .rv-in.rv-s3 { animation-delay: 240ms; }
html.reveal-on .rv-in.rv-s4 { animation-delay: 320ms; }
html.reveal-on .rv-in.rv-s5 { animation-delay: 400ms; }
html.reveal-on .rv-in.rv-s6 { animation-delay: 480ms; }
html.reveal-on .rv-in.rv-s7 { animation-delay: 560ms; }

/* ---------- hormati preferensi pengguna ---------- */
@media (prefers-reduced-motion: reduce) {
  html.reveal-on section .grid.gap-6:not([class*="grid-rows-"]) > *,
  html.reveal-on section > div > .mb-12.text-center,
  html.reveal-on section > div > .mb-16.text-center,
  html.reveal-on section .mb-12.flex:not(.text-center) > *,
  html.reveal-on section .space-y-3 > * {
    opacity: 1;
    transform: none;
  }
  html.reveal-on .rv-in { animation: none; }
}

/* ---------- fallback: gagal apa pun, konten jangan disembunyikan ---------- */
html.reveal-nojs section .grid.gap-6:not([class*="grid-rows-"]) > *,
html.reveal-nojs section > div > .mb-12.text-center,
html.reveal-nojs section > div > .mb-16.text-center,
html.reveal-nojs section .mb-12.flex:not(.text-center) > *,
html.reveal-nojs section .space-y-3 > * {
  opacity: 1 !important;
  transform: none !important;
}
