/* Garden Animation Styles */
.garden-zone {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.garden-soil {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: #8D6E63;
    border-top: 4px solid #6D4C41;
}

.garden-plants {
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding-bottom: 5px;
}

/* Base Plant Style */
.plant {
    position: relative;
    width: 80px;
    height: 120px;
    transform-origin: bottom center;
    opacity: 0;
}

/* Animation Classes */
.animate-grow {
    animation: growthCycle 12s ease-in-out infinite;
}

.animate-sway {
    animation: sway 3s ease-in-out infinite alternate;
}

/* Plant Types */

/* 1. Sprout (Futaba) */
.plant-type-1 {
    width: 40px;
    height: 60px;
}

.plant-type-1::before,
.plant-type-1::after {
    content: '';
    position: absolute;
    top: 0;
    width: 24px;
    height: 24px;
    background: #8BC34A;
    border-radius: 50% 50% 0 50%;
}

.plant-type-1::before {
    left: -12px;
    transform: rotate(-10deg);
}

.plant-type-1::after {
    right: -12px;
    transform: rotate(80deg) scaleX(-1);
    border-radius: 50% 50% 50% 0;
}

.plant-type-1 .stem {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 40px;
    background: #689F38;
}

/* 2. Tomato Plant */
.plant-type-2 {
    width: 100px;
    height: 160px;
}

.plant-type-2 .stem {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 100%;
    background: #558B2F;
    border-radius: 4px;
}

.plant-type-2 .leaf {
    position: absolute;
    width: 40px;
    height: 20px;
    background: #7CB342;
    border-radius: 40px 0 40px 0;
}

.plant-type-2 .leaf:nth-child(1) {
    bottom: 40px;
    left: -20px;
    transform: rotate(-20deg);
}

.plant-type-2 .leaf:nth-child(2) {
    bottom: 80px;
    right: -20px;
    transform: rotate(20deg) scaleX(-1);
}

.plant-type-2 .leaf:nth-child(3) {
    bottom: 120px;
    left: -16px;
    transform: rotate(-10deg);
}

.plant-type-2 .fruit {
    position: absolute;
    width: 32px;
    height: 32px;
    background: #e53935;
    border-radius: 50%;
    top: 50px;
    left: 48px;
    /* Centered relative to stem */
    /* Stem center is at 50px (50% of 100px). */
    box-shadow: -4px -4px 0 rgba(0, 0, 0, 0.1) inset;
    z-index: 2;
}

.plant-type-2 .fruit::before {
    /* Little branch connecting to main stem */
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    width: 16px;
    height: 6px;
    background: #558B2F;
    transform: rotate(15deg);
    transform-origin: right center;
}

.plant-type-2 .fruit::after {
    /* Calyx (leafy hat) */
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 8px;
    background: #33691E;
    border-radius: 8px 8px 0 0;
}

/* 3. Carrot (Leafy top) */
.plant-type-3 {
    width: 60px;
    height: 100px;
}

.plant-type-3 .leaves {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.plant-type-3 .leaf-blade {
    width: 8px;
    height: 80px;
    background: #43A047;
    border-radius: 8px;
    position: absolute;
    bottom: 0;
    transform-origin: bottom center;
}

.plant-type-3 .leaf-blade:nth-child(1) {
    height: 70px;
    transform: rotate(-15deg);
}

.plant-type-3 .leaf-blade:nth-child(2) {
    height: 90px;
    transform: rotate(0deg);
}

.plant-type-3 .leaf-blade:nth-child(3) {
    height: 70px;
    transform: rotate(15deg);
}

/* 4. Flower (Sunflowery) */
.plant-type-4 {
    width: 80px;
    height: 180px;
}

.plant-type-4 .stem {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 100%;
    background: #689F38;
}

.plant-type-4 .flower-head {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: #FDD835;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.plant-type-4 .flower-head::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #FBC02D;
    border-radius: 50%;
    transform: scale(0.6);
}

.plant-type-4 .petals {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: spin 20s linear infinite;
    z-index: 1;
}

.plant-type-4 .petal {
    position: absolute;
    top: 6px;
    left: 50%;
    transform-origin: bottom center;
    width: 12px;
    height: 24px;
    background: #FFF176;
    border-radius: 20px;
    margin-left: -6px;
    /* Fix centering */
}

/* Animations */
@keyframes growthCycle {
    0% {
        opacity: 0;
        transform: scale(0) translateY(20px);
    }

    10% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    90% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    100% {
        opacity: 0;
        transform: scale(0) translateY(20px);
    }
}

@keyframes sway {
    0% {
        transform: rotate(-2deg);
    }

    100% {
        transform: rotate(2deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Butterfly Animation */
@keyframes flutter {

    0%,
    100% {
        transform: scaleX(1);
    }

    50% {
        transform: scaleX(0.2);
    }
}

@keyframes fly-path-1 {
    0% {
        top: 60%;
        left: -10%;
        opacity: 0;
        transform: rotate(15deg);
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        top: 20%;
        left: 110%;
        opacity: 0;
        transform: rotate(15deg);
    }
}

@keyframes fly-path-2 {
    0% {
        top: 40%;
        left: 110%;
        opacity: 0;
        transform: scaleX(-1) rotate(-10deg);
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        top: 10%;
        left: -10%;
        opacity: 0;
        transform: scaleX(-1) rotate(-10deg);
    }
}

/* Butterfly Styles */
.butterfly {
    position: absolute;
    width: 14px;
    height: 12px;
    z-index: 10;
    pointer-events: none;
}

.butterfly::before,
.butterfly::after {
    content: '';
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: #FFEB3B;
    /* Yellow-ish */
    border-radius: 50% 50% 0 50%;
    opacity: 0.9;
}

.butterfly::before {
    left: 0;
    transform-origin: right center;
    animation: flutter 0.2s infinite ease-in-out;
}

.butterfly::after {
    right: 0;
    transform: scaleX(-1);
    transform-origin: left center;
    animation: flutter 0.2s infinite ease-in-out reverse;
}

.butterfly-1 {
    animation: fly-path-1 15s linear infinite;
    animation-delay: 2s;
}

.butterfly-2 {
    animation: fly-path-2 18s linear infinite;
    animation-delay: 8s;
    background-color: transparent;
}

.butterfly-2::before,
.butterfly-2::after {
    background: #E1BEE7;
    /* Purple-ish */
}


/* Delays for random feel */
.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 2.5s;
}

.delay-3 {
    animation-delay: 4.8s;
}

.delay-4 {
    animation-delay: 1.1s;
}

.delay-5 {
    animation-delay: 6.4s;
}

.delay-6 {
    animation-delay: 3.3s;
}

.delay-7 {
    animation-delay: 8.7s;
}

.delay-8 {
    animation-delay: 1.0s;
}

/* Watering Can Animation */
.water-can {
    position: absolute;
    top: 20px;
    right: 20%;
    width: 60px;
    height: 40px;
    background: #4FC3F7;
    border-radius: 10px 10px 5px 5px;
    opacity: 0;
    animation: waterEnter 8s ease-in-out infinite;
    z-index: 20;
}

.water-can::before {
    /* Spout */
    content: '';
    position: absolute;
    top: 5px;
    right: -15px;
    width: 20px;
    height: 5px;
    background: #4FC3F7;
    transform: rotate(-30deg);
}

.water-drops {
    position: absolute;
    top: 10px;
    right: -25px;
    /* Aligned with spout tip */
    width: 10px;
    height: 20px;
    opacity: 0;
    animation: pouring 8s ease-in-out infinite;
}

.drop {
    width: 4px;
    height: 6px;
    background: #81D4FA;
    border-radius: 50%;
    position: absolute;
    animation: dropFall 0.5s linear infinite;
}

@keyframes waterEnter {

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

    10%,
    40% {
        opacity: 1;
        transform: translate(-20px, 10px) rotate(-20deg);
    }
}

@keyframes pouring {

    0%,
    10% {
        opacity: 0;
    }

    15%,
    35% {
        opacity: 1;
    }

    40%,
    100% {
        opacity: 0;
    }
}

@keyframes dropFall {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(30px);
        opacity: 0;
    }
}

/* Floating Elements (Petals, Leaves) */
.floating-zone {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.floater {
    position: absolute;
    opacity: 0;
    animation: floatCycle 15s linear infinite;
}

.floater-petal {
    width: 10px;
    height: 18px;
    background: #FFF176;
    border-radius: 40%;
}

.floater-leaf {
    width: 14px;
    height: 24px;
    background: #AED581;
    border-radius: 0 50% 0 50%;
}

.floater-dot {
    width: 8px;
    height: 8px;
    background: #ffccbc;
    border-radius: 50%;
}

@keyframes floatCycle {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
        top: 110%;
        /* Start below */
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translate(100px, -100%) rotate(720deg);
        /* Float up and right */
        opacity: 0;
        top: -10%;
    }
}

/* Variations for random feel */
.float-1 {
    animation-duration: 12s;
    animation-delay: 0s;
    left: 10%;
}

.float-2 {
    animation-duration: 18s;
    animation-delay: 2s;
    left: 30%;
}

.float-3 {
    animation-duration: 14s;
    animation-delay: 5s;
    left: 50%;
}

.float-4 {
    animation-duration: 20s;
    animation-delay: 1s;
    left: 70%;
}

.float-5 {
    animation-duration: 16s;
    animation-delay: 3s;
    left: 90%;
}

.float-6 {
    animation-duration: 13s;
    animation-delay: 7s;
    left: 20%;
}

.float-7 {
    animation-duration: 19s;
    animation-delay: 4s;
    left: 60%;
}

.float-8 {
    animation-duration: 15s;
    animation-delay: 6s;
    left: 40%;
}

/* Hero Section Text Decoration Animations */
.hero-content {
    position: relative;
    /* Ensure absolute children are positioned relative to this */
}

.hero-decoration {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    /* Behind text but visible */
    user-select: none;
    font-size: 1.5rem;
    will-change: transform, opacity;
    animation: float-emoji 4s ease-out forwards;
}

@keyframes float-emoji {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(0.5);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    80% {
        opacity: 0.8;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(1.2);
        opacity: 0;
    }
}