/* ============================================================
   WinsTown — site.css
   Token 全部对应 DESIGN.md；改样式先改 DESIGN.md 再改这里。
   反 AI 味：无紫渐变 / 无居中暗色 mesh hero / 无三等宽卡片堆叠
   ============================================================ */

:root {
  /* 颜色 —— 从品牌 LOGO 抽取 */
  --ink:        #0E1C1A;
  --ink-soft:   #3C4B48;
  --ink-muted:  #6B7A77;
  --brand:      #14776B;
  --brand-deep: #0B544B;
  --brand-tint: #E6F2EF;
  --accent:     #8FBF1E;
  --bg:         #FAFBF9;
  --bg-alt:     #F2F5F3;
  --surface:    #FFFFFF;
  --border:     #DFE6E3;
  --on-dark:    #F4F7F6;

  /* 字体 */
  --font-display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Work Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, monospace;

  /* 形制 —— 一致性锁 */
  --r-card: 14px;
  --r-btn:  10px;
  --r-pill: 999px;
  --r-input: 10px;

  /* 间距 */
  --section-y: clamp(4rem, 8vw, 7rem);
  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  /* 动效 */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur-fast: 160ms;
  --dur-base: 240ms;
  --dur-reveal: 520ms;

  /* 阴影 —— 带底色倾向，不用纯黑 */
  --shadow-sm: 0 1px 2px rgba(14, 28, 26, .05);
  --shadow-md: 0 6px 20px -8px rgba(11, 84, 75, .18);
  --shadow-lg: 0 20px 48px -20px rgba(11, 84, 75, .28);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-deep); }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); line-height: 1.06; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.4rem); line-height: 1.14; }
h3 { font-size: 1.25rem; line-height: 1.3; }
p  { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ---------- 布局 ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--brand-deep); color: var(--on-dark); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: rgba(244,247,246,.86); }
.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--ink-soft); font-size: 1.0625rem; margin-top: .6rem; }

/* eyebrow —— 配额：每 3 节最多 1 个 */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .7rem;
}
.section--dark .eyebrow { color: var(--accent); }

/* ---------- 跳过导航（无障碍） ---------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: .75rem 1.1rem; border-radius: 0 0 var(--r-btn) 0;
}
.skip:focus { left: 0; color: #fff; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,251,249,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar__in {
  display: flex; align-items: center; gap: 1.25rem;
  min-height: 68px; max-height: 72px;
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 34px; height: 34px; border-radius: 8px; background: var(--brand); display: grid; place-items: center; color: #fff; font-weight: 600; font-size: .95rem; overflow: hidden; }
.brand__mark img { width: 100%; height: 100%; object-fit: contain; }
.brand__sub { display: block; font-family: var(--font-body); font-size: .66rem; font-weight: 400; letter-spacing: .06em; color: var(--ink-muted); text-transform: uppercase; margin-top: -2px; }

/* 桌面：单行完整导航，禁止汉堡 */
.nav { margin-left: auto; display: flex; align-items: center; gap: 1.6rem; }
.nav a { color: var(--ink-soft); font-size: .94rem; font-weight: 500; padding: .35rem 0; border-bottom: 2px solid transparent; transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }
.nav__cta { margin-left: .4rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  padding: .7rem 1.35rem; border-radius: var(--r-btn);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.section--dark .btn--ghost { color: var(--on-dark); border-color: rgba(244,247,246,.34); }
.section--dark .btn--ghost:hover { background: rgba(255,255,255,.08); color: #fff; border-color: var(--accent); }
.btn:active { transform: scale(.97); }
.btn--sm { padding: .5rem 1rem; font-size: .875rem; }

/* 移动端汉堡（仅 <1024 显示） */
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border); border-radius: var(--r-btn); width: 42px; height: 42px; cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); margin: 4px auto; transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease); }

/* ---------- Hero（首屏内、非居中） ---------- */
.hero { padding-top: clamp(2.5rem, 5vw, 4.5rem); padding-bottom: var(--section-y); }
.hero__grid { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.hero__copy { max-width: 34rem; }
.hero h1 { margin-bottom: 1.1rem; }
.hero__lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-soft); margin-bottom: 1.75rem; max-width: 32rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero__media { border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-lg); }
.hero__media img { width: 100%; height: clamp(16rem, 42vw, 30rem); object-fit: cover; }

/* ---------- 通用网格 ---------- */
.grid { display: grid; gap: clamp(1.1rem, 2.2vw, 1.75rem); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: repeat(2, 1fr); }

/* ---------- 卡片（仅在层级需要时用） ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: clamp(1.25rem, 2.4vw, 1.85rem); display: flex; flex-direction: column;
  transition: border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
.card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--ink-soft); font-size: .96rem; margin-bottom: 1rem; }
.card__media { border-radius: calc(var(--r-card) - 4px); overflow: hidden; margin-bottom: 1.1rem; aspect-ratio: 4 / 3; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-reveal) var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__link { margin-top: auto; font-weight: 600; font-size: .92rem; display: inline-flex; align-items: center; gap: .4rem; }
.card__link::after { content: "\2192"; transition: transform var(--dur-fast) var(--ease); }
.card:hover .card__link::after { transform: translateX(4px); }

/* 品类卡（图片在上） */
.tile { position: relative; border-radius: var(--r-card); overflow: hidden; background: var(--ink); min-height: 15rem; display: flex; align-items: flex-end; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .78; transition: transform var(--dur-reveal) var(--ease), opacity var(--dur-base) var(--ease); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,84,75,0) 34%, rgba(11,84,75,.86) 100%); }
.tile__body { position: relative; z-index: 2; padding: 1.4rem; color: #fff; }
.tile__body h3 { color: #fff; margin-bottom: .3rem; }
.tile__body p { color: rgba(244,247,246,.82); font-size: .9rem; margin: 0; }
.tile:hover img { transform: scale(1.05); opacity: .9; }

/* ---------- 数字条 ---------- */
.stats { display: grid; gap: clamp(1rem, 3vw, 2rem); grid-template-columns: repeat(2, 1fr); }
.stat__num { font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 600; line-height: 1; letter-spacing: -.02em; color: var(--brand); }
.section--dark .stat__num { color: var(--accent); }
.stat__label { font-size: .86rem; color: var(--ink-muted); margin-top: .5rem; }
.section--dark .stat__label { color: rgba(244,247,246,.72); }

/* ---------- 列表 / 分隔（替代卡片堆叠） ---------- */
.deflist { border-top: 1px solid var(--border); }
.deflist > li { display: grid; gap: .3rem 2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--border); }
.deflist dt { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; }
.deflist dd { margin: 0; color: var(--ink-soft); font-size: .96rem; }

.checks { display: grid; gap: .7rem; }
.checks li { position: relative; padding-left: 1.7rem; color: var(--ink-soft); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: .85rem; height: .45rem;
  border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg);
}

/* ---------- 流程步进器（ODM 站 signature） ---------- */
.steps { display: grid; gap: 1.1rem; counter-reset: step; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 1rem 1.25rem; align-items: start; padding: 1.35rem 0; border-top: 1px solid var(--border); }
.step__n { font-family: var(--font-mono); font-size: .8rem; color: var(--brand); border: 1px solid var(--border); border-radius: var(--r-pill); width: 2.1rem; height: 2.1rem; display: grid; place-items: center; background: var(--surface); }
.step h3 { margin-bottom: .25rem; }
.step p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ---------- 表格（参数 / 认证） ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 34rem; }
caption { text-align: left; padding: 1rem 1.1rem .4rem; color: var(--ink-muted); font-size: .85rem; }
th, td { text-align: left; padding: .8rem 1.1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: var(--bg-alt); font-family: var(--font-display); font-weight: 600; font-size: .84rem; letter-spacing: .02em; color: var(--ink); }
tbody tr:last-child td { border-bottom: 0; }
td code, .mono { font-family: var(--font-mono); font-size: .85rem; }

/* 认证展示 —— 原件 + 持证主体（不出现无编号名称墙） */
.certs { display: grid; gap: clamp(1rem, 2.2vw, 1.6rem); grid-template-columns: 1fr; }
.cert { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.cert__img { background: var(--bg-alt); aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.cert__img img { width: 100%; height: 100%; object-fit: contain; }
.cert__body { padding: 1.1rem 1.25rem 1.3rem; }
.cert__body h3 { font-size: 1rem; margin-bottom: .35rem; }
.cert__holder { font-size: .82rem; color: var(--ink-muted); margin: 0 0 .5rem; }
.cert__meta { font-family: var(--font-mono); font-size: .76rem; color: var(--ink-soft); line-height: 1.6; }
.cert__note { font-size: .78rem; color: var(--ink-muted); margin-top: .55rem; border-top: 1px dashed var(--border); padding-top: .55rem; }

/* ---------- 表单 ---------- */
.form { display: grid; gap: 1.1rem; max-width: 34rem; }
.field { display: grid; gap: .45rem; }
.field label { font-weight: 600; font-size: .9rem; color: var(--ink); }
.field .hint { font-size: .8rem; color: var(--ink-muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .97rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-input); padding: .72rem .85rem; width: 100%;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: #9AA8A4; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.field textarea { min-height: 7rem; resize: vertical; }
.field[data-invalid="true"] input, .field[data-invalid="true"] textarea, .field[data-invalid="true"] select { border-color: #C0392B; }
.field .err { color: #C0392B; font-size: .82rem; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form__status { font-size: .9rem; color: var(--ink-soft); }
.form__status[data-state="ok"] { color: var(--brand); font-weight: 600; }
.form__status[data-state="err"] { color: #C0392B; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; padding: 1.15rem 0; font-family: var(--font-display); font-weight: 600; font-size: 1.04rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-weight: 400; font-size: 1.4rem; line-height: 1; transition: transform var(--dur-base) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq__body { padding: 0 0 1.3rem; color: var(--ink-soft); max-width: 66ch; }

/* ---------- 提示条 ---------- */
.notice {
  display: flex; gap: .8rem; align-items: flex-start;
  background: var(--brand-tint); border: 1px solid #CFE4DF; border-radius: var(--r-card);
  padding: 1rem 1.15rem; font-size: .92rem; color: var(--ink-soft);
}
.notice strong { color: var(--ink); }

/* ---------- CTA 条 ---------- */
.cta-band { text-align: left; }
.cta-band h2 { max-width: 22ch; margin-bottom: .8rem; }
.cta-band p { max-width: 46ch; margin-bottom: 1.6rem; }

/* ---------- 面包屑 ---------- */
.crumbs { font-size: .84rem; color: var(--ink-muted); padding-top: 1.6rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.crumbs a { color: var(--ink-muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--border); }

/* ---------- 页脚 ---------- */
.footer { background: var(--brand-deep); color: rgba(244,247,246,.82); padding-block: clamp(2.75rem, 5vw, 4rem) 1.75rem; }
.footer a { color: rgba(244,247,246,.82); }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; gap: 2rem 2.5rem; grid-template-columns: 1fr; }
.footer h4 { color: #fff; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1rem; font-family: var(--font-body); font-weight: 600; }
.footer li { margin-bottom: .55rem; font-size: .93rem; }
.footer__brand .brand { color: #fff; }
.footer__brand p { font-size: .9rem; max-width: 34ch; margin-top: .9rem; }
.footer__bottom { border-top: 1px solid rgba(244,247,246,.16); margin-top: 2.5rem; padding-top: 1.35rem; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; font-size: .83rem; color: rgba(244,247,246,.62); }

/* ---------- 滚动揭示（带无 JS 回退 + reduced-motion） ---------- */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-reveal) var(--ease), transform var(--dur-reveal) var(--ease); }
html.js .reveal.is-in { opacity: 1; transform: none; }
html.js .hero__copy > * { opacity: 0; transform: translateY(14px); animation: none; }
html.js.hero-ready .hero__copy > * { animation: rise var(--dur-reveal) var(--ease) forwards; }
html.js.hero-ready .hero__copy > *:nth-child(1) { animation-delay: .04s; }
html.js.hero-ready .hero__copy > *:nth-child(2) { animation-delay: .12s; }
html.js.hero-ready .hero__copy > *:nth-child(3) { animation-delay: .2s; }
html.js.hero-ready .hero__copy > *:nth-child(4) { animation-delay: .28s; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
  html.js .hero__copy > * { opacity: 1; transform: none; }
}

/* ---------- 响应式 ---------- */
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .certs { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1.6fr 1fr 1fr; }
  .deflist > li { grid-template-columns: 15rem 1fr; }
  .stats { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 960px) {
  .hero__grid { grid-template-columns: 1.05fr 1fr; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .certs { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); counter-reset: none; }
  .step { grid-template-columns: auto 1fr; border-top: none; border-left: 2px solid var(--brand-tint); padding: 0 0 0 1.25rem; }
}
@media (min-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .footer__grid { grid-template-columns: 1.8fr 1fr 1fr 1fr; }
}
@media (max-width: 1023px) {
  .nav { display: none; }
  .nav-toggle { display: block; }
  .nav.is-open {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: .5rem var(--gutter) 1.25rem; box-shadow: var(--shadow-md);
  }
  .nav.is-open a { padding: .85rem 0; border-bottom: 1px solid var(--border); }
  .nav.is-open .nav__cta { margin: .9rem 0 0; }
  .brand__sub { display: none; }
}
