/* 通用样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #000;
  background-color: #fff;
  line-height: 1.5;
  padding-top: 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* 快捷按钮（返回顶部和下到底部） */
.scroll-buttons {
  position: fixed;
  right: calc((100vw - 1600px) / 2 - 60px);
  /* 容器右边缘外侧 60px */
  bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 999;
}

.scroll-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: rgba(231, 231, 231, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.01);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0.4;
  transform: translateY(0);
  transition: opacity 0.3s ease, background-color 0.3s ease, transform 1.5s ease-out;
}

.scroll-button:hover {
  opacity: 1;
  background-color: rgba(211, 223, 231, 0.2);
}

#scroll-top:hover+#scroll-bottom {
  transform: translateY(20px) scale(0.85);
  transition: transform 0.8s ease-out;
}

.scroll-button svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: #696969;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 当屏幕小于容器最大宽度时，快捷按钮保持在固定位置 */
@media screen and (max-width: 1700px) {
  .scroll-buttons {
    right: 20px;
    /* 与容器 padding 对齐 */
  }
}

/* 手机端隐藏快捷按钮 */
@media screen and (max-width: 768px) {
  .scroll-buttons {
    display: none;
  }
}

/* 辅助类：大写粗体 */
.uppercase-bold {
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.5px;
}

/* --- 1. 顶部导航 (Header) --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 20px 0;
  font-size: 18px;
  background-color: rgba(255, 255, 255, 0.95);
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.header-content {
  max-width: 1700px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}


/* 底部区域样式 */
footer {
  text-align: center;
  padding: 20px 10%;
  background-color: #fff;
  border-top: 1px solid #eee;
  margin-top: 50px;
  /* 增加顶部外边距，远离上方图片 */
}

footer p {
  font-size: 14px;
  color: #999;
}

.sub-slogan {
  font-size: 12px;
  color: #aaa;
  margin-top: 8px;
}

/* 返回按钮样式 */
.back-button {
  position: fixed;
  left: calc((100vw - 1600px) / 2 - 60px);
  /* 容器左边缘外侧 60px */
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: rgba(231, 231, 231, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0.4;
  z-index: 999;
  transition: opacity 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

.back-button:hover {
  opacity: 1;
  background-color: rgba(211, 223, 231, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.back-button svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: #696969;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 当屏幕小于容器最大宽度时，返回按钮保持在固定位置 */
@media screen and (max-width: 1700px) {
  .back-button {
    left: 20px;
    /* 与容器 padding 对齐 */
  }
}

/* 手机端隐藏返回按钮 */
@media screen and (max-width: 768px) {
  .back-button {
    display: none;
  }
}

/* 项目简介样式 */
.profile-name {
  margin-top: 60px;
  margin-bottom: 2px;
  text-align: center;
}

.profile-name h1 {
  font-size: 50px;
  font-weight: 900;
}

.profile-name .profile-slogan {
  font-weight: 400;
}

/* 响应式字体缩放 */
@media (max-width: 1200px) {
  .profile-name h1 {
    font-size: 45px;
  }
}

@media (max-width: 992px) {
  .profile-name h1 {
    font-size: 40px;
  }
}

@media (max-width: 768px) {
  .profile-name h1 {
    font-size: 35px;
  }
}

@media (max-width: 576px) {
  .profile-name h1 {
    font-size: 30px;
  }
}

@media (max-width: 400px) {
  .profile-name h1 {
    font-size: 25px;
  }
}

.designer-text {
  display: inline-block;
  transition: color 0.3s ease;
  cursor: pointer;
}

.designer-text:hover {
  color: #838383fa;
}

.case {
  margin-top: 30px;
  margin-bottom: 100px;
  text-align: center;
  /* 让 .intro-layout 作为整体居中 */
  border-top: 1px solid #ddd;
  /* 线段通栏 */
}

.intro-content {
  color: #888;
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* 增加段落间距 */
.intro-content p {
  margin-bottom: 20px;
  /* 设置段落底部间距 */
}

.intro-content p:last-child {
  margin-bottom: 0;
  /* 最后一个段落不需要底部间距 */
}

.intro-layout {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: start;
  gap: 80px;
  margin: 0 auto;
  padding-top: 70px;
  /* 仅保留顶部间距，线段已移到外层 */
  box-sizing: border-box;
}

.intro-title {
  text-align: right;
  line-height: 1.05;
  padding-top: 5px;
}

.intro-title h2 {
  font-size: 7px;
  font-weight: 100;
}

.intro-layout .intro-content {
  max-width: none;
  margin: 0;
  text-align: justify;
  /* 段落两端对齐 */
  text-align-last: left;
  /* 最后一行保持左对齐 */
}

.intro-layout .intro-content p {
  text-align: justify;
  /* 继承父元素两端对齐 */
  text-align-last: left;
  /* 每段最后一行左对齐 */
}

/* 项目背景介绍段落样式 */
.text-container {
  position: relative;
  padding: 20px 0 40px 0;
  margin: 0;
  width: 100%;
  max-width: 100%;
}

.case-label {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 12px;
  color: #aaa;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* 案例展示样式 */
.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 1px;
}

.image-container {
  overflow: hidden;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0;
  transition: transform 0.5s ease;
}

.image-container img {
  width: 100%;
  height: auto;
  display: block;
}

.large-16-9 {
  width: 100%;
  padding-top: 56.25%;
  position: relative;
  border-radius: 0;
}

.large-16-9 img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.square-large {
  width: 100%;
  padding-top: 100%;
  position: relative;
  border-radius: 0;
}

.square-large img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.small-images-row {
  display: flex;
  gap: 10px;
}

.small-16-9 {
  flex: 1;
  padding-top: 56.25%;
  position: relative;
  border-radius: 0;
}

.small-16-9 img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.icon {
  width: 60%;
  height: 60%;
  border-radius: 0;
}

.main-section {
  margin-bottom: -50px;
}

/* 大屏内收：≥1100px 才左右留空 */
@media screen and (min-width: 1100px) {
  .intro-layout {
    max-width: 1100px;
    padding-left: 80px;
    padding-right: 80px;
  }
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
  header {
    padding: 18px 0;
    font-size: clamp(18px, 4.8vw, 22px);
  }

  .header-content a,
  #logo-home {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    min-height: 44px;
  }

  body {
    padding-top: 80px;
  }

  .container {
    padding: 20px 15px;
    gap: 15px;
  }

  .small-images-row {
    flex-direction: column;
    gap: 15px;
  }

  .small-16-9 {
    width: 100%;
  }

  .icon {
    width: 80%;
    height: 80%;
  }

  .profile-name {
    margin-top: 30px;
  }

  .case {
    margin-bottom: 50px;
  }

  .text-container {
    padding: 35px 0;
  }

  .case-label {
    left: 0;
  }

  /* Mobile Intro Layout Adjustment */
  .intro-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-left: 30px;
    padding-right: 30px;
  }

  .intro-title {
    text-align: left;
    padding-top: 0;
  }
}

@media screen and (max-width: 480px) {
  .container {
    padding: 15px 10px;
    gap: 10px;
  }

  .small-images-row {
    gap: 10px;
  }

  .icon {
    width: 90%;
    height: 90%;
  }

  .text-container {
    padding: 30px 0;
  }

  .case-label {
    left: 0;
    font-size: 11px;
  }
}

/* 第一张图片不需要悬停效果 */
.container>.image-container:first-child {
  transition: none;
}

.container>.image-container:first-child:hover {
  transform: none;
}

:root {
  --reveal-distance: 32px;
}

.reveal {
  opacity: 0;
  transform: translate3d(0, var(--reveal-distance), 0);
  will-change: transform, opacity;
}

.reveal-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: transform 700ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 600ms ease-out;
}

@media (prefers-reduced-motion: reduce) {

  .reveal,
  .reveal-visible {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

/* 视频格子：全覆盖视频，待点击播放 */
.video-case {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000;
  border-radius: 0px;
}

.video-case img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

.video-case video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0px;
  cursor: pointer;
  z-index: 1;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease, background-color 0.35s ease;
  opacity: 0.8;
  z-index: 3;
}

.video-case:hover .play-button {
  transform: translate(-50%, -50%) scale(1.15);
  opacity: 0.9;
  background-color: rgba(255, 255, 255, 0.8);
}

/* 移除CSS伪元素的播放图标，使用SVG图标 */
.video-case .play-button:before {
  display: none;
}

.video-case:hover .play-button:before {
  display: none;
}

.video-tile {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #000;
}

.video-tile .video-case {
  width: 100%;
  height: 100%;
}

/* 视频封面和播放按钮的重力砸落动画 */
@keyframes slamDown {
  0% {
    opacity: 1;
    transform: scale(1.15);
  }

  60% {
    opacity: 1;
    transform: scale(1);
  }

  80% {
    transform: scale(1.02);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slamDownButton {
  0% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.3);
  }

  60% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1);
  }

  80% {
    transform: translate(-50%, -50%) scale(1.05);
  }

  100% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* 隐藏状态 - 放大并透明 */
.video-cover-hidden {
  opacity: 0 !important;
  transform: translate(-50%, -50%) scale(1.3) !important;
  pointer-events: none !important;
}

.video-case img.video-cover-hidden {
  opacity: 0 !important;
  transform: scale(1.15) !important;
  pointer-events: none !important;
}

/* 砸落动画触发状态 */
.video-case img.video-slam-active {
  animation: slamDown 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: auto;
}

.play-button.video-slam-active {
  animation: slamDownButton 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: auto;
}
