/* 有得软件主题：群青。与青鸾科技只在这些变量上不同。 */
:root {
  --bg: #f5f6f9;
  --surface: #ffffff;
  --ink: #151925;
  --ink-soft: #515869;
  --line: #d7dbe4;
  --accent: #3341b5;
  --accent-deep: #1f2873;
  --accent-tint: #e5e7f6;
  --on-deep-soft: #bfc4e6;
  --radius: 4px;
  --head-weight: 500;
  --head-tracking: 0.04em;
  /* 首页分层图深色舞台与五层配色（自下而上：算力 → 应用） */
  --stage-bg: #0a0d24;
  --stage-bg-2: #171c4a;
  --stage-ink: #e6e8fb;
  --stage-ink-soft: #9ba1cf;
  --layer-1: #8b5cf6;
  --layer-2: #6366f1;
  --layer-3: #3b82f6;
  --layer-4: #0ea5e9;
  --layer-5: #2dd4bf;
}

/* 青鸾科技 / 有得软件 主题共用样式，由 sites/qingluan/theme-src 生成；站点差异只在文件开头的颜色变量。
   设计依据见 sites/qingluan/research/设计说明.md */

:root {
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  --section-gap: clamp(88px, 12vw, 152px);
  --max: 1240px;
}

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

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

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

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3 { font-weight: var(--head-weight); letter-spacing: var(--head-tracking); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--surface);
  text-decoration: none;
  z-index: 10;
}
.skip:focus { top: 12px; }

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

/* ---------- 页眉 ---------- */

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: var(--head-weight);
  letter-spacing: 0.06em;
  text-decoration: none;
}
.brand svg { width: 28px; height: 28px; color: var(--accent); }

.nav { display: flex; flex-wrap: wrap; gap: 4px clamp(18px, 2.6vw, 36px); }
.nav a {
  font-size: 15px;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- 按钮与链接 ---------- */

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }

.button {
  display: inline-block;
  padding: 13px 26px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}
.button:hover { background: var(--accent-deep); }

.text-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}
.text-link:hover { text-decoration-color: var(--accent); }

/* ---------- 首屏：左文案，右“从算力到应用”的分层图 ---------- */

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(56px, 8vw, 104px);
}
.hero h1 {
  margin: 0 0 28px;
  font-size: clamp(38px, 5.2vw, 68px);
  line-height: 1.18;
}
.hero p {
  max-width: 30em;
  margin: 0 0 40px;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.3vw, 18px);
}

.stack { margin: 0; }
.stack svg { width: 100%; height: auto; }
.stack .plate { fill: var(--surface); stroke: var(--ink-soft); stroke-width: 1.25; }
/* 分层图：深色舞台上的五层服务，自下而上各有配色（--layer-color 由模板按层内联）。
   1. 入场：各层自下而上依次落位（各层 animation-delay 由模板内联）；
   2. 分层讲解：site.js 自下而上逐层点亮当前层，当前层上方各层上移、下方各层下移，图下说明行显示该层讲解；
   3. 悬停或键盘聚焦某层时立即切换到该层并暂停自动讲解；点击进入对应业务。
   立体效果由 stack3d.js（three.js）在 SVG 下方的画布绘制；无 WebGL 或减少动效时只用 SVG。
   命中区 .hit 固定不动，只有 .layer-body 位移，光标停在边缘也不会反复进出。 */
.stack-panel {
  padding: 8px 4px 4px;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 30% 85%, var(--stage-bg-2) 0%, transparent 60%),
    var(--stage-bg);
  overflow: hidden;
}
.stack .label { fill: var(--stage-ink); font-size: 17px; font-family: var(--font); }
.stack .note { fill: var(--stage-ink-soft); font-size: 13px; font-family: var(--font); }
.stack .tick { stroke: var(--layer-color); stroke-width: 1; opacity: .5; }
.stack .plate {
  fill: color-mix(in srgb, var(--layer-color) 20%, transparent);
  stroke: var(--layer-color);
  stroke-width: 1.25;
}

.stack .layer {
  opacity: 0;
  transform: translateY(18px);
  animation: settle .7s cubic-bezier(.2, .7, .2, 1) forwards;
}
@keyframes settle { to { opacity: 1; transform: none; } }
.stack .hit { fill: transparent; }
.stack .layer-body { pointer-events: none; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.stack .plate, .stack .label, .stack .tick { transition: fill .3s, stroke-width .3s, opacity .3s; }
.stack .is-above .layer-body { transform: translateY(-14px); }
.stack .is-active .layer-body { transform: translateY(-4px); }
.stack .is-below .layer-body { transform: translateY(10px); }
.stack .is-active .plate { fill: color-mix(in srgb, var(--layer-color) 45%, transparent); stroke-width: 2; }
.stack .is-active .label { fill: var(--layer-color); }
.stack .is-active .tick { opacity: 1; }
.stack a.layer { cursor: pointer; }
.stack .layer:focus-visible { outline: 2px solid var(--layer-color); outline-offset: -2px; }

/* three.js 立体模式（stack3d.js 加载成功后加 .is-3d）：画布在 SVG 下方，SVG 只保留文字、引线和命中区 */
.stack-stage { position: relative; }
.stack .stack-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.stack svg { position: relative; }
.stack.is-3d .plate { opacity: 0; }

.stack-caption {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 4px 16px;
  margin: 16px 0 0;
  min-height: 3.8em; /* 按最长两行说明预留，轮播切换时下方内容不跳动 */
  align-content: start;
  font-size: 15px;
}
.stack-caption[hidden] { display: none; }
.stack-caption strong { color: var(--ink); font-weight: var(--head-weight); white-space: nowrap; }
.stack-caption span { color: var(--ink-soft); }

/* ---------- 区块 ---------- */

.section { padding-top: var(--section-gap); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 16px 64px;
  align-items: end;
  margin-bottom: 56px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.3;
  text-wrap: balance;
}
.section-head p { margin: 0; color: var(--ink-soft); max-width: 34em; }

.page-head + .section { padding-top: clamp(56px, 7vw, 96px); }

.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 24px 64px; }
.split > h2 { margin: 0; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.3; }

/* 业务：三列索引，上沿一条线分隔，不做卡片 */
.services {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 40px;
}
.services > li {
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
}
.glyph { width: 40px; height: 40px; color: var(--accent); margin-bottom: 20px; }
.glyph * { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.glyph .fill { fill: currentColor; stroke: none; }
.services h3 { margin: 0 0 10px; font-size: 21px; line-height: 1.4; }
.services h3 a { text-decoration: none; }
.services h3 a:hover { color: var(--accent); }
.services p { margin: 0 0 16px; color: var(--ink-soft); font-size: 16px; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--ink); }

/* 合作方式：真实的先后顺序 */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding-top: 20px;
  border-top: 2px solid var(--accent);
}
.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 15px;
  font-weight: var(--head-weight);
}
.steps h3 { margin: 0 0 8px; font-size: 19px; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.75; }

/* 案例：占位卡片，等用户提供真实案例 */
.case-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 32px;
}
.case a { display: block; text-decoration: none; }
.case .thumb {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: var(--accent-tint);
  margin-bottom: 18px;
  overflow: hidden;
  color: var(--accent);
}
.case .thumb svg { width: 100%; height: 100%; }
.case .meta { margin: 0 0 6px; font-size: 14px; color: var(--ink-soft); }
.case h3 { margin: 0 0 8px; font-size: 19px; line-height: 1.5; }
.case a:hover h3 { color: var(--accent); }
.case p { margin: 0; font-size: 15px; color: var(--ink-soft); }
.placeholder { color: var(--ink-soft); }

.more { margin-top: 40px; }

/* 收尾：深色主题色带 */
.closing {
  margin-top: var(--section-gap);
  background: var(--accent-deep);
  color: #fff;
}
.closing .wrap {
  padding-top: clamp(72px, 9vw, 120px);
  padding-bottom: clamp(72px, 9vw, 120px);
}
.closing h2 { margin: 0 0 16px; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.3; }
.closing p { margin: 0 0 36px; max-width: 30em; color: var(--on-deep-soft); }
.closing .button { background: #fff; color: var(--accent-deep); }
.closing .button:hover { background: var(--accent-tint); }
.closing :focus-visible { outline-color: #fff; }

/* ---------- 内页 ---------- */

.page-head { border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(48px, 6vw, 80px); }
.page-head h1 { margin: 0 0 20px; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.22; }
.page-head p { margin: 0; max-width: 34em; color: var(--ink-soft); font-size: 18px; }
.crumb { margin: 0 0 20px; font-size: 14px; color: var(--ink-soft); }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--accent); }

.detail {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 24px 64px;
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}
.detail:first-child { padding-top: 0; }
.detail h2 { margin: 0 0 12px; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.4; }
.detail .intro { margin: 0; color: var(--ink-soft); }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.columns h3 { margin: 0 0 10px; font-size: 16px; font-weight: 400; color: var(--ink-soft); letter-spacing: 0; }
.columns ul { margin: 0; padding-left: 1.1em; }
.columns li { margin-bottom: 6px; }
.columns li::marker { color: var(--accent); }

.stack-note {
  margin-top: 56px;
  padding: 28px 32px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.stack-note h2 { margin: 0 0 8px; font-size: 19px; }
.stack-note p { margin: 0; color: var(--ink-soft); font-size: 16px; }

.prose p { margin: 0 0 22px; max-width: 34em; }

.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.principles li { padding-top: 20px; border-top: 1px solid var(--line); }
.principles h3 { margin: 0 0 8px; font-size: 20px; }
.principles p { margin: 0; color: var(--ink-soft); font-size: 16px; }

/* 案例详情 */
.case-hero {
  aspect-ratio: 16 / 7;
  border-radius: var(--radius);
  background: var(--accent-tint);
  color: var(--accent);
  overflow: hidden;
  margin-bottom: 56px;
}
.case-hero svg { width: 100%; height: 100%; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0 0 56px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dt { font-size: 14px; color: var(--ink-soft); }
.facts dd { margin: 4px 0 0; }
.case-body { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 16px 64px; }
.case-body h2 { margin: 0; font-size: 22px; line-height: 1.5; }
.case-body > div { padding-bottom: 40px; }
.case-body p { margin: 0 0 16px; max-width: 34em; }

/* 联系 */
.contact-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 40px 64px; }
.contact-list { margin: 0; display: grid; gap: 20px; align-content: start; }
.contact-list dt { font-size: 14px; color: var(--ink-soft); }
.contact-list dd { margin: 2px 0 0; }

.form { display: grid; gap: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { display: grid; gap: 8px; align-content: start; }
.field label { font-size: 15px; }
.field .hint { font-size: 14px; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.field textarea { min-height: 160px; resize: vertical; }
.form-status { margin: 0; min-height: 1.8em; color: var(--accent); }

/* ---------- 页脚 ---------- */

/* 没有收尾色带的页面，正文末尾留出同样的空白 */
main > .section:last-child { padding-bottom: var(--section-gap); }

.site-footer { border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); }
main:has(> .closing:last-child) + .site-footer { border-top: 0; }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 40px;
  padding-top: 36px;
  padding-bottom: 36px;
}
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- CMS 运行时补充 ---------- */

.front-flash { border-bottom: 1px solid var(--line); background: var(--accent-tint); }
.front-flash p { margin: 0; padding: 14px 0; }
.front-flash.is-error { background: #fbeaea; }

.empty-state { margin: 0; color: var(--ink-soft); }

.case .thumb .thumb-img, .case .thumb img { width: 100%; height: 100%; object-fit: cover; }
.case-hero img { width: 100%; height: 100%; object-fit: cover; }

.form-title { margin: 0; font-size: 22px; }
.form-row--end { align-items: end; }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { border-top: 1px solid var(--line); }
.post-list li:last-child { border-bottom: 1px solid var(--line); }
.post-list a { display: block; padding: 24px 0; text-decoration: none; }
.post-list time { font-size: 14px; color: var(--ink-soft); }
.post-list h2 { margin: 4px 0 6px; font-size: 20px; line-height: 1.5; }
.post-list a:hover h2 { color: var(--accent); }
.post-list p { margin: 0; color: var(--ink-soft); font-size: 15px; }

.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.pagination a { min-width: 40px; padding: 6px 12px; text-align: center; text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pagination a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.search-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 40px; }
.search-form input { flex: 1 1 240px; padding: 12px 14px; font: inherit; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

.rich { max-width: 46em; }
.rich h2 { font-size: 24px; margin: 40px 0 12px; }
.rich h3 { font-size: 19px; margin: 32px 0 10px; }
.rich p, .rich ul, .rich ol { margin: 0 0 18px; }
.rich img { height: auto; border-radius: var(--radius); margin: 24px 0; }
.rich table { border-collapse: collapse; width: 100%; margin: 24px 0; }
.rich th, .rich td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }

/* ---------- 响应式 ---------- */

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .stack { max-width: 520px; }
  .section-head { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .case-grid { grid-template-columns: 1fr 1fr; }
  .detail, .case-body, .contact-grid, .split { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; gap: 0; }
  .principles li { padding-bottom: 28px; }
  .facts { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; padding-top: 16px; padding-bottom: 14px; }
  .services, .steps, .case-grid, .columns, .form-row { grid-template-columns: 1fr; }
  .services > li { padding-bottom: 36px; }
  .section-head { margin-bottom: 36px; }
  .case-hero { aspect-ratio: 4 / 3; }
  .stack .note { display: none; }
  .stack-caption { grid-template-columns: 1fr; min-height: 5.6em; }
  .stack .label { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .stack .layer { animation: none; opacity: 1; transform: none; }
  .stack .layer-body, .stack .plate, .stack .label, .stack .tick { transition: none; }
}
