/* 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 {
    margin: 0;
    overflow-x: hidden;
}

/* Hero entrance animations — content is visible by default, JS enhances */
#hero .hero-sub {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

#hero .hero-title {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease 0.15s, transform 0.8s ease 0.15s;
}

#hero .hero-desc {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

#hero .hero-cta {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s ease 0.45s, transform 0.8s ease 0.45s;
}

.js #hero .hero-sub,
.js #hero .hero-title,
.js #hero .hero-desc,
.js #hero .hero-cta {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll reveal — progressive enhancement, JS adds .visible */
.js .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Staggered reveal delays */
.js .reveal:nth-child(2) { transition-delay: 0.1s; }
.js .reveal:nth-child(3) { transition-delay: 0.2s; }

/* Navbar transition */
#navbar.scrolled {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

/* Nav link hover underline effect */
.nav-link {
    position: relative;
}

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

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

/* Mobile nav links */
.mobile-nav-link {
    position: relative;
    display: block;
    padding: 4px 0;
}

/* Menu toggle animation */
#menu-icon {
    transition: transform 0.3s ease;
}

#menu-toggle.active #menu-icon {
    transform: rotate(90deg);
}

/* Image hover zoom */
img {
    max-width: 100%;
    height: auto;
}

/* Selection color */
::selection {
    background: rgba(242, 112, 95, 0.2);
    color: inherit;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    #hero .hero-sub,
    #hero .hero-title,
    #hero .hero-desc,
    #hero .hero-cta {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.2;
    }
}

@media (min-width: 768px) {
    /* Subtle parallax on hero image */
    #hero {
        will-change: transform;
    }
}
