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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(45, 168, 120, 0.15);
    color: #0a1824;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f0f4f8;
}
::-webkit-scrollbar-thumb {
    background: #bcebd4;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #85d9b5;
}

/* === Navbar === */
.nav-logo-text {
    transition: color 0.3s ease;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #2da878;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(10, 24, 36, 0.06);
}

.navbar-scrolled .nav-logo-text {
    color: #0a1824;
}

.navbar-scrolled .nav-link {
    color: #152f44;
}

.navbar-hero .nav-link {
    color: #152f44;
}

/* === Mobile Menu === */
.mobile-link {
    position: relative;
}

/* === Scroll Indicator === */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 0.8; transform: scaleY(1.2); }
}

.write-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* === Reveal Animations === */
.reveal {
    opacity: 1;
    transform: translateY(0);
    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);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .scroll-line {
        animation: none;
        opacity: 0.5;
    }
}

/* === Form === */
input:focus,
textarea:focus {
    border-color: #85d9b5 !important;
    box-shadow: 0 0 0 3px rgba(133, 217, 181, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: #a3b8cc;
}

/* === Image hover === */
img {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* === Menu hover === */
.group:hover .group-hover\\:translate-x-1 {
    transform: translateX(0.25rem);
}

/* === Utility === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
