:root {
  --bg: #000000;
  --bg-soft: #0a0a0a;
  --ink: #ffffff;
  --ink-7: rgba(255,255,255,.7);
  --ink-5: rgba(255,255,255,.5);
  --ink-3: rgba(255,255,255,.3);
  --ink-1: rgba(255,255,255,.12);
  --line: rgba(255,255,255,.18);
  --accent: #f5d90a;

  --side: clamp(20px, 4vw, 72px);
  --header-h: 64px;
}

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent); color: var(--bg); }

/* ===================== 顶部导航 ===================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  padding: 0 var(--side);
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* 默认：在 banner 顶部时为带灰度的纯黑；滚动后由 JS 加 .is-floating 变带透明度的灰黑 */
  background: #111111;
  transition: background-color .35s ease, transform .4s cubic-bezier(.4, 0, .2, 1);
}
/* 滚动中：带灰度黑色的半透明，浮在作品之上 */
.site-header.is-floating {
  background: rgba(17, 17, 17, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
/* 向下滚动时：向上滑出隐藏 */
.site-header.is-hidden {
  transform: translate3d(0, -100%, 0);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  letter-spacing: 1px;
  font-weight: 500;
}
.logo > img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: invert(1);
}
.logo small {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--ink-5);
  margin-left: 6px;
}

.site-nav {
  display: flex;
  gap: clamp(18px, 2.4vw, 40px);
  align-items: center;
}
.site-nav a {
  position: relative;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--ink-7);
  padding: 4px 0;
  transition: color .25s;
}
.site-nav a:hover, .site-nav a.active { color: var(--ink); }
.site-nav a + a::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 12px;
  background: var(--ink-1);
}

.menu-toggle {
  display: none;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--ink);
  padding: 8px 0;
}

/* ===================== 首页 & 作品页：错落瀑布流（绝对定位 + JS 布局）===================== */
.home-page { min-height: 100vh; }

/* ===================== 首页 Banner：全屏自动轮播 ===================== */
.banner {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--bg);
}
.banner-track,
.banner-slide {
  position: absolute;
  inset: 0;
}
.banner-slide {
  opacity: 0;
  transition: opacity 1.1s ease;
  z-index: 1;
  /* 顶部留出固定导航高度，避免 header 遮挡作品内容 */
  padding-top: var(--header-h);
}
.banner-slide.active { opacity: 1; z-index: 2; }
.banner-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transform: scale(1.001);
  transition: transform 7s cubic-bezier(.2,.6,.3,1);
}
.banner-slide.active img { transform: scale(1.08); }
.banner-slide .scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.12) 45%, rgba(0,0,0,.18) 100%);
}
.banner-slide .caption {
  position: absolute;
  left: var(--side);
  right: var(--side);
  bottom: clamp(72px, 12vh, 120px);
  color: #fff;
  max-width: 720px;
}
.banner-slide .caption .eyebrow {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.banner-slide .caption h2 {
  margin: 0;
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 500;
  letter-spacing: 2px;
  line-height: 1.08;
}
.banner-slide .caption p {
  margin: 20px 0 0;
  font-size: 15px;
  letter-spacing: 1px;
  color: rgba(255,255,255,.82);
}

/* 轮播指示点 */
.banner-dots {
  position: absolute;
  left: var(--side);
  bottom: clamp(32px, 6vh, 56px);
  z-index: 5;
  display: flex;
  gap: 10px;
}
.banner-dot {
  width: 30px;
  height: 2px;
  padding: 0;
  background: rgba(255,255,255,.32);
  border: 0;
  cursor: pointer;
  transition: background .3s, width .3s;
}
.banner-dot.active { background: #fff; width: 48px; }

/* 左右箭头 */
.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.28);
  color: #fff;
  font-size: 20px;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background .3s, border-color .3s;
}
.banner-arrow:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.5); }
.banner-arrow.prev { left: 24px; }
.banner-arrow.next { right: 24px; }

/* 底部滚动提示 */
.banner-scroll-hint {
  position: absolute;
  right: var(--side);
  bottom: clamp(32px, 6vh, 56px);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
}
.banner-scroll-hint::after {
  content: "";
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,.35);
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(.4); opacity: .5; }
  50% { transform: scaleY(1); opacity: 1; }
}

.masonry {
  position: relative;
  width: 100%;
  --masonry-gap: 3px;
}
.masonry .item {
  position: absolute;
  top: 0;
  left: 0;
  /* 宽高由 JS 根据列宽 × 尺寸比例计算后写入；定位用 top/left，
     留出 transform 给「滚入视口渐显」动画，避免互相覆盖 */
  overflow: hidden;
  background: var(--bg-soft);
  display: block;
  cursor: pointer;
  opacity: 0;
  transform: translate3d(0, 140px, 0);
  will-change: transform, opacity;
}
/* 入场动画：从下方 140px 向上滑入 + 渐显，错峰用 animation-delay（内联） */
.masonry .item.is-in {
  animation: masonrySlideUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes masonrySlideUp {
  from {
    opacity: 0;
    transform: translate3d(0, 140px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
/* 尊重系统「减少动效」设置：直接显示 */
@media (prefers-reduced-motion: reduce) {
  .masonry .item {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}

.masonry .item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.4s cubic-bezier(.2,.6,.3,1), opacity .5s;
}
.masonry .item:hover img { transform: scale(1.04); opacity: .92; }

/* 信息层 */
.masonry .item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.2) 35%, rgba(0,0,0,0) 65%);
  pointer-events: none;
}
.masonry .item .meta {
  position: absolute;
  left: 18px;
  bottom: 16px;
  right: 18px;
  color: #fff;
}
.masonry .item .meta b {
  display: block;
  font-weight: 500;
  letter-spacing: .5px;
  margin-bottom: 4px;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.masonry .item:first-child .meta b { font-size: 28px; letter-spacing: 1px; }
.masonry .item:not(:first-child) .meta b { font-size: 15px; }
.masonry .item .meta span {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
}

/* 黄色装饰点 */
.masonry .item::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,0,0,.4);
}
.masonry .item:first-child::after { width: 10px; height: 10px; }

/* ===================== 订阅 & Footer ===================== */
.subscribe {
  background: var(--bg);
  padding: 80px var(--side) 60px;
}
.subscribe form {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 24px;
  transition: border-color .25s;
}
.subscribe form:focus-within { border-color: var(--ink-3); }
.subscribe input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-size: 15px;
  outline: none;
}
.subscribe input::placeholder { color: var(--ink-5); }
.subscribe button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform .25s;
}
.subscribe button:hover { transform: scale(1.05); }
.subscribe button svg { width: 18px; height: 18px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px var(--side);
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  font-size: 13px;
  color: var(--ink-5);
  line-height: 1.8;
}
.footer-brand {
  font-size: 16px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: .5px;
  margin-bottom: 8px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-links a { transition: color .25s; }
.footer-links a:hover { color: var(--ink); }
.footer-social {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: flex-start;
}
.footer-social a {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 12px;
  transition: background .25s, border-color .25s;
}
.footer-social a:hover { background: var(--ink-1); border-color: var(--ink-3); }

/* ===================== 通用页标签 ===================== */
.page-label {
  padding: calc(var(--header-h) + 40px) var(--side) 24px;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--ink-5);
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.page-label span { color: var(--accent); margin-right: 12px; }


/* ===================== 案例详情页：全幅宽度 · 不裁剪 · 高度自适应 · 仅图片 ===================== */
.project-page { background: var(--bg); }
.project-page main { position: relative; width: 100%; }
/* 详情页只展示图片，不显示任何文字介绍 */
.project-stage {
  padding-top: 0;
}
.project-stage figure {
  margin: 0;
  width: 100%;
  display: block;
  line-height: 0;
  background: var(--bg);
}
/* 首张图顶部留出固定导航高度，避免 header 遮挡作品内容 */
.project-stage figure:first-child {
  padding-top: var(--header-h);
}
/* 图片宽度最大化：宽度铺满整幅，高度按原始比例自适应，绝不裁剪 */
.project-stage figure img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.project-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 32px var(--side);
  border-top: 1px solid var(--line);
  font-size: 14px;
  letter-spacing: 1px;
}
.project-navigation a { transition: color .25s; }
.project-navigation a:hover { color: var(--accent); }
.project-navigation #project-prev { text-align: left; }
.project-navigation #project-next { text-align: right; }
.project-navigation .back-link {
  padding: 10px 24px;
  border: 1px solid var(--line);
  text-align: center;
}
.project-navigation .back-link:hover { border-color: var(--ink-3); }

/* ===================== 关于页 ===================== */
.about-hero {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
  padding: 64px var(--side);
}
.about-hero .visual {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  padding: 48px;
}
.about-hero .visual img {
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: contain;
  filter: grayscale(20%);
}
.about-hero .body {
  max-width: 560px;
}
.about-hero .body h1 {
  margin: 0 0 32px;
  font-size: clamp(32px, 4.5vw, 64px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 1px;
}
.about-hero .body p {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 2;
  color: var(--ink-7);
}
.about-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}
.about-services .service {
  background: var(--bg);
  padding: 48px var(--side);
}
.about-services .service h3 {
  margin: 0 0 16px;
  font-size: 14px;
  letter-spacing: 1.5px;
  color: var(--accent);
  text-transform: uppercase;
}
.about-services .service p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-5);
}

/* ===================== 经历页 ===================== */
.honors-list {
  padding: 48px var(--side) 96px;
  max-width: 900px;
}
.honor-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: baseline;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.honor-item .year {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--accent);
}
.honor-item .title { font-size: 19px; font-weight: 500; }
.honor-item .desc { color: var(--ink-5); text-align: right; }

/* ===================== 联系页 ===================== */
.contact-hero {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px var(--side);
}
.contact-hero .eyebrow {
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.contact-hero h1 {
  margin: 0 0 48px;
  font-size: clamp(32px, 6vw, 72px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 2px;
}
.contact-people {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 360px;
  width: 100%;
  margin: 0 auto;
}
.contact-people .person {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  padding: 24px;
}
.contact-people .person img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: grayscale(100%);
  margin-bottom: 20px;
  background: #111;
}
.contact-people .person span {
  display: block;
  font-size: 13px;
  letter-spacing: 1.5px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.contact-people .person b {
  display: block;
  font-size: 21px;
  font-weight: 500;
  color: var(--ink);
}
.contact-links {
  display: flex;
  gap: 24px;
  margin-top: 48px;
}
.contact-links a {
  font-size: 14px;
  letter-spacing: 1.5px;
  color: var(--ink-7);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: color .25s, border-color .25s;
}
.contact-links a:hover { color: var(--ink); border-color: var(--ink-3); }

/* ===================== 动效 ===================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===================== 响应式 ===================== */
@media (max-width: 900px) {
  .site-nav { display: none; }
  .menu-toggle { display: block; }
  .menu-toggle[aria-expanded="true"] + .site-nav,
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: var(--header-h) 0 0;
    background: rgba(0,0,0,.96);
    padding: 40px var(--side);
    gap: 24px;
    align-items: flex-start;
  }
  .site-nav a + a::before { display: none; }

  .masonry .item .meta b { font-size: 14px; }
  .masonry .item:first-child .meta b { font-size: 22px; }

  .project-navigation { grid-template-columns: 1fr 1fr; gap: 12px; }
  .project-navigation .back-link { grid-column: 1 / -1; order: -1; }
  .about-hero { grid-template-columns: 1fr; }
  .about-services { grid-template-columns: 1fr; }
  .honor-item { grid-template-columns: 1fr; gap: 6px; }
  .honor-item .desc { text-align: left; }
  .contact-people { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; gap: 24px; }
  .footer-social { justify-content: flex-start; }
}

@media (max-width: 640px) {
  :root { --header-h: 56px; }
  .masonry { --masonry-gap: 2px; }
  .masonry .item .meta { left: 14px; bottom: 12px; right: 14px; }

  .banner { min-height: 480px; height: 100svh; }
  .banner-arrow { display: none; }
  .banner-scroll-hint { display: none; }
  .banner-slide .caption { bottom: 96px; }
  .banner-slide .caption h2 { letter-spacing: 1px; }
}
