@font-face {
    font-family: Panton-Rust-Heavy-2;
    src: url("./fonts/Panton-Rust-Heavy-2.ttf");
}

@font-face {
    font-family: Slim-Joe-2;
    src: url("./fonts/Slim-Joe-2.otf");
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}
body {
    /*
        让原生的鼠标消失
    */
    cursor: none;
    /* width: 100vw;
    height: 100vh; */
    overflow-x: hidden;
}

/* 
    canvas[resize] => 属性选择器
*/

canvas {
    width: 100%;
    height: 100%;
    /* border: 20px solid red; */
    position: fixed;
    left: 0;
    top: 0;
    pointer-events: none;
}

/* 画布圆 */
#myCanvas {
    z-index: 100;
    pointer-events: none;
}

/* 小圆点 */
.mouse-point {
    position: fixed;
    left: 0;
    top: 0;
    width: 8px;
    height: 8px;
    background-color: #000;
    border-radius: 50%;
    z-index: 101;
    pointer-events: none;
}

/* 内容容器 */
.container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 200px;
    width: 100%;
}

.part1 {
    display: flex;
    flex-direction: column;
    gap: 100px;
    font-family: Slim-Joe-2;
    font-weight: 700;
}

.part1-header {
    display: flex;
    justify-content: space-between;
}

.part1-header-left {
    font-size: 2rem;
}

.part1-header-right {
    display: flex;
    gap: 50px;
    align-items: center;
}

.part1-header-right-imgs {
    position: relative;
}

.part1-header-right-imgs .purple-badge {
    position: absolute;
    right: 0;
    top: 0;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.part1-header-right-imgs > img {
    width: 80px;
    height: 80px;
}

label > input {
    width: 0;
    height: 0;
    display: none;
}

.slider-bar {
    width: 66px;
    height: 40px;
    border: 2px solid dimgray;
    border-radius: 20px;
}

.part1-header-right-switch {
    width: 64px;
    display: flex;
    gap: 5px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.part1-header-right-switch label {
    position: relative;
}

.part1-header-right-switch-text {
    width: 72px;
    text-align: center;
    font-size: 0.6rem;
    line-height: 1.5;
}

.part1-header-right-switch-text > span {
    width: 60px;
}

.part1-header-right-switch-text span:nth-child(2) {
    display: none;
}

.slider-bar::after {
    position: absolute;
    top: 4px;
    left: 4px;
    display: block;
    content: "";
    width: 32px;
    height: 32px;
    background-color: #000;
    border-radius: 50%;
    transition: all 0.3s ease;
    background-image: url("./imgs/star.svg");
    background-repeat: no-repeat;
}

label input:checked .part1-header-right-switch-text {
    color: red;
}

.part1-header-right-imgs:hover .purple-badge {
    opacity: 1;
}

.active {
    width: 20px;
    height: 20px;
    background-color: #dcff7d;
    transition: transform 0.1s ease;
}

label input:checked + .slider-bar::after {
    transform: translate(26px);
    background-color: transparent;
}

.part1-text-text {
    font-size: 6rem;
    font-weight: 300;
    display: flex;
    flex-direction: column;
}

.part1-title {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.part1-more {
    position: relative;
    width: fit-content;
    font-size: 1rem;
    padding-right: 20px;
    overflow: hidden;
    padding-bottom: 5px;
}

.part1-more::after {
    position: absolute;
    left: 0;
    bottom: 0px;
    content: "";
    width: 100%;
    height: 2px;
    background-color: #000;
    transition: transform 0.3s ease-in-out;
}

.part1-more::before {
    position: absolute;
    right: 0;
    top: 1px;
    content: "";
    width: 12px;
    height: 12px;
    background-image: url("./imgs/arrow.svg");
}

@media (hover: hover) {
    .part1-more:hover::after {
        transform: translateX(100%);
    }
}

.part1-imgs {
    position: relative;
    width: fit-content;
}

.part1-imgs-box {
    position: relative;
    width: 600px;
    height: 400px;
    overflow: hidden;
}

.part1-imgs-box > img {
    position: absolute;
    width: 600px;
    transform: translateY(-100px);
}

.sandra_haller-2 {
    z-index: 2;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.part1-imgs-box:hover .sandra_haller-2 {
    opacity: 0.6;
}

.part1-imgs-rotate {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 0;
    right: 0;
    z-index: 10;
    width: 100px;
    height: 100px;
    transform: translate(50%, -50%);
}

.part1-imgs-rotate > img {
    position: absolute;
}

.part1-imgs-rotate .arrow {
    width: 18px;
    height: 18px;
    transform: rotate(133deg);
}

.part1-imgs-rotate .circle {
    animation: img-rotate 10s ease infinite;
}

.part1-imgs-rotate .circle:hover {
    animation-play-state: paused;
}

@keyframes img-rotate {
    form {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* 
    第二部分
*/

@font-face {
    font-family: Floane-BoldItalic-2;
    src: url("./fonts/Floane-BoldItalic-2.otf");
}

.part2 {
    width: 100%;
    font-family: Floane-BoldItalic-2;
    display: flex;
    flex-direction: column;
    gap: 100px;
}

.part2-title {
    font-size: 2rem;
    letter-spacing: 1px;
}

/* 在DOM结构中出现一次 one-work 就 +1 */

.one-work {
    display: flex;
    counter-increment: workNum;
    position: relative;
    font-family: Slim-Joe-2;
    /* border: 1px solid red; */
}

.one-work-title {
    display: inline-block;
    font-size: 5vw;
    font-weight: 200;
    transition: opacity 0.2s ease;
    height: 100%;
    z-index: 100;
    overflow: hidden; /* 超出部分隐藏 */
    text-overflow: ellipsis; /* 显示省略号 */
    white-space: nowrap; /* 强制不换行 */
    text-decoration: none;
    color: inherit;
}

.one-work-box {
    width: 100%;
    overflow: hidden;
    display: flex;
    position: relative;
}

/* 
    counter-increment css的一个特殊属性

    counter-increment: 随意起名字
*/

.one-work-title::before {
    content: "0" counter(workNum) " / ";
    font-size: 1.5rem;
    margin-right: 10px;
}

.move-text {
    /* 要么宽度是文字的宽度 */
    width: fit-content;
    /* 要么就小是父级宽度 */
    min-width: 100%;
    position: absolute;
    right: 0;
    font-size: 4rem;
    font-weight: 100;
    white-space: nowrap;
    opacity: 0.2;
    transform: translate(100%);
    animation: textMoveing 8s infinite linear;
    opacity: 0;
    animation-play-state: paused;
    pointer-events: none;
}

.circle-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    position: absolute;
    opacity: 0;
    pointer-events: none;
    z-index: 101;
}

.circle-img > img {
    width: 100%;
    height: 100%;
}

.one-work-title:hover {
    opacity: 0;
}

.one-work-title:hover + .move-text {
    opacity: 0.2;
    animation-play-state: running;
}

.works-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@keyframes textMoveing {
    form {
        transform: translate(100%);
    }

    to {
        transform: translate(-100%);
    }
}

/* part3 */
.part3 {
    display: flex;
    flex-direction: column;
    gap: 50px;
    font-family: Slim-Joe-2;
}

.part3-top {
    font-size: 2rem;
}

.part3-center {
    display: flex;
    justify-content: space-between;
    font-family: Floane-BoldItalic-2;
}

.part3-center-l {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.part3-center-r {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.part3-hover {
    position: relative;
    overflow: hidden;
}

@media (hover: hover) {
    .part3-hover:hover::before {
        transform: translate(0);
        transition: all 0.35s ease;
    }
}

.part3-hover::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 1px;
    left: 0;
    bottom: 3px;
    background-color: #000;
    transform: translate(-100%);
    transition: all 0.35s ease;
}

.part3-center-r-box {
    display: flex;
    align-items: center;
    gap: 5px;
}

.part3-center-r-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("./icons/close.svg");
    background-repeat: no-repeat;
    background-size: contain;
}

video {
    position: absolute;
    top: 0;
    width: 300px;
    transform: translateY(-105%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease-in-out;
    border-radius: 6px;
    z-index: 1000;
}

.part3-center-r:hover video {
    opacity: 1;
}

.part3Yes {
    display: flex;
    box-sizing: border-box;
    border: 2px solid transparent;
    background-image: url("./icons/play.svg");
    background-size: cover;
    background-repeat: no-repeat;
}

.part3-bottom {
    position: relative;
    font-size: 6rem;
    font-weight: 500;
    overflow: hidden;
}

.part3-bottom::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: #000;
    transition: all 1s ease;
}

.part3-bottom:hover::before {
    transform: translate(100%);
}

.part3-bottom::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 70px;
    height: 70px;
    background-image: url("./imgs/arrow.svg");
    background-repeat: no-repeat;
    background-size: cover;
    transform: translate(-35px, 5px);
    transition: all 0.5s ease-in-out;
}

/* @keyframes part3Arrow {
    0% {
        transform: translate(-10px, 5px);
    }

    40% {
    transform: translate(0, 0);
    }

    75% {
        transform: translate(-3px, 3px);
    }

    100% {
    transform: translate(0, 0);

    }
} */

.part3-bottom:hover::after {
    transform: translate(0, 0);
}

.dian {
    font-weight: 100;
}

/* loading 效果 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1) 1.5s;
}

.loading1 {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 110;
    background-color: #ffffff;
    font-family: Slim-Joe-2;
    font-size: 2rem;
    font-weight: 500;
}

.loading2 {
    background-color: #dcff7d;
    z-index: 109;
    transition-delay: 1.8s;
}

.loading-move {
    transform: translateY(-100%);
}

.init-Ref {
    opacity: 0;
}

/* background-clip: text; 是一个 让背景图片/颜色只显示在文字形状内部 的 CSS 属性。这会产生 "文字被背景填充" 的视觉效果。 */

.part1-text-text.part1-text-text {
    font-size: 6vw;
    white-space: nowrap;
}

@media screen and (max-width: 980px) {
    .container.container {
        gap: 80px;
    }

    .part2.part2 {
        gap: 70px;
    }

    .part3-bottom.part3-bottom {
        font-size: 9vw;
    }

    .part3-bottom::after {
        width: 8vw;
        height: 8vw;
    }
}

@media screen and (max-width: 680px) {
    .part1-imgs-box.part1-imgs-box {
        width: 70vw;
        height: 74vw;
    }

    .part1-imgs-box.part1-imgs-box img {
        width: 80vw;
        height: 80vw;
        object-fit: cover;
        object-position: 0 15vw;
    }
}

@media screen and (max-width: 480px) {
    .part1-header {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5vw;
    }

    .part1-header-right {
        flex-direction: column;
        gap: 2vw;
    }

    .part3-center.part3-center {
        flex-direction: column;
    }
}

@media (hover: none) {
    canvas,
    .part1-mores,
    .mouse-point {
        display: none;
    }
}
