/* ========================================
   J's Shaved Ice — Custom Styles
   ======================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* ========================================
   Hero Section
   ======================================== */
.hero-bg {
    background: linear-gradient(135deg, #1a2c42 0%, #253d5a 25%, #355175 50%, #2a4a6a 75%, #1a2c42 100%);
}

.hero-gradient {
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(143, 226, 184, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 181, 194, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(160, 212, 255, 0.15) 0%, transparent 50%);
}

/* Floating shapes animation */
.floating-shape {
    animation: float 6s ease-in-out infinite;
}

.shape-1 { animation-delay: 0s; animation-duration: 7s; }
.shape-2 { animation-delay: 1s; animation-duration: 5s; }
.shape-3 { animation-delay: 2s; animation-duration: 8s; }
.shape-4 { animation-delay: 0.5s; animation-duration: 6s; }
.shape-5 { animation-delay: 3s; animation-duration: 5s; }
.shape-6 { animation-delay: 1.5s; animation-duration: 7s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

/* Hero entrance animations */
.hero-badge {
    animation: fadeSlideUp 0.8s ease-out both;
}

.hero-title {
    animation: fadeSlideUp 0.8s ease-out 0.2s both;
}

.hero-subtitle {
    animation: fadeSlideUp 0.8s ease-out 0.4s both;
}

.hero-ctas {
    animation: fadeSlideUp 0.8s ease-out 0.6s both;
}

.hero-scroll {
    animation: fadeSlideUp 0.8s ease-out 0.8s both;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    padding: 0;
}

/* ========================================
   CTA Buttons
   ======================================== */
.cta-primary {
    position: relative;
    overflow: hidden;
}

.cta-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(58, 184, 120, 0.1) 0%, rgba(143, 226, 184, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.cta-primary:hover::before {
    opacity: 1;
}

/* ========================================
   Flavor Cards
   ======================================== */
.flavor-card {
    position: relative;
    overflow: hidden;
}

.flavor-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

/* ========================================
   Scroll Reveal (progressive enhancement)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Stagger children */
    .reveal-stagger > * {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }
    
    .reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.05s; }
    .reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.1s; }
    .reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.15s; }
    .reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.2s; }
    .reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.25s; }
    .reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.3s; }
    
    .reveal-stagger.revealed > * {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Always visible for reduced motion or no-JS */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-stagger > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ========================================
   Mobile Menu
   ======================================== */
.mobile-link {
    display: block;
}

/* Menu button animation */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   Input Focus States
   ======================================== */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 4px rgba(143, 226, 184, 0.2);
}

/* ========================================
   Selection Color
   ======================================== */
::selection {
    background: rgba(143, 226, 184, 0.4);
    color: #1a2c42;
}

/* ========================================
   Smooth scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f2fdf5;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8fe2b8, #5fd096);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5fd096, #3ab878);
}

/* ========================================
   Responsive adjustments
   ======================================== */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.75rem;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 5rem;
    }
}
