/* ============================================
   Hidden Gems Braiding — Custom Styles
   ============================================ */

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

body {
    background-color: #FDF8F5;
    color: #3d0a14;
}

/* Selection */
::selection {
    background-color: rgba(130, 28, 48, 0.15);
    color: #3d0a14;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FDF8F5;
}
::-webkit-scrollbar-thumb {
    background: #d4a0aa;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #821c30;
}

/* Navbar */
#navbar {
    background: rgba(253, 248, 245, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(130, 28, 48, 0.06);
}

#navbar.scrolled {
    background: rgba(253, 248, 245, 0.95);
    box-shadow: 0 1px 20px rgba(61, 10, 20, 0.06);
}

/* Nav Links */
.nav-link {
    position: relative;
}

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

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

/* Mobile Menu */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    position: relative;
}

/* Hero */
#hero {
    background: linear-gradient(135deg, #FDF8F5 0%, #FFF8F8 50%, #FDF2F4 100%);
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #821c30, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

/* Gallery */
.gallery-item {
    position: relative;
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(61, 10, 20, 0);
    transition: background 0.4s ease;
}

.gallery-item:hover::after {
    background: rgba(61, 10, 20, 0.08);
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: none;
    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: none;
}

/* Stagger children */
.stagger-children .reveal-item {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-children .reveal-item:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .reveal-item:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .reveal-item:nth-child(3) { transition-delay: 0.15s; }
.stagger-children .reveal-item:nth-child(4) { transition-delay: 0.2s; }
.stagger-children .reveal-item:nth-child(5) { transition-delay: 0.25s; }
.stagger-children .reveal-item:nth-child(6) { transition-delay: 0.3s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal,
    .reveal-item,
    .gallery-item img,
    .service-card,
    .nav-link::after {
        transition: none;
    }
    .gallery-item::after {
        display: none;
    }
}

/* Mobile menu line animation */
.menu-line {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body.menu-open .menu-line:nth-child(1) {
    top: 50%;
    transform: rotate(45deg);
}

body.menu-open .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

body.menu-open .menu-line:nth-child(3) {
    top: 50%;
    transform: rotate(-45deg);
    width: 1.5rem;
    left: 0;
}

/* Button focus states */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #821c30;
    outline-offset: 3px;
    border-radius: 2px;
}

/* Image placeholder fallback */
img {
    background: linear-gradient(135deg, #fce7eb 0%, #f9d0d9 100%);
}

/* Print styles */
@media print {
    #navbar,
    .gallery-item,
    iframe {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
}
