/* 云像文化 官网 —— 深空暗色 · 影像实验室 · 低饱和
   主视觉：色调曲线 / 直方图 / 3D LUT 线框（纯代码生成，零图片依赖） */
:root {
  --bg:      #0b0e11;
  --bg-2:    #0e1216;
  --panel:   #11161b;
  --panel-2: #151b21;
  --line:    rgba(255, 255, 255, .07);
  --line-2:  rgba(255, 255, 255, .13);
  --tx:      #dbe3e8;
  --tx-2:    #93a1ab;
  --tx-3:    #62707a;
  --cy:      #7fa9b4;         /* 主强调：雾青 */
  --cy-deep: #4d6b73;
  --am:      #a8916f;         /* 次强调：陈年琥珀（低饱和） */
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--tx);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 背景层：细径向冷光，压住纯黑的空洞感 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(127, 169, 180, .10), transparent 62%),
    radial-gradient(900px 560px at 92% 8%, rgba(168, 145, 111, .07), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 42%, var(--bg) 100%);
}

img { display: block; max-width: 100%; }
a { color: inherit; }
.svg-defs { position: absolute; width: 0; height: 0; }

/* 胶片颗粒 + 四角压暗 */
.grain {
  position: fixed; inset: 0; z-index: 98; pointer-events: none; opacity: .038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vignette {
  position: fixed; inset: 0; z-index: 97; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 45%, transparent 52%, rgba(0, 0, 0, .55) 100%);
}

/* ---------- 导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  transition: background .4s, box-shadow .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11, 14, 17, .72);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: 1240px; margin: 0 auto; padding: 18px 34px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo {
  width: auto; height: 38px; display: block; border-radius: 8px;
  filter: drop-shadow(0 2px 10px rgba(18, 139, 221, .20));
  transition: filter .35s ease, transform .35s ease;
}
.brand:hover .brand-logo {
  filter: drop-shadow(0 3px 16px rgba(18, 139, 221, .34));
  transform: translateY(-1px);
}
.brand-logo-lg { height: 50px;}
.brand-name {
  font-family: var(--serif); font-size: 18px; letter-spacing: .26em; color: var(--tx);
  display: flex; flex-direction: column; line-height: 1.25;
}
.brand-name i {
  font: 400 8.5px/1 var(--mono); letter-spacing: .22em; color: var(--tx-3); font-style: normal;
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: 13.5px; letter-spacing: .14em; color: var(--tx-2); text-decoration: none;
  position: relative; transition: color .3s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -7px; height: 1px;
  background: var(--cy); transition: right .35s ease;
}
.nav-links a:hover { color: var(--tx); }
.nav-links a:hover::after { right: 0; }
.nav-cta {
  border: 1px solid var(--line-2); padding: 8px 18px !important; border-radius: 2px;
  color: var(--tx) !important;
}
.nav-cta::after { display: none; }
.nav-cta:hover { border-color: var(--cy); background: rgba(127, 169, 180, .08); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: 132px 34px 96px; overflow: hidden;
}
.hero-canvas { position: absolute; inset: 0; z-index: 0; opacity: .9; }

/* 可选首屏底图：后台上传后仅作为暗色低饱和的底纹融入生成背景，不上传时不存在该层 */
.hero-photo { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: .2; filter: saturate(.5) contrast(1.06) brightness(.88);
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(118% 92% at 22% 42%, transparent, var(--bg) 76%),
    linear-gradient(180deg, var(--bg) 0%, transparent 26%, transparent 60%, var(--bg) 100%);
}

/* 透视网格地面 */
.hero-grid {
  position: absolute; inset: auto 0 -2% 0; height: 52%; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(127, 169, 180, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 169, 180, .09) 1px, transparent 1px);
  background-size: 74px 74px;
  transform: perspective(560px) rotateX(66deg);
  transform-origin: bottom center;
  mask-image: linear-gradient(transparent 4%, #000 78%);
  -webkit-mask-image: linear-gradient(transparent 4%, #000 78%);
  animation: grid-drift 26s linear infinite;
}
@keyframes grid-drift { to { background-position: 0 74px, 0 0; } }

/* 三条色调曲线描线 */
.hero-curves { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.curve { position: absolute; overflow: visible; }
.curve-a { left: 4%;  bottom: 6%;  width: 60%; height: 74%; opacity: .95; }
.curve-b { right: -6%; top: 8%;    width: 52%; height: 62%; opacity: .5; }
.curve-c { left: 22%; top: 16%;    width: 44%; height: 48%; opacity: .3; }
.curve-line {
  fill: none; stroke: url(#edge-glow); stroke-width: 1.6;
  stroke-dasharray: 1400; stroke-dashoffset: 1400;
  animation: draw 4.4s cubic-bezier(.22, .61, .36, 1) .3s forwards;
}
.curve-b .curve-line { animation-delay: 1.1s; stroke: var(--cy-deep); }
.curve-c .curve-line { animation-delay: 1.9s; stroke: rgba(168, 145, 111, .55); }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero-content { position: relative; z-index: 2; max-width: 940px; }
.hero-kicker {
  font: 400 11.5px/1.6 var(--mono); letter-spacing: .3em; color: var(--cy);
  display: flex; align-items: center; gap: 12px; margin-bottom: 30px;
}
.hero-kicker .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--cy);
  box-shadow: 0 0 0 0 rgba(127, 169, 180, .5); animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(127, 169, 180, .45); }
  70%  { box-shadow: 0 0 0 13px rgba(127, 169, 180, 0); }
  100% { box-shadow: 0 0 0 0 rgba(127, 169, 180, 0); }
}
.hero-title {
  font-family: var(--serif); font-size: clamp(38px, 6.4vw, 82px); font-weight: 400;
  line-height: 1.22; letter-spacing: .04em; color: #eef4f7;
  text-shadow: 0 0 60px rgba(127, 169, 180, .16);
}
.hero-sub {
  margin-top: 28px; max-width: 640px; font-size: 15.5px; color: var(--tx-2); letter-spacing: .05em;
}
.hero-actions { margin-top: 46px; display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 14px 34px; font-size: 13.5px; letter-spacing: .22em;
  text-decoration: none; border-radius: 2px; transition: all .32s cubic-bezier(.4, 0, .2, 1);
  cursor: pointer; border: 1px solid transparent;
}
.btn-solid {
  background: linear-gradient(135deg, rgba(127, 169, 180, .18), rgba(127, 169, 180, .06));
  border-color: rgba(127, 169, 180, .45); color: #dcecf1;
  box-shadow: 0 0 0 rgba(127, 169, 180, 0);
}
.btn-solid:hover {
  border-color: var(--cy); background: rgba(127, 169, 180, .20);
  box-shadow: 0 8px 34px -12px rgba(127, 169, 180, .5); transform: translateY(-2px);
}
.btn-ghost { border-color: var(--line-2); color: var(--tx-2); }
.btn-ghost:hover { border-color: var(--tx-2); color: var(--tx); transform: translateY(-2px); }

.hero-meta {
  position: absolute; left: 34px; bottom: 34px; z-index: 2;
  display: flex; gap: 26px; flex-wrap: wrap;
  font: 400 10px/1 var(--mono); letter-spacing: .2em; color: var(--tx-3);
}
.hero-meta span { position: relative; padding-left: 14px; }
.hero-meta span::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 7px; height: 1px; background: var(--cy-deep);
}

.hero-hist {
  position: absolute; right: 0; bottom: 0; width: 46%; height: 168px; z-index: 1;
  opacity: .5; pointer-events: none;
  mask-image: linear-gradient(90deg, transparent, #000 45%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%);
}
.hero-hist canvas { width: 100%; height: 100%; display: block; }

.hero-scroll {
  position: absolute; right: 34px; bottom: 34px; z-index: 2; width: 1px; height: 62px;
  background: var(--line-2); overflow: hidden;
}
.hero-scroll span {
  position: absolute; top: -34%; left: 0; width: 100%; height: 34%;
  background: linear-gradient(var(--cy), transparent); animation: scroll-hint 2.4s ease-in-out infinite;
}
@keyframes scroll-hint { 0% { top: -34%; } 100% { top: 100%; } }

/* ---------- 通用区块 ---------- */
.section { padding: 132px 34px; position: relative; }
.section + .section { border-top: 1px solid var(--line); }
.wrap { max-width: 1240px; margin: 0 auto; }
.narrow { max-width: 860px; }

.sec-kicker {
  font: 400 11px/1.6 var(--mono); letter-spacing: .28em; color: var(--cy);
  display: flex; align-items: center; gap: 14px; margin-bottom: 22px;
}
.sec-kicker .idx { color: var(--tx-3); letter-spacing: .1em; }
.sec-kicker .idx::after {
  content: ""; display: inline-block; width: 28px; height: 1px;
  background: var(--line-2); vertical-align: middle; margin-left: 14px;
}
.sec-title {
  font-family: var(--serif); font-size: clamp(26px, 3.4vw, 40px); font-weight: 400;
  letter-spacing: .06em; color: #e9eff2; margin-bottom: 58px;
}

/* 理念 */
.quote {
  font-family: var(--serif); font-size: clamp(21px, 2.7vw, 31px); font-weight: 400;
  line-height: 1.85; letter-spacing: .05em; color: #e5edf1;
}
.sec-body {
  margin-top: 34px; font-size: 15px; color: var(--tx-2); max-width: 720px;
  letter-spacing: .04em; line-height: 1.95;
}
.about-stats {
  margin-top: 64px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px;
}
.stat { position: relative; padding-top: 22px; }
.stat-rule {
  position: absolute; top: 0; left: 0; width: 40px; height: 1px;
  background: linear-gradient(90deg, var(--cy), transparent);
}
.stat b {
  display: block; font: 300 40px/1.1 var(--mono); color: #eaf1f4; letter-spacing: -.01em;
}
.stat span { display: block; margin-top: 10px; font-size: 13px; color: var(--tx-3); letter-spacing: .1em; }

/* 能力卡 */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }
.card {
  position: relative; background: var(--bg); padding: 40px 32px 44px;
  transition: background .45s ease, transform .45s ease; overflow: hidden;
}
.card::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cy), transparent);
  transform: scaleX(0); transform-origin: left; transition: transform .5s ease;
}
.card:hover { background: var(--panel); }
.card:hover::after { transform: scaleX(1); }
.card-glyph { height: 82px; margin-bottom: 26px; opacity: .8; transition: opacity .4s; }
.card-glyph svg { width: 100%; height: 100%; }
.card:hover .card-glyph { opacity: 1; }
.card-num { font: 400 10px/1 var(--mono); letter-spacing: .22em; color: var(--tx-3); }
.card h3 {
  margin-top: 14px; font-family: var(--serif); font-size: 19px; font-weight: 400;
  letter-spacing: .1em; color: #e7eef1;
}
.card p { margin-top: 16px; font-size: 13.5px; line-height: 1.95; color: var(--tx-2); }
.card-corner {
  position: absolute; right: 14px; top: 14px; width: 9px; height: 9px;
  border-top: 1px solid var(--line-2); border-right: 1px solid var(--line-2);
}

/* 样本 */
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.work { position: relative; }
.work-tall .work-media { aspect-ratio: 3 / 4; }
.work-wide .work-media { aspect-ratio: 4 / 3; }
.work-media {
  position: relative; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(150deg, var(--panel), var(--bg-2));
}
.work-img { position: absolute; inset: 0; }
.work-img img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.86) contrast(1.02);
  transform: scale(1.01); transition: transform .9s cubic-bezier(.2, .6, .2, 1);
}
.work:hover .work-img img { transform: scale(1.055); }

/* 生成艺术占位 */
.work-gen { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.work-gen svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gen-curve { stroke-dasharray: 420; stroke-dashoffset: 420; animation: draw 3.4s ease-out .2s forwards; }
.gen-curve.soft { animation-duration: 4.2s; animation-delay: .6s; }
.work-gen::before {
  content: ""; position: absolute; inset: -30%;
  background:
    radial-gradient(closest-side, rgba(127, 169, 180, .13), transparent),
    radial-gradient(closest-side, rgba(168, 145, 111, .09), transparent);
  background-position: 22% 30%, 76% 74%; background-repeat: no-repeat; background-size: 70% 70%, 62% 62%;
  animation: drift 16s ease-in-out infinite alternate;
}
.gen-2::before { animation-delay: -5s; }
.gen-3::before { animation-delay: -9s; }
@keyframes drift {
  from { transform: translate3d(-4%, -3%, 0) scale(1); }
  to   { transform: translate3d(5%, 4%, 0) scale(1.12); }
}
.gen-spec {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--cy-deep), var(--cy) 42%, #a9a292 66%, var(--am));
  opacity: .5;
}
.work figcaption {
  margin-top: 18px; display: flex; flex-direction: column; gap: 6px;
  padding-left: 14px; border-left: 1px solid var(--line-2);
}
.work figcaption b { font-family: var(--serif); font-weight: 400; font-size: 16.5px; letter-spacing: .1em; color: #e6eef1; }
.work figcaption span { font: 400 11.5px/1.5 var(--mono); letter-spacing: .12em; color: var(--tx-3); }

/* 流程 */
.lut-stage { height: 190px; margin-bottom: 26px; opacity: .85; }
.lut-stage canvas { width: 100%; height: 100%; display: block; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 4px; left: 6%; right: 6%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 12%, var(--line-2) 88%, transparent);
}
.step { position: relative; padding: 34px 26px 0 0; }
.step-node {
  position: absolute; top: 0; left: 0; width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--cy-deep);
}
.step-node::after {
  content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--cy); opacity: .65;
}
.step-no { font: 400 12px/1 var(--mono); letter-spacing: .2em; color: var(--am); }
.step h3 {
  margin-top: 14px; font-family: var(--serif); font-size: 18px; font-weight: 400;
  letter-spacing: .1em; color: #e6eef1;
}
.step p { margin-top: 12px; font-size: 13.5px; line-height: 1.9; color: var(--tx-2); }

/* 页脚 */
.footer { border-top: 1px solid var(--line); padding: 92px 34px 46px; background: var(--bg-2); }
.footer-top {
  max-width: 1240px; margin: 0 auto; display: flex; align-items: center;
  justify-content: space-between; gap: 40px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-brand b { font-family: var(--serif); font-size: 19px; letter-spacing: .22em; font-weight: 400; color: #e9eff2; }
.footer-brand p { font: 400 11.5px/1.6 var(--mono); letter-spacing: .14em; color: var(--tx-3); margin-top: 4px; }
.footer-hist { flex: 1; min-width: 200px; max-width: 380px; height: 54px; opacity: .45; }
.footer-hist canvas { width: 100%; height: 100%; display: block; }
.footer-bottom {
  max-width: 1240px; margin: 62px auto 0; padding-top: 26px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--tx-3); letter-spacing: .06em;
}
.footer-icp a { color: var(--tx-3); text-decoration: none; transition: color .3s; }
.footer-icp a:hover { color: var(--cy); }

/* 入场动效 */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .6, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 34px 0; }
  .steps::before { display: none; }
}
@media (max-width: 820px) {
  .section { padding: 92px 22px; }
  .hero { padding: 116px 22px 88px; min-height: auto; }
  .nav-inner { padding: 14px 22px; }
  .brand-logo { height: 32px; border-radius: 6px; }
  .nav-links { gap: 17px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .works-grid { grid-template-columns: 1fr; gap: 34px; }
  .work-tall .work-media, .work-wide .work-media { aspect-ratio: 4 / 3; }
  .about-stats { grid-template-columns: 1fr; gap: 26px; }
  .hero-hist { width: 88%; height: 120px; opacity: .32; }
  .hero-meta { gap: 14px 18px; font-size: 9px; max-width: 74%; }
  .hero-scroll { display: none; }
  .lut-stage { height: 130px; }
}
@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .brand-name { font-size: 16px; }
  .hero-actions .btn { flex: 1; text-align: center; }
}

/* 尊重减弱动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .curve-line, .gen-curve { stroke-dashoffset: 0; }
}
