/* ============================================
   BIG CREEK COTTAGE — Custom Styles
   Premium Dark Luxury Theme
   ============================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    display: block;
    max-width: 100%;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #c9a84c;
}

/* --- Selection --- */
::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #f5f0e8;
}

/* --- Navbar --- */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(10, 15, 13, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(201, 168, 76, 0.1);
}

#navbar.scrolled .font-display {
    color: #f5f0e8 !important;
}

/* --- Hero Line Animation --- */
#hero-line {
    animation: growLine 1s ease forwards 0.5s;
}

@keyframes growLine {
    from {
        height: 0;
        opacity: 0;
    }
    to {
        height: 120px;
        opacity: 1;
    }
}

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

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 1;
}

.mobile-link {
    opacity: 0;
}

.mobile-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-link:nth-child(2) { animation-delay: 0.15s; }
.mobile-link:nth-child(3) { animation-delay: 0.2s; }
.mobile-link:nth-child(4) { animation-delay: 0.25s; }

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Menu Button Animation --- */
#menu-btn.active #line1 {
    transform: rotate(45deg) translate(4px, 4px);
}

#menu-btn.active #line2 {
    opacity: 0;
    transform: scaleX(0);
}

#menu-btn.active #line3 {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* --- Cottage Cards --- */
.cottage-card {
    position: relative;
    overflow: hidden;
}

.cottage-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c9a84c, transparent);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.cottage-card:hover::after {
    transform: scaleX(1);
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.revealed {
        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; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* --- 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;
    }
}

/* --- Image Hover --- */
.overflow-hidden img {
    will-change: transform;
}

/* --- Gold Text Gradient (for special headlines) --- */
.gold-gradient {
    background: linear-gradient(135deg, #c9a84c 0%, #d4b96a 50%, #a8872e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Button Focus Styles --- */
a:focus-visible, button:focus-visible {
    outline: 2px solid #c9a84c;
    outline-offset: 2px;
    border-radius: 2px;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 767px) {
    html {
        font-size: 15px;
    }
    
    .font-display {
        line-height: 1.1;
    }
}

/* --- Loading State --- */
.page-loaded #hero {
    opacity: 1;
}

#hero {
    opacity: 0;
    animation: heroFadeIn 1s ease forwards;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
    }
}
