/* ============================================================
   役物敏事科技 · 官网样式
   设计语言：亮色编辑风
   - 底色：暖纸白 / 墨色文字 / 朱砂红单一强调色
   - 字体：系统无衬线为主，衬线（宋体系）仅用于品牌语与印章字
   - 圆角体系：大件（卡片、按钮、图面）12px，小件（标签）6px
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  --paper:    #FAF9F5;   /* 页面底色，暖纸白 */
  --paper-2:  #F1EEE6;   /* 纸色加深一档，用于分区与卡面 */
  --ink:      #201E1A;   /* 墨色，主文字 */
  --ink-soft: #6B675C;   /* 次级文字，暖灰 */
  --line:     #E2DFD4;   /* 发丝线 */
  --red:      #B23A2B;   /* 朱砂红，唯一强调色 */
  --red-deep: #8F2E20;   /* 朱砂红按下态 */
  --coal:     #26241F;   /* 深色对比带底色 */
  --coal-2:   #2F2C26;   /* 深色带内卡面 */

  --r-lg: 12px;          /* 卡片、按钮、图面圆角 */
  --r-sm: 6px;           /* 标签、小件圆角 */

  --sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Songti SC", "Source Han Serif SC", "Noto Serif CJK SC", "Noto Serif SC", "SimSun", serif;
  --sans-fallback: "Noto Sans CJK SC";

  --container: 1160px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;   /* 锚点定位时为吸顶导航留位 */
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--red); color: var(--paper); }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd, dt { margin: 0; }

.serif { font-family: var(--serif); }

.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* 滚动入场（仅 JS 可用时隐藏，避免无 JS 环境白屏） */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: var(--r-lg);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
  white-space: nowrap;              /* CTA 文案桌面端不换行 */
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--red); color: var(--paper); }
.btn-primary:hover { background: var(--red-deep); }

.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.btn-large { padding: 17px 40px; font-size: 16px; }

/* ---------- 印章标记 ---------- */
.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--red);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  flex: none;
}

/* ============================================================
   导航
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(250, 249, 245, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: 0.06em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 14.5px;
}
.nav-links a { color: var(--ink-soft); transition: color 0.2s ease; }
.nav-links a:hover { color: var(--ink); }

.nav-cta {
  padding: 9px 20px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--paper) !important;
  transition: background-color 0.2s ease;
}
.nav-cta:hover { background: var(--red) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 42px;
  height: 42px;
  padding: 0 9px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease-out), opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child  { transform: translateY(-4px) rotate(-45deg); }

/* ============================================================
   首屏
   ============================================================ */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
}

.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: 48px;
}

.hero-motto {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--red);
  font-size: 15px;
  letter-spacing: 0.3em;
}
.hero-motto::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--red);
  flex: none;
}

.hero-title {
  margin-top: 28px;
  font-size: clamp(46px, 6.6vw, 82px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0.015em;
}

.hero-sub {
  margin-top: 26px;
  max-width: 32em;
  color: var(--ink-soft);
  font-size: 17px;
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* 右侧：竖排品牌字 + 印章构图 */
.hero-visual {
  position: relative;
  justify-self: end;
  display: flex;
  align-items: flex-start;
  gap: 28px;
  padding: 40px 44px;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper-2);
  border-radius: var(--r-lg);
  transform: translate(14px, 14px);      /* 错位衬底，版画感 */
  z-index: -1;
}

.vertical-name {
  writing-mode: vertical-rl;
  font-size: clamp(34px, 3.6vw, 46px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.34em;
  color: var(--ink);
}

.seal-large {
  width: 92px;
  height: 92px;
  font-size: 52px;
  border-radius: 16px;
  margin-top: 8px;
}

.vertical-note {
  writing-mode: vertical-rl;
  font-size: 14px;
  line-height: 2;
  letter-spacing: 0.32em;
  color: var(--ink-soft);
  padding-top: 6px;
}

/* ============================================================
   区块公共
   ============================================================ */
.eyebrow {
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3em;
}

.section-title {
  margin-top: 14px;
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 800;
  letter-spacing: 0.02em;
}
.section-title-light { color: var(--paper); font-size: clamp(30px, 3.4vw, 42px); font-weight: 800; letter-spacing: 0.02em; }
.section-body-light { margin-top: 20px; color: rgba(250, 249, 245, 0.62); font-size: 15px; max-width: 26em; }

.section-head { margin-bottom: 52px; }

/* 标签行 */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.tag-row li {
  padding: 4px 12px;
  border-radius: var(--r-sm);
  background: rgba(250, 249, 245, 0.09);
  color: rgba(250, 249, 245, 0.72);
  font-size: 12.5px;
  letter-spacing: 0.05em;
}
.tag-row-ink li {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

/* ============================================================
   服务能力（深色对比带）
   ============================================================ */
.services {
  background: var(--coal);
  padding: 108px 0;
}

.services-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 64px;
  align-items: start;
}

.services-intro { position: sticky; top: 108px; }

.services-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.service-card {
  padding: 30px 28px 26px;
  border-radius: var(--r-lg);
  background: var(--coal-2);
  border: 1px solid rgba(250, 249, 245, 0.07);
  transition: transform 0.35s var(--ease-out), border-color 0.3s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(178, 58, 43, 0.55);
}

.card-mark {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--red);
  margin-bottom: 22px;
}

.service-card h3 { color: var(--paper); font-size: 20px; letter-spacing: 0.03em; }
.service-card p { margin-top: 12px; color: rgba(250, 249, 245, 0.62); font-size: 14.5px; line-height: 1.8; }

/* ============================================================
   精选案例
   ============================================================ */
.work { padding: 116px 0 104px; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.case-card {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper-2);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease;
}
.case-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px -18px rgba(32, 30, 26, 0.28);
}

.case-wide { grid-column: span 7; }
.work-grid .case-card:nth-child(2) { grid-column: span 5; }
.work-grid .case-card:nth-child(3) { grid-column: span 5; }
.work-grid .case-card:nth-child(4) { grid-column: span 7; }

.case-media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 8.2;
}
.case-wide .case-media { aspect-ratio: 16 / 7.4; }

.case-glyph {
  font-size: 88px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.82;
  transition: transform 0.5s var(--ease-out);
}
.case-card:hover .case-glyph { transform: translateY(-6px) scale(1.04); }

.case-media-a { background: #E7E9DC; color: #4A4E3F; }
.case-media-b { background: #F0E6D4; color: #7A5A34; }
.case-media-c { background: #E4E4E0; color: #55554D; }

.case-dark { background: var(--coal); }
.case-dark .case-media  { background: var(--coal-2); color: rgba(250, 249, 245, 0.5); }
.case-dark .case-cat    { color: #D9836F; }
.case-dark h3           { color: var(--paper); }
.case-dark .case-desc   { color: rgba(250, 249, 245, 0.62); }
.case-dark .tag-row-ink li { border-color: rgba(250, 249, 245, 0.16); color: rgba(250, 249, 245, 0.66); }

.case-body { padding: 24px 26px 26px; }

.case-cat {
  color: var(--red);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
}
.case-body h3 { margin-top: 8px; font-size: 23px; letter-spacing: 0.02em; }
.case-desc { margin-top: 8px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.8; }

/* ============================================================
   产品哲学（真实需求 + 良好的设计）
   ============================================================ */
.manifesto {
  padding: 118px 0 112px;
}

.manifesto-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: 72px;
  align-items: center;
}

.manifesto-lead {
  font-size: clamp(24px, 2.6vw, 33px);
  font-weight: 700;
  line-height: 1.75;
  letter-spacing: 0.04em;
}
.manifesto-lead .accent { color: var(--red); }

.manifesto-rules {
  display: grid;
  gap: 44px;
}

.rule {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  position: relative;
}
.rule::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 34px;
  height: 2px;
  background: var(--red);
}

.rule-order {
  color: var(--red);
  font-size: 14px;
  letter-spacing: 0.3em;
}
.rule-word {
  margin-top: 10px;
  font-size: clamp(34px, 3.4vw, 46px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
}
.rule-word .dot { color: var(--red); }
.rule-text {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.9;
  max-width: 30em;
}

/* ============================================================
   关于公司
   ============================================================ */
.about {
  background: var(--paper-2);
  padding: 116px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: 72px;
  align-items: center;
}

.about-quote {
  margin-top: 30px;
  color: var(--red);
  font-size: 21px;
  line-height: 2;
  letter-spacing: 0.12em;
}
.about-text {
  margin-top: 26px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 2;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px 32px;
}

.stat { border-top: 1px solid var(--line); padding-top: 20px; }
.stat-num {
  font-size: 58px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.stat-num span {
  margin-left: 6px;
  font-size: 22px;
  font-weight: 600;
  color: var(--red);
}
.stat-label { margin-top: 10px; color: var(--ink-soft); font-size: 13.5px; letter-spacing: 0.08em; }

/* ============================================================
   联系
   ============================================================ */
.contact {
  padding: 128px 0 136px;
}

.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-title {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.contact-sub { margin-top: 20px; color: var(--ink-soft); font-size: 16px; }

.contact .btn { margin-top: 36px; }

.contact-info {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 32px;
  width: 100%;
  max-width: 560px;
}
.contact-info dt {
  color: var(--red);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
}
.contact-info dd { margin-top: 6px; font-size: 16px; }

.contact-qr { margin: 56px auto 0; border-radius: var(--r-sm); }

/* ============================================================
   页脚
   ============================================================ */
.footer {
  background: var(--coal);
  color: rgba(250, 249, 245, 0.66);
  padding: 64px 0 0;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer .brand-name { color: var(--paper); }
.footer-motto {
  margin-top: 16px;
  font-size: 13.5px;
  letter-spacing: 0.22em;
  color: rgba(250, 249, 245, 0.45);
}

.footer-nav {
  display: flex;
  gap: 30px;
  font-size: 14px;
  flex-wrap: wrap;
}
.footer-nav a { color: rgba(250, 249, 245, 0.6); transition: color 0.2s ease; }
.footer-nav a:hover { color: var(--paper); }

.footer-legal {
  margin-top: 56px;
  border-top: 1px solid rgba(250, 249, 245, 0.1);
  padding: 22px 32px 26px;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: rgba(250, 249, 245, 0.4);
  text-align: center;
}
.footer-legal a { color: inherit; }
.footer-legal a:hover { color: rgba(250, 249, 245, 0.7); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 980px) {
  .hero { padding: 132px 0 72px; min-height: auto; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }

  .services { padding: 84px 0; }
  .services-grid { grid-template-columns: 1fr; gap: 40px; }
  .services-intro { position: static; }

  .work { padding: 88px 0 80px; }
  .case-wide, .work-grid .case-card:nth-child(2),
  .work-grid .case-card:nth-child(3), .work-grid .case-card:nth-child(4) {
    grid-column: span 12;
  }
  .case-media, .case-wide .case-media { aspect-ratio: 16 / 8; }

  .manifesto { padding: 88px 0 84px; }
  .manifesto-grid { grid-template-columns: 1fr; gap: 48px; }

  .about { padding: 88px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 52px; }

  .contact { padding: 96px 0 104px; }
  .contact-info { grid-template-columns: 1fr; gap: 28px; text-align: center; }
}

@media (max-width: 720px) {
  .section-inner, .hero-inner, .nav-inner { padding: 0 20px; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 10px 20px 20px;
    font-size: 15px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: none; }
  .nav-cta {
    display: inline-block;
    padding: 12px 0;
    width: 100%;
    text-align: center;
    background: var(--red);
    color: var(--paper) !important;
    border-radius: var(--r-sm);
  }

  .hero-actions .btn { flex: 1; }

  .services-cards { grid-template-columns: 1fr; }

  .about-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
  .stat-num { font-size: 44px; }

  .footer-legal { flex-direction: column; padding: 20px; gap: 4px; }
}

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