
/* ==================================================
   ANIMASI SELURUH BERANDA RAFATHAR ORIGINAL
   File: assets/css/hero-animation.css
   ================================================== */

/* Animasi dasar */
@keyframes roFadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes roFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes roSoftZoom {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes roFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* ==================================================
   HERO / BANNER UTAMA
   ================================================== */

.hero .hero-copy > * {
    animation: roFadeUp 0.75s ease both;
}

.hero .hero-copy > *:nth-child(1) {
    animation-delay: 0.08s;
}

.hero .hero-copy > *:nth-child(2) {
    animation-delay: 0.18s;
}

.hero .hero-copy > *:nth-child(3) {
    animation-delay: 0.28s;
}

.hero .hero-copy > *:nth-child(4) {
    animation-delay: 0.38s;
}

.hero .hero-copy > *:nth-child(5) {
    animation-delay: 0.48s;
}

.hero .hero-btn,
.hero .hero-btn-primary,
.hero .hero-btn-whatsapp {
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        filter 0.3s ease;
}

.hero .hero-btn:hover,
.hero .hero-btn-primary:hover,
.hero .hero-btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(65, 45, 25, 0.14);
    filter: brightness(1.04);
}

.hero .hero-point {
    transition:
        transform 0.3s ease,
        background-color 0.3s ease;
}

.hero .hero-point:hover {
    transform: translateY(-4px);
}

/* ==================================================
   HEADER DAN NAVIGASI
   ================================================== */

.site-header,
header.site-header,
.main-nav a,
.brand,
.header-wa,
.menu-toggle {
    transition:
        color 0.3s ease,
        background-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;
}

.main-nav a:hover {
    transform: translateY(-2px);
}

.header-wa:hover {
    transform: translateY(-2px);
}

/* ==================================================
   JUDUL DAN HEADER SETIAP SECTION
   ================================================== */

.categories .category-header,
.products .products-heading,
.needs .needs-heading,
.section .section-heading {
    animation: roFadeUp 0.7s ease both;
}

/* ==================================================
   KATEGORI KAIN
   ================================================== */

.category-card,
.category-item,
.category-grid > *,
.categories .category-grid > * {
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

.category-card:hover,
.category-item:hover,
.category-grid > *:hover,
.categories .category-grid > *:hover {
    transform: translateY(-7px);
    box-shadow: 0 16px 35px rgba(54, 39, 22, 0.12);
}

.category-card img,
.category-item img,
.category-grid img {
    transition: transform 0.5s ease;
}

.category-card:hover img,
.category-item:hover img,
.category-grid > *:hover img {
    transform: scale(1.045);
}

/* ==================================================
   KARTU KEBUTUHAN PELANGGAN
   ================================================== */

.needs-grid > *,
.need-card {
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.needs-grid > *:hover,
.need-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 16px 32px rgba(54, 39, 22, 0.11);
}

.need-card-link {
    transition:
        gap 0.3s ease,
        color 0.3s ease;
}

.need-card:hover .need-card-link {
    color: #a87532;
}

/* ==================================================
   PRODUK PILIHAN
   ================================================== */

.product-card {
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.product-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 18px 36px rgba(54, 39, 22, 0.12);
}

.product-image {
    overflow: hidden;
}

.product-image img {
    transition: transform 0.55s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.055);
}

.product-button,
.products-all {
    transition:
        color 0.3s ease,
        background-color 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.product-button:hover,
.products-all:hover {
    transform: translateY(-2px);
}

/* ==================================================
   CTA / AJAKAN BELANJA
   ================================================== */

.cta-content {
    animation: roFadeUp 0.8s ease both;
}

.cta-button {
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(54, 39, 22, 0.15);
}

.cta-wa {
    transition: transform 0.3s ease;
}

.cta-button:hover .cta-wa {
    transform: scale(1.08);
}

/* ==================================================
   TOMBOL SOSIAL MENGAMBANG
   ================================================== */

.floating-social-btn {
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.floating-social-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

/* ==================================================
   ANIMASI SAAT SECTION MASUK KE LAYAR
   Aktif melalui JavaScript IntersectionObserver
   ================================================== */

.ro-reveal {
    opacity: 0;
    transform: translateY(25px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.ro-reveal.ro-visible {
    opacity: 1;
    transform: translateY(0);
}

.ro-reveal.ro-delay-1 {
    transition-delay: 0.1s;
}

.ro-reveal.ro-delay-2 {
    transition-delay: 0.2s;
}

.ro-reveal.ro-delay-3 {
    transition-delay: 0.3s;
}

/* ==================================================
   AKSESIBILITAS: KURANGI GERAKAN
   ================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .ro-reveal {
        opacity: 1;
        transform: none;
    }
}
