/* ============================================
   Expose in India - Public Accountability Platform
   Animation Stylesheet
   ============================================ */

/* ============================================
   Fade In Animations
   ============================================ */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.animate-fade-in-delay {
    opacity: 0;
    animation: fadeIn 0.8s ease 0.5s forwards;
}

.animate-fade-in-delay-2 {
    opacity: 0;
    animation: fadeIn 0.8s ease 1s forwards;
}

.animate-fade-in-delay-3 {
    opacity: 0;
    animation: fadeIn 0.8s ease 1.5s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Reveal Animations
   ============================================ */
.animate-reveal {
    overflow: hidden;
}

.animate-reveal span {
    display: block;
    opacity: 0;
    transform: translateY(100%);
    animation: revealText 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.animate-reveal span:nth-child(1) { animation-delay: 0.2s; }
.animate-reveal span:nth-child(2) { animation-delay: 0.4s; }
.animate-reveal span:nth-child(3) { animation-delay: 0.6s; }

@keyframes revealText {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Scroll-Triggered Animations (AOS-like)
   ============================================ */
[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos="fade-up"] {
    transform: translateY(40px);
}

[data-aos="fade-down"] {
    transform: translateY(-40px);
}

[data-aos="fade-left"] {
    transform: translateX(40px);
}

[data-aos="fade-right"] {
    transform: translateX(-40px);
}

[data-aos="zoom-in"] {
    transform: scale(0.9);
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* AOS Delays */
[data-aos-delay="100"] { transition-delay: 0.1s; }
[data-aos-delay="200"] { transition-delay: 0.2s; }
[data-aos-delay="300"] { transition-delay: 0.3s; }
[data-aos-delay="400"] { transition-delay: 0.4s; }
[data-aos-delay="500"] { transition-delay: 0.5s; }

/* ============================================
   Card Hover Animations
   ============================================ */
.finding-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
                box-shadow 0.4s ease,
                border-color 0.3s ease;
}

.finding-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.finding-card:hover .card-icon {
    animation: iconPulse 0.6s ease;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Progress Bar Animation */
.progress-fill {
    width: 0 !important;
    transition: width 1.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.finding-card.aos-animate .progress-fill {
    width: var(--progress-width, 0) !important;
}

/* ============================================
   Timeline Animations
   ============================================ */
.timeline-line {
    background: linear-gradient(to bottom, 
        var(--color-accent-green) 0%, 
        var(--color-accent-amber) 25%,
        var(--color-border-subtle) 25%);
    background-size: 100% 400%;
    animation: timelineProgress 3s ease forwards;
}

@keyframes timelineProgress {
    from { background-position: 0 0; }
    to { background-position: 0 100%; }
}

.marker-dot.active {
    animation: markerPulse 2s ease infinite;
}

@keyframes markerPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(44, 140, 94, 0.4);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(44, 140, 94, 0);
    }
}

.marker-dot.upcoming {
    animation: markerGlow 2s ease infinite;
}

@keyframes markerGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(212, 167, 44, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(212, 167, 44, 0);
    }
}

/* ============================================
   Countdown Timer Animations
   ============================================ */
.countdown-value {
    position: relative;
    display: inline-block;
}

.countdown-value.flip {
    animation: digitFlip 0.5s ease;
}

@keyframes digitFlip {
    0% {
        transform: rotateX(0deg);
        opacity: 1;
    }
    50% {
        transform: rotateX(-90deg);
        opacity: 0;
    }
    100% {
        transform: rotateX(0deg);
        opacity: 1;
    }
}

/* Countdown Container Glow */
.countdown-container {
    position: relative;
}

.countdown-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid transparent;
    pointer-events: none;
    transition: border-color 0.3s ease;
}

.countdown-container.pulse::after {
    animation: containerPulse 0.5s ease;
}

@keyframes containerPulse {
    0%, 100% {
        border-color: transparent;
        box-shadow: none;
    }
    50% {
        border-color: var(--color-accent-amber);
        box-shadow: 0 0 20px rgba(212, 167, 44, 0.2);
    }
}

/* ============================================
   Scroll Indicator Animation
   ============================================ */
.scroll-arrow {
    animation: scrollBounce 2s ease infinite;
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(10px);
    }
    60% {
        transform: translateY(5px);
    }
}

/* ============================================
   Grid Background Animation
   ============================================ */
.grid-overlay {
    animation: gridDraw 4s ease forwards;
}

@keyframes gridDraw {
    0% {
        opacity: 0;
        background-size: 0px 0px;
    }
    50% {
        opacity: 0.5;
        background-size: 30px 30px;
    }
    100% {
        opacity: 1;
        background-size: 60px 60px;
    }
}

/* ============================================
   Scan Line Animation
   ============================================ */
.scan-line {
    animation: scanMove 8s linear infinite;
}

@keyframes scanMove {
    0% {
        top: 0;
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* ============================================
   Badge Animation
   ============================================ */
.badge-dot {
    animation: badgePulse 2s ease infinite;
}

@keyframes badgePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* ============================================
   Paper Entry Animation
   ============================================ */
.message-paper {
    opacity: 0;
    transform: translateY(20px) rotateX(-5deg);
    animation: paperEnter 0.8s ease forwards;
    animation-delay: 0.3s;
}

@keyframes paperEnter {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

/* ============================================
   Stakeholder Item Animation
   ============================================ */
.stakeholder-item {
    opacity: 0;
    transform: translateX(-20px);
}

.stakeholder-item.aos-animate {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   Redacted Text Effect
   ============================================ */
.redacted {
    position: relative;
    display: inline-block;
}

.redacted::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg-deep);
    animation: redactReveal 1s ease forwards;
    animation-delay: 0.5s;
}

@keyframes redactReveal {
    to {
        transform: translateX(101%);
    }
}

/* ============================================
   Method Card Stagger
   ============================================ */
.method-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.method-card.aos-animate {
    opacity: 1;
    transform: translateY(0);
}

.method-card:nth-child(1) { transition-delay: 0s; }
.method-card:nth-child(2) { transition-delay: 0.1s; }
.method-card:nth-child(3) { transition-delay: 0.2s; }
.method-card:nth-child(4) { transition-delay: 0.3s; }
.method-card:nth-child(5) { transition-delay: 0.4s; }
.method-card:nth-child(6) { transition-delay: 0.5s; }

/* ============================================
   Engagement Card Hover
   ============================================ */
.engagement-card {
    transition: transform 0.4s ease, 
                border-color 0.3s ease,
                box-shadow 0.4s ease;
}

.engagement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.engagement-card:hover .engagement-icon {
    animation: iconFloat 0.6s ease;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ============================================
   Legal Card Reveal
   ============================================ */
.legal-card {
    position: relative;
    overflow: hidden;
}

.legal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--color-accent-amber),
        transparent);
    transition: left 0.6s ease;
}

.legal-card:hover::before {
    left: 100%;
}

/* ============================================
   CTA Section Animations
   ============================================ */
.cta-countdown-mini {
    animation: ctaPulse 3s ease infinite;
}

@keyframes ctaPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(212, 167, 44, 0.3);
    }
    50% {
        box-shadow: 0 0 30px 5px rgba(212, 167, 44, 0.1);
    }
}

/* ============================================
   Navigation Scroll Effect
   ============================================ */
.navbar {
    transition: background-color 0.3s ease, 
                box-shadow 0.3s ease,
                backdrop-filter 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(10, 10, 12, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* ============================================
   Mobile Menu Animation
   ============================================ */
.mobile-menu-btn span {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   Link Underline Animation
   ============================================ */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent-amber);
    transition: width 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.nav-link:hover::after {
    width: 100%;
}

/* ============================================
   Section Entry Animations
   ============================================ */
.section-header {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-header.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-line {
    width: 0;
    transition: width 0.6s ease 0.3s;
}

.section-header.visible .section-line {
    width: 60px;
}

/* ============================================
   Loading State
   ============================================ */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    to {
        left: 100%;
    }
}

/* ============================================
   Reduced Motion Preferences
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .scan-line,
    .grid-overlay {
        animation: none !important;
        opacity: 0.5;
    }
    
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================
   Evidence Archive Animations
   ============================================ */

/* Card Shimmer Effect */
.evidence-category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.02),
        rgba(255, 255, 255, 0.04),
        rgba(255, 255, 255, 0.02),
        transparent
    );
    pointer-events: none;
    z-index: 3;
}

.evidence-category-card:hover::after {
    animation: cardShimmer 1s ease forwards;
}

@keyframes cardShimmer {
    to {
        left: 150%;
    }
}

/* Scanning Line Effect for Archive Section */
.evidence-archive-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(227, 74, 74, 0.3), 
        rgba(227, 74, 74, 0.6), 
        rgba(227, 74, 74, 0.3), 
        transparent);
    animation: archiveScan 8s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes archiveScan {
    0% {
        top: 0;
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    95% {
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Lock Icon Shake on Hover */
.evidence-category-card:hover .category-lock {
    animation: lockShake 0.5s ease;
}

@keyframes lockShake {
    0%, 100% { transform: scale(1.1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

/* Evidence Item Hover Slide */
.evidence-item {
    transform: translateX(0);
}

.evidence-item:hover {
    transform: translateX(5px);
}

/* Status Badge Glow */
.status-locked {
    position: relative;
}

.status-locked::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: rgba(255, 68, 68, 0.2);
    filter: blur(8px);
    opacity: 0;
    animation: statusGlow 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes statusGlow {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Archive Countdown Pulse */
.archive-countdown-value {
    animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
    0%, 100% { 
        opacity: 1;
        text-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
    }
    50% { 
        opacity: 0.85;
        text-shadow: 0 0 30px rgba(255, 68, 68, 0.8);
    }
}

/* Category Icon Hover Glow */
.category-icon {
    transition: all 0.3s ease;
}

.evidence-category-card:hover .category-icon {
    box-shadow: 0 0 30px var(--icon-color, rgba(66, 165, 245, 0.4));
}

/* Staggered Card Entry Animation */
.evidence-category-card {
    opacity: 0;
    transform: translateY(30px);
    animation: cardEntry 0.6s ease forwards;
}

.evidence-category-card:nth-child(1) { animation-delay: 0.1s; }
.evidence-category-card:nth-child(2) { animation-delay: 0.2s; }
.evidence-category-card:nth-child(3) { animation-delay: 0.3s; }
.evidence-category-card:nth-child(4) { animation-delay: 0.4s; }
.evidence-category-card:nth-child(5) { animation-delay: 0.5s; }
.evidence-category-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes cardEntry {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Border Animation */
.evidence-category-card {
    background-clip: padding-box;
}

.archive-status-banner {
    animation: bannerGlow 4s ease-in-out infinite;
}

@keyframes bannerGlow {
    0%, 100% {
        box-shadow: 
            0 4px 30px rgba(227, 74, 74, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.05),
            inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 
            0 4px 50px rgba(227, 74, 74, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.08),
            inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    }
}

/* Typewriter Effect for SECURED text */
.status-locked {
    overflow: hidden;
    white-space: nowrap;
}

/* Release Notice Item Entrance */
.release-item {
    opacity: 0;
    transform: translateX(-20px);
    animation: releaseItemEntry 0.5s ease forwards;
}

.release-item:nth-child(1) { animation-delay: 0.8s; }
.release-item:nth-child(2) { animation-delay: 0.9s; }
.release-item:nth-child(3) { animation-delay: 1s; }
.release-item:nth-child(4) { animation-delay: 1.1s; }

@keyframes releaseItemEntry {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Evidence Item Loading Skeleton */
.evidence-item.locked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.03) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: skeletonShine 3s ease-in-out infinite;
    border-radius: inherit;
    pointer-events: none;
}

@keyframes skeletonShine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

