:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --panel: #ffffff;
  --line: #e3e8ef;
  --line-strong: #cfd8e3;
  --text: #172033;
  --muted: #64748b;
  --blue: #0f6bff;
  --green: #16a34a;
  --amber: #f59e0b;
  --red: #dc3f45;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.13);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  overflow-x: hidden;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: 64px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #1e293b;
  font-weight: 760;
}

.nav-logo img { height: 36px; width: auto; }

.nav-logo span {
  font-size: 18px;
  letter-spacing: 0;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--blue); }

.nav-links .nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 780;
}

.hero {
  min-height: 92vh;
  padding: 116px 24px 70px;
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(247,249,252,0.96) 0%, rgba(247,249,252,0.78) 54%, rgba(247,249,252,0.9) 100%),
    url("../media/projects/bridge_常泰.png") center/cover no-repeat;
}

.hero-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 52px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  border: 1px solid #d7e2ef;
  color: #37506e;
  font-size: 13px;
  font-weight: 760;
}

.hero h1 {
  max-width: 700px;
  color: #111827;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.05;
  font-weight: 880;
  letter-spacing: 0;
  margin-bottom: 22px;
}

.hero h1 span { color: var(--blue); }

.hero-text {
  max-width: 640px;
  color: #475569;
  font-size: 18px;
  margin-bottom: 34px;
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 760;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 12px 24px rgba(15, 107, 255, 0.2);
}

.btn-secondary {
  background: rgba(255,255,255,0.78);
  color: #24364d;
  border: 1px solid var(--line-strong);
}

.btn-primary:hover,
.btn-secondary:hover { transform: translateY(-2px); }

.platform-panel {
  background: #fff;
  border: 1px solid #dce4ee;
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  background: #172033;
  color: #fff;
}

.panel-top strong { font-size: 15px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #bbf7d0;
  font-size: 12px;
  font-weight: 760;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}

.panel-body { padding: 20px; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  border: 1px solid #e4eaf2;
  background: #f8fafc;
  border-radius: 10px;
  padding: 14px;
}

.metric .label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.metric .value {
  color: #0f172a;
  font-size: 24px;
  font-weight: 840;
  line-height: 1.2;
}

.metric .hint {
  color: #8391a4;
  font-size: 12px;
  margin-top: 5px;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
}

.chart-box,
.device-list-compact {
  border: 1px solid #e4eaf2;
  background: #fff;
  border-radius: 12px;
  min-height: 226px;
}

.chart-box { padding: 16px; }

.chart-title {
  display: flex;
  justify-content: space-between;
  color: #334155;
  font-size: 13px;
  font-weight: 760;
  margin-bottom: 16px;
}

.chart {
  height: 150px;
  border-left: 1px solid #d8e1eb;
  border-bottom: 1px solid #d8e1eb;
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 0 6px 0 12px;
}

.bar {
  flex: 1;
  min-width: 8px;
  border-radius: 5px 5px 0 0;
  background: var(--blue);
  opacity: 0.86;
}

.bar:nth-child(2n) { background: #14b8a6; }
.bar:nth-child(3n) { background: var(--amber); }

.device-list-compact { padding: 14px; }

.device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f7;
  font-size: 13px;
  color: #475569;
}

.device-row:last-child { border-bottom: 0; }

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  flex: 0 0 auto;
}

.dot.warn { background: var(--amber); }

section { padding: 86px 24px; }

.section-inner {
  width: min(1140px, 100%);
  margin: 0 auto;
}

.section-head {
  margin-bottom: 42px;
  max-width: 760px;
}

.section-kicker {
  color: var(--blue);
  font-size: 13px;
  font-weight: 840;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-head h2,
.cta-inner h2 {
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  margin-bottom: 12px;
  letter-spacing: 0;
}

.section-head p,
.cta-inner p {
  color: var(--muted);
  font-size: 16px;
}

.live-device-band {
  background: #fff;
  border-top: 1px solid #e4eaf2;
  border-bottom: 1px solid #e4eaf2;
}

.live-device-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 22px;
  margin-bottom: 22px;
}

.live-device-head .section-head { margin-bottom: 0; }

.live-device-meta {
  display: grid;
  gap: 8px;
  min-width: 260px;
  color: var(--muted);
  font-size: 13px;
}

.live-device-meta strong {
  color: #172033;
  font-size: 16px;
}

.live-device-board {
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 16px;
}

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

.live-chart-window {
  min-height: 206px;
  border: 1px solid #e4eaf2;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.live-chart-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #334155;
  font-size: 13px;
  font-weight: 820;
  margin-bottom: 10px;
}

.live-chart-title span:last-child {
  color: #8391a4;
  font-weight: 700;
}

.live-chart-value {
  color: #0f172a;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 850;
  margin-bottom: 12px;
}

.live-chart-window p {
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.live-chart-window a {
  margin-top: 16px;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  color: var(--blue);
  font-size: 14px;
  font-weight: 780;
}

.fit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.fit-card,
.flow-item {
  background: #fff;
  border: 1px solid #e4eaf2;
  border-radius: 10px;
  padding: 22px;
}

.fit-card .num {
  color: var(--blue);
  font-size: 13px;
  font-weight: 880;
  margin-bottom: 14px;
}

.fit-card h3,
.flow-item h3 {
  color: #111827;
  font-size: 20px;
  line-height: 1.28;
  margin-bottom: 10px;
}

.fit-card p,
.flow-item p {
  color: var(--muted);
  font-size: 15px;
}

.system-band {
  background: #172033;
  color: #fff;
}

.system-band .section-head h2,
.system-band .flow-item h3 { color: #fff; }

.system-band .section-head p,
.system-band .flow-item p { color: #cbd5e1; }

.flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.flow-item {
  background: #223047;
  border-color: rgba(255, 255, 255, 0.1);
}

.status-section { padding-top: 54px; padding-bottom: 54px; }

.status-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 0.9fr);
  gap: 16px;
}

.status-main,
.status-metrics {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.status-main {
  min-height: 116px;
  padding: 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: center;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--amber);
}

.status-dot.ok { background: var(--green); }
.status-dot.bad { background: var(--red); }

.status-main strong {
  display: block;
  font-size: 24px;
  line-height: 1.2;
}

.status-main small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.status-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.status-metrics div {
  padding: 20px;
  border-right: 1px solid var(--line);
}

.status-metrics div:last-child { border-right: 0; }

.status-metrics span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.status-metrics strong {
  display: block;
  margin-top: 9px;
  font-size: 23px;
  line-height: 1.1;
  font-weight: 880;
  letter-spacing: 0;
}

.cta-band {
  padding-top: 56px;
  padding-bottom: 56px;
}

.cta-inner {
  width: min(1140px, 100%);
  margin: 0 auto;
  min-height: 150px;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #dfe7f0;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.09);
}

.cta-inner p { max-width: 720px; }

footer {
  min-height: 92px;
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.beian-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.beian-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.beian-links img {
  width: 16px;
  height: 16px;
}

@media (max-width: 1120px) {
  .nav-links a:not(.nav-cta):not(:last-child) { display: none; }
  .hero-inner,
  .status-strip {
    grid-template-columns: 1fr;
  }
  .live-chart-grid,
  .fit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .site-nav {
    height: 60px;
    padding: 0 14px;
  }
  .nav-logo span { display: none; }
  .nav-links { gap: 8px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .hero {
    min-height: auto;
    padding: 92px 16px 42px;
  }
  .hero-inner { gap: 28px; }
  .hero h1 { font-size: 38px; }
  .hero-text { font-size: 16px; }
  .dashboard,
  .metric-grid,
  .live-chart-grid,
  .fit-grid,
  .flow,
  .status-metrics {
    grid-template-columns: 1fr;
  }
  section { padding: 52px 16px; }
  .live-device-head,
  .cta-inner {
    align-items: flex-start;
    flex-direction: column;
  }
  .status-metrics div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .status-metrics div:last-child { border-bottom: 0; }
}
