/* Custom styles for Moonshadow Piercing */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f5f3ed;
}
::-webkit-scrollbar-thumb {
    background: #0f3d3e;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2d4a37;
}

/* Selection color */
::selection {
    background: #c9a227;
    color: #0f3d3e;
}

/* Reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    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);
}

/* Only apply animation when JS is available and user prefers motion */
@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(250, 249, 246, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(15, 61, 62, 0.1);
}

.nav-scrolled .nav-text {
    color: #0f3d3e !important;
}

.nav-scrolled .nav-link {
    color: rgba(15, 61, 62, 0.7) !important;
}

/* Mobile menu animation */
.mobile-menu-open #mobile-menu {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.mobile-menu-open .mobile-link {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.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 fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hamburger animation */
#mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}
#mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Form focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-bottom-color: #c9a227 !important;
}

/* Button hover effects */
button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 61, 62, 0.2);
}

/* Image hover zoom */
img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Subtle grain texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Thin line decorations */
.thin-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, #c9a227, transparent);
}

/* Custom 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='%230f3d3e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 2rem;
}

/* Hero parallax effect on scroll */
#hero {
    will-change: transform;
}

/* Accessibility: focus visible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #c9a227;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    nav, #mobile-menu-btn, .reveal {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
