/* ============================================
   POSH SALON — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background: #f5a8ba;
    color: #3e0712;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #fefcfb;
}
::-webkit-scrollbar-thumb {
    background: #f5a8ba;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c22042;
}

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

#navbar.scrolled {
    background: rgba(254, 252, 251, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(161, 22, 50, 0.08);
}

.nav-link {
    position: relative;
}

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

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

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

#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu.closed {
    transform: translateX(-100%);
}

/* --- Floating Cards Animation --- */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -2s;
}

.floating-card:nth-child(3) {
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* --- Scroll Line Animation --- */
.scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
    50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

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

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 1px rgba(161, 22, 50, 0);
    transition: box-shadow 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.service-card:hover::before {
    box-shadow: 0 0 0 1px rgba(161, 22, 50, 0.15);
}

/* --- Gallery Items --- */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(62, 7, 18, 0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* --- Fade In Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

/* --- Form Focus States --- */
input:focus,
textarea:focus,
select:focus {
    border-color: #f5a8ba !important;
}

input:focus ~ label,
textarea:focus ~ label,
select:focus ~ label {
    color: #a11632 !important;
}

/* --- Back to Top --- */
#back-to-top.show {
    opacity: 1;
    pointer-events: all;
}

#back-to-top:hover {
    transform: translateY(-2px);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
    
    #hero h1 {
        font-size: clamp(2rem, 6vw, 3.5rem);
    }
}
