/* ========================================
   BAREFOOT PRODUCTS - Home Industries
   Artisan Pickles & Preserves
   ======================================== */

/* CSS Custom Properties */
:root {
    /* Color Palette - Warm Farmhouse */
    --emerald-deep: #2d4a3e;
    --emerald-mid: #3d6854;
    --emerald-light: #5a8a73;
    --emerald-glow: #7ab89a;

    --harvest-deep: #8b4513;
    --harvest-mid: #a0522d;
    --harvest-light: #cd853f;
    --harvest-glow: #deb887;

    --sunflower-deep: #b8860b;
    --sunflower-mid: #daa520;
    --sunflower-light: #f4c430;
    --sunflower-glow: #ffdd55;

    --cream: #fdf8f0;
    --cream-transparent: rgba(253, 248, 240, 0.9);
    --warm-white: #fff9f0;
    --wood-brown: #8b7355;

    /* Glassmorphism */
    --glass-bg: rgba(253, 248, 240, 0.75);
    --glass-bg-dark: rgba(45, 74, 62, 0.8);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: rgba(0, 0, 0, 0.15);
    --blur-amount: 16px;

    /* Typography */
    --font-display: 'Caveat', cursive;
    --font-handwritten: 'Patrick Hand', cursive;
    --font-body: 'Quicksand', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;

    /* Transitions */
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--emerald-deep) 0%, #1a3328 50%, #243b2f 100%);
    color: var(--emerald-deep);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Fallback - visible when image doesn't load */
.bg-fallback {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            #3d5c4a 0%,
            #4a6b57 30%,
            #5a7d66 60%,
            #6b8f75 100%);
    z-index: 0;
}

/* ========================================
   PARALLAX SYSTEM
   ======================================== */

.parallax-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    will-change: transform;
}

.layer-bg {
    z-index: 1;
    height: 100%;
}

.layer-bg .bg-image {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    object-position: center bottom;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Fallback gradient when image doesn't load */
.layer-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            #2d4a3e 0%,
            #3d6854 20%,
            #4a7c65 50%,
            #5a9078 80%,
            #6ba58a 100%);
    z-index: 0;
}

.layer-mid {
    z-index: 2;
    pointer-events: none;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
}

.layer-content {
    z-index: 10;
    position: relative;
    min-height: 100vh;
}

.layer-fg {
    z-index: 5;
    pointer-events: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
}

.layer-fg .fg-image {
    width: 100%;
    height: auto;
    max-height: 40vh;
    object-fit: cover;
    object-position: center top;
    opacity: 0.9;
}

/* Jars Decoration Layer */
.jars-decoration {
    position: fixed;
    bottom: 10%;
    right: 5%;
    z-index: 6;
    pointer-events: none;
    transition: transform 0.1s ease-out;
}

.jars-image {
    width: 280px;
    height: auto;
    opacity: 0.9;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4));
}

/* ========================================
   FLOATING ELEMENTS
   ======================================== */

.floating-leaf {
    position: absolute;
    width: 30px;
    height: 30px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%235a8a73' d='M50 10 C30 30, 20 60, 50 90 C80 60, 70 30, 50 10'/%3E%3C/svg%3E") center/contain no-repeat;
    opacity: 0.7;
    animation: leafFloat 8s ease-in-out infinite;
}

.leaf-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.leaf-2 {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
    transform: scale(0.8);
}

.floating-butterfly {
    position: absolute;
    width: 40px;
    height: 40px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cellipse cx='30' cy='40' rx='25' ry='35' fill='%23f4c430' opacity='0.8'/%3E%3Cellipse cx='70' cy='40' rx='25' ry='35' fill='%23f4c430' opacity='0.8'/%3E%3Cellipse cx='50' cy='50' rx='5' ry='20' fill='%238b4513'/%3E%3C/svg%3E") center/contain no-repeat;
    animation: butterflyFloat 12s ease-in-out infinite;
}

.butterfly-1 {
    top: 30%;
    left: 70%;
}

.floating-seed {
    position: absolute;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, var(--cream) 30%, transparent 70%);
    border-radius: 50%;
    opacity: 0.6;
    animation: seedFloat 15s ease-in-out infinite;
}

.seed-1 {
    top: 40%;
    left: 30%;
    animation-delay: 3s;
}

.seed-2 {
    top: 70%;
    left: 80%;
    animation-delay: 7s;
}

@keyframes leafFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-20px) rotate(10deg);
    }

    50% {
        transform: translateY(-10px) rotate(-5deg);
    }

    75% {
        transform: translateY(-25px) rotate(5deg);
    }
}

@keyframes butterflyFloat {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(30px, -40px) rotate(5deg);
    }

    50% {
        transform: translate(60px, -20px) rotate(-3deg);
    }

    75% {
        transform: translate(20px, -50px) rotate(8deg);
    }
}

@keyframes seedFloat {

    0%,
    100% {
        transform: translate(0, 0);
        opacity: 0.6;
    }

    50% {
        transform: translate(50px, -100px);
        opacity: 0.3;
    }
}

/* ========================================
   GLASSMORPHISM COMPONENTS
   ======================================== */

.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px var(--glass-shadow);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--emerald-deep);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-md);
}

.nav-link {
    font-family: var(--font-handwritten);
    font-size: 1.2rem;
    color: var(--emerald-mid);
    text-decoration: none;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 20px;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-link:hover {
    color: var(--emerald-deep);
    background: rgba(122, 184, 154, 0.2);
}

.nav-link::after {
    content: '🌻';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    transition: var(--transition-bounce);
}

.nav-link:hover::after {
    transform: translateY(-50%) scale(1);
}

/* Glass Panels */
.glass-panel,
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow:
        0 8px 32px var(--glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.hero-glass,
.story-glass,
.visit-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    box-shadow:
        0 8px 32px var(--glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    padding: var(--space-lg);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) var(--space-md);
    padding-top: calc(var(--space-xl) + 60px);
}

.hero-glass {
    max-width: 700px;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    color: var(--emerald-deep);
    margin-bottom: var(--space-xs);
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
}

.hero-subtitle {
    font-family: var(--font-handwritten);
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    color: var(--harvest-mid);
    margin-bottom: var(--space-md);
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--emerald-mid);
    margin-bottom: var(--space-lg);
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   STONE & WOOD BUTTONS
   ======================================== */

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-handwritten);
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.btn-stone {
    background: linear-gradient(145deg,
            #a8a8a0 0%,
            #8a8a82 30%,
            #6e6e66 70%,
            #5a5a52 100%);
    color: var(--cream);
    border-radius: 30px 35px 32px 28px;
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-stone:hover {
    transform: translateY(-4px) rotate(-1deg);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.35),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.btn-stone:active {
    transform: translateY(-2px);
}

.btn-stone .btn-leaf {
    display: inline-block;
    transition: var(--transition-bounce);
    transform-origin: bottom center;
}

.btn-stone:hover .btn-leaf {
    animation: leafSway 0.6s ease-in-out infinite;
}

@keyframes leafSway {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(15deg);
    }

    75% {
        transform: rotate(-15deg);
    }
}

.btn-wood {
    background: linear-gradient(145deg,
            #c9a66b 0%,
            #a67c52 30%,
            #8b5a2b 70%,
            #6b4423 100%);
    color: var(--cream);
    border-radius: 8px;
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.15),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
    position: relative;
}

/* Wood grain texture */
.btn-wood::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(90deg,
            transparent,
            transparent 3px,
            rgba(0, 0, 0, 0.05) 3px,
            rgba(0, 0, 0, 0.05) 6px);
    border-radius: inherit;
    pointer-events: none;
}

.btn-wood:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.35),
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: 1rem;
}

.btn-lg {
    padding: var(--space-md) var(--space-lg);
    font-size: 1.4rem;
}

/* ========================================
   PRODUCTS SECTION
   ======================================== */

.products-section {
    padding: var(--space-xl) var(--space-md);
    min-height: 100vh;
}

.section-header {
    max-width: 600px;
    margin: 0 auto var(--space-lg);
    padding: var(--space-md);
    text-align: center;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--emerald-deep);
    margin-bottom: var(--space-sm);
}

.section-desc {
    font-family: var(--font-handwritten);
    font-size: 1.2rem;
    color: var(--emerald-mid);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    padding: var(--space-md);
    text-align: center;
    transition: var(--transition-smooth);
}

.product-card:hover {
    transform: translateY(-8px) rotate(0.5deg);
    box-shadow:
        0 16px 48px var(--glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Product Image Styling */
.product-image-container {
    width: 100%;
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: var(--space-sm);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* CSS Jar Illustrations (fallback) */
.jar-container {
    height: 150px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: var(--space-sm);
}

.jar {
    position: relative;
    width: 80px;
    transition: var(--transition-bounce);
}

.product-card:hover .jar {
    transform: rotate(-5deg) scale(1.05);
}

.jar-lid {
    width: 60px;
    height: 15px;
    background: linear-gradient(180deg, #c9a66b 0%, #8b7355 100%);
    border-radius: 4px 4px 0 0;
    margin: 0 auto;
    position: relative;
}

.jar-lid::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.jar-body {
    width: 70px;
    height: 90px;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 0 0 15px 15px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset -10px 0 20px rgba(255, 255, 255, 0.3),
        inset 10px 0 20px rgba(0, 0, 0, 0.05);
}

.jar-contents {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 75%;
    border-radius: 0 0 12px 12px;
}

.jar-contents.pickle {
    background: linear-gradient(180deg, #7cb342 0%, #558b2f 50%, #33691e 100%);
}

.jar-contents.berry {
    background: linear-gradient(180deg, #4a2040 0%, #3d1836 50%, #2d1028 100%);
}

.jar-contents.orange {
    background: linear-gradient(180deg, #ffb74d 0%, #ff9800 50%, #e65100 100%);
}

.jar-contents.purple {
    background: linear-gradient(180deg, #7b1fa2 0%, #6a1b9a 50%, #4a148c 100%);
}

.jar-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-handwritten);
    font-size: 0.9rem;
    color: var(--emerald-mid);
    background: var(--cream);
    padding: 2px 12px;
    border-radius: 10px;
    border: 1px solid var(--emerald-light);
}

.product-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--emerald-deep);
    margin-bottom: var(--space-xs);
    margin-top: var(--space-sm);
}

.product-desc {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--emerald-mid);
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.product-price {
    display: block;
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--harvest-deep);
    margin-bottom: var(--space-sm);
}

.product-size {
    display: inline-block;
    font-family: var(--font-handwritten);
    font-size: 1rem;
    color: var(--harvest-mid);
    background: rgba(139, 69, 19, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: var(--space-sm);
}

/* More Products Section */
.more-products {
    max-width: 600px;
    margin: var(--space-lg) auto 0;
    padding: var(--space-md);
    text-align: center;
}

.more-text {
    font-family: var(--font-handwritten);
    font-size: 1.2rem;
    color: var(--emerald-mid);
}

/* ========================================
   STORY SECTION
   ======================================== */

.story-section {
    padding: var(--space-xl) var(--space-md);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.story-glass {
    max-width: 800px;
    text-align: center;
}

.story-content {
    margin: var(--space-md) 0;
}

.story-content p {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--emerald-mid);
    margin-bottom: var(--space-md);
    line-height: 1.9;
}

.story-signature {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-top: var(--space-md);
}

.story-signature span:first-child {
    font-family: var(--font-handwritten);
    font-size: 1.2rem;
    color: var(--emerald-mid);
}

.signature {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--emerald-deep);
}

/* ========================================
   VISIT SECTION
   ======================================== */

.visit-section {
    padding: var(--space-xl) var(--space-md);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.visit-glass {
    max-width: 600px;
    text-align: center;
}

.visit-content {
    margin-top: var(--space-md);
}

.visit-info {
    margin-bottom: var(--space-md);
}

.visit-info p {
    font-family: var(--font-handwritten);
    font-size: 1.2rem;
    color: var(--emerald-mid);
    margin-bottom: var(--space-sm);
}

/* ========================================
   FOOTER
   ======================================== */

.glass-footer {
    margin-top: var(--space-lg);
    border-radius: 24px 24px 0 0;
}

.footer {
    padding: var(--space-md);
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    align-items: center;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--emerald-deep);
}

.footer-text {
    font-family: var(--font-handwritten);
    color: var(--emerald-mid);
}

.footer-note {
    font-family: var(--font-handwritten);
    font-size: 0.9rem;
    color: var(--harvest-mid);
    font-style: italic;
}

.footer-socials {
    display: flex;
    gap: var(--space-md);
}

.social-link {
    font-family: var(--font-handwritten);
    color: var(--emerald-mid);
    text-decoration: none;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 20px;
    transition: var(--transition-smooth);
}

.social-link:hover {
    background: rgba(122, 184, 154, 0.2);
    color: var(--emerald-deep);
}

/* ========================================
   SOUND TOGGLE
   ======================================== */

.sound-btn {
    position: fixed;
    bottom: var(--space-md);
    left: var(--space-md);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: var(--font-handwritten);
    font-size: 1rem;
    color: var(--emerald-mid);
}

.sound-btn:hover {
    transform: scale(1.05);
    background: var(--cream-transparent);
}

.sound-btn.active .sound-icon::after {
    content: '🔊';
}

.sound-icon {
    font-size: 1.2rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .jars-decoration {
        display: none;
    }

    .layer-fg .fg-image {
        max-height: 25vh;
    }

    .hero-glass,
    .story-glass,
    .visit-glass {
        padding: var(--space-md);
        margin: 0 var(--space-sm);
    }

    .products-grid {
        grid-template-columns: 1fr;
        padding: 0 var(--space-sm);
    }

    .product-image-container {
        height: 180px;
    }
}

@media (max-width: 480px) {
    :root {
        --space-md: 1.5rem;
        --space-lg: 2.5rem;
        --space-xl: 4rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */

.product-card,
.story-glass,
.visit-glass {
    opacity: 0;
    transform: translateY(30px);
    animation: scrollFadeIn 0.8s ease-out forwards;
    animation-play-state: paused;
}

.product-card.visible,
.story-glass.visible,
.visit-glass.visible {
    animation-play-state: running;
}

@keyframes scrollFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation delays for product cards */
.product-card:nth-child(1) {
    animation-delay: 0.1s;
}

.product-card:nth-child(2) {
    animation-delay: 0.2s;
}

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

.product-card:nth-child(4) {
    animation-delay: 0.4s;
}

.product-card:nth-child(5) {
    animation-delay: 0.5s;
}

.product-card:nth-child(6) {
    animation-delay: 0.6s;
}