/* Preloader Container */
.preloader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    font-family: 'Arial', sans-serif;
}

/* MONAMI Loader */
.monami-loader {
    display: flex;
    gap: 5px;
    margin: 0.25em 0;
    align-items: center;
    justify-content: center;
}

/* SVG Styles */
.absolute {
    position: absolute;
}

.inline-block {
    display: inline-block;
}

/* Animation Classes */
.dash {
    animation: dashArray 2s ease-in-out infinite, dashOffset 2s linear infinite;
}

.spin {
    animation: spinDashArray 2s ease-in-out infinite, spin 4s ease-in-out infinite, dashOffset 2s linear infinite;
    transform-origin: center;
}

/* Loading Text */
.loading-text {
    margin-top: 30px;
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.loading-text span {
    display: inline-block;
    animation: typewriter 0.1s ease-in-out forwards;
    opacity: 0;
    margin: 0 1px;
}

/* Animations */
@keyframes dashArray {
    0% {
        stroke-dasharray: 0 1 359 0;
    }

    50% {
        stroke-dasharray: 0 359 1 0;
    }

    100% {
        stroke-dasharray: 359 1 0 0;
    }
}

@keyframes spinDashArray {
    0% {
        stroke-dasharray: 270 90;
    }

    50% {
        stroke-dasharray: 0 360;
    }

    100% {
        stroke-dasharray: 270 90;
    }
}

@keyframes dashOffset {
    0% {
        stroke-dashoffset: 365;
    }

    100% {
        stroke-dashoffset: 5;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(90deg);
    }

    50% {
        transform: rotate(180deg);
    }

    75% {
        transform: rotate(270deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes typewriter {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading text delays */
.loading-text span:nth-child(1) {
    animation-delay: 0.5s;
}

.loading-text span:nth-child(2) {
    animation-delay: 0.6s;
}

.loading-text span:nth-child(3) {
    animation-delay: 0.7s;
}

.loading-text span:nth-child(4) {
    animation-delay: 0.8s;
}

.loading-text span:nth-child(5) {
    animation-delay: 0.9s;
}

.loading-text span:nth-child(6) {
    animation-delay: 1.0s;
}

.loading-text span:nth-child(7) {
    animation-delay: 1.1s;
}

/* Responsive Design */
@media (max-width: 768px) {
    .monami-loader {
        gap: 3px;
    }

    .monami-loader svg {
        width: 60px;
        height: 60px;
    }

    .loading-text {
        font-size: 16px;
    }
}

/* Smooth transitions for the mobile menu */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Custom scrollbar for language grid inside your existing structure */
#langGrid::-webkit-scrollbar {
    width: 6px;
}

#langGrid::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

/* Styling for your JS generated grid items */
.lang-option {
    display: flex;
    align-items: center;
    padding: 8px;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 4px;
}

.lang-option:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.lang-option .flag {
    font-size: 1.2em;
    margin-right: 10px;
}

.lang-option .lang-name {
    font-size: 0.875rem;
    /* text-xs equivalent */
}

/* Core Styling */
body {
    background-color: #050505;
    color: #EAEAEA;
    overflow-x: hidden;
    cursor: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #050505;
}

::-webkit-scrollbar-thumb {
    background: #C5A059;
    border-radius: 3px;
}

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: #C5A059;
    width: 0%;
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* Custom Cursor */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: #C5A059;
    border-radius: 50%;
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    mix-blend-mode: exclusion;
}

.cursor-circle {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: fixed;
    z-index: 9998;
    pointer-events: none;
    transition: transform 0.1s;
    mix-blend-mode: difference;
}

/* Typography */
.magazine-serif {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
}

.magazine-headline {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.04em;
}

/* Layout */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9000;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Canvas */
#webgl {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    opacity: 0;
}

/* Double Spread Utils */
.page-fold {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    z-index: 30;
    pointer-events: none;
}

.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Davies Style Tilt Card Utils */
.project-card {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.tilt-inner {
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

.tilt-image {
    transform: translateZ(20px);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.tilt-content {
    transform: translateZ(40px);
}

.project-card:hover .tilt-image {
    filter: grayscale(0%) contrast(1.1);
}

.tilt-image {
    filter: grayscale(100%) contrast(1.2);
}

/* Input Utils */
.input-line {
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    outline: none;
    transition: all 0.3s ease;
}

.input-line:focus {
    border-bottom: 1px solid #C5A059;
}

/* Scroll to Top Btn */
#back-to-top {
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Social Icon Styling */
.social-icon {
    transition: all 0.3s ease;
}

.social-group:hover .social-icon {
    border-color: #C5A059;
    transform: translateY(-3px);
}

/* Hero Animation Fix */
.reveal-text {
    opacity: 0;
    transform: translateY(20px);
}

/* Text Stroke for Marquee */
.text-stroke {
    -webkit-text-stroke: 1px #EAEAEA;
    color: transparent;
}

