/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

/* Diagonal clip for hero */
.clip-diagonal {
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(10, 15, 30, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(45, 212, 168, 0.1);
}

nav.scrolled .nav-line {
    background: white;
}

/* Mobile menu */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    transition: opacity 0.2s;
}

/* Scroll reveal - progressive enhancement via JS */
.scroll-reveal {
    /* Default: visible. JS adds .revealed for animation. */
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.revealed {
        animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(32px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation delays */
.scroll-reveal:nth-child(1) { animation-delay: 0.05s; }
.scroll-reveal:nth-child(2) { animation-delay: 0.12s; }
.scroll-reveal:nth-child(3) { animation-delay: 0.19s; }
.scroll-reveal:nth-child(4) { animation-delay: 0.26s; }
.scroll-reveal:nth-child(5) { animation-delay: 0.33s; }
.scroll-reveal:nth-child(6) { animation-delay: 0.40s; }

/* Form focus ring */
input:focus, textarea:focus {
    outline: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0f1e;
}
::-webkit-scrollbar-thumb {
    background: #162044;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #111d38;
}

/* Selection */
::selection {
    background: rgba(45, 212, 168, 0.3);
    color: white;
}

/* Image aspect ratios */
img {
    display: block;
    max-width: 100%;
}

/* Button hover effects */
a, button {
    -webkit-tap-highlight-color: transparent;
}
