/* ==== Scroll Reveal (transisi minimalis untuk card di Home) ====
   Card dengan class .gc-reveal mulai transparan & sedikit turun,
   lalu fade + slide-up halus begitu masuk viewport (lihat
   public/js/scroll-reveal.js untuk logic IntersectionObserver-nya). */

.gc-reveal {
    opacity: 0;
    transform: translateY(48px) scale(0.96);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.gc-reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Stagger per-card dalam satu grid, biar kesannya card muncul
   satu-satu (bukan bebarengan) tanpa perlu logic tambahan di JS. */
.gc-program-grid .gc-reveal:nth-child(2),
.gc-digital-grid .gc-reveal:nth-child(2),
.gc-berita-grid .gc-reveal:nth-child(2) {
    transition-delay: 0.15s;
}

.gc-program-grid .gc-reveal:nth-child(3),
.gc-digital-grid .gc-reveal:nth-child(3),
.gc-berita-grid .gc-reveal:nth-child(3) {
    transition-delay: 0.3s;
}

/* Hormati pengguna yang mengaktifkan "reduce motion" di OS/browser --
   card langsung tampil tanpa animasi transisi. */
@media (prefers-reduced-motion: reduce) {
    .gc-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==== Smooth scroll global + tombol Back to Top (dibuat lewat JS di
   scroll-reveal.js, muncul begitu user sudah scroll lumayan jauh) ==== */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

.gc-back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 90;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy, #171B2E);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(23, 27, 46, 0.28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease, background .2s ease;
}

.gc-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.gc-back-to-top:hover {
    background: var(--gold, #5B4CE0);
    transform: translateY(-3px);
}

@media (max-width: 640px) {
    .gc-back-to-top {
        right: 16px;
        bottom: 16px;
        width: 42px;
        height: 42px;
    }
}
