/* =========================================================
   天津艾科斯瑞科技有限公司 · 官网前端样式
   设计基调：深色科技风（深色背景 + 蓝青渐变强调色）
   响应式：移动优先，断点 640 / 768 / 1024 / 1280
   无障碍：:focus-visible 焦点环、对比度达标、reduced-motion 支持
   ========================================================= */

:root {
  /* 颜色令牌 */
  --bg: #0b1020;
  --bg-elev: #121a2e;
  --bg-elev-2: #18233c;
  --surface: rgba(255, 255, 255, 0.04);
  --text: #e6edf3;
  --muted: #9fb0c3;
  --border: rgba(255, 255, 255, 0.10);
  --accent: #3b82f6;
  --accent-2: #22d3ee;
  --accent-grad: linear-gradient(135deg, #3b82f6 0%, #22d3ee 100%);
  --success: #34d399;
  --danger: #f87171;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7);
  --maxw: 1200px;
  --header-h: 68px;
  /* 流体排版 */
  --step--1: clamp(0.82rem, 0.78rem + 0.2vw, 0.9rem);
  --step-0: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  --step-1: clamp(1.15rem, 1rem + 0.7vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.2rem + 1.5vw, 2.4rem);
  --step-3: clamp(2rem, 1.4rem + 3vw, 3.6rem);
  --step-4: clamp(2.6rem, 1.6rem + 5vw, 5rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 80% -10%, rgba(59, 130, 246, 0.18), transparent 60%),
    radial-gradient(700px 400px at 0% 10%, rgba(34, 211, 238, 0.12), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--muted); }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- 布局工具 ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.section { padding-block: clamp(56px, 8vw, 110px); }
.section__head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.eyebrow {
  display: inline-block; font-size: var(--step--1); letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent-2); font-weight: 600; margin-bottom: 12px;
}
.section__title { font-size: var(--step-2); }
.section__lead { font-size: var(--step-1); }
.text-gradient {
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.grid { display: grid; gap: clamp(16px, 2.5vw, 28px); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: var(--step-0);
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  text-align: center;
}
.btn--primary { background: var(--accent-grad); color: #04111f; box-shadow: 0 10px 30px -10px rgba(34, 211, 238, 0.6); }
.btn--primary:hover { transform: translateY(-2px); }
.btn--ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn--ghost:hover { border-color: var(--accent); color: #fff; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(11, 16, 32, 0.72); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease, background .2s ease;
}
.site-header.is-scrolled { border-color: var(--border); background: rgba(11, 16, 32, 0.92); }
.nav { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: var(--step-1); }
.brand__mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent-grad);
  display: grid; place-items: center; color: #04111f; font-weight: 800; font-size: 14px;
}
.nav__list { display: flex; align-items: center; gap: 6px; }
.nav__link {
  padding: 8px 14px; border-radius: 8px; color: var(--muted); font-weight: 500; transition: color .15s ease, background .15s ease;
}
.nav__link:hover, .nav__link.is-active { color: #fff; background: var(--surface); }
.nav__toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); cursor: pointer; position: relative;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ""; position: absolute; left: 11px; width: 22px; height: 2px; background: var(--text); transition: transform .2s ease, opacity .2s ease;
}
.nav__toggle span { top: 21px; }
.nav__toggle span::before { top: -7px; }
.nav__toggle span::after { top: 7px; }
.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(64px, 12vw, 150px) clamp(48px, 8vw, 96px); position: relative; }
.hero__inner { max-width: 880px; }
.hero__title { font-size: var(--step-4); margin-bottom: 20px; }
.hero__subtitle { font-size: var(--step-1); max-width: 640px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 48px; }
.hero__badge { display: flex; flex-direction: column; }
.hero__badge b { font-size: var(--step-2); color: #fff; }
.hero__badge span { font-size: var(--step--1); color: var(--muted); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(59, 130, 246, 0.5); box-shadow: var(--shadow); }
.service-card__icon {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); margin-bottom: 18px; color: var(--accent-2);
}
.service-card h3 { font-size: var(--step-1); }
.service-card .num { font-size: var(--step--1); color: var(--accent); font-weight: 700; letter-spacing: .1em; }

.case-card { padding: 0; overflow: hidden; }
.case-card__cover { aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--bg-elev-2), #0e1830); position: relative; }
.case-card__cover::after {
  content: attr(data-industry); position: absolute; left: 16px; bottom: 14px;
  font-size: var(--step--1); color: var(--muted); background: rgba(0,0,0,.35); padding: 4px 10px; border-radius: 999px;
}
.case-card__body { padding: 20px; }
.case-card__metric { color: var(--accent-2); font-weight: 700; }
.tagrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag { font-size: var(--step--1); color: var(--muted); border: 1px solid var(--border); padding: 3px 10px; border-radius: 999px; }

/* ---------- 数据指标 ---------- */
.stats { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }
.stat { text-align: center; padding: 24px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.stat__num { font-size: var(--step-3); font-weight: 800; color: #fff; }
.stat__label { color: var(--muted); font-size: var(--step--1); }

/* ---------- 创新 / 视频展示 ---------- */
.showreel {
  position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  aspect-ratio: 21 / 9; display: grid; place-items: center;
  background: radial-gradient(600px 300px at 50% 40%, rgba(59,130,246,.25), transparent 70%), var(--bg-elev);
}
.showreel__play {
  width: 84px; height: 84px; border-radius: 50%; background: var(--accent-grad); display: grid; place-items: center;
  color: #04111f; font-size: 28px; cursor: pointer; border: none; box-shadow: 0 10px 40px -8px rgba(34,211,238,.7);
}
.showreel__time { position: absolute; right: 16px; bottom: 14px; font-size: var(--step--1); color: var(--muted); }

/* ---------- 合作伙伴 ---------- */
.partners { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.partner {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px; text-align: center;
  color: var(--muted); font-weight: 600; background: var(--surface);
}

/* ---------- 表单 ---------- */
.form { display: grid; gap: 18px; max-width: 640px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 600; font-size: var(--step--1); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--text); font: inherit; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}
.field textarea { min-height: 140px; resize: vertical; }
.field__error { color: var(--danger); font-size: var(--step--1); min-height: 1em; }
.field--invalid input, .field--invalid textarea { border-color: var(--danger); }
.form__status { font-size: var(--step--1); min-height: 1.2em; }
.form__status.is-success { color: var(--success); }
.form__status.is-error { color: var(--danger); }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-elev); padding-block: 48px 24px; margin-top: 40px; }
.footer__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer__col h4 { font-size: var(--step-0); color: #fff; }
.footer__col a { color: var(--muted); display: block; padding: 4px 0; }
.footer__col a:hover { color: var(--accent-2); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: var(--step--1); }

/* ---------- 其他组件 ---------- */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: #04111f; padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }
.backtotop {
  position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent-grad); color: #04111f; border: none; cursor: pointer; font-size: 20px;
  display: grid; place-items: center; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 90;
}
.backtotop.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.notice { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm); padding: 14px 16px; color: var(--muted); font-size: var(--step--1); }

/* ---------- 滚动揭示动画 ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 焦点可见性（无障碍） ---------- */
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .partners { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .nav__toggle { display: block; }
  .nav__list {
    position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 4px; padding: 14px clamp(16px, 4vw, 40px) 22px; background: rgba(11, 16, 32, 0.98);
    border-bottom: 1px solid var(--border); display: none;
  }
  .nav__list.is-open { display: flex; }
  .nav__link { padding: 12px 14px; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .hero__badges { gap: 16px; }
}
@media (max-width: 480px) {
  .partners { grid-template-columns: repeat(2, 1fr); }
  .footer__cols { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}

/* ---------- 尊重减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition: none !important; }
}
