/* ============================================================
   木白设计 · 官网视觉系统（唐忠汉/近境制作 风格对齐版）
   极简东方 · 大留白 · 材质与光影叙事
   字体：Montserrat(拉丁) + Noto Sans SC 思源黑体(中文) —— 现代粗黑风格
   ============================================================ */

:root {
  --paper: #F4F1EC;   /* 宣纸米白 背景 */
  --paper-2: #EDE8E0; /* 次背景 */
  --ink: #1C1B19;     /* 墨 主文字 */
  --muted: #6E6A62;   /* 弱文字 */
  --accent: #8A6F4E;  /* 铜木色 强调/分隔 */
  --line: #DED8CD;    /* 细线 */
  --dark: #161514;    /* 页脚深底 */
  --maxw: 1240px;
  --gut: clamp(20px, 5vw, 64px);
  /* 全站字族：拉丁用 Montserrat，中文回落到思源黑体 */
  --font: "Montserrat", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  font-weight: 300;
}

h1, h2, h3, .serif {
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: .01em;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- 顶部导航：常态为深色标题栏 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gut);
  color: #fff;
  background: rgba(15,14,13,.56);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.09);
  transition: background .4s ease, padding .4s ease, box-shadow .4s ease, border-color .4s ease;
}
.nav.solid {
  background: rgba(15,14,13,.9);
  border-bottom-color: rgba(255,255,255,.14);
  padding: 11px var(--gut);
  box-shadow: 0 8px 30px rgba(0,0,0,.22);
}
.brand { display: block; }
/* 完整 LOGO（M图形 + 木白设计 + MUBAI DESIGN）：墨色源图在深色栏内一律反白 */
.brand-logo {
  height: 58px; width: auto; display: block;
  filter: brightness(0) invert(1);
  transition: height .4s ease;
}
.nav.solid .brand-logo { height: 50px; }
.nav-links { display: flex; gap: clamp(16px, 3vw, 40px); font-size: 14px; letter-spacing: .14em; }
.nav-links a {
  position: relative; padding: 2px 0; opacity: .94;
  display: inline-flex; flex-direction: column; align-items: center; line-height: 1.2;
}
/* 中文下配英文（简洁小字，撑起双语质感） */
.nav-links a em {
  font-style: normal; font-size: 9px; letter-spacing: .2em; font-weight: 500;
  opacity: .58; margin-top: 4px;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px;
  background: currentColor; transition: width .35s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { opacity: 1; }

/* ---------- 通用区块 ---------- */
.section { padding: clamp(80px, 12vh, 150px) var(--gut); max-width: var(--maxw); margin: 0 auto; }
.eyebrow {
  font-size: 12px; letter-spacing: .5em; color: var(--accent);
  text-transform: uppercase; margin-bottom: 18px; font-weight: 600;
}
.sec-title { font-size: clamp(28px, 4vw, 46px); line-height: 1.25; margin-bottom: 14px; font-weight: 900; }
.sec-sub { color: var(--muted); max-width: 56ch; margin-bottom: 56px; }

/* ---------- 英文呼应（通用小字，统一样式） ---------- */
.en-block {
  display: block; font-size: 10px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; line-height: 1.6;
}
.eyebrow .en-block { margin-top: 10px; letter-spacing: .44em; opacity: .7; font-size: 10px; }
.sec-sub .en-block { margin-top: 14px; font-size: 10.5px; letter-spacing: .3em; }
.philosophy-grid h3 .en-block { margin-top: 10px; font-size: 10px; letter-spacing: .32em; color: var(--accent); opacity: .85; }
.manifesto .m-lead .en-block {
  margin-top: 18px; font-size: clamp(12px, 1.35vw, 15px); font-weight: 300;
  letter-spacing: .07em; line-height: 1.75; color: var(--muted); text-transform: none;
}
.manifesto .m-punch .en-block {
  margin-top: 16px; font-size: clamp(11px, 1.2vw, 14px); font-weight: 400;
  letter-spacing: .3em; color: var(--accent);
}
.footer h2 .en-block {
  margin-top: 18px; font-size: clamp(12px, 1.2vw, 14px); font-weight: 300;
  letter-spacing: .08em; color: rgba(233,228,218,.62); text-transform: none;
}

/* ---------- 首屏 Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center;
  color: #fff; overflow: hidden;
}
/* 双层图交替：视觉上是「一直由近及远」推进，循环处被交叉淡化吃掉，看不出跳变 */
.hero-media { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.hero-layer {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transform-origin: 54% 46%;
  will-change: transform, opacity;
  /* 背景动态速度加快 1.8 倍：11.3s / 1.8 = 6.28s */
  animation: ken-push 6.28s linear infinite, ken-cross 6.28s linear infinite;
}
.hero-layer.l2 { animation-delay: -3.14s, -3.14s; }
/* 缓慢由近及远：1.14 倍 -> 原尺寸 */
@keyframes ken-push { from { transform: scale(1.14); } to { transform: scale(1.00); } }
/* 「停留 → 快速溶解」梯形曲线（smoothstep 缓动），两层之和恒为 1：
   任一层在 0%/100% 处不透明度为 0 —— 正好是 JS 换图的时机，切换无痕。
   每层清晰约 34%（≈2.1s）、溶解约 16%（≈1.0s）。 */
@keyframes ken-cross {
  0%   { opacity: 0; }
  4%   { opacity: .156; }
  8%   { opacity: .5; }
  12%  { opacity: .844; }
  16%  { opacity: 1; }
  50%  { opacity: 1; }
  54%  { opacity: .844; }
  58%  { opacity: .5; }
  62%  { opacity: .156; }
  66%  { opacity: 0; }
  100% { opacity: 0; }
}
/* 首屏压暗：让文字第一眼被捕捉；用户要求再暗 50% → 透光量减半 */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  /* 再暗50%：透光量减半 1-(1-a)/2，由 .70/.61/.70 → .85/.805/.85 */
  background: linear-gradient(180deg, rgba(14,13,12,.85) 0%, rgba(14,13,12,.805) 45%, rgba(14,13,12,.85) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 0 var(--gut); max-width: var(--maxw); margin: 0 auto; width: 100%; }
.hero h1 {
  font-weight: 900;
  font-size: clamp(40px, 7vw, 96px); line-height: 1.08; letter-spacing: .01em;
  color: #cccaca;                  /* 用户指定：设计向上造价向下 八字改浅灰 */
  text-shadow: 0 2px 34px rgba(0,0,0,.5);
  opacity: 1;                      /* 提亮 60%：原 .7 × 1.6 = 1.12，超上限取满亮度 */
}
.hero .lead {
  margin-top: 30px; font-size: clamp(15px, 1.7vw, 20px); font-weight: 500;
  max-width: 42ch; opacity: .96; letter-spacing:.08em;
  text-shadow: 0 1px 18px rgba(0,0,0,.5);
}
.hero .lead.sub { margin-top: 10px; font-weight: 300; opacity: .84; }
/* 首屏英文呼应（简洁小字，与中文成对） */
.hero .h1-en {
  margin-top: 26px; font-size: clamp(11px, 1.3vw, 15px); letter-spacing: .44em;
  text-transform: uppercase; font-weight: 500;
  color: rgba(255,255,255,.7); text-shadow: 0 1px 16px rgba(0,0,0,.5);
}
/* 首屏文字：极缓慢的原地浮动（错开相位，更有呼吸感） */
.hero-inner h1,
.hero-inner .lead { animation: text-drift 11s ease-in-out infinite alternate; }
.hero-inner .lead     { animation-delay: -3.6s; }
.hero-inner .lead.sub { animation-delay: -7.2s; }
@keyframes text-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, -9px, 0); }
}
.scroll-cue {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  z-index: 2; font-size: 11px; letter-spacing: .4em; opacity: .8;
  writing-mode: vertical-rl;
}
.scroll-cue::after { content:""; display:block; width:1px; height:46px; background:rgba(255,255,255,.6); margin:12px auto 0; }

/* ---------- 首页作品滚动带（动态 marquee） ---------- */
.marquee { overflow: hidden; padding: clamp(26px, 4.5vh, 54px) 0; background: var(--paper); border-bottom: 1px solid var(--line); }
.marquee-track { display: flex; width: max-content; }
/* 只有 JS 成功克隆出一组（可无缝循环）后才开始滚动，避免无 JS 时露白 */
.marquee-track.is-looping { animation: marquee-scroll 132s linear infinite; will-change: transform; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { flex: 0 0 auto; width: clamp(280px, 30vw, 480px); aspect-ratio: 16 / 10; overflow: hidden; margin-right: 16px; }
.marquee-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.marquee-item:hover img { transform: scale(1.05); }
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- 占位图 ---------- */
.ph {
  background:
    repeating-linear-gradient(45deg, rgba(138,111,78,.06) 0 14px, transparent 14px 28px),
    linear-gradient(135deg, #cfc7b8 0%, #b7ad9b 100%);
  display: flex; align-items: center; justify-content: center;
  color: #5d574c; font-size: 13px; letter-spacing: .18em;
  position: relative; overflow: hidden;
}
.ph span {
  background: rgba(244,241,236,.82); padding: 8px 14px; border-radius: 2px;
  border: 1px solid rgba(93,87,76,.3); text-align:center;
}

/* ---------- 作品网格 ---------- */
.works-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 40px); }
.case { cursor: pointer; }
.case .ph { aspect-ratio: 4 / 3; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.case:hover .ph { transform: scale(1.03); }
.case-meta { padding: 18px 2px 0; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.case-meta h3 { font-size: 21px; }
.case-meta .tag { font-size: 12px; letter-spacing: .2em; color: var(--accent); white-space: nowrap; }
.case-meta p { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ---------- 关于 ---------- */
.about { background: var(--paper-2); }
.about .quote {
  font-weight: 700; font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.5; max-width: 22ch; margin-bottom: 40px;
}
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.about p { color: var(--muted); margin-bottom: 16px; }
.about .ph { aspect-ratio: 3 / 4; }

/* ---------- 荣誉 ---------- */
.awards-list { border-top: 1px solid var(--line); }
.award-row {
  display: grid; grid-template-columns: 120px 1fr; gap: 20px;
  padding: 22px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.award-row .yr { font-weight: 700; font-size: 22px; color: var(--accent); }
.award-row .name { font-size: 16px; }
.award-row .name small { display:block; color: var(--muted); font-size: 13px; margin-top: 4px; letter-spacing:.04em;}

/* ---------- 动态 ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px,3vw,36px); }
.news-card .ph { aspect-ratio: 16 / 10; }
.news-card .date { font-size: 12px; letter-spacing: .16em; color: var(--accent); margin: 16px 0 8px; }
.news-card h3 { font-size: 18px; line-height: 1.4; }
.news-card p { color: var(--muted); font-size: 14px; margin-top: 8px; }

/* ---------- 页脚/联系 ---------- */
.footer { background: var(--dark); color: #e9e4da; padding: clamp(70px,10vh,120px) var(--gut) 40px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; }
.footer h2 { color: #fff; font-size: clamp(26px,3.4vw,40px); line-height: 1.3; font-weight: 900; }
.footer .contact-list { list-style: none; margin-top: 26px; }
.footer .contact-list li { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: 15px; letter-spacing:.04em; }
.footer .contact-list li b { color: var(--accent); font-weight: 500; margin-right: 14px; letter-spacing:.2em; font-size:12px;}
.footer-bottom { max-width: var(--maxw); margin: 60px auto 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); display:flex; justify-content: space-between; font-size: 12px; color: rgba(233,228,218,.6); letter-spacing:.1em; flex-wrap: wrap; gap:10px;}
.footer-logo { height: 74px; width: auto; filter: brightness(0) invert(1); opacity: .92; margin-bottom: 24px; }

/* ---------- 滚动揭示动画 ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 真实图片填充 ---------- */
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.photo-fill { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- 首页主文案 / 设计宣言 ---------- */
.manifesto { max-width: 820px; margin: 0 auto; }
.manifesto .m-lead {
  font-weight: 700; font-size: clamp(21px, 2.8vw, 32px);
  line-height: 1.65; color: var(--ink); margin-bottom: 34px;
}
.manifesto .m-body p { color: var(--muted); font-size: clamp(15px, 1.5vw, 17px); margin-bottom: 20px; max-width: 64ch; }
.manifesto .m-punch {
  font-weight: 700; font-size: clamp(24px, 3.6vw, 42px);
  line-height: 1.5; color: var(--ink); margin-top: 46px; text-align: center;
}

/* ---------- 设计理念三栏 ---------- */
.philosophy-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.philosophy-grid .col { padding: clamp(30px,4vw,52px) clamp(22px,3vw,40px); border-right: 1px solid var(--line); }
.philosophy-grid .col:last-child { border-right: none; }
.philosophy-grid h3 { font-weight: 900; font-size: clamp(26px,3vw,40px); color: var(--ink); margin-bottom: 20px; }
.philosophy-grid p { color: var(--muted); font-size: 15px; line-height: 1.85; }
@media (max-width: 760px) {
  .philosophy-grid { grid-template-columns: 1fr; }
  .philosophy-grid .col { border-right: none; border-bottom: 1px solid var(--line); }
  .philosophy-grid .col:last-child { border-bottom: none; }
}

/* ---------- 主理人 ---------- */
.founder-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(30px,5vw,80px); align-items: center; }
.founder-photo { position: relative; overflow: hidden; }
.founder-photo img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.founder-name { font-weight: 900; font-size: clamp(28px,3.6vw,46px); color: var(--ink); }
.founder-name span { font-size: .5em; letter-spacing: .12em; color: var(--muted); margin-left: 12px; font-weight: 500; }
.founder-title { color: var(--accent); letter-spacing: .16em; font-size: 13px; margin: 12px 0 26px; font-weight: 500; }
.founder-body p { color: var(--muted); margin-bottom: 16px; font-size: 15px; }
@media (max-width: 860px) { .founder-grid { grid-template-columns: 1fr; } }

/* ---------- 二维码块 ---------- */
.qr-block { margin-top: 26px; }
.qr-block img { width: 168px; height: 168px; object-fit: contain; background: #fff; padding: 10px; border-radius: 4px; }
.qr-block p { margin-top: 12px; font-size: 12px; letter-spacing: .14em; color: rgba(233,228,218,.72); }

/* ---------- 子页（混合式结构） ---------- */
.subpage { padding-top: 92px; }
.subhero {
  position: relative; min-height: 44vh; display: flex; align-items: flex-end;
  padding: 0 var(--gut) 60px; color: #fff; overflow: hidden;
}
.subhero .hero-img { position: absolute; inset: 0; }
.subhero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,19,17,.30), rgba(20,19,17,.78)); }
.subhero .inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; }
.subhero h1 { font-size: clamp(30px, 5vw, 62px); font-weight: 900; }
.breadcrumb { font-size: 12px; letter-spacing: .2em; color: var(--accent); margin-bottom: 16px; }
.breadcrumb a:hover { text-decoration: underline; }

.detail-figure { margin: clamp(36px,6vh,64px) 0; }
.detail-figure .ph { aspect-ratio: 16 / 9; }
.prose { max-width: 70ch; color: var(--muted); }
.prose p { margin-bottom: 20px; }
.prose h3 { color: var(--ink); font-size: 22px; margin: 34px 0 14px; font-weight: 700; }
.back-link {
  display: inline-block; margin-top: 48px; font-size: 13px; letter-spacing: .18em;
  color: var(--accent); border: 1px solid var(--line); padding: 12px 22px; border-radius: 2px;
  transition: background .3s ease, color .3s ease;
}
.back-link:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* 作品详情页：真实图片显示 */
.subhero .hero-img { width: 100%; height: 100%; object-fit: cover; }
.detail-figure img { display: block; width: 100%; height: auto; }

/* 作品卡片真实封面（替代 .ph 占位） */
.case img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.case:hover img { transform: scale(1.03); }

/* 详情页图集网格 */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: clamp(30px,5vh,56px) 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.gallery .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .gallery { grid-template-columns: 1fr; } }

/* 作品列表页：统一网格 */
.works-grid.full { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .works-grid.full { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .works-grid.full { grid-template-columns: 1fr; } }

/* 联系页 */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px,5vw,72px); align-items: start; }
.contact-info li { list-style: none; padding: 16px 0; border-top: 1px solid var(--line); display: flex; gap: 18px; }
.contact-info li b { color: var(--accent); font-weight: 500; letter-spacing: .2em; font-size: 12px; min-width: 56px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .nav-links { gap: 15px; font-size: 12px; letter-spacing: .1em; }
  .nav-links a em { font-size: 8px; letter-spacing: .14em; margin-top: 3px; }
  .works-grid, .news-grid, .about-grid, .footer-inner { grid-template-columns: 1fr; }
  .award-row { grid-template-columns: 80px 1fr; }
  .brand-logo { height: 46px; }
  .nav.solid .brand-logo { height: 40px; }
  .footer-logo { height: 62px; }
}
/* 极窄屏：收起导航英文，保证不挤压、不换行 */
@media (max-width: 600px) {
  .nav-links a em { display: none; }
}

/* 小屏：单层图做「由近及远 / 由远及近」往返动画，省一半解码开销 */
@media (max-width: 700px) {
  .hero-layer.l2 { display: none; }
  .hero-layer.l1 {
    opacity: 1;
    /* 移动端单层往返：同步加快 1.8 倍 10s / 1.8 = 5.56s */
    animation: ken-push-alt 5.56s ease-in-out infinite alternate;
  }
  @keyframes ken-push-alt { from { transform: scale(1.13); } to { transform: scale(1.00); } }
}

/* ---------- 动效降级（系统开启「减弱动态效果」时全部静止） ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  .hero-inner h1, .hero-inner .lead { animation: none; }
  .hero-layer { animation: none; }
  .hero-layer.l1 { opacity: 1; }
  .hero-layer.l2 { display: none; }
}
