/* Base reset and custom styles */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f0f4f8;
}
::-webkit-scrollbar-thumb {
    background: #a8bdd8;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7b99c3;
}

/* Selection color */
::selection {
    background: #c5ebe0;
    color: #0d1f33;
}

/* Nav transition states */
nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(13, 31, 51, 0.06);
}

nav.scrolled .nav-logo {
    color: #0d1f33;
}

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

.mobile-menu-open #menu-line-1 {
    transform: rotate(45deg) translate(3px, 3px);
}
.mobile-menu-open #menu-line-2 {
    opacity: 0;
}
.mobile-menu-open #menu-line-3 {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .overflow-hidden img {
        transition: none;
    }
    .group:hover .overflow-hidden img {
        transform: none;
    }
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #5ebfad;
    outline-offset: 2px;
}

/* Form focus transitions */
input:focus,
textarea:focus {
    border-bottom-color: #5ebfad !important;
}
