/* 温州迅晟 · 官网样式
   原生 CSS，无框架无构建。设计取向：克制的排版、充足留白、明确的层级。 */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-sunk: #eef0f3;
  --fg: #16191d;
  --fg-muted: #5b636e;
  --fg-faint: #8b939e;
  --line: #e3e6ea;
  --brand: #16794a;
  --brand-fg: #ffffff;
  --brand-soft: #e8f4ee;
  --accent: #b8873a;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 8px 24px -8px rgb(16 24 40 / 10%);
  --maxw: 1140px;
  --pad: clamp(1rem, 4vw, 2rem);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --bg-soft: #161a20;
    --bg-sunk: #1d222a;
    --fg: #e9edf2;
    --fg-muted: #a3adba;
    --fg-faint: #79838f;
    --line: #262c35;
    --brand: #3fbc85;
    --brand-fg: #06130d;
    --brand-soft: #12261d;
    --accent: #d6a860;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px -8px rgb(0 0 0 / 60%);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.015em; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.125rem); font-weight: 650; }
h3 { font-size: 1.1875rem; font-weight: 620; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(3rem, 8vw, 5.5rem); }
.section--soft { background: var(--bg-soft); }

.eyebrow {
  font-size: .8125rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand); margin-bottom: .75rem;
}
.lead { font-size: clamp(1.0625rem, 2vw, 1.1875rem); color: var(--fg-muted); max-width: 62ch; }
.muted { color: var(--fg-muted); }

/* ── 跳过导航（可访问性） ───────────────────────────── */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: var(--brand-fg); padding: .75rem 1.25rem;
}
.skip:focus { left: 0; }

/* ── 顶栏 ─────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__bar {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 68px;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; flex: 0 0 auto; }
.brand img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.brand__name { font-weight: 680; font-size: 1rem; letter-spacing: -.01em; }
.brand__sub { font-size: .75rem; color: var(--fg-faint); letter-spacing: .02em; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: .5rem .85rem; border-radius: 8px;
  text-decoration: none; font-size: .9375rem; font-weight: 520; color: var(--fg-muted);
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--bg-sunk); color: var(--fg); }
.nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }

.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: .5rem .6rem; cursor: pointer; color: var(--fg);
}
.nav-toggle svg { display: block; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; inset: 100% 0 auto; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: .5rem var(--pad) 1rem; display: none;
  }
  .nav ul { flex-direction: column; gap: 0; width: 100%; }
  .nav a { padding: .75rem .5rem; font-size: 1rem; }
}

/* ── Hero ─────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; background: var(--bg-soft); }
.hero__grid {
  display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center;
  grid-template-columns: 1.05fr .95fr;
  padding-block: clamp(3rem, 8vw, 6rem);
}
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }

.hero h1 { margin-bottom: .5em; }
.hero__media {
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
  aspect-ratio: 4 / 3; background: var(--bg-sunk);
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.35rem; border-radius: var(--radius);
  font-size: .9375rem; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s, background .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: var(--brand-fg); }
.btn--primary:hover { background: color-mix(in srgb, var(--brand) 88%, black); }
.btn--ghost { border-color: var(--line); color: var(--fg); background: var(--bg); }
.btn--ghost:hover { background: var(--bg-sunk); }

/* ── 数据条 ───────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.stats > div { background: var(--bg); padding: 1.5rem 1.25rem; text-align: center; }
.stats__value { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; color: var(--brand); letter-spacing: -.02em; }
.stats__label { font-size: .875rem; color: var(--fg-muted); }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ── 卡片网格 ─────────────────────────────────────── */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
a.card { text-decoration: none; color: inherit; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.card__media { aspect-ratio: 4 / 3; background: var(--bg-sunk); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.25rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card__body h3 { margin: 0; }
.card__en { font-size: .8125rem; color: var(--fg-faint); }
.card__more { margin-top: auto; padding-top: .75rem; font-size: .875rem; font-weight: 600; color: var(--brand); }

.feature { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg); }
.feature__icon {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); margin-bottom: 1rem;
}

/* ── 产品详情 ─────────────────────────────────────── */
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } }
.detail__media { border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-sunk); box-shadow: var(--shadow); }

.spec { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .9375rem; }
.spec th, .spec td { text-align: left; padding: .7rem .25rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { width: 34%; font-weight: 600; color: var(--fg-muted); }

/* ── 面包屑 ───────────────────────────────────────── */
.crumbs { font-size: .875rem; color: var(--fg-faint); padding-block: 1.25rem; }
.crumbs a { text-decoration: none; color: var(--fg-muted); }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.crumbs span + span::before { content: "/"; margin: 0 .5rem; color: var(--line); }

/* ── 新闻 ─────────────────────────────────────────── */
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }
.post-list li { background: var(--bg); }
.post-list a { display: block; padding: 1.5rem; text-decoration: none; transition: background .15s; }
.post-list a:hover { background: var(--bg-soft); }
.post-list time { font-size: .8125rem; color: var(--fg-faint); }
.prose { max-width: 68ch; }
.prose p { color: var(--fg-muted); }

/* ── 表单 ─────────────────────────────────────────── */
.form { display: grid; gap: 1.1rem; max-width: 34rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .875rem; font-weight: 600; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: .9375rem; color: var(--fg);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .7rem .85rem; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: .9rem 1.1rem; border-radius: var(--radius); font-size: .9375rem; display: none; }
.notice--ok { background: var(--brand-soft); color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.notice--err { background: #fdecea; color: #b3261e; border: 1px solid #f5c6c2; }
@media (prefers-color-scheme: dark) {
  .notice--err { background: #2a1614; color: #f2b8b5; border-color: #5c2b26; }
}

/* ── CTA ──────────────────────────────────────────── */
.cta { background: var(--brand); color: var(--brand-fg); border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 3.5rem); text-align: center; }
.cta h2 { color: inherit; }
.cta p { color: color-mix(in srgb, var(--brand-fg) 82%, transparent); max-width: 52ch; margin-inline: auto; }
.cta .btn--ghost { background: var(--brand-fg); color: var(--brand); border-color: transparent; }
.cta .actions { justify-content: center; }

/* ── 页脚 ─────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding-block: 3rem 2rem; margin-top: 2rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 2rem; }
@media (max-width: 780px) { .footer__grid { grid-template-columns: 1fr; } }
.footer .footer__h { font-size: .8125rem; text-transform: uppercase; letter-spacing: .07em; color: var(--fg-faint); margin-bottom: .9rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .9375rem; }
.footer a { color: var(--fg-muted); text-decoration: none; }
.footer a:hover { color: var(--brand); text-decoration: underline; }
.footer__bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .875rem; color: var(--fg-faint); display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; }

.todo {
  background: repeating-linear-gradient(45deg, transparent, transparent 8px, color-mix(in srgb, var(--accent) 12%, transparent) 8px, color-mix(in srgb, var(--accent) 12%, transparent) 16px);
  border: 1px dashed var(--accent); color: var(--accent);
  border-radius: 6px; padding: .15em .5em; font-size: .9em; font-weight: 600;
}

/* ── 语言切换 ─────────────────────────────────────── */
/* 分段开关：一个浅色容器里两个片段，选中的那个"浮"起来。
   比带竖线分隔的文字链接紧凑，也不会在导航里换行。 */
.langs {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px; border-radius: 9px; background: var(--bg-sunk);
  flex: 0 0 auto;
}
.langs a {
  display: block; padding: .3rem .6rem; border-radius: 7px;
  font-size: .8125rem; font-weight: 600; line-height: 1.4;
  color: var(--fg-muted); text-decoration: none; white-space: nowrap;
  transition: color .15s, background .15s;
}
.langs a:hover { color: var(--fg); }
/* 选中态用品牌色，和导航的 aria-current 保持一致。
   不用"浅色容器 + 更暗的选中块"那套 iOS 写法——深色模式下会反过来，
   看着像没选中的那个才是选中的。 */
.langs a[aria-current="true"] { background: var(--brand-soft); color: var(--brand); }

@media (max-width: 820px) {
  /* 移动端菜单是竖排的，语言开关单独一行居左 */
  .nav { display: none; }
  .nav[data-open="true"] { display: block; }
  .langs { margin-top: .75rem; }
}

/* ── WhatsApp 按钮 ────────────────────────────────── */
.btn--wa { background: #25d366; color: #062512; }
.btn--wa:hover { background: #1fbb59; }
.feature .actions { margin-top: 1rem; margin-bottom: .5rem; }
