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

/* 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 */
::selection {
    background: #D95230;
    color: #FAF7F2;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(250, 247, 242, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.nav-link {
    position: relative;
}

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

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

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

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .menu-line:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

#mobile-menu.open .menu-line:last-child {
    transform: rotate(-45deg) translate(2px, -2px);
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* ============================================
   Hero Animations
   ============================================ */
.hero-subtitle {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.3s;
}

.hero-title {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.5s;
}

.hero-desc {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.7s;
}

.hero-cta {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.9s;
}

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

/* ============================================
   Service Cards
   ============================================ */
.service-reveal {
    opacity: 1;
}

.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: #D95230;
    transition: height 0.4s ease;
}

.service-card:hover::before {
    height: 100%;
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(44, 44, 44, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    background: rgba(44, 44, 44, 0.1);
}

/* ============================================
   Scroll Reveal (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    
    /* Gallery stagger */
    .gallery-grid .reveal:nth-child(1) { transition-delay: 0s; }
    .gallery-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
    .gallery-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
    .gallery-grid .reveal:nth-child(4) { transition-delay: 0.1s; }
    .gallery-grid .reveal:nth-child(5) { transition-delay: 0.2s; }
    .gallery-grid .reveal:nth-child(6) { transition-delay: 0.3s; }
}

/* Reduced motion fallback: all content visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    border-color: #D95230 !important;
    box-shadow: 0 0 0 3px rgba(217, 82, 48, 0.1);
}

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='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.2;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .service-card {
        padding: 2rem !important;
    }
}

@media (min-width: 1024px) {
    .service-card {
        padding: 3rem !important;
    }
}

/* ============================================
   Utility
   ============================================ */
img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}
