/* ==================================================================
   H5 落地页样式（h5.cpsauto.cn 专用，静态部署，无框架依赖）
   ================================================================== */

:root {
  --ink: #0b1220;
  --ink-soft: #1c2536;
  --body: #3f4a5c;
  --muted: #6b7688;
  --line: #e5e9f0;
  --bg: #f5f7fa;
  --canvas: #ffffff;
  --accent: #1a5cff;
  --accent-deep: #0f45d6;
  --radius-lg: 20px;
  --radius-md: 12px;
  --shadow-card: 0 24px 60px -32px rgba(11, 18, 32, 0.35);
  --container: 1180px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- 顶部导航 ---------------- */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 30;
  color: #fff;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.brand__text {
  font-size: 15px;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
}

.site-header__nav a {
  opacity: 0.86;
  transition: opacity 0.2s ease;
}

.site-header__nav a:hover {
  opacity: 1;
}

.site-header__cta {
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(8px);
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  background: #0b0e13;
}

.hero__media {
  position: relative;
  overflow: hidden;
}

.hero__img {
  width: 100%;
  height: auto;
}

/* 桌面端：真实 CTA 覆盖在图片自带的按钮位置（右下角），替换为可点击入口 */
.hero__cta {
  position: absolute;
  right: 3.5%;
  bottom: 6.5%;
  width: 18.5%;
  min-width: 220px;
  height: 9.4%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #1e1f22;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: clamp(18px, 2.15vw, 56px);
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.hero__cta:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 24px 50px -18px rgba(26, 92, 255, 0.7);
}

.hero__cta:active {
  transform: translateY(0);
}

/* 移动端专属文案（桌面端图片已含标题） */
.hero__copy {
  display: none;
}

.hero__strip {
  background: #0f1420;
  color: rgba(255, 255, 255, 0.82);
}

.hero__strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 22px;
  padding-top: 16px;
  padding-bottom: 16px;
  font-size: 14px;
}

.hero__strip strong {
  color: #fff;
  font-size: 16px;
  margin-right: 2px;
}

.hero__strip-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
}

/* ---------------- 留资区 ---------------- */

.lead {
  padding: 56px 0 72px;
}

.lead__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: start;
}

.card {
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 36px 36px 32px;
}

.card__head h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 2.4vw, 30px);
  color: var(--ink);
  letter-spacing: -0.4px;
}

.card__head p {
  margin: 0 0 26px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.field--full {
  grid-column: 1 / -1;
}

.field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.field__label em {
  font-style: normal;
  color: #e5484d;
}

.field__input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fbfcfe;
  color: var(--ink);
  font-size: 15px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.field__input::placeholder {
  color: #a3adbd;
}

.field__input:hover {
  border-color: #cfd7e3;
}

.field__input:focus {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 92, 255, 0.14);
}

.field__input[aria-invalid="true"] {
  border-color: #e5484d;
  box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.12);
}

.field__select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path d='M4 6l4 4 4-4' fill='none' stroke='%236b7688' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.field__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.field__error {
  margin: 0;
  font-size: 12px;
  color: #d93a3f;
}

/* 自定义下拉（品牌 / 车型） */

.combo {
  position: relative;
}

.combo__input {
  padding-right: 40px;
}

.combo__arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.combo__list {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 288px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 48px -20px rgba(11, 18, 32, 0.32);
}

.combo__option {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink);
}

.combo__option small {
  color: var(--muted);
  font-size: 12px;
  flex: none;
}

.combo__option[aria-selected="true"],
.combo__option.is-active {
  background: rgba(26, 92, 255, 0.08);
}

.combo__empty,
.combo__loading {
  padding: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* 蜜罐字段：移出可视区并隐藏，避免被自动化工具识别 */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    box-shadow 0.2s ease, transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 16px 32px -16px rgba(26, 92, 255, 0.65);
}

.btn--primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.btn--primary:disabled {
  background: #a9bcff;
  border-color: #a9bcff;
  box-shadow: none;
  cursor: not-allowed;
}

.btn--ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: #c8d2e2;
  background: #f8fafd;
}

.btn--ghost:disabled {
  color: #9aa5b6;
  background: #f3f5f9;
  cursor: not-allowed;
}

.btn--block {
  width: 100%;
  margin-top: 24px;
  height: 52px;
  font-size: 16px;
}

.sms-btn {
  height: 48px;
  padding: 0 18px;
  white-space: nowrap;
  font-weight: 600;
}

.form__privacy {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

/* 成功态 */

.success {
  padding: 40px 8px 12px;
  text-align: center;
}

.success h3 {
  margin: 16px 0 8px;
  font-size: 22px;
  color: var(--ink);
}

.success p {
  margin: 0 auto 24px;
  max-width: 380px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

/* 右侧说明 */

.lead__aside {
  display: grid;
  gap: 20px;
}

.aside-card {
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 24px;
}

.aside-card h2 {
  margin: 0 0 18px;
  font-size: 18px;
  color: var(--ink);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 18px;
}

.steps li {
  display: flex;
  gap: 14px;
}

.steps__num {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(26, 92, 255, 0.1);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.steps strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 4px;
}

.steps p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.aside-card--promise {
  background: linear-gradient(160deg, #101828, #1a2a4a);
  border-color: transparent;
  color: rgba(255, 255, 255, 0.82);
}

.aside-card--promise h2 {
  color: #fff;
}

.promises {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  font-size: 13.5px;
}

.promises li {
  position: relative;
  padding-left: 24px;
  line-height: 1.6;
}

.promises li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 8px;
  border-left: 2px solid #6ea8ff;
  border-bottom: 2px solid #6ea8ff;
  transform: rotate(-45deg);
}

/* ---------------- 页脚 ---------------- */

.site-footer {
  background: #0b1220;
  color: rgba(255, 255, 255, 0.7);
  padding: 28px 0;
  font-size: 13px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.site-footer p {
  margin: 0;
}

.site-footer__note {
  color: rgba(255, 255, 255, 0.45);
}

/* ---------------- 吸底 CTA（移动端） ---------------- */

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 30px -20px rgba(11, 18, 32, 0.4);
  backdrop-filter: blur(10px);
}

.sticky-cta__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sticky-cta__text strong {
  font-size: 14px;
  color: var(--ink);
}

.sticky-cta__text span {
  font-size: 12px;
  color: var(--muted);
}

.sticky-cta .btn {
  flex: none;
  height: 42px;
  padding: 0 20px;
  font-size: 14px;
}

/* ---------------- Toast ---------------- */

.toast {
  position: fixed;
  left: 50%;
  top: 18px;
  transform: translate(-50%, -12px);
  z-index: 90;
  max-width: min(92vw, 460px);
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(11, 18, 32, 0.94);
  color: #fff;
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast--error {
  background: rgba(190, 40, 48, 0.96);
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 960px) {
  .lead__grid {
    grid-template-columns: 1fr;
  }

  .lead__aside {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header__nav a:not(.site-header__cta) {
    display: none;
  }

  .hero__media {
    height: min(56vh, 480px);
    min-height: 340px;
  }

  .hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
  }

  .hero__media::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 62%;
    background: linear-gradient(180deg, rgba(6, 10, 18, 0), rgba(6, 10, 18, 0.78));
    pointer-events: none;
  }

  .hero__copy {
    display: block;
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 22px;
    z-index: 2;
    color: #fff;
  }

  .hero__eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.72);
  }

  .hero__headline {
    margin: 0;
    font-size: clamp(26px, 7.2vw, 34px);
    font-weight: 700;
    line-height: 1.24;
    letter-spacing: -0.5px;
  }

  .hero__headline--accent {
    color: #9dc0ff;
  }

  .hero__cta {
    display: none;
  }

  .hero__strip-inner {
    justify-content: space-between;
    gap: 8px;
    font-size: 12.5px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .hero__strip strong {
    font-size: 14px;
  }

  .hero__strip-dot {
    display: none;
  }

  .lead {
    padding: 28px 0 96px;
  }

  .container {
    padding: 0 16px;
  }

  .card {
    padding: 26px 20px 24px;
    border-radius: 16px;
  }

  .form__grid {
    grid-template-columns: 1fr;
  }

  /* iOS 聚焦时字号不足 16px 会触发自动放大 */
  .field__input {
    font-size: 16px;
  }

  .lead__aside {
    grid-template-columns: 1fr;
  }

  .sticky-cta {
    display: flex;
  }

  .site-footer {
    padding-bottom: 96px;
  }
}

@media (max-width: 400px) {
  .sticky-cta__text span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
