/* ============================================================
   Munger Money Mentor — Intro Splash Animation
   Full-screen animated intro plays once, then fades out and
   is removed from the DOM. Gold coin pulses radiate outward
   while floating dollar particles drift upward.
   ============================================================ */

.intro-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #1a2a3a 0%, #2C3E50 40%, #4a3560 70%, #764BA2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 1;
    transition: opacity 1s ease;
}

.intro-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* ---- Animated background pattern ---- */
.intro-bg-pattern {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(246, 211, 101, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(118, 75, 162, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(246, 211, 101, 0.04) 0%, transparent 40%);
    animation: bg-shift 8s ease-in-out infinite alternate;
}

@keyframes bg-shift {
    0%   { opacity: 0.6; transform: scale(1); }
    100% { opacity: 1;   transform: scale(1.05); }
}

/* ---- Subtle grid lines ---- */
.intro-grid {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0;
    animation: grid-in 1.5s 0.3s ease-out forwards;
}

@keyframes grid-in {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

/* ============================================================
   Gold Coin Pulse — Radiating rings from center
   ============================================================ */

.coin-pulse-container {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 0; height: 0;
    z-index: 1;
}

.coin-pulse {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid rgba(246, 211, 101, 0.6);
    opacity: 0;
    animation: pulse-ring 3s ease-out infinite;
}

.coin-pulse:nth-child(2) { animation-delay: 0.6s; }
.coin-pulse:nth-child(3) { animation-delay: 1.2s; }
.coin-pulse:nth-child(4) { animation-delay: 1.8s; }
.coin-pulse:nth-child(5) { animation-delay: 2.4s; }

@keyframes pulse-ring {
    0% {
        width: 40px; height: 40px;
        opacity: 0;
        border-color: rgba(246, 211, 101, 0.8);
        filter: drop-shadow(0 0 8px rgba(246, 211, 101, 0.5));
    }
    10% {
        opacity: 0.7;
    }
    100% {
        width: 600px; height: 600px;
        opacity: 0;
        border-color: rgba(246, 211, 101, 0.05);
        filter: drop-shadow(0 0 2px rgba(246, 211, 101, 0));
    }
}

/* ---- Central coin icon ---- */
.coin-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F6D365, #FDA085);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
    font-size: 36px;
    font-weight: 700;
    color: #2C3E50;
    z-index: 3;
    box-shadow:
        0 0 20px rgba(246, 211, 101, 0.5),
        0 0 60px rgba(246, 211, 101, 0.2);
    animation: coin-glow 2s ease-in-out infinite alternate;
    opacity: 0;
    animation: coin-appear 0.6s 0.3s ease-out forwards, coin-glow 2s 1s ease-in-out infinite alternate;
}

@keyframes coin-appear {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes coin-glow {
    0% {
        box-shadow:
            0 0 20px rgba(246, 211, 101, 0.5),
            0 0 60px rgba(246, 211, 101, 0.2);
    }
    100% {
        box-shadow:
            0 0 30px rgba(246, 211, 101, 0.7),
            0 0 80px rgba(246, 211, 101, 0.3),
            0 0 120px rgba(246, 211, 101, 0.1);
    }
}

/* ============================================================
   Corner accent dots — like receiver dots from notitia
   ============================================================ */

.accent-dot {
    position: absolute;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: rgba(246, 211, 101, 0.8);
    z-index: 2;
    animation: dot-pulse 2s ease-in-out infinite;
}

.accent-dot--tl { top: 8%; left: 6%; }
.accent-dot--tr { top: 8%; right: 6%; animation-delay: 0.5s; }
.accent-dot--bl { bottom: 8%; left: 6%; animation-delay: 1.0s; }
.accent-dot--br { bottom: 8%; right: 6%; animation-delay: 1.5s; }

@keyframes dot-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 0 8px rgba(246, 211, 101, 0.6),
            0 0 20px rgba(246, 211, 101, 0.3);
        background: rgba(246, 211, 101, 0.7);
    }
    50% {
        transform: scale(1.5);
        box-shadow:
            0 0 14px rgba(246, 211, 101, 1),
            0 0 35px rgba(246, 211, 101, 0.5),
            0 0 60px rgba(246, 211, 101, 0.2);
        background: rgba(246, 211, 101, 1);
    }
}

/* ============================================================
   Floating dollar particles
   ============================================================ */

.intro-particle {
    position: absolute;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: rgba(246, 211, 101, 0.4);
    z-index: 2;
    animation: particle-float linear infinite;
    pointer-events: none;
}

@keyframes particle-float {
    0%   { transform: translateY(0) rotate(0deg) scale(1); opacity: 0; }
    10%  { opacity: 0.6; }
    90%  { opacity: 0.6; }
    100% { transform: translateY(-200px) rotate(15deg) scale(0.3); opacity: 0; }
}

/* ============================================================
   Tagline text
   ============================================================ */

.intro-content {
    position: relative;
    z-index: 4;
    text-align: center;
    padding: 0 24px;
    margin-top: 100px;
}

.intro-tagline {
    opacity: 0;
    animation: tagline-in 0.8s 0.8s ease-out forwards;
}

.intro-tagline h2 {
    font-family: Georgia, serif;
    font-size: clamp(1.4rem, 4vw, 2.6rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    text-shadow: 0 2px 16px rgba(0,0,0,0.5), 0 0 40px rgba(0,0,0,0.2);
    margin: 0 0 12px 0;
}

.intro-tagline .glow-word {
    color: #F6D365;
    text-shadow: 0 0 24px rgba(246, 211, 101, 0.5), 0 2px 16px rgba(0,0,0,0.5);
}

.intro-subtitle {
    opacity: 0;
    animation: tagline-in 0.7s 1.4s ease-out forwards;
}

.intro-subtitle p {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.75rem, 1.4vw, 1rem);
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 1px 10px rgba(0,0,0,0.4);
    margin: 0;
}

@keyframes tagline-in {
    0%   { opacity: 0; transform: translateY(16px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 600px) {
    .coin-center {
        width: 60px; height: 60px;
        font-size: 28px;
    }
    .intro-content {
        margin-top: 80px;
    }
    .accent-dot {
        width: 8px; height: 8px;
    }
}

@media (max-height: 500px) {
    .intro-tagline h2 { font-size: 1.2rem; }
    .intro-subtitle p { font-size: 0.7rem; }
    .intro-content { margin-top: 60px; }
    .coin-center { width: 50px; height: 50px; font-size: 24px; }
}
