/* =========================================================
   清风道 · 婚恋测算落地页（红金版）
   配色：朱红 #B3262C / 深红 #8C1A1F / 金 #E6C283 / 暖白 #FDF8F3
   ========================================================= */

:root {
  --primary: #b3262c;
  --primary-dark: #8c1a1f;
  --primary-deep: #6d1114;
  --primary-soft: #fdecea;
  --gold: #e6c283;
  --gold-deep: #b8863b;
  --accent-soft: #fbf0dc;
  --ink: #2a1714;
  --text: #3a2723;
  --muted: #8a746c;
  --line: #f0e2da;
  --paper: #fdf8f3;
  --danger: #b3262c;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #efe0d8;
  font-family: var(--sans);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(640px, calc(100% - 40px)); margin-inline: auto; }

/* ---------- 顶部 ---------- */
.lp-header {
  width: min(720px, 100%); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  background: linear-gradient(180deg, #b30e10, #a30c0e);
}
.lp-brand { display: inline-flex; align-items: center; gap: 10px; }
.lp-brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #f0d49a, #cfa257);
  color: #6d1114; font-family: var(--serif); font-size: 19px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(60, 10, 10, .28);
}
.lp-brand-mark.small { width: 28px; height: 28px; border-radius: 8px; font-size: 14px; }
.lp-brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.lp-brand-text strong { font-family: var(--serif); font-size: 18px; letter-spacing: .1em; color: #fff; }
.lp-brand-text em { font-style: normal; font-size: 11px; color: #f0c9b8; letter-spacing: .1em; }
.lp-back { font-size: 13px; color: #f5d9cd; }
.lp-back:hover { color: #fff; }

/* ---------- 页面容器 ---------- */
.lp {
  width: min(720px, 100%); margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 60px rgba(80, 20, 20, .18);
  overflow: hidden;
}

/* ---------- 首屏 ---------- */
.lp-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #871013 0%, #7f0e12 58%, #6d1114 100%);
  text-align: center;
}
.hero-banner {
  position: relative;
  aspect-ratio: 750 / 760;
  background: url("img/hero-marriage.jpg") center top / 100% auto no-repeat;
}
.hero-banner::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12%;
  background: linear-gradient(180deg, rgba(135, 16, 19, 0), #871013 94%);
  pointer-events: none;
}
.hero-body { position: relative; padding: 26px 24px 84px; }

.lp-eyebrow {
  display: inline-block; padding: 5px 15px; border-radius: 999px;
  font-size: 12px; letter-spacing: .16em; color: #f4d7a6;
  border: 1px solid rgba(230, 194, 131, .5); background: rgba(255, 255, 255, .08);
}
.lp-hero h1 {
  margin: 16px 0 12px;
  font-family: var(--serif); color: #fff;
  font-size: clamp(24px, 5.6vw, 32px); line-height: 1.4; letter-spacing: .04em;
}
.hero-lead { font-size: 14.5px; line-height: 1.95; color: #f2d3c7; max-width: 470px; margin: 0 auto; }

.hero-points {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px;
  margin: 20px 0 24px;
}
.hero-points li {
  font-size: 12.5px; color: #f7ded1;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .14);
}
.hero-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 46px; border-radius: 999px;
  font-size: 16.5px; font-weight: 700; color: #5b1c08;
  background: linear-gradient(135deg, #f6dfae, #d9a95c);
  box-shadow: 0 12px 28px rgba(90, 20, 10, .42);
  transition: transform .2s, box-shadow .25s, filter .2s;
}
.hero-btn:hover { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 18px 34px rgba(90, 20, 10, .5); }
.hero-note { margin-top: 14px; font-size: 12px; color: #e2b3a4; }

/* ---------- 表单 ---------- */
.lp-form-wrap { padding: 0 20px; margin-top: -52px; position: relative; z-index: 2; }
.form-card {
  background: #fff; border-radius: 22px; padding: 30px 26px 26px;
  border: 1px solid #f3e2d9;
  box-shadow: 0 22px 50px rgba(90, 20, 20, .16);
}
.form-head { text-align: center; margin-bottom: 22px; }
.form-head h2 { font-family: var(--serif); font-size: 21px; letter-spacing: .02em; }
.form-head p { margin-top: 8px; font-size: 12.5px; color: var(--muted); }

.lp-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label, .field .label { font-size: 13.5px; color: #6b4a42; font-weight: 600; }
.field .opt { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 4px; }

.lp-form input[type="text"],
.lp-form input[type="tel"],
.lp-form input[type="date"],
.lp-form select,
.lp-form textarea {
  width: 100%; height: 48px; padding: 0 14px;
  font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: #fffbf8; border: 1px solid #efddd3; border-radius: 12px;
  outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.lp-form textarea { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; line-height: 1.7; }
.lp-form input::placeholder, .lp-form textarea::placeholder { color: #b8a49c; }
.lp-form input:focus, .lp-form select:focus, .lp-form textarea:focus {
  border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(179, 38, 44, .12);
}
.lp-form input.invalid, .lp-form select.invalid { border-color: var(--danger); background: #fff7f6; }

.phone-wrap { position: relative; display: flex; align-items: center; }
.phone-prefix {
  position: absolute; left: 14px; font-size: 14px; color: var(--muted); pointer-events: none;
}
.phone-wrap input { padding-left: 54px !important; }

.radio-row { display: flex; gap: 10px; }
.radio { position: relative; flex: 1; cursor: pointer; }
.radio input { position: absolute; opacity: 0; pointer-events: none; }
.radio span {
  display: flex; align-items: center; justify-content: center;
  height: 44px; border-radius: 12px; font-size: 14.5px; color: #7a5a52;
  border: 1px solid #efddd3; background: #fffbf8;
  transition: all .2s;
}
.radio input:checked + span {
  border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark);
  font-weight: 600; box-shadow: inset 0 0 0 1px var(--primary);
}

.agree { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: #8a6f67; line-height: 1.7; }
.agree input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--primary); flex: none; cursor: pointer; }
.agree a { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 2px; }
.agree a:hover { color: var(--primary); }

.err { display: none; font-size: 12px; color: var(--danger); }
.err.show { display: block; }

.submit {
  height: 54px; border: 0; border-radius: 999px; cursor: pointer;
  font-family: var(--sans); font-size: 17px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #c33a34, #a01e23);
  box-shadow: 0 12px 26px rgba(160, 30, 35, .32);
  transition: transform .2s, box-shadow .25s, opacity .2s;
}
.submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 18px 32px rgba(160, 30, 35, .38); }
.submit:disabled { opacity: .65; cursor: default; }
.form-tip { text-align: center; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 提交完成态 */
.form-done { text-align: center; padding: 12px 4px 6px; }
.done-mark {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px;
  display: grid; place-items: center; font-size: 26px; color: #fff;
  background: linear-gradient(140deg, #c33a34, #8c1a1f);
  box-shadow: 0 10px 24px rgba(140, 26, 31, .3);
}
.form-done h3 { font-family: var(--serif); font-size: 21px; margin-bottom: 10px; }
.done-line { font-size: 14.5px; color: #6b4a42; }
.done-note {
  margin: 16px 0 20px; padding: 12px 14px; border-radius: 12px;
  font-size: 12.5px; line-height: 1.8; color: #7a5a24;
  background: var(--accent-soft); border: 1px solid #eedcbb;
  text-align: left;
}
.again {
  height: 42px; padding: 0 26px; border-radius: 999px; cursor: pointer;
  font-family: var(--sans); font-size: 14px; color: var(--primary-dark);
  background: #fff; border: 1px solid #f0d5cb;
}
.again:hover { background: var(--primary-soft); }

/* ---------- 通用板块 ---------- */
.lp-section { padding: 56px 0; }
.lp-section.alt { background: #fff; }

.ribbon { position: relative; text-align: center; margin-bottom: 26px; }
.ribbon span {
  position: relative; display: inline-block; padding: 0 18px;
  font-family: var(--serif); font-size: 22px; letter-spacing: .12em; color: var(--ink);
}
.ribbon span::after {
  content: ""; position: absolute; left: 50%; bottom: -6px; translate: -50% 0;
  width: 40px; height: 2px; border-radius: 2px; background: var(--gold-deep);
}
.ribbon::before, .ribbon::after {
  content: ""; position: absolute; top: 46%; width: calc(50% - 96px); height: 1px;
  background: linear-gradient(90deg, transparent, #e0bd84);
}
.ribbon::before { left: 0; }
.ribbon::after { right: 0; background: linear-gradient(270deg, transparent, #e0bd84); }
.section-lead {
  text-align: center; font-size: 14.5px; color: #7a5f57; line-height: 1.95;
  max-width: 460px; margin: 0 auto 34px;
}

/* ---------- 三步 ---------- */
.steps { display: flex; flex-direction: column; gap: 0; }
.steps li { position: relative; display: flex; gap: 16px; padding-bottom: 26px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: ""; position: absolute; left: 17px; top: 40px; bottom: 0;
  width: 1px; background: linear-gradient(180deg, #f0d7d2, transparent);
}
.steps li:last-child::before { display: none; }
.step-dot {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 15px; color: var(--primary-dark);
  background: var(--primary-soft); border: 1px solid #f2cbc7;
}
.steps h3 { font-size: 17px; margin-bottom: 6px; letter-spacing: .02em; }
.steps p { font-size: 14px; color: #7a5f57; line-height: 1.9; }

/* ---------- 三步 ---------- */
.start { background: linear-gradient(180deg, #fff 0%, #fdf3ee 100%); }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step-card {
  background: #fff; border: 1px solid #f3e6df; border-radius: 16px;
  padding: 22px 20px;
  box-shadow: 0 6px 18px rgba(90, 20, 20, .05);
  transition: transform .25s, box-shadow .25s;
}
.step-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(90, 20, 20, .10); }
.step-no {
  display: inline-block; margin-bottom: 8px;
  font-family: var(--serif); font-size: 12px; letter-spacing: .16em; color: var(--gold-deep);
}
.step-card h3 { font-size: 16.5px; margin-bottom: 6px; letter-spacing: .02em; }
.step-card p { font-size: 13px; color: #8a6f67; line-height: 1.85; }

@media (max-width: 560px) {
  .step-grid { grid-template-columns: 1fr; }
}

/* ---------- 四象限 ---------- */
.quad {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  column-gap: 108px; row-gap: 104px;
  padding: 4px;
}
.quad::after {
  content: ""; position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 176px; height: 176px; border-radius: 50%;
  border: 1px dashed rgba(184, 134, 59, .55);
  pointer-events: none;
}
.quad-item {
  background: #fff; border: 1px solid #f2e4dc; border-radius: 16px;
  padding: 22px 18px; text-align: left;
  box-shadow: 0 6px 18px rgba(90, 20, 20, .05);
}
.quad-item b { display: block; font-size: 15.5px; color: var(--primary-dark); margin-bottom: 6px; }
.quad-item span { font-size: 12.8px; color: #8a6f67; line-height: 1.75; }
.quad-core {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  z-index: 2;
  width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  font-family: var(--serif); font-size: 13px; line-height: 1.4; color: #fff;
  background: linear-gradient(140deg, #c33a34, #8c1a1f);
  border: 4px solid #fff; box-shadow: 0 10px 26px rgba(140, 26, 31, .32);
  pointer-events: none;
}

/* ---------- 详解卡片 ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-card {
  background: #fff; border: 1px solid #f2e4dc; border-radius: 16px;
  padding: 22px 20px; transition: transform .25s, box-shadow .25s;
}
.detail-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(90, 20, 20, .08); }
.detail-no {
  display: inline-block; font-family: var(--serif); font-size: 13px;
  letter-spacing: .16em; color: var(--gold-deep); margin-bottom: 8px;
}
.detail-card h3 { font-size: 16.5px; margin-bottom: 8px; letter-spacing: .02em; }
.detail-card p { font-size: 13px; color: #8a6f67; line-height: 1.85; }

/* ---------- 结尾 CTA ---------- */
.lp-cta {
  padding: 52px 24px 56px; text-align: center;
  background:
    radial-gradient(420px 260px at 80% 0%, rgba(230, 194, 131, .22), transparent 70%),
    linear-gradient(160deg, #8c1a1f, #6d1114);
  color: #f2d3c7;
}
.lp-cta h2 { font-family: var(--serif); color: #fff; font-size: 24px; letter-spacing: .04em; }
.lp-cta p { margin-top: 10px; font-size: 14px; }
.cta-btn {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 22px; height: 50px; padding: 0 42px; border-radius: 999px;
  font-size: 16px; font-weight: 700; color: #5b1c08;
  background: linear-gradient(135deg, #f6dfae, #d9a95c);
  box-shadow: 0 12px 26px rgba(60, 10, 10, .34);
}
.cta-btn:hover { filter: brightness(1.04); }
.cta-note { font-size: 11.5px !important; color: #d9a99b; margin-top: 16px !important; }

/* ---------- 页脚 ---------- */
.lp-footer {
  width: min(720px, 100%); margin: 0 auto;
  padding: 28px 24px 34px; background: #f7ece5;
  font-size: 12.5px; color: #8a746c; text-align: center;
}
.footer-brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; font-family: var(--serif); color: #6b4a42; }
.lp-footer p { line-height: 1.9; }
.lp-footer .foot-link { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 2px; font-size: 12.5px; }
.lp-footer .muted { margin-top: 8px; color: #a08a82; font-size: 11.5px; }

/* ---------- 悬浮按钮 ---------- */
.float-cta {
  position: fixed; left: 50%; bottom: 18px; translate: -50% 0;
  z-index: 40; display: none;
  height: 48px; padding: 0 40px; border-radius: 999px;
  align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #c33a34, #a01e23);
  box-shadow: 0 12px 26px rgba(90, 20, 20, .34);
}

/* ---------- 生辰触发框 ---------- */
.birth-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; height: 48px; padding: 0 14px;
  font-family: var(--sans); font-size: 15px; color: var(--ink); text-align: left;
  background: #fffbf8; border: 1px solid #efddd3; border-radius: 12px;
  cursor: pointer; transition: border-color .2s, box-shadow .2s, background .2s;
}
.birth-trigger:hover { border-color: #e7cabc; }
.birth-trigger:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(179, 38, 44, .12); }
.birth-trigger.invalid { border-color: var(--danger); background: #fff7f6; }
.birth-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.birth-text.placeholder { color: #b8a49c; }
.birth-arrow {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: #b09a92; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- 生辰选择器（底部滚轮） ---------- */
.picker { position: fixed; inset: 0; z-index: 90; }
.picker[hidden] { display: none; }
.picker-mask { position: absolute; inset: 0; background: rgba(30, 10, 8, .45); animation: maskIn .2s ease; }
.picker-panel {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 720px;
  background: #fff; border-radius: 16px 16px 0 0; overflow: hidden;
  box-shadow: 0 -10px 40px rgba(60, 10, 10, .25);
  animation: sheetUp .26s cubic-bezier(.2, .8, .3, 1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }

.picker-summary {
  padding: 14px 16px 12px; text-align: center;
  font-size: 14.5px; color: #3a2723; letter-spacing: .02em;
  border-bottom: 1px solid #f3e6df;
  background: #fffdfb;
}
.picker-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid #f5ece6;
}
.pk-cancel, .pk-ok {
  border: 0; background: none; cursor: pointer; padding: 6px 8px;
  font-family: var(--sans); font-size: 15px;
}
.pk-cancel { color: #7a6a63; }
.pk-ok { color: var(--primary); font-weight: 600; }
.pk-tabs { display: flex; border: 1px solid var(--primary); border-radius: 6px; overflow: hidden; }
.pk-tab {
  border: 0; cursor: pointer; padding: 5px 18px;
  font-family: var(--sans); font-size: 14px;
  background: #fff; color: var(--primary);
  transition: background .2s, color .2s;
}
.pk-tab.is-active { background: var(--primary); color: #fff; }

.picker-wheels {
  position: relative; display: flex; height: 180px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%);
}
.wheel-band {
  position: absolute; left: 10px; right: 10px; top: 50%; translate: 0 -50%;
  height: 36px; border-radius: 6px; background: #f5f2f0;
  pointer-events: none;
}
.wheel {
  position: relative; z-index: 2; flex: 1; height: 100%;
  overflow-y: scroll; overscroll-behavior: contain;
  scroll-snap-type: y mandatory; scrollbar-width: none;
}
.wheel::-webkit-scrollbar { display: none; }
.wheel ul { margin: 0; padding: 72px 0; list-style: none; }
.wheel li {
  height: 36px; line-height: 36px; text-align: center;
  font-size: 15px; color: #c2b4ae; white-space: nowrap;
  scroll-snap-align: center; transition: color .15s;
  padding: 0 4px; overflow: hidden; text-overflow: ellipsis;
}
.wheel li.on { color: #2a1714; font-weight: 500; }
#wheelYear { flex: 1.05; }
#wheelMonth { flex: .82; }
#wheelDay { flex: .82; }
#wheelHour { flex: 1.3; }
#wheelHour li { font-size: 13.5px; letter-spacing: -.01em; }

@media (max-width: 560px) {
  .pk-tab { padding: 5px 14px; font-size: 13.5px; }
  .wheel li { font-size: 14.5px; }
  .picker-summary { font-size: 13.5px; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 560px) {
  .hero-body { padding: 20px 20px 76px; }
  .lp-hero h1 { font-size: 20px; letter-spacing: .02em; }
  .hero-points li { font-size: 11.5px; }
  .lp-form-wrap { padding: 0 14px; margin-top: -44px; }
  .form-card { padding: 24px 18px 20px; border-radius: 18px; }
  .ribbon span { font-size: 19px; letter-spacing: .08em; }
  .ribbon::before, .ribbon::after { width: calc(50% - 82px); }
  .lp-section { padding: 44px 0; }
  .quad { column-gap: 12px; row-gap: 12px; }
  .quad::after { display: none; }
  .quad-core {
    position: static; translate: none; grid-column: 1 / -1;
    width: auto; height: 44px; border-radius: 12px; border-width: 1px;
    font-size: 14px; letter-spacing: .06em;
  }
  .detail-grid { grid-template-columns: 1fr; }
  .float-cta { display: flex; }
  .lp-footer { padding-bottom: 84px; }
  .lp-cta { padding: 44px 20px 110px; }
}

@media (min-width: 561px) {
  .lp-hero .hero-body { padding-top: 30px; }
}
