/* ========================================
   The Johnson House — 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: #6B1D2A;
    color: #FDF8F6;
}

/* Navigation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #6B1D2A;
    transition: width 0.3s ease;
}

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

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(250, 246, 243, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(107, 29, 42, 0.08);
}

#navbar.scrolled .nav-link {
    color: #6B1D2A;
}

#navbar.scrolled .nav-link::after {
    background: #6B1D2A;
}

#navbar.scrolled .font-serif {
    color: #6B1D2A;
}

#navbar.scrolled .font-sans {
    color: #a51736;
}

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

.mobile-link {
    transition: opacity 0.3s ease;
}

.mobile-link:hover {
    opacity: 0.7;
}

/* Menu animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

/* Hero */
.hero-section {
    position: relative;
}

/* Scroll animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.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; }

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

/* Form inputs */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 2px rgba(107, 29, 42, 0.15);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6B1D2A;
}

/* Image aspect ratios */
.aspect-\[4\/5\] {
    aspect-ratio: 4 / 5;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Print styles */
@media print {
    #navbar, #mobileMenu, .animate-pulse {
        display: none !important;
    }
}
