/* =========================================================
   青栈后端工作室 (QingStack Studio)  |  站点样式
   设计基线：浅色专业风 + 深蓝 Hero/页脚 + 青色强调
   无第三方依赖，直接部署
   ========================================================= */

:root {
  --ink: #0d1b2a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e5eaf1;
  --bg: #ffffff;
  --bg-soft: #f6f9fc;
  --bg-deep: #0b1f3a;
  --brand: #1264e8;
  --brand-dark: #0b3f9e;
  --accent: #06b6d4;
  --ok: #10b981;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(13, 27, 42, .04), 0 8px 24px rgba(13, 27, 42, .06);
  --shadow-lg: 0 2px 6px rgba(13, 27, 42, .06), 0 18px 48px rgba(13, 27, 42, .10);
  --wrap: 1120px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.3; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(28px, 4.2vw, 46px); letter-spacing: -.5px; }
h2 { font-size: clamp(23px, 3vw, 32px); letter-spacing: -.3px; }
h3 { font-size: 19px; }
h4 { font-size: 16px; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: .35em; }
strong { color: var(--ink); font-weight: 600; }
code { font-family: var(--mono); font-size: .9em; background: var(--bg-soft); padding: .1em .4em; border-radius: 5px; }
img, svg { max-width: 100%; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

/* 锚点定位避开吸顶导航 */
section[id], article[id], div[id] { scroll-margin-top: 78px; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 16px; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff; display: grid; place-items: center;
  font-size: 14px; font-weight: 700; letter-spacing: -.5px;
}
.brand small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); line-height: 1.2; letter-spacing: .5px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--ink-2); font-size: 14.5px; padding: 8px 12px; border-radius: 8px; white-space: nowrap;
}
.nav-links a:hover { background: var(--bg-soft); color: var(--brand); text-decoration: none; }
.nav-cta { background: var(--brand) !important; color: #fff !important; font-weight: 600; }
.nav-cta:hover { background: var(--brand-dark) !important; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 18px; line-height: 1; color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(6, 182, 212, .28), transparent 60%),
    radial-gradient(700px 400px at 92% 6%, rgba(18, 100, 232, .35), transparent 62%),
    linear-gradient(160deg, #0b1f3a 0%, #0d2a52 55%, #0b1f3a 100%);
  color: #dbe7f7;
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(700px 380px at 30% 10%, #000, transparent 75%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); gap: 44px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #cfe4ff; font-size: 13px; letter-spacing: .3px;
  padding: 6px 13px; border-radius: 999px; margin-bottom: 20px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .18); }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, #67e8f9, #7db3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: 17px; color: #b9cde6; max-width: 44em; margin-bottom: 26px; }
.hero-lead b { color: #fff; font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-size: 15px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: .18s ease; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), #0f8ce0); color: #fff; box-shadow: 0 10px 24px rgba(18, 100, 232, .32); }
.btn-primary:hover { box-shadow: 0 14px 30px rgba(18, 100, 232, .42); }
.btn-ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .28); color: #e8f1ff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.btn-line { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-line:hover { border-color: var(--brand); color: var(--brand); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: var(--radius-sm); padding: 14px 15px;
}
.stat b { display: block; font-size: 21px; color: #fff; letter-spacing: -.4px; line-height: 1.3; }
.stat span { font-size: 12.5px; color: #9fb8d6; }

.hero-card {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(6px);
}
.hero-card h3 { color: #fff; font-size: 15px; margin-bottom: 14px; letter-spacing: .3px; }
.hero-card ul { list-style: none; padding: 0; margin: 0; }
.hero-card li { display: flex; gap: 10px; font-size: 14px; color: #c3d6ee; padding: 8px 0; border-bottom: 1px dashed rgba(255,255,255,.12); }
.hero-card li:last-child { border-bottom: 0; }
.hero-card li i { color: #67e8f9; font-style: normal; flex: none; }

/* ---------- 通用区块 ---------- */
section { padding: 68px 0; }
.sec-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 46em; margin-bottom: 34px; }
.sec-head .kicker {
  display: block; font-size: 13px; font-weight: 700; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--brand); margin-bottom: 10px;
}
.sec-head p { color: var(--muted); margin-bottom: 0; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }

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

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: .2s ease; height: 100%;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: #d3e0f2; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; margin-bottom: 12px; }
.card ul { font-size: 14px; color: var(--ink-2); margin-bottom: 0; padding-left: 1.1em; }
.card .ico {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, #e8f1ff, #e0f7fb); color: var(--brand);
  font-size: 19px; margin-bottom: 14px; font-weight: 700;
}

/* ---------- 案例 ---------- */
.case {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px;
  transition: .2s ease;
}
.case:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.case-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.case h3 { margin: 0; font-size: 18px; }
.case .role { font-size: 12.5px; color: var(--muted); }
.tag {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: #eef4ff; color: var(--brand-dark); border: 1px solid #dbe7fb; white-space: nowrap;
}
.tag-cyan { background: #e6fbfd; color: #0e7490; border-color: #cbf3f8; }
.case-metrics { display: flex; flex-wrap: wrap; gap: 8px; }
.metric {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 12px; min-width: 106px;
}
.metric b { display: block; font-size: 16px; color: var(--brand-dark); line-height: 1.35; }
.metric span { font-size: 12px; color: var(--muted); }
.case p { font-size: 14.5px; color: var(--ink-2); margin: 0; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.stack span { font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; }
.case-link { font-size: 14px; font-weight: 600; }

/* ---------- 技术栈 ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 16px; }
.stack-col h4 { font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips span {
  font-size: 13px; background: #fff; border: 1px solid var(--line); color: var(--ink-2);
  padding: 5px 11px; border-radius: 8px; box-shadow: 0 1px 1px rgba(13,27,42,.03);
}

/* ---------- 流程 ---------- */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  position: relative; box-shadow: var(--shadow);
}
.step::before {
  counter-increment: s; content: "0" counter(s);
  display: block; font-family: var(--mono); font-size: 13px; font-weight: 700;
  color: var(--brand); letter-spacing: 1px; margin-bottom: 10px;
}
.step h3 { font-size: 16.5px; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- 报价 ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.plan {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.plan.featured { border-color: var(--brand); box-shadow: 0 18px 44px rgba(18,100,232,.16); position: relative; }
.plan.featured::after {
  content: "最常见"; position: absolute; top: -11px; left: 22px;
  background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 600;
  padding: 2px 10px; border-radius: 999px; letter-spacing: .5px;
}
.plan h3 { margin-bottom: 4px; font-size: 17px; }
.plan .price { font-size: 27px; font-weight: 700; color: var(--ink); letter-spacing: -1px; line-height: 1.3; margin: 8px 0 2px; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .sub { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 20px; font-size: 14.5px; }
.plan li { padding-left: 24px; position: relative; margin-bottom: 9px; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.plan .btn { margin-top: auto; width: 100%; }
.note { font-size: 13.5px; color: var(--muted); margin-top: 18px; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin: 0 auto; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 4px 18px; margin-bottom: 10px; box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer; font-weight: 600; color: var(--ink); padding: 14px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 20px; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); font-size: 14.5px; padding-bottom: 12px; margin: 0; }

/* ---------- 关于 / 时间线 ---------- */
.about { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
.profile { text-align: center; }
.avatar {
  width: 132px; height: 132px; border-radius: 50%; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--brand-dark), var(--accent));
  color: #fff; display: grid; place-items: center; font-size: 42px; font-weight: 700;
  box-shadow: 0 14px 34px rgba(18, 100, 232, .28); letter-spacing: 2px;
}
.profile h3 { margin-bottom: 2px; }
.profile .role { color: var(--muted); font-size: 14.5px; margin-bottom: 16px; }
.meta { list-style: none; padding: 0; font-size: 14px; text-align: left; border-top: 1px solid var(--line); padding-top: 14px; }
.meta li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; color: var(--muted); }
.meta li b { color: var(--ink); font-weight: 600; }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { padding: 0 0 24px 30px; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; border: 3px solid var(--brand);
}
.timeline .when { font-family: var(--mono); font-size: 12.5px; color: var(--brand); letter-spacing: .3px; }
.timeline h4 { margin: 2px 0 4px; font-size: 16px; }
.timeline p { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- 联系 ---------- */
.contact {
  background:
    radial-gradient(760px 340px at 88% 0%, rgba(6,182,212,.22), transparent 60%),
    linear-gradient(150deg, #0b1f3a 0%, #123a6b 55%, #0b1f3a 100%);
  background-color: #0b1f3a;
  color: #cfe0f4; padding: 68px 0;
  /* 撑满视口：让联系区成为完整收尾，同时保证 #contact 锚点能滚到顶 */
  display: flex; align-items: center;
  min-height: calc(100vh - 84px);
}
.contact > .wrap { width: 100%; }
.contact h2 { color: #fff; }
.contact .sec-head p { color: #a8c1dd; }
.contact-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-top: 8px; }
.cbox {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius); padding: 18px;
}
.cbox h4 { color: #9fc0e4; font-size: 12.5px; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 8px; font-weight: 600; }
.cbox .val { color: #fff; font-size: 18px; font-weight: 600; letter-spacing: .2px; word-break: break-all; }
.cbox .hint { font-size: 12.5px; color: #8fadcd; margin-top: 6px; }
.cbox .copy {
  margin-top: 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
  color: #e6f0ff; font-size: 12.5px; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-family: inherit;
}
.cbox .copy:hover { background: rgba(255,255,255,.2); }
.contact-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- 页脚 ---------- */
footer { background: #081729; color: #7d97b5; font-size: 13.5px; padding: 30px 0; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
footer a { color: #a9c4e2; }

/* ---------- 浮起动画 ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 案例详情页 ---------- */
.page-head { background: linear-gradient(160deg, #0b1f3a, #123a6b); color: #cfe0f4; padding: 56px 0 48px; }
.page-head h1 { color: #fff; margin-bottom: 12px; }
.page-head p { color: #a8c1dd; max-width: 46em; margin: 0; }
.crumb { font-size: 13.5px; color: #8fadcd; margin-bottom: 14px; }
.crumb a { color: #a9c4e2; }
.article { max-width: 860px; }
.case-block { padding: 34px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.case-block:last-child { border-bottom: 0; }
.case-block h2 { font-size: 25px; margin-bottom: 6px; }
.case-block .role { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.case-block h3 { font-size: 16px; margin: 22px 0 8px; color: var(--brand-dark); }
.case-block p, .case-block li { font-size: 15px; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin: 18px 0 4px; }
.kv .metric { background: #fff; }
.highlight {
  background: linear-gradient(180deg, #f0f7ff, #fff); border: 1px solid #dbe7fb;
  border-left: 4px solid var(--brand); border-radius: var(--radius-sm); padding: 16px 18px; margin: 18px 0;
}
.highlight b { color: var(--brand-dark); }
.toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 8px; }
.toc h4 { margin-bottom: 10px; font-size: 14px; letter-spacing: .5px; }
.toc ol { margin: 0; font-size: 14.5px; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .g-4, .stack-grid, .contact-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g-3, .steps, .plans { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .about { grid-template-columns: 1fr; gap: 28px; }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .nav-links {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 10px 16px 16px; gap: 2px;
    box-shadow: 0 20px 30px rgba(13,27,42,.08);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  section { padding: 50px 0; }
  .hero { padding: 52px 0 46px; }
  .g-2, .g-3, .g-4, .steps, .plans, .stack-grid, .contact-grid, .kv { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .stat b { font-size: 18px; }
}
