/* Base styles & custom properties */
:root {
    --font-heading: 'Nunito', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

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

body {
    font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* Scroll animation base — always visible by default */
.scroll-animate {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Progressive enhancement: animate on scroll when JS is available */
@media (prefers-reduced-motion: no-preference) {
    .scroll-animate.is-hidden {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* Mobile menu transition */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* Navbar scroll state */
#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Selection color */
::selection {
    background-color: #ff8a6e;
    color: white;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f6f6f7;
}
::-webkit-scrollbar-thumb {
    background: #c7c8cc;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a1a3aa;
}

/* Focus visible styles */
:focus-visible {
    outline: 3px solid #ff8a6e;
    outline-offset: 2px;
    border-radius: 4px;
}

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

/* Image lazy loading fade */
img[loading="lazy"] {
    transition: opacity 0.3s ease;
}

img[loading="lazy"]:not([src]) {
    opacity: 0;
}

/* Print styles */
@media print {
    header, footer, #contact-form {
        display: none;
    }
    body {
        color: #000;
        background: #fff;
    }
}
