/* ===== COMPONENTS ===== */

/* ===== PRELOADER ===== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-preloader);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-xl);
}

.preloader-logo .logo-text {
    font-family: var(--font-heading);
    font-size: var(--fs-4xl);
    font-weight: var(--fw-extrabold);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-dot {
    width: 12px;
    height: 12px;
    background: var(--accent-secondary);
    border-radius: 50%;
    animation: pulse 1s ease-in-out infinite;
}

.preloader-bar {
    width: 200px;
    height: 3px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.preloader-progress {
    width: 0;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    animation: loading 1.5s ease-in-out forwards;
}

@keyframes loading {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}

/* ===== CURSOR ===== */
.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease, opacity 0.3s ease, width 0.3s ease, height 0.3s ease;
}

.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

.cursor-follower.visible,
.cursor-dot.visible {
    opacity: 1;
}

.cursor-follower.hover {
    width: 60px;
    height: 60px;
    border-color: var(--accent-secondary);
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--space-md) 0;
    z-index: var(--z-fixed);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: var(--space-sm) 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.nav-logo {
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-weight: var(--fw-extrabold);
    color: var(--text-primary);
}

.logo-accent {
    color: var(--accent-primary);
    font-size: var(--fs-2xl);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-link {
    position: relative;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text-secondary);
    transition: color var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .moon-icon {
    display: none;
}

.nav-cta {
    padding: var(--space-sm) var(--space-lg);
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: white;
    transition: all var(--transition-base);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-sm);
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-base);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--glass-bg);
    border-color: var(--accent-primary);
    transform: translateY(-3px);
}

/* ===== MARQUEE ===== */
.marquee-section {
    padding: var(--space-xl) 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.marquee {
    display: flex;
    gap: var(--space-xl);
}

.marquee-content {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    animation: marquee 30s linear infinite;
    flex-shrink: 0;
}

.marquee:hover .marquee-content {
    animation-play-state: paused;
}

.marquee-item {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    color: var(--text-secondary);
    white-space: nowrap;
    transition: color var(--transition-base);
}

.marquee-item:hover {
    color: var(--text-primary);
}

.marquee-dot {
    color: var(--accent-primary);
    font-size: var(--fs-sm);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* ===== CARDS ===== */
.card {
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: all var(--transition-base);
    overflow: hidden;
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-5px);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 50%;
    width: 200px;
    height: 200px;
    background: var(--gradient-glow);
    border-radius: 50%;
    transform: translateX(-50%) translateY(-50%);
    opacity: 0;
    transition: opacity var(--transition-slow);
    pointer-events: none;
}

.card:hover .card-glow {
    opacity: 1;
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-2xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-tertiary);
    font-size: var(--fs-sm);
    animation: float 2s ease-in-out infinite;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-tertiary);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s ease-in-out infinite;
}

@keyframes scroll {

    0%,
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    50% {
        opacity: 0.5;
        transform: translateX(-50%) translateY(10px);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        background: var(--bg-secondary);
        border-left: 1px solid var(--border-color);
        transition: right var(--transition-base);
        z-index: var(--z-fixed);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-cta {
        display: none;
    }
}

@media (max-width: 768px) {

    .cursor-follower,
    .cursor-dot {
        display: none;
    }
}