/* ============================================
   The Spencer Homestead — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: #B5523B;
    color: #FAF7F2;
}

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

.animate-fade-up {
    animation: fadeUp 0.8s ease-out;
}

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Navbar scroll state */
nav.scrolled {
    background: rgba(250, 247, 242, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(181, 82, 59, 0.1);
}

nav.scrolled .menu-line {
    background: #2A2522;
}

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

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

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

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

/* Focus styles */
input:focus,
textarea:focus,
button:focus {
    outline: none;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid #B5523B;
    outline-offset: 2px;
}

/* Image loading placeholder */
img {
    background: #E8DCC8;
}

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

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

::-webkit-scrollbar-thumb {
    background: #B5523B;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8C3F2D;
}

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