/* =====================================================
   瑞特斯（深圳）电子科技有限公司 - 官网样式
   品牌色：蓝 #2257C4 / 深海军蓝 #0B2559 / 橙 #F25C1F
   ===================================================== */

:root {
  --brand: #2257C4;
  --brand-dark: #1A46A8;
  --brand-deep: #0B2559;
  --accent: #F25C1F;
  --ink: #16233F;
  --muted: #5D6C86;
  --line: #E3E9F4;
  --bg: #FFFFFF;
  --bg-tint: #F4F7FC;
  --radius: 14px;
  --shadow-sm: 0 2px 10px rgba(22, 35, 63, .06);
  --shadow-md: 0 10px 30px rgba(22, 35, 63, .10);
  --shadow-lg: 0 18px 50px rgba(11, 37, 89, .16);
  --header-h: 72px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* 横向溢出的兜底（旧版 100vw 通栏图的遗留保险，保留以防后续加宽元素再溢出）。
   注意：不能用 overflow-x: hidden —— 那会让 html/body 变成滚动容器，导致吸顶导航（sticky）失效。 */
html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }

.container { width: min(1200px, 92%); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--brand); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s, border-color .3s;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); border-color: var(--line); }

.header-inner {
  display: flex; align-items: center; gap: 28px;
  height: var(--header-h);
}
/* CHALLIAN 为纯字标（宽高比 10.6:1），按与瑞特斯 logo 相近的视觉占位定高（瑞特斯 176x40 ≈ 本处 265x25） */
.brand img { height: 25px; width: auto; }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 6px; }
.main-nav a {
  display: block; padding: 8px 11px; white-space: nowrap;
  font-size: 15px; font-weight: 500; color: var(--ink);
  border-radius: 8px; position: relative;
  transition: color .25s;
}
.main-nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; background: var(--brand); border-radius: 2px;
  transform: scaleX(0); transform-origin: center; transition: transform .25s;
}
.main-nav a:hover, .main-nav a.is-active { color: var(--brand); }
.main-nav a:hover::after, .main-nav a.is-active::after { transform: scaleX(1); }

.header-hotline {
  display: flex; align-items: center; gap: 8px;
  color: var(--brand); font-weight: 700; font-size: 17px;
  letter-spacing: .3px; white-space: nowrap;
}

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------------- 首屏轮播 ---------------- */
.hero { position: relative; }
.hero-slider { position: relative; overflow: hidden; height: clamp(380px, 46vw, 620px); }

.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .9s ease, visibility .9s;
}
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-slide img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06);
  transition: transform 6.5s ease-out;
}
.hero-slide.is-active img { transform: scale(1); }

.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 5; width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .22); color: #fff;
  backdrop-filter: blur(6px);
  transition: background .25s;
  opacity: 0;
}
.hero-slider:hover .hero-arrow, .hero-arrow:focus-visible { opacity: 1; }
.hero-arrow:hover { background: rgba(34, 87, 196, .85); }
.hero-arrow.prev { left: 22px; }
.hero-arrow.next { right: 22px; }

.hero-dots {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 5;
}
.hero-dots button {
  width: 26px; height: 4px; border: 0; border-radius: 4px; cursor: pointer;
  background: rgba(255, 255, 255, .45); transition: background .3s, width .3s;
}
.hero-dots button.is-active { background: #fff; width: 40px; }

/* ---------------- 通用区块 ---------------- */
.section { padding: 84px 0; }
.section-tint { background: var(--bg-tint); }
.section-dark { background: linear-gradient(135deg, #0B2559 0%, #143D8F 60%, #2257C4 100%); color: #fff; }

.section-head { text-align: center; margin-bottom: 52px; }
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 3.5px;
  text-transform: uppercase; color: var(--brand); margin-bottom: 6px;
}
.eyebrow.light { color: rgba(255,255,255,.75); }
/* 产品展示 区标题用 h1（首页唯一的 h1），h1/h2 共用同一套样式保证视觉不变 */
.section-head h1,
.section-head h2 {
  font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; letter-spacing: 1px;
}
.section-dark .section-head h1,
.section-dark .section-head h2 { color: #fff; }
.divider {
  display: inline-block; width: 46px; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 3px; margin-top: 14px;
}
.section-sub { color: var(--muted); margin-top: 14px; font-size: 15.5px; }

/* ---------------- 产品展示 ---------------- */
.filter-chips {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin-bottom: 40px;
}
.chip {
  padding: 9px 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff;
  font-size: 14.5px; color: var(--muted); font-family: inherit;
  transition: all .25s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-active {
  background: #0264EA;
  border-color: transparent; color: #fff;
}

.product-grid {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.product-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .35s, box-shadow .35s;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.product-card figure { overflow: hidden; aspect-ratio: 734 / 552; }
.product-card img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.05);
  transition: transform .5s ease;
}
.product-card:hover img { transform: scale(1.12); }
.filter-empty { text-align: center; color: var(--muted); padding: 30px 0; }

/* ---------------- 技术优势 ---------------- */
/* 图片收到内容宽度内（随 .container，最大 1200px），不再通栏。
   不能用 width: 100vw 做通栏——100vw 含滚动条宽度，会比 header 宽出 7~17px，
   滚动到该图时图会从 header 边缘露出一点。 */
.tech-figure img,
.idea-art img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* ---------------- 定制流程 ---------------- */
.process-steps {
  position: relative;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0 10px;
  padding-top: 6px;
}
/* 步骤之间的虚线连接导轨 */
.process-steps::before {
  content: ""; position: absolute; z-index: 0;
  left: calc(100% / 12); right: calc(100% / 12); top: 33px; height: 2px;
  background: repeating-linear-gradient(90deg, #CBD8EC 0 7px, transparent 7px 15px);
}
.step {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center;
}
.step-num {
  display: grid; place-items: center; flex-shrink: 0;
  width: 56px; height: 56px; border-radius: 50%;
  background: #fff; border: 2px solid #D3DEF0;
  font-size: 17px; font-weight: 700; color: var(--brand);
  font-variant-numeric: tabular-nums;
  transition: background-color .28s, color .28s, border-color .28s;
}
.step:hover .step-num { background: #0264EA; border-color: #0264EA; color: #fff; }
.step-name { font-size: 15.5px; font-weight: 600; }

/* ---------------- 关于我们 ---------------- */
.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  margin-bottom: 52px;
}
.stat {
  text-align: center; padding: 26px 12px;
  background: var(--bg-tint); border-radius: var(--radius);
}
.stat strong { display: block; font-size: clamp(22px, 2.6vw, 30px); color: var(--brand); font-weight: 700; }
.stat span { font-size: 14px; color: var(--muted); }

.about-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center;
}
.about-text h3 {
  font-size: 20px; margin-bottom: 16px; color: var(--brand-deep);
  padding-left: 14px; border-left: 4px solid var(--accent);
}
.about-text p { color: var(--muted); margin-bottom: 14px; text-align: justify; }
.about-photo img {
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  display: block; width: 100%; height: auto;
  aspect-ratio: 610 / 630;   /* 与瑞特斯官网图片区域尺寸一致 */
  object-fit: cover;         /* 裁切填充，保证图片不变形 */
}

/* ---------------- 企业展示 ---------------- */
.display-grid {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center;
}
.display-photo img {
  border-radius: var(--radius); width: 100%;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
.display-text h3 { font-size: 24px; margin-bottom: 16px; letter-spacing: 1px; }
.display-text p { color: rgba(255, 255, 255, .82); text-align: justify; }

.badge-list { margin-top: 26px; display: grid; gap: 12px; }
.badge {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px; padding: 13px 18px;
  backdrop-filter: blur(4px);
}
.badge svg { color: #FFB38A; flex-shrink: 0; }
.badge strong { display: block; font-size: 15px; }
.badge span { font-size: 13.5px; color: rgba(255, 255, 255, .72); }

/* ---------------- 企业理念 ---------------- */
.idea-text {
  max-width: 860px; margin: 0 auto 46px;
  color: var(--muted); text-align: justify; font-size: 16.5px;
}
/* 企业理念图片：收到内容宽度内，规则见上方 .tech-figure img, .idea-art img */

/* ---------------- 联系我们 CTA ---------------- */
.section-cta {
  background:
    radial-gradient(1200px 400px at 20% 0%, rgba(242, 92, 31, .18), transparent 60%),
    linear-gradient(135deg, #0B2559, #1A46A8);
  color: #fff; text-align: center; padding: 76px 0;
}
.cta-inner h2 { font-size: clamp(26px, 3.2vw, 34px); }
.cta-label { margin-top: 26px; color: rgba(255, 255, 255, .72); letter-spacing: 2px; font-size: 15px; }
.cta-phone {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; letter-spacing: 2px;
  margin-top: 8px; color: #fff;
  transition: color .3s;
}
.cta-phone:hover { color: #FFB38A; }
.cta-addr {
  margin-top: 20px; color: rgba(255, 255, 255, .82); font-size: 15.5px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* ---------------- 页脚 ---------------- */
.site-footer { background: #0A1B3D; color: rgba(255, 255, 255, .78); }
.footer-grid {
  display: grid; grid-template-columns: 1.2fr .8fr 1fr; gap: 40px;
  padding: 54px 0 44px;
}
/* 页脚 logo 用白色字标图片（footer 背景 #0A1B3D 上藏蓝看不见） */
.footer-logo { display: block; height: 22px; width: auto; }
.footer-name { margin-top: 10px; font-size: 15.5px; color: rgba(255,255,255,.9); }
.footer-en { font-size: 12.5px; color: rgba(255, 255, 255, .45); letter-spacing: .5px; }

.site-footer h4 {
  color: #fff; font-size: 15.5px; margin-bottom: 16px; letter-spacing: 1px;
}
.footer-nav ul { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; }
.footer-nav a, .footer-contact p { font-size: 14px; }
.footer-nav a { transition: color .25s; }
.footer-nav a:hover { color: #fff; }
.footer-contact p { margin-bottom: 8px; }
.hotline { color: #fff; font-weight: 700; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .10);
  padding: 18px 0; font-size: 13px; color: rgba(255, 255, 255, .45);
}
.footer-bottom .container {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.footer-bottom a:hover { color: rgba(255, 255, 255, .8); }

/* ---------------- 返回顶部 ---------------- */
.back-top {
  position: fixed; right: 26px; bottom: 30px; z-index: 90;
  width: 46px; height: 46px; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--brand); color: #fff;
  box-shadow: 0 10px 24px rgba(34, 87, 196, .38);
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .3s, visibility .3s, transform .3s, background .25s;
}
.back-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--brand-dark); }

/* ---------------- 滚动显现动画 ---------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-slide img { transform: none; transition: none; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1024px) {
  .main-nav ul { gap: 0; }
  .main-nav a { padding: 8px 10px; font-size: 14px; }
  .header-hotline { display: none; }
  .process-steps { grid-template-columns: repeat(3, 1fr); gap: 34px 10px; }
  .process-steps::before { display: none; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .nav-toggle { display: flex; margin-left: auto; }
  .header-inner { gap: 12px; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .main-nav.is-open { max-height: 420px; }
  .main-nav ul { flex-direction: column; padding: 10px 4%; gap: 2px; }
  .main-nav a { padding: 12px 10px; font-size: 15px; }
  .main-nav a::after { display: none; }
  .main-nav a.is-active { background: var(--bg-tint); }

  .about-grid, .display-grid { grid-template-columns: 1fr; gap: 30px; }
  .about-photo { order: -1; }
  /* 换行后单条横向导轨失效，隐藏连接线并改为分块间距 */
  .process-steps { grid-template-columns: repeat(3, 1fr); gap: 34px 10px; }
  .process-steps::before { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; padding: 40px 0 34px; }
  .hero-arrow { display: none; }
  .back-top { right: 16px; bottom: 22px; }
}

@media (max-width: 480px) {
  .process-steps { grid-template-columns: 1fr 1fr; gap: 26px 10px; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  /* CHALLIAN 为 10.6:1 纯字标，手机端过高会撑满屏宽；16px ≈ 170px 宽（390 屏的 44%），与瑞特斯手机端比例相近 */
  .brand img { height: 16px; }
}
