/* HP Encoder 企业官网 - 简约大气风格 */
:root {
  --navy: #0f2540;
  --ink: #1c2b3a;
  --muted: #5a6b7d;
  --accent: #1a6fdb;
  --accent-dark: #0f4fa8;
  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --line: #e3e9f0;
  --radius: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* 顶栏 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--navy); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px; background: var(--navy);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; letter-spacing: .5px;
}
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav-links a { color: var(--muted); padding: 6px 2px; border-bottom: 2px solid transparent; transition: all .2s; }
.nav-links a:hover { color: var(--navy); }
.nav-links a.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.nav-auth { display: flex; align-items: center; gap: 14px; }
.nav-auth .user-chip { font-size: 14px; color: var(--navy); font-weight: 600; }
.btn {
  display: inline-block; padding: 10px 22px; border-radius: 8px; font-size: 15px;
  font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: all .2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-outline:hover { background: rgba(26,111,219,.08); }
.btn-ghost { color: var(--muted); border-color: var(--line); }
.btn-sm { padding: 7px 16px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #0f2540 0%, #14385f 60%, #1a4d82 100%);
  color: #fff; padding: 96px 0 108px;
}
.hero h1 { font-size: 44px; line-height: 1.25; font-weight: 700; letter-spacing: 1px; }
.hero .sub { margin-top: 18px; font-size: 18px; color: rgba(255,255,255,.82); max-width: 640px; }
.hero .actions { margin-top: 34px; display: flex; gap: 16px; flex-wrap: wrap; }
.hero .btn-primary { background: #fff; color: var(--navy); }
.hero .btn-outline { border-color: rgba(255,255,255,.6); color: #fff; }

/* 数据条 */
.stats { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }
.stat { background: var(--bg-soft); text-align: center; padding: 28px 12px; }
.stat .num { font-size: 30px; font-weight: 800; color: var(--accent); }
.stat .label { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* 通用区块 */
.section { padding: 76px 0; }
.section.alt { background: var(--bg-soft); }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head .kicker { font-size: 13px; letter-spacing: 3px; color: var(--accent); font-weight: 700; text-transform: uppercase; }
.section-head h2 { font-size: 32px; color: var(--navy); margin-top: 8px; }
.section-head p { color: var(--muted); margin-top: 12px; }

/* 卡片 */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(15,37,64,.08); }
.card h3 { font-size: 18px; color: var(--navy); margin-bottom: 10px; }
.card p { font-size: 14.5px; color: var(--muted); }
.card .icon {
  width: 44px; height: 44px; border-radius: 10px; background: rgba(26,111,219,.1);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 16px;
}

/* 产品参数表 */
.spec-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec-table th, .spec-table td { padding: 14px 18px; text-align: left; font-size: 15px; border-bottom: 1px solid var(--line); }
.spec-table th { background: var(--bg-soft); color: var(--navy); width: 220px; font-weight: 600; }
.spec-table tr:last-child td { border-bottom: none; }

/* 步骤 */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; display: flex; gap: 18px; align-items: flex-start; }
.step .no { counter-increment: step; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step .no::before { content: counter(step); }
.step h3 { font-size: 16px; color: var(--navy); margin-bottom: 4px; }
.step p { font-size: 14px; color: var(--muted); }

/* 表单 */
.form-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; max-width: 720px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; font-family: inherit; color: var(--ink); background: #fff; transition: border .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.msg { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 18px; display: none; }
.msg.ok { display: block; background: #e8f7ee; color: #1a7a42; border: 1px solid #bfe8cf; }
.msg.err { display: block; background: #fdeeee; color: #b42323; border: 1px solid #f3c6c6; }
.msg.warn { display: block; background: #fff8e6; color: #8a6d1a; border: 1px solid #efdfab; }

/* 列表 */
.record-list { display: grid; gap: 14px; }
.record { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.record .top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.record .title { font-weight: 700; color: var(--navy); font-size: 16px; }
.record .time { font-size: 13px; color: var(--muted); }
.record .body { font-size: 14.5px; color: var(--muted); margin-top: 8px; white-space: pre-wrap; }
.record .meta { margin-top: 10px; font-size: 13px; color: var(--muted); }
.record .meta a { color: var(--accent); }
.tag { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 99px; background: rgba(26,111,219,.1); color: var(--accent); font-weight: 600; }

/* 页脚 */
.site-footer { background: var(--navy); color: rgba(255,255,255,.75); padding: 48px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-grid a, .footer-grid p { font-size: 14px; display: block; margin-bottom: 8px; color: rgba(255,255,255,.72); }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 32px; padding-top: 20px; font-size: 13px; text-align: center; color: rgba(255,255,255,.5); }
.footer-bottom .filings { margin-top: 8px; font-size: 13px; }
.footer-bottom .filings a { color: rgba(255,255,255,.65); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom .filings a:hover { color: #fff; }
.footer-bottom .filings .sep { color: rgba(255,255,255,.3); text-decoration: none; }

/* 实体定义条 + FAQ（AEO/GEO：便于 AI 抓取与引用） */
.entity-band { background: #fff; padding: 30px 0; border-bottom: 1px solid var(--line); }
.entity-band p { max-width: 940px; margin: 0 auto; text-align: center; color: var(--muted); font-size: 15.5px; line-height: 1.9; }
.entity-band strong { color: var(--navy); }
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.faq-item summary { cursor: pointer; font-weight: 700; color: var(--navy); font-size: 16px; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+"; color: var(--accent); margin-right: 10px; font-weight: 800; }
.faq-item[open] summary::before { content: "\2212"; }
.faq-a { margin-top: 10px; color: var(--muted); font-size: 14.5px; }
[dir="rtl"] .faq-item summary::before { margin-right: 0; margin-left: 10px; }

/* 需求表单（FormSubmit） */
.form-note { font-size: 13px; color: var(--muted); margin-top: 14px; text-align: center; }
.form-panel .btn { font-size: 16px; padding: 12px 30px; }
[dir="rtl"] .form-row { direction: rtl; }
[dir="rtl"] .spec-table,
[dir="rtl"] .form-panel { direction: rtl; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* CTA 条 */
.cta-band { background: linear-gradient(135deg, #1a6fdb, #0f4fa8); color: #fff; border-radius: var(--radius); padding: 44px 40px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta-band h2 { font-size: 26px; }
.cta-band p { opacity: .85; margin-top: 6px; }
.cta-band .btn { background: #fff; color: var(--accent-dark); }

/* Tabs (login) */
.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tabs button { flex: 1; padding: 12px; background: none; border: none; font-size: 15px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

@media (max-width: 900px) {
  .cards, .cards.three { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 32px; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .nav-links { gap: 14px; }
}
/* 实物图展示 */
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero-media img {
  width: 100%; border-radius: 16px; display: block;
  box-shadow: 0 24px 60px rgba(0,0,0,.35); transform: rotate(1.5deg);
}
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.gallery figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.gallery figure:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(15,37,64,.1); }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.gallery figcaption { padding: 12px 16px; font-size: 13.5px; color: var(--muted); text-align: center; }
.gallery figcaption strong { color: var(--navy); display: block; font-size: 15px; margin-bottom: 2px; }

/* 语言切换 */
.lang-switch { display: flex; align-items: center; gap: 3px; font-size: 13px; flex-wrap: wrap; }
.lang-switch a { padding: 4px 8px; border-radius: 6px; color: var(--muted); transition: all .2s; }
.lang-switch a:hover { background: var(--bg-soft); color: var(--navy); }
.lang-switch a.active { background: rgba(26,111,219,.1); color: var(--accent); font-weight: 700; }

/* RTL 适配（阿拉伯语） */
[dir="rtl"] body { text-align: right; }
[dir="rtl"] .section-head,
[dir="rtl"] .gallery figcaption,
[dir="rtl"] .stat,
[dir="rtl"] .cta-band .btn { text-align: center; }
[dir="rtl"] .spec-table th,
[dir="rtl"] .spec-table td { text-align: right; }
[dir="rtl"] .step { flex-direction: row-reverse; }
[dir="rtl"] .brand { flex-direction: row-reverse; }
[dir="rtl"] .hero-media img { transform: rotate(-1.5deg); }
[dir="rtl"] .gallery figcaption strong { direction: rtl; }
html[dir="rtl"] { direction: rtl; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 900px) {
  .lang-switch { width: 100%; justify-content: flex-end; padding-bottom: 6px; }
}

@media (max-width: 560px) {
  .cards, .cards.three { grid-template-columns: 1fr; }
  .nav { flex-wrap: wrap; height: auto; padding: 12px 0; }
}
