/* ==========================================================
   SECTION FLOW
   HERO以降のセクション切り替え
========================================================== */

.section-flow-section {
    position: relative;
    isolation: isolate;
}


/* ==========================================================
   全セクション共通のぼかし境界
========================================================== */

.section-flow-bridge {
    position: absolute;
    top: -70px;
    right: 0;
    left: 0;
    z-index: 0;

    height:
        clamp(
            180px,
            18vw,
            260px
        );

    background:
        linear-gradient(
            to bottom,
            var(--section-flow-from) 0%,
            var(--section-flow-from) 18%,
            var(--section-flow-to) 58%,
            transparent 100%
        );

    pointer-events: none;

    transform-origin: top center;

    filter: blur(16px);
    opacity: 0.96;

    will-change:
        opacity,
        transform;
}


/*
 * 境界部分に薄いゴールドの光を重ねる
 */

.section-flow-bridge::after {
    content: "";

    position: absolute;
    top: 0;
    left: 50%;

    width: min(1100px, 96vw);
    height: 220px;

    background:
        radial-gradient(
            ellipse at center top,
            rgba(201, 164, 92, 0.07) 0%,
            rgba(201, 164, 92, 0.035) 42%,
            rgba(201, 164, 92, 0.012) 65%,
            transparent 80%
        );

    transform: translateX(-50%);

    filter: blur(24px);
    opacity: 0.88;

    pointer-events: none;
}


/* ==========================================================
   セクション本体
========================================================== */

.section-flow-content {
    position: relative;
    z-index: 2;

    will-change: transform;
}


/* ==========================================================
   SECTION COLORS
========================================================== */

/* HERO → ABOUT */

#about {
    --section-flow-from: #fbf8f1;
    --section-flow-to: #ffffff;
}


/* ABOUT → SERVICE */

#service {
    --section-flow-from: #ffffff;
    --section-flow-to: #fbf8f1;
}


/* SERVICE → WHY QUOREAL */

#strength {
    --section-flow-from: #fbf8f1;
    --section-flow-to: #f8f2e7;
}


/* WHY QUOREAL → CASE */

#case {
    --section-flow-from: #f8f2e7;
    --section-flow-to: #ffffff;
}


/* CASE → FLOW */

#flow {
    --section-flow-from: #ffffff;
    --section-flow-to: #fcfaf5;
}


/* FLOW → COMPANY */

#company {
    --section-flow-from: #fcfaf5;
    --section-flow-to: #fcfaf5;
}


/* COMPANY → FAQ */

#faq {
    --section-flow-from: #fcfaf5;
    --section-flow-to: #ffffff;
}


/* FAQ → CONTACT */

#contact {
    --section-flow-from: #ffffff;
    --section-flow-to: #f6e8cd;
}


/* ==========================================================
   FINAL LAYOUT FIXES
========================================================== */

@media (min-width: 1181px) {

    /* ======================================================
       ① ABOUT：下側2つの丸を左右対称にする
    ====================================================== */

    .loop-node-bottom-left {
        left: 14%;
        bottom: 10%;
    }

    .loop-node-bottom-right {
        right: 14%;
        bottom: 10%;
    }


    /* ======================================================
       ② ABOUT：「成果につながる仕組みへ。」を1行にする
    ====================================================== */

    .about-content h3 {
        font-size:
            clamp(
                34px,
                3vw,
                48px
            );
    }

    .about-content-nowrap {
        display: inline-block;
        white-space: nowrap;
    }


    /* ======================================================
       ③ COMPANY：概要見出し周辺の余白調整
    ====================================================== */

    .company-reference__main {
        padding-top: 24px !important;
    }

    .company-reference__panel,
    .company-reference__overview-copy,
    .company-reference__panel-header {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }


    
    /* ======================================================
       ⑤ WHY QUOREAL
    ====================================================== */

    #strength {
        padding:
            76px
            0
            104px !important;
    }

    #strength .section-header {
        margin-bottom: 44px !important;
    }


    /* ======================================================
       ⑥ FAQ
    ====================================================== */

    #faq {
        padding:
            72px
            0
            96px !important;
    }

    #faq .section-header {
        margin-bottom: 52px !important;
    }


    /* ======================================================
       ⑦ CONTACT
    ====================================================== */

    #contact {
        min-height: auto !important;

        padding:
            84px
            0
            112px !important;

        display: block !important;
        align-items: initial !important;
    }

    #contact .contact-box {
        margin-inline: auto !important;
    }


    /* ======================================================
       固定ヘッダー対策
    ====================================================== */

    #service,
    #strength,
    #faq,
    #contact {
        scroll-margin-top: 82px;
    }

}


/* ==========================================================
   TABLET・MOBILE
========================================================== */

@media (max-width: 820px) {

    .section-flow-bridge {
        top: -36px;

        height: 150px;

        filter: blur(12px);
    }

    .section-flow-bridge::after {
        width: 96vw;
        height: 150px;

        filter: blur(18px);
    }

}


/* ==========================================================
   REDUCED MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {

    .section-flow-content,
    .section-flow-bridge {
        transform: none !important;
        opacity: 1 !important;

        will-change: auto;
    }

}
/* ==========================================================
   FAQ TRANSITION FIX
   Companyの線を隠して、上の空白を短くする
========================================================== */

@media (min-width: 1181px) {

    #faq {
        padding-top: 48px !important;
    }

    #faq .section-flow-bridge {
        top: -120px !important;
        z-index: 1 !important;

        height: 250px !important;

        background:
            linear-gradient(
                to bottom,
                rgba(252, 250, 245, 1) 0%,
                rgba(252, 250, 245, 0.98) 26%,
                rgba(255, 255, 255, 0.86) 56%,
                rgba(255, 255, 255, 0.38) 80%,
                transparent 100%
            ) !important;

        filter: blur(18px) !important;
        opacity: 1 !important;
    }

    #faq .section-flow-bridge::after {
        top: 20px !important;

        height: 190px !important;

        filter: blur(26px) !important;
        opacity: 0.78 !important;
    }

}

