@charset "UTF-8";

/* =========================================================
   /contact-us 聯絡我們頁專用樣式。

   共用部分不在這裡：
   - header（.commercial-dark-nav）：commercial-assets/css/style.css
   - footer（.df-footer）：resources/views/front/partials/footer-dark.blade.php 自帶 <style>
   這支只放本頁內容區（.contact-page 之下）的樣式。

   斷點沿用 commercial 系列：1280px（小桌機／平板）、768px（手機）。
   尺寸以設計稿換算：桌機以 1920 視窗、手機以 390 視窗為基準。
   ========================================================= */

.contact-page {
    /* 輸入框高度：桌機 52、手機 44（見下方手機段）。浮動 label 的行高跟著它，文字才會垂直置中 */
    --contact-input-h: 52px;
    /* 欄位 focus 或有內容時框內分上下兩行，這裡是兩行的垂直中心距框上緣：上方縮小的 label、下方輸入的文字。
       兩行中心差 21 ＝ label 中文字面半高約 5.85（13px）＋ 間距 8（設計稿）＋ 文字中文字面半高約 7.2（16px），
       兩行合起來在框內大致置中。英文小寫（如 qwe）字面較矮，看起來會比 8 稍遠。手機見下方手機段 */
    --contact-label-y: 14px;
    --contact-value-y: 35px;

    font-family:
        "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    background-color: #000;
    color: #fff;
}

/* 內容區共用容器（同 .ironwolf-container）。
   max-width 1520 + padding 40：1920 視窗時內容起點落在 240px（＝設計稿的標題左緣）。 */
.contact-container {
    width: 100%;
    max-width: 1520px;
    margin: 0 auto;
    padding: 0 40px;
}

/* =========================================================
   整頁只有一個區塊：背景（Seagate 螺旋 logo）＋ 兩個同頁切換的狀態
   （表單 .contact-form-view／送出成功 .contact-success）。
   ========================================================= */

/* 滿版：區塊至少撐滿「螢幕高度 − header（約 56px）」，內容再短 footer 下方也不會露出 body 的白底。
   svh 是手機網址列／工具列展開時的可視高度（不支援的瀏覽器退回上一行的 vh）。
   上下留白不放這裡、放在各狀態自己身上：成功畫面要在這個高度內垂直置中。 */
.contact-section {
    position: relative;
    overflow: clip;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 56px);
    min-height: calc(100svh - 56px);
    background-color: #000;
}

/* 背景貼齊區塊上緣、鋪滿寬度，高度依原比例。
   桌機 bg.webp（1920×1025）是半透明 webp：上半部螺旋半透明、下緣漸層成不透明的黑，
   一定要疊在黑底上才是設計稿的樣子；手機 bg-mobile.webp（390×349）不透明。 */
.contact-bg {
    position: absolute;
    inset: 0 0 auto;
    z-index: 0;
}

/* <picture> 只是桌機／手機換圖用的容器，改 block 避免 inline 底部多出行高空隙 */
.contact-bg picture {
    display: block;
}

/* 下緣 30% 用遮罩淡出成透明：兩張圖的「黑」其實是 (1,1,1)，螢幕上會比區塊的純黑 #000
   亮一點，區塊比背景圖高時（手機、成功畫面）圖的下緣會看得到一條明顯的方框邊。 */
.contact-bg-img {
    display: block;
    width: 100%;
    height: auto;
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
}

/* 撐滿區塊剩餘高度（成功畫面的垂直置中要靠它） */
.contact-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
}

/* 表單狀態的上下留白 */
.contact-form-view {
    padding: 68px 0 160px;
}

/* ===== 標題與說明 ===== */
.contact-title {
    margin: 0 0 36px;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.02em;
    color: #fff;
}

/* 寬度 590：20px 字一行放得下 29 字（580）、放不下 30 字（600），
   換行位置與設計稿相同（「…我們將盡快安排」／「專人與您聯繫。」）。 */
.contact-desc {
    max-width: 590px;
    margin: 0 0 88px;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.8;
    color: #fff;
}

/* =========================================================
   表單卡片：白色半透明底 ＋ 背景模糊（毛玻璃，透出後方的螺旋與波浪光帶），
   3px 綠→青漸層外框（見 ::before）＋ 下方陰影。
   ========================================================= */
.contact-card {
    position: relative;
    max-width: 1216px;
    margin: 0 auto;
    /* 含 3px 漸層外框：實際內距為 61／65／49 */
    padding: 64px 68px 52px;
    border-radius: 12px;
    /* Figma 匯出的 CSS 沒有底色，底色與模糊量是拿設計稿截圖反推的。
       模糊不用 Figma 匯出的 blur(32px)：CSS 的 32px 比 Figma 實際畫出來的糊很多，
       透出來的光帶會被抹平、玻璃感反而變淡，14px 才對得上設計稿。 */
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0px 4px 10px 0px #0000005c;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

/* 漸層外框（Figma：border 3px ＋ border-image）。border-image 不支援圓角，
   padding-box／border-box 雙背景的寫法又會讓漸層從半透明底色透出來，
   所以改用遮罩只留下外圈 3px（padding 即框線粗細）。 */
.contact-card::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 3px;
    border-radius: inherit;
    background: linear-gradient(98.35deg, #6ebe49 1.67%, #03a8a1 97.47%);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* 桌機兩欄，中間一條細分隔線（grid 中間那一欄就是線本身，高度自動撐滿兩欄） */
.contact-form-grid {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    column-gap: 42px;
}

.contact-form-col {
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-width: 0;
}

.contact-form-divider {
    background: rgba(255, 255, 255, 0.2);
}

/* 公司名稱＋職位 同一列並排 */
.contact-form-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* ===== 欄位 ===== */
.contact-field {
    position: relative;
}

.contact-input {
    display: block;
    width: 100%;
    height: var(--contact-input-h);
    /* 上方讓給浮起的 label，文字在下方剩餘空間置中：中心 = (框高 + padding-top) / 2 = --contact-value-y */
    padding: calc(var(--contact-value-y) * 2 - var(--contact-input-h)) 16px 0;
    border: 1px solid #4d4d4d;
    border-radius: 0;
    background: #000;
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s;
}

.contact-input:focus {
    border-color: #6ebe49;
}

/* Chrome 自動填入會把底色換成淺藍／淺黃，用內陰影蓋回黑底、字維持白色 */
.contact-input:-webkit-autofill,
.contact-input:-webkit-autofill:hover,
.contact-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px #000 inset;
    caret-color: #fff;
}

/* 詢問內容：桌機由 flex 撐滿右欄剩餘高度，底部與左欄最後一格切齊；手機改固定高度 */
.contact-field-textarea {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

/* 第一行文字的中心對齊其他欄位的輸入文字（--contact-value-y）：扣掉上框 1 與半個行高 12 */
.contact-input.contact-textarea {
    flex: 1 1 auto;
    height: auto;
    padding: calc(var(--contact-value-y) - 13px) 16px 14px;
    resize: none;
}

/* 詢問內容打多行會捲動，文字會捲進上方浮起的 label 底下：在 label 後面墊一條黑底蓋掉，
   高度＝textarea 的上內距（不捲動時剛好不碰到第一行）。右側只蓋到右內距前，留給捲軸。 */
.contact-field-textarea::before {
    content: "";
    position: absolute;
    top: 1px;
    left: 1px;
    right: 17px;
    height: calc(var(--contact-value-y) - 13px);
    background: #000;
    pointer-events: none;
}

/* 浮動 label 當 placeholder 用：原生 placeholder 無法讓「*」單獨變紅色，
   所以 input 給 placeholder=" "（一個空白），靠 :placeholder-shown 判斷有沒有輸入內容。
   label 必須緊接在 input 後面（+ 選擇器）。
   沒內容時 label 在框內（textarea 為第一行）垂直置中當 placeholder；
   focus 或有內容時不消失，縮小並 translateY 到框內上方，輸入的文字在下方。 */
.contact-label {
    position: absolute;
    /* top 1：避開 input 的外框；left 17：外框 1 ＋ 左內距 16，與輸入文字左緣切齊 */
    top: 1px;
    left: 17px;
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: calc(var(--contact-input-h) - 2px);
    color: #888;
    pointer-events: none;
    white-space: nowrap;
    /* 以文字左緣、垂直中心為基準縮放：縮小後左緣仍切齊，上移距離只看 translateY */
    transform-origin: 0 50%;
    transition:
        transform 0.2s,
        color 0.2s;
}

/* 16px 縮成 13px，垂直中心從框高一半移到 --contact-label-y。
   focus 時就先浮起，游標才會出現在下方輸入文字的位置；
   Chrome 自動填入預覽（滑過建議選項）時欄位還沒有值，也要浮起來才不會和預覽文字重疊。 */
.contact-input:focus + .contact-label,
.contact-input:not(:placeholder-shown) + .contact-label,
.contact-input:-webkit-autofill + .contact-label {
    transform: translateY(calc(var(--contact-label-y) - var(--contact-input-h) / 2)) scale(0.8125);
    color: #d1d1d1;
}

.contact-required {
    margin-right: 1px;
    color: #fc606c;
}

/* ===== 送出按鈕 ===== */
.contact-actions {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.contact-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 36px;
    min-width: 234px;
    height: 40px;
    padding: 0 24px;
    border: none;
    border-radius: 4px;
    background: #6ebe49;
    color: #191919;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s;
}

.contact-submit:hover {
    background: #7fce5a;
}

.contact-submit:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* submit.svg 原生 20×20（黑色右箭頭，與 ironwolf 的 right-arrow.svg 相同），維持 1:1 不縮放 */
.contact-submit-icon {
    display: block;
    width: 20px;
    height: 20px;
}

/* =========================================================
   送出成功畫面（#contactSuccess）：按送出後由頁尾 JS 換掉表單區（切 hidden 屬性），
   內容置中：圖示 → 標題 → 說明 → 兩顆按鈕。
   ========================================================= */

/* 手機才出現的換行（桌機隱藏），用法同 ironwolf 的 .ironwolf-mbr */
.contact-mbr {
    display: none;
}

/* 滿版：撐滿區塊剩餘高度（.contact-section 的 min-height），內容在其中垂直置中；
   padding 是螢幕很矮時（橫拿手機等）內容與上下的最小距離。 */
.contact-success {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 0 auto;
    padding: 80px 0;
    text-align: center;
    animation: contactFadeIn 0.6s ease both;
}

/* 上面設了 display: flex，hidden 屬性的 display: none 要自己補回來（同問卷頁 .survey-modal[hidden]） */
.contact-success[hidden] {
    display: none;
}

@keyframes contactFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* success.svg 原生 100×100（綠色圓圈打勾），維持 1:1 不縮放 */
.contact-success-icon {
    display: block;
    width: 100px;
    height: 100px;
    margin: 0 auto 44px;
}

.contact-success-title {
    margin: 0 0 24px;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.contact-success-desc {
    margin: 0 0 36px;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.5;
    color: #fff;
}

.contact-success-btns {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* 外觀同 ironwolf 的 .ironwolf-hero-btn 系列（白框透明底／綠底深色字），
   左右內距依設計稿放寬為 24。一顆是 <button>、一顆是 <a>，兩種都要能套。 */
.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 24px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    transition:
        background 0.2s,
        border-color 0.2s;
}

/* 返回聯絡我們：白框透明底 */
.contact-btn-outline {
    border-color: rgba(255, 255, 255, 0.7);
}

.contact-btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
}

/* 回首頁：綠底深色字（框線同底色，兩顆按鈕高度才會一致） */
.contact-btn-primary {
    border-color: #6ebe49;
    background: #6ebe49;
    color: #191919;
}

.contact-btn-primary:hover {
    border-color: #7fce5a;
    background: #7fce5a;
}

.contact-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ===== 小桌機／平板：維持兩欄，縮內距與欄距 ===== */
@media (max-width: 1280px) {
    .contact-form-view {
        padding: 60px 0 120px;
    }

    .contact-title {
        font-size: 40px;
    }

    .contact-desc {
        margin-bottom: 64px;
    }

    .contact-card {
        padding: 48px 44px 44px;
    }

    .contact-form-grid {
        column-gap: 32px;
    }
}

/* ===== 手機：標題置中，表單改單欄（依 DOM 順序：左欄四格 → 右欄兩格） ===== */
@media (max-width: 768px) {
    .contact-page {
        --contact-input-h: 44px;
        --contact-label-y: 10px;
        --contact-value-y: 31px;
    }

    .contact-container {
        padding: 0 20px;
    }

    /* 上方留白較多：讓背景的螺旋 logo 露在標題上方（標題壓在螺旋下半部） */
    .contact-form-view {
        padding: 96px 0 60px;
    }

    .contact-title {
        font-size: 36px;
        text-align: center;
    }

    /* 寬度 320：18px＋字距 0.05em 一行放得下 16 字、放不下 17 字，換行位置與設計稿相同 */
    .contact-desc {
        max-width: 320px;
        margin: 0 auto 24px;
        font-size: 18px;
        line-height: 1.5;
        letter-spacing: 0.05em;
        text-align: center;
    }

    .contact-card {
        padding: 34px 28px 52px;
    }

    .contact-form-grid {
        grid-template-columns: 1fr;
        row-gap: 30px;
    }

    .contact-form-divider {
        display: none;
    }

    .contact-form-pair {
        grid-template-columns: 1fr;
    }

    .contact-input.contact-textarea {
        height: 216px;
    }

    .contact-mbr {
        display: block;
    }

    .contact-success {
        padding: 40px 0;
    }

    .contact-success-title {
        font-size: 28px;
    }

    /* 第一行（到「，」強制斷行）17 字，20px 要約 380 寬的螢幕才放得下；
       比 390 窄的手機（375、360…）字級等比縮小，否則會在「需求」中間多斷一行 */
    .contact-success-desc {
        font-size: min(20px, 5.13vw);
    }
}
