/* ===== Floral frame (karangan bunga di pinggir) =====
   Each position uses a different flower type so the frame never looks
   monotonous — four distinct corners plus varied side sprigs. */
.floral-frame {
    position: fixed;
    inset: 0;
    z-index: 40;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.4s ease 0.5s;
}

body.active .floral-frame {
    opacity: 1;
}

.floral-frame span {
    position: absolute;
    width: 13rem;
    height: 13rem;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    animation: floralFloat 7s ease-in-out infinite;
    will-change: translate;
}

/* corners — mirror via transform, float via the translate property (no conflict) */
.floral-frame .fc-tl {
    top: 0;
    left: 0;
    background-image: url('../assets/images/floral-corner.svg');
}

.floral-frame .fc-tr {
    top: 0;
    right: 0;
    transform: scaleX(-1);
    background-image: url('../assets/images/floral-daisy.svg');
    animation-delay: -1.7s;
}

.floral-frame .fc-bl {
    bottom: 0;
    left: 0;
    transform: scaleY(-1);
    background-image: url('../assets/images/floral-peony.svg');
    animation-delay: -3.4s;
}

.floral-frame .fc-br {
    bottom: 0;
    right: 0;
    transform: scale(-1, -1);
    background-image: url('../assets/images/floral-lily.svg');
    animation-delay: -5.1s;
}

/* side-mid sprigs reinforce the edges (different types again) */
.floral-frame .fs-l {
    top: 50%;
    left: -2.6rem;
    width: 9rem;
    height: 9rem;
    transform: translateY(-50%) rotate(-90deg);
    background-image: url('../assets/images/floral-lily.svg');
    opacity: 0.85;
    animation-delay: -2.5s;
}

.floral-frame .fs-r {
    top: 50%;
    right: -2.6rem;
    width: 9rem;
    height: 9rem;
    transform: translateY(-50%) rotate(-90deg) scaleX(-1);
    background-image: url('../assets/images/floral-corner.svg');
    opacity: 0.85;
    animation-delay: -4.2s;
}

@keyframes floralFloat {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -12px; }
}

/* On mobile keep every position (still varied) but smaller and softer, so it
   reads as a lively bouquet frame rather than four repeated corners. */
@media screen and (max-width: 768px) {
    .floral-frame span {
        width: 7rem;
        height: 7rem;
        opacity: 0.6;
    }

    .floral-frame .fs-l,
    .floral-frame .fs-r {
        width: 5rem;
        height: 5rem;
        opacity: 0.45;
    }

    .floral-frame .fs-l { left: -1.7rem; }
    .floral-frame .fs-r { right: -1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
    .floral-frame span {
        animation: none;
    }
}
