/* =============================================
   Nick's Nook — Custom Styles
   Classic & Elegant · Emerald Green + Cream
   ============================================= */

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

body {
    overflow-x: hidden;
}

/* Preloader */
#preloader {
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Header styles */
#site-header {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#site-header.scrolled {
    background-color: rgba(13, 40, 17, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

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

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

/* Mobile menu */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

.mobile-nav-link {
    display: block;
}

/* Hero parallax effect */
#hero {
    position: relative;
}

#hero img {
    will-change: transform;
}

/* Section reveal animations */
.reveal-bottom,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-bottom {
        transform: translateY(30px);
    }
    .reveal-left {
        transform: translateX(-30px);
    }
    .reveal-right {
        transform: translateX(30px);
    }

    .reveal-bottom.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* Decorative divider lines */
.divider-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0.3;
}

/* Card hover effects */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Input focus ring animation */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(45, 122, 53, 0.15);
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

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

::-webkit-scrollbar-track {
    background: #0d2811;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #2d7a35;
}

/* Selection color */
::selection {
    background-color: rgba(45, 122, 53, 0.3);
    color: #0d2811;
}

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

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

/* Print styles */
@media print {
    #site-header,
    #back-to-top,
    #preloader {
        display: none !important;
    }

    body {
        color: #0d2811;
        background: white;
    }

    a {
        color: #1f5c27;
    }
}
