/* ===== Custom Styles for Traphill Tan & Tone ===== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background-color: rgba(252, 191, 24, 0.3);
    color: #fff;
}

/* ===== Hero Card Animations ===== */
.hero-card {
    animation: floatCard 6s ease-in-out infinite;
}

.hero-card:nth-child(2) {
    animation-delay: -1.5s;
}

.hero-card:nth-child(3) {
    animation-delay: -3s;
}

.hero-card:nth-child(4) {
    animation-delay: -4.5s;
}

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

/* ===== Service Card Hover Glow ===== */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(252, 191, 24, 0.06) 0%, transparent 60%);
}

.service-card:hover::before {
    opacity: 1;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* Always visible without JS */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===== Gallery Item Hover ===== */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(42, 26, 33, 0.5) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 16px;
}

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

/* ===== Navbar transition ===== */
.nav-scrolled {
    background: rgba(42, 26, 33, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

::-webkit-scrollbar-track {
    background: #2a1a21;
}

::-webkit-scrollbar-thumb {
    background: #a66d82;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c18fa4;
}

/* ===== Mobile menu animation ===== */
.mobile-menu-open #bar1 {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-open #bar2 {
    opacity: 0;
}

.mobile-menu-open #bar3 {
    transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ===== Form select arrow override ===== */
select option {
    background-color: #2a1a21;
    color: #fff;
}

/* ===== Back to top button ===== */
.back-to-top-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
    translate: 0 0 !important;
}

/* ===== Utility ===== */
@media (max-width: 768px) {
    .hero-card {
        display: none;
    }
}
