/* =========================================
   1. ENTRANCE SEQUENCE (Main Page Only)
   ========================================= */

/* Set initial opacity to 0 only for main page elements */
.wordmark,
.caption,
.footer .nav-link {
    opacity: 0;
    will-change: opacity; 
}

/* 1. Main Wordmark */
.wordmark {
    animation: slowFadeIn 2.5s ease-in-out forwards;
    animation-delay: 0.5s; 
}

/* 2. Caption */
.caption {
    animation: slowFadeIn 2.5s ease-in-out forwards;
    animation-delay: 3.5s; 
}

/* 3. Footer Link ("CONTACT" on main page) */
.footer .nav-link {
    animation: slowFadeIn 2.5s ease-in-out forwards;
    animation-delay: 6s; 
}

@keyframes slowFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* =========================================
   2. INTERACTION ANIMATIONS (Toast)
   ========================================= */

.toast {
    position: fixed;
    /* Anchor to the exact center of the viewport */
    top: 50%; 
    left: 50%;
    /* The base transform is now handled inside the keyframes below */
    z-index: 100;
    
    background-color: #000000;
    border: 1px solid #222222; 
    color: #808080; 
    padding: 0.75rem 2rem;
    border-radius: 2px; 
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    
    /* Forces the text to stay on a single line on narrow mobile screens */
    white-space: nowrap; 
    
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.toast.show {
    visibility: visible;
    animation: fadeUpIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards,
               fadeOutUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards 2.5s;
}

@keyframes fadeUpIn {
    from { 
        opacity: 0; 
        /* Starts slightly above the email */
        transform: translate(-50%, calc(-50% - 2.5rem)); 
    }
    to { 
        opacity: 1; 
        /* Rests perfectly above the email */
        transform: translate(-50%, calc(-50% - 3.5rem)); 
    }
}

@keyframes fadeOutUp {
    from { 
        opacity: 1; 
        transform: translate(-50%, calc(-50% - 3.5rem)); 
    }
    to { 
        opacity: 0; 
        /* Drifts slightly higher as it disappears */
        transform: translate(-50%, calc(-50% - 4.5rem)); 
        visibility: hidden; 
    }
}