/* ============================================
   Beya Skin Studio — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #1B4332;
    color: #FAF7F0;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF7F0;
}
::-webkit-scrollbar-thumb {
    background: #1B4332;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #081C15;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    transition: background-color 0.5s ease, padding 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(8, 28, 21, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.15);
}

.nav-link {
    position: relative;
}

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

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

#navbar .nav-link {
    color: rgba(250, 247, 240, 0.8);
}

#navbar.scrolled .nav-link {
    color: rgba(250, 247, 240, 0.75);
}

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

.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: rgba(250, 247, 240, 0.4);
    transition: width 0.3s ease;
}

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

/* Hamburger Animation */
.menu-line {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

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

#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.5rem;
}

/* ============================================
   Hero Section
   ============================================ */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, #FAF7F0, transparent);
    pointer-events: none;
    z-index: 2;
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease;
}

.service-card:hover {
    transform: translateY(-8px);
}

.service-card img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8, 28, 21, 0.3), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

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

/* ============================================
   Testimonials
   ============================================ */
.testimonial-card {
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

/* ============================================
   Contact Form
   ============================================ */
#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
    border-bottom-color: #1B4332 !important;
}

#contact-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231B4332' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 2rem;
}

/* ============================================
   Scroll Reveal Animations
   (Progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }

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

    /* These are applied via JS for progressive enhancement */
    .reveal-hidden {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    #hero::after {
        height: 100px;
    }
    
    .font-serif {
        line-height: 1.1;
    }
}

@media (max-width: 640px) {
    #hero::after {
        height: 60px;
    }
}

/* ============================================
   Utility: Focus Visible
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #1B4332;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar,
    #mobile-menu,
    .gallery-item,
    iframe {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
