/* ============================================================
   StratProof 官網 — 共用設計系統 base.css
   顏色全走 CSS 變數,主題檔(theme-*.css)只覆寫變數即可切換風格。
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC",
                 -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- 版面容器 ---------- */
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.eyebrow {
    display: inline-block; font-size: 15px; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.section-title { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.section-lead { margin-top: 14px; font-size: 17px; color: var(--muted); max-width: 640px; }
.center { text-align: center; }
.center .section-lead { margin-left: auto; margin-right: auto; }

/* ---------- 按鈕 ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    font-size: 16px; font-weight: 700; padding: 13px 24px; border-radius: 10px;
    border: 1px solid transparent; transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--cta); color: var(--cta-text); box-shadow: 0 8px 22px var(--cta-shadow); }
.btn--primary:hover { box-shadow: 0 12px 30px var(--cta-shadow); filter: brightness(1.05); }
.btn--ghost { background: var(--ghost-bg); color: var(--ghost-text); border-color: var(--ghost-border); }
.btn--ghost:hover { background: var(--ghost-hover); }
.btn--lg { padding: 16px 30px; font-size: 16px; }

/* ---------- 導覽列 ---------- */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: var(--nav-bg); backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--nav-border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--nav-text); }
.brand .logo { width: 32px; height: 32px; flex: 0 0 auto; }
.brand img.logo { border-radius: 8px; object-fit: cover; }
.brand small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { font-size: 16px; font-weight: 600; color: var(--nav-text); opacity: .85; }
.nav__links a:hover { opacity: 1; color: var(--accent); }
.nav__cta { display: flex; align-items: center; gap: 12px; }
/* 導覽列「登入」等次要按鈕：短字（如兩字的「登入」）左右多留白，
   讓文字不貼邊、方塊框稍微寬一點。min-width 保證短字也有一致寬度。 */
.nav__cta .btn--ghost { padding-left: 30px; padding-right: 30px; min-width: 92px; justify-content: center; }
.nav__toggle { display: none; background: none; border: 0; color: var(--nav-text); font-size: 26px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--hero-bg); color: var(--hero-text); }
.hero::before {
    content: ""; position: absolute; inset: 0; opacity: var(--hero-pattern-opacity);
    background-image: var(--hero-pattern); background-size: 42px 42px; pointer-events: none;
}
.hero__glow {
    position: absolute; width: 620px; height: 620px; border-radius: 50%;
    background: radial-gradient(circle, var(--hero-glow) 0%, transparent 68%);
    top: -180px; right: -140px; pointer-events: none;
}
.hero__inner { position: relative; padding: 96px 0 104px; text-align: center; }
.hero__badge {
    display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700;
    padding: 7px 15px; border-radius: 999px; margin-bottom: 26px;
    background: var(--hero-badge-bg); color: var(--hero-badge-text); border: 1px solid var(--hero-badge-border);
}
.hero__badge svg { width: 15px; height: 15px; flex: 0 0 auto; }
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); font-weight: 900; line-height: 1.1; letter-spacing: -.02em; }
.hero h1 .accent { color: var(--accent); }
.hero__sub { margin: 24px auto 0; max-width: 660px; font-size: clamp(16px, 1.9vw, 20px); color: var(--hero-sub); }
.hero__actions { margin-top: 38px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__note { margin-top: 20px; font-size: 14px; color: var(--hero-sub); opacity: .8; }
.hero__stats { margin-top: 56px; display: flex; gap: 44px; justify-content: center; flex-wrap: wrap; }
.hero__stat .num { font-size: 30px; font-weight: 800; color: var(--accent); }
.hero__stat .lbl { font-size: 14px; color: var(--hero-sub); }

/* ---------- 卡片 / 功能格 ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 30px 26px;
    transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px var(--card-shadow); border-color: var(--accent); }
.card .ic {
    width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 24px;
    background: var(--accent-soft); color: var(--accent); margin-bottom: 18px;
}
.card .ic svg { width: 26px; height: 26px; }
/* 圖片型卡片圖示（全息風 PNG 磁貼） */
.card .ic--img { width: 64px; height: 64px; background: none; overflow: hidden; border-radius: 14px;
    box-shadow: 0 6px 16px rgba(15,23,42,.22); }
.card .ic--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 16px; }
.card .tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
    font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
    background: var(--accent-soft); color: var(--accent);
}

/* ---------- 流程步驟 ---------- */
.steps { counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 26px 22px; }
.step::before {
    counter-increment: step; content: counter(step, decimal-leading-zero);
    font-size: 14px; font-weight: 800; color: var(--accent); letter-spacing: .1em;
}
.step h4 { font-size: 17px; font-weight: 800; margin: 6px 0 6px; }
.step p { font-size: 15px; color: var(--muted); }

/* ---------- 方案 ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 24px; justify-content: center; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 34px 30px; position: relative; }
.plan--pro { border-color: var(--accent); box-shadow: 0 20px 50px var(--card-shadow); }
.plan__flag {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: #fff; font-size: 13px; font-weight: 800;
    padding: 5px 16px; border-radius: 999px; letter-spacing: .05em;
}
.plan__name { font-size: 20px; font-weight: 800; }
.plan__price { margin: 12px 0 4px; font-size: 40px; font-weight: 900; letter-spacing: -.02em; }
.plan__price small { font-size: 16px; font-weight: 600; color: var(--muted); }
.plan__desc { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.plan ul { display: grid; gap: 11px; margin-bottom: 26px; }
.plan li { display: flex; align-items: flex-start; gap: 10px; font-size: 16px; }
.plan li .ck { color: var(--accent); font-weight: 800; flex: 0 0 auto; }
.plan li.off { color: var(--muted); opacity: .7; }
.plan li.off .ck { color: var(--muted); }
.plan .btn { width: 100%; justify-content: center; }

/* ---------- 免責 / CTA 區 ---------- */
.disclaimer { background: var(--disc-bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.warn-ic { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; margin-right: 5px; color: #d97706; }
.disclaimer p { font-size: 14px; color: var(--muted); max-width: 860px; margin: 0 auto; text-align: center; }
.cta-band { background: var(--cta-band-bg); color: var(--cta-band-text); border-radius: 22px; padding: 56px 40px; text-align: center; }
.cta-band h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 900; }
.cta-band p { margin: 12px auto 26px; color: var(--cta-band-sub); max-width: 560px; }

/* ---------- 頁尾 ---------- */
.footer { background: var(--footer-bg); color: var(--footer-text); border-top: 1px solid var(--footer-border); }
.footer__top { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 30px; padding: 60px 0 40px; }
.footer h5 { font-size: 15px; font-weight: 800; margin-bottom: 14px; color: var(--footer-text); }
.footer a { display: block; font-size: 15px; color: var(--muted); padding: 5px 0; }
.footer a:hover { color: var(--accent); }
.footer__brandline { color: var(--muted); font-size: 15px; margin-top: 12px; max-width: 320px; }
.footer__bottom { border-top: 1px solid var(--footer-border); padding: 20px 0; font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- 響應式 ---------- */
@media (max-width: 900px) {
    .grid--3, .steps { grid-template-columns: 1fr 1fr; }
    .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
    .nav__links { display: none; }
    .nav__toggle { display: block; }
    .nav__links.open {
        display: flex; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column;
        gap: 0; padding: 8px 0; background: var(--nav-bg); border-bottom: 1px solid var(--nav-border);
    }
    .nav__links.open a { padding: 12px 24px; width: 100%; }
    .grid--3, .grid--2, .steps, .plans, .footer__top { grid-template-columns: 1fr; }
    .section { padding: 60px 0; }
    .hero__stats { gap: 28px; }
}

/* ============================================================
   內頁共用元件（features / pricing / auth / dashboard / 合規頁）
   ============================================================ */
.nav__links a.active { color: var(--accent); opacity: 1; }

/* 內頁小 Hero */
.page-hero { background: var(--hero-bg); border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.page-hero::before { content:""; position:absolute; inset:0; opacity: var(--hero-pattern-opacity);
    background-image: var(--hero-pattern); background-size: 42px 42px; pointer-events:none; }
.page-hero .container { position: relative; padding-top: 66px; padding-bottom: 62px; text-align: center; }
.page-hero h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 900; letter-spacing: -.02em; color: var(--hero-text); }
.page-hero p { margin: 14px auto 0; max-width: 640px; color: var(--hero-sub); font-size: 17px; }

/* 功能長條（左右交錯） */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.feature-row + .feature-row { margin-top: 68px; }
.feature-row.rev .fr-media { order: 2; }
.fr-media { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; min-height: 240px;
    display: grid; place-items: center; font-size: 66px; box-shadow: 0 16px 40px var(--card-shadow);
    overflow: hidden; }
.fr-media img { width: 100%; height: auto; display: block; }
.fr-body h3 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.01em; }
.fr-body > p { margin-top: 12px; color: var(--muted); font-size: 16px; }
.fr-list { margin-top: 16px; display: grid; gap: 9px; }
.fr-list li { display: flex; gap: 10px; font-size: 16px; }
.fr-list .ck { color: var(--accent); font-weight: 800; flex: 0 0 auto; }

/* FAQ 手風琴 */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 4px; font-weight: 700; font-size: 16px;
    display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 800; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 4px 18px; color: var(--muted); font-size: 16px; }

/* 表單（註冊 / 登入 / 授權） */
.form-card { max-width: 440px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border);
    border-radius: 18px; padding: 36px 32px; box-shadow: 0 16px 44px var(--card-shadow); }
.form-card h1 { font-size: 24px; font-weight: 800; text-align: center; }
.form-card .sub { text-align: center; color: var(--muted); font-size: 15px; margin: 8px 0 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.field input, .field select {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--bg); color: var(--text); font-size: 16px; font-family: inherit; }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-card .btn { width: 100%; justify-content: center; margin-top: 6px; }

/* 密碼顯示/隱藏眼睛鈕（js/pw-toggle.js 自動注入，套用於所有 input[type=password]） */
.pw-wrap { position: relative; display: block; }
.pw-wrap input.pw-input { padding-right: 44px; }
.pw-toggle { position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
    background: none; border: 0; padding: 6px; margin: 0; cursor: pointer; color: var(--muted);
    display: grid; place-items: center; line-height: 0; border-radius: 6px; }
.pw-toggle:hover { color: var(--accent); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pw-toggle svg { width: 20px; height: 20px; }

/* 蜜罐欄位（防機器人）：移出畫面、不佔版位、跳過 Tab；人看不到，機器人常會自動填 */
.hp-field { position: absolute !important; left: -9999px !important; top: auto;
    width: 1px; height: 1px; overflow: hidden; }
.form-alt { text-align: center; margin-top: 18px; font-size: 15px; color: var(--muted); }
.form-alt a { color: var(--accent); font-weight: 700; }

/* 訊息列（表單成功 / 錯誤回饋，預設隱藏，加 .show 顯示） */
.alert { display: none; padding: 11px 14px; border-radius: 10px; font-size: 15px; line-height: 1.5;
    margin-bottom: 16px; border: 1px solid transparent; }
.alert.show { display: block; }
.alert--error { background: rgba(239,68,68,.10); color: #b91c1c; border-color: rgba(239,68,68,.28); }
.alert--ok    { background: rgba(34,197,94,.10); color: #15803d; border-color: rgba(34,197,94,.28); }
.alert--info  { background: var(--accent-soft); color: var(--accent); border-color: rgba(59,130,246,.28); }
.btn:disabled, .btn.is-loading { opacity: .6; cursor: not-allowed; pointer-events: none; }

/* 表格（比較 / 紀錄） */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; overflow: hidden; }
.table th, .table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 16px; }
.table th { background: var(--disc-bg); font-weight: 800; font-size: 14px; letter-spacing: .03em; }
.table td.center, .table th.center { text-align: center; }
.table tr:last-child td { border-bottom: 0; }

/* 結帳頁（payment） */
.pay-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; align-items: start; }
.pay-method { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--border); border-radius: 12px;
    padding: 16px 16px; margin-bottom: 12px; cursor: pointer; background: var(--surface); transition: border-color .15s ease, box-shadow .15s ease; }
.pay-method:hover { border-color: var(--accent); }
.pay-method input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }
.pay-method .pm-title { font-weight: 800; font-size: 16px; }
.pay-method .pm-desc { color: var(--muted); font-size: 14px; margin-top: 2px; }
.pay-method:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.summary { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px 24px;
    box-shadow: 0 10px 30px var(--card-shadow); position: sticky; top: 86px; }
.summary h3 { font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.summary .total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px;
    padding-top: 14px; border-top: 2px solid var(--border); font-weight: 900; }
.summary .total .amt { font-size: 26px; color: var(--accent); }

/* 付款結果頁（payment-result） */
.result { max-width: 560px; margin: 0 auto; text-align: center; background: var(--surface);
    border: 1px solid var(--border); border-radius: 20px; padding: 48px 36px; box-shadow: 0 16px 44px var(--card-shadow); }
.result__icon { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
    font-size: 44px; margin: 0 auto 20px; }
.result__icon svg { width: 42px; height: 42px; }
.result__icon.ok { background: rgba(34,197,94,.14); color: #16a34a; }
.result__icon.fail { background: rgba(239,68,68,.14); color: #dc2626; }
.result__icon.pending { background: rgba(245,158,11,.16); color: #d97706; }
.result h1 { font-size: 26px; font-weight: 900; }
.result p { color: var(--muted); margin: 12px auto 0; max-width: 420px; }
.result .actions { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* FAQ 分組標題 */
.faq-group + .faq-group { margin-top: 40px; }
.faq-group > h3 { font-size: 16px; font-weight: 800; color: var(--accent); letter-spacing: .04em;
    text-transform: uppercase; margin-bottom: 6px; }

/* 文件頁（隱私 / 條款 / 退款） */
.doc { max-width: 820px; margin: 0 auto; }
.doc h2 { font-size: 20px; font-weight: 800; margin: 34px 0 10px; }
.doc h2:first-child { margin-top: 0; }
.doc p, .doc li { color: var(--muted); font-size: 16px; margin-bottom: 10px; }
.doc ul { padding-left: 22px; list-style: disc; }
.doc .updated { font-size: 14px; color: var(--muted); margin-bottom: 24px; }

/* 小工具 */
.badge-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
    padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.badge-pill.ok { background: rgba(34,197,94,.12); color: #16a34a; }
.badge-pill.warn { background: rgba(245,158,11,.14); color: #d97706; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* 表單附屬（記住我 / 忘記密碼 / 同意條款） */
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 16px; font-size: 15px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.link { color: var(--accent); font-weight: 700; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* 會員中心（dashboard） */
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: start; }
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px 24px; box-shadow: 0 10px 30px var(--card-shadow); }
.dash-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.dash-card .card-lead { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px dashed var(--border); font-size: 16px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 700; text-align: right; }
.keybox { display: flex; align-items: center; gap: 10px; background: var(--disc-bg); border: 1px solid var(--border);
    border-radius: 10px; padding: 12px 14px; margin: 4px 0 6px; font-family: "Cascadia Code", Consolas, monospace;
    font-size: 16px; letter-spacing: .06em; }
.keybox code { flex: 1; overflow-x: auto; white-space: nowrap; }
.btn--sm { padding: 8px 14px; font-size: 14px; border-radius: 8px; }

@media (max-width: 680px) {
    .feature-row { grid-template-columns: 1fr; gap: 24px; }
    .feature-row.rev .fr-media { order: 0; }
    .feature-row + .feature-row { margin-top: 44px; }
    .table { display: block; overflow-x: auto; white-space: nowrap; }
    .dash-grid { grid-template-columns: 1fr; }
    .pay-grid { grid-template-columns: 1fr; }
    .summary { position: static; }
}

