/* ==========================================================================
   UXTIME DESIGN — 现代化设计系统 (零构建 · 纯静态)
   保留绿色品牌感，克制现代化：设计令牌 + 响应式布局 + 克制动效
   ========================================================================== */

/* ---------- 设计令牌 ---------- */
:root {
  /* 品牌色：延续原绿色基调，做克制的现代化提纯 */
  --brand:        #1f7a3d;   /* 主品牌绿 */
  --brand-strong: #00592e;   /* 深绿（hover / 强调） */
  --brand-soft:   #6ab257;   /* 浅绿（原 accent） */
  --brand-tint:   #eef6ef;   /* 极浅绿背景 */

  /* 中性色阶 */
  --ink:    #1a1c1a;
  --ink-2:  #43474a;
  --muted:  #8b9089;
  --line:   #e8e9e6;
  --bg:     #ffffff;
  --bg-2:   #fafbf9;

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", system-ui,
               "Helvetica Neue", Arial, sans-serif;
  --font-en: "Helvetica Neue", Arial, var(--font-sans);

  /* 流式字号 */
  --fs-display: clamp(2.2rem, 1.4rem + 3.4vw, 4rem);
  --fs-h1:      clamp(1.8rem, 1.3rem + 2.2vw, 2.8rem);
  --fs-h2:      clamp(1.4rem, 1.1rem + 1.3vw, 2rem);
  --fs-h3:      clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  --fs-body:    1rem;
  --fs-sm:      0.875rem;
  --fs-xs:      0.78rem;

  /* 间距 / 圆角 / 阴影 / 过渡 */
  --space:   clamp(3rem, 2rem + 4vw, 6rem);   /* 段落级垂直留白 */
  --gutter:  clamp(1.2rem, 0.6rem + 2vw, 2rem);
  --maxw:    1120px;
  --maxw-narrow: 760px;
  --radius:  14px;
  --radius-sm: 8px;
  --shadow:    0 1px 2px rgba(20,30,20,.04), 0 8px 24px rgba(20,40,25,.06);
  --shadow-lg: 0 6px 16px rgba(20,30,20,.08), 0 18px 50px rgba(20,40,25,.12);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --t: 0.35s var(--ease);
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; border: 0; }
picture { display: contents; }   /* WebP <picture> 包裹层不参与布局，沿用 img 的样式 */
a { color: var(--brand); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--brand-strong); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; font-weight: 700; margin: 0 0 .6em; letter-spacing: -0.01em; }
p { margin: 0 0 1.1em; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 3px; }

/* ---------- 布局容器 ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: var(--maxw-narrow); }
main { display: block; }
.section { padding-block: var(--space); }
.section--tint { background: var(--bg-2); }

/* 区块标题：延续原"荣誉/能力"标签 + 细线，做现代化 */
.section-head { margin-bottom: clamp(1.6rem, 1rem + 2vw, 2.6rem); }
.section-head .eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: .7rem;
}
.section-head h2 { font-size: var(--fs-h2); margin: 0; }
.section-head .lead { color: var(--muted); margin: .6rem 0 0; max-width: 52ch; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ==========================================================================
   页头导航 (由 js/components.js 注入)
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin-inline: auto; padding: 0 var(--gutter);
  height: 66px; display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: baseline; gap: .12em; font-family: var(--font-en); font-weight: 800; font-size: 1.32rem; letter-spacing: .02em; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand .dot { color: var(--brand); }
.brand .brand-sub { font-family: var(--font-sans); font-size: .62rem; letter-spacing: .35em; color: var(--muted); font-weight: 600; margin-left: .55em; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: clamp(1.1rem, .4rem + 1.8vw, 2.4rem); }
.nav-links a {
  position: relative; color: var(--ink-2); font-weight: 600; font-size: var(--fs-sm);
  padding: .35em 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
  background: var(--brand); transition: right var(--t);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { right: 0; }
.nav-links a[aria-current="page"] { color: var(--brand-strong); }

.nav-toggle {
  display: none; width: 42px; height: 42px; border: 0; background: transparent;
  cursor: pointer; align-items: center; justify-content: center; color: var(--ink);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform var(--t), opacity var(--t);
}
.nav-toggle span::before { position: absolute; transform: translateY(-7px); }
.nav-toggle span::after  { position: absolute; transform: translateY(7px); }
.nav-toggle span { position: relative; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: rotate(45deg); }
.nav-open .nav-toggle span::after  { transform: rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1rem;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity var(--t), transform var(--t);
  }
  .nav-open .nav-links { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { width: 100%; padding: .75rem 0; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .nav-links a::after { display: none; }
}

/* ==========================================================================
   首页 Hero / 轮播
   ========================================================================== */
.hero { padding-block: clamp(2.4rem, 1.5rem + 3vw, 4rem) 0; }
.hero-tagline { text-align: center; margin-bottom: clamp(1.8rem, 1rem + 3vw, 3rem); }
.hero-tagline h1 { font-family: var(--font-en); font-size: var(--fs-display); letter-spacing: -0.02em; margin: 0 0 .3em; }
.hero-tagline p { color: var(--muted); font-size: clamp(1rem, .9rem + .4vw, 1.15rem); margin: 0; }

.slider { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.slider-track { position: relative; }
.slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .7s var(--ease);
  display: block;
}
.slide:first-child { position: relative; }
.slide.is-active { opacity: 1; z-index: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slider-track { aspect-ratio: 882 / 351; }

.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.85); color: var(--ink); font-size: 1.1rem;
  display: grid; place-items: center; box-shadow: var(--shadow);
  opacity: 0; transition: opacity var(--t), background var(--t);
}
.slider:hover .slider-btn { opacity: 1; }
.slider-btn:hover { background: #fff; }
.slider-btn.prev { left: 14px; }
.slider-btn.next { right: 14px; }
.slider-dots { position: absolute; bottom: 14px; left: 0; right: 0; z-index: 3; display: flex; gap: 8px; justify-content: center; }
.slider-dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.55); transition: background var(--t), width var(--t);
}
.slider-dots button.is-active { background: #fff; width: 22px; border-radius: 5px; }

/* ==========================================================================
   案例 / 作品宫格
   ========================================================================== */
.card-grid { display: grid; gap: clamp(1.4rem, .8rem + 2vw, 2.4rem); grid-template-columns: repeat(3, 1fr); }
@media (max-width: 880px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .card-grid { grid-template-columns: 1fr; } }

.card { display: flex; flex-direction: column; }
.card-media {
  display: block; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-2);
  aspect-ratio: 290 / 114;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.05); }
.card-tag { margin-top: 1rem; font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--brand); font-weight: 700; }
.card h3 { font-size: var(--fs-h3); margin: .35rem 0 .4rem; }
.card h3 a { color: var(--ink); }
.card:hover h3 a { color: var(--brand-strong); }
.card p { color: var(--muted); font-size: var(--fs-sm); margin: 0; }

/* ==========================================================================
   服务 / 能力卡片（图 + 标题 + 描述 + 列表）
   ========================================================================== */
.feature-grid { display: grid; gap: clamp(1.4rem, .8rem + 2vw, 2.2rem); grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .feature-grid { grid-template-columns: 1fr; } }

.feature {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 0 1.4rem; overflow: hidden; transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.feature:hover { transform: translateY(-4px); border-color: var(--brand-soft); }
.feature img { width: 100%; aspect-ratio: 216 / 114; object-fit: cover; }
.feature-body { padding: 1.2rem 1.3rem 0; }
.feature h3 { font-size: var(--fs-h3); margin: 0 0 .5rem; }
.feature-desc { color: var(--ink-2); font-size: var(--fs-sm); margin: 0 0 1rem; }
.feature-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.feature-list li {
  font-size: var(--fs-xs); color: var(--brand-strong); background: var(--brand-tint);
  padding: .28em .7em; border-radius: 999px; line-height: 1.4;
}

/* ==========================================================================
   信息栏（荣誉 / 客户 / 联系）
   ========================================================================== */
.info-grid { display: grid; gap: clamp(1.6rem, 1rem + 2vw, 3rem); grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 820px) { .info-grid { grid-template-columns: 1fr; } }
.info-col h3 { font-size: var(--fs-h3); padding-bottom: .7rem; border-bottom: 2px solid var(--brand); display: inline-block; margin-bottom: 1rem; }
.info-col ul li { padding: .32rem 0; color: var(--ink-2); font-size: var(--fs-sm); border-bottom: 1px solid var(--line); }
.info-col ul li:last-child { border-bottom: 0; }
.info-col.clients li { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }

/* ==========================================================================
   案例详情 / 文章排版
   ========================================================================== */
.article-head { text-align: center; padding-block: clamp(1.5rem, 1rem + 2vw, 2.5rem) 0; }
.article-head .eyebrow { color: var(--brand); font-size: var(--fs-xs); letter-spacing: .22em; text-transform: uppercase; font-weight: 700; }
.article-head h1 { font-size: var(--fs-h1); margin: .6rem 0 0; }
.article-date { color: var(--muted); font-size: var(--fs-sm); letter-spacing: .03em; margin: .7rem 0 0; }
.article-body { font-size: 1.02rem; line-height: 1.9; color: var(--ink-2); }
.article-body p { margin: 0 0 1.4em; }
.article-figures { display: flex; flex-direction: column; gap: clamp(1rem, .5rem + 2vw, 2rem); margin-top: clamp(1.6rem, 1rem + 2vw, 2.6rem); }
.article-figures img { width: 100%; border-radius: var(--radius-sm); }

/* ==========================================================================
   子导航（精选作品 / 最新案例 等 → 现代 pill tabs）
   ========================================================================== */
.subnav { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1.4rem; }
.subnav a {
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2);
  padding: .45em 1.1em; border-radius: 999px; border: 1px solid var(--line); transition: all var(--t);
}
.subnav a:hover { border-color: var(--brand); color: var(--brand-strong); }
.subnav a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ==========================================================================
   表单（联系页 we_connect 使用）
   ========================================================================== */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7em .9em;
  transition: border-color var(--t), box-shadow var(--t);
}
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.field textarea { min-height: 140px; resize: vertical; }

.btn {
  display: inline-flex; align-items: center; gap: .5em; justify-content: center;
  font: inherit; font-weight: 700; cursor: pointer;
  background: var(--brand); color: #fff; border: 0; border-radius: 999px;
  padding: .7em 1.6em; transition: transform var(--t), background var(--t), box-shadow var(--t);
}
.btn:hover { background: var(--brand-strong); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; color: var(--brand-strong); border: 1px solid var(--brand); }
.btn--ghost:hover, .btn--ghost:active, .btn--ghost:focus { background: var(--brand-tint); color: var(--brand-strong); }

/* ==========================================================================
   招贤 / 职位列表（we_job）
   ========================================================================== */
.job-list { display: grid; gap: clamp(1.2rem, .8rem + 1.5vw, 1.8rem); grid-template-columns: 1fr 1fr; }
@media (max-width: 720px) { .job-list { grid-template-columns: 1fr; } }
.job-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.3rem, 1rem + 1vw, 1.9rem); transition: box-shadow var(--t), border-color var(--t);
}
.job-card:hover { border-color: var(--brand-soft); }
.job-title { height: 18px; width: auto; margin-bottom: .8rem; }
.job-meta { color: var(--brand-strong); font-weight: 700; font-size: var(--fs-sm); margin: 0 0 1rem; }
.job-card h3 { font-size: var(--fs-sm); letter-spacing: .04em; color: var(--ink); margin: 1.1rem 0 .5rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
.job-ul { display: grid; gap: .35rem; }
.job-ul li { position: relative; padding-left: 1.1em; color: var(--ink-2); font-size: var(--fs-sm); }
.job-ul li::before { content: ""; position: absolute; left: 0; top: .65em; width: 5px; height: 5px; border-radius: 50%; background: var(--brand-soft); }
.job-apply { margin: 1.2rem 0 0; font-size: var(--fs-sm); color: var(--muted); }

/* ==========================================================================
   页脚 (由 js/components.js 注入)
   ========================================================================== */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding-block: clamp(2.4rem, 1.5rem + 3vw, 3.6rem); }
.footer-inner { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); display: flex; flex-wrap: wrap; gap: 1.4rem 2rem; align-items: center; justify-content: space-between; }
.footer-brand { font-family: var(--font-en); font-weight: 800; font-size: 1.2rem; color: var(--ink); }
.footer-brand .dot { color: var(--brand); }
.footer-meta { color: var(--muted); font-size: var(--fs-xs); line-height: 1.8; }
.footer-meta a { color: var(--muted); }
.footer-meta a:hover { color: var(--brand-strong); }
.footer-links { display: flex; gap: 1.2rem; }
.footer-links a { color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; }

/* ==========================================================================
   滚动进入动效（IntersectionObserver 添加 .in）
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .07s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .14s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .21s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .28s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .35s; }

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