/* css/quote.css */

/* --- SCROLL TRACK --- */
.quote-track {
    position: relative;
    height: 300vh; /* Long scroll for the typing effect */
    width: 100%;
    background-color: transparent;
    z-index: 50; 
}

/* --- STICKY VIEWPORT --- */
.quote-sticky-viewport {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    
    /* --- DYNAMIC BACKGROUND --- */
    /* 1. Base Color: Fades in early via JS variable */
    background-color: rgba(5, 5, 5, var(--bg-opacity, 0));
    
    /* 2. Atmosphere: A deep blue glow that also fades in */
    background-image: radial-gradient(
        circle at center, 
        rgba(20, 50, 80, var(--bg-opacity, 0)) 0%, 
        transparent 70%
    );

    /* --- THE FIX: GRADIENT MASK --- */
    /* This creates a soft fade at the top edge, eliminating the hard line */
    /* Content at the top (0%) is transparent, content at 15% is fully visible */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 100%);

    /* Performance optimization */
    transition: none;
    will-change: background-color;
}

/* --- TYPOGRAPHY --- */
.quote-content {
    max-width: 1200px;
    width: 100%;
    position: relative;
    text-align: center;
    z-index: 51;
    
    /* NEW: Optimize for the upward scroll animation */
    will-change: transform, opacity;
    transition: transform 0.1s linear; /* Short transition to smooth out scroll jank */
}

.quote-text {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4.5rem);
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0;
    
    /* Slight shadow to lift text off the deep background */
    text-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

/* Individual Word Styling */
.quote-word {
    display: inline-block;
    opacity: 0;
    filter: blur(10px);
    transform: translateY(30px);
    transition: all 0.5s cubic-bezier(0.2, 0.6, 0.3, 1);
    will-change: opacity, transform, filter;
    margin-right: 0.25em;
}

/* Revealed State */
.quote-word.revealed {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
    color: #ffffff;
    text-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
}

/* Highlight "Dreams" */
.quote-word:last-child.revealed {
    color: var(--accent-lime);
    text-shadow: 0 0 35px rgba(212, 255, 0, 0.6);
}

/* --- AUTHOR CITATION --- */
.quote-author {
    margin-top: 4rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    color: var(--accent-blue);
    letter-spacing: 0.1em;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.quote-author.visible {
    opacity: 1;
    transform: translateY(0);
}