* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', sans-serif;
    background-color: #000;
    color: #fff;
    overflow-x: hidden;
}

.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
}

/* Hero sub copy size */
.hero-content p {
    font-size: 1.5rem;
    line-height: 1.6;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 디자인 슬라이드: CSS 무한 스크롤 */
.scroll-gallery-multi {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    /* 무한 루프용: 복제한 콘텐츠의 절반만큼 이동해야 매끄럽게 이어짐 */
    --scroll-distance: 50%;
    --scroll-duration: 24s; /* 디자인/개발 통일 속도 */
}

.scroll-gallery-multi.active {
    opacity: 1;
}

.gallery-side {
    width: 25%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.gallery-side .inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    animation: scrollDown var(--scroll-duration) linear infinite;
}

.gallery-side.reverse .inner {
    animation: scrollUp var(--scroll-duration) linear infinite;
}

/* 모든 컬럼이 동일한 속도로 시작하도록 명시적 설정 */
.gallery-side:nth-child(1) .inner,
.gallery-side:nth-child(2) .inner,
.gallery-side:nth-child(3) .inner,
.gallery-side:nth-child(4) .inner {
    animation-duration: var(--scroll-duration);
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-delay: 0s;
}

.gallery-side:nth-child(1).reverse .inner,
.gallery-side:nth-child(2).reverse .inner,
.gallery-side:nth-child(3).reverse .inner,
.gallery-side:nth-child(4).reverse .inner {
    animation-name: scrollUp;
    animation-duration: var(--scroll-duration);
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-delay: 0s;
}

.gallery-side .inner img {
    width: 100%;
    height: auto;
    display: block;
}

@keyframes scrollDown {
    0% { transform: translateY(0); }
    100% { transform: translateY(calc(-1 * var(--scroll-distance))); }
}

@keyframes scrollUp {
    0% { transform: translateY(calc(-1 * var(--scroll-distance))); }
    100% { transform: translateY(0); }
}

/* 퍼블리싱 슬라이드 유지 */
.scroll-gallery {
    position: fixed;
    top: 0;
    width: 50vw;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.scroll-gallery-left { left: 0; }
.scroll-gallery-right { right: 0; }

.scroll-gallery-left.active,
.scroll-gallery-right.active {
    opacity: 1 !important;
}

.feature-container {
    position: relative;
    z-index: 5;
    display: flex;
    gap: 30px;
    justify-content: center;
}

.feature-box {
    background-color: #1d1b1b;
    border-radius: 20px;
    width: 200px;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: 0.5s ease;
    z-index: 10;
    cursor: pointer;
}

.feature-box img {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

/* 새로 추가된 inner div 기본 스타일 */
.feature-box-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: 0.5s ease;
}

/* hover 효과를 inner div에 적용 */
.feature-box:hover .feature-box-inner {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    transform: scale(1.15);
}

.feature-box:hover img { transform: scale(1.3); }

/* 퍼블리싱 갤러리 이미지 애니메이션도 디자인 갤러리와 동일하게 적용 */
.scroll-publish-gallery { 
    --scroll-duration: 50s; /* 디자인보다 조금 느리게 */
}

.scroll-publish-gallery .gallery-side .inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    animation: scrollDown var(--scroll-duration) linear infinite;
}

.scroll-publish-gallery .gallery-side.reverse .inner {
    animation: scrollUp var(--scroll-duration) linear infinite;
}

/* 퍼블리싱 갤러리도 모든 컬럼 동일 속도 보장 */
.scroll-publish-gallery .gallery-side:nth-child(1) .inner,
.scroll-publish-gallery .gallery-side:nth-child(2) .inner,
.scroll-publish-gallery .gallery-side:nth-child(3) .inner,
.scroll-publish-gallery .gallery-side:nth-child(4) .inner {
    animation-duration: var(--scroll-duration);
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-delay: 0s;
}

.scroll-publish-gallery .gallery-side:nth-child(1).reverse .inner,
.scroll-publish-gallery .gallery-side:nth-child(2).reverse .inner,
.scroll-publish-gallery .gallery-side:nth-child(3).reverse .inner,
.scroll-publish-gallery .gallery-side:nth-child(4).reverse .inner {
    animation-name: scrollUp;
    animation-duration: var(--scroll-duration);
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-delay: 0s;
}

.scroll-publish-gallery .gallery-side .inner img {
    width: 100%;
    height: auto;
    display: block;
}

nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 10;
}

nav a {
    font-size: 1.1rem;
    color: #fff;
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
}

nav a:hover {
    transform: scale(1.2);
    color: #ffcc00;
}


