/* ==========================================================================
   Asia Mandate — Core Stylesheet & Animations
   ========================================================================== */

/* Typography & Base */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #FAF7F2;
    color: #1C1917;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-serif-title {
    font-family: 'Playfair Display', Georgia, Cambria, 'Times New Roman', serif;
}

/* Glassmorphism Navigation */
.glass-nav {
    background: rgba(250, 247, 242, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Top Reading Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #0D5C5A 0%, #C27803 100%);
    z-index: 999;
    width: 0%;
    transition: width 0.1s ease-out;
}

/* PlanWed Signature Cards with Micro-Interactions */
.card-planwed {
    background: #FFFFFF;
    border: 1px solid rgba(231, 226, 218, 0.85);
    box-shadow: 0 12px 32px -10px rgba(28, 25, 23, 0.04), 0 2px 6px -1px rgba(28, 25, 23, 0.02);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, box-shadow;
}

.card-planwed:hover {
    transform: translateY(-5px);
    border-color: rgba(13, 92, 90, 0.25);
    box-shadow: 0 24px 48px -12px rgba(28, 25, 23, 0.09), 0 6px 16px -2px rgba(28, 25, 23, 0.04);
}

/* Floating Animations */
.animate-float-slow {
    animation: floatSlow 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: floatSlow 7s ease-in-out 2s infinite;
}

.animate-float-reverse {
    animation: floatReverse 6.5s ease-in-out 1s infinite;
}

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

@keyframes floatReverse {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(8px);
    }
}

/* Radar Pulse Indicator for Live Elements */
.live-pulse {
    position: relative;
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background-color: #10B981;
}

.live-pulse::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    background-color: #10B981;
    animation: radarPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes radarPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    70% {
        transform: scale(2.6);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Shimmer Subtle Glow */
.animate-shimmer {
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
}

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

/* Scroll-Driven Viewport Reveal Classes */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Delays for Grid Children */
.delay-100 { transition-delay: 100ms; }
.delay-150 { transition-delay: 150ms; }
.delay-200 { transition-delay: 200ms; }
.delay-250 { transition-delay: 250ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Modal Zoom & Backdrop Fade */
.animate-modal-scale {
    animation: modalScale 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Toast Slide in from bottom */
.animate-toast {
    animation: toastSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Custom Scrollbars */
.scrollbar-none::-webkit-scrollbar {
    display: none;
}
.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Article Modal Prose Typography */
#modal-body p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

#modal-body ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

#modal-body li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

#modal-body strong {
    font-weight: 600;
    color: #1C1917;
}

#modal-body blockquote {
    border-left: 4px solid #0D5C5A;
    background-color: rgba(13, 92, 90, 0.06);
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    font-style: italic;
    font-family: 'Playfair Display', Georgia, serif;
    color: #1C1917;
    border-radius: 0 0.75rem 0.75rem 0;
}

/* Reduced 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;
        scroll-behavior: auto !important;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
