/* ============================================
   Dez The Barber — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: #6B1D2A;
    color: #E8C4C4;
}

/* ============================================
   Scroll Reveal Animations
   Progressive enhancement — content is visible
   by default, JS adds animation classes.
   ============================================ */
.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: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* ============================================
   Navbar Scroll State
   ============================================ */
#navbar.scrolled {
    background-color: rgba(42, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(232, 196, 196, 0.08);
}

#navbar.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

#navbar.scrolled .nav-link:hover {
    color: #ffffff;
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#mobileMenu.open {
    max-height: 400px;
}

.mobile-link {
    position: relative;
    display: block;
    padding: 0.5rem 0;
}

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

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

/* Menu button animation */
.menu-line {
    display: block;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
    margin-right: 0;
}

/* ============================================
   Hover underline for nav links
   ============================================ */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: #E8C4C4;
    transition: width 0.3s ease;
}

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

/* ============================================
   Input focus animations
   ============================================ */
input:focus,
textarea:focus {
    animation: none;
}

/* ============================================
   Subtle parallax on hero (progressive)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    #hero {
        will-change: transform;
    }
}

/* ============================================
   Image hover effects
   ============================================ */
.rounded-2xl overflow-hidden {
    will-change: transform;
}

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

::-webkit-scrollbar-track {
    background: #2A0A0F;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #931c36;
}

/* ============================================
   Form focus states
   ============================================ */
input:focus,
textarea:focus {
    outline: none;
    border-color: #6B1D2A !important;
    box-shadow: 0 0 0 3px rgba(107, 29, 42, 0.1);
}

/* ============================================
   Smooth image loading
   ============================================ */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}

/* ============================================
   Button ripple effect (optional enhancement)
   ============================================ */
button, a[role="button"] {
    position: relative;
    overflow: hidden;
}

/* ============================================
   Print styles
   ============================================ */
@media print {
    #navbar,
    #hero,
    .reveal {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    section {
        page-break-inside: avoid;
    }
}
