/* =====================================================
   MINGL — SCROLL ANIMATIONS
   Everything that hides content lives under html.sa-on,
   which is only added when JS runs and the visitor has
   not asked for reduced motion.
===================================================== */

:root {
    --sa-ease: cubic-bezier(0.2, 0.9, 0.25, 1);
    --sa-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Scroll progress bar + rider ---------- */
.sa-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1200;
    width: 100%;
    height: 5px;
    pointer-events: none;
}

.sa-progress-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f24d80, #ff9a5c 45%, #8fbf7f 80%, #698d65);
    transform-origin: left center;
    transform: scaleX(0);
    border-radius: 0 6px 6px 0;
}

.sa-progress-rider {
    position: absolute;
    top: 2px;
    left: 0;
    font-size: 22px;
    line-height: 1;
    transform: translate(-50%, 0);
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25));
    will-change: transform;
}

/* ---------- Header hide / show ---------- */
.mingl-header {
    transition:
        background 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.45s var(--sa-ease);
}

.mingl-header.is-hidden {
    transform: translateY(-110%);
}

/* ---------- Hero ---------- */
.sa-on .mingl-hero-image {
    will-change: transform;
}

.sa-on .mingl-hero-image img {
    animation: saHeroIn 1.9s var(--sa-ease) both;
}

@keyframes saHeroIn {
    from {
        transform: scale(1.35);
        filter: blur(10px) saturate(0.6);
        opacity: 0.2;
    }
    to {
        transform: scale(1);
        filter: blur(0) saturate(1);
        opacity: 1;
    }
}

.sa-on .mingl-hero-bottom-curve {
    will-change: transform;
}

.sa-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 58px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 18px 9px 12px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    color: #393532;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    white-space: nowrap;
    transform: translateX(-50%);
    pointer-events: none;
    animation: saCueIn 0.9s 1.6s var(--sa-ease) both;
}

.sa-scroll-cue-mouse {
    position: relative;
    width: 22px;
    height: 34px;
    border: 2px solid var(--pink);
    border-radius: 14px;
}

.sa-scroll-cue-mouse::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    width: 4px;
    height: 7px;
    margin-left: -2px;
    border-radius: 4px;
    background: var(--pink);
    animation: saDrip 1.6s ease-in-out infinite;
}

@keyframes saDrip {
    0% { transform: translateY(0); opacity: 1; }
    70% { transform: translateY(12px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
}

@keyframes saCueIn {
    from { opacity: 0; transform: translate(-50%, 24px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- Floating fruit layer ---------- */
#main-content {
    position: relative;
}

.sa-fruit-layer {
    position: absolute;
    inset: 0;
    z-index: 6;
    overflow: hidden;
    pointer-events: none;
}

.sa-fruit {
    position: absolute;
    top: 0;
    line-height: 1;
    user-select: none;
    opacity: 0;
    will-change: transform;
    filter: drop-shadow(0 8px 10px rgba(60, 30, 30, 0.22));
}

.sa-fruit.is-far {
    filter: blur(2.5px) drop-shadow(0 6px 8px rgba(60, 30, 30, 0.12));
}

@media (max-width: 767px) {
    .sa-fruit:nth-child(2n) {
        display: none;
    }
}

/* ---------- Split headings (word mask reveal) ---------- */
.sa-on .sa-split .sa-word {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding: 0.04em 0.06em 0.16em;
    margin: -0.04em -0.06em -0.16em;
}

.sa-on .sa-split .sa-word-in {
    display: inline-block;
    transform: translateY(115%) rotate(7deg);
    transform-origin: left bottom;
    transition: transform 1s var(--sa-ease);
    transition-delay: calc(var(--d, 0s) + var(--i, 0) * 75ms);
}

.sa-on .sa-split.is-in .sa-word-in {
    transform: none;
}

/* ---------- Generic reveals ---------- */
.sa-on .sa-r {
    opacity: 0;
    transition:
        opacity 0.9s var(--sa-ease),
        transform 1s var(--sa-ease),
        clip-path 1s var(--sa-ease),
        letter-spacing 1.2s var(--sa-ease);
    transition-delay: var(--d, 0s);
}

.sa-on .sa-r.is-in {
    opacity: 1;
    transform: none;
}

.sa-on .sa-up {
    transform: translate3d(var(--sx, 0px), 38px, 0);
}

.sa-on .sa-label {
    transform: translate3d(var(--sx, 0px), 14px, 0);
    letter-spacing: 9px;
}

.sa-on .sa-label.is-in {
    letter-spacing: 1.8px;
}

.sa-on .sa-line {
    transform: scaleX(0);
    transform-origin: left center;
}

.sa-on .sa-pop {
    transform: translate3d(0, 28px, 0) scale(0.8);
}

/* Menu cards: 3D rise */
.sa-on .sa-card {
    transform: perspective(1100px) translate3d(0, 90px, 0) rotateX(-22deg) scale(0.9);
    transform-origin: 50% 100%;
}

/* Feature artwork: curtain reveal */
.sa-on .sa-art {
    clip-path: var(--clip-from, inset(0 0 0 100%));
    opacity: 1;
    transition: clip-path 1.5s var(--sa-ease);
}

.sa-on .sa-art.is-in {
    clip-path: inset(0 0 0 0);
}

.sa-on .sa-art img {
    will-change: transform;
}

/* Benefits */
.sa-on .sa-benefit {
    transform: translate3d(0, 50px, 0);
}

.sa-on .sa-benefit .mingl-benefit-icon {
    transform: scale(0) rotate(-140deg);
    transition: transform 1.1s var(--sa-spring);
    transition-delay: calc(var(--d, 0s) + 0.25s);
}

.sa-on .sa-benefit.is-in .mingl-benefit-icon {
    transform: none;
}

/* Footer */
.sa-on .sa-foot {
    transform: translate3d(0, 46px, 0);
}

/* ---------- Section "unfold" (scrubbed by JS) ---------- */
.sa-on .sa-unfold {
    will-change: transform, border-radius;
    transform-origin: 50% 0%;
}

/* ---------- Menu card tilt + shine ---------- */
.mingl-menu-card {
    position: relative;
    transform-style: preserve-3d;
    transition:
        transform 0.35s var(--sa-ease),
        box-shadow 0.35s ease;
}

.mingl-menu-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(
        circle at var(--mx, 50%) var(--my, 0%),
        rgba(255, 255, 255, 0.5),
        transparent 55%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
}

.mingl-menu-card.is-tilting {
    box-shadow: 0 22px 44px rgba(29, 45, 32, 0.18);
}

.mingl-menu-card.is-tilting::after {
    opacity: 1;
}

.mingl-menu-card-image img {
    will-change: transform;
}

/* ---------- Flipbook entrance ---------- */
.sa-on .mingl-flipbook .book {
    will-change: transform;
}

/* ---------- Crossed marquee ribbons ---------- */
.sa-marquee {
    position: relative;
    height: 230px;
    overflow: hidden;
    background: #fffdfa;
}

.sa-ribbon {
    position: absolute;
    left: -10%;
    width: 120%;
    padding: 14px 0;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.sa-ribbon-a {
    top: 38px;
    background: linear-gradient(100deg, #f66c95, #ec4176);
    color: #fff;
    transform: rotate(-2.6deg);
    z-index: 2;
}

.sa-ribbon-b {
    top: 104px;
    background: #163f31;
    color: #fffaf6;
    transform: rotate(2.4deg);
    z-index: 1;
}

.sa-ribbon-track {
    display: inline-flex;
    will-change: transform;
}

.sa-ribbon-track span {
    display: inline-flex;
    align-items: center;
    gap: 28px;
    padding-right: 28px;
    font-size: clamp(22px, 3.2vw, 40px);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sa-ribbon-track em {
    font-style: normal;
    font-size: 0.8em;
    opacity: 0.85;
}

.sa-ribbon-b .sa-ribbon-track span {
    color: transparent;
    -webkit-text-stroke: 1.5px #fffaf6;
}

.sa-ribbon-b .sa-ribbon-track em {
    -webkit-text-stroke: 0;
    color: #ffb4c9;
}

@media (max-width: 767px) {
    .sa-marquee {
        height: 170px;
    }

    .sa-ribbon-a {
        top: 26px;
    }

    .sa-ribbon-b {
        top: 78px;
    }
}

/* ---------- CTA ---------- */
.sa-on .mingl-cta-background img {
    will-change: transform;
}

.sa-on .mingl-cta-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(242, 77, 128, 0.55);
    animation: saPulse 2.4s ease-out infinite;
    pointer-events: none;
}

.mingl-cta-btn {
    position: relative;
}

@keyframes saPulse {
    0% { box-shadow: 0 0 0 0 rgba(242, 77, 128, 0.55); }
    70% { box-shadow: 0 0 0 22px rgba(242, 77, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(242, 77, 128, 0); }
}

/* ---------- Reduced motion: show everything, no movement ---------- */
@media (prefers-reduced-motion: reduce) {
    .sa-progress-rider,
    .sa-scroll-cue,
    .sa-fruit-layer {
        display: none;
    }

    .sa-ribbon-track {
        transform: none !important;
    }
}
