/* ============================================
   Hightek Group — 索取公司簡報 PDF 彈窗
   官網 index.html 與簡報 slides/index.html 共用（兩頁的 :root 色票／字體變數同名）
   ============================================ */
.pdfm {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2100;
    padding: 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(7,9,13,.74);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    cursor: default;
}
.pdfm.show { display: flex; animation: pdfm-fade .25s ease both; }
.pdfm-box {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: auto;
    padding: 40px 40px 36px;
    background: #fff;
    color: var(--ink);
    border-radius: 20px;
    box-shadow: 0 40px 100px rgba(0,0,0,.5);
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
}
.pdfm.show .pdfm-box { animation: pdfm-rise .4s var(--ease) both; }
.pdfm-box::before {                     /* signal line */
    content: '';
    position: absolute;
    top: 0; left: 40px;
    width: 96px; height: 2px;
    background: var(--red);
}
@keyframes pdfm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pdfm-rise { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: none; } }

.pdfm-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 40px; height: 40px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--ink-2);
    font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .3s, color .3s, border-color .3s, transform .3s;
}
.pdfm-close:hover { background: var(--red); border-color: var(--red); color: #fff; transform: rotate(90deg); }

.pdfm-eyebrow {
    font-family: var(--font-en);
    font-size: 12px; font-weight: 700;
    letter-spacing: .16em;
    color: var(--red);
    margin-bottom: 10px;
}
.pdfm-title {
    font-size: 24px; font-weight: 700;
    line-height: 1.35;
    letter-spacing: .01em;
    color: var(--ink);
    margin: 0 44px 10px 0;
    overflow-wrap: anywhere;
}
.pdfm-desc { font-size: 15px; line-height: 1.7; color: var(--grey); margin-bottom: 24px; }

.pdfm-field { margin-bottom: 18px; }
.pdfm-field label {
    display: block;
    font-size: 13px; font-weight: 600;
    letter-spacing: .04em;
    color: var(--ink-2);
    margin-bottom: 7px;
}
.pdfm-field select,
.pdfm-field input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 16px;                    /* 16px：iOS 不會因為點輸入框而放大頁面 */
    line-height: 1.4;
    transition: border-color .2s, box-shadow .2s;
}
.pdfm-field select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 42px;
    cursor: pointer;
}
.pdfm-select { position: relative; }
.pdfm-select .ico {
    position: absolute;
    right: 15px; top: 50%;
    margin-top: -8px;
    font-size: 16px;
    color: var(--grey);
    pointer-events: none;
}
.pdfm-field input::placeholder { color: #A9B0BA; }
.pdfm-field select:hover, .pdfm-field input:hover { border-color: #C5CAD2; }
.pdfm-field select:focus, .pdfm-field input:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(18,21,27,.10);
}
.pdfm-field.is-invalid input { border-color: var(--red); }
.pdfm-field.is-invalid input:focus { box-shadow: 0 0 0 3px rgba(230,8,25,.14); }
.pdfm-hint { font-size: 13px; line-height: 1.6; color: var(--grey); margin-top: 8px; overflow-wrap: anywhere; }

.pdfm-msg {
    display: none;
    gap: 10px;
    align-items: flex-start;
    margin: 4px 0 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14.5px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
.pdfm-msg.is-shown { display: flex; }
.pdfm-msg .ico { font-size: 18px; margin-top: 2px; }
.pdfm-msg.is-fail { background: var(--red-soft); color: var(--red-dark); }
.pdfm-msg.is-fail .ico { display: none; }
.pdfm-msg.is-sent { background: #EAF5EF; color: #17603F; }

.pdfm-submit {
    display: flex;
    align-items: center; justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 50px;
    padding: 10px 24px;
    border: none;
    border-radius: 50px;
    background: var(--red);
    color: #fff;
    font-family: inherit;
    font-size: 16px; font-weight: 600;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .3s, opacity .3s;
}
.pdfm-submit .ico { font-size: 17px; transition: transform .3s; }
.pdfm-submit:hover { background: var(--red-dark); }
.pdfm-submit:hover .ico { transform: translateX(3px); }
.pdfm-submit:disabled { opacity: .5; cursor: default; background: var(--red); }
.pdfm-submit:disabled .ico { transform: none; }
.pdfm-submit .pdfm-when-sending { display: none; }
.pdfm-submit.is-sending { opacity: 1; background: var(--ink-2); cursor: progress; }
.pdfm-submit.is-sending .pdfm-when-idle, .pdfm-submit.is-sending .ico { display: none; }
.pdfm-submit.is-sending .pdfm-when-sending { display: inline; }
.pdfm-submit.is-sending::before {       /* spinner */
    content: '';
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pdfm-spin .8s linear infinite;
}
@keyframes pdfm-spin { to { transform: rotate(360deg); } }
.pdfm-strings { display: none; }

.pdfm :focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.pdfm-field select:focus-visible, .pdfm-field input:focus-visible { outline: none; }

@media (max-width: 520px) {
    .pdfm { padding: 12px; }
    .pdfm-box { padding: 34px 22px 26px; border-radius: 16px; }
    .pdfm-box::before { left: 22px; }
    .pdfm-close { top: 12px; right: 12px; }
    .pdfm-title { font-size: 21px; }
}
/* 手機橫向（簡報頁）：高度很矮，壓縮留白，彈窗本身可捲動 */
@media (max-height: 520px) {
    .pdfm { padding: 10px; }
    .pdfm-box { padding: 26px 26px 22px; }
    .pdfm-desc { margin-bottom: 14px; }
    .pdfm-field { margin-bottom: 12px; }
    .pdfm-field select, .pdfm-field input { height: 42px; }
}
