/* ============================================================
   金唐律师事务所 J.Tonge - 联系我们页
   100% 复刻原版式：金棕色按钮 / 白底卡片 / 728 容器
   ============================================================ */

* { box-sizing: border-box; }

:root {
  --brand-brown: #7E694F;          /* 主色（按钮、星号） */
  --brand-brown-dark: #5A4A36;
  --brand-brown-light: #C8B99A;
  --ink: #2B3D4F;                  /* 标签字色 */
  --ink-soft: #6B7785;
  --line: #DDE2E8;                 /* 输入框边框 */
  --line-strong: #C0C7D1;
  --bg: #ffffff;
  --bg-page: #f5f6f8;
  --danger: #D33B3B;
  --shadow: 0 1px 2px rgba(20, 30, 50, .04), 0 2px 12px rgba(20, 30, 50, .06);
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica,
        "Segoe UI", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* ---------- 顶部品牌横条 ---------- */
.brand-bar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark { display: inline-flex; }
.brand-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-zh {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .5px;
}
.brand-en {
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 2px;
  font-family: Georgia, "Times New Roman", serif;
  margin-top: 2px;
}

/* ---------- 顶部 Banner ---------- */
.hero {
  position: relative;
  width: 100%;
  max-width: 728px;
  margin: 0 auto;
  /* 图片实际比例 ≈ 2.74:1，容器由图片撑开 */
  overflow: hidden;
}
.hero-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- 表单容器 ---------- */
.form-shell {
  width: 100%;
  max-width: 728px;
  margin: 24px auto;
  padding: 24px 24px 32px;
  background: #fff;
  border-radius: 4px;
  box-shadow: var(--shadow);
}
.form-title {
  margin: 4px 0 20px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

/* ---------- 字段 ---------- */
.field {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px dashed #EEF1F4;
  position: relative;
}
.field:first-of-type { border-top: 0; }

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ink);
  line-height: 40px;
  min-height: 40px;
}
.required {
  color: var(--brand-brown);
  font-size: 16px;
  line-height: 1;
}
.lbl-zh { font-weight: 500; }
.lbl-en { color: var(--ink-soft); font-size: 13px; }
.dial-code {
  margin-left: auto;
  padding-left: 12px;
  color: var(--ink-soft);
  font-size: 13px;
}

.field-control {
  position: relative;
}
.field-control input,
.field-control textarea,
.field-control select {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field-control input,
.field-control select {
  height: 40px;
  padding: 0 16px;
}
.field-control textarea {
  min-height: 96px;
  padding: 10px 16px;
  line-height: 1.6;
  resize: vertical;
}
.field-control input:focus,
.field-control textarea:focus,
.field-control select:focus {
  border-color: var(--brand-brown);
  box-shadow: 0 0 0 3px rgba(126, 105, 79, .12);
}
.field-control input::placeholder,
.field-control textarea::placeholder {
  color: #B6BFC8;
}

/* select 原生外观重置 */
.select-control select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  cursor: pointer;
}
.select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  pointer-events: none;
  font-size: 12px;
}

/* 计数器 */
.counter {
  grid-column: 2 / 3;
  text-align: right;
  color: var(--ink-soft);
  font-size: 12px;
  margin-top: 4px;
}

/* ---------- 隐私同意 ---------- */
.consent {
  margin-top: 24px;
  padding: 0 4px;
}
.consent-row {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.7;
}
.consent-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.consent-box {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: #fff;
  position: relative;
  transition: all .15s ease;
}
.consent-row input:checked + .consent-box {
  background: var(--brand-brown);
  border-color: var(--brand-brown);
}
.consent-row input:checked + .consent-box::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.consent-link {
  color: var(--brand-brown);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.consent-link:hover { color: var(--brand-brown-dark); }
.consent-en {
  margin-left: 4px;
  color: var(--ink-soft);
}

/* ---------- 提交 ---------- */
.submit-row {
  margin-top: 22px;
  padding-left: 220px;
  padding-left: calc(220px + 12px);
}
.btn-submit {
  background: var(--brand-brown);
  color: #fff;
  border: 0;
  border-radius: 4px;
  height: 40px;
  width: 120px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, transform .05s ease;
}
.btn-submit:hover { background: var(--brand-brown-dark); }
.btn-submit:active { transform: translateY(1px); }
.btn-submit:disabled { background: #B6A48E; cursor: not-allowed; }

.feedback {
  margin-top: 14px;
  font-size: 13px;
  min-height: 20px;
}
.feedback.ok { color: var(--brand-brown); }
.feedback.err { color: var(--danger); }

/* ---------- 页脚 ---------- */
.page-footer {
  margin-top: auto;
  padding: 24px 16px 32px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 12px;
}

/* ---------- 隐私弹窗 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal[hidden] { display: none; }
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 50, .45);
}
.modal-panel {
  position: relative;
  background: #fff;
  border-radius: 6px;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow: auto;
  padding: 24px 28px;
  box-shadow: 0 24px 64px rgba(0,0,0,.2);
}
.modal-panel h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--brand-brown-dark);
}
.modal-panel p { color: var(--ink); line-height: 1.7; }
.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 22px;
  color: var(--ink-soft);
  cursor: pointer;
}

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
  .form-shell { margin: 12px; padding: 16px; }
  .field { grid-template-columns: 1fr; gap: 6px; padding: 12px 0; }
  .field-label { line-height: 1.4; min-height: 0; }
  .submit-row { padding-left: 0; }
  .counter { grid-column: 1 / -1; }
  .hero-title-zh { font-size: 28px; letter-spacing: 12px; padding-left: 12px; }
  .hero-title-en { font-size: 16px; letter-spacing: 4px; }
  .consent-row { font-size: 12px; }
}

/* 错误态 */
.field.has-error .field-control input,
.field.has-error .field-control textarea,
.field.has-error .field-control select {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(211, 59, 59, .08);
}