/* ==========================================================================
   EducationistGuru — Pure After Effects Motion Graphics Welcome Screen
   Design: Kinetic Typography, Precision Vector Drawing, Zero Glitter/Particles
   Color Palette: Signature Orange (#FF6B00), Deep Slate (#080C18), White (#FFFFFF)
   ========================================================================== */

#eg-motion-welcome {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999999;
    background-color: #080c18;
    background-image: radial-gradient(circle at 50% 45%, rgba(255, 107, 0, 0.09) 0%, rgba(8, 12, 24, 0.98) 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    user-select: none;
    will-change: transform;
    overflow: hidden;
}

/* Exit Curtain Slide Up & Fade Out */
#eg-motion-welcome.eg-exit {
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.75s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.6s ease;
    pointer-events: none !important;
}

/* Fade the inner content out FIRST (faster than the curtain) so the welcome
   text/logo can never be seen ghosting over the hero as the curtain slides up. */
#eg-motion-welcome.eg-exit .eg-welcome-stage,
#eg-motion-welcome.eg-exit .eg-welcome-meta,
#eg-motion-welcome.eg-exit .eg-progress-track {
    opacity: 0;
    transition: opacity 0.25s ease;
}

/* Stage Layout */
.eg-welcome-stage {
    position: relative;
    max-width: 680px;
    width: 90%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* 1. Kinetic Concentric Ring & Logo Mark */
.eg-kinetic-ring-box {
    position: relative;
    width: 130px;
    height: 130px;
    display: grid;
    place-items: center;
    margin-bottom: 8px;
}

.eg-kinetic-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.eg-circle-track {
    stroke: rgba(255, 255, 255, 0.07);
}

.eg-circle-dash {
    stroke-dasharray: 440;
    stroke-dashoffset: 440;
    animation: egDrawRing 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.15s;
}

.eg-circle-accent {
    animation: egRotateAccent 6s linear infinite;
    transform-origin: center;
}

.eg-kinetic-logo-mark {
    position: relative;
    width: 68px;
    height: 68px;
    background: #ffffff;
    border-radius: 20px;
    display: grid;
    place-items: center;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transform: scale(0);
    opacity: 0;
    animation: egPopLogo 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.25s;
}

.eg-logo-img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* 2. Staggered Masked Typography */
.eg-kinetic-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.eg-mask-line {
    overflow: hidden;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eg-mask-line-lg {
    height: 54px;
}

.eg-text-slide {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    color: #ffffff;
    display: inline-block;
    transform: translateY(120%);
    opacity: 0;
    animation: egSlideUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.eg-text-slide.text-orange {
    color: #ff6b00;
}

.eg-delay-1 { animation-delay: 0.25s; }
.eg-delay-2 { animation-delay: 0.42s; }
.eg-delay-3 { animation-delay: 0.60s; }

.eg-mask-sub {
    overflow: hidden;
    height: 26px;
    margin-top: 8px;
}

.eg-text-sub {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #94a3b8;
    display: inline-block;
    transform: translateY(120%);
    opacity: 0;
    animation: egSlideUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.6s;
}

/* 3. Technical Bottom HUD / Ticker */
.eg-welcome-meta {
    position: absolute;
    bottom: 40px;
    left: 48px;
    right: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.eg-meta-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 1.2px;
    color: #64748b;
    text-transform: uppercase;
}

.eg-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff6b00;
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.8);
    animation: egPulseDot 1.4s ease-in-out infinite;
}

.eg-counter-box {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 20px;
    font-weight: 700;
    color: #ff6b00;
    letter-spacing: -0.5px;
}

.eg-counter-symbol {
    font-size: 14px;
    opacity: 0.8;
}

/* Bottom Progress Line */
.eg-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
}

.eg-progress-bar {
    width: 0%;
    height: 100%;
    background: #ff6b00;
    transition: width 0.04s linear;
}

/* Keyframes */
@keyframes egDrawRing {
    to { stroke-dashoffset: 0; }
}

@keyframes egRotateAccent {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes egPopLogo {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes egSlideUp {
    0% { transform: translateY(120%); opacity: 0; }
    100% { transform: translateY(0%); opacity: 1; }
}

@keyframes egPulseDot {
    0%, 100% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.15); }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .eg-mask-line { height: 38px; }
    .eg-mask-line-lg { height: 42px; }
    .eg-text-slide { font-size: 28px; }
    .eg-kinetic-ring-box { width: 100px; height: 100px; }
    .eg-kinetic-logo-mark { width: 54px; height: 54px; border-radius: 14px; }
    .eg-welcome-meta { bottom: 24px; left: 24px; right: 24px; }
    .eg-meta-status { font-size: 10px; }
    .eg-counter-box { font-size: 16px; }
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
    #eg-motion-welcome {
        display: none !important;
    }
}
