/* ============================================================
   ViV-style front page — furniture design portfolio
   Fixed-viewport stage · infinite vertical marquee columns
   ============================================================ */

:root {
  --bg:       #ffffff;
  --ink:      #000000;
  --ink-2:    #6e6e73;
  --ink-3:    #86868b;
  --hair:     rgba(0, 0, 0, .12);
  --nav-h:    64px;
  --ease:     cubic-bezier(.22,.61,.36,1);
  --font:     "Helvetica Now Display", "Inter", -apple-system, BlinkMacSystemFont,
              "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }

/* ---------------- NAV ---------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  mix-blend-mode: normal;
  pointer-events: none;
}

.nav > * { pointer-events: auto; }

.nav-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-center { gap: 10px; }
.nav-right  { gap: 16px; }

.nav-link {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--ink);
  position: relative;
  white-space: nowrap;
  transition: opacity .25s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav-link:hover::after { transform: scaleX(1); }

.slash {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  user-select: none;
}

/* 十字加号图标 */
.cross {
  width: 20px;
  height: 20px;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.cross span {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1.4px;
  background: var(--ink);
  transition: transform .38s var(--ease);
}
.cross span:nth-child(1) { transform: translateY(-50%); }
.cross span:nth-child(2) { transform: translateY(-50%) rotate(90deg); }
.cross:hover span:nth-child(2) { transform: translateY(-50%) rotate(0deg); }
.cross:hover span:nth-child(1) { transform: translateY(-50%) rotate(45deg); }

/* 移动端菜单 */
.menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s var(--ease), visibility .4s;
}
.menu.open { opacity: 1; visibility: visible; }
.menu a {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.35;
  transform: translateY(18px);
  opacity: 0;
  transition: transform .5s var(--ease), opacity .5s var(--ease);
}
.menu.open a { transform: none; opacity: 1; }
.menu.open a:nth-child(1) { transition-delay: .06s; }
.menu.open a:nth-child(2) { transition-delay: .12s; }
.menu.open a:nth-child(3) { transition-delay: .18s; }
.menu.open a:nth-child(4) { transition-delay: .24s; }
.menu.open a:nth-child(5) { transition-delay: .30s; }

body.menu-open .cross span:nth-child(1) { transform: translateY(-50%) rotate(45deg); }
body.menu-open .cross span:nth-child(2) { transform: translateY(-50%) rotate(-45deg); }

/* ---------------- STAGE (hero) ---------------- */
.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: block;
}

/* 五列跑马灯 */
.gallery {
  display: flex;
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 118px 10px 64px;
  align-items: stretch;
}

.col {
  flex: 1 1 0%;
  min-width: 0;
  max-width: 268px;
  height: 100%;
  overflow: hidden;
  position: relative;
  will-change: transform;
}

.col-track {
  display: flex;
  flex-direction: column;
  gap: 10px;
  will-change: transform;
}

/* 每列起始错位，形成 ViV 式错落网格 */
.col:nth-child(1) { margin-top: 0; }
.col:nth-child(2) { margin-top: 232px; }
.col:nth-child(3) { margin-top: 104px; }
.col:nth-child(4) { margin-top: 292px; }
.col:nth-child(5) { margin-top: 168px; }

.item {
  margin: 0;
  flex: 0 0 auto;
}

.media {
  position: relative;
  overflow: hidden;
  background: #f5f5f7;
  aspect-ratio: 3 / 4;
}

.media img {
  transition: transform .9s var(--ease);
}

.item:hover .media img { transform: scale(1.04); }

.item figcaption {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
  letter-spacing: .01em;
  color: var(--ink);
}

/* ---------------- 图片 → 项目跳转 ---------------- */
/* 悬停时图片上浮起一层按钮，点击跳到下方对应项目 */
.item[data-project] { cursor: pointer; }

.item[data-project] .media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .28);
  opacity: 0;
  transition: opacity .4s var(--ease);
  pointer-events: none;
  z-index: 1;
}

.proj-btn {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 12px);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .16);
}

.proj-btn-sub {
  color: var(--ink-3);
  font-weight: 400;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width .4s var(--ease), opacity .3s var(--ease);
}

.proj-btn-arrow {
  font-size: 15px;
  transition: transform .35s var(--ease);
}

.item[data-project]:hover .media::after,
.item[data-project] .media:focus-within::after { opacity: 1; }

.item[data-project]:hover .proj-btn,
.item[data-project] .media:focus-within .proj-btn {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.item[data-project]:hover .proj-btn-sub,
.item[data-project] .media:focus-within .proj-btn-sub {
  max-width: 190px;
  opacity: 1;
}

.item[data-project]:hover .proj-btn-arrow { transform: translateX(3px); }

.proj-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* 触屏：没有 hover，直接显示按钮 */
@media (hover: none) {
  .item[data-project] .media::after { opacity: .22; }
  .proj-btn {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
  }
  .proj-btn-sub { max-width: 190px; opacity: 1; }
}

/* 目标区块落地后的短暂高亮 */
.project.flash {
  background: #f5f5f7;
}
.product.flash {
  animation: projFlash 1.6s var(--ease);
}
@keyframes projFlash {
  0%   { background: #ececec; }
  100% { background: var(--bg); }
}

/* ---------------- 项目索引 ---------------- */
.proj-index {
  background: var(--bg);
  border-top: 1px solid var(--hair);
}
.proj-index-head {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 110px) 24px 0;
}
.proj-index-head h2 {
  font-size: clamp(30px, 4.4vw, 58px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin: 0 0 16px;
}
.proj-index-note {
  font-size: clamp(14px, 1.3vw, 17px);
  color: var(--ink-2);
  margin: 0;
}
.proj-index-list {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 48px) 24px clamp(48px, 7vw, 88px);
}
.proj-index-list li { border-top: 1px solid var(--hair); }
.proj-index-list li:last-child { border-bottom: 1px solid var(--hair); }
.proj-index-list a {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 18px 0;
  transition: padding-left .35s var(--ease), opacity .25s var(--ease);
}
.proj-index-list a:hover { padding-left: 12px; }
.pi-no {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  flex-shrink: 0;
  width: 26px;
}
.pi-name {
  font-size: clamp(17px, 2vw, 26px);
  font-weight: 400;
  letter-spacing: -.02em;
  flex: 1 1 auto;
}
.pi-meta {
  font-size: 13px;
  color: var(--ink-3);
  flex-shrink: 0;
}

/* ---------------- 固定字标 ---------------- */
.logo-row {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  align-items: flex-start;
  gap: 40px;
  padding: 0 24px;
  pointer-events: none;
  z-index: 20;
}

.wordmark {
  display: flex;
  flex-wrap: wrap;
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-size: clamp(80px, 14vw, 210px);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.01em;
  color: var(--ink);
  max-width: 66%;
  position: relative;
}

/* 字标下的柔光留白，保证压在图片上仍清晰 */
.wordmark::before {
  content: "";
  position: absolute;
  inset: -18% -12% -18% -12%;
  background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,.96) 0%, rgba(255,255,255,.82) 46%, rgba(255,255,255,0) 76%);
  z-index: -1;
  pointer-events: none;
}

.wordmark .wm-char {
  display: inline-block;
  white-space: pre;
  will-change: transform;
}

.tagline {
  font-size: clamp(15px, 1.6vw, 24px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: .01em;
  color: var(--ink);
  padding-top: 6px;
  flex-shrink: 0;
  max-width: 260px;
}

/* 滚动提示 */
.hint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 20;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hint span::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 18px;
  background: var(--ink-3);
  margin-right: 8px;
  vertical-align: -4px;
  animation: hintDrop 2.1s var(--ease) infinite;
}
@keyframes hintDrop {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%      { transform: translateY(6px); opacity: .3; }
}

/* ---------------- PRODUCT SECTION ---------------- */
.product {
  background: var(--bg);
  border-top: 1px solid var(--hair);
}

/* 交替底色，让相邻项目区块有清晰的视觉分隔 */
.product-alt { background: #f5f5f7; }
.product-alt .product-hero,
.product-alt .product-gallery img { background: #ebebef; }

.product-head {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 110px) 24px 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.product-head .kicker { margin-bottom: 0; }

.product-head h2 {
  font-size: clamp(30px, 4.4vw, 58px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin: 0;
}

.product-year {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  padding-bottom: 8px;
}

.product-body {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(32px, 4vw, 56px) 24px clamp(56px, 8vw, 110px);
  display: grid;
  grid-template-columns: 1.42fr .58fr;
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
}

/* 主图 */
.product-hero {
  grid-row: span 2;
  border-radius: 2px;
  overflow: hidden;
  background: #f5f5f7;
}
.product-hero img { width: 100%; height: auto; display: block; }

/* 侧栏文字 */
.product-copy {
  font-size: clamp(15px, 1.35vw, 18px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
}
.product-copy p + p { margin-top: 14px; }

.product-spec {
  margin-top: 24px;
  border-top: 1px solid var(--hair);
}
.product-spec li {
  display: flex;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 13px;
}
.product-spec span {
  width: 66px;
  flex-shrink: 0;
  color: var(--ink-3);
}
.product-spec strong { font-weight: 500; }

/* 图组 */
.product-gallery {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.product-gallery figure { margin: 0; }
.product-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
  background: #f5f5f7;
}
.product-gallery figure.g-wide { grid-column: 1 / -1; }
.product-gallery figcaption {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}

@media (max-width: 900px) {
  .product-body { grid-template-columns: 1fr; }
  .product-hero { grid-row: auto; }
  .product-gallery { grid-template-columns: 1fr; }
  .product-gallery figure.g-wide { grid-column: auto; }
}

/* ---------------- PANELS ---------------- */
.panel {
  background: var(--bg);
  border-top: 1px solid var(--hair);
}

.panel-alt { background: #f5f5f7; }

.panel-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(64px, 9vw, 128px) 24px;
}

.kicker {
  display: block;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--ink-3);
  margin-bottom: 22px;
}

.panel h2 {
  font-size: clamp(30px, 4.4vw, 58px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 40px;
}

.about-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px 56px;
  max-width: 1040px;
  margin-bottom: 48px;
}
.about-cols p {
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
}

.facts {
  max-width: 1040px;
  border-top: 1px solid var(--hair);
}
.facts li {
  display: flex;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 14px;
  font-weight: 500;
}
.facts span {
  width: 80px;
  flex-shrink: 0;
  color: var(--ink-3);
  font-weight: 400;
}
.facts strong { font-weight: 500; }

/* ---------------- NEWS ---------------- */
.news-list { max-width: 1040px; border-top: 1px solid var(--hair); }
.news-list li {
  display: flex;
  gap: 28px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--hair);
  transition: padding-left .35s var(--ease);
}
.news-list li:hover { padding-left: 10px; }
.news-list .date {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  flex-shrink: 0;
  width: 52px;
}
.news-list .txt {
  font-size: clamp(16px, 1.6vw, 21px);
  font-weight: 400;
}

/* ---------------- FOOTER ---------------- */
.foot {
  background: #fff;
  border-top: 1px solid var(--hair);
}

.foot-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(60px, 8vw, 110px) 24px clamp(48px, 6vw, 80px);
}

.foot-word {
  font-size: clamp(40px, 9vw, 132px);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.02em;
  margin-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
}
.foot-word .wm-char { display: inline-block; white-space: pre; }

.mail {
  display: inline-block;
  font-size: clamp(19px, 2.6vw, 30px);
  font-weight: 400;
  letter-spacing: -.02em;
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.mail:hover { border-bottom-color: currentColor; }

.foot-links {
  margin-top: 56px;
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 500;
}
.foot-links a { position: relative; }
.foot-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.foot-links a:hover::after { transform: scaleX(1); }

.foot-bar {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 24px 28px;
  border-top: 1px solid var(--hair);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-3);
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 900px) {
  .nav-center { display: none; }
  /* 移动端舞台改为纵向堆叠，字标在上、图片列在下 */
  .stage {
    height: auto;
    overflow: visible;
    padding-bottom: 28px;
    display: flex;
    flex-direction: column;
  }
  .gallery {
    display: flex;
    gap: 8px;
    width: 100%;
    height: auto;
    padding: 0 8px;
    align-items: stretch;
  }
  .col-track { gap: 8px; }
  .item figcaption { font-size: 12px; line-height: 18px; }

  .col {
    width: 68vw;
    flex: 0 0 68vw;
    height: 58vh;
    margin-top: 0 !important;
  }
  .col:nth-child(3) { display: none; }

  .gallery { order: 2; }

  .logo-row {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    order: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: calc(var(--nav-h) + 30px) 16px 26px;
    background: #fff;
    z-index: 20;
  }
  .wordmark {
    max-width: 100%;
    font-size: clamp(60px, 18vw, 116px);
    line-height: .93;
  }
  .tagline { font-size: 15px; padding-top: 0; max-width: none; }
  .hint { display: none; }

  /* 项目索引移动端：改为纵向堆叠 */
  .proj-index-list a {
    flex-direction: column;
    gap: 4px;
    padding: 16px 0;
  }
  .pi-no { width: auto; }
  .pi-meta { font-size: 12px; }

  /* 移动端图片按钮更靠上，避开图注 */
  .proj-btn { bottom: 12px; padding: 0 14px; }
}

@media (max-width: 560px) {
  .col:nth-child(n+4) { display: none; }
  .nav-right .nav-link { display: none; }
  .col { width: 78vw; flex: 0 0 78vw; }
}

@media (prefers-reduced-motion: reduce) {
  .col-track { animation: none !important; transform: none !important; }
  .media img { transition: none; }
}
