/*!
 * "Feeder" dressing for a solution page (/solutions/bird-feeder-camera): the
 * hero as a garden at first light - the sun coming up behind the hills, a
 * feeder on its pole with a robin on the perch, another on the grass and a few
 * birds crossing the sky. Decoration only: aria-hidden, ignores the pointer and
 * sits behind the copy. Artwork is in /img/feeder. The hero keeps its own dark
 * colours on every site palette.
 */

#header-btm.feeder-hero {
    position: relative;
    overflow: hidden;
    background-color: #0f3346 !important;
    background-image:
        radial-gradient(circle at 76% 108%, rgba(255, 190, 110, .6), transparent 44%),
        linear-gradient(180deg, #081a28 0%, #0f3346 52%, #235457 100%);
}

#header-btm.feeder-hero > .container-xxl {
    position: relative;
    z-index: 2;
}

.feeder-decor {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.feeder-decor > * {
    position: absolute;
}

.feeder-sun {
    right: 22%;
    bottom: -34px;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, #ffe6ae, #f6ae58 75%);
    box-shadow: 0 0 60px 20px rgba(255, 190, 110, .35);
}

.feeder-hills {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 60px;
}

/* A few birds a long way off, crossing slowly */
.feeder-flock {
    top: 14%;
    left: 0;
    width: 84px;
    height: auto;
    animation: feeder-cross 70s linear infinite;
    animation-delay: -28s;
}

.feeder-pole {
    right: 10%;
    bottom: 6px;
    width: 86px;
}

.feeder-pole > img:first-child {
    display: block;
    width: 100%;
    height: auto;
}

/* On the perch, facing the seed */
.feeder-perched {
    position: absolute;
    left: 80%;
    top: 43.5%;
    width: 30%;
    height: auto;
    transform: scaleX(-1);
}

/* On the grass, pecking now and then */
.feeder-ground {
    right: calc(10% + 120px);
    bottom: 9px;
    width: 36px;
    height: auto;
    transform: scaleX(-1);
    transform-origin: 40% 100%;
    animation: feeder-peck 5s ease-in-out infinite;
}

@media (min-width: 992px) {
    /* Room on the ground for the feeder under the hero chat */
    #header-btm.feeder-hero {
        padding-bottom: 5.25rem !important;
    }
}

@media (max-width: 991.98px) {
    #header-btm.feeder-hero {
        padding-bottom: 6.25rem !important;
    }

    .feeder-sun { right: 30%; width: 76px; height: 76px; bottom: -28px; }
    .feeder-hills { height: 48px; }
    .feeder-pole { right: 34px; width: 66px; }
    .feeder-ground { right: 128px; width: 28px; }
    .feeder-flock { width: 60px; }
}

@keyframes feeder-cross {
    from { transform: translate(-90px, 0); }
    to   { transform: translate(calc(100vw + 90px), -24px); }
}

@keyframes feeder-peck {
    0%, 62%, 100% { transform: scaleX(-1) rotate(0); }
    68%, 80%      { transform: scaleX(-1) rotate(24deg); }
    74%, 86%      { transform: scaleX(-1) rotate(6deg); }
}

/* Still life for anyone who asked for less motion: the flock stays in view */
@media (prefers-reduced-motion: reduce) {
    .feeder-decor * {
        animation: none !important;
    }

    .feeder-flock { left: 38%; }
}
