/* ========================================
   Cottage Connection Inc - Custom Styles
   Premium Dark Luxury Theme
   ======================================== */

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

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

body {
    overflow-x: hidden;
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d4af57, #a71b35);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #e6c27a, #cc2848);
}

/* Selection */
::selection {
    background: rgba(212, 175, 87, 0.3);
    color: #fff;
}

/* ========================================
   Animations
   ======================================== */

/* Fade In Animation (Hero - always visible) */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation-name: fadeIn;
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: forwards;
}

/* Pulse Slow (Decorative orbs) */
@keyframes pulseSlow {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

.animate-pulse-slow {
    animation: pulseSlow 4s ease-in-out infinite;
}

/* ========================================
   Scroll Reveal (Progressive Enhancement)
   Content is visible by default; JS adds animation
   ======================================== */

.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Only apply hidden state when JS is active (progressive enhancement) */
.js-enabled .reveal {
    opacity: 0;
    transform: translateY(30px);
}

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

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .js-enabled .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: none;
    }
    
    .animate-fade-in {
        opacity: 1;
        transform: translateY(0);
        animation: none;
    }
    
    .animate-pulse-slow {
        animation: none;
        opacity: 0.5;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ========================================
   Navigation
   ======================================== */

#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

#navbar.scrolled {
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 175, 87, 0.1);
}

#navbar.scrolled .menu-line {
    background: #fff;
}

#navbar.scrolled .menu-line:last-child {
    background: #d4af57;
}

/* Mobile Menu Transitions */
#mobileMenu {
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease;
    opacity: 0;
}

#mobileMenu.open {
    max-height: 400px;
    opacity: 1;
}

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #d4af57;
    transition: width 0.3s ease;
}

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

/* ========================================
   Buttons & Interactive Elements
   ======================================== */

a, button {
    -webkit-tap-highlight-color: transparent;
}

/* Gold gradient text effect */
.text-gradient-gold {
    background: linear-gradient(135deg, #f0d49a 0%, #d4af57 50%, #c49a3f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Cottage Card Hover Effects
   ======================================== */

.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* ========================================
   Form Styles
   ======================================== */

input:focus,
textarea:focus {
    box-shadow: 0 0 0 1px rgba(212, 175, 87, 0.2);
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.15);
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 768px) {
    .font-serif {
        line-height: 1.2;
    }
}

@media (max-width: 640px) {
    /* Ensure touch targets are large enough */
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ========================================
   Loading State for Images
   ======================================== */

img {
    background: linear-gradient(90deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

img.loaded {
    animation: none;
    background: none;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    body {
        background: #fff;
        color: #000;
    }
    
    .no-print {
        display: none;
    }
}
