/* ===== Design Tokens ===== */
:root {
  --c-primary: #15325e;
  --c-primary-dark: #0e2244;
  --c-accent: #f0711f;
  --c-accent-dark: #d95e0e;
  --c-bg: #f7f5f0;
  --c-bg-alt: #ffffff;
  --c-text: #1f2937;
  --c-text-light: #5b6472;
  --c-line: #e6e2d8;
  --header-h: 84px;   /* 菜单栏高度（随断点联动） */
  --logo-h: 36px;     /* Logo 高度（缩小，更协调）*/
  --shadow-sm: 0 2px 10px rgba(21, 50, 94, .08);
  --shadow-md: 0 10px 30px rgba(21, 50, 94, .12);
  --radius: 14px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
  --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section:nth-of-type(even) { background: var(--c-bg-alt); }

/* ===== Section Head ===== */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.section-eyebrow {
  font-size: 13px; letter-spacing: 3px; font-weight: 700;
  color: var(--c-accent); text-transform: uppercase; margin-bottom: 10px;
}
.section-title { font-size: clamp(26px, 3.4vw, 38px); color: var(--c-primary); margin-bottom: 14px; }
.section-desc { color: var(--c-text-light); font-size: 16px; white-space: pre-line; }

/* ===== Buttons ===== */
.btn {
  display: inline-block; padding: 13px 30px; border-radius: 999px;
  font-size: 15px; font-weight: 600; border: 2px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary { background: var(--c-accent); color: #fff; }
.btn-primary:hover { background: var(--c-accent-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(240, 113, 31, .35); }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }

/* ===== Header ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(248, 240, 221, .95); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(180, 140, 60, .28);
  transition: box-shadow .3s ease;
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(180, 140, 30, .15); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 14px; color: #15325e; }
.brand-logo-img { height: var(--logo-h); width: auto; max-width: 130px; display: block; flex-shrink: 0; object-fit: contain; }
.brand-text strong { display: block; font-size: 15px; letter-spacing: .5px; line-height: 1.3; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-text small { display: block; font-size: 10.5px; color: #15325e; opacity: .7; letter-spacing: 1.5px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main-nav { display: flex; gap: 30px; }
.main-nav a {
  color: #15325e; font-size: 15px; position: relative; padding: 6px 0;
  transition: color .2s ease;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px;
  background: var(--c-accent); transition: width .25s ease;
}
.main-nav a:hover { color: var(--c-accent); }
.main-nav a:hover::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch {
  background: transparent; color: #15325e; border: 1.5px solid #15325e;
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: 1px;
  transition: background .2s ease, color .2s ease;
}
.lang-switch:hover { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: #15325e; border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero (轮播图背景) ===== */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: #0e2244;
  padding: 160px 0 96px;
}
.hero-slideshow { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-slideshow .slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  opacity: 0; transition: opacity 1.2s ease;
  will-change: opacity;
}
.hero-slideshow .slide.active { opacity: 1; z-index: 1; }
.hero-slideshow .s1 { background-image: url(/banner-1.jpg); }
.hero-slideshow .s2 { background-image: url(/banner-2.jpg); }
.hero-slideshow .s3 { background-image: url(/banner-3.jpg); }
.hero-slideshow .s4 { background-image: url(/banner-4.jpg); }
.hero-slideshow .s5 { background-image: url(/banner-5.jpg); }
.hero-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 3; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.18); color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .25s ease, transform .25s ease, border-color .25s ease;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero-nav:hover { background: rgba(255,255,255,0.32); border-color: rgba(255,255,255,0.7); transform: translateY(-50%) scale(1.08); }
.hero-nav:active { transform: translateY(-50%) scale(0.96); }
.hero-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hero-prev { left: 24px; }
.hero-next { right: 24px; }
@media (max-width: 640px) {
  .hero-nav { width: 40px; height: 40px; }
  .hero-prev { left: 12px; } .hero-next { right: 12px; }
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(135deg, rgba(14,34,68,.4), rgba(21,50,94,.28));
}
.hero-inner { position: relative; z-index: 2; max-width: 680px; }
.hero-tag {
  display: inline-block; font-size: 12px; letter-spacing: 4px; font-weight: 700;
  color: var(--c-accent); border: 1px solid rgba(240,113,31,.5); border-radius: 999px;
  padding: 6px 16px; margin-bottom: 22px; text-transform: uppercase;
}
.hero-title { font-size: clamp(30px, 5vw, 52px); line-height: 1.22; margin-bottom: 20px; font-weight: 800; }
.hero-title em { font-style: normal; color: var(--c-accent); }
.hero-sub { font-size: 17px; color: rgba(255,255,255,.82); margin-bottom: 34px; max-width: 560px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  padding-top: 30px; border-top: 1px solid rgba(255,255,255,.15);
}
.hero-stats strong { display: block; font-size: 26px; color: #fff; }
.hero-stats span { font-size: 13px; color: rgba(255,255,255,.65); }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
.about-text p { margin-bottom: 16px; color: var(--c-text-light); }
.about-list { margin: 22px 0 30px; }
.about-list li { position: relative; padding-left: 26px; margin-bottom: 12px; color: var(--c-text); }
.about-list li::before {
  content: "✓"; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--c-accent); color: #fff; font-size: 11px;
  display: grid; place-items: center; line-height: 1;
}
.about-img-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.about-img-card {
  position: relative; min-height: 190px; border-radius: var(--radius);
  background-size: cover !important; background-repeat: no-repeat !important;
  background-position: center; overflow: hidden;
  padding: 24px 22px; display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.about-img-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 25%, rgba(220,220,220,.55) 60%, rgba(200,200,200,.72) 100%);
}
.about-img-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.about-img-card h3 { position: relative; color: #fff; font-size: 17px; font-weight: 700; margin-bottom: 6px; text-shadow: 0 2px 8px rgba(0,0,0,.55); word-wrap: break-word; line-height: 1.35; }
.about-img-card p { position: relative; color: rgba(255,255,255,.95); font-size: 12.5px; line-height: 1.55; text-shadow: 0 1px 4px rgba(0,0,0,.55); word-wrap: break-word; }

/* ===== Products ===== */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-card {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 30px 26px 26px; text-align: center; box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.product-img {
  width: 100%; aspect-ratio: 1 / 1; margin: 0 auto 18px; border-radius: 12px;
  background: #ffffff; display: flex; align-items: center; justify-content: center;
  overflow: hidden; border: 1px solid var(--c-line);
  transition: transform .3s ease;
}
.product-card:hover .product-img { transform: scale(1.02); }
.product-img img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
.product-card h3 { font-size: 18px; color: var(--c-primary); margin-bottom: 8px; }
.product-card p { font-size: 14px; color: var(--c-text-light); margin-bottom: 14px; min-height: 48px; }
.product-tag {
  display: inline-block; font-size: 12px; color: var(--c-accent-dark);
  background: rgba(240,113,31,.1); border: 1px solid rgba(240,113,31,.25);
  padding: 4px 14px; border-radius: 999px;
}
.products-more { text-align: center; margin-top: 34px; color: var(--c-text-light); font-size: 14px; }

/* ===== Advantages ===== */
.advantages { background: var(--c-primary); }
.advantages .section-eyebrow { color: var(--c-accent); }
.advantages .section-title { color: #fff; }
.advantages .section-desc { color: rgba(255,255,255,.7); }
.adv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.adv-item {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 28px 24px;
  transition: background .25s ease, transform .25s ease;
}
.adv-item:hover { background: rgba(255,255,255,.1); transform: translateY(-4px); }
.adv-num { font-size: 34px; font-weight: 800; color: var(--c-accent); opacity: .9; margin-bottom: 14px; line-height: 1; }
.adv-item h3 { color: #fff; font-size: 17px; margin-bottom: 10px; }
.adv-item p { color: rgba(255,255,255,.72); font-size: 14px; }

/* ===== Process ===== */
.process-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; position: relative; }
.process-steps::before {
  content: ""; position: absolute; top: 26px; left: 8%; right: 8%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--c-accent) 0 8px, transparent 8px 16px);
  opacity: .4;
}
.step { text-align: center; position: relative; padding-top: 8px; }
.step-dot {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--c-accent); color: #fff; font-size: 19px; font-weight: 700;
  display: grid; place-items: center; position: relative; z-index: 1;
  box-shadow: 0 6px 16px rgba(240,113,31,.35);
}
.step h3 { font-size: 15px; color: var(--c-primary); margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--c-text-light); }

/* ===== Support ===== */
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.support-item {
  text-align: center; background: #fff; border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 36px 26px; box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.support-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.support-icon {
  width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%;
  background: linear-gradient(145deg, var(--c-primary), #1f4a86);
  display: grid; place-items: center;
}
.support-item h3 { font-size: 17px; color: var(--c-primary); margin-bottom: 8px; }
.support-item p { font-size: 14px; color: var(--c-text-light); }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: stretch; }
.contact-info { display: flex; flex-direction: column; }
.info-item { padding: 6px 0; border-bottom: 1px solid var(--c-line); flex: 1; display: flex; flex-direction: column; justify-content: center; }
.info-item:first-child { padding-top: 0; }
.info-item:last-child { border-bottom: none; padding-bottom: 0; }
.info-item h4 { font-size: 16px; color: var(--c-primary); margin-bottom: 4px; line-height: 1.4; }
.info-item:first-child h4 { font-size: 16px; font-weight: 700; }
.info-item p { color: var(--c-text-light); font-size: 16px; }
.contact-form {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow-sm);
  position: relative;
}
/* 网络/接口失败横幅 */
.form-banner {
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px;
}
.form-banner.show { display: flex; }                     /* JS 加 .show 类才显示 */
.form-banner button {
  background: #b91c1c; color: #fff; border: 0; padding: 6px 14px;
  border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 600;
}
.form-banner button:hover { background: #991b1b; }
/* 2列网格（桌面） */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.form-field { display: flex; flex-direction: column; }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: 14px; font-weight: 600; color: var(--c-primary); margin-bottom: 8px; }
.form-row input, .form-row textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--c-line);
  border-radius: 10px; font-size: 15px; color: var(--c-text); background: var(--c-bg);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.form-row textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.form-row input:focus, .form-row textarea:focus {
  outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(240,113,31,.15); background: #fff;
}
/* 字段错误态 */
.form-field.invalid input, .form-field.invalid textarea {
  border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.12); background: #fff;
}
.form-error {
  display: none; margin-top: 6px; font-size: 12.5px; color: #dc2626;
}
.form-field.invalid .form-error { display: block; }
/* 关键修复：CSS display:flex 会覆盖 HTML hidden 属性，导致成功卡/横幅永远显示 */
.form-banner[hidden], .form-success[hidden] { display: none !important; }
/* 操作按钮 */
.form-actions { margin-top: 6px; display: flex; }
.btn-submit {
  width: 100%;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 4px 12px rgba(240,113,31,.25);
}
.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 18px rgba(240,113,31,.35);
}
.btn-submit:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 6px rgba(240,113,31,.2);
}
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }
/* 隐私声明 */
.form-privacy { margin-top: 16px; font-size: 12.5px; color: var(--c-text-light); text-align: center; }
/* 成功卡片 */
.form-success {
  display: none;                                       /* 默认隐藏（修复一直显示 bug）*/
  position: absolute; inset: 24px; background: #fff; border-radius: var(--radius);
  flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 32px; animation: successIn .45s ease;
  box-shadow: var(--shadow-sm);
}
.form-success.show { display: flex; }                    /* JS 加 .show 类才显示 */
.form-success h3 { color: var(--c-primary); font-size: 22px; margin: 14px 0 10px; }
.form-success p { color: var(--c-text-light); font-size: 15px; max-width: 360px; line-height: 1.6; }
@keyframes successIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; gap: 18px; }
  .contact-form { padding: 24px 20px; }
}

/* ===== Footer ===== */
.site-footer { background: var(--c-primary-dark); color: rgba(255,255,255,.8); padding: 46px 0 30px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
.footer-brand strong { font-size: 17px; color: #fff; display: block; margin-bottom: 6px; }
.footer-brand p { font-size: 13px; color: rgba(255,255,255,.6); }
.footer-links { display: flex; gap: 26px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,.75); transition: color .2s ease; }
.footer-links a:hover { color: var(--c-accent); }
.footer-copy { grid-column: 1 / -1; text-align: center; font-size: 12.5px; color: rgba(255,255,255,.45); padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); margin-top: 10px; }

/* ===== Scroll Reveal ===== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sock { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .adv-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(3, 1fr); gap: 30px; }
  .process-steps::before { display: none; }
  .hero { padding: 140px 0 76px; }
}
@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column;
    background: #f8f0dd; padding: 20px 24px; gap: 6px;
    transform: translateY(-120%); transition: transform .3s ease;
    box-shadow: 0 10px 30px rgba(180,140,30,.18);
  }
  .main-nav.open { transform: none; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid rgba(180,140,60,.3); font-size: 16px; }
  .nav-toggle { display: flex; }
  .hero { padding: 120px 0 64px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .sock-1 { right: -4%; top: 8%; opacity: .5; }
  .sock-2 { right: -8%; bottom: 30%; opacity: .4; }
  .sock-3 { display: none; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-img-grid { grid-template-columns: 1fr 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .support-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; gap: 16px; }
}
@media (max-width: 480px) {
  .about-img-grid { grid-template-columns: 1fr; }
  .adv-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
}

/* ===== Logo 自适应菜单栏（断点联动）===== */
@media (max-width: 1024px) {
  :root { --header-h: 76px; --logo-h: 32px; }
}
@media (max-width: 768px) {
  :root { --header-h: 68px; --logo-h: 28px; }
}
@media (max-width: 480px) {
  :root { --header-h: 64px; --logo-h: 26px; }
}
