/* 昌和洋官网 · 站点样式 */
:root {
  --brand: #1b3a5c;
  --brand-strong: #14283c;
  --brand-soft: #eef3f9;
  --accent: #b8894a;
  --ink: #18202a;
  --ink-soft: #55616f;
  --line: #e3e8ee;
  --bg: #ffffff;
  --bg-alt: #f7f9fb;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(18, 34, 54, 0.08);
  --container: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

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

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  margin: 0 0 0.6em;
  line-height: 1.35;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.6rem, 4.2vw, 2.4rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
}

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

/* ---------- 跳过链接 ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 16px;
  background: var(--brand);
  color: #fff;
  z-index: 200;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #2c5480);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.brand-text small {
  font-size: 0.7rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-block;
  padding: 10px 12px;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.94rem;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand-strong);
  text-decoration: none;
}

.nav-parent::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.submenu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 190px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

.nav-item:hover .submenu,
.nav-item:focus-within .submenu,
.nav-item.open .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu-link {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.92rem;
}

.submenu-link:hover,
.submenu-link[aria-current="page"] {
  background: var(--bg-alt);
  color: var(--brand-strong);
  text-decoration: none;
}

.nav-download {
  margin-left: 6px;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-strong);
}

.btn-ghost {
  background: #fff;
  color: var(--brand-strong);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--brand);
}

.btn-outline {
  padding: 9px 16px;
  font-size: 0.9rem;
  background: transparent;
  color: var(--brand-strong);
  border-color: var(--brand);
}

.btn-outline:hover {
  background: var(--brand);
  color: #fff;
}

.btn-block {
  width: 100%;
}

/* ---------- 首屏 ---------- */
.hero {
  padding: clamp(32px, 6vw, 64px) 0 clamp(28px, 5vw, 52px);
  background: transparent;
  border-bottom: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.breadcrumb a {
  color: var(--ink-soft);
}

.breadcrumb span[aria-hidden] {
  color: #b6c2bb;
}

.lede {
  max-width: 46em;
  font-size: clamp(0.98rem, 1.6vw, 1.08rem);
  color: var(--ink-soft);
}

.lede-paragraphs p {
  margin-bottom: 0.85em;
}

.lede-paragraphs p:last-child {
  margin-bottom: 0;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
}

.hero-tags li {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.84rem;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-404 {
  text-align: center;
}

.hero-404 .lede {
  margin-left: auto;
  margin-right: auto;
}

.hero-404 .hero-actions {
  justify-content: center;
}

.error-code {
  margin: 0;
  font-size: clamp(3.2rem, 12vw, 6rem);
  font-weight: 800;
  line-height: 1;
  color: var(--brand-soft);
  letter-spacing: 0.04em;
}

/* ---------- 通用区块 ---------- */
.section {
  padding: clamp(36px, 6vw, 64px) 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-body {
  max-width: 46em;
  color: var(--ink-soft);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.card {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card h3 {
  margin-bottom: 8px;
  color: var(--brand-strong);
}

.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.bullet-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  max-width: 52em;
}

.bullet-list li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-soft);
}

.bullet-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.link-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.link-card:hover {
  text-decoration: none;
  box-shadow: var(--shadow);
}

.link-card-title {
  font-weight: 700;
  color: var(--brand-strong);
}

.link-card-desc {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* ---------- 题词 ---------- */
.creed-section {
  padding: clamp(30px, 5vw, 50px) 0;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}

.creed-inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.creed-label {
  margin: 0 0 14px;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.creed {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 3.6vw, 1.95rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.2em;
  color: var(--brand-strong);
}

.creed-line + .creed-line::before {
  content: "，";
  color: var(--accent);
}

.creed-note {
  max-width: 42em;
  margin: 0 auto;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.creed-pairs {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 28px;
  row-gap: 16px;
  align-items: baseline;
  width: fit-content;
  max-width: 100%;
  margin: 26px auto 0;
  text-align: left;
}

.creed-pairs strong {
  font-size: clamp(1.12rem, 2.6vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--brand-strong);
  white-space: nowrap;
  text-align: right;
}

.creed-pairs span {
  padding-left: 22px;
  border-left: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--ink-soft);
  text-align: left;
}

@media (max-width: 640px) {
  .creed {
    letter-spacing: 0.12em;
  }

  .creed-pairs {
    grid-template-columns: 1fr;
    width: auto;
    column-gap: 0;
    row-gap: 6px;
  }

  .creed-pairs strong {
    margin-top: 14px;
  }

  .creed-pairs span {
    padding-left: 0;
    border-left: 0;
  }
}

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.faq-item {
  padding: 4px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.faq-item summary {
  padding: 14px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 28px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand);
  font-size: 1.3rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

/* ---------- CTA ---------- */
.cta-band {
  padding: clamp(32px, 5vw, 52px) 0;
  background: var(--brand);
  color: #fff;
}

.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cta-band h2 {
  margin-bottom: 6px;
  color: #fff;
}

.cta-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta-band .btn-primary {
  background: #fff;
  color: var(--brand-strong);
}

.cta-band .btn-primary:hover {
  background: var(--brand-soft);
}

.cta-band .btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.cta-band .btn-ghost:hover {
  border-color: #fff;
}

/* ---------- 联系页 ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 40px;
  align-items: stretch;
}

.contact-info {
  display: flex;
  flex-direction: column;
}

.info-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.info-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.info-list li {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px dashed var(--line);
}

.info-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.info-label {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.contact-note {
  margin: auto 0 0;
  padding-top: 18px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  border-top: 1px dashed var(--line);
}

.contact-form {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field-label {
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.field-label em {
  color: #c0392b;
  font-style: normal;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(27, 58, 92, 0.25);
  border-color: var(--brand);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-tip {
  min-height: 1.4em;
  margin: 0;
  font-size: 0.88rem;
}

/* 蜜罐字段：视觉隐藏但可被自动化脚本填写 */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ===== 侧边悬浮咨询入口 ===== */
.lead-fab {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 60;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(18, 34, 54, 0.24);
}

.lead-fab:hover {
  background: var(--brand-strong);
}

.lead-fab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== 留资弹层 ===== */
body.modal-open {
  overflow: hidden;
}

.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lead-modal[hidden] {
  display: none;
}

.lead-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 26, 38, 0.55);
}

.lead-modal-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 20px 48px rgba(18, 34, 54, 0.28);
}

.lead-modal-panel h2 {
  margin: 0 0 6px;
  font-size: 1.3rem;
}

.lead-modal-sub {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.lead-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.lead-modal-close:hover {
  background: var(--bg-alt);
  color: var(--ink);
}

@media (max-width: 640px) {
  .lead-fab {
    right: 14px;
    bottom: 16px;
    padding: 11px 15px;
    font-size: 0.88rem;
  }

  .lead-modal-panel {
    padding: 22px 18px;
  }
}

.form-tip.error {
  color: #c0392b;
}

.form-tip.success {
  color: var(--brand);
}

/* ---------- 页脚 ---------- */
.site-footer {
  padding: 44px 0 20px;
  background: #0f1a26;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.4fr;
  gap: 28px;
}

.footer-brand .brand-mark {
  width: 34px;
  height: 34px;
  font-size: 1rem;
}

.footer-name {
  margin: 12px 0 4px;
  color: #fff;
  font-weight: 600;
}

.footer-slogan {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.footer-col h2 {
  margin-bottom: 12px;
  font-size: 0.92rem;
  color: #fff;
  font-weight: 600;
}

.footer-col ul {
  display: grid;
  gap: 8px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.72);
}

.footer-col a:hover {
  color: #fff;
}

.footer-contact li {
  line-height: 1.6;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

.footer-bottom p {
  margin: 0;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-meta a {
  color: rgba(255, 255, 255, 0.55);
}

.footer-meta a:hover {
  color: #fff;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 18px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(16, 40, 28, 0.08);
    display: none;
  }

  .nav.open {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 10px;
  }

  .submenu {
    position: static;
    min-width: 0;
    padding: 0 0 6px 14px;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }

  .nav-item.open .submenu {
    display: block;
  }

  .nav-item:hover .submenu,
  .nav-item:focus-within .submenu {
    display: none;
  }

  .nav-item.open:hover .submenu,
  .nav-item.open:focus-within .submenu {
    display: block;
  }

  .nav-parent::after {
    float: right;
    margin-top: 6px;
  }

  .nav-download {
    margin: 10px 10px 0;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .header-inner {
    min-height: 60px;
  }

  .brand-text small {
    display: none;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .info-list li {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .cta-inner {
    align-items: flex-start;
  }
}

@media (max-width: 400px) {
  .container {
    padding: 0 16px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 站内公告 ---------- */
.site-notice {
  background: #fdf3e7;
  border-bottom: 1px solid #f1dfc6;
  color: #7a5320;
  font-size: 0.86rem;
}

.site-notice .container {
  padding-top: 8px;
  padding-bottom: 8px;
}

.site-notice[hidden] {
  display: none;
}

/* ---------- 企业微信 ---------- */
.wecom-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-alt);
}

.wecom-card[hidden] {
  display: none;
}

.wecom-card img {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.wecom-text strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
  color: var(--brand-strong);
}

.wecom-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
