/* ========================================
   Helen Alpine Village Inn — Custom Styles
   ======================================== */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

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

/* Selection */
::selection {
    background: #064e3b;
    color: #fefdf8;
}

/* ========================================
   Hero Animations
   ======================================== */
.hero-anim {
    opacity: 1;
    transform: translateY(0);
    animation: heroSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.25s; }
.hero-anim:nth-child(3) { animation-delay: 0.4s; }
.hero-anim:nth-child(4) { animation-delay: 0.55s; }
.hero-anim:nth-child(5) { animation-delay: 0.7s; }

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

/* ========================================
   Scroll Reveal (Progressive Enhancement)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* Ensure content is visible even without JS */
@supports not (animation-name: heroSlideUp) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ========================================
   Mobile Menu
   ======================================== */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link {
    position: relative;
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(190, 173, 148, 0.2);
}

.mobile-link:last-child {
    border-bottom: none;
}

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

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

/* ========================================
   Header Scroll State
   ======================================== */
#main-header.scrolled {
    box-shadow: 0 1px 0 rgba(76, 66, 57, 0.08);
}

/* ========================================
   Button Focus States
   ======================================== */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #064e3b;
    outline-offset: 2px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8e7962;
}

/* ========================================
   Divider Lines
   ======================================== */
.divider-line {
    width: 48px;
    height: 1px;
    background: #d4a574;
}

/* ========================================
   Image Aspect Ratios
   ======================================== */
.aspect-card {
    aspect-ratio: 4 / 3;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    #main-header,
    #mobile-menu,
    .hero-anim,
    .reveal {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }
}
