@font-face {
    font-family: 'HelveticaNow';
    src:
        url('../fonts/Helvetica.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* 基础变量定义 */
:root {
  --px-to-vw: calc(100vw / 1920);
  --base-font-size: calc(1.5625rem);
  /* 字体变量 */
  --font-size-primary: clamp(16px, 1.3625rem, 2vw); /* 响应式字体 */
  --font-size-small: 1rem;
  /* 颜色 */
  --color-white: #fff;
  --color-gray: #7F7F7F;
  --color-black: #000;
  /* 字体家族 */
  --font-family-primary: 'HelveticaNow', Helvetica, Arial, sans-serif;
  --font-family-secondary: 'Helvetica', sans-serif;

}

/* 触摸设备检测 - 默认隐藏光标 */
@media (pointer: coarse) {
  html, * {
    cursor: auto !important;
    scroll-behavior: smooth;
  }
  .custom-cursor {
    display: none !important;
  }
}

html, * {
  cursor: none !important;
  scroll-behavior: smooth;
}


body {
    background-color: var(--color-black);
    margin: 0;
    padding: 0 3%;
    color: var(--color-white);
    font-family: var(--font-family-primary);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    font-size: var(--base-font-size);
}

body::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    z-index: -1;
    font-family: 'HelveticaNow';
}

body.lock-scroll {
  overflow: hidden;
}

/*鼠标动画*/
.custom-cursor {
  position: fixed;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  mix-blend-mode: difference; /* 关键属性：创建反差效果 */
  background: white;
  animation: none; /* 默认无动画 */
  transform: translate(-50%, -50%);
  transition: 
    transform 0.15s ease-out,
    width 0.2s ease,
    height 0.2s ease;
}

@keyframes breath {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.3); }
}

/* 悬停时启动动画 */
.custom-cursor.hover {
  animation: breath 1.5s infinite ease-in-out;
}

.custom-cursor.click {
  width: 35px;
  height: 35px;
}



/* ===== 导航 ===== */
.nav-container {
    width: 100%;
    height: clamp(60px, 5.2083vw, 100px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 99999;
    cursor: default;
}

.nav-logo {
  flex: 0 0 auto;
  height: 2.5vw;
  min-height: 30px;
  width: 2.5vw;
  min-width: 30px;
  position: relative;
}

.logo-container {
  display: block;
  width: 100%;
  height: 100%;
}

.nav-logo img {
  position: absolute;
  top: 0;
  left: 0;
  width: auto;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.static-logo { opacity: 1; }
.animated-logo { opacity: 0; }

.nav-logo:hover .static-logo { opacity: 0; }
.nav-logo:hover .animated-logo { opacity: 1; }

.nav-text {
    font-family: var(--font-family-primary);
    color: var(--color-white);
    text-transform: uppercase;
    margin: 0;
    text-decoration: none;
}

.nav-works {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%); /* 同时水平和垂直居中 */
}

.nav-info {
    position: absolute;
    right: 0; /* 与容器padding一致 */
    top: 50%;
    transform: translateY(-50%);
}

.nav-text:hover {
    opacity: 0.7;
    cursor: pointer;
}

/* ===== canvas 样式 ===== */
#canvas-container {
  width: 100%;
  aspect-ratio: 1831 / 966; /* 与JS中的IMAGE_ASPECT一致 */
  overflow: hidden;
  border-radius: 2rem;
  touch-action: none; /* 防止触摸默认行为 */
  backface-visibility: hidden;
  image-rendering: -webkit-optimize-contrast; /* 防止缩放锯齿 */
  transform: translateZ(0); /* 强制GPU加速 */
}

.heroImage {
  margin-top: 3rem;
  width: 100%;
  aspect-ratio: 1831 / 966; /* 锁定容器比例 */
  overflow: hidden;
  border-radius: 2rem;
  position: relative;
}

.heroImage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== 作品展示区容器 ===== */
.content-wrapper {
    position: relative;
    max-width: 94.5313vw;
    margin: 0 auto;
    display: flex;
    margin-top: 6.4583vw;
    min-height: 100vh; /* 添加最小高度确保有滚动空间 */
    overflow: visible; /* 确保不隐藏溢出内容 */
}

.gallery-container {
    display: block; /* 确保是块级元素 */
    clear: both;    /* 清除浮动 */
    max-width: 100%;
    padding-left: 14.5%;
}


/* ===== 左侧 LOGO ===== */
.gallery-grid {
    flex: 1; /* 占据剩余空间 */
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 三列布局 */
    row-gap: 2.5vw; /* 行间距 */
    column-gap: 2.0833vw; /* 列间距 */
    width: 100%;
    scroll-margin-top: 5.2083vw;

}

/* ===== 单个作品项 ===== */
.gallery-item {
    width: 100%;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    text-decoration: none !important;
    will-change: opacity, transform;
}

.gallery-item.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* 图片容器 */
.gallery-item-img {
    position: relative;
    width: 100%;
    aspect-ratio: 417/325;
    overflow: hidden;
    border-radius: 0.4167vw;
    isolation: isolate;
    background-color: var(--color-black);
}

/* 图片和视频通用样式 */
.gallery-item-img img,
.gallery-item-img video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 
        opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    transform-origin: center center;
    backface-visibility: hidden;
}

/* 默认状态 */
.gallery-item-img .static-img {
    opacity: 1;
    z-index: 1;
    transform: scale(1);
}

.gallery-item-img .hover-img {
    opacity: 0;
    z-index: 2;
    transform: scale(1.02);
}

.gallery-item-img video {
    opacity: 0;
    z-index: 3;
}

/* 悬停状态 */
.gallery-item:hover .static-img {
    opacity: 0;
}

.gallery-item:hover .hover-img {
    opacity: 1;
}

.gallery-item:hover video {
    opacity: 1;
}

/* 标题样式 */
.gallery-item-title {
    font-family: var(--font-family-secondary);
    font-size: 1.25vw;
    margin-top: 0.8333vw;
    color: #7F7F7F;
    transition: color 0.4s;
}

.gallery-item:hover .gallery-item-title {
    color: #fff;
}

/* ===== Information 区域 ===== */
.info-section {
    display: block;
    clear: both;
    max-width: 70.3125%;
    padding-left: 29.6%;
    flex: 1;
}

.info-title {
    width: 100%;
    margin-top: 5.9896vw;
    margin-bottom: 5.7292vw;
}

.info-title img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.info-description {
    font-family: var(--font-family-secondary);
    font-size: var(--font-family-primary);
    color: var(--color-gray);
    width: 46.25vw;
    padding: 0;
    margin: 0;
    /* 自动换行关键属性 */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal; /* 更自然的换行方式 */
  
    /* 可选：增加可读性 */
    line-height: 0; /* 更好的行间距 */
    text-align: left; /* 明确左对齐 */
}

.info-description p {
    margin: 0;
    line-height: 1;
}

.info-grid {
    font-family: var(--font-family-secondary);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 2.0833vw;
    row-gap: 2.5vw;
    margin-top: 4.4271vw;
    width: 100%;
    font-size: 1.2rem;
}

.info-grid__title {
    line-height: 1;
    margin-top: 5.7292vw;
    color: var(--color-white);
    padding: 0;
    margin: 0;
}

.info-grid__col {
    margin: 0;
    margin-top: 3vw;
}

.info-grid__col p a {
    color: inherit;
    text-decoration: none;
    transition: color 0.4s cubic-bezier(0.33, 1, 0.68, 1);
    position: relative;
    display: inline-block;
}

.info-grid__col p a:hover {
    color: var(--color-white);
}

.info-grid__col p:not(:has(a)) {
    cursor: default;
}

.info-description p,
.info-grid__col p {
    font-size: var(--font-size-primary);
    display: block;
    width: 100%;
    clear: both;
    margin: 0;
    padding: 0;
    line-height: 1;
    color: var(--color-gray);
    transition: color 0.4s cubic-bezier(0.33, 1, 0.68, 1);
    transform: translateZ(0);
    will-change: color;
    cursor: default;
    position: relative;
    display: inline-block;
}

.info-grid__col p:hover {
    color: var(--color-white);
}

/* 带图标的链接 */
.info-grid__col p.with-icon a,
.info-grid__col p.with-icon2 a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5208vw;
    color: inherit;
    text-decoration: none;
    padding-left: 30px;
    transition: all 0.25s cubic-bezier(0.33, 1, 0.68, 1);
}

.info-grid__col p.with-icon {
    margin-top: 0.5208vw;
}

.with-icon img,
.with-icon2 img {
    width: auto;
    height: 1em;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: opacity 0.25s ease;
}

.with-icon .static-icon,
.with-icon2 .static-icon { opacity: 1; }
.with-icon .hover-icon,
.with-icon2 .hover-icon { opacity: 0; }

.info-grid__col p.with-icon:hover a,
.info-grid__col p.with-icon2:hover a {
    color: var(--color-white);
    transform: translateX(4px);
}
.with-icon:hover .static-icon,
.with-icon2:hover .static-icon { opacity: 0; }
.with-icon:hover .hover-icon,
.with-icon2:hover .hover-icon { opacity: 1; }

/* ===== 版权信息 ===== */
.copyright-container {
    max-width: 70.3125vw;
    width: 100%;
    margin: 9.2708vw 0 7.4479vw;
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
}

.copyright-left,
.copyright-right {
    font-family: var(--font-family-secondary);
    font-size: var(--font-size-primary);
    color: var(--color-gray);
}


/* 响应式调整 */
/* ================= 手机 480px ================= */
@media (max-width: 480px) {
    :root {
        --mobile-gap: 2vw;
  }
    body{
        font-size: 1.2rem !important;
        margin: 0 3% !important;
  }

    .nav-logo img {
        height: 8vw;
        width: 10vw;
    }

    .nav-container {
        height: 18vw;
    }

    #canvas-container {
        border-radius: 0.5rem;
    }


    .gallery-grid {
        grid-template-columns: repeat(1, 1fr) !important;
    }

    .gallery-item-title{
        font-size: 1.2rem !important;
    }

    .info-grid__title{
        font-size: 1.2rem;
        margin-top: 3%;
    }
    .info-description p, .info-grid__col p {
        font-size: 1.2rem !important;
    }


    .copyright-container{
        max-width: 100%;
    }

    /* 带图标链接调整 */
    .info-grid__col p.with-icon a,
    .info-grid__col p.with-icon2 a {
        padding-left: 7vw !important;
    }
    .with-icon a {
        margin-top: 2vw;
}
}

@media 
  (min-width: 481px) and (max-width: 768px) {
    #canvas-container {
        border-radius: 1rem;
    }
    .gallery-grid {
        grid-template-columns: repeat(1,1fr) !important; 
        row-gap: 40px;
    }

  }
  

/* ================= 768 ================= */
@media (max-width: 768px) {
    body{
        padding: 0 6% !important;
    }
    .gallery-container {
        max-width: 100% !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .gallery-item-title{
        font-size: 1.56rem;
    }

    .gallery-logo {
        display: none;
    }

    .gallery-grid {
        grid-template-columns: repeat(2,1fr); /* 两列布局 */
        row-gap: 40px;
    }

    .info-section {
        max-width: 100% !important;
        padding-left: 0 !important;
        margin-top: calc(var(--mobile-gap) * 2);
  }

    .info-description {
        width: 100% !important;
  }

    .info-grid {
        grid-template-columns: 1fr;
        gap: var(--mobile-gap);
  }

  /* 版权信息调整 */
    .copyright-right {
        display: none;
  }

}

/* ================= 1024 ================= */
.gallery-logo {
    body{
        padding:0 5% !important;}
    .gallery-container{
        padding: 0% !important;
    }
    .gallery-logo {
        display: none;
    }

}


@media 
  (min-width: 1025px) and (max-width: 1280px) {
    
    
    .gallery-item-title{
        font-size: 1.56rem;
    }
 
    .nav-projects {
        max-height: 23vw;
        font-size: 1.56rem !important;  
    }
    .info-grid__title, .gallery-item-title{
        font-size: 1.56rem ;
    }
    .copyright-right{
        display: none;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr) ; /* 两列布局 */
    }
    .copyright-right{
        display: none !important;
    }
    .copyright-left,.copyright-right{
        font-size: 1.5625rem !important;
    }
    .info-description p, .info-grid__col p{
        font-size: 1.5625rem ;
    }
}

/* ================= 大屏幕调整 ================= */
@media (min-width: 1920px) {
    body {
        margin: 0 auto;
    }
    .copyright-left,.copyright-right{
        font-size: 1.5625rem !important;
    }
    .info-description p, .info-grid__col p{
        font-size: 1.5625rem ;
    }
    .nav-projects{
        max-height: 24vw;
    }
}
@media (max-width: 1920px) {
    body {
        margin: 0 auto;
    }
    .copyright-left,.copyright-right{
        font-size: 1.5625rem ;
    }
    .info-description p, .info-grid__col p{
        font-size: 1.5625rem ;
    }
    .nav-projects{
        max-height: 34.5vw;
    }
}

