:root {
  /* 白灰机构站（参考开放原子）；红色仅用于主按钮 */
  --color-primary: #1a1a1a;
  --color-button: #e60012;
  --color-button-hover: #c40010;
  --color-text: #333333;
  --color-muted: #666666;
  --color-bg-1: #ffffff;
  --color-bg-2: #f5f5f5;
  --color-surface: #ffffff;
  --color-line: rgba(0, 0, 0, 0.08);
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-brand: "DM Sans", "Noto Sans SC", sans-serif;
  --header-h: 72px;
  --radius: 4px;
  --max: 1120px;
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  line-height: 1.65;
  background: var(--color-bg-1);
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #000000;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.btn-primary:focus-visible {
  outline-color: var(--color-button);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 1000;
  background: var(--color-primary);
  color: #fff;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.section {
  padding: 4.5rem 0;
  background: #ffffff;
}

.section-alt {
  background: var(--color-bg-2);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 40rem;
}

.section-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 700;
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  line-height: 1.25;
  color: var(--color-primary);
}

.section-desc {
  margin: 0;
  color: var(--color-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
  background: var(--color-button);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-button-hover);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border-color: rgba(0, 0, 0, 0.22);
}

.btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-light {
  background: #fff;
  color: var(--color-primary);
  border-color: rgba(255, 255, 255, 0.7);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  /* 不用 backdrop-filter：它会让内部 position:fixed 的侧栏相对顶栏定位，高度被压成顶栏高度 */
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--color-line);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
  overflow: visible;
}

.site-header.is-scrolled {
  background: #ffffff;
  box-shadow: 0 1px 0 var(--color-line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
}

.brand-logo {
  display: block;
  height: 50px;
  width: auto;
  max-width: min(270px, 58vw);
  object-fit: contain;
}

@media (max-width: 768px) {
  .brand-logo {
    height: 41px;
  }
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  padding: 0;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-primary);
  content: "";
  position: relative;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 4px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
}

.site-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  color: var(--color-primary);
}

/* 语言切换：顶栏常驻（行业常见做法，避免侧栏 overflow/transform 裁切） */
.lang-dropdown {
  position: relative;
}

.lang-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.25rem 0;
  border: 0;
  background: transparent;
  color: var(--color-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.lang-dropdown-toggle:hover,
.lang-dropdown.is-open .lang-dropdown-toggle {
  color: var(--color-primary);
}

.lang-icon,
.lang-caret {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.lang-caret {
  transition: transform 0.2s ease;
}

.lang-dropdown.is-open .lang-caret {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 132px;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: #ffffff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 130;
}

.lang-dropdown-menu[hidden] {
  display: none;
}

.lang-dropdown-menu a {
  display: block;
  padding: 0.55rem 1rem;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.lang-dropdown-menu a:hover {
  background: #f5f5f5;
  color: var(--color-primary);
}

.lang-dropdown-menu a[aria-current="page"] {
  color: var(--color-button);
  font-weight: 700;
}

.nav-overlay {
  display: none;
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.82) 45%, rgba(245, 245, 245, 0.55) 100%),
    url("../img/hero-network.svg") center / cover no-repeat;
  border-bottom: 1px solid var(--color-line);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 80px;
  background: linear-gradient(transparent, #ffffff);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 4rem 0 5rem;
  max-width: 38rem;
}

.hero-brand {
  margin: 0 0 1rem;
  font-family: var(--font-brand);
  font-size: clamp(2.8rem, 7vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--color-primary);
  font-weight: 700;
}

.hero-brand span {
  font-family: var(--font-sans);
}

.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 500;
  color: var(--color-text);
}

.hero-desc {
  margin: 0 0 1.75rem;
  color: var(--color-muted);
  font-size: 1.02rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-animate .hero-brand,
.hero-animate .hero-title,
.hero-animate .hero-desc,
.hero-animate .hero-cta {
  animation: hero-rise 0.8s ease both;
}

.hero-animate .hero-title {
  animation-delay: 0.08s;
}

.hero-animate .hero-desc {
  animation-delay: 0.16s;
}

.hero-animate .hero-cta {
  animation-delay: 0.24s;
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.impact {
  padding: 2.5rem 0;
}

.impact.section-alt {
  background: var(--color-bg-2);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

@media (max-width: 1024px) {
  .impact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.impact-item {
  text-align: left;
}

.impact-num {
  display: block;
  font-family: var(--font-brand);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.1;
}

.impact-num::after {
  content: attr(data-suffix);
  margin-left: 0.1em;
  font-size: 0.55em;
}

.impact-label {
  display: block;
  margin-top: 0.4rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.project-grid,
.news-grid,
.service-grid {
  display: grid;
  gap: 1.25rem;
}

.project-grid {
  grid-template-columns: repeat(2, 1fr);
}

.project-card,
.news-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover,
.news-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 0, 0, 0.18);
  color: inherit;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary);
  border: 1px solid rgba(0, 0, 0, 0.16);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: #fafafa;
}

.badge-accent {
  color: var(--color-primary);
  border-color: rgba(0, 0, 0, 0.28);
  background: #f0f0f0;
}

.card-title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: var(--color-primary);
}

.card-desc {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.section-link {
  margin-top: 1.5rem;
}

.case-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.case-list li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--color-line);
}

.case-industry {
  font-weight: 700;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.case-list h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--color-primary);
}

.case-list p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.invite-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.invite-block h3 {
  margin: 0 0 0.75rem;
  font-size: 1.4rem;
  color: var(--color-primary);
}

.invite-block p {
  margin: 0 0 1.25rem;
  color: var(--color-muted);
}

.service-grid {
  grid-template-columns: repeat(3, 1fr);
}

.service-item {
  padding: 1.25rem 0;
  border-top: 1px solid var(--color-line);
}

.service-item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--color-primary);
}

.service-item p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.activity-panel {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.activity-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.activity-list li {
  padding-left: 1rem;
  border-left: 3px solid var(--color-primary);
  color: var(--color-muted);
}

.calendar-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.calendar-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--color-primary);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  text-align: center;
}

.calendar-dow {
  font-size: 0.75rem;
  color: var(--color-muted);
  padding: 0.35rem 0;
}

.calendar-day {
  appearance: none;
  border: 0;
  background: transparent;
  min-height: 36px;
  border-radius: 4px;
  font: inherit;
  color: var(--color-text);
  cursor: default;
}

.calendar-day.is-muted {
  color: #b0b8c0;
}

.calendar-day.has-event {
  cursor: pointer;
  background: #eeeeee;
  color: var(--color-primary);
  font-weight: 700;
}

.calendar-day.is-selected {
  background: var(--color-primary);
  color: #fff;
}

.calendar-agenda {
  margin-top: 1rem;
  min-height: 3.5rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.calendar-agenda strong {
  display: block;
  color: var(--color-primary);
  margin-bottom: 0.35rem;
}

.news-grid {
  grid-template-columns: repeat(3, 1fr);
}

.news-date {
  display: block;
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}

.page-hero {
  padding: 3.5rem 0 1.5rem;
}

.page-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--color-primary);
}

.page-hero p {
  margin: 0;
  max-width: 40rem;
  color: var(--color-muted);
}

.content-stack {
  display: grid;
  gap: 1.25rem;
  padding-bottom: 4rem;
}

.prose {
  max-width: 42rem;
}

.prose h2 {
  margin: 2rem 0 0.75rem;
  color: var(--color-primary);
  font-size: 1.3rem;
}

.prose p,
.prose li {
  color: var(--color-muted);
}

.prose ol {
  padding-left: 1.2rem;
}

.site-footer {
  margin-top: 0;
  padding: 3rem 0 0;
  background: #222222;
  color: rgba(255, 255, 255, 0.86);
}

.site-footer a {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  font-family: var(--font-brand);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: #fff;
}

.footer-brand span {
  font-family: var(--font-sans);
}

.site-footer h3 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  color: #fff;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-list a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.86);
}

.footer-list a:hover {
  color: #fff;
}

.subscribe-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.subscribe-form input {
  flex: 1 1 180px;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  padding: 0.55rem 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
}

.subscribe-form input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.subscribe-msg {
  margin: 0.6rem 0 0;
  min-height: 1.25em;
  font-size: 0.9rem;
}

.footer-bottom {
  padding: 1.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom > p {
  margin: 0;
}

.footer-bottom a {
  color: inherit;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: inherit;
  text-decoration: none;
}

.footer-beian {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin: 0;
}

.footer-gongan {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-gongan-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
}

.footer-note {
  margin: 0;
}

@media (max-width: 1024px) {
  .service-grid,
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .activity-panel,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-tools {
    margin-left: auto;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* 窄屏只显示地球图标，避免顶栏挤出屏幕 */
  .lang-dropdown-toggle span,
  .lang-dropdown-toggle .lang-caret {
    display: none;
  }

  .lang-dropdown-toggle {
    width: 44px;
    height: 44px;
    justify-content: center;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: #fff;
  }

  .lang-dropdown-menu {
    position: fixed;
    top: calc(var(--header-h) - 2px);
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    left: auto;
    z-index: 140;
  }

  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(26, 35, 50, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 90;
  }

  .nav-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    margin-left: 0;
    width: min(84vw, 320px);
    height: 100vh;
    height: 100dvh;
    max-height: none;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 5rem 1.25rem 1.5rem;
    gap: 0.35rem;
    transform: translate3d(100%, 0, 0);
    transition: transform 0.25s ease, visibility 0.25s ease;
    z-index: 110;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.1);
    visibility: hidden;
    pointer-events: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .site-nav.is-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 0.75rem 0.25rem;
    border-bottom: 1px solid var(--color-line);
  }

  .impact-grid,
  .project-grid,
  .invite-grid,
  .service-grid,
  .news-grid,
  .activity-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .case-list li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding: 3rem 0 4rem;
  }
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.5rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  background: #ffffff;
  color: var(--color-primary);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease,
    background-color 0.2s ease, color 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-button);
  border-color: var(--color-button);
  color: #fff;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-animate .hero-brand,
  .hero-animate .hero-title,
  .hero-animate .hero-desc,
  .hero-animate .hero-cta,
  .project-card,
  .news-card,
  .site-nav,
  .nav-overlay,
  .back-to-top {
    animation: none !important;
    transition: none !important;
  }

  .project-card:hover,
  .news-card:hover {
    transform: none;
  }
}
