/* 
    ==========================================================================
    MAIN DESIGN SYSTEM & GLOBAL STYLES
    Unfold Group - Official Tech Aesthetic
    ==========================================================================
*/

:root {
    /* Brand Colors */
    --color-primary: #6C3BFF;
    --color-secondary: #E44BB3;
    --color-accent: #F7A24B;
    --color-bg: #0B0B0B;
    --color-surface: #151515;
    --color-text: #FFFFFF;
    --color-text-dim: rgba(255, 255, 255, 0.6);

    /* Typography */
    --font-main: 'Outfit', sans-serif;

    /* Dimensions */
    --header-height: 80px;
    --container-max: 1200px;
    --radius-full: 9999px;
    --radius-lg: 30px;
    --radius-md: 12px;

    /* Transitions */
    --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.2s ease;
}

/* 
    =========================================
    FOUNDATION
    =========================================
*/

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg);
    /* Lightweight static gradients for performance */
    background-image:
        radial-gradient(circle at 0% 0%, rgba(108, 59, 255, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(228, 75, 179, 0.03) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--color-text);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--color-primary);
    color: white;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #333;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

/* 
    =========================================
    GLOBAL COMPONENTS & UTILITIES
    =========================================
*/

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(108, 59, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 30px rgba(108, 59, 255, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-outline:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.05);
}

/* 
    =========================================
    HEADER & NAVIGATION
    =========================================
*/

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(11, 11, 11, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 1000;
    transition: all 0.4s var(--transition-smooth);
}

/* Mobile Menu Appearance Control */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    /* Specific width */
    height: 100vh;
    background: #0B0B0B;
    padding: 100px 30px 40px;
    display: none;
    /* Hidden by default for desktop */
    flex-direction: column;
    gap: 24px;
    transition: right 0.4s var(--transition-smooth);
    z-index: 1100;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
}

.mobile-menu.active {
    display: flex;
    /* Only show when triggered */
    right: 0;
}

.mobile-menu .nav-link {
    font-size: 20px;
    width: 100%;
    padding: 12px 0;
}

.header.scrolled {
    background: rgba(11, 11, 11, 0.85);
    height: 70px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
    transition: transform 0.4s var(--transition-smooth);
}

.header.scrolled .brand-logo {
    transform: scale(0.9);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-link {
    font-weight: 500;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    padding: 8px 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-secondary);
    transition: width 0.4s var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* 
    =========================================
    FOOTER
    =========================================
*/

/* 
    =========================================
    FOOTER
    =========================================
*/

.footer {
    background: #050505;
    padding: 80px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 100px;
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--color-text-dim);
    margin-top: 24px;
    max-width: 320px;
    line-height: 1.8;
}

.footer-heading {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 24px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-links a {
    color: var(--color-text-dim);
    transition: all 0.3s var(--transition-smooth);
    display: inline-block;
}

.footer-links a:hover {
    color: white;
    transform: translateX(8px);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    color: var(--color-text-dim);
}

.contact-info i {
    color: var(--color-primary);
    margin-top: 4px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.social-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-dim);
    transition: all 0.3s var(--transition-smooth);
}

.social-icon:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-5px);
    border-color: transparent;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text-dim);
    font-size: 14px;
}

.legal-links {
    display: flex;
    gap: 40px;
}

.legal-links a {
    transition: color 0.3s;
}

.legal-links a:hover {
    color: white;
}

/* 
    =========================================
    UI INTERACTIVE ELEMENTS
    =========================================
*/

/* Preloader */
#preloader {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(108, 59, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    border-bottom-color: var(--color-secondary);
    animation: loaderSpin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

@keyframes loaderSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile Toggle */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.bar {
    width: 24px;
    height: 2px;
    background-color: white;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .header {
        height: 70px;
        background: rgba(11, 11, 11, 0.9);
        /* Solid background for mobile */
    }

    .brand-logo {
        height: 35px;
    }

    .nav-menu {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-brand p {
        margin: 20px auto;
    }

    .footer-bottom {
        flex-direction: column-reverse;
        text-align: center;
        gap: 20px;
    }

    .legal-links {
        justify-content: center;
    }
}

/* Global Content Wrapper Padding */
main {
    padding-top: var(--header-height);
    min-height: 80vh;
}