/* ============================================
   Home Page Styles
   主页专用样式
   ============================================ */

/* 主页基础样式 */
.home-page {
  background: #fff;
  color: #111;
  min-height: calc(100vh + var(--footer-h, 80vh));
  display: flex;
  flex-direction: column;
  font-family: 'Noto Sans SC', 'Source Han Sans CN', 'Source Han Sans', 'Microsoft YaHei', 'SimHei', sans-serif;
  padding-bottom: var(--footer-h, 80vh);
  position: relative;
  z-index: 1;
}

/* 页面内容包装器 - 中间层 */
.page-content-wrapper {
  position: relative;
  z-index: 100;
  width: 100%;
  background: #fff;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

/* ============================================
   英雄块样式
   ============================================ */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 600px;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #000;
  z-index: 1;
}

/* 像素动画背景 */
.hero-pixel-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  transition: opacity 1s ease-out;
}

.hero-pixel-bg.fade-out {
  opacity: 0;
}

.hero-pixel-bg canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 1;
  opacity: 0;
  transition: opacity 1s ease-in;
}

.hero-video-container.show {
  opacity: 1;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 2;
  pointer-events: none;
}

/* 英雄块内容 */
.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}
@media (max-width: 768px) {
  .hero-content {
    padding: 0 20px;
  }
}
@media (max-width: 480px) {
  .hero-content {
    padding: 0 16px;
  }
}

.hero-content-inner {
  width: 100%;
  display: flex;
  justify-content: center;
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-3xl);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
  text-align: center;
  width: 100%;
}

@media (min-width: 768px) {
  .hero-title {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-5xl);
    line-height: 1.1;
    width: auto;
  }
}

.hero-title-main {
  display: block;
  white-space: nowrap;
  margin-right: 0;
  font-weight: 700;
  text-align: center;
}
@media (min-width: 768px) {
  .hero-title-main {
    display: inline-block;
    margin-right: 12px;
    text-align: left;
  }
}

.hero-title-keywords-wrapper {
  display: block;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  height: 58px;
  position: relative;
  transition: height 0.3s ease;
}

@media (min-width: 768px) {
  .hero-title-keywords-wrapper {
    height: 90px;
    width: auto;
    min-width: 300px;
    flex-shrink: 0;
  }
  .hero-title-keywords {
    align-items: flex-start;
    min-width: 300px;
  }
}

.hero-title-keywords {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
  min-width: 0;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

@media (min-width: 768px) {
  .hero-title-keywords {
    transform: translateY(0);
  }
}

.keyword-item {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--font-size-3xl);
  line-height: 1.2;
  font-weight: 700;
  height: 58px;
  width: 100%;
  text-align: center;
  transition: opacity 0.8s ease, filter 0.8s ease, transform 0.8s ease;
  opacity: 1;
  filter: blur(0px);
  transform: scale(1);
}

@media (min-width: 768px) {
  .keyword-item {
    height: 90px;
  }
}

.keyword-item:not(.is-active) {
  opacity: 0;
  filter: blur(12px);
  transform: scale(0.9);
}

@media (min-width: 768px) {
  .keyword-item {
    font-size: var(--font-size-5xl);
    line-height: 1.125;
  }
}

/* 英雄区域箭头 */
.hero-arrow {
  position: absolute;
  bottom: 65px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  opacity: 1;
  transition: opacity 0.3s ease;
  display: none;
}

@media (min-width: 768px) {
  .hero-arrow {
    display: block;
    bottom: 0;
  }
}

.hero-arrow svg {
  width: 64px;
  height: 64px;
}

@media (min-width: 768px) {
  .hero-arrow svg {
    width: 86px;
    height: 86px;
  }
}

/* ============================================
   介绍文字区
   ============================================ */
.intro-section {
  padding: 20px 0 20px 0;
  background: #fff;
}

@media (min-width: 768px) {
  .intro-section {
    padding: 60px 0;
  }
}

.intro-text {
  width: 100%;
  max-width: 100%;
  font-size: var(--font-size-xl);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: #1b1b1b;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@media (min-width: 768px) {
  .intro-text {
    width: 60vw;
    max-width: 60vw;
    font-size: var(--font-size-2xl);
    line-height: 1.4;
  }
}

.intro-text strong {
  color: #333333;
  font-weight: 700;
}

.intro-text .intro-keyword {
  color: #333333;
  font-weight: 700;
}

/* ============================================
   主内容区
   ============================================ */
.main-content {
  flex: 1;
  background: #fff;
  position: relative;
  z-index: 1;
}

.content-container {
  max-width: 1920px;
  margin: 0 auto;
  padding: 10px 50px;
}

/* 作品行间距 - 移动端缩小 */
@media (max-width: 768px) {
  .works-row {
    gap: 20px;
    margin-bottom: 32px;
  }
}

/* 作品展示区 */
.works-section {
  padding: 0;
  background: #fff;
}

/* ============================================
   Exalt 风格两列交替布局
   ============================================ */
.works-row {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
}

@media (min-width: 768px) {
  .works-row {
    flex-direction: row;
    gap: 24px;
    margin-bottom: 64px;
    align-items: flex-start;
  }
}

/* 60% 网格 */
.work-grid-60 {
  width: 100%;
}

@media (min-width: 768px) {
  .work-grid-60 {
    flex: 0 0 calc(60% - 12px);
    max-width: calc(60% - 12px);
  }
}

/* 40% 网格 */
.work-grid-40 {
  width: 100%;
}

@media (min-width: 768px) {
  .work-grid-40 {
    flex: 0 0 calc(40% - 12px);
    max-width: calc(40% - 12px);
  }
}

/* 卡片容器 - Exalt 风格 */
.work-item-card {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* 卡片内的链接（图片区域） */
.work-item-card > .project-card {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 10 / 7;
  overflow: hidden;
  border-radius: 10px;
  text-decoration: none;
  transform: translateZ(0);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
}

/* 卡片外部信息区域 - 标题和描述 */
.project-card__info {
  padding: 14px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* 标题组（副标题 + 主标题）同一行 */
.project-card__titles {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

/* 副标题 - 灰色，与主标题同行同字号，粗体 */
.project-card__desc {
  margin: 0;
  font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  color: #1b1b1b;
}

@media (min-width: 768px) {
  .project-card__desc {
    font-size: 32px;
  }
}

/* 主标题 - 与副标题同行同字号，深色区分，粗体 */
.project-card__name {
  margin: 0;
  font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.3;
  color: #999;
}

@media (min-width: 768px) {
  .project-card__name {
    font-size: 32px;
  }
}

/* 服务内容标签容器 */
.project-card__services {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.project-card__service-tag {
  display: inline-block;
  padding: 4px 12px;
  font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: #fff;
  background: #111;
  border-radius: 4px;
}

@media (min-width: 768px) {
  .project-card__service-tag {
    font-size: 13px;
    padding: 4px 14px;
  }
}

/* === 大展示块（60%网格） === */
.project-card__info--large {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* === 小展示块（40%网格） === */
.project-card__info--small {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* ============================================
   Project Card 样式
   ============================================ */
.project-card {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  transform: translateZ(0);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
}

.project-card--disabled {
  cursor: default;
}

.project-card__image {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #f0f0f0;
}

.project-card__image::after {
  display: none;
}

.project-card__image-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.project-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

.project-card:hover .project-card__img:not(.no-scale) {
  transform: scale(1.05);
}

/* 有视频的块：默认显示图片，悬停时显示视频 */
.project-card__image-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  z-index: 2;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-card__image-hover {
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

.project-card__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
  pointer-events: none;
}

.project-card:hover .project-card__video {
  opacity: 1;
  z-index: 3;
  pointer-events: auto;
}

.project-card__video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.project-card__details {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  z-index: 10;
}

@media (min-width: 1024px) {
  .project-card__details {
    bottom: 24px;
    padding: 0 24px;
  }
}

.project-card__text {
  opacity: 0;
  transform: translateY(3rem);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #fff;
}

.project-card:hover .project-card__text {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 768px) {
  .project-card:hover .project-card__text {
    opacity: 1;
  }
}

.project-card__text.text-grey-dark {
  color: #fff;
}

.project-card__text.text-white {
  color: #fff;
}

.project-card__client {
  display: block;
  font-size: var(--font-size-lg);
  font-weight: 400;
  font-family: 'Noto Sans SC', 'Source Han Sans CN', 'Source Han Sans', 'Microsoft YaHei', 'SimHei', sans-serif;
  line-height: 1.3;
  margin-bottom: 4px;
  color: inherit;
}

@media (min-width: 768px) {
  .project-card__client {
    font-size: var(--font-size-xl);
    line-height: 1.3;
  }
}

.project-card__title {
  font-size: var(--font-size-base);
  font-weight: 300;
  font-family: 'Noto Sans SC', 'Source Han Sans CN', 'Source Han Sans', 'Microsoft YaHei', 'SimHei', sans-serif;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin: 0;
  color: inherit;
}

@media (min-width: 768px) {
  .project-card__title {
    font-size: var(--font-size-lg);
    line-height: 1.3;
  }
}

.project-card__arrow {
  position: relative;
  width: 70px;
  height: 70px;
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
}

.project-card__arrow::before,
.project-card__arrow::after {
  display: none;
}

.project-card:hover .project-card__arrow {
  opacity: 1;
  transform: scale(1);
}

@media (min-width: 768px) {
  .project-card:hover .project-card__arrow {
    opacity: 1;
    transform: scale(1);
  }
}

.project-card__arrow svg {
  width: 48px;
  height: 48px;
  display: block;
  position: relative;
  z-index: 3;
}

.project-card__arrow svg path {
  stroke: #000;
  fill: none;
  transition: stroke 0.3s ease;
}

.project-card:focus .project-card__arrow,
.project-card:focus .project-card__text {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ============================================
   iPad 适配 (768px - 1024px)
   ============================================ */
@media (min-width: 768px) and (max-width: 1024px) {
  .home-page {
    padding-bottom: var(--footer-h, 75vh);
  }

  .hero-content {
    padding: 0 32px;
  }

  .hero-title {
    font-size: 56px;
  }

  .keyword-item {
    font-size: 56px;
  }

  .hero-title-keywords-wrapper {
    height: 70px;
  }
  .keyword-item {
    height: 70px;
  }

  .hero-title-keywords {
    transform: translateY(0);
  }

  .intro-section {
    padding: 40px 0;
  }

  .intro-text {
    width: 80vw;
    max-width: 80vw;
    font-size: 24px;
  }

  .content-container {
    padding: 16px 32px;
  }

  .works-row {
    gap: 20px;
    margin-bottom: 28px;
  }
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 768px) {
  .home-page {
    padding-bottom: var(--footer-h, 70vh);
    min-height: calc(100vh + var(--footer-h, 70vh));
  }

  .hero-section {
    min-height: 500px;
  }

  .main-content {
    padding: 0;
  }

  .content-container {
    padding: 16px 20px;
  }

  .hero-content {
    padding: 0 20px;
  }

  .hero-title {
    font-size: 42px;
    line-height: 1.2;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .hero-title-main {
    margin-right: 0;
    text-align: center;
  }

  .hero-title-keywords-wrapper {
    height: 50px;
    overflow: hidden;
    width: 100%;
    min-width: 0;
  }

  .hero-title-keywords {
    align-items: center;
    transform: translateY(0);
    width: 100%;
    min-width: 0;
  }

  .keyword-item {
    font-size: 42px;
    line-height: 1.2;
    height: 50px;
    text-align: center;
    width: 100%;
  }

  .intro-section {
    padding: 16px 0;
  }

  .intro-text {
    width: 100%;
    max-width: 100%;
    font-size: 22px;
    line-height: 1.5;
  }

  .works-section {
    padding: 0;
  }

  /* 移动端卡片圆角缩小 */
  .work-item-card > .project-card {
    border-radius: 8px;
  }

  .project-card {
    border-radius: 8px;
  }

  .project-card__info {
    padding: 10px 0 0 0;
  }

  .project-card__name {
    font-size: 20px;
  }

  .project-card__desc {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .home-page {
    padding-bottom: var(--footer-h, 60vh);
    min-height: calc(100vh + var(--footer-h, 60vh));
  }

  .hero-section {
    min-height: 440px;
  }

  .content-container {
    padding: 12px 16px;
  }

  .hero-content {
    padding: 0 16px;
  }

  .hero-title {
    font-size: 34px;
    line-height: 1.2;
    gap: 4px;
  }

  .hero-title-keywords-wrapper {
    height: 42px;
    overflow: hidden;
    width: 100%;
    min-width: 0;
  }

  .hero-title-keywords {
    align-items: center;
    transform: translateY(0);
    width: 100%;
    min-width: 0;
  }

  .keyword-item {
    font-size: 34px;
    line-height: 1.2;
    height: 42px;
    text-align: center;
    width: 100%;
  }

  .intro-section {
    padding: 12px 0;
  }

  .intro-text {
    font-size: 19px;
    line-height: 1.5;
  }

  .works-row {
    gap: 16px;
    margin-bottom: 24px;
  }

  .project-card__info {
    padding: 8px 0 0 0;
    gap: 2px;
  }

  .project-card__name {
    font-size: 18px;
  }

  .project-card__desc {
    font-size: 18px;
  }

  .work-item-card > .project-card {
    border-radius: 6px;
  }

  .project-card {
    border-radius: 6px;
  }
}

/* 超小屏适配 (320px-375px) */
@media (max-width: 375px) {
  .hero-title {
    font-size: 30px;
    gap: 2px;
  }

  .hero-title-keywords-wrapper {
    height: 36px;
    min-width: 0;
    width: 100%;
  }

  .hero-title-keywords {
    transform: translateY(0);
    width: 100%;
    min-width: 0;
    align-items: center;
  }

  .keyword-item {
    font-size: 30px;
    height: 36px;
    text-align: center;
    width: 100%;
  }

  .intro-text {
    font-size: 17px;
  }
}
