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

/* Scroll reveal base — content is visible by default, JS adds animation */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(254, 247, 245, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 1px 0 rgba(147, 39, 53, 0.08);
}

.nav-scrolled .menu-line {
    background: #932735 !important;
}

/* Mobile menu animations */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-menu-open .mobile-link {
    animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

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

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

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

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

/* Bounce slow for scroll indicator */
@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

.animate-bounce-slow {
    animation: bounce-slow 2.5s ease-in-out infinite;
}

/* Clip diagonal for about section */
.clip-diagonal {
    clip-path: polygon(70% 0, 100% 0, 100% 100%, 0% 100%);
}

/* Selection color */
::selection {
    background: rgba(147, 39, 53, 0.15);
    color: #77232e;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #fdf7f5;
}

::-webkit-scrollbar-thumb {
    background: #d43f52;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b52d40;
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23932735' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}
