/* ============================================
   Bearthside Journey — Custom Styles
   ============================================ */

/* Custom properties */
:root {
    --color-burgundy-800: #7D2E46;
    --color-burgundy-700: #952641;
    --color-blush-300: #F4A7B8;
    --color-blush-400: #F4A78B;
    --color-warm-50: #FDFBF9;
    --color-warm-100: #FAF5F0;
    --color-warm-200: #F5EDE3;
    --color-warm-800: #3D3229;
    --color-warm-950: #1A1410;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background-color: rgba(125, 46, 70, 0.2);
    color: #7D2E46;
}

/* ============================================
   Scroll Reveal Animations
   Only active when JS is available and user
   prefers motion (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

    /* Stagger children */
    .reveal[data-stagger="true"] > * {
        opacity: 0;
        transform: translateY(16px);
        transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .reveal.revealed[data-stagger="true"] > * {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal[data-stagger="true"] > *:nth-child(1) { transition-delay: 0ms; }
    .reveal[data-stagger="true"] > *:nth-child(2) { transition-delay: 100ms; }
    .reveal[data-stagger="true"] > *:nth-child(3) { transition-delay: 200ms; }
    .reveal[data-stagger="true"] > *:nth-child(4) { transition-delay: 300ms; }
    .reveal[data-stagger="true"] > *:nth-child(5) { transition-delay: 400ms; }
    .reveal[data-stagger="true"] > *:nth-child(6) { transition-delay: 500ms; }
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 251, 249, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(125, 46, 70, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #7D2E46, #F4A78B);
    border-radius: 2px;
    transition: width 0.3s ease;
}

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

/* ============================================
   Mobile Menu
   ============================================ */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

.mobile-nav-link {
    position: relative;
    padding-left: 0;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(125, 46, 70, 0.1), transparent);
    border-radius: 4px;
    transition: width 0.2s ease;
}

.mobile-nav-link:hover::before {
    width: calc(100% + 12px);
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7D2E46, #F4A78B, #F4A7B8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(244, 167, 184, 0.3);
}

/* ============================================
   Button Hover Effects
   ============================================ */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 640px) {
    .font-serif {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
}

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

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

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid #7D2E46;
    outline-offset: 2px;
    border-radius: 4px;
}
