html {
    background-color: #f8fafc;
    transition: background-color 0.5s ease;
    overflow-x: hidden;
}

html.dark {
    background-color: #0c1324;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: hidden;
    background-color: transparent;
    color: #0f172a;
    font-family: 'Inter', sans-serif;
    transition: color 0.5s ease;
}

html.dark body {
    color: #dce1fb;
}

#scroll-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 10;
}

#scroll-wrapper {
    width: 100%;
    will-change: transform;
    transition: transform 1s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.section {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: opacity 0.8s ease, transform 0.8s ease;
    padding: 80px 20px;
}

@media (max-width: 768px) {
    body {
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    #scroll-container {
        position: relative;
        height: auto;
        width: 100%;
        overflow: visible;
    }
    #scroll-wrapper {
        transform: none !important;
        transition: none !important;
    }
    .section {
        height: auto;
        min-height: auto;
        opacity: 1 !important;
        transform: none !important;
        padding: 60px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .stagger-item {
        opacity: 1 !important;
        transform: none !important;
    }
    #progress-indicator {
        display: none !important;
    }
}



.section.active {
    opacity: 1;
    transform: scale(1);
}

.section.inactive {
    opacity: 0.4;
    transform: scale(0.95);
}

/* Staggered Animations */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.section.active .stagger-item {
    opacity: 1;
    transform: translateY(0);
}

.section.active .stagger-item:nth-child(1) {
    transition-delay: 0.1s;
}

.section.active .stagger-item:nth-child(2) {
    transition-delay: 0.2s;
}

.section.active .stagger-item:nth-child(3) {
    transition-delay: 0.3s;
}

.section.active .stagger-item:nth-child(4) {
    transition-delay: 0.4s;
}

/* Animated Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

#glow-effect {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.08) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
    transition: top 0.1s ease-out, left 0.1s ease-out, background 0.5s ease;
}

html.dark #glow-effect {
    background: radial-gradient(circle, rgba(5, 150, 105, 0.15) 0%, transparent 70%);
}

@media (min-width: 769px) {
    body.snap-scroll-page {
        overflow-y: hidden !important;
    }
}

/* Glass & UI Elements */
.glass-panel {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease-out;
}

html.dark .glass-panel {
    background: rgba(21, 27, 45, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

.section.active .glass-panel:not(.nav-btn):hover {
    border-color: rgba(5, 150, 105, 0.4);
    box-shadow: 0 12px 40px rgba(5, 150, 105, 0.15);
    transform: translateY(-5px) scale(1.02) !important;
}

/* Space Grotesk Tight Tracking */
.font-space-tight {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.03em;
}

/* Pulse Animation */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.pulse-ring::before {
    content: '';
    position: absolute;
    left: -20px;
    top: -20px;
    right: -20px;
    bottom: -20px;
    border-radius: 50%;
    border: 1px solid rgba(5, 150, 105, 0.4);
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

html.dark .pulse-ring::before {
    border: 1px solid rgba(5, 150, 105, 0.5);
}

/* Side Progress Indicator */
#progress-indicator {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
}

html.dark .progress-dot {
    background-color: rgba(255, 255, 255, 0.2);
}

.progress-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 24px;
    height: 24px;
    border: 1px solid #059669;
    border-radius: 50%;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.progress-dot.active {
    background-color: #007AFF;
    box-shadow: 0 0 10px #007AFF;
}

.progress-dot.active::after {
    transform: translate(-50%, -50%) scale(1);
}

.mobile-nav-link {
    transition: all 0.3s ease;
    letter-spacing: -0.02em;
}

.mobile-nav-link:hover {
    color: #059669 !important;
    transform: translateX(10px);
}

.mobile-nav-link.active {
    color: #059669 !important;
}

#lang-toggle:active #lang-text,
#mobile-menu-btn:active {
    color: #059669 !important;
}

/* Marquee Animation */
.marquee-container {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    animation: scroll-left 120s linear infinite;
}

/* Hide scrollbars while preserving scroll behavior */
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.marquee-container:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}