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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scroll Reveal — progressive enhancement, only active when JS runs */
@media (prefers-reduced-motion: no-preference) {
    .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);
    }
}

/* Nav */
#navbar {
    background: rgba(250, 250, 252, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-link {
    position: relative;
}

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

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

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

#mobile-menu.open .mobile-menu-link {
    animation: fadeDown 0.3s ease forwards;
}

#mobile-menu.open .mobile-menu-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-menu-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-menu-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-menu-link:nth-child(4) { animation-delay: 0.2s; }

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu button */
body.menu-open .mobile-menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

body.menu-open .mobile-menu-line:nth-child(2) {
    opacity: 0;
}

body.menu-open .mobile-menu-line:nth-child(3) {
    width: 6px;
    transform: translateY(-4px) rotate(-45deg);
}

/* Subtle line decorations */
.hero-line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawLine 1.5s ease forwards;
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

/* Menu hover */
.group:hover .menu-dot {
    transform: scale(1.5);
    background-color: #0d9488;
}

.menu-dot {
    transition: all 0.3s ease;
}

/* Image hover */
img {
    display: block;
}

/* Selection */
::selection {
    background-color: #ccfbf1;
    color: #134e4a;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
