/* ============================================
   Rich's Hair Art — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Custom Properties */
:root {
    --gold-500: #d4a032;
    --gold-400: #e5b54a;
    --navy-900: #102a43;
    --navy-800: #243b53;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse-soft {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Hero Animations */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Staggered delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }

/* Hero */
.hero-float-card {
    animation: float 4s ease-in-out infinite;
}

.hero-image-main {
    animation: scaleIn 1s ease-out forwards;
    transform-origin: center center;
}

/* Navigation */
.nav-logo-text {
    transition: color 0.3s ease;
}

.nav-logo-sub {
    transition: color 0.3s ease;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
    transition: width 0.3s ease;
    border-radius: 1px;
}

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

.nav-link:hover {
    color: var(--gold-500);
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 1px 20px rgba(16, 42, 67, 0.08) !important;
}

.nav-scrolled .nav-logo-text {
    color: var(--navy-900) !important;
}

/* Buttons */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Section Styles */
.section-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.section-label::before {
    content: '';
    width: 24px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-500), transparent);
    border-radius: 1px;
}

.section-title {
    position: relative;
}

.section-subtitle {
    position: relative;
}

/* Service Cards */
.service-card {
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-400), var(--gold-600));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
    border-radius: 3px 3px 0 0;
}

.service-card:hover::before {
    transform: scaleX(1);
}

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

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

/* Contact */
.contact-info-card {
    transition: all 0.3s ease;
}

.contact-info-card:hover {
    transform: translateX(4px);
}

/* Input Fields */
.input-field {
    font-size: 0.95rem;
}

.input-field:focus {
    box-shadow: 0 0 0 3px rgba(212, 160, 50, 0.15);
}

/* Mobile Menu */
.mobile-menu-link {
    position: relative;
}

.mobile-menu-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
    transition: width 0.3s ease;
    border-radius: 1px;
}

.mobile-menu-link:hover::after {
    width: 60%;
}

.mobile-menu-link:hover {
    color: var(--gold-500);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--navy-50);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-400), var(--gold-600));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gold-500), var(--gold-700));
}

/* Selection */
::selection {
    background: rgba(212, 160, 50, 0.2);
    color: var(--navy-900);
}

/* Focus visible */
:focus-visible {
    outline: 2px solid var(--gold-500);
    outline-offset: 2px;
}

/* 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;
    }
    
    .reveal, .reveal-left, .reveal-right, .reveal-scale {
        opacity: 1;
        transform: none;
    }
}

/* Utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
