/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #020c1b;
    /* Deep Navy */
    color: #e6f1ff;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #020c1b;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    /* Stack logo and bar */
    transition: opacity 0.8s ease-out;
}

.loader-logo {
    width: 150px;
    height: auto;
    margin-bottom: 20px;
    animation: pulseLogo 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

@keyframes pulseLogo {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.loader {
    width: 200px;
    height: 2px;
    background: rgba(192, 192, 192, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.bar {
    width: 0%;
    height: 100%;
    background: #C0C0C0;
    /* Silver */
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    animation: load 2s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes load {
    0% {
        width: 0%;
    }

    50% {
        width: 40%;
    }

    100% {
        width: 100%;
    }
}

/* Main Content */
#main-content {
    text-align: center;
    position: relative;
    z-index: 1;
    width: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in;
}

#main-content.visible {
    opacity: 1;
}

/* Background Animation - Starfield/particles over Navy */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(to bottom, #020c1b 0%, #05162e 100%);
    overflow: hidden;
}

/* Stars Layer 1 */
.background-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(white, rgba(255, 255, 255, .2) 2px, transparent 3px),
        radial-gradient(white, rgba(255, 255, 255, .15) 1px, transparent 2px),
        radial-gradient(white, rgba(255, 255, 255, .1) 2px, transparent 3px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
    animation: starsAnimation 60s linear infinite;
    opacity: 0.6;
}

/* Stars Layer 2 (Slower, smaller) */
.background-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(white, rgba(255, 255, 255, .1) 1px, transparent 1px),
        radial-gradient(white, rgba(255, 255, 255, .1) 1px, transparent 1px);
    background-size: 400px 400px, 300px 300px;
    background-position: 10px 10px, 100px 100px;
    animation: starsAnimation 120s linear infinite;
    opacity: 0.4;
}

@keyframes starsAnimation {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-550px);
    }
}

/* Brand Logo */
.logo-container {
    margin-bottom: 2rem;
    perspective: 1000px;
}

.brand-logo {
    max-width: 80%;
    height: auto;
    width: 400px;
    /* Default width */
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    animation: logoReveal 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.1));
}

@keyframes logoReveal {
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Floating animation for logo after load */
.brand-logo {
    animation: logoReveal 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards,
        floatLogo 4s ease-in-out infinite 1.5s;
    /* Start float after reveal */
}

@keyframes floatLogo {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Subtext - www.feykar.com */
.sub-text {
    font-size: 0.9rem;
    /* Smaller */
    color: #e0e0e0;
    margin-top: -2rem;
    margin-bottom: 3rem;
    letter-spacing: 0.4rem;
    /* Wider spacing for elegance */
    opacity: 0;
    animation: fadeInSubtext 2s ease-out forwards;
    animation-delay: 1.8s;
    font-weight: 200;
    /* Thinner */
}

@keyframes fadeInSubtext {
    to {
        opacity: 0.8;
    }
}

/* Contact Button - Rotating Neon Border */
.contact-btn {
    position: relative;
    display: inline-block;
    padding: 20px 60px;
    font-size: 1.1rem;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.5);
    /* Semi-transparent bg */
    border-radius: 50px;
    overflow: hidden;
    transition: 0.5s;
    opacity: 0;
    animation: fadeInBtn 1s ease-out forwards;
    animation-delay: 2.2s;
    /* Remove default border */
    border: none;
}

.contact-btn span {
    position: relative;
    z-index: 1;
    /* Keep text above border */
    font-weight: 600;
}

/* Rotating Border Effect */
.contact-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 300%;
    background: conic-gradient(transparent,
            transparent,
            transparent,
            #00f2ff,
            /* Harmonious Blue / Cyan */
            #00f2ff);
    transform: translate(-50%, -50%);
    /* Centered */
    animation: rotateBorder 4s linear infinite;
}

.contact-btn::after {
    content: '';
    position: absolute;
    inset: 3px;
    /* Border thickness */
    background: #020c1b;
    /* Match body bg to create "border" look */
    border-radius: 48px;
    z-index: 0;
}

@keyframes rotateBorder {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.contact-btn:hover {
    box-shadow: 0 0 20px #00f2ff;
    background: #00f2ff;
    color: #000;
}

.contact-btn:hover::after {
    background: #00f2ff;
    /* Fill on hover */
    opacity: 0;
    /* Or just hide it to show full fill */
    transition: 0.3s;
}

.contact-btn:hover span {
    color: #000;
}

@keyframes fadeInBtn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .brand-text {
        font-size: 2.5rem;
        letter-spacing: 0.5rem;
        margin-left: 0.5rem;
    }

    .sub-text {
        font-size: 0.9rem;
        margin-top: -1.5rem;
    }

    .contact-btn {
        padding: 15px 40px;
        font-size: 0.9rem;
    }

    .loader {
        width: 150px;
    }
}