/* ---------------------------------------------------------------
   云启科技 · 站点样式
   纯原生 CSS，无外部依赖，便于 Cloudflare Pages 直接托管
   --------------------------------------------------------------- */

:root {
  --bg: #080c16;
  --bg-soft: #0c1220;
  --surface: #111a2b;
  --surface-2: #162136;
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #eaf0fb;
  --muted: #98a6bd;
  --dim: #6c7b95;
  --brand: #f4811f;
  --brand-light: #ffb65c;
  --brand-soft: rgba(244, 129, 31, .12);
  --radius: 16px;
  --wrap: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.page-glow {
  position: fixed;
  inset: -20% 0 auto 0;
  height: 900px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(560px 340px at 72% 18%, rgba(244, 129, 31, .13), transparent 70%),
    radial-gradient(620px 420px at 18% 4%, rgba(70, 110, 210, .14), transparent 72%);
}

main, .header, .footer { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
h1, h2, h3, h4, p { margin-top: 0; }
ul { margin: 0; padding: 0; list-style: none; }
code { font-family: var(--mono); font-size: .9em; color: var(--brand-light); }

.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn:focus-visible, .nav-toggle:focus-visible, a:focus-visible {
  outline: 2px solid var(--brand-light);
  outline-offset: 3px;
}
.btn--sm { min-height: 38px; padding: 0 18px; font-size: 14px; }
.btn--primary {
  color: #17100a;
  background: linear-gradient(120deg, var(--brand-light), var(--brand));
  box-shadow: 0 8px 26px rgba(244, 129, 31, .22);
}
.btn--primary:hover { box-shadow: 0 12px 32px rgba(244, 129, 31, .34); }
.btn--ghost { color: var(--text); background: rgba(255, 255, 255, .03); border-color: var(--border-strong); }
.btn--ghost:hover { background: rgba(255, 255, 255, .07); }
.btn--outline { color: var(--brand-light); background: var(--brand-soft); border-color: rgba(244, 129, 31, .34); }
.btn--outline:hover { background: rgba(244, 129, 31, .2); }

/* ---------- 导航 ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 12, 22, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.header__inner { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand__mark { border-radius: 10px; }
.brand__name { display: flex; flex-direction: column; font-size: 17px; font-weight: 700; letter-spacing: .04em; line-height: 1.15; }
.brand__name small { color: var(--dim); font-size: 9px; font-weight: 600; letter-spacing: .22em; }
.nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.nav a { color: var(--muted); font-size: 14px; transition: color .2s ease; }
.nav a:hover { color: var(--text); }
.header__cta { flex-shrink: 0; }
.nav-toggle { display: none; }

/* ---------- 首屏 ---------- */
.hero { padding: 96px 0 88px; }
.hero__grid { display: grid; grid-template-columns: 1.06fr .94fr; align-items: center; gap: 64px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border: 1px solid rgba(244, 129, 31, .26);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-light);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
}
.eyebrow__dot, .live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-light);
  box-shadow: 0 0 0 4px rgba(255, 182, 92, .16);
}
.hero h1 { margin: 24px 0 20px; font-size: clamp(38px, 4.6vw, 60px); line-height: 1.22; letter-spacing: -.02em; font-weight: 750; }
.grad {
  background: linear-gradient(100deg, #ffd19a, var(--brand-light) 46%, var(--brand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__desc { max-width: 540px; margin-bottom: 34px; color: var(--muted); font-size: 16.5px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 32px; color: var(--dim); font-size: 13px; }
.hero__meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero__meta svg { color: var(--brand); }

/* 边缘状态卡 */
.edge-card {
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(24, 35, 55, .95), rgba(12, 18, 32, .96));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .05);
  overflow: hidden;
  transform: rotate(-1.2deg);
}
.edge-card__top, .edge-card__foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
}
.edge-card__top { border-bottom: 1px solid var(--border); color: var(--muted); }
.edge-card__title { display: inline-flex; align-items: center; gap: 10px; }
.pill {
  padding: 3px 9px; border-radius: 5px;
  background: rgba(74, 222, 128, .12); color: #6ee7a0;
  font-size: 10px; font-weight: 700;
}
.edge-card__metrics { display: grid; grid-template-columns: repeat(3, 1fr); padding: 26px 20px; gap: 12px; }
.edge-metric { display: flex; flex-direction: column; gap: 5px; }
.edge-metric + .edge-metric { border-left: 1px solid var(--border); padding-left: 18px; }
.edge-metric span { color: var(--dim); font-size: 11.5px; }
.edge-metric strong { color: var(--text); font-size: 27px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.edge-metric small { margin-left: 2px; color: var(--brand-light); font-size: 13px; font-weight: 600; }
.edge-map {
  position: relative;
  height: 132px;
  margin: 0 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 28px 28px;
  overflow: hidden;
}
.edge-map svg { width: 100%; height: 100%; filter: drop-shadow(0 0 6px rgba(244, 129, 31, .5)); }
.edge-map__label { position: absolute; left: 12px; bottom: 9px; color: var(--dim); font-family: var(--mono); font-size: 9px; letter-spacing: .16em; }
.edge-card__foot { color: var(--dim); border-top: 1px solid var(--border); margin-top: 20px; letter-spacing: .04em; }

/* ---------- 数据条 ---------- */
.stats { border-block: 1px solid var(--border); background: rgba(255, 255, 255, .018); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); padding: 30px 0; }
.stats__grid > div { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.stats__grid > div + div { border-left: 1px solid var(--border); }
.stats__grid strong { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.stats__grid strong small { color: var(--brand-light); font-size: 15px; margin-left: 2px; }
.stats__grid span { color: var(--dim); font-size: 13px; }

/* ---------- 通用区块 ---------- */
.section { padding: 100px 0; }
.section--alt { background: linear-gradient(180deg, rgba(12, 18, 32, .6), rgba(8, 12, 22, .2)); border-block: 1px solid var(--border); }
.section--contact { padding-top: 24px; }
.section__head { max-width: 660px; margin-bottom: 48px; }
.section__kicker { display: block; margin-bottom: 14px; color: var(--brand); font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: .2em; }
.section__head h2, .split__copy h2, .banner h2 { margin-bottom: 14px; font-size: clamp(27px, 3vw, 38px); line-height: 1.35; letter-spacing: -.02em; }
.section__head p, .split__lead { color: var(--muted); margin-bottom: 0; }

/* ---------- 服务卡片 ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  padding: 30px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface), rgba(13, 20, 34, .7));
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-5px); border-color: rgba(244, 129, 31, .35); box-shadow: 0 20px 44px rgba(0, 0, 0, .28); }
.card__icon {
  display: grid; place-items: center;
  width: 46px; height: 46px; margin-bottom: 22px;
  border: 1px solid rgba(244, 129, 31, .28); border-radius: 12px;
  background: var(--brand-soft); color: var(--brand-light);
}
.card h3 { margin-bottom: 10px; font-size: 19px; }
.card p { min-height: 52px; color: var(--muted); font-size: 14.5px; }
.card ul { display: grid; gap: 9px; padding-top: 18px; border-top: 1px solid var(--border); }
.card li { position: relative; padding-left: 17px; color: var(--dim); font-size: 13.5px; }
.card li::before { content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

/* ---------- 优势区 ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 70px; }
.split__lead { margin-bottom: 34px; }
.feature-list { display: grid; gap: 22px; }
.feature { display: flex; gap: 18px; }
.feature__num { flex-shrink: 0; color: var(--brand); font-family: var(--mono); font-size: 13px; font-weight: 700; padding-top: 3px; }
.feature h4 { margin-bottom: 4px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }
.terminal {
  border: 1px solid var(--border-strong); border-radius: 14px; overflow: hidden;
  background: #0a101d;
  box-shadow: 0 26px 60px rgba(0, 0, 0, .36);
}
.terminal__bar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  color: var(--dim); font-family: var(--mono); font-size: 11px;
}
.terminal__dots { display: inline-flex; gap: 6px; }
.terminal__dots i { width: 9px; height: 9px; border-radius: 50%; background: #3a465e; }
.terminal__dots i:first-child { background: #f4811f; }
.terminal__dots i:nth-child(2) { background: #d8a13c; }
.terminal__dots i:last-child { background: #4caf82; }
.terminal__code { margin: 0; padding: 26px 24px 30px; color: #cbd6ea; font-family: var(--mono); font-size: 12.5px; line-height: 2; white-space: pre-wrap; overflow-x: auto; }
.c-dim { color: #61708c; }
.c-prompt { color: var(--brand-light); }
.c-ok { color: #6ee7a0; }

/* ---------- 关于横幅 ---------- */
.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  padding: 42px 46px;
  border: 1px solid rgba(244, 129, 31, .22); border-radius: 20px;
  background: radial-gradient(600px 200px at 100% 0%, rgba(244, 129, 31, .12), transparent 70%), var(--surface);
}
.banner h2 { margin-bottom: 10px; font-size: clamp(23px, 2.5vw, 31px); }
.banner p { max-width: 640px; margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- 联系 + 自检 ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.contact-form, .devpanel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.contact-form { padding: 30px; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border-strong); border-radius: 9px;
  background: #0b1220; color: var(--text);
  font: inherit; font-size: 14.5px;
  transition: border-color .2s ease, box-shadow .2s ease;
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: #5c6a83; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(244, 129, 31, .14);
}
.form-status { min-height: 22px; margin: 14px 0 0; font-size: 13.5px; }
.form-status[data-state="ok"] { color: #6ee7a0; }
.form-status[data-state="error"] { color: #ff9b8a; }
.form-status[data-state="pending"] { color: var(--muted); }

.devpanel { overflow: hidden; }
.devpanel__head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--border);
  color: var(--muted); font-family: var(--mono); font-size: 11.5px;
}
.devpanel__tag { margin-left: auto; padding: 2px 8px; border-radius: 4px; background: var(--brand-soft); color: var(--brand-light); font-size: 10px; letter-spacing: .1em; }
.devpanel__body { padding: 24px 22px 26px; }
.devpanel__hint { margin-bottom: 18px; color: var(--muted); font-size: 13.5px; }
.devpanel__out {
  min-height: 122px; max-height: 220px; margin: 18px 0 0; padding: 14px;
  border: 1px solid var(--border); border-radius: 9px;
  background: #080e1a; color: #b9c6dd;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word; overflow: auto;
}
.devpanel__out[data-state="ok"] { color: #8fe3b2; }
.devpanel__out[data-state="warn"] { color: #ffc38f; }
.devpanel__routes { display: grid; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.devpanel__routes > div { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 12.5px; }
.devpanel__routes code { min-width: 48px; color: var(--brand-light); font-weight: 700; }
.devpanel__routes span { font-family: var(--mono); }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--border); background: #070b14; padding-top: 56px; }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; padding-bottom: 46px; }
.footer__brand p { max-width: 360px; margin: 18px 0 0; color: var(--dim); font-size: 13.5px; }
.footer__links { display: flex; flex-direction: column; gap: 10px; }
.footer__links h4 { margin-bottom: 6px; font-size: 14px; }
.footer__links a, .footer__links span { color: var(--dim); font-size: 13.5px; }
.footer__links a:hover { color: var(--brand-light); }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 20px; border-top: 1px solid var(--border);
  color: var(--dim); font-size: 12.5px;
}

/* ---------- 进场动画（仅在 JS 可用时启用） ---------- */
.js-ready .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js-ready .reveal.is-visible { opacity: 1; transform: none; }
.cards .reveal:nth-child(2), .contact__grid .reveal:nth-child(2) { transition-delay: .1s; }
.cards .reveal:nth-child(3) { transition-delay: .2s; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero__grid, .split, .contact__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 70px 0 64px; }
  .hero__visual { max-width: 520px; }
  .edge-card { transform: none; }
  .section { padding: 74px 0; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .banner { flex-direction: column; align-items: flex-start; padding: 34px 30px; }
}

@media (max-width: 720px) {
  .wrap { width: min(100% - 32px, var(--wrap)); }
  .header__inner { min-height: 64px; gap: 14px; }
  .header__cta { display: none; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; margin-left: auto;
    border: 1px solid var(--border-strong); border-radius: 9px;
    background: rgba(255, 255, 255, .03); cursor: pointer;
  }
  .nav-toggle span { display: block; width: 18px; height: 1.6px; margin-inline: auto; background: var(--text); border-radius: 2px; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    margin: 0; padding: 8px 16px 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(8, 12, 22, .97);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--border); font-size: 15px; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }
  .stats__grid > div:nth-child(3) { border-left: 0; }
  .stats__grid > div:nth-child(n+3) { border-top: 1px solid var(--border); padding-top: 18px; }
  .cards { grid-template-columns: 1fr; }
  .split { gap: 34px; }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .hero h1 { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-ready .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}
