@charset "utf-8";

body {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
    background-color: rgb(200, 200, 248);
    color: rgb(46, 113, 236);
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

a {
    color: rgb(0, 0, 0);
    text-decoration: none;
}

#SKILL h2 {
    margin-bottom: 25px;
    padding-top: 10px;
}

.menu-bar div {
    transition: 0.2s;
}

/* hero文字専用 */
.hero-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    text-align: center;
}

.hero-text h1 {
    font-size: 70px;
    animation: textFadeUp 1.2s ease forwards;
}

.hero-text h2 {
    font-size: 60px;
    margin-top: 10px;
    animation: textFadeUp 1.2s ease forwards;
    animation-delay: 0.5s;
}

@keyframes textFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1,
h2 {
    font-size: clamp(40px, 10vw, 100px);
    color: rgb(145, 143, 255);
    text-shadow: 5px 5px 3px rgba(16, 0, 155, 0.5);
}

h3 {
    color: rgba(132, 0, 255, 0.7);
}

.sub-text {
    font-size: 50px;
    color: rgb(145, 143, 255);
    text-shadow: 2px 2px 2px rgba(16, 0, 155, 0.5);
    margin-top: -110px;
}

.text {
    color: rgb(37, 47, 141);
}

footer {
    margin-top: 100px;
    padding-bottom: 20px;
    text-align: center;
}

.ABOUT-text,
.SKILL-text {
    margin: 2em 0;
    position: relative;
    padding: 1.5em 2.5em;
    border-top: solid 2px rgba(0, 89, 255, 0.493);
    border-bottom: solid 2px rgba(0, 89, 255, 0.493);
}

.ABOUT-text:before,
.ABOUT-text:after,
.SKILL-text:before,
.SKILL-text:after {
    content: '';
    position: absolute;
    top: -10px;
    width: 2px;
    height: calc(100% + 20px);
    background-color: rgb(132, 0, 255);
}

.ABOUT-text:before,
.SKILL-text:before {
    left: 10px;
}

.ABOUT-text:after,
.SKILL-text:after {
    right: 10px;
}

.ABOUT-text p,
.SKILL-text p {
    margin: 0;
    padding: 15px;
}

@keyframes fuwa {
    0% {
        opacity: 0;
        translate: 0 2px;
    }
    100% {
        opacity: 1;
        translate: 0 0;
    }
}

.anime {
    animation: fuwa 1s ease-in-out forwards;
}

.target {
    opacity: 0;
}

.hero {
    position: relative;
    width: 100vw;
    height: 80vh;
    overflow: hidden;
    margin-left: calc(50% - 50vw);
}

.img1,
.img2,
.img3 {
    position: absolute;
    width: 70vw;
    max-width: 900px;
    opacity: 0;
    overflow: hidden;
    width: 100%;
    height: auto;
    display: block;
    transform: translate(-50%, -50%);
}

.img1 {
    top: -200px;
    left: 50%;
    animation: slideDown 1s ease forwards;
}

.img2 {
    top: 50%;
    left: -200px;
    animation: slideRight 1s ease 0.3s forwards;
}

.img3 {
    top: 50%;
    left: 100%;
    animation: slideLeft 1s ease 0.6s forwards;
}

.img1 img,
.img2 img,
.img3 img {
    width: 100%;
    display: block;
    border-radius: 10px;
}

@keyframes slideDown {
    to {
        top: 50%;
        left: 45%;
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

@keyframes slideRight {
    to {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

@keyframes slideLeft {
    to {
        top: 50%;
        left: 55%;
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.img1 img {
    clip-path: polygon(0 -20%, 60% 100%, 0 100%);
}

.img2 img {
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.img3 img {
    clip-path: polygon(100% -20%, 100% 100%, 40% 100%);
}

/* WORK */
#work {
    margin-top: -80px;
}

.WORK {
    width: 100%;
}

/* ===== WORK 3D carousel ===== */
#work {
    margin-top: -80px;
}

.WORK {
    width: 100%;
}

.perspective-container {
    perspective: 1700px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 500px;
    overflow: visible;
}

.carousel {
    width: 250px;
    height: 380px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 90%;
    transform: rotateY(calc(var(--i) * 90deg)) translateZ(300px);
    background: rgb(237, 234, 255);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    opacity: 0.6;
    filter: blur(2px);
    transition: transform 0.8s ease, opacity 0.5s, filter 0.5s;
    backface-visibility: visible;
    cursor: pointer;
}

.card.active {
    pointer-events: auto;
    opacity: 1;
    filter: blur(0) brightness(100%);
    z-index: 100;
    transform: rotateY(calc(var(--i) * 90deg)) translateZ(300px);
    cursor: pointer;
}

.card.active:hover {
    transform: rotateY(calc(var(--i) * 90deg)) translateZ(400px) scale(1.1) !important;
}

.card.active.flipping {
    transform: rotateY(calc(var(--i) * 90deg + 360deg)) translateZ(600px) scale(1.2) !important;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000 !important;
}

.card.flipping {
    transform: rotateY(calc(var(--i) * 90deg + 1080deg)) translateZ(600px) scale(1.2) !important;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000 !important;
}

.product-img {
    width: 100%;
    height: 60%;
    object-fit: cover;
    object-position: center top;
    border-bottom: 1px solid rgb(237, 234, 255);
    border-radius: 20px;
    transition: border-radius 1s ease, filter 0.5s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    display: block;
}

.product-info {
    padding-top: 20px;
    padding-bottom: 40px;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}

.product-name {
    font-size: 2rem;
     color: rgb(145, 143, 255);
    font-weight: bold;
    padding: 0;
    display: block;
    min-height: 2.8em;
    line-height: 1.4;
}

.hovertext {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.45);
    transition: opacity 0.3s ease;
    z-index: 50;
    text-decoration: none;
}

.card.active:hover .hovertext {
    opacity: 1;
}

.hovertext span {
    color: #fff;
    font-size: 32px;
    font-weight: bold;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-bottom: 50px;
}

.controls button {
    background: rgba(255, 255, 255, 0.2);
    color: rgb(255, 255, 255);
    border: 2px solid rgb(145, 143, 255);
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    outline: none;
}

.controls button:hover {
    background: rgba(255, 255, 255, 0.6);
    color: rgb(145, 143, 255);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.bg-circle {
  position: fixed;
  bottom: -50px;
  left: 50%;
  width: 15px;
  height: 15px;
  background: rgba(145, 143, 255, 0.3);
  border-radius: 50%;
  animation: floatUp 8s linear infinite;
}

#particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    bottom: -50px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    filter: blur(1px);
    animation: moveUp linear forwards;
}

@keyframes moveUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    30% {
        opacity: 0.7;
        transform: translateY(-30vh) scale(1.2) translateX(20px);
    }
    60% {
        transform: translateY(-60vh) scale(0.8) translateX(-20px);
    }
    100% {
        transform: translateY(-110vh) scale(0.5);
        opacity: 0;
    }
}