/* ============================================
   Magical Log Cabin Escapes — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #1a482e;
    color: #fefdfb;
}

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

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

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

/* ── Header scroll state ── */
#site-header.scrolled {
    background-color: rgba(254, 253, 251, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 72, 46, 0.08), 0 4px 20px rgba(26, 72, 46, 0.06);
}

#site-header.scrolled .font-serif,
#site-header.scrolled .text-emerald-800 {
    color: #1a482e;
}

#site-header.scrolled .text-emerald-600 {
    color: #215c3a;
}

/* ── Mobile menu ── */
.mobile-link {
    position: relative;
}

/* ── Scroll reveal ── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ── Scroll line animation ── */
@keyframes scrollLine {
    0% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }
    51% {
        transform-origin: bottom;
    }
    100% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* ── Form focus states ── */
input:focus,
textarea:focus {
    outline: none;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .animate-scroll-line {
        animation: none;
        opacity: 0.5;
    }

    img {
        transition: none;
    }

    .group:hover img {
        transform: none;
    }
}

/* ── Mobile responsiveness ── */
@media (max-width: 767px) {
    #mobile-menu.open {
        opacity: 1;
        pointer-events: all;
    }

    #menu-btn.active #bar1 {
        transform: translateY(5px) rotate(45deg);
    }

    #menu-btn.active #bar2 {
        opacity: 0;
    }

    #menu-btn.active #bar3 {
        transform: translateY(-5px) rotate(-45deg);
    }
}

/* ── Print ── */
@media print {
    #site-header,
    .animate-scroll-line {
        display: none;
    }

    body {
        color: #1a3a2a;
        background: white;
    }

    section {
        page-break-inside: avoid;
    }
}
