/* ===== Custom Styles for Sofia Ice Cream Shop ===== */

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

body {
    overflow-x: hidden;
}

/* ===== Scroll Reveal ===== */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal[data-reveal="delay-1"] {
    transition-delay: 0.1s;
}

.scroll-reveal[data-reveal="delay-2"] {
    transition-delay: 0.2s;
}

.scroll-reveal[data-reveal="delay-3"] {
    transition-delay: 0.3s;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Floating Animation ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}

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

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
}

/* ===== Gold Particle Lines ===== */
@keyframes gold-line-drift {
    0% { transform: translateX(-100%) translateY(0); opacity: 0; }
    10% { opacity: 0.15; }
    90% { opacity: 0.15; }
    100% { transform: translateX(200%) translateY(20px); opacity: 0; }
}

.gold-line {
    position: absolute;
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.6), transparent);
}

.line-1 {
    top: 25%;
    left: 0;
    animation: gold-line-drift 8s ease-in-out infinite;
}

.line-2 {
    top: 55%;
    left: 0;
    animation: gold-line-drift 10s ease-in-out infinite 2s;
}

.line-3 {
    top: 75%;
    left: 0;
    animation: gold-line-drift 7s ease-in-out infinite 4s;
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(4, 11, 24, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== Mobile Menu ===== */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-link:last-child {
    border-bottom: none;
}

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

::-webkit-scrollbar-track {
    background: #0a1628;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d4af37, #c9a84c);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #f0d060, #d4af37);
}

/* ===== Selection ===== */
::selection {
    background: rgba(212, 175, 55, 0.3);
    color: #f0d060;
}

/* ===== Button Focus ===== */
a:focus-visible, button:focus-visible {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Image Loading ===== */
img {
    image-rendering: auto;
}

/* ===== Subtle shimmer on gold elements ===== */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.text-shimmer {
    background: linear-gradient(
        90deg,
        #d4af37 0%,
        #f0d060 25%,
        #d4af37 50%,
        #f0d060 75%,
        #d4af37 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s linear infinite;
}

/* ===== Card Hover Glow ===== */
.group:hover .group-hover\:shadow-gold-500\/10 {
    box-shadow: 0 25px 50px -12px rgba(212, 175, 55, 0.1);
}

/* ===== 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;
    }
}
