/* 聯絡頁首屏獨立覆蓋層：固定玻璃摺面與自動流光，不更動後續流程、表單或導覽。 */
.contact_cinematic .contact_hero_scene.contact_banner,
.contact_hero_scene.contact_banner {
    position: relative;
    isolation: isolate;
    width: 100%;
    height: 100svh;
    min-height: 100svh;
    overflow: clip;
    background: #020e13;
    color: #f4fafc;
}

/* 中央閱讀區維持固定明度，流光只在文案後方若隱若現。 */
.contact_banner::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 46% 42% at 50% 48%, #020d1566 0%, #020d1530 60%, transparent 100%),
        linear-gradient(180deg, #020c153d 0%, transparent 25%, transparent 67%, #020c1561 100%);
}
@media (max-width: 700px) {
    .contact_banner::after {
        background:
            radial-gradient(ellipse 90% 42% at 50% 48%, #020d157d 0%, #020d1538 62%, transparent 100%),
            linear-gradient(180deg, #020c154d, transparent 26%, transparent 70%, #020c1566);
    }
}

/* 每片鰭片佔固定格位；只有內部光帶移動，沒有水平位移與版面變動。 */
.contact_light_curtain {
    position: absolute;
    z-index: 0;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    overflow: hidden;
    contain: paint;
    pointer-events: none;
    background: #02090d;
}
.contact_light_curtain > i {
    position: relative;
    display: block;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    background: linear-gradient(90deg, #13465057 0%, #0f4c5c2e 3%, #061b211c 47%, #01080d 89%, #01080d 100%);
    border-left: 1px solid #86eee41a;
}
@media (max-width: 1000px) {
    .contact_light_curtain {
        grid-template-columns: repeat(20, minmax(0, 1fr));
    }
    .contact_light_curtain > i:nth-child(n + 21) {
        display: none;
    }
}
@media (max-width: 700px) {
    .contact_light_curtain {
        grid-template-columns: repeat(16, minmax(0, 1fr));
    }
    .contact_light_curtain > i:nth-child(n + 17) {
        display: none;
    }
}

/* 面光以品牌青綠呈現，窄亮邊、寬折面及背光暗面構成垂直玻璃深度。 */
.contact_light_curtain > i::before {
    content: "";
    position: absolute;
    inset: -60% 0 auto;
    height: 168%;
    background: linear-gradient(90deg,
        #b4fff063 0%,
        #2dd4bf 1.3%,
        #19bfb9 4%,
        #00a8a8 18%,
        #057e86 42%,
        #0f4c5c 65%,
        #05242f 83%,
        #010a11 99%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #0002 12%, #000b 27%, #000 41%, #000 66%, #000b 75%, #0002 91%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #0002 12%, #000b 27%, #000 41%, #000 66%, #000b 75%, #0002 91%, transparent 100%);
    transform: translate3d(0, -64%, 0);
    animation: contact_curtain_flow 8.4s cubic-bezier(.42, 0, .58, 1) infinite;
    animation-delay: calc(-4.8s + var(--slat-index, 0) * -.13s);
    opacity: .9;
}

/* 稜線保持固定，流光經過才會看見相鄰折面的明暗差。 */
.contact_light_curtain > i::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, #b6fff324 0, transparent 1px, transparent 60%, #0000001f 86%, #000000b0 100%);
    box-shadow: inset -1px 0 0 #000b;
}
@media (max-width: 700px) {
    .contact_light_curtain > i::before {
        opacity: .78;
        animation-duration: 9s;
        animation-delay: calc(-4.8s + var(--slat-index, 0) * -.19s);
    }
}

/* 錯開相位配合柔和加減速，使光帶的上下邊緣形成連續斜弧，而非機械水平掃描。 */
@keyframes contact_curtain_flow {
    0%, 100% { transform: translate3d(0, -28%, 0); }
    50% { transform: translate3d(0, 28%, 0); }
}

/* 首屏文案置於畫面中央，保留 Header 與底部提示的安全空間。 */
.contact_banner > .contact_intro {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
    padding: clamp(112px, 13svh, 154px) 28px clamp(94px, 12svh, 140px);
    box-sizing: border-box;
    text-align: center;
    pointer-events: auto;
}
.contact_banner > .contact_intro::before {
    display: none;
}
@media (max-width: 700px) {
    .contact_banner > .contact_intro {
        padding: max(110px, env(safe-area-inset-top)) 22px max(116px, env(safe-area-inset-bottom));
    }
}
@media (max-height: 620px) and (min-width: 701px) {
    .contact_banner > .contact_intro {
        padding-block: 96px 64px;
    }
}

/* 英文開場採精緻字距，與大標維持清楚的主次關係。 */
.contact_banner_english {
    margin: 0 0 clamp(18px, 2.6svh, 30px);
    color: #d7efef;
    font-size: clamp(11px, .98vw, 16px);
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: .2em;
    text-wrap: balance;
    text-shadow: 0 2px 20px #01101985;
}
@media (max-width: 700px) {
    .contact_banner_english {
        font-size: 10px;
        letter-spacing: .17em;
        margin-bottom: 22px;
    }
}

/* 中文標題為唯一 H1，使用 HTML 保留文字選取、搜尋與輔助閱讀。 */
.contact_banner .contact_intro h1#project_title {
    max-width: 100%;
    margin: 0;
    color: #f4fafc;
    font-size: clamp(39px, 4.55vw, 84px);
    font-weight: 500;
    line-height: 1.47;
    letter-spacing: .09em;
    text-wrap: balance;
    text-shadow: 0 3px 35px #01101970;
}
.contact_banner .contact_intro h1#project_title > span {
    display: block;
    padding: 0 .04em .035em;
    overflow: hidden;
}
.contact_banner .contact_intro h1#project_title b {
    display: inline-block;
    font-weight: 500;
}
@media (max-width: 700px) {
    .contact_banner .contact_intro h1#project_title {
        font-size: clamp(27px, 7.7vw, 47px);
        line-height: 1.6;
        letter-spacing: .075em;
    }
}
@media (max-height: 620px) and (min-width: 701px) {
    .contact_banner .contact_intro h1#project_title {
        font-size: clamp(32px, 4vw, 54px);
        line-height: 1.35;
    }
}

.contact_banner_subtitle {
    max-width: 640px;
    margin: clamp(20px, 3svh, 33px) 0 0;
    color: #c0dce0;
    font-size: clamp(12px, 1.05vw, 17px);
    font-weight: 400;
    line-height: 1.9;
    letter-spacing: .08em;
    text-wrap: balance;
    text-shadow: 0 2px 16px #011019;
}
@media (max-width: 700px) {
    .contact_banner_subtitle {
        max-width: 290px;
        margin-top: 23px;
        font-size: 11px;
        line-height: 1.85;
        letter-spacing: .07em;
    }
}
@media (max-height: 620px) and (min-width: 701px) {
    .contact_banner_subtitle { margin-top: 16px; font-size: 12px; }
}

/* 兩個真實錨點始終可操作，不依赖滑鼠 hover，也不阻擋正常文件跳轉。 */
.contact_banner_actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: clamp(28px, 4.5svh, 46px);
    pointer-events: auto;
}
.contact_banner_button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    min-width: 174px;
    min-height: 54px;
    padding: 13px 21px 13px 25px;
    box-sizing: border-box;
    border: 1px solid #d6f6ef;
    border-radius: 100px;
    background: #e0f5f1;
    color: #113f49 !important;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: .12em;
    text-decoration: none;
    box-shadow: 0 5px 24px #020e1421;
    transition: transform .35s ease, background-color .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.contact_banner_button svg {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .35s ease;
}
.contact_banner_button.is_outline {
    background: #061a255c;
    border-color: #b5e4e36b;
    color: #e5f5f6 !important;
    box-shadow: none;
}
.contact_banner_button:focus-visible {
    outline: 2px solid #7ef1de;
    outline-offset: 5px;
}
@media (hover: hover) and (pointer: fine) {
    .contact_banner_button:hover {
        transform: translateY(-3px);
        background-color: #f3fffc;
        border-color: #f3fffc;
        box-shadow: 0 10px 32px #020e143d;
    }
    .contact_banner_button.is_outline:hover {
        background-color: #0f4c5c8c;
        border-color: #8cdbd4;
    }
    .contact_banner_button:hover svg { transform: translateX(3px); }
}
@media (max-width: 700px) {
    .contact_banner_actions { gap: 10px; margin-top: 31px; }
    .contact_banner_button { min-width: 145px; min-height: 50px; gap: 15px; padding: 12px 18px; font-size: 11px; }
    .contact_banner_button svg { flex-basis: 16px; width: 16px; height: 16px; }
}
@media (max-width: 359px) {
    .contact_banner_actions { gap: 9px; }
    .contact_banner_button { min-width: 126px; padding-inline: 15px; letter-spacing: .07em; }
}
@media (max-height: 620px) and (min-width: 701px) {
    .contact_banner_actions { margin-top: 22px; }
    .contact_banner_button { min-height: 48px; padding-block: 11px; }
}

/* 外層觀察離屏、背景分頁與選單狀態，直接暫停現有光帶，不重建動畫。 */
[data-paused="true"] .contact_light_curtain > i::before {
    animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
    .contact_light_curtain > i::before {
        animation: none !important;
        transform: translate3d(0, calc(var(--slat-index, 0) * 1.5%), 0);
        opacity: .7;
    }
    .contact_banner_button,
    .contact_banner_button svg {
        transition: none;
    }
}
