/* Global Styles */

@font-face {
    font-family: 'Inria Serif';
    src: url('../../assets/fonts/Inria_Serif/InriaSerif-Regular.ttf') format('truetype');
    font-weight: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
html, body {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;     /* Firefox */
    overflow-y: auto;          /* Allow scrolling only when needed */
    overflow-x: hidden;        /* Disable horizontal scrolling */
    max-width: 100%;
}

body{
    padding-top: 30px;
}

@media (max-width: 768px) {
    body {
        padding-top: 50px;
    }
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1f2a44 0%, #142038 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out 0.2s;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-spinner {
    text-align: center;
}

.spinner-ring {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(230, 215, 195, 0.3);
    border-top-color: #e6d7c3;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: #e6d7c3;
    font-family: 'Inria Serif', serif;
    font-size: 16px;
    letter-spacing: 2px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Image Optimization */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Preserve transparency for lazy-loaded images */
/* Layout shift prevention relies on width/height attributes instead */
img[loading="lazy"]:not([width]) {
    /* Only add aspect-ratio for images without explicit dimensions */
    aspect-ratio: auto;
}

video {
    display: block;
    max-width: 100%;
    height: auto;
}