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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #D4A843;
    color: #160916;
}

/* Hero Animations */
.hero-headline-block {
    display: block;
    transform: translateY(100%);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-headline-block:nth-child(1) { animation-delay: 0.1s; }
.hero-headline-block:nth-child(2) { animation-delay: 0.2s; }
.hero-headline-block:nth-child(3) { animation-delay: 0.3s; }
.hero-headline-block:nth-child(4) { animation-delay: 0.4s; }
.hero-headline-block:nth-child(5) { animation-delay: 0.5s; }

.hero-subtitle {
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Navbar */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(250, 250, 248, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(74, 25, 66, 0.08);
}

#navbar.scrolled .font-serif,
#navbar.scrolled .text-plum-800 {
    color: #160916 !important;
}

#navbar.scrolled .text-plum-600\/70 {
    color: rgba(22, 9, 22, 0.6) !important;
}

#navbar.scrolled .menu-line {
    background-color: #160916;
}

#navbar.scrolled nav a {
    color: #160916;
}

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

#mobileMenu.open .mobile-link {
    animation: mobileLinkIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

@keyframes mobileLinkIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hamburger */
.menu-line {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* Image hover effects */
.group img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Card hover shadow */
.group:hover {
    box-shadow: 0 25px 50px -12px rgba(74, 25, 66, 0.15);
}

/* Form focus styles */
input:focus,
textarea:focus {
    border-color: #D4A843 !important;
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
}

/* Button hover lift */
button, a {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

button:hover, a:hover {
    transform: translateY(-1px);
}

button:active, a:active {
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 767px) {
    section[id] {
        scroll-margin-top: 70px;
    }
}
