:root {
  --bg: #061426;
  --cyan: #22c9f0;
  --cyan-bright: #22d2ff;
  --gold: #e2a53f;
  --text: #f5f8fc;
  --muted: #cbd9e8;
  --ok: #7ee2b8;
  --error: #ffb5a8;
  --gutter: clamp(20px, 5.7vw, 95px);
  --font: Arial, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--cyan);
  color: #04162a;
  font-weight: 700;
  border-radius: 6px;
}
.skip-link:focus { top: 16px; }

/* ---------- Header ---------- */
.header {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding: 35px var(--gutter);
}

.brand { display: block; flex: none; line-height: 0; }
.brand img { display: block; width: auto; height: 54px; }

.header nav {
  display: flex;
  gap: clamp(18px, 3.4vw, 60px);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}
.header nav a { transition: color .15s; }
.header nav a:hover,
.header nav a[aria-current="page"] { color: var(--cyan); }

main { flex: 1; display: flex; flex-direction: column; }

/* ---------- Hero ---------- */
.hero {
  flex: 1;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 125px var(--gutter) 75px;
  background-color: #0a1c33;
  background-image:
    linear-gradient(90deg, rgba(2, 14, 30, .33) 0%, rgba(2, 14, 30, .13) 80%),
    url("/assets/bg.jpg");
  background-image:
    linear-gradient(90deg, rgba(2, 14, 30, .33) 0%, rgba(2, 14, 30, .13) 80%),
    image-set(url("/assets/bg.avif") type("image/avif"), url("/assets/bg.webp") type("image/webp"), url("/assets/bg.jpg") type("image/jpeg"));
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-inner { max-width: 850px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 20px;
  color: var(--cyan-bright);
  font-size: clamp(15px, 1.7vw, 23px);
  font-weight: 700;
  letter-spacing: .06em;
}
.eyebrow span {
  display: inline-block;
  width: 72px;
  height: 2px;
  background: var(--gold);
}

.hero h1 {
  margin: 0 0 25px;
  font-size: clamp(38px, 5.45vw, 86px);
  font-weight: 800;
  line-height: 1.26;
  letter-spacing: .02em;
  text-wrap: balance;
}

.lead {
  max-width: 800px;
  margin: 0 0 32px;
  color: #e6edf5;
  font-size: clamp(16px, 1.55vw, 22px);
  line-height: 1.85;
  text-shadow: 0 2px 10px #071322;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 52px;
  padding: 10px 29px;
  background: linear-gradient(125deg, #02bce9, #1987ed);
  color: #fff;
  border: 1px solid #4cdbff;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 115, 220, .27);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  transition: filter .15s, transform .15s;
}
.button:hover { filter: brightness(1.13); }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .65; cursor: progress; filter: none; }

/* ---------- Inner pages ---------- */
.inner-page { padding-top: 160px; padding-bottom: 105px; }
.inner-page h1 { font-size: clamp(38px, 5.1vw, 76px); }

/* ---------- Contact form ---------- */
.contact-form { max-width: 680px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.field { margin: 20px 0; }
.field label { display: block; margin-bottom: 7px; color: #e9f4ff; font-weight: 700; }
.field label small { margin-left: 6px; color: var(--muted); font-weight: 400; font-size: 13px; }
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  color: #142b42;
  border: 1px solid #a6b8c8;
  border-radius: 7px;
  font: inherit;
  font-size: 16px; /* 防止 iOS 聚焦时自动放大 */
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:user-invalid,
.field textarea:user-invalid { border-color: #ff7a66; box-shadow: 0 0 0 2px rgba(255, 122, 102, .35); }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { min-height: 1.6em; margin: 4px 0 16px; font-weight: 700; text-shadow: 0 1px 6px #071322; }
.form-status.is-error { color: var(--error); }
.form-status.is-ok { color: var(--ok); }

/* ---------- Content sections ---------- */
.section {
  padding: clamp(64px, 8vw, 110px) var(--gutter);
  background: var(--bg);
  border-top: 1px solid rgba(76, 219, 255, .12);
}
.section-inner { max-width: 1320px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.section-head .eyebrow { font-size: clamp(14px, 1.3vw, 17px); margin-bottom: 14px; }
.section h2 { margin: 0; font-size: clamp(26px, 3vw, 42px); line-height: 1.3; letter-spacing: .02em; text-wrap: balance; }
.section-note { margin: 12px 0 0; color: var(--muted); font-size: 16px; max-width: 640px; }


/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 0 48px;
  padding: 0;
  list-style: none;
  border: 1px solid rgba(76, 219, 255, .18);
  border-radius: 12px;
  background: rgba(12, 35, 64, .6);
}
.stats li { padding: 24px 28px; }
.stats li + li { border-left: 1px solid rgba(76, 219, 255, .14); }
.stats strong { display: block; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; }
.stats strong small { margin-left: 4px; font-size: .42em; font-weight: 700; color: var(--muted); }
.stats span { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }

/* Project list */
.projects { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 32px;
  align-items: center;
  padding: 22px 28px;
  background: #0b2038;
  border: 1px solid rgba(76, 219, 255, .14);
  border-radius: 12px;
  transition: border-color .15s, background .15s;
}
.project:hover { border-color: rgba(76, 219, 255, .4); background: #0d2542; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; font-size: 13px; }
.tag { padding: 2px 10px; border-radius: 999px; background: rgba(34, 201, 240, .12); color: #8fe6ff; }
.tag.place { background: rgba(226, 165, 63, .14); color: #f2c77c; }
.project h3 { margin: 0; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; font-weight: 700; }
.project-meta { display: flex; align-items: center; gap: 24px; text-align: right; }
.scope { color: var(--muted); font-size: 14px; white-space: nowrap; }
.scope b { display: block; color: var(--text); font-size: 15px; }
.count { min-width: 112px; }
.count strong { display: block; font-size: 32px; line-height: 1.1; font-weight: 800; color: var(--cyan-bright); font-variant-numeric: tabular-nums; }
.count span { color: var(--muted); font-size: 13px; }
.bar { grid-column: 1 / -1; height: 3px; margin-top: 6px; background: rgba(255, 255, 255, .06); border-radius: 2px; overflow: hidden; }
.bar svg { display: block; width: 100%; height: 100%; }
.bar rect { fill: #10a8ec; }


/* Compact page hero (pages with content below) */
.page-hero { min-height: 62svh; padding-top: 170px; padding-bottom: 70px; }

.cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-top: 48px; padding: 28px 32px;
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(2, 188, 233, .16), rgba(25, 135, 237, .1));
  border: 1px solid rgba(76, 219, 255, .25);
}
.cta p { margin: 0; font-size: 18px; font-weight: 700; }

@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li:nth-child(3) { border-left: 0; }
  .stats li:nth-child(n+3) { border-top: 1px solid rgba(76, 219, 255, .14); }
}
@media (max-width: 760px) {
  .page-hero { min-height: auto; padding-top: 56px; padding-bottom: 56px; }
  .section-head { margin-bottom: 28px; }
  .stats li { padding: 18px 18px; }
  .stats { margin-bottom: 32px; }
  .project { grid-template-columns: 1fr; padding: 20px; }
  .project-meta { justify-content: space-between; text-align: left; padding-top: 14px; border-top: 1px solid rgba(76, 219, 255, .12); }
  .count { min-width: 0; text-align: right; }
  .count strong { font-size: 28px; }
  .cta { padding: 22px 20px; }
  .cta p { font-size: 16px; }
}

/* Stats inside about hero */
.stats-compact { grid-template-columns: repeat(2, 1fr) !important; max-width: 560px; margin: 0 0 12px; background: rgba(6, 20, 38, .62); backdrop-filter: blur(6px); }
.stats-compact li { padding: 18px 22px; border: 0 !important; }
.stats-compact li:nth-child(even) { border-left: 1px solid rgba(76, 219, 255, .14) !important; }
.stats-compact li:nth-child(n+3) { border-top: 1px solid rgba(76, 219, 255, .14) !important; }
.stats-compact strong { font-size: clamp(28px, 2.6vw, 40px); }
.stats-compact span { margin-top: 6px; font-size: 13px; }
.stats-note { margin: 0 0 32px; color: var(--muted); font-size: 14px; text-shadow: 0 1px 6px #071322; }

/* ---------- About: project index ---------- */
.about-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.project-index {
  padding: 28px 30px 24px;
  background: rgba(6, 20, 38, .74);
  border: 1px solid rgba(76, 219, 255, .22);
  border-radius: 14px;
  backdrop-filter: blur(6px);
}
.project-index h2 { margin: 0 0 10px; font-size: 18px; letter-spacing: .04em; color: var(--cyan-bright); }
.project-index ol { margin: 0; padding: 0; list-style: none; counter-reset: idx; }
.project-index li { counter-increment: idx; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.project-index li a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 13px 0;
  font-size: 15px;
  line-height: 1.5;
  transition: color .15s;
}
.project-index li a::before { content: counter(idx, decimal-leading-zero); color: var(--gold); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.project-index li a i { font-style: normal; color: var(--muted); transition: transform .15s, color .15s; }
.project-index li a:hover { color: var(--cyan); }
.project-index li a:hover i { color: var(--cyan); transform: translateX(3px); }
.index-more { display: inline-block; margin-top: 16px; color: var(--cyan); font-size: 14px; font-weight: 700; }
.index-more:hover { color: #7fe3ff; }

/* ---------- Clickable project cards ---------- */
.project { position: relative; }
.project h3 a.stretched::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.project h3 a:hover, .project:hover h3 a { color: var(--cyan); }

/* ---------- Project detail ---------- */
.detail-hero h1 { font-size: clamp(30px, 3.6vw, 54px); line-height: 1.3; }
.detail-hero .eyebrow a:hover { color: #7fe3ff; }
.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.detail-main h2 { margin: 0 0 16px; font-size: 22px; letter-spacing: .02em; }
.detail-main h2:not(:first-child) { margin-top: 44px; }
.detail-main > p { margin: 0 0 16px; color: #dbe6f1; font-size: 17px; line-height: 1.95; }
.facts { margin: 0; border-top: 1px solid rgba(76, 219, 255, .14); }
.facts div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(76, 219, 255, .1); }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; font-size: 15px; }
.sources { margin-top: 44px; padding: 22px 24px; border-radius: 12px; background: rgba(12, 35, 64, .5); border: 1px solid rgba(255, 255, 255, .06); }
.sources h2 { margin: 0 0 6px !important; font-size: 16px; }
.sources p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.sources ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.8; }
.sources a { color: #8fe6ff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(143, 230, 255, .35); }
.sources a:hover { color: #fff; }

.detail-side { position: sticky; top: 24px; }
.side-card { padding: 26px; background: #0b2038; border: 1px solid rgba(76, 219, 255, .22); border-radius: 14px; }
.side-card h2 { margin: 0 0 12px; font-size: 17px; color: var(--cyan-bright); }
.side-card dl { margin: 0 0 22px; }
.side-card dl div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.side-card dt { color: var(--muted); font-size: 14px; }
.side-card dd { margin: 0; font-weight: 700; text-align: right; }
.side-card dd strong { font-size: 30px; color: var(--cyan-bright); font-variant-numeric: tabular-nums; }
.side-card .button { width: 100%; }

.pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid rgba(76, 219, 255, .12);
}
.pager a { transition: color .15s; }
.pager a:hover { color: var(--cyan); }
.pager-prev, .pager-next { display: flex; flex-direction: column; gap: 2px; font-size: 15px; font-weight: 700; }
.pager-next { text-align: right; }
.pager small { color: var(--muted); font-size: 13px; font-weight: 400; }
.pager-all { padding: 8px 18px; border: 1px solid rgba(76, 219, 255, .3); border-radius: 999px; color: var(--cyan); font-size: 14px; font-weight: 700; }

@media (max-width: 1020px) {
  .about-layout, .detail { grid-template-columns: 1fr; }
  .detail-side { position: static; order: -1; }
}
@media (max-width: 760px) {
  .about-layout { gap: 36px; }
  .project-index { padding: 22px 18px 18px; }
  .project-index li a { font-size: 14px; }
  .detail-hero h1 { font-size: clamp(24px, 7vw, 34px); }
  .detail-main > p { font-size: 16px; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .pager { grid-template-columns: 1fr 1fr; align-items: start; }
  .pager-all { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
}

/* ---------- Services ---------- */
.section-alt { background: #071a30; }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; padding: 0; list-style: none; }
.svc-card { padding: 28px 26px; background: #0b2038; border: 1px solid rgba(76, 219, 255, .14); border-radius: 12px; }
.svc-no { display: block; margin-bottom: 14px; color: var(--gold); font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.svc-card h3 { margin: 0 0 10px; font-size: 21px; }
.svc-card p { margin: 0; color: #cfdceb; font-size: 15px; line-height: 1.85; }
.brand-row { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 20px; align-items: center; padding: 22px 0; border-top: 1px solid rgba(76, 219, 255, .12); }
.brand-row:last-child { border-bottom: 1px solid rgba(76, 219, 255, .12); }
.brand-row h3 { margin: 0; color: var(--muted); font-size: 15px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 8px 16px; border: 1px solid rgba(76, 219, 255, .25); border-radius: 8px; background: rgba(12, 35, 64, .6); font-size: 15px; font-weight: 700; }
.chips .chip-more { border-color: transparent; background: none; color: var(--muted); font-weight: 400; padding-left: 4px; }
.chips-lg li { padding: 12px 22px; font-size: 17px; }
@media (max-width: 960px) { .svc-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .brand-row { grid-template-columns: 1fr; gap: 12px; }
  .chips li { font-size: 14px; padding: 7px 12px; }
  .chips-lg li { font-size: 15px; padding: 10px 16px; }
}

/* ---------- Footer ---------- */
footer {
  padding: 25px var(--gutter);
  background: var(--bg);
  color: #b7c7d6;
  font-size: 13px;
  text-align: center;
}

/* ---------- 404 ---------- */
.not-found .hero-inner { max-width: 640px; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .header {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 20px 12px;
    background: #07172a;
  }
  .brand img { height: 42px; }
  .header nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
  }
  .header nav a { padding: 6px 0; } /* 加大触控区域 */
  .hero {
    min-height: calc(100svh - 112px);
    padding: 64px 20px 72px;
    background-position: 55% center;
  }
  .hero h1, .inner-page h1 { font-size: clamp(30px, 9.6vw, 61px); }
  .eyebrow { gap: 12px; }
  .eyebrow span { width: 30px; }
  .inner-page { min-height: auto; padding-top: 56px; padding-bottom: 72px; }
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 340px) {
  .header nav { font-size: 13px; }
}
