/* ==========================================================================
   上海牧言景行信息技术有限公司 · 官网 V1 样式（视觉 v4 · 红黑金属 · 驭锋）
   美学：黑钢为底 + 正红刃锋 + 金属银渐变 + 细线网格 + 等宽技术标签
   约束：纯静态、无框架、无外部依赖；CSS 变量 + Flexbox/Grid + 媒体查询
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计令牌
   -------------------------------------------------------------------------- */
:root {
  /* 主红（刃锋） */
  --color-primary: #E0202E;
  --color-primary-hover: #C8101E;
  --color-primary-active: #A50D19;
  --color-primary-soft: rgba(224, 32, 46, 0.12);

  /* 亮红（深底文字用，保证对比度） */
  --color-accent: #FF4D57;
  --color-accent-bright: #FF6A62;
  --color-accent-deep: #B00D14;

  /* 黑钢底（提亮一档，与 Logo 深色金属拉开层次） */
  --bg-0: #14161B;
  --bg-1: #191C23;
  --bg-2: #20242D;
  --bg-3: #282D37;

  /* 金属银 */
  --steel-100: #F2F3F6;
  --steel-300: #C7CBD4;
  --steel-500: #9CA2AE;
  --steel-700: #6B717D;

  /* 发丝线 */
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.22);

  /* 文字 */
  --text-1: #ECEEF1;
  --text-2: #A9AEB8;
  --text-3: #7C828D;

  /* 金属渐变 */
  --grad-steel: linear-gradient(180deg, #FFFFFF 0%, #D6D9DF 52%, #9CA2AE 100%);
  --grad-red-text: linear-gradient(120deg, #FF6A62 0%, #E0202E 62%, #B00D14 100%);
  --grad-red-btn: linear-gradient(180deg, #E0202E 0%, #C8101E 60%, #A50D19 100%);

  /* 间距（4px 基数） */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 32px; --space-8: 40px;
  --space-9: 48px; --space-10: 64px; --space-11: 80px; --space-12: 96px;
  --space-13: 128px;

  /* 锐利直角 */
  --radius: 2px;
  --radius-sm: 4px;

  /* 阴影（黑调） */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
               "Source Han Sans SC", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
               "Liberation Mono", monospace;
}

/* --------------------------------------------------------------------------
   2. 基础与重置
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  color: var(--text-1);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

::selection {
  background: rgba(224, 32, 46, 0.45);
  color: #FFFFFF;
}

h1, h2, h3 {
  margin: 0;
}

p {
  margin: 0;
}

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

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

button {
  font-family: inherit;
}

section[id],
footer[id] {
  scroll-margin-top: 80px;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 200;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--color-primary);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  transition: top 150ms ease-out;
}

.skip-link:focus {
  top: 16px;
}

/* --------------------------------------------------------------------------
   3. 顶部导航 —— 透明 / 滚动后黑玻璃
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 200ms ease-out, border-color 200ms ease-out,
              box-shadow 200ms ease-out, backdrop-filter 200ms ease-out;
}

.site-header.is-scrolled {
  background: rgba(28, 32, 40, 0.9);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
}

.brand-mark {
  height: 30px;
  width: auto;
  flex: none;
  filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.75))
          drop-shadow(0 0 7px rgba(255, 255, 255, 0.30))
          drop-shadow(0 0 18px rgba(224, 32, 46, 0.30));
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-1);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 200ms ease-out;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease-out;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text-1);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

/* 汉堡按钮 */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.menu-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 16px;
}

.menu-line {
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  border-radius: 1px;
  background: var(--text-1);
  transition: transform 200ms ease-out, opacity 200ms ease-out, top 200ms ease-out;
}

.menu-line:nth-child(1) { top: 0; }
.menu-line:nth-child(2) { top: 7px; }
.menu-line:nth-child(3) { top: 14px; }

.menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
  top: 7px;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
  top: 7px;
  transform: rotate(-45deg);
}

.mobile-nav {
  display: none;
}

/* --------------------------------------------------------------------------
   4. 首屏 Hero —— 纯黑 + 网格 + 红色锋线 + 扫描线 + Logo
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  margin-top: -68px;
  padding: 190px 0 130px;
  text-align: center;
  color: var(--text-1);
  background-color: var(--bg-0);
  background-image:
    radial-gradient(1100px 520px at 50% -12%, rgba(224, 32, 46, 0.20), transparent 62%),
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: auto, 46px 46px, 46px 46px;
}

/* 红色「锋」线（斜切） */
.hero::before {
  content: "";
  position: absolute;
  top: -18%;
  right: 12%;
  width: 2px;
  height: 150%;
  background: linear-gradient(180deg, transparent, var(--color-accent-bright) 30%, var(--color-primary) 70%, transparent);
  transform: rotate(24deg);
  transform-origin: top center;
  opacity: 0.9;
  pointer-events: none;
}

/* 左下第二道弱红晕，制造纵深 */
.hero::after {
  content: "";
  position: absolute;
  left: -140px;
  bottom: -160px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 32, 46, 0.17), transparent 66%);
  filter: blur(20px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

/* 扫描线 */
.hero-inner::before {
  content: "";
  position: absolute;
  left: -10%;
  top: -60px;
  width: 120%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 77, 87, 0.55), transparent);
  opacity: 0;
  animation: hero-scan 7s ease-in-out infinite;
  pointer-events: none;
}

.hero-title {
  font-size: clamp(42px, 7.5vw, 76px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 28px;
  background: var(--grad-steel);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-title-accent {
  background: var(--grad-red-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 44px;
}

@keyframes hero-scan {
  0%   { opacity: 0; transform: translateY(0); }
  12%  { opacity: 0.9; }
  55%  { opacity: 0; transform: translateY(620px); }
  100% { opacity: 0; transform: translateY(620px); }
}

/* --------------------------------------------------------------------------
   5. 按钮
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 30px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out,
              background-color 150ms ease-out, border-color 150ms ease-out,
              color 150ms ease-out;
}

.btn-primary {
  background: var(--grad-red-btn);
  border-color: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(224, 32, 46, 0.32);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #F03040 0%, #D01826 60%, #B00D14 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(224, 32, 46, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--text-1);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.btn-secondary:active {
  background: rgba(255, 255, 255, 0.12);
}

/* 文字链接 */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-accent);
  transition: color 150ms ease-out, gap 150ms ease-out;
}

.text-link:hover {
  color: var(--color-accent-bright);
  text-decoration: underline;
  gap: 10px;
}

/* --------------------------------------------------------------------------
   6. 通用区块
   -------------------------------------------------------------------------- */
.section {
  position: relative;
  padding: 104px 0;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--color-accent);
  margin-bottom: 14px;
}

.section-kicker::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--color-primary);
  vertical-align: middle;
  margin-right: 12px;
}

.section-title {
  font-size: clamp(30px, 4.5vw, 42px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--steel-100);
  margin-bottom: 22px;
}

.section-lead {
  max-width: 780px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-2);
}

.section-cta {
  margin-top: 36px;
}

h3 {
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--steel-100);
}

/* --------------------------------------------------------------------------
   7. 公司介绍
   -------------------------------------------------------------------------- */
.about-body {
  max-width: 880px;
}

.about-body > p {
  margin-bottom: 20px;
  font-size: 17px;
  line-height: 1.85;
  color: var(--steel-300);
}

.values {
  margin-top: 30px;
  padding: 26px 28px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(224, 32, 46, 0.12), rgba(224, 32, 46, 0.04) 70%);
  border: 1px solid rgba(224, 32, 46, 0.28);
  border-left: 3px solid var(--color-primary);
}

.values h3 {
  margin-bottom: 10px;
  color: var(--color-accent-bright);
}

.values p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-2);
}

/* --------------------------------------------------------------------------
   8. 经营范围
   -------------------------------------------------------------------------- */
#business {
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.business-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 44px;
}

.business-card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease-out, box-shadow 180ms ease-out,
              border-color 180ms ease-out;
}

/* 顶部红色细条（hover 点亮） */
.business-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease-out;
}

/* 十字定位标记（右上） */
.business-card::after {
  content: "+";
  position: absolute;
  top: 16px;
  right: 18px;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1;
  color: var(--steel-700);
  transition: color 220ms ease-out;
}

.business-card:hover {
  transform: translateY(-4px);
  border-color: rgba(224, 32, 46, 0.45);
  box-shadow: var(--shadow-lg);
}

.business-card:hover::before {
  transform: scaleX(1);
}

.business-card:hover::after {
  color: var(--color-accent);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  background: var(--color-primary-soft);
  color: var(--color-accent-bright);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.business-card h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.business-card p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-2);
}

/* --------------------------------------------------------------------------
   9. 商务联系
   -------------------------------------------------------------------------- */
.contact-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-top: 44px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-md);
}

/* 左上角红色 L 角标 */
.contact-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 16px;
  height: 16px;
  border-top: 3px solid var(--color-primary);
  border-left: 3px solid var(--color-primary);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}

.contact-item--wide {
  grid-column: 1 / -1;
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--radius);
  background: var(--color-primary-soft);
  color: var(--color-accent-bright);
}

.contact-icon svg {
  width: 24px;
  height: 24px;
}

.contact-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

.contact-value {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--text-1);
  overflow-wrap: anywhere;
}

.contact-item--link {
  border-radius: var(--radius);
  padding: 4px;
  margin: -4px;
}

.contact-item--link .contact-value {
  color: var(--color-accent);
}

.contact-item--link:hover .contact-value {
  text-decoration: underline;
}

.contact-cta {
  margin-top: 30px;
}

/* --------------------------------------------------------------------------
   10. 页脚 —— 纯黑收尾 + 网格 + 红色顶边
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  background-color: var(--bg-0);
  background-image:
    radial-gradient(800px 320px at 15% 0%, rgba(224, 32, 46, 0.10), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: auto, 46px 46px, 46px 46px;
  color: var(--text-1);
  padding: 48px 0 36px;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), transparent 60%);
}

.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.footer-bottom p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-3);
}

.footer-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-3);
  transition: color 150ms ease-out;
}

.footer-bottom a:hover {
  color: var(--text-1);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   11. 返回顶部按钮
   -------------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(33, 37, 46, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md);
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 200ms ease-out, transform 200ms ease-out,
              background-color 150ms ease-out;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--bg-3);
}

/* --------------------------------------------------------------------------
   12. 隐私政策占位页
   -------------------------------------------------------------------------- */
.privacy-container {
  max-width: 680px;
}

.privacy-notice {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-2);
}

/* --------------------------------------------------------------------------
   13. 滚动显现
   -------------------------------------------------------------------------- */
html.anim-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0ms),
              transform 600ms cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0ms);
}

html.anim-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   14. 响应式断点
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .nav-inner {
    height: 60px;
  }

  .hero {
    margin-top: -60px;
  }

  .site-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-nav {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    background: rgba(25, 28, 35, 0.97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 6px 6px;
    transition: max-height 200ms ease-out, opacity 200ms ease-out,
                visibility 0s linear 200ms;
  }

  .mobile-nav.is-open {
    max-height: 320px;
    opacity: 1;
    visibility: visible;
    transition: max-height 200ms ease-out, opacity 200ms ease-out,
                visibility 0s;
  }

  .mobile-nav a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0 24px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-2);
    border-top: 1px solid var(--line);
  }

  .mobile-nav a:first-child {
    border-top: none;
  }

  .mobile-nav a:hover,
  .mobile-nav a.is-active {
    color: var(--text-1);
    background: rgba(224, 32, 46, 0.14);
  }

  .hero {
    padding: 140px 0 96px;
  }

  .section {
    padding: 72px 0;
  }

  .contact-card {
    padding: 24px;
    gap: 20px;
  }

  .business-card {
    padding: 28px 24px 26px;
  }

  h3 {
    font-size: 18px;
  }
}

@media (min-width: 768px) {
  .business-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .contact-card {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 34px;
  }
}

/* --------------------------------------------------------------------------
   15. 无障碍：prefers-reduced-motion 降级
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.anim-ready .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-inner::before {
    animation: none;
    opacity: 0;
  }

  .business-card,
  .business-card:hover,
  .btn,
  .btn:hover {
    transform: none;
  }

  .mobile-nav {
    transition: none;
  }

  .menu-line {
    transition: none;
  }

  .site-nav a::after {
    transition: none;
  }

  .back-to-top {
    transform: none;
    transition: opacity 200ms ease-out, background-color 150ms ease-out;
  }
}
