/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    line-height: 1.6;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

body.loaded {
    opacity: 1;
}

/* Container */
.container {
    max-width: 1920px;
    margin: 0 auto;
    background-color: #ffffff;
}

/* Slide Sections */
.slide {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: #ffffff;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.slide.revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
    will-change: transform;
    opacity: 1;
    filter: blur(0);
}

.slide img.loading {
    opacity: 0.7;
    filter: blur(3px);
}

.slide img.loaded {
    opacity: 1;
    filter: blur(0);
}

/* Smooth hover effect on images */
.slide:hover img {
    transform: scale(1.005);
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #e63946 0%, #ff6b6b 50%, #ff8787 100%);
    z-index: 9999;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.5);
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity;
}

.scroll-indicator span {
    display: block;
    width: 50px;
    height: 50px;
    border: 3px solid #e63946;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #e63946;
    background-color: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.scroll-indicator span:hover {
    background-color: #e63946;
    color: white;
    transform: scale(1.15);
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.3);
}

.scroll-indicator span:active {
    transform: scale(0.95);
}

/* Hide scroll indicator after scrolling */
body.scrolled .scroll-indicator {
    opacity: 0 !important;
    pointer-events: none;
}

/* Float Animation (more subtle) */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #e63946;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 10px;
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Parallax Effect on Scroll */
@media (prefers-reduced-motion: no-preference) {
    .slide img {
        transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .slide img {
        width: 100%;
    }
    
    .scroll-progress {
        height: 3px;
    }
}

@media screen and (max-width: 768px) {
    .scroll-indicator {
        bottom: 20px;
    }
    
    .scroll-indicator span {
        width: 45px;
        height: 45px;
        font-size: 24px;
        border-width: 2px;
    }
    
    .scroll-progress {
        height: 3px;
    }
}

@media screen and (max-width: 480px) {
    .scroll-indicator span {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .scroll-progress {
        height: 2px;
    }
}

/* Smooth transitions for reduced motion users */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print Styles */
@media print {
    .scroll-indicator,
    .scroll-progress {
        display: none;
    }
    
    .slide {
        page-break-inside: avoid;
        page-break-after: always;
    }
    
    .slide:last-child {
        page-break-after: auto;
    }
}

/* Custom Selection Color */
::selection {
    background-color: #e63946;
    color: white;
}

::-moz-selection {
    background-color: #e63946;
    color: white;
}

/* Custom Scrollbar (Webkit browsers) */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #e63946 0%, #ff6b6b 100%);
    border-radius: 6px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #d62839 0%, #e63946 100%);
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid #e63946;
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

/* Smooth entrance animations */
.slide:nth-child(1) { animation: fadeInUp 0.8s ease-out 0.1s both; }
.slide:nth-child(2) { animation: fadeInUp 0.8s ease-out 0.2s both; }
.slide:nth-child(3) { animation: fadeInUp 0.8s ease-out 0.3s both; }

/* Performance optimizations */
.slide,
.slide img {
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Preload hint */
body::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    z-index: -1;
}