/* Ensure Figtree font loads properly */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700;800;900&display=swap');

/* Typography Fixed Viewport Animation Styles */

/* Typography Section Wrapper - Remove any default spacing */
.typography-section-wrapper {
    margin: 0; /* Ensures no top margin either */
    padding: 0;
    overflow: hidden;
}

/* Fixed Viewport Container */
.typography-fixed-viewport {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #f2f3f4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Scroll Proxy - This creates the scrollable height without moving the viewport */
.typography-scroll-proxy {
    height: 300vh; /* Increased height for slower scroll through all 4 texts */
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Typography Container within Fixed Viewport */
.typography-fixed-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    z-index: 10;
}

/* Each Text Animation State */
.typography-text-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
}

/* SVG Text Styling */
.typography-fixed-svg {
    width: 1400px; /* Matches JS > 768px viewBox width */
    height: 400px; /* Matches JS > 768px viewBox height */
    /* max-width: 95vw; Removed to prevent conflict with viewBox scaling */
    transform-origin: center center;
    will-change: transform, opacity, filter;
    filter: drop-shadow(0 0 50px rgba(255, 255, 255, 0.1));
}

.typography-fixed-svg text {
    font-family: 'Figtree', sans-serif !important;
    font-weight: 900;
    font-size: 280px; /* Reduced from 320px */
    letter-spacing: -0.08em;
    text-anchor: middle;
    dominant-baseline: central;
    will-change: transform, filter, letter-spacing;
    fill: #050926 !important;
    color: #050926 !important;
}

/* Additional specificity for SVG text elements */
.typography-fixed-viewport svg text,
.typography-text-state svg text {
    font-family: 'Figtree', sans-serif !important;
    font-weight: 900 !important;
    fill: #050926 !important;
    color: #050926 !important;
}

/* Typography Paragraph Styling */
.typography-paragraph {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translateX(-50%);
    color: #000000;
    font-family: 'Figtree', sans-serif;
    font-size: 24px;
    font-weight: 400;
    text-align: center;
    max-width: 700px;
    line-height: 1.6;
    opacity: 0;
    padding: 0 20px;
    z-index: 20;
}

/* Floating Particles for Fixed Viewport */
.typography-fixed-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.typography-fixed-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: floatFixed 20s linear infinite;
    opacity: 0.6;
}

@keyframes floatFixed {
    0% {
        transform: translateY(100vh) translateX(0px);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-10vh) translateX(50px);
        opacity: 0;
    }
}

/* Progress Indicator */
.typography-progress-indicator {
    position: fixed;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.typography-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.typography-progress-dot.active {
    background: #007bff;
    transform: scale(1.5);
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.5);
}

/* Text Labels for Progress */
.typography-text-labels {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.typography-text-labels.visible {
    opacity: 1;
}
/* Mobile Responsive */
@media (max-width: 768px) {
    .typography-fixed-svg {
        width: 800px;
        height: 280px;
    }
    
    .typography-fixed-svg text {
        font-size: 200px; /* Reduced from 240px */
    }
    
    .typography-paragraph {
        font-size: 20px;
        max-width: 550px;
        top: 68%;
    }
    
    .typography-progress-indicator {
        right: 20px;
    }
    
    .typography-text-labels {
        bottom: 20px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .typography-fixed-svg {
        width: 600px;
        height: 200px;
    }
    
    .typography-fixed-svg text {
        font-size: 140px; /* Reduced from 160px */
    }
    
    .typography-paragraph {
        font-size: 16px;
        max-width: 350px;
        top: 70%;
    }
    
    .typography-progress-dot {
        width: 6px;
        height: 6px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .typography-fixed-particle {
        animation: none !important;
        opacity: 0.2;
    }
    
    .typography-fixed-svg {
        transition: none !important;
    }
    
    .typography-progress-dot {
        transition: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .typography-fixed-viewport {
        background: #000;
    }
    
    .typography-fixed-svg text {
        fill: #fff !important;
        filter: none !important;
    }
    
    .typography-progress-dot {
        background: #fff;
    }
    
    .typography-progress-dot.active {
        background: #00ff00;
    }
}
