/* ============================================
   Ossipee Lake Views — Custom Styles
   Classic & Elegant Lakeside Lodging
   ============================================ */

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

/* Selection color */
::selection {
    background-color: #1B4332;
    color: #faf9f6;
}

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

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

@keyframes floatCard {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-float-card {
    animation: floatCard 0.7s ease-out forwards;
}

/* Subtle floating for stat cards after initial animation */
@keyframes gentleFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

.floating-card {
    animation: gentleFloat 4s ease-in-out infinite;
}

/* ============================================
   Scroll Reveal (Progressive Enhancement)
   ============================================ */

/* Default: content is visible (no JS required) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* With JS + reduced-motion preference: add reveal effect */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Navbar
   ============================================ */

#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(250, 249, 246, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

.nav-logo-text {
    transition: color 0.4s ease;
}

.nav-logo-sub {
    transition: color 0.4s ease;
}

#navbar.scrolled .nav-logo-text {
    color: #1B4332;
}

#navbar.scrolled .nav-logo-sub {
    color: #4a8056;
}

.nav-link {
    position: relative;
}

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

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

/* ============================================
   Mobile Menu
   ============================================ */

.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: #D4A373;
    transition: width 0.3s ease;
}

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

/* Menu toggle animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

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

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

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

/* ============================================
   Buttons
   ============================================ */

button, a[role="button"] {
    cursor: pointer;
}

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

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #1B4332 !important;
    box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.1);
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234a8056' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ============================================
   Image hover effects
   ============================================ */

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Utility
   ============================================ */

/* Smooth focus visible */
:focus-visible {
    outline: 2px solid #D4A373;
    outline-offset: 2px;
}

/* ============================================
   Responsive adjustments
   ============================================ */

@media (max-width: 767px) {
    html {
        scroll-behavior: auto;
    }
}

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