/* ============================================
   Cristal's Nails — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: #7B1120;
    color: #FDFCFA;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDFCFA;
}
::-webkit-scrollbar-thumb {
    background: #D46A6A;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7B1120;
}

/* Hero Animations */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.2s; }
.hero-anim:nth-child(3) { animation-delay: 0.3s; }
.hero-anim:nth-child(4) { animation-delay: 0.4s; }
.hero-anim:nth-child(5) { animation-delay: 0.5s; }
.hero-anim:nth-child(6) { animation-delay: 0.6s; }
.hero-anim:nth-child(7) { animation-delay: 0.7s; }
.hero-anim:nth-child(8) { animation-delay: 0.8s; }

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal */
.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);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-anim,
    .reveal {
        opacity: 1;
        transform: none;
        animation: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* Navbar */
.nav-link {
    position: relative;
}

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

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

/* Mobile Menu */
#mobile-menu.open {
    transform: translateX(0);
}

.menu-line {
    display: block;
    transition: all 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Service Cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: #FADADD;
    transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Image hover */
.overflow-hidden {
    overflow: hidden;
}

.overflow-hidden img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.overflow-hidden:hover img {
    transform: scale(1.05);
}

/* Button focus */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #7B1120;
    outline-offset: 2px;
}

/* Vertical text helper */
.writing-mode-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Print styles */
@media print {
    nav, #menu-toggle, .reveal { display: block; opacity: 1; }
    .hero-anim { opacity: 1; transform: none; }
}
