/*
================================================
SCROLL-EFFECTS.CSS - GARBACZ ZLOTOWITZ LAW FIRM
Scroll-triggered animation styling
Progress indicator and section tracking visuals
================================================
*/

/* ==========================================
   1. SCROLL PROGRESS INDICATOR LINE
   ========================================== */

.scroll-indicator-line {
    position: fixed;
    top: 0;
    right: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(
        180deg,
        var(--color-accent) 0%,
        var(--color-accent-hover) 50%,
        var(--color-accent) 100%
    );
    z-index: calc(var(--z-header) - 1);
    transition: height 0.1s ease-out;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* Glow effect */
.scroll-indicator-line::after {
    content: '';
    position: absolute;
    top: 0;
    right: -8px;
    width: 19px;
    height: 6px;
    background: radial-gradient(
        ellipse at center,
        rgba(212, 175, 55, 0.6) 0%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
}

/* ==========================================
   2. SCROLL DOTS CONTAINER
   ========================================== */

.scroll-dots-container {
    position: fixed;
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: calc(var(--z-header) - 1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    opacity: 0;
    animation: fadeInRight 0.6s ease-out 1s forwards;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* Hide on smaller screens */
@media (max-width: 1279px) {
    .scroll-dots-container {
        right: 1.5rem;
    }
}

@media (max-width: 1023px) {
    .scroll-dots-container {
        display: none;
    }
}

/* ==========================================
   3. INDIVIDUAL SCROLL DOTS
   ========================================== */

.scroll-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.2);
    border: 2px solid rgba(212, 175, 55, 0.4);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hover state */
.scroll-dot:hover {
    background: rgba(212, 175, 55, 0.4);
    border-color: var(--color-accent);
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* Active state */
.scroll-dot.active {
    background: var(--color-accent);
    border-color: var(--color-accent-hover);
    transform: scale(1.5);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6),
                inset 0 0 10px rgba(212, 175, 55, 0.2);
}

/* Inner pulse on active */
.scroll-dot.active::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--color-dark-bg);
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.8);
        opacity: 0.7;
    }
}

/* Tooltip on hover */
.scroll-dot[title] {
    position: relative;
}

.scroll-dot[title]:hover::before {
    content: attr(title);
    position: absolute;
    right: 25px;
    background: var(--color-dark-secondary);
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    white-space: nowrap;
    pointer-events: none;
    animation: slideInRight 0.2s ease-out;
    z-index: 10;
    font-weight: 600;
    letter-spacing: 0.5px;
}

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

/* ==========================================
   4. SECTION IN-VIEW STATES
   ========================================== */

section.section-in-view {
    animation: sectionFadeIn 0.8s ease-out;
}

@keyframes sectionFadeIn {
    from {
        opacity: 0.95;
    }
    to {
        opacity: 1;
    }
}

/* ==========================================
   5. CARD REVEAL ANIMATIONS
   ========================================== */

.value-card.revealed,
.difference-card.revealed,
.highlight-item.revealed {
    animation: cardReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================
   6. PARALLAX ELEMENTS
   ========================================== */

[data-parallax] {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* ==========================================
   7. SCROLL LINE CONNECTION
   ========================================== */

/* Optional: Connect line to active dot */
.scroll-dots-container::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(212, 175, 55, 0.1) 50%,
        transparent 100%
    );
    z-index: -1;
}

/* ==========================================
   8. REDUCED MOTION SUPPORT
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    .scroll-indicator-line,
    .scroll-dot,
    .scroll-dots-container {
        animation: none !important;
        transition: none !important;
    }
    
    [data-parallax] {
        transform: none !important;
    }
}

/* ==========================================
   9. DARK MODE & CONTRAST
   ========================================== */

@media (prefers-contrast: high) {
    .scroll-indicator-line {
        box-shadow: 0 0 30px rgba(212, 175, 55, 0.8);
    }
    
    .scroll-dot {
        border-width: 3px;
    }
    
    .scroll-dot.active {
        box-shadow: 0 0 30px rgba(212, 175, 55, 1),
                    inset 0 0 15px rgba(212, 175, 55, 0.4);
    }
}

/* ==========================================
   10. PERFORMANCE OPTIMIZATION
   ========================================== */

/* GPU acceleration */
.scroll-indicator-line,
.scroll-dots-container,
.scroll-dot {
    transform: translate3d(0, 0, 0);
}

/* Reduce repaints */
.scroll-dot {
    will-change: background, border-color, transform, box-shadow;
}