/* ============================================================
   Discovery China — Shared Visual Polish
   Animations, micro-interactions, scroll reveals, enhanced depth
   ============================================================ */

/* ===== SCROLL REVEAL ANIMATIONS =====
   Using @keyframes (not transition) so component-level CSS transitions
   (e.g. .journey-day, .trust-card) cannot override the reveal effect.
   fill-mode: both → holds 'from' values during stagger delay,
                      holds 'to' values after animation ends.
   ===================================================================== */
@keyframes dcRevealFadeUp {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes dcRevealSlideLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes dcRevealSlideRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes dcRevealScale {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

/* Hidden until revealed */
.reveal        { opacity: 0; }
.reveal-left   { opacity: 0; }
.reveal-right  { opacity: 0; }
.reveal-scale  { opacity: 0; }

/* Play animation when JS adds .revealed */
.reveal.revealed        { animation: dcRevealFadeUp    0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.reveal-left.revealed   { animation: dcRevealSlideLeft 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.reveal-right.revealed  { animation: dcRevealSlideRight 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.reveal-scale.revealed  { animation: dcRevealScale     0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* Stagger delays for grid children (animation-delay, not transition-delay) */
.reveal-stagger > *:nth-child(1) { animation-delay: 0s; }
.reveal-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.reveal-stagger > *:nth-child(3) { animation-delay: 0.2s; }
.reveal-stagger > *:nth-child(4) { animation-delay: 0.3s; }
.reveal-stagger > *:nth-child(5) { animation-delay: 0.4s; }
.reveal-stagger > *:nth-child(6) { animation-delay: 0.5s; }

/* ===== HERO ANIMATED BACKGROUND ===== */
@keyframes heroGradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes heroOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%      { transform: translate(30px, -20px) scale(1.05); }
    50%      { transform: translate(-15px, -35px) scale(0.97); }
    75%      { transform: translate(20px, 10px) scale(1.03); }
}

@keyframes heroOrbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%      { transform: translate(-20px, 15px) scale(1.04); }
    50%      { transform: translate(25px, 30px) scale(0.96); }
    75%      { transform: translate(-10px, -20px) scale(1.02); }
}

@keyframes floatParticle {
    0%   { transform: translateY(0) translateX(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(20px); opacity: 0; }
}

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

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(201, 169, 110, 0.15); }
    50%      { box-shadow: 0 0 40px rgba(201, 169, 110, 0.3); }
}

@keyframes watermarkDrift {
    0%, 100% { transform: translateY(-50%) rotate(0deg); }
    50%      { transform: translateY(-52%) rotate(2deg); }
}

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

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

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

/* Hero animated gradient background */
.hero-animated-bg {
    background: linear-gradient(
        165deg,
        #0A1628 0%,
        #0E1F3A 20%,
        #122A4A 40%,
        #163458 60%,
        #1B4B7A 80%,
        #153D64 100%
    );
    background-size: 300% 300%;
    animation: heroGradientShift 20s ease infinite;
}

/* Floating gold orbs */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.hero-orb-1 {
    top: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(201, 169, 110, 0.1) 0%, rgba(201, 169, 110, 0.02) 50%, transparent 70%);
    animation: heroOrbFloat 15s ease-in-out infinite;
}
.hero-orb-2 {
    bottom: 10%;
    left: -8%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(58, 123, 200, 0.08) 0%, rgba(58, 123, 200, 0.02) 50%, transparent 70%);
    animation: heroOrbFloat2 18s ease-in-out infinite;
}
.hero-orb-3 {
    top: 40%;
    right: 25%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(201, 169, 110, 0.06) 0%, transparent 60%);
    animation: heroOrbFloat 12s ease-in-out infinite reverse;
}

/* Particle container */
.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.hero-particle {
    position: absolute;
    bottom: -10px;
    width: 2px;
    height: 2px;
    background: rgba(201, 169, 110, 0.4);
    border-radius: 50%;
    animation: floatParticle linear infinite;
}

/* Animated watermark */
.hero-watermark-animated {
    animation: watermarkDrift 8s ease-in-out infinite;
}

/* Hero entrance animations */
.hero-entrance-eyebrow {
    animation: fadeInHero 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
.hero-entrance-h1 {
    animation: fadeInHero 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}
.hero-entrance-sub {
    animation: fadeInHero 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
}
.hero-entrance-cta {
    animation: fadeInHero 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.8s both;
}
.hero-entrance-stats {
    animation: fadeInHero 0.8s cubic-bezier(0.22, 1, 0.36, 1) 1.0s both;
}
.hero-entrance-card {
    animation: slideInRight 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
}

/* Stat number counter effect */
.hero-stat-number-animated {
    animation: countUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-stat:nth-child(1) .hero-stat-number-animated { animation-delay: 1.1s; }
.hero-stat:nth-child(2) .hero-stat-number-animated { animation-delay: 1.25s; }
.hero-stat:nth-child(3) .hero-stat-number-animated { animation-delay: 1.4s; }
.hero-stat:nth-child(4) .hero-stat-number-animated { animation-delay: 1.55s; }

/* ===== ENHANCED CARD STYLES ===== */

/* Premium card hover with glow */
.card-premium {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.4s ease;
}
.card-premium:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(10, 22, 40, 0.12),
                0 8px 20px rgba(10, 22, 40, 0.08);
    border-color: rgba(201, 169, 110, 0.4);
}

/* Dark card (journey, quiz sections) */
.card-dark-premium {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.4s ease,
                background 0.4s ease;
}
.card-dark-premium:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25),
                0 0 30px rgba(201, 169, 110, 0.08);
    border-color: rgba(201, 169, 110, 0.45);
    background: rgba(255, 255, 255, 0.07);
}

/* ===== ENHANCED BUTTON STYLES ===== */

/* Gold CTA with shimmer */
.btn-gold-shimmer {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-gold-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: none;
    animation: none;
}
.btn-gold-shimmer:hover::after {
    animation: shimmer 1.2s ease forwards;
}
.btn-gold-shimmer:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 169, 110, 0.4),
                0 2px 8px rgba(201, 169, 110, 0.2);
}

/* ===== ENHANCED SECTION TRANSITIONS ===== */

/* Gradient fade between sections */
.section-fade-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, var(--warm-white, #FFFDF9), transparent);
    z-index: 1;
    pointer-events: none;
}

.section-fade-bottom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--warm-white, #FFFDF9), transparent);
    z-index: 1;
    pointer-events: none;
}

/* ===== ENHANCED SHADOWS ===== */
.shadow-elevated {
    box-shadow: 0 4px 6px rgba(10, 22, 40, 0.04),
                0 10px 24px rgba(10, 22, 40, 0.08),
                0 20px 48px rgba(10, 22, 40, 0.06);
}

.shadow-glow-gold {
    box-shadow: 0 4px 16px rgba(201, 169, 110, 0.15),
                0 8px 32px rgba(201, 169, 110, 0.1);
}

/* ===== HERO CARD GLASS ENHANCEMENT ===== */
.glass-card-premium {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(201, 169, 110, 0.2) !important;
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.glass-card-premium:hover {
    border-color: rgba(201, 169, 110, 0.35) !important;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.08),
                0 0 40px rgba(201, 169, 110, 0.06);
    transform: translateY(-4px);
}

/* ===== ENHANCED NAV ===== */
.nav-enhanced {
    transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}
.nav-enhanced.scrolled {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    background: rgba(10, 22, 40, 0.97) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* ===== LINK HOVER EFFECTS ===== */
.link-underline-gold {
    position: relative;
    display: inline-block;
}
.link-underline-gold::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #C9A96E, #D4BC8E);
    transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.link-underline-gold:hover::after {
    width: 100%;
}

/* ===== PRICING TABLE ENHANCEMENTS ===== */
.pricing-row-enhanced {
    transition: background 0.3s ease;
}
.pricing-row-enhanced:hover {
    background: rgba(201, 169, 110, 0.04);
}

/* ===== SECTION EYEBROW ANIMATION ===== */
.eyebrow-animated {
    position: relative;
}
.eyebrow-animated::before {
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
    width: 0;
}
.eyebrow-animated.revealed::before {
    width: 48px;
}

/* ===== SMOOTH IMAGE/ICON HOVER ===== */
.icon-hover-lift {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.icon-hover-lift:hover {
    transform: translateY(-3px) scale(1.05);
}

/* ===== CONTRAST SECTION POLISH ===== */
.contrast-col-enhanced {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s ease;
}
.contrast-col-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(10, 22, 40, 0.08);
}

/* ===== VS CIRCLE PULSE ===== */
.vs-pulse {
    animation: pulseGlow 3s ease-in-out infinite;
}

/* ===== PRICING TABLE HIGHLIGHT ===== */
.pricing-highlight-shimmer {
    background: linear-gradient(90deg, #C9A96E, #D4BC8E, #C9A96E);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== FOOTER POLISH ===== */
.footer-link-enhanced {
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-block;
}
.footer-link-enhanced:hover {
    transform: translateY(-1px);
}

/* ===== QUIZ/FORM POLISH ===== */
.quiz-option-enhanced {
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
.quiz-option-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(201, 169, 110, 0.15);
}

/* ===== WHATSAPP WIDGET ENHANCED ===== */
.whatsapp-enhanced {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s ease !important;
}
.whatsapp-enhanced:hover {
    transform: translateY(-3px) scale(1.03) !important;
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5) !important;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 675px) {
    .hero-orb-1 { width: 300px; height: 300px; }
    .hero-orb-2 { width: 220px; height: 220px; }
    .hero-orb-3 { display: none; }

    /* reveal animations handled by @keyframes — no transform override needed */
}

@media (max-width: 450px) {
    .hero-orb-1 { width: 200px; height: 200px; }
    .hero-orb-2 { width: 150px; height: 150px; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
    .hero-animated-bg { animation: none; }
    .hero-orb { animation: none; }
    .hero-particle { animation: none; display: none; }
    .hero-watermark-animated { animation: none; }
    .hero-entrance-eyebrow,
    .hero-entrance-h1,
    .hero-entrance-sub,
    .hero-entrance-cta,
    .hero-entrance-stats,
    .hero-entrance-card { animation: none; opacity: 1; transform: none; }
    .btn-gold-shimmer::after { animation: none; display: none; }
    .vs-pulse { animation: none; }
}
