/* ========================================
   Perma Beauty Studio — Custom Styles
   ======================================== */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: #D4A056;
    color: #1a0816;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5eef6;
}
::-webkit-scrollbar-thumb {
    background: #7a2752;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4A1942;
}

/* --- Navbar --- */
.nav-text {
    color: #4A1942;
}
.nav-subtext {
    color: #c4883a;
}

#navbar.scrolled .nav-text {
    color: #4A1942;
}
#navbar.scrolled .nav-subtext {
    color: #c4883a;
}

.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #D4A056;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

#navbar.scrolled .nav-link {
    color: #4A1942;
}

/* --- Hero Animations --- */
.hero-eyebrow {
    animation: fadeInLeft 0.8s ease forwards;
    opacity: 0;
}
.hero-subtext {
    animation: fadeInUp 0.8s ease 0.3s forwards;
    opacity: 0;
}
.hero-cta {
    animation: fadeInUp 0.8s ease 0.5s forwards;
    opacity: 0;
}
.hero-scroll {
    animation: fadeInUp 0.8s ease 0.8s forwards;
    opacity: 0;
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scroll line animation */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

/* --- Service Cards --- */
.service-card {
    border: 1px solid transparent;
    transition: border-color 0.5s ease, transform 0.5s ease;
}
.service-card:hover {
    border-color: #f5d4a0;
    transform: translateY(-4px);
}

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

/* --- Scroll Reveal --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.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);
    }
}

/* --- Mobile Menu --- */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* --- Menu Button Animation --- */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
    margin-left: 0;
}

/* --- Testimonial Cards --- */
.testimonial-card {
    position: relative;
}
.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #D4A056, #f5d4a0);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.testimonial-card:hover::before {
    opacity: 1;
}

/* --- Form Styles --- */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234A1942' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* --- Button Focus States --- */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #D4A056;
    outline-offset: 2px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .hero-eyebrow {
        animation: fadeInUp 0.8s ease forwards;
    }
}
