/* ============================================================
   animations.css — Premium Animations
   Seminar Nasional PPs ULM 2026
   ============================================================ */

/* -- Scroll Reveal Base ------------------------------------ */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
    will-change: opacity, transform;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
    will-change: opacity, transform;
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
    will-change: opacity, transform;
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-scale {
    opacity: 0;
    transform: scale(.92);
    transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1);
    will-change: opacity, transform;
}
.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays for children */
.stagger > *:nth-child(1) { transition-delay: 0s; }
.stagger > *:nth-child(2) { transition-delay: .08s; }
.stagger > *:nth-child(3) { transition-delay: .16s; }
.stagger > *:nth-child(4) { transition-delay: .24s; }
.stagger > *:nth-child(5) { transition-delay: .32s; }
.stagger > *:nth-child(6) { transition-delay: .4s; }
.stagger > *:nth-child(7) { transition-delay: .48s; }
.stagger > *:nth-child(8) { transition-delay: .56s; }
.stagger > *:nth-child(9) { transition-delay: .64s; }
.stagger > *:nth-child(10) { transition-delay: .72s; }

/* -- Hero Entrance Animations ------------------------------ */
@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes heroBadgePop {
    0% { opacity: 0; transform: scale(.8) translateY(12px); }
    60% { transform: scale(1.05) translateY(0); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes pulse-ring {
    0% { transform: scale(1); opacity: .4; }
    100% { transform: scale(1.6); opacity: 0; }
}
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-info-inner .hero-badge {
    animation: heroBadgePop .6s cubic-bezier(.16,1,.3,1) .1s both;
}
.hero-info-inner h1 {
    animation: heroFadeUp .7s cubic-bezier(.16,1,.3,1) .2s both;
}
.hero-info-inner .hero-theme {
    animation: heroFadeUp .7s cubic-bezier(.16,1,.3,1) .35s both;
}
.hero-info-inner .hero-meta {
    animation: heroFadeUp .7s cubic-bezier(.16,1,.3,1) .45s both;
}
.hero-info-inner .countdown {
    animation: heroFadeUp .7s cubic-bezier(.16,1,.3,1) .55s both;
}
.hero-info-inner .hero-actions {
    animation: heroFadeUp .7s cubic-bezier(.16,1,.3,1) .65s both;
}

/* -- Animated Gradient Background for Hero ----------------- */
.hero-info {
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 30%, #1a365d 60%, #0f2847 100%);
    background-size: 200% 200%;
    animation: gradient-shift 12s ease infinite;
}

/* -- Floating Particles (CSS only) ------------------------- */
.hero-info::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 10% 20%, rgba(255,255,255,.15) 50%, transparent 50%),
        radial-gradient(2px 2px at 30% 70%, rgba(255,255,255,.1) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 50% 40%, rgba(255,255,255,.12) 50%, transparent 50%),
        radial-gradient(2px 2px at 70% 80%, rgba(255,255,255,.08) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 85% 30%, rgba(255,255,255,.1) 50%, transparent 50%),
        radial-gradient(2px 2px at 20% 90%, rgba(255,255,255,.06) 50%, transparent 50%),
        radial-gradient(1px 1px at 60% 15%, rgba(255,255,255,.15) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 90% 60%, rgba(255,255,255,.08) 50%, transparent 50%);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* -- Premium Section Title --------------------------------- */
.section-title {
    position: relative;
}
.section-title::after {
    transition: width .5s cubic-bezier(.16,1,.3,1);
    width: 0;
}
.section-title.visible::after {
    width: 48px;
}

/* -- Speaker Card Premium Hover ---------------------------- */
.speaker-card {
    transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease;
    position: relative;
    overflow: hidden;
}
.speaker-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #7c3aed, var(--accent));
    background-size: 200% 100%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s cubic-bezier(.16,1,.3,1);
}
.speaker-card:hover::before {
    transform: scaleX(1);
    animation: shimmer 2s linear infinite;
}
.speaker-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -12px rgba(37,99,235,.15);
}
.speaker-photo {
    transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s ease;
}
.speaker-card:hover .speaker-photo {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(37,99,235,.25);
}

/* -- Timeline Animation ------------------------------------ */
.timeline-item {
    transition: opacity .5s, transform .5s cubic-bezier(.16,1,.3,1);
}
.timeline-item::before {
    transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s;
}
.timeline-item:hover::before {
    transform: scale(1.4);
    box-shadow: 0 0 0 4px rgba(37,99,235,.2);
}
.timeline-item:hover .timeline-title {
    color: var(--accent);
    transition: color .2s;
}

/* -- Card Hover Micro-interactions ------------------------- */
.card {
    transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease, border-color .3s;
}
.card:hover {
    border-color: rgba(37,99,235,.2);
}

/* -- Button Animations ------------------------------------- */
.btn-hero {
    position: relative;
    overflow: hidden;
    transition: all .3s cubic-bezier(.16,1,.3,1);
}
.btn-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .5s;
}
.btn-hero:hover::after {
    transform: translateX(100%);
}
.btn-hero:active {
    transform: scale(.97);
}

/* -- CTA Section Glow -------------------------------------- */
.cta-section {
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(37,99,235,.2) 0%, transparent 70%);
    top: -100px; right: -100px;
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}
.cta-section::after {
    content: '';
    position: absolute;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(124,58,237,.15) 0%, transparent 70%);
    bottom: -80px; left: -60px;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite reverse;
}

/* -- Countdown Premium ------------------------------------- */
.countdown-value {
    transition: transform .2s;
}
.countdown-value:hover {
    transform: scale(1.08);
}

/* -- Page Content Animations ------------------------------- */
.page-content h2,
.page-content h3 {
    position: relative;
}
.page-content h2::after {
    content: '';
    display: block;
    width: 40px; height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    margin-top: .5rem;
    border-radius: 2px;
}

/* -- Navbar Scroll Effect ---------------------------------- */
.navbar {
    transition: background .3s, box-shadow .3s, height .3s;
}

/* -- Sub-theme Card Animation ------------------------------ */
.subtheme-card {
    transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s, border-color .25s;
    border: 1px solid var(--gray-200);
}
.subtheme-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px -8px rgba(37,99,235,.12);
    border-color: rgba(37,99,235,.25);
}
.subtheme-card .subtheme-num {
    transition: transform .3s cubic-bezier(.16,1,.3,1);
}
.subtheme-card:hover .subtheme-num {
    transform: scale(1.1) rotate(-3deg);
}

/* -- Smooth Page Transitions ------------------------------- */
.main-content {
    animation: pageIn .4s cubic-bezier(.16,1,.3,1);
}
@keyframes pageIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* -- Reduce motion for accessibility ----------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal, .reveal-left, .reveal-right, .reveal-scale {
        opacity: 1;
        transform: none;
    }
}
