/* ============================================
   REGALO LUXURY GIFTS & GELATO BAR
   Custom Styles
============================================ */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(212, 163, 115, 0.3);
    color: #022c22;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #022c22;
}
::-webkit-scrollbar-thumb {
    background: #064e3b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d4a373;
}

/* --- Hero Image Parallax --- */
#hero-img {
    transition: transform 0.1s linear;
    will-change: transform;
}

/* --- Scroll Indicator Animation --- */
@keyframes scroll-indicator {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(400%); }
}
.animate-scroll-indicator {
    animation: scroll-indicator 1.5s ease-in-out infinite;
}

/* --- Reveal Animations --- */
/* Default state: visible (progressive enhancement) */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-up {
    transform: translateY(0);
}
.reveal-left {
    transform: translateX(0);
}
.reveal-right {
    transform: translateX(0);
}

/* Animated state — applied via JS when in viewport */
.reveal-up.animated {
    opacity: 0;
    transform: translateY(40px);
}
.reveal-left.animated {
    opacity: 0;
    transform: translateX(-40px);
}
.reveal-right.animated {
    opacity: 0;
    transform: translateX(40px);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up.animated {
        opacity: 0;
        transform: translateY(40px);
    }
    .reveal-left.animated {
        opacity: 0;
        transform: translateX(-40px);
    }
    .reveal-right.animated {
        opacity: 0;
        transform: translateX(40px);
    }
}

/* --- Navbar Transition --- */
#navbar.scrolled {
    background: rgba(2, 44, 34, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(212, 163, 115, 0.1);
}

/* --- Nav Links --- */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #d4a373;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

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

/* Mobile link animation */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}
#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Hamburger animation */
#menu-icon.active #bar1 {
    transform: rotate(45deg) translate(3px, 3px);
}
#menu-icon.active #bar2 {
    opacity: 0;
    transform: scaleX(0);
}
#menu-icon.active #bar3 {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* --- Image Hover Effects --- */
.group img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Input Autofill --- */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #064e3b inset !important;
    -webkit-text-fill-color: #fdfbf7 !important;
}

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

/* --- Responsive --- */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.1;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #hero-img {
        transform: scale(1.05);
    }
}
