/* ============================================================
   EBPAY 之家 — 响应式样式表
   设计：专业蓝 + 信任绿，移动端优先，无外部依赖
   ============================================================ */

:root {
  --c-primary: #1554e0;
  --c-primary-dark: #0e3aa8;
  --c-accent: #16a34a;
  --c-ink: #0f172a;
  --c-body: #475569;
  --c-muted: #94a3b8;
  --c-bg: #ffffff;
  --c-bg-alt: #f6f8fc;
  --c-border: #e2e8f0;
  --c-warn-bg: #fff7ed;
  --c-warn-bd: #fdba74;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, .12);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1160px;
  --header-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-body);
  background: var(--c-bg);
  line-height: 1.65;
  font-size: 16px;
}

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

a { color: var(--c-primary); text-decoration: none; }

h1, h2, h3, h4 { color: var(--c-ink); line-height: 1.25; margin: 0 0 .5em; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--c-primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(21, 84, 224, .3);
}
.btn--primary:hover { background: var(--c-primary-dark); }
.btn--ghost {
  background: transparent;
  color: var(--c-primary);
  border-color: var(--c-border);
}
.btn--ghost:hover { border-color: var(--c-primary); }
.btn--lg { padding: 13px 28px; font-size: 16px; }
.btn--block { width: 100%; }

/* ---------- 顶部公告条 ---------- */
.topbar {
  background: var(--c-ink);
  color: #cbd5e1;
  font-size: 13px;
}
.topbar__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.topbar__right { color: #93c5fd; }

/* ---------- 导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--c-border);
}
.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--c-ink); font-weight: 700; }
.brand__logo {
  width: 34px; height: 34px;
  display: block; object-fit: contain;
  border-radius: 8px; background: transparent;
}
.footer__brand .brand__logo { background: #fff; padding: 2px; }
.brand__name { font-size: 19px; letter-spacing: .3px; }
.brand__accent { color: var(--c-primary); }

.nav__links { display: flex; align-items: center; gap: 26px; }
.nav__links a { color: var(--c-body); font-weight: 500; font-size: 15px; }
.nav__links a:hover { color: var(--c-primary); }
.nav__cta { color: #fff !important; }
.nav__cta:hover { color: #fff !important; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px; height: 42px;
  border: 1px solid var(--c-border);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
}
.nav__toggle span {
  display: block;
  width: 20px; height: 2px;
  margin: 0 auto;
  background: var(--c-ink);
  transition: transform .2s ease, opacity .2s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(22, 163, 74, .12), transparent 60%),
    radial-gradient(1000px 500px at 0% 0%, rgba(21, 84, 224, .12), transparent 55%),
    var(--c-bg);
  padding: 64px 0 72px;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
}
.hero__eyebrow {
  color: var(--c-primary);
  font-weight: 600;
  letter-spacing: 1px;
  margin: 0 0 12px;
}
.hero__title { font-size: clamp(30px, 5vw, 50px); font-weight: 800; margin: 0 0 18px; }
.hero__subtitle { font-size: 17px; max-width: 540px; margin: 0 0 28px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.hero__points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hero__points li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent); flex: none; }

.hero__card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.hero__card-head { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--c-ink); }
.hero__card-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 0 4px rgba(22,163,74,.18); }
.hero__rate { display: grid; gap: 14px; margin: 18px 0; }
.hero__rate-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; background: var(--c-bg-alt); border-radius: var(--radius-sm);
}
.hero__rate-label { color: var(--c-body); font-size: 14px; }
.hero__rate-value { font-weight: 800; color: var(--c-primary); font-size: 20px; }
.hero__card-note { font-size: 12px; color: var(--c-muted); margin: 0 0 16px; }

/* ---------- 通用区块 ---------- */
.section { padding: 72px 0; }
.section--alt { background: var(--c-bg-alt); }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section__eyebrow { color: var(--c-accent); font-weight: 700; letter-spacing: 2px; font-size: 13px; margin: 0 0 8px; }
.section__title { font-size: clamp(24px, 3.5vw, 34px); font-weight: 800; margin: 0 0 12px; }
.section__desc { font-size: 16px; color: var(--c-body); margin: 0; }

/* ---------- 网格卡片 ---------- */
.grid { display: grid; gap: 22px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #c7d7f5; }
.card__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(21,84,224,.12), rgba(22,163,74,.12));
  color: var(--c-primary);
  margin-bottom: 16px;
}
.card__title { font-size: 18px; margin: 0 0 8px; }
.card__text { font-size: 14.5px; margin: 0; color: var(--c-body); }

/* ---------- 流程步骤 ---------- */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
  counter-reset: step;
}
.step {
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 28px 22px; position: relative;
}
.step__num {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-primary); color: #fff; font-weight: 800; font-size: 18px;
  margin-bottom: 14px;
}
.step__title { font-size: 17px; margin: 0 0 8px; }
.step__text { font-size: 14.5px; margin: 0; }

/* ---------- 优势数据 ---------- */
.feat {
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 30px 20px; text-align: center;
  box-shadow: var(--shadow-sm);
}
.feat__value { font-size: 34px; font-weight: 800; color: var(--c-primary); }
.feat__label { margin: 6px 0 0; color: var(--c-body); font-size: 14.5px; }

.adv-list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
  margin-top: 26px;
}
.adv {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 20px;
}
.adv__icon {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(22,163,74,.14); color: var(--c-accent);
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
}
.adv h4 { margin: 0 0 4px; font-size: 16px; }
.adv p { margin: 0; font-size: 14px; color: var(--c-body); }

/* ---------- 联系 ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact__list { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 12px; }
.contact__list li {
  display: flex; gap: 12px; align-items: center;
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); padding: 12px 16px;
}
.contact__k { font-weight: 600; color: var(--c-ink); min-width: 96px; }
.contact__v { color: var(--c-body); font-size: 14.5px; word-break: break-all; }
.contact__notice {
  background: var(--c-warn-bg); border: 1px solid var(--c-warn-bd);
  border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14px; color: #9a3412;
}

.contact__form {
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-md);
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--c-ink); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  font-size: 15px; font-family: inherit; color: var(--c-ink); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(21,84,224,.15);
}
.field textarea { resize: vertical; }
.field input.invalid, .field select.invalid, .field textarea.invalid {
  border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.12);
}
.form__hint { font-size: 14px; margin: 10px 0 0; min-height: 1px; }
.form__hint.ok { color: var(--c-accent); font-weight: 600; }
.form__hint.err { color: #dc2626; font-weight: 600; }
.form__note { font-size: 12.5px; color: var(--c-muted); margin: 8px 0 0; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--c-ink); color: #cbd5e1; padding: 48px 0 28px; }
.footer__inner {
  display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 32px;
  align-items: start;
}
.footer__brand .brand__name { color: #fff; }
.footer__brand .brand__accent { color: #93c5fd; }
.footer__tag { margin: 12px 0 0; font-size: 14px; color: #94a3b8; }
.footer__nav { display: flex; flex-direction: column; gap: 10px; }
.footer__nav a { color: #cbd5e1; font-size: 14.5px; }
.footer__nav a:hover { color: #fff; }
.footer__legal p { margin: 0 0 6px; font-size: 13px; color: #94a3b8; }
.footer__disclaimer { line-height: 1.5; }

/* ============================================================
   响应式断点
   ============================================================ */

/* 平板 */
@media (max-width: 980px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hero__inner { grid-template-columns: 1fr; gap: 36px; }
  .hero__card { max-width: 460px; }
  .contact { grid-template-columns: 1fr; gap: 28px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__legal { grid-column: 1 / -1; }
}

/* 手机 */
@media (max-width: 640px) {
  .topbar__right { display: none; }
  .nav__links {
    position: fixed;
    top: calc(var(--header-h) + 34px);
    left: 12px; right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
  }
  .nav__links.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav__links a { padding: 10px 8px; }
  .nav__cta { margin-top: 6px; text-align: center; }
  .nav__toggle { display: flex; }

  .section { padding: 52px 0; }
  .grid--4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .adv-list { grid-template-columns: 1fr; }
  /* 手机端 Hero：最开始那一版（浅色渐变背景 + 深色文字 + 卡片） */
  .hero { padding: 44px 0 52px; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .contact__list li { flex-direction: column; align-items: flex-start; gap: 4px; }
  .contact__k { min-width: 0; }
  .footer__inner { grid-template-columns: 1fr; gap: 24px; }
}

/* 尊重用户的减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
