/* ============================================
   RONGXUN TECHNOLOGY 官网样式
   极致 · 智能 · 互联
   ============================================ */

:root {
  --dark: #0b1f33;          /* 导航/页脚深蓝 */
  --dark-2: #081524;
  --accent: #1f7bff;        /* 主题色 */
  --accent-deep: #175bc4;
  --accent-bright: #4da3ff;
  --text: #1a2733;
  --muted: #5b6b7c;
  --line: #e3eaf3;
  --bg-alt: #f5f8fc;
  --radius: 4px;            /* 方形轻圆角 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

img { max-width: 100%; display: block; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- 通用元素 ---------- */

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
}

.chips { display: flex; flex-wrap: wrap; gap: 2px; }
.chips.center { justify-content: center; }

.chip {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: var(--radius);
  background: #eef4ff;
  color: var(--accent-deep);
  border: 1px solid #dbe7fb;
  white-space: nowrap;
}
.chip.dark {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #cfe0f5;
}

/* 按钮：方形轻圆角 / 紧凑 / 悬停缩放 */
.btn {
  display: inline-block;
  padding: 11px 26px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn:hover { transform: scale(1.05); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #3a8dff; box-shadow: 0 8px 20px rgba(31, 123, 255, 0.35); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  border-radius: var(--radius);
  letter-spacing: 1px;
}
.badge-ok { background: #e8f7ef; color: #189a54; border: 1px solid #bfe8d2; }
.badge-soon {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(31, 123, 255, 0.92);
  color: #fff;
}

/* ---------- 导航栏（不透明背景） ---------- */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
/* 滚动阴影：滚动驱动动画（不支持的浏览器无阴影，纯装饰） */
@supports (animation-timeline: scroll()) {
  .navbar {
    animation: nav-shadow linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 12px;
  }
}
@keyframes nav-shadow { to { box-shadow: 0 6px 24px rgba(4, 12, 24, 0.35); } }

.nav-inner {
  height: 62px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #00c6ff);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: grid;
  place-items: center;
  flex: none;
}
.brand-name {
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 3px;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
}
.brand-name small {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.5);
}

.nav-links { margin-left: auto; display: flex; gap: 4px; }
.nav-link {
  position: relative;
  padding: 8px 12px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.18s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

.nav-right { display: flex; align-items: center; gap: 10px; margin-left: 4px; }

.lang-switch { display: flex; gap: 2px; }
.lang-btn {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.18s ease;
}
.lang-btn:hover { color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.lang-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  padding: 7px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 1px;
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  text-align: center;
  padding: 140px 0 100px;
  background:
    linear-gradient(180deg, rgba(7, 16, 30, 0.86), rgba(7, 16, 30, 0.94)),
    url('../img/hero-bg.jpg') center / cover no-repeat;
}

.hero-content { max-width: 860px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  font-size: 13px;
  letter-spacing: 2px;
  color: #7db4ff;
  background: rgba(31, 123, 255, 0.12);
  border: 1px solid rgba(94, 158, 255, 0.5);
  border-radius: var(--radius);
}

.hero-title {
  margin: 22px 0 18px;
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
}
.hero-title i {
  font-style: normal;
  font-weight: 400;
  color: var(--accent-bright);
  margin: 0 0.18em;
}

.hero-subtitle {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.92);
  max-width: 720px;
  margin: 0 auto;
}
.hero-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
  max-width: 640px;
  margin: 12px auto 0;
}

.hero-kws { justify-content: center; margin-top: 22px; }
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: 34px;
}

/* ---------- 数据带 ---------- */

.stats { background: #fff; border-bottom: 1px solid #eef2f7; padding: 34px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.stat { text-align: center; padding: 6px 10px; border-left: 1px solid #e8eef5; }
.stat:first-child { border-left: none; }
.stat b {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-deep);
}
.stat span { font-size: 12px; color: var(--muted); }

/* ---------- 区块通用 ---------- */

.section { padding: 78px 0; }
.section.alt-bg { background: var(--bg-alt); }

.sec-head { text-align: center; margin-bottom: 40px; }
.sec-head h2 {
  margin: 10px 0 12px;
  font-size: 30px;
  color: var(--dark);
}
.sec-head p {
  font-size: 14px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
}

.sec-note {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
}

.sub-title {
  position: relative;
  padding-left: 12px;
  margin-bottom: 18px;
  font-size: 20px;
  color: var(--dark);
}
.sub-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- 关于我们 ---------- */

.about-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: center;
  margin-bottom: 40px;
}
.about-row:last-child { margin-bottom: 0; }
.about-row.reverse .img-card { order: 2; }

.img-card {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(23, 60, 110, 0.08);
}
.img-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.about-text h3 {
  position: relative;
  padding-left: 14px;
  margin-bottom: 12px;
  font-size: 20px;
  color: var(--dark);
}
.about-text h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.about-text p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.9;
}
.about-text .chips { margin-top: 16px; }

/* ---------- 服务能力 ---------- */

.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2px;
}

.svc-card {
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 6px;
  padding: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.svc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(23, 60, 110, 0.12);
}

.svc-card .img-wrap { overflow: hidden; border-radius: var(--radius); margin-bottom: 12px; }
.svc-card img {
  width: 100%;
  height: 118px;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.svc-card:hover img { transform: scale(1.06); }

.svc-card h3 { font-size: 15px; color: var(--dark); margin-bottom: 8px; }
.svc-card p { font-size: 13px; color: var(--muted); line-height: 1.75; }

/* ---------- 合作案例与产品矩阵 ---------- */

.case-na {
  display: grid;
  grid-template-columns: 340px 1fr;
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 44px;
}
.case-na .img-wrap { overflow: hidden; }
.case-na img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}
.case-na-body { padding: 26px 30px; }
.case-na-body h3 { font-size: 20px; color: var(--dark); margin: 12px 0 10px; }
.case-na-body p { font-size: 14px; color: var(--muted); }

.case-stat { display: flex; align-items: baseline; gap: 8px; margin-top: 18px; }
.case-stat b { font-size: 34px; font-weight: 800; color: var(--accent-deep); }
.case-stat span { font-size: 13px; color: var(--muted); }

.prod-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.prod-card {
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.prod-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(23, 60, 110, 0.12);
}
.prod-card .img-wrap { position: relative; overflow: hidden; }
.prod-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.prod-card:hover img { transform: scale(1.05); }
.prod-card h4 {
  padding: 14px 16px;
  font-size: 15px;
  color: var(--dark);
}

/* ---------- 联系我们 ---------- */

.contact { background: var(--bg-alt); }

.contact-panel {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 56px 24px;
  border-radius: 10px;
  color: #fff;
  background:
    radial-gradient(600px 300px at 50% -60px, rgba(31, 123, 255, 0.35), transparent 70%),
    linear-gradient(135deg, #0c2340, #0a1a30);
}
.contact-panel h2 { margin: 10px 0 12px; font-size: 30px; color: #fff; }
.contact-panel > p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  max-width: 640px;
  margin: 0 auto;
}
.contact-panel .chips { margin: 18px 0 26px; }
.contact-mail {
  margin-top: 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}
.contact-mail a { color: #7db4ff; text-decoration: none; }

/* ---------- 页脚 ---------- */

.footer { background: var(--dark-2); color: rgba(255, 255, 255, 0.6); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
  padding: 48px 20px 36px;
}
.footer .brand-name small { color: rgba(255, 255, 255, 0.45); }
.footer-slogan {
  margin-top: 14px;
  font-size: 16px;
  letter-spacing: 2px;
  color: #fff;
}
.footer-sub { font-size: 13px; color: rgba(255, 255, 255, 0.45); margin-top: 4px; }

.footer h5 {
  color: #fff;
  font-size: 14px;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.footer-link {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.18s ease;
}
.footer-link:hover { color: #fff; }
.footer-mail { font-size: 13px; }

.footer-bar { border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 16px 0; }
.footer-bar p { font-size: 12px; color: rgba(255, 255, 255, 0.35); text-align: center; }

/* ---------- 返回顶部（fixed 悬浮 + 滚动驱动显隐） ---------- */

.back-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  line-height: 1.1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: var(--dark);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(4, 12, 24, 0.3);
  transition: background 0.18s ease, box-shadow 0.18s ease, scale 0.18s ease;
}
.back-top .arrow { font-size: 13px; }
.back-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(31, 123, 255, 0.4);
  scale: 1.08;
  color: #fff;
}

/* 显隐：滚动超过一屏后出现（不支持的浏览器按钮常驻，功能不受影响） */
@supports (animation-timeline: scroll()) {
  .back-top {
    animation: backtop-show linear both;
    animation-timeline: scroll(root block);
    animation-range: 100vh calc(100vh + 2px);
  }
}
@keyframes backtop-show {
  from { opacity: 0; visibility: hidden; }
  to { opacity: 1; visibility: visible; }
}

/* ---------- 入场动画（CSS 实现） ---------- */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* 首屏：时间轴动画（全浏览器兼容，进入页面即播放） */
.hero-reveal { opacity: 0; animation: fade-up 0.7s ease forwards; }
.hero-reveal:nth-child(1) { animation-delay: 0.05s; }
.hero-reveal:nth-child(2) { animation-delay: 0.12s; }
.hero-reveal:nth-child(3) { animation-delay: 0.19s; }
.hero-reveal:nth-child(4) { animation-delay: 0.26s; }
.hero-reveal:nth-child(5) { animation-delay: 0.33s; }
.hero-reveal:nth-child(6) { animation-delay: 0.4s; }

/* 其余区块：滚动驱动入场（渐进增强；不支持的浏览器直接可见） */
@supports (animation-timeline: view()) {
  main .reveal {
    animation: fade-up linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }
  main .reveal:nth-child(2) { animation-range: entry 0% cover 46%; }
  main .reveal:nth-child(3) { animation-range: entry 0% cover 52%; }
  main .reveal:nth-child(4) { animation-range: entry 0% cover 58%; }
  main .reveal:nth-child(5) { animation-range: entry 0% cover 64%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-reveal { opacity: 1; animation: none; }
  main .reveal { animation: none; }
  .back-top { animation: none; }
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .nav-links {
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 16px;
    background: var(--dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .navbar.open .nav-links { display: flex; }
  .nav-link { padding: 12px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
  .nav-link::after { display: none; }
  .nav-toggle { display: flex; }

  .about-row { grid-template-columns: 1fr; gap: 20px; }
  .about-row.reverse .img-card { order: 0; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
  .stat { border-left: none; }

  .case-na { grid-template-columns: 1fr; }
  .case-na img { height: 200px; min-height: 0; }

  .prod-grid { grid-template-columns: 1fr; }
  .prod-card img { height: 200px; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }

  .back-top { right: 14px; bottom: 18px; }
}

@media (max-width: 480px) {
  .brand-name { letter-spacing: 1.5px; font-size: 14px; }
  .lang-btn { padding: 5px 7px; font-size: 11px; }
  .hero { min-height: 80vh; }
  .hero-cta { flex-wrap: wrap; }
  .section { padding: 60px 0; }
  .contact-panel { padding: 40px 18px; }
}
