/* ═══════════════════════════════════════════
   HAIRVANA — Custom Styles
   ═══════════════════════════════════════════ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background: #d9a8d4;
    color: #280b20;
}

/* ─── Hero Gradient ─── */
.hero-gradient {
    background: linear-gradient(135deg, #4a1c42 0%, #7B2D8E 25%, #a84e99 50%, #d97706 75%, #f59e0b 100%);
    background-size: 400% 400%;
    animation: gradientShift 18s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ─── Hero Orbs ─── */
.hero-orb {
    animation: orbFloat 8s ease-in-out infinite;
}

.hero-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #fbbf24 0%, transparent 70%);
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}

.hero-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #c474b8 0%, transparent 70%);
    bottom: -5%;
    left: -5%;
    animation-delay: -3s;
}

.hero-orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #fde68a 0%, transparent 70%);
    top: 40%;
    left: 15%;
    animation-delay: -5s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ─── Hero Pattern ─── */
.hero-pattern {
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.08) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 60px 60px, 40px 40px;
}

/* ─── Hero Animations ─── */
.hero-badge {
    animation: fadeSlideUp 0.8s ease both;
    animation-delay: 0.2s;
}

.hero-badge {
    opacity: 0;
}

h1, .hero-badge + h1 {
    animation: fadeSlideUp 0.8s ease both;
    animation-delay: 0.4s;
}

h1 {
    opacity: 0;
}

h1 + p {
    animation: fadeSlideUp 0.8s ease both;
    animation-delay: 0.6s;
}

h1 + p {
    opacity: 0;
}

h1 + p + div {
    animation: fadeSlideUp 0.8s ease both;
    animation-delay: 0.8s;
}

h1 + p + div {
    opacity: 0;
}

h1 + p + div + div {
    animation: fadeSlideUp 0.8s ease both;
    animation-delay: 1s;
}

h1 + p + div + div {
    opacity: 0;
}

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

/* ─── Navigation ─── */
#site-header {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#site-header.scrolled {
    background: rgba(250, 245, 251, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(74, 28, 66, 0.08);
}

#site-header.scrolled #nav-logo {
    color: #4a1c42;
}

.nav-link {
    position: relative;
}

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

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

#site-header:not(.scrolled) .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

#site-header:not(.scrolled) .nav-link:hover {
    color: #fbbf24;
}

#site-header:not(.scrolled) #nav-logo {
    color: #fff;
}

/* ─── Mobile Menu ─── */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu:not(.open) {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    font-size: 1.25rem;
}

/* Menu icon animation */
#menu-btn.active .menu-line:nth-child(1) {
    top: 7px;
    transform: rotate(45deg);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

#menu-btn.active .menu-line:nth-child(3) {
    top: 7px;
    transform: rotate(-45deg);
}

/* ─── Cards ─── */
.card {
    background: white;
    border-radius: 1.5rem;
    padding: 1.25rem;
    box-shadow: 0 4px 30px rgba(74, 28, 66, 0.06);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(74, 28, 66, 0.12);
}

/* ─── Service Cards ─── */
.service-card {
    border: 1px solid rgba(217, 168, 212, 0.2);
}

/* ─── Testimonial Cards ─── */
.testimonial-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: transform 0.4s ease, background 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.1);
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(74, 28, 66, 0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

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

/* ─── Reveal Animations (progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
    .reveal:nth-child(5) { transition-delay: 0.4s; }
    .reveal:nth-child(6) { transition-delay: 0.5s; }
}

/* When JS is disabled, all reveals are visible */
.no-js .reveal {
    opacity: 1;
    transform: none;
}

/* ─── Back to Top ─── */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

#back-to-top:not(.visible) {
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
}

#back-to-top:hover {
    background: #8a3578;
}

/* ─── Form ─── */
#contact-form select {
    appearance: none;
    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='%23a84e99' 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;
}

#contact-form select option {
    color: #4a1c42;
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
    .hero-gradient {
        background-size: 300% 300%;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .hero-orb-1 {
        width: 350px;
        height: 350px;
    }
    .hero-orb-2 {
        width: 280px;
        height: 280px;
    }
}
