/* ============================================
   The Copper Fox Tattoo — Custom Styles
   ============================================ */

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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: rgba(132, 23, 56, 0.15);
    color: #3e0715;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FAF7F5;
}
::-webkit-scrollbar-thumb {
    background: #d4a0aa;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a0183e;
}

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

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

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

/* Navbar scroll state */
.nav-scrolled {
    background-color: rgba(250, 247, 245, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(132, 23, 56, 0.08);
}

.nav-scrolled .nav-link {
    color: #3e0715;
}

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

.menu-line:last-child {
    width: 1.5rem;
}

.menu-open .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: translateY(-4px) rotate(-45deg);
}

.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: #a0183e;
    transition: width 0.3s ease;
}

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

/* --- Floating Card Animation --- */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 5s;
}

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

.service-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #a0183e, #db4068);
    transition: width 0.4s ease;
    z-index: 1;
}

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

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

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

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

/* --- Testimonial Cards --- */
.testimonial-card {
    transition: transform 0.4s ease, background-color 0.4s ease;
}

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

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
}

/* Reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .floating-card {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* --- Decorative Divider --- */
.section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #f6a5b8, transparent);
}

/* --- Button Focus States --- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #a0183e;
    outline-offset: 2px;
}

/* --- Form Select Arrow --- */
select {
    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='%23a0183e' 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;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
}

@media (min-width: 768px) {
    .floating-card {
        display: block;
    }
}
