/* ==========================================================================
   EMC易倍竞界 · Signal Strength — 共享样式表
   存储路径：/assets/site.css
   ========================================================================== */

/* ---------- 1. CSS 变量 ---------- */
:root {
  /* 色彩系统 */
  --emc-deep-space: #0A1628;
  --emc-tech-blue: #1E3A5F;
  --emc-yellow: #F5D623;
  --emc-carbon: #2C2C2C;
  --emc-silver: #C0C0C0;
  --emc-white: #FFFFFF;
  --emc-signal: #00A8E8;
  --emc-shadow: #050A13;

  /* 字体 */
  --emc-font-heading: "Archivo Black", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --emc-font-body: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --emc-font-data: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* 字号阶梯 */
  --emc-h1: clamp(2.5rem, 6vw, 4.5rem);
  --emc-h2: clamp(2rem, 4vw, 3rem);
  --emc-h3: clamp(1.5rem, 2.5vw, 2rem);
  --emc-body: 1rem;
  --emc-small: 0.875rem;

  /* 布局 */
  --emc-container: 1280px;
  --emc-gutter: clamp(16px, 3vw, 40px);
  --emc-header-h: 71px;
  --emc-radius: 2px;

  /* 动效 */
  --emc-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --emc-transition-fast: 0.25s ease;
  --emc-transition-base: 0.4s var(--emc-ease-out);
}

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

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd,
pre, ul, ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
}

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

/* ---------- 3. 全局排版 ---------- */
body {
  font-family: var(--emc-font-body);
  font-size: var(--emc-body);
  line-height: 1.75;
  color: var(--emc-white);
  background-color: var(--emc-deep-space);
  padding-top: var(--emc-header-h);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--emc-font-heading);
  line-height: 1.15;
  color: var(--emc-white);
  font-weight: 700;
}

h1 { font-size: var(--emc-h1); }
h2 { font-size: var(--emc-h2); }
h3 { font-size: var(--emc-h3); }

p {
  margin-bottom: 1em;
}

::selection {
  background: var(--emc-yellow);
  color: var(--emc-deep-space);
}

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

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--emc-deep-space);
}

::-webkit-scrollbar-thumb {
  background: var(--emc-tech-blue);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--emc-yellow);
}

/* ---------- 4. 容器与布局 ---------- */
.container {
  width: 100%;
  max-width: var(--emc-container);
  margin-inline: auto;
  padding-inline: var(--emc-gutter);
}

main {
  display: block;
}

.grid {
  display: grid;
  gap: clamp(20px, 2.5vw, 36px);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1023px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 599px) {
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: 1fr; }
}

.chapter {
  position: relative;
  padding-block: clamp(64px, 10vw, 120px);
}

.chapter--tinted {
  background: var(--emc-tech-blue);
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--emc-font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-decoration: none;
  border: none;
  cursor: pointer;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  transition: background-color var(--emc-transition-fast),
              color var(--emc-transition-fast),
              box-shadow var(--emc-transition-fast),
              transform var(--emc-transition-fast);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--emc-yellow);
  color: var(--emc-deep-space);
  font-weight: 700;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--emc-white);
  box-shadow: 0 12px 32px rgba(245, 214, 35, 0.3);
}

.btn--ghost {
  background: transparent;
  color: var(--emc-white);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  color: var(--emc-yellow);
  box-shadow: inset 0 0 0 2px var(--emc-yellow);
}

.btn--block {
  display: flex;
  width: 100%;
}

/* ---------- 6. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  font-family: var(--emc-font-body);
  font-size: 13px;
  color: var(--emc-silver);
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "/";
  font-family: var(--emc-font-data);
  font-size: 11px;
  color: var(--emc-carbon);
}

.breadcrumb a {
  color: var(--emc-silver);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--emc-yellow);
}

.breadcrumb li[aria-current="page"] {
  color: var(--emc-white);
}

/* ---------- 7. 内页题头 ---------- */
.page-hero {
  position: relative;
  padding: clamp(56px, 8vw, 110px) 0 clamp(28px, 4vw, 56px);
  background: linear-gradient(135deg, var(--emc-deep-space) 0%, var(--emc-tech-blue) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.page-hero__no {
  font-family: var(--emc-font-data);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--emc-yellow);
  margin-bottom: 8px;
}

.page-hero__title {
  font-family: var(--emc-font-heading);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.1;
  margin-bottom: 12px;
}

.page-hero__desc {
  color: var(--emc-silver);
  font-size: 15px;
  max-width: 560px;
}

/* ---------- 8. 头部 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(5, 10, 19, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  background: var(--emc-yellow);
  color: var(--emc-deep-space);
  font-family: var(--emc-font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 0 0 4px 0;
}

.skip-link:focus-visible {
  left: 0;
  outline: none;
  box-shadow: 0 0 0 4px rgba(245, 214, 35, 0.3);
}

.scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--emc-yellow);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 1200;
  pointer-events: none;
}

.signal-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.signal-bar__pulse {
  display: block;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--emc-yellow), var(--emc-signal), transparent);
  animation: signal-sweep 3.8s ease-in-out infinite;
}

@keyframes signal-sweep {
  0%   { transform: translateX(-120%); }
  60%  { transform: translateX(80%); }
  100% { transform: translateX(350%); }
}

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

/* ---- 品牌标识 ---- */
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark__block {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 36px;
  background: var(--emc-yellow);
  color: var(--emc-deep-space);
  font-family: var(--emc-font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.brand-mark__copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-mark__cn {
  font-family: var(--emc-font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--emc-white);
  letter-spacing: 0.08em;
}

.brand-mark__en {
  font-size: 10px;
  font-family: var(--emc-font-data);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--emc-silver);
  margin-top: 2px;
}

/* ---- 主导航 ---- */
.main-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 30px);
}

.main-nav__list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 2px;
  font-family: var(--emc-font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.main-nav__list a::before {
  content: attr(data-index);
  font-family: var(--emc-font-data);
  font-size: 10px;
  color: var(--emc-yellow);
  opacity: 0.6;
}

.main-nav__list a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--emc-yellow);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.3s var(--emc-ease-out);
}

.main-nav__list a:hover,
.main-nav__list a:focus-visible,
.main-nav__list a[aria-current="page"] {
  color: var(--emc-yellow);
}

.main-nav__list a:hover::after,
.main-nav__list a:focus-visible::after,
.main-nav__list a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: 0 50%;
}

body.nav-open {
  overflow: hidden;
}

/* ---- 移动端导航按钮 ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--emc-radius);
  padding: 8px;
  flex-shrink: 0;
}

.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--emc-white);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

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

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

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

  .main-nav {
    position: fixed;
    top: var(--emc-header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 10, 19, 0.97);
    padding: 32px var(--emc-gutter) 64px;
    transform: translateX(100%);
    visibility: hidden;
    z-index: 1050;
    transition: transform 0.35s var(--emc-ease-out),
                visibility 0.35s ease;
  }

  .main-nav[data-open] {
    transform: translateX(0);
    visibility: visible;
  }

  .main-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .main-nav__list a {
    display: flex;
    align-items: center;
    padding: 18px 8px;
    font-size: 20px;
    font-weight: 500;
    color: var(--emc-white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .main-nav__list a::before {
    font-size: 12px;
    margin-right: 10px;
    opacity: 0.8;
  }

  .main-nav__list a[aria-current="page"] {
    color: var(--emc-yellow);
    padding-left: 16px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .main-nav__list {
    gap: 12px;
  }

  .main-nav__list a {
    font-size: 13px;
    letter-spacing: 0.03em;
  }

  .brand-mark__cn {
    font-size: 15px;
  }
}

/* ---------- 9. 页脚 ---------- */
.site-footer {
  background: var(--emc-shadow);
  color: var(--emc-silver);
  position: relative;
}

.site-footer::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--emc-yellow) 0%, var(--emc-signal) 50%, transparent 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1.2fr;
  gap: clamp(24px, 3vw, 48px);
  padding-block: clamp(44px, 7vw, 80px);
}

.footer-brand__note {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--emc-silver);
  max-width: 260px;
}

.brand-mark--footer .brand-mark__block {
  width: 56px;
  height: 40px;
  font-size: 16px;
}

.brand-mark--footer .brand-mark__cn {
  font-size: 18px;
}

.brand-mark--footer .brand-mark__en {
  font-size: 11px;
}

.footer-col__title,
.footer-contact .footer-col__title {
  font-family: var(--emc-font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--emc-white);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.footer-col__list,
.footer-contact__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col__list a,
.footer-contact__list a {
  color: var(--emc-silver);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-col__list a:hover,
.footer-col__list a:focus-visible,
.footer-contact__list a:hover,
.footer-contact__list a:focus-visible {
  color: var(--emc-yellow);
}

.footer-contact__item {
  font-size: 14px;
  line-height: 1.6;
  color: var(--emc-silver);
  font-family: var(--emc-font-body);
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: 20px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 20px;
  font-size: 12px;
}

.footer-bottom__copyright {
  color: var(--emc-silver);
}

.footer-bottom__icp {
  color: var(--emc-silver);
  font-family: var(--emc-font-data);
  letter-spacing: 0.05em;
}

@media (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 599px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* ---------- 10. 章节组件 ---------- */
.section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--emc-font-data);
  font-size: 13px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--emc-yellow);
  margin-bottom: 16px;
}

.section-kicker::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--emc-yellow);
  flex-shrink: 0;
}

.section-kicker--center {
  justify-content: center;
}

.section-kicker--center::before {
  display: none;
}

.section-title {
  font-family: var(--emc-font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.12;
  margin-bottom: 16px;
}

.section-desc {
  color: var(--emc-silver);
  max-width: 640px;
  font-size: 15px;
}

.section-no {
  font-family: var(--emc-font-data);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.13);
  user-select: none;
  pointer-events: none;
  position: absolute;
  top: clamp(16px, 3vw, 40px);
  right: var(--emc-gutter);
  z-index: 0;
}

.section-no--solid {
  color: var(--emc-yellow);
  -webkit-text-stroke: 0;
}

.chapter > .container,
.chapter--tinted > .container {
  position: relative;
  z-index: 1;
}

/* ---------- 11. 图片容器 ---------- */
.img-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--emc-tech-blue);
}

.img-frame--16-9 { aspect-ratio: 16 / 9; }
.img-frame--4-3  { aspect-ratio: 4 / 3; }
.img-frame--3-2  { aspect-ratio: 3 / 2; }
.img-frame--1-1  { aspect-ratio: 1 / 1; }

.img-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-frame--tilted {
  clip-path: polygon(4% 0, 100% 0, 96% 100%, 0 100%);
}

.img-frame--placeholder::after {
  content: 'IMG';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--emc-font-data);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, var(--emc-tech-blue) 0%, var(--emc-deep-space) 100%);
}

/* ---------- 12. 竖排文字 ---------- */
.v-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--emc-font-body);
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--emc-silver);
  text-transform: uppercase;
  user-select: none;
}

/* ---------- 13. 滚动显现 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease,
              transform 0.7s var(--emc-ease-out);
}

.js [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 14. 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .signal-bar__pulse {
    animation: none;
    opacity: 0.5;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
