/* Custom styles for Abode by Parklyn */

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

/* Prevent scroll-reveal content from flashing before JS */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure content is always visible for reduced-motion or no-JS */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Header background on scroll */
#site-header.scrolled {
    background: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Hamburger animation */
#menu-btn[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
#menu-btn[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Nav link underline animation */
.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    margin-top: 2px;
    transition: width 0.25s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Selection color */
::selection {
    background: rgba(27, 67, 50, 0.2);
    color: #1B4332;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf8f0;
}
::-webkit-scrollbar-thumb {
    background: #adc9af;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #85ad86;
}

/* Form focus styles */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(93, 145, 93, 0.15);
}

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