/* ============================================================
   The Toni Salon — Custom Styles
   ============================================================ */

/* CSS Custom Properties */
:root {
    --nav-text-color: #0c3d2d;
    --nav-bg-color: rgba(253, 252, 247, 0);
    --nav-scrolled-text: #0c3d2d;
    --nav-scrolled-bg: rgba(253, 252, 247, 0.95);
    --nav-scrolled-shadow: 0 1px 20px rgba(12, 61, 45, 0.08);
}

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

body {
    overflow-x: hidden;
}

/* ============================================================
   Scroll Reveal — Progressive Enhancement
   Only activates when JS runs AND user prefers motion
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

/* When JS is disabled or prefers-reduced-motion, content is fully visible by default */
/* (No hidden state set in CSS — JS adds the animated state) */

/* ============================================================
   Hero Animations
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
    .hero-eyebrow {
        animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
    }
    .hero-headline {
        animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
    }
    .hero-subtitle {
        animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
    }
}

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

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

#navbar.scrolled {
    background: var(--nav-scrolled-bg);
    box-shadow: var(--nav-scrolled-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-link {
    color: var(--nav-text-color);
    position: relative;
}

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

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

#navbar.scrolled .nav-link {
    color: var(--nav-scrolled-text);
}

.nav-logo-color {
    color: var(--nav-text-color);
    transition: color 0.5s ease;
}

#navbar.scrolled .nav-logo-color {
    color: var(--nav-scrolled-text);
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* ============================================================
   Button & Link Focus States
   ============================================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0f4a36;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================================
   Selection Color
   ============================================================ */
::selection {
    background: rgba(15, 74, 54, 0.2);
    color: #0c3d2d;
}

/* ============================================================
   Scrollbar Styling
   ============================================================ */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf6ed;
}
::-webkit-scrollbar-thumb {
    background: #b9f0db;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #86e1c0;
}

/* ============================================================
   Form Input Autofill
   ============================================================ */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #f5ecd3 inset !important;
    -webkit-text-fill-color: #0c3d2d !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* ============================================================
   Utility — Hide scrollbar for clean gallery look
   ============================================================ */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
