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

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

body {
    overflow-x: hidden;
}

::selection {
    background: color-mix(in srgb, theme('colors.amber.300') 40%, transparent);
    color: theme('colors.plum.950');
}

/* Animations */
@keyframes slowZoom {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

.animate-slow-zoom {
    animation: slowZoom 20s ease-in-out infinite alternate;
}

/* Hero Animations */
.hero-subtitle {
    animation: fadeUp 0.8s ease forwards 0.3s;
}

.hero-title {
    animation: fadeUp 0.8s ease forwards 0.5s;
}

.hero-desc {
    animation: fadeUp 0.8s ease forwards 0.7s;
}

.hero-cta {
    animation: fadeUp 0.8s ease forwards 0.9s;
}

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

/* Reveal on Scroll */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    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.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal:nth-child(2) {
    transition-delay: 0.1s;
}

.reveal:nth-child(3) {
    transition-delay: 0.2s;
}

/* Navbar */
#navbar.scrolled {
    background: color-mix(in srgb, theme('colors.plum.950') 95%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid color-mix(in srgb, white 5%, transparent);
}

#navbar.scrolled .nav-text {
    color: white;
}

#navbar.scrolled .nav-link {
    color: color-mix(in srgb, white 70%, transparent);
}

#navbar.scrolled .nav-link:hover {
    color: white;
}

/* Menu Link Hover */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: theme('colors.amber.300');
    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-link {
    animation: fadeUp 0.4s ease forwards;
}

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

/* Hamburger */
.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

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

.menu-btn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

::-webkit-scrollbar-track {
    background: theme('colors.stone.50');
}

::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, theme('colors.plum.400') 40%, transparent);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, theme('colors.plum.500') 60%, transparent);
}

/* Focus styles */
a:focus-visible, button:focus-visible {
    outline: 2px solid theme('colors.amber.400');
    outline-offset: 4px;
    border-radius: 2px;
}

/* Print */
@media print {
    nav, #hero, .reveal, footer { 
        break-inside: avoid; 
    }
}
