:root {
    --gmp-warm: #FAF9F6;
    --gmp-slate: #64748B;
}

/* Hero */
.work-hero {
    padding: 170px 0 70px;
    background:
        radial-gradient(circle at 82% 15%, rgba(0, 125, 65, 0.08) 0%, transparent 42%),
        radial-gradient(circle at 8% 85%, rgba(0, 255, 133, 0.06) 0%, transparent 32%),
        var(--gmp-warm);
}

.work-hero h1 {
    font-size: clamp(2.3rem, 4.5vw, 3.4rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--gmp-dark-deep);
}

.text-gradient {
    background: linear-gradient(135deg, var(--gmp-primary) 0%, #00B35C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Form card */
.form-shell {
    margin-top: -40px;
    position: relative;
    z-index: 5;
}

.form-card {
    background: #fff;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.07);
    padding: 46px 48px;
}

.form-section + .form-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #EEF2F6;
}

.section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.section-head .num {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: rgba(0, 125, 65, 0.1);
    color: var(--gmp-primary);
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.section-head h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0;
    color: var(--gmp-dark-deep);
}

.form-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 8px;
}

.req::after {
    content: ' *';
    color: var(--gmp-secondary);
    font-weight: 800;
}

.form-control, .form-select {
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.92rem;
    color: var(--gmp-dark-deep);
    background-color: #fff;
    transition: all 0.25s ease;
}

.form-control::placeholder { color: #94A3B8; }

.form-control:focus, .form-select:focus {
    border-color: var(--gmp-primary);
    box-shadow: 0 0 0 4px rgba(0, 125, 65, 0.1);
    outline: none;
}

/* 必填未填 / 格式錯誤：顯示紅色（使用者互動或送出後才判定，避免一載入就整片紅） */
.form-control:user-invalid,
.form-select:user-invalid {
    border-color: var(--gmp-secondary, #C1272D);
}

.form-control:user-invalid:focus,
.form-select:user-invalid:focus {
    border-color: var(--gmp-secondary, #C1272D);
    box-shadow: 0 0 0 4px rgba(193, 39, 45, 0.12);
}

.form-check-input:user-invalid {
    border-color: var(--gmp-secondary, #C1272D);
    box-shadow: 0 0 0 3px rgba(193, 39, 45, 0.12);
}

/* 相容不支援 :user-invalid 的舊瀏覽器：聚焦到未填必填欄時，焦點光暈用紅色而非綠色 */
.form-control:required:invalid:focus,
.form-select:required:invalid:focus {
    border-color: var(--gmp-secondary, #C1272D);
    box-shadow: 0 0 0 4px rgba(193, 39, 45, 0.12);
}

/* 選項卡群組（專案類型 / 功能需求）未選時的紅色提示 */
.opt-hint {
    display: none;
    margin: 10px 0 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gmp-secondary, #C1272D);
}

.opt-grid.is-invalid + .opt-hint {
    display: block;
}

.form-select:user-invalid + .opt-hint {
    display: block;
}

.opt-grid.is-invalid .opt-card {
    border-color: var(--gmp-secondary, #C1272D);
}

/* Selectable chip cards (radio / checkbox) */
.opt-grid {
    display: grid;
    gap: 12px;
}

.opt-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.opt-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 767px) {
    .opt-grid.cols-3, .opt-grid.cols-2 { grid-template-columns: 1fr 1fr; }
}

.opt-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    padding: 15px 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
    background: #fff;
}

.opt-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.opt-card .ico {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    background: #F1F5F9;
    color: var(--gmp-slate);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.25s ease;
}

.opt-card:hover {
    border-color: rgba(0, 125, 65, 0.45);
}

.opt-card:has(input:checked) {
    border-color: var(--gmp-primary);
    background: rgba(0, 125, 65, 0.05);
    box-shadow: 0 6px 16px rgba(0, 125, 65, 0.1);
}

.opt-card:has(input:checked) .ico {
    background: var(--gmp-primary);
    color: #fff;
}

.opt-card .check {
    margin-left: auto;
    color: var(--gmp-primary);
    opacity: 0;
    transition: opacity 0.2s;
}

.opt-card:has(input:checked) .check { opacity: 1; }

.btn-submit {
    background: var(--gmp-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 16px 48px;
    font-weight: 800;
    font-size: 1.05rem;
    box-shadow: 0 15px 35px rgba(0, 125, 65, 0.3);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-submit::after {
    content: "\f1d8"; /* fa-paper-plane */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: 10px;
}

.btn-submit:hover {
    background: #009D51;
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(0, 125, 65, 0.4);
    color: #fff;
}

.success-box {
    background: rgba(0, 125, 65, 0.06);
    border: 1.5px solid rgba(0, 125, 65, 0.2);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}
