/* ============================================
   César Morillas Peluqueros — Custom Styles
   ============================================ */

/* --- Custom Properties --- */
:root {
    --color-navy-900: #0a1f35;
    --color-navy-800: #0f2b4c;
    --color-navy-700: #153a66;
    --color-gold-500: #c8a44e;
    --color-gold-400: #d4b564;
    --color-warm-50: #faf8f5;
    --color-warm-100: #f5f0e8;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Animations --- */
@keyframes pulse-slow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.15; transform: scale(1.05); }
}

@keyframes scroll-line {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

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

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

.animate-scroll-line {
    animation: scroll-line 2s ease-in-out infinite;
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    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);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* --- Navbar --- */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(10, 31, 53, 0.08);
}

#navbar.scrolled .nav-logo-text {
    color: #0f2b4c;
}

#navbar.scrolled .menu-line {
    background: #0f2b4c;
}

.nav-link {
    position: relative;
}

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

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

/* --- Mobile Menu --- */
#mobile-menu {
    box-shadow: none;
}

#mobile-menu.open {
    box-shadow: 0 20px 60px rgba(10, 31, 53, 0.15);
}

.mobile-link {
    position: relative;
}

/* --- Service Cards --- */
.service-card {
    border: 1px solid rgba(15, 43, 76, 0.06);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

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

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    border-color: rgba(200, 164, 78, 0.5);
}

/* --- Buttons --- */
a {
    text-decoration: none;
}

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

/* --- Selection --- */
::selection {
    background: #c8a44e;
    color: #0a1f35;
}

/* --- Focus --- */
:focus-visible {
    outline: 2px solid #c8a44e;
    outline-offset: 2px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }

    #inicio h1 {
        font-size: 2.75rem;
    }

    .service-card {
        transform: none !important;
    }

    .service-card:hover {
        transform: none !important;
    }
}

@media (max-width: 480px) {
    html {
        scroll-padding-top: 65px;
    }

    #inicio h1 {
        font-size: 2.25rem;
    }

    #inicio p {
        font-size: 1rem;
    }
}

/* --- Print --- */
@media print {
    #navbar, .animate-pulse-slow, .animate-scroll-line {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }
}
