/* ========================================
   Vermont Castleworks — Custom Styles
   ======================================== */

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

body {
    background-color: #FDF8F4;
}

/* Selection color */
::selection {
    background-color: #7B2D3B;
    color: #FDF8F4;
}

/* ========================================
   Navigation
   ======================================== */
.nav-fixed {
    background: transparent;
    transition: background-color 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

.nav-fixed.scrolled {
    background-color: rgba(253, 248, 244, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08);
}

.nav-link {
    position: relative;
}

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

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

.nav-fixed.scrolled .nav-link {
    color: rgba(45, 45, 45, 0.7);
}

.nav-fixed.scrolled .nav-link:hover {
    color: #7B2D3B;
}

/* ========================================
   Hero Animations
   ======================================== */
.hero-eyebrow,
.hero-title,
.hero-subtitle,
.hero-ctas,
.hero-image-main,
.hero-float {
    /* Default visible for accessibility — JS adds animation */
}

@media (prefers-reduced-motion: no-preference) {
    .hero-eyebrow {
        animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
    }
    .hero-title {
        animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
    }
    .hero-subtitle {
        animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
    }
    .hero-ctas {
        animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.65s both;
    }
    .hero-image-main {
        animation: fadeInScale 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
    }
    .hero-float {
        animation: floatIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.9s both;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* ========================================
   Scroll Reveal (progressive enhancement)
   ======================================== */
.reveal-content {
    /* Default: visible for no-JS and reduced-motion */
}

.reveal-image {
    /* Default: visible */
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-content {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-content.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal-image {
        opacity: 0;
        transform: scale(0.97);
        transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-image.revealed {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   Mobile Menu
   ======================================== */
.mobile-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* Hamburger animation */
#menu-icon.open #bar1 {
    transform: rotate(45deg) translate(4px, 4px);
}
#menu-icon.open #bar2 {
    opacity: 0;
}
#menu-icon.open #bar3 {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* ========================================
   Image hover effects
   ======================================== */
.overflow-hidden img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.overflow-hidden:hover img {
    transform: scale(1.03);
}

/* ========================================
   Form focus states
   ======================================== */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(123, 45, 59, 0.1);
}

/* ========================================
   Responsive adjustments
   ======================================== */
@media (max-width: 767px) {
    .font-display {
        line-height: 1.1;
    }
}

@media (min-width: 768px) {
    /* Subtle parallax-like effect for atmosphere images */
    #atmosphere .overflow-hidden {
        will-change: transform;
    }
}
