/* ============================================================
   SSWind · Product Registration（亚马逊回购卡落地页）
   单卡片、单栏：礼品卡 → 表单 → 联系方式
   ============================================================ */

:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --ink: #0f1a24;
  --ink-2: #3a4754;
  --muted: #64717d;
  --line: #e2e7ec;
  --line-2: #cdd6de;

  --accent: #ff6a13;          /* 品牌橙：按钮/礼品卡 */
  --accent-hover: #ff7d33;
  --accent-text: #c84d07;     /* 浅底上的橙色文字（对比度达标） */
  --accent-soft: #fff0e5;

  --air: #e4eef6;
  --air-ink: #245f88;

  --ok: #137a46;
  --ok-soft: #e5f5ec;
  --err: #c42b2b;
  --err-soft: #fdeded;

  --navy: #0f1a24;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  color: var(--ink);
  font: 400 16px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: var(--bg);
  background-image:
    radial-gradient(700px 420px at 0% -120px, #dbe8f3 0%, rgba(219, 232, 243, 0) 70%),
    radial-gradient(640px 400px at 100% -60px, #fde6d6 0%, rgba(253, 230, 214, 0) 65%);
  background-repeat: no-repeat;
}

h1, h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.05;
}

p { margin: 0; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

.ico {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shell {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 12px;
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(243, 245, 247, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}

.topbar__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 60px;
  padding: 0 16px;
}

.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand__mark { width: 28px; height: 28px; }

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.03em;
}

.topbar__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.topbar__tag .ico { width: 15px; height: 15px; color: var(--ok); }

/* ---------------- 主卡片 ---------------- */
.main { padding-top: 4px; padding-bottom: 28px; }

@media (min-width: 600px) {
  .main { padding-top: 28px; padding-bottom: 48px; }
}

.card {
  padding: 24px 20px 22px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid rgba(15, 26, 36, .06);
  box-shadow: 0 1px 2px rgba(15, 26, 36, .04), 0 28px 56px -28px rgba(15, 26, 36, .28);
}

@media (min-width: 600px) {
  .card { padding: 32px 32px 28px; }
}

/* 产品展台：顶部通栏，AI 生成的空展台背景 + 白底产品图 multiply 融合
   --floor = 展台顶面在背景图中的高度位置（按 4:3 背景实测） */
.stage {
  --floor: 82.5%;
  position: relative;
  aspect-ratio: 4 / 3;
  margin: -24px -20px 22px;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 86%, #fff 100%),
    url("backdrop-warm.webp") center / cover no-repeat,
    #f7f3f0;
}

.stage[data-tone="cool"] {
  --floor: 80.5%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 86%, #fff 100%),
    url("backdrop-cool.webp") center / cover no-repeat,
    #f2f3f5;
}

/* 展台顶面上的接触阴影 */
.stage::after {
  content: "";
  position: absolute;
  left: 50%;
  top: var(--floor);
  z-index: 0;
  width: 42%;
  height: 6%;
  transform: translate(-50%, -62%);
  background: radial-gradient(closest-side, rgba(15, 26, 36, .22), rgba(15, 26, 36, 0));
}

.stage__img {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% - var(--floor) - 1.2%);
  z-index: 1;
  height: 66%;
  width: auto;
  margin: 0 auto;
  mix-blend-mode: multiply;
  animation: rise .8s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 600px) {
  .stage { margin: -32px -32px 26px; }
}

.title { font-size: clamp(28px, 7.8vw, 34px); }

.sub {
  margin-top: 8px;
  font-size: 16px;
  color: var(--ink-2);
}

/* 礼品卡：呼应包裹里的实体卡 */
.voucher {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  margin-top: 20px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 18px 32px -20px rgba(15, 26, 36, .55);
  isolation: isolate;
}

.voucher__main,
.voucher__stub {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 138px;
  padding: 16px 18px 14px;
}

.voucher__stub {
  z-index: 2;
  background-color: var(--accent);
  color: var(--ink);
  /* 虚线撕口 */
  background-image: linear-gradient(to bottom, rgba(15, 26, 36, .45) 55%, rgba(15, 26, 36, 0) 0);
  background-size: 2px 11px;
  background-repeat: repeat-y;
  background-position: left top;
}

.voucher__stub::before,
.voucher__stub::after {
  content: "";
  position: absolute;
  left: -10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
}

.voucher__stub::before { top: -10px; }
.voucher__stub::after { bottom: -10px; }

.voucher__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .72;
}

.voucher__big {
  display: flex;
  align-items: flex-start;
  margin-top: auto;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(50px, 14vw, 64px);
  line-height: .9;
  letter-spacing: -.05em;
}

.voucher__big--stub { font-size: clamp(42px, 11.5vw, 54px); }

.voucher__plus {
  margin: .1em .04em 0 0;
  font-size: .5em;
  color: var(--accent);
}

.voucher__unit {
  margin-top: 6px;
  font-size: 13.5px;
  font-weight: 500;
  opacity: .8;
}

.voucher__wind {
  position: absolute;
  right: -20px;
  bottom: -10px;
  width: 170px;
  height: auto;
  z-index: -1;
  fill: none;
  stroke: rgba(255, 255, 255, .09);
  stroke-width: 7;
  stroke-linecap: round;
}

.bonus {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

.bonus .ico { width: 18px; height: 18px; color: var(--accent-text); }

/* ---------------- 表单 ---------------- */
#regForm {
  display: grid;
  gap: 18px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.field { min-width: 0; margin: 0; padding: 0; border: 0; }

.field > label,
.field > legend,
.labelrow > label {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
}

.labelrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.linkbtn {
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--air-ink);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(36, 95, 136, .35);
  text-underline-offset: 3px;
  cursor: pointer;
  white-space: nowrap;
}

.linkbtn:hover { text-decoration-color: currentColor; }

/* 购买渠道：分段选择 */
.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #edf0f3;
}

.seg__opt { position: relative; }

.seg__opt input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.seg__opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 6px;
  border-radius: 10px;
  text-align: center;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  transition: background-color .15s, color .15s, box-shadow .15s;
}

.seg__opt input:hover + span { color: var(--ink); }

.seg__opt input:checked + span {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 26, 36, .08), 0 3px 10px -3px rgba(15, 26, 36, .16);
}

.seg__opt input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 1px; }

/* 输入框 */
.input { position: relative; }

.input .ico {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: #8794a0;
  pointer-events: none;
  transition: color .15s;
}

.input input {
  width: 100%;
  height: 54px;
  padding: 0 16px 0 46px;
  border: 1.5px solid var(--line-2);
  border-radius: 14px;
  background: #fff;
  font-size: 16px; /* ≥16px 防止 iOS 聚焦放大 */
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s, box-shadow .15s;
}

#orderNo { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

.input input::placeholder { color: #9ba6b0; letter-spacing: 0; }
.input input:hover { border-color: #b4bfc9; }

.input input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(15, 26, 36, .08);
}

.input:focus-within .ico { color: var(--ink); }

.input input.invalid {
  border-color: var(--err);
  box-shadow: 0 0 0 4px rgba(196, 43, 43, .10);
}

.err {
  margin-top: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--err);
}

.err:empty { display: none; }

/* 邮箱纠错提示 */
.suggest {
  margin-top: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--ink-2);
  font-size: 14px;
}

.suggest__btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-text);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.help {
  margin-top: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--air);
  color: #1d4562;
  font-size: 13.5px;
  line-height: 1.5;
}

/* 截图上传（次要入口） */
.upload {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
  padding: 11px 14px;
  border: 1.5px dashed var(--line-2);
  border-radius: 14px;
  background: #f8fafb;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}

.upload .ico { width: 19px; height: 19px; color: var(--air-ink); }
.upload:hover { border-color: var(--air-ink); background: #f2f7fb; }
.upload:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.upload:disabled { cursor: progress; opacity: .7; }

.shot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.shot img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.shot__meta { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); }
.shot__meta b { display: block; font-size: 14px; color: var(--ink); }

.shot__remove {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 11px;
  background: #f1f3f5;
  color: var(--muted);
  cursor: pointer;
}

.shot__remove:hover { background: var(--err-soft); color: var(--err); }
.shot__remove .ico { width: 18px; height: 18px; }

.shotstate { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.shotstate:empty { display: none; }
.shotstate.ok { color: var(--ok); }
.shotstate.err { color: var(--err); }

/* 提交失败 */
.formerr {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--err-soft);
  color: var(--err);
  font-size: 14px;
}

.formerr .ico { margin-top: 1px; }
.formerr a { font-weight: 600; word-break: break-all; }

/* 蜜罐 */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 0 24px;
  border: 0;
  border-radius: 16px;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .15s, transform .12s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.btn--primary {
  background: var(--accent);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 12px 26px -12px rgba(255, 106, 19, .75);
}

.btn--primary:hover { background: var(--accent-hover); }

.btn--ghost {
  min-height: 50px;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line-2);
}

.btn--ghost:hover { border-color: var(--ink); }

.btn__arrow { transition: transform .15s; }
.btn--primary:hover .btn__arrow { transform: translateX(3px); }

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(15, 26, 36, .25);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

.btn.is-loading { cursor: progress; }
.btn.is-loading .spinner { display: block; }
.btn.is-loading .btn__arrow { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

.fineprint {
  text-wrap: balance;
  margin-top: -6px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------------- 提交成功 ---------------- */
.success { padding: 12px 0 4px; text-align: center; outline: none; }

.success__mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both;
}

.success__mark .ico { width: 32px; height: 32px; stroke-width: 2.4; }

@keyframes pop {
  from { transform: scale(.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.success h2 { font-size: 28px; }
.success__lead { margin: 10px auto 0; max-width: 32ch; color: var(--ink-2); }

.success__ref {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 12px;
  border-radius: 10px;
  background: #f1f3f5;
  font: 500 13.5px/1.4 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color: var(--ink-2);
}

.success .btn--ghost { margin-top: 22px; }

/* ---------------- 页脚 ---------------- */
.footer {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  margin-top: 6px;
}

.contact__mail {
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.contact__copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}

.contact__copy .ico { width: 14px; height: 14px; }
.contact__copy:hover { border-color: var(--ink); }
.contact__copy.copied { background: var(--accent); border-color: var(--accent); color: var(--ink); }

.legal { margin-top: 18px; font-size: 12.5px; color: #8a96a1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
