/* ── Base & Typography ── */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(74, 156, 104, 0.3);
    color: #f0f4f8;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #060e17;
}
::-webkit-scrollbar-thumb {
    background: #2d4364;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4a9c68;
}

/* ── Navigation ── */
.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #f0f4f8 !important;
}

/* ── Navbar Scroll State ── */
.navbar-scrolled {
    background: rgba(6, 14, 23, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(168, 213, 186, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-scrolled .nav-link {
    color: rgba(168, 213, 186, 0.7) !important;
}

/* ── Mobile Menu ── */
.mobile-link {
    position: relative;
    display: block;
    padding: 0.5rem 0;
}

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

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

/* ── 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);
}

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }

/* ── Hero Section ── */
#hero {
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(6, 14, 23, 0.4) 0%,
        rgba(6, 14, 23, 0.2) 40%,
        rgba(6, 14, 23, 0.3) 70%,
        rgba(6, 14, 23, 0.9) 100%
    );
    z-index: 1;
    pointer-events: none;
}

#hero > *:not(.absolute) {
    position: relative;
    z-index: 2;
}

/* ── Button Hover Effects ── */
button, a {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Image Hover ── */
img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Form Focus States ── */
input:focus, textarea:focus {
    outline: none;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    
    img:hover {
        transform: none !important;
    }
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.15;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .reveal {
        transition-duration: 0.6s;
    }
}

@media (min-width: 1024px) {
    .reveal {
        transition-duration: 0.8s;
    }
}

/* ── Print Styles ── */
@media print {
    header, footer, .reveal, #menuToggle, #mobileMenu {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    a {
        color: black !important;
        text-decoration: underline;
    }
}
