/* ============================================
   Smith's Grocery — Custom Styles
   ============================================ */

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

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

body {
    margin: 0;
    background-color: #0f0520;
}

/* ============================================
   Background Blobs
   ============================================ */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
}

.blob--plum {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #7e22ce 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: blobFloat 20s ease-in-out infinite;
}

.blob--amber {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #f59e0b 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation: blobFloat 25s ease-in-out infinite reverse;
}

.blob--small {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #a855f7 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: blobFloat 18s ease-in-out infinite;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.02); }
}

/* ============================================
   Hero Blobs
   ============================================ */
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.hero-blob--1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(126, 34, 206, 0.5) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    animation: heroBlob1 15s ease-in-out infinite;
}

.hero-blob--2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, transparent 70%);
    bottom: -50px;
    right: -50px;
    animation: heroBlob2 18s ease-in-out infinite;
}

.hero-blob--3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, transparent 70%);
    top: 40%;
    right: 10%;
    animation: heroBlob3 12s ease-in-out infinite;
}

@keyframes heroBlob1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, 30px); }
}

@keyframes heroBlob2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, -20px) scale(1.1); }
}

@keyframes heroBlob3 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(20px, -30px); }
    66% { transform: translate(-15px, 15px); }
}

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

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

@keyframes floatSlow {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(-15px) rotate(50deg); }
}

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

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

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

.animate-float-slow {
    animation: floatSlow 8s ease-in-out infinite;
}

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

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

.reveal-on-scroll.delay-100 {
    transition-delay: 0.1s;
}

.reveal-on-scroll.delay-200 {
    transition-delay: 0.2s;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(15, 5, 32, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.nav-link {
    position: relative;
}

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

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

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

#menu-icon-open.active {
    opacity: 0;
}

#menu-icon-close.active {
    opacity: 1;
}

#menu-icon-open.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-icon-open.active span:nth-child(2) {
    opacity: 0;
}

#menu-icon-open.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s 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; }

/* ============================================
   Form Styles
   ============================================ */
input:focus, textarea:focus {
    outline: none;
}

input::placeholder, textarea::placeholder {
    color: rgba(168, 168, 168, 0.4);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #9333ea, #fbbf24);
}

/* ============================================
   Selection
   ============================================ */
::selection {
    background: rgba(245, 158, 11, 0.3);
    color: #fff;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .blob {
        filter: blur(50px);
        opacity: 0.25;
    }
    
    .blob--plum {
        width: 300px;
        height: 300px;
    }
    
    .blob--amber {
        width: 250px;
        height: 250px;
    }
    
    .blob--small {
        width: 150px;
        height: 150px;
    }
}
