/* ============================================================
   TMH 欢迎弹窗（10% off 首单）· 2026-10-19
   作用域：.tmh-pop，不污染全站
   回滚：删本文件 + inc/welcome-popup.php + functions.php 的 require_once
   ============================================================ */

.tmh-pop{
  position:fixed;inset:0;z-index:900;
  display:flex;align-items:center;justify-content:center;
  padding:24px;
  background:rgba(26,21,16,.66);
  -webkit-backdrop-filter:blur(7px) saturate(.85);
  backdrop-filter:blur(7px) saturate(.85);
  opacity:0;visibility:hidden;
  transition:opacity .5s ease,visibility .5s ease;
}
.tmh-pop.on{opacity:1;visibility:visible}

/* ---------- 卡片 ---------- */
.tmh-pop .pop-card{
  position:relative;
  width:100%;max-width:980px;
  height:min(700px,calc(100dvh - 48px));
  display:grid;grid-template-columns:48% 52%;
  background:var(--bg,#faf7f2);
  overflow:hidden;
  box-shadow:0 40px 90px -30px rgba(24,18,10,.55),0 2px 0 rgba(255,255,255,.4) inset;
  transform:translateY(22px) scale(.985);
  opacity:0;
  transition:transform .72s cubic-bezier(.22,.7,.2,1),opacity .5s ease;
}
.tmh-pop.on .pop-card{transform:translateY(0) scale(1);opacity:1}

/* ---------- 关闭 ---------- */
.tmh-pop .pop-x{
  position:absolute;top:18px;left:18px;z-index:6;
  width:34px;height:34px;display:grid;place-items:center;
  color:#6f675c;background:none;border:none;cursor:pointer;padding:0;
  transition:color .3s ease,transform .45s cubic-bezier(.22,.7,.2,1);
}
.tmh-pop .pop-x:hover{color:var(--ink,#2b2620);transform:rotate(90deg)}
.tmh-pop .pop-x svg{width:17px;height:17px;stroke:currentColor;stroke-width:1.15;fill:none}

/* ---------- 左栏 ---------- */
.tmh-pop .pop-left{
  position:relative;z-index:2;
  display:flex;flex-direction:column;
  padding:clamp(34px,3.8vw,56px) clamp(32px,4.2vw,60px) clamp(28px,2.6vw,36px);
  background:var(--bg,#faf7f2);
}
.tmh-pop .pop-left::after{
  content:"";position:absolute;right:0;top:0;bottom:0;width:1px;
  background:linear-gradient(180deg,transparent,var(--line,#e7ddcd) 12%,var(--line,#e7ddcd) 88%,transparent);
}

.tmh-pop .pop-brand{text-align:center;margin-bottom:clamp(18px,2.2vw,26px)}
.tmh-pop .pop-brand .wm{
  font-family:var(--serif,Georgia,serif);font-size:clamp(20px,2vw,25px);font-weight:500;
  letter-spacing:.2em;line-height:1;color:var(--ink,#2b2620);text-indent:.2em;
}
.tmh-pop .pop-brand .sub{
  margin-top:7px;font-size:8px;font-weight:500;letter-spacing:.36em;
  text-transform:uppercase;color:var(--ink-soft,#7a7064);text-indent:.36em;
}

.tmh-pop .pop-eyebrow{
  font-size:9.5px;font-weight:600;letter-spacing:.3em;text-transform:uppercase;
  color:var(--gold,#9a7b3f);text-align:center;margin:0 0 14px;text-indent:.3em;
}
.tmh-pop .pop-h2{
  font-family:var(--serif,Georgia,serif);font-style:italic;font-weight:400;
  font-size:clamp(28px,3.1vw,40px);line-height:1.12;
  text-align:center;color:var(--ink,#2b2620);letter-spacing:.005em;
  margin:0 0 clamp(16px,2vw,22px);
}

.tmh-pop .pop-copy{font-size:13.5px;line-height:1.72;color:var(--ink-2,#4a4239);text-align:left}
.tmh-pop .pop-copy p{margin:0}
.tmh-pop .pop-copy p+p{margin-top:9px}
.tmh-pop .pop-copy .lead{color:var(--ink,#2b2620)}

/* ---------- 表单 ---------- */
.tmh-pop .pop-form{margin-top:auto}
.tmh-pop .pop-field{
  width:100%;height:52px;margin-top:clamp(14px,1.8vw,18px);
  padding:0 17px;background:#fff;
  border:1px solid #c9bfae;border-radius:0;
  font-family:var(--sans,system-ui,sans-serif);font-size:14px;color:var(--ink,#2b2620);
  transition:border-color .3s ease,box-shadow .3s ease;
  outline:none;box-shadow:none;
}
.tmh-pop .pop-field::placeholder{color:#9a9186;font-size:14px}
.tmh-pop .pop-field:focus{border-color:var(--gold,#9a7b3f);box-shadow:0 0 0 3px rgba(154,123,63,.1)}
.tmh-pop .pop-field.err{border-color:#c0392b;box-shadow:0 0 0 3px rgba(192,57,43,.08)}

/* 需压过 tmh.css 的 body.tmh button[type=submit]（金底/大写/无衬线） */
body.tmh .tmh-pop .pop-cta,
body.tmh .tmh-pop button.pop-cta{
  width:100%;height:54px;margin-top:12px;
  display:flex;align-items:center;justify-content:center;
  background:#241f18;color:#f6f1e7;border:1px solid #241f18;border-radius:0;cursor:pointer;
  font-family:var(--serif,Georgia,serif);font-size:15.5px;font-weight:600;letter-spacing:.09em;
  text-transform:none;padding:0;
  transition:background .4s ease,letter-spacing .4s ease,color .4s ease,border-color .4s ease;
}
body.tmh .tmh-pop .pop-cta:hover,
body.tmh .tmh-pop button.pop-cta:hover{
  background:var(--gold,#9a7b3f);border-color:var(--gold,#9a7b3f);color:#fff;letter-spacing:.13em;
}
body.tmh .tmh-pop .pop-cta:disabled{opacity:.6;cursor:wait}

.tmh-pop .pop-fine{
  margin:13px 0 0;font-size:10.5px;line-height:1.62;color:#8d8478;
  text-align:left;letter-spacing:.005em;
}
.tmh-pop .pop-later{
  display:block;margin:clamp(14px,2vw,22px) auto 0;padding:0;
  background:none;border:none;cursor:pointer;
  font-family:var(--sans,system-ui,sans-serif);font-size:12px;font-weight:500;letter-spacing:.06em;
  color:var(--ink-soft,#7a7064);text-decoration:underline;text-underline-offset:4px;
  transition:color .3s ease;
}
.tmh-pop .pop-later:hover{color:var(--ink,#2b2620)}

/* ---------- 成功态 ---------- */
.tmh-pop .pop-success{
  position:absolute;inset:0;z-index:5;background:var(--bg,#faf7f2);
  display:flex;flex-direction:column;justify-content:center;align-items:center;
  text-align:center;padding:44px 46px;
  opacity:0;visibility:hidden;transition:opacity .45s ease,visibility .45s ease;
}
.tmh-pop .pop-success.on{opacity:1;visibility:visible}
.tmh-pop .pop-success .tick{
  width:44px;height:44px;border:1px solid var(--gold,#9a7b3f);border-radius:50%;
  display:grid;place-items:center;margin-bottom:22px;
}
.tmh-pop .pop-success .tick svg{width:18px;height:18px;stroke:var(--gold,#9a7b3f);stroke-width:1.3;fill:none}
.tmh-pop .pop-success h3{
  font-family:var(--serif,Georgia,serif);font-style:italic;font-size:30px;font-weight:400;
  margin:0 0 10px;color:var(--ink,#2b2620);
}
.tmh-pop .pop-success p{font-size:13.5px;line-height:1.7;color:var(--ink-2,#4a4239);max-width:320px;margin:0}
.tmh-pop .pop-code{
  margin-top:22px;padding:13px 30px;border:1px dashed #cbbfa9;background:none;cursor:pointer;
  font-family:var(--sans,system-ui,sans-serif);font-size:14px;letter-spacing:.14em;font-weight:600;
  color:var(--gold-deep,#6b5a3e);text-indent:.14em;
  transition:border-color .3s ease,color .3s ease,background .3s ease;
}
.tmh-pop .pop-code:hover{border-color:var(--gold,#9a7b3f);color:var(--gold,#9a7b3f);background:rgba(154,123,63,.05)}
.tmh-pop .pop-code.done{border-style:solid;border-color:var(--gold,#9a7b3f);color:var(--gold,#9a7b3f)}

/* ---------- 右栏 ---------- */
.tmh-pop .pop-right{position:relative;overflow:hidden;background:#e9dfcf}
.tmh-pop .pop-right .shot{
  position:absolute;inset:0;width:100%;height:100%;object-fit:cover;
  object-position:center 18%;
  transform:scale(1.055);
  transition:transform 14s cubic-bezier(.16,.6,.2,1);
}
.tmh-pop.on .pop-right .shot{transform:scale(1)}
.tmh-pop .pop-right::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(180deg,rgba(30,24,16,.05) 0%,transparent 20%,transparent 72%,rgba(250,247,242,.46) 100%);
}
.tmh-pop .pop-right .mark{
  position:absolute;right:26px;bottom:24px;z-index:3;text-align:right;color:#3b332a;
}
.tmh-pop .pop-right .mark .wm{
  font-family:var(--serif,Georgia,serif);font-size:17px;font-weight:500;letter-spacing:.2em;
  line-height:1;text-indent:.2em;opacity:.92;
}
.tmh-pop .pop-right .mark .sub{
  margin-top:6px;font-size:6.5px;letter-spacing:.34em;text-transform:uppercase;
  opacity:.78;text-indent:.34em;
}

/* ---------- 移动端 ---------- */
@media(max-width:820px){
  .tmh-pop{padding:0;align-items:stretch}
  .tmh-pop .pop-card{
    grid-template-columns:1fr;height:100dvh;max-width:none;
    overflow-y:auto;box-shadow:none;
  }
  .tmh-pop .pop-left{padding:76px 26px 52px;min-height:100dvh;justify-content:center}
  .tmh-pop .pop-left::after{display:none}
  .tmh-pop .pop-right{display:none}
  .tmh-pop .pop-brand{margin-bottom:26px}
  .tmh-pop .pop-h2{font-size:30px;margin-bottom:20px}
  .tmh-pop .pop-copy{font-size:14px;line-height:1.75}
  .tmh-pop .pop-form{margin-top:32px}
  .tmh-pop .pop-field{height:54px;font-size:15px}
  .tmh-pop .pop-cta{height:56px;font-size:16px}
  .tmh-pop .pop-x{top:14px;left:14px;width:38px;height:38px}
  .tmh-pop .pop-x svg{width:19px;height:19px}
}
@media(max-height:700px) and (min-width:821px){
  .tmh-pop .pop-brand{margin-bottom:20px}
  .tmh-pop .pop-h2{font-size:30px;margin-bottom:16px}
  .tmh-pop .pop-copy{font-size:13px}
}

/* 无 JS 时不显示（弹窗依赖 JS 触发） */
html:not(.tmh-pop-ready) .tmh-pop{display:none}

@media(prefers-reduced-motion:reduce){
  .tmh-pop,.tmh-pop .pop-card,.tmh-pop .pop-right .shot{transition:none}
  .tmh-pop .pop-right .shot{transform:none}
}
