/* ===== CUSTOM STYLES FOR PERLA'S BEAUTY SALON ===== */

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

body {
    overflow-x: hidden;
}

::selection {
    background: #D4A843;
    color: #0c1e16;
}

/* ---------- Navbar ---------- */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#navbar.scrolled {
    background: rgba(253, 251, 247, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(27, 67, 50, 0.08);
}

.nav-link {
    position: relative;
}

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

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

#navbar:not(.scrolled) .nav-link {
    color: #d5e2da;
}

#navbar:not(.scrolled) .nav-link:hover {
    color: #D4A843;
}

#navbar:not(.scrolled) .nav-link::after {
    background: #D4A843;
}

#navbar:not(.scrolled) .font-display {
    color: #f0f5f2;
}

/* ---------- Mobile Menu ---------- */
#mobile-menu {
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

.mobile-link {
    position: relative;
    padding-left: 0;
    transition: color 0.2s, padding-left 0.2s;
}

.mobile-link:hover {
    color: #D4A843;
    padding-left: 8px;
}

/* Menu button animation */
#menu-btn.active #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-btn.active #bar2 {
    opacity: 0;
}

#menu-btn.active #bar3 {
    width: 100%;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Hero ---------- */
#hero {
    position: relative;
}

/* ---------- Geometric Shapes ---------- */
.geo-shape {
    position: absolute;
    opacity: 0.12;
    pointer-events: none;
}

.circle-1 {
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: #D4A843;
    top: -200px;
    right: -150px;
    animation: float-slow 20s ease-in-out infinite;
}

.circle-2 {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: #C1694F;
    bottom: -100px;
    left: -100px;
    animation: float-slow 15s ease-in-out infinite reverse;
}

.square-1 {
    width: 200px;
    height: 200px;
    background: #D4A843;
    top: 15%;
    left: 5%;
    transform: rotate(45deg);
    animation: spin-slow 25s linear infinite;
    opacity: 0.08;
}

.square-2 {
    width: 150px;
    height: 150px;
    background: #E8C4B8;
    bottom: 20%;
    right: 8%;
    transform: rotate(30deg);
    animation: spin-slow 20s linear infinite reverse;
    opacity: 0.1;
}

.dot-1 {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #D4A843;
    top: 25%;
    right: 20%;
    animation: pulse-dot 3s ease-in-out infinite;
}

.dot-2 {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #E8C4B8;
    bottom: 30%;
    left: 15%;
    animation: pulse-dot 4s ease-in-out infinite 1s;
}

.dot-3 {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ad c4b6;
    top: 60%;
    right: 30%;
    animation: pulse-dot 3.5s ease-in-out infinite 0.5s;
}

.line-1 {
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #D4A843, transparent);
    top: 40%;
    left: -50px;
    transform: rotate(-15deg);
    animation: float-slow 18s ease-in-out infinite;
}

.line-2 {
    width: 150px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #E8C4B8, transparent);
    bottom: 35%;
    right: -30px;
    transform: rotate(10deg);
    animation: float-slow 12s ease-in-out infinite reverse;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(3deg); }
}

@keyframes spin-slow {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 0.12; }
    50% { transform: scale(1.5); opacity: 0.25; }
}

/* ---------- Scroll Indicator ---------- */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.scroll-mouse {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 13px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: rgba(255,255,255,0.7);
    border-radius: 2px;
    animation: scroll-wheel-anim 1.5s ease-in-out infinite;
}

@keyframes scroll-wheel-anim {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(10px); opacity: 0; }
}

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

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

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

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(27, 67, 50, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* ---------- Back to Top ---------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: #1B4332;
    color: #D4A843;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(27, 67, 50, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 40;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #D4A843;
    color: #0c1e16;
    transform: translateY(-3px);
}

/* ---------- Scroll Reveal (progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s 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; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

/* ---------- Form focus states ---------- */
input:focus, select:focus, textarea:focus {
    outline: none;
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 640px) {
    .geo-shape { opacity: 0.06; }
    .circle-1 { width: 300px; height: 300px; }
    .circle-2 { width: 200px; height: 200px; }
    .square-1 { width: 100px; height: 100px; }
    .square-2 { width: 80px; height: 80px; }
}
