@font-face {
    font-family: 'Cafe24PROSlimMax';
  src: url('./Webfont/Cafe24PROSlimMax.woff') format('woff'), /* 권장 */
       url('./Webfont/Cafe24PROSlimMax.woff2') format('woff2');    /* 폴백 */
}

a { text-decoration: none;  color: inherit;}    /*링크 밑줄 없애고 하이퍼링크 색 없애기*/


/* 기본 스타일 초기화 */
body, html {
    margin: 0; padding: 0;
    overflow-x: hidden;
    background-color: #fff;
}

/* 3D 캔버스 고정 */
#webgl {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100svh;
    z-index: 1; /* 3D는 배경 */
}

.sphere-controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between; /* 버튼을 양쪽 끝으로 밀어냄 */
    padding: 0 40px; /* 화면 끝에서의 여백 */
    transform: translateY(-50%);
    z-index: 1000; /* 다른 요소보다 위에 배치 */
    pointer-events: none; /* 컨테이너 자체는 클릭 무시 */

    box-sizing: border-box;
}

.ctrl-btn {
    pointer-events: auto; /* 버튼은 클릭 가능하게 설정 */
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ctrl-btn:hover {
    background: black;
    color: #EA5B6F;
    transform: scale(1.1);
}

/* 기존 Scroll 관련 요소 제거 */
#scrollDown { display: none; }



/* UI 고정 컨테이너 */
#ui-container {
    font-family: 'Cafe24PROSlimMax';
    position: fixed;
    top: 0;
    z-index: 10; /* 텍스트는 3D 위에 */
    pointer-events: none; /* 텍스트가 마우스 이벤트를 막지 않음 */

    width: 100%;
}

/* 추가: 핀 고정을 위한 컨테이너 설정 */
#animation-container {
    position: relative;
    width: 100%;
    height: 100svh;
    overflow: hidden;
}

/* 섹션 공통 스타일 */
section {
    position: relative;
    width: 100%;
    height: 100svh;
    display: flex;

    box-sizing: border-box;
}

/* 텍스트 그룹 및 초기 상태 관리 */
.ui-group {

    transition: opacity 0.3s ease;
    opacity: 1;

    pointer-events: none; /* 그룹 자체는 마우스 이벤트를 통과시킴 */
}
.ui-group.initial-state {
    opacity: 0; /* JS가 등장 애니메이션을 실행하기 전까지 숨김 */
}
.ui-group.scrolling {
    opacity: 0; /* 스크롤 중에는 숨김 */
}

/* 헤로 텍스트 배치 (포트폴리오 2026, 성원) */
#hero-texts {
    flex-direction: column;
    justify-content: space-between;
    padding: 2vw; /* vw 단위로 화면 크기에 대응 */
}

#main-title {
    font-size: 5em; margin: 0; line-height: 1; color: #333;
    font-family: 900;
}

#year-text { font-size: 0.8em; color: #555; }

#seongwon-text {
    font-size: 4em; margin: 0;
    align-self: flex-end; /* 오른쪽 정렬 */
    color: #333;
}

#dynamic-texts {
    position: absolute;
    top: 50dvh;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;

    text-align: center;

    word-break: keep-all;
    width: 60%;
}

#circle-bg {
    position: absolute;
    width: 100px; /* 반지름 50px */
    height: 100px;
    border-radius: 50%;
    z-index: -1; /* 텍스트 뒤로 */
    transform: scale(0); /* 처음엔 안보임 */
}

#sub-text {
    font-family: 'Cafe24PROSlimMax';
    font-size: 5em;
    color: #fff; /* 구 위에 올 때를 대비해 흰색 */

    text-align: center;
}

#sub-text-link {
    display: inline-block;
    text-decoration: none;
    color: inherit;
    pointer-events: auto; /* 링크 텍스트 부분만 다시 클릭 가능하게 설정 */
    cursor: pointer;
    transition: transform 0.3s ease;
}

#sub-text-link:hover {
    transform: scale(1.1); /* 호버 시 시각적 피드백 */
}


#sub-text-link:hover #sub-text {
    color: transparent;
}

#sub-text-link:hover #sub-text::after {
    /* HTML에 적어둔 data-hover 값을 가져와서 출력합니다 */
    content: attr(data-hover); 
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    white-space: nowrap;
}

#rocket-pagination {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 60vw;
    max-width: 800px;
    height: 150px;
    z-index: 2000;

    pointer-events: none;
}

#rocket-path-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

#rocket-illust {
    position: absolute;
    width: 50px; /* 로켓 크기 조정 */
    height: auto;
    top: -30%;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none; /* 클릭은 SVG 점들이 받도록 함 */
    transition: src 0.3s ease; /* 이미지 교체 시 부드러움 */
}

#scrollDown {
    position: absolute;
    display: flex;

    text-align: center;
    margin: auto;
    justify-content: center;

    font-family: "Roboto";
    font-weight: 600;

    left: 50%;
    top: 70%;

    transform: translate(-50%, -50%);

    color: #fff;

    z-index: 1;
}

.downIcon {
    text-align: center;
    padding: 0 0.5em;
    transform: translateY(20%);
}

.snap-point {
    cursor: pointer;
    transition: transform 0.3s ease;
    pointer-events: auto;
}

/* 슬라이더 부모 */
#sec2 {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100vh;
}

.sec2-slider-container {
    display: flex;
    width: 300vw; /* 3페이지 분량 */
    height: 100%;
    will-change: transform;
}

.slide-page {
    width: 100vw;
    height: 100vh;
    flex-shrink: 0;

    box-sizing: border-box;
}

/* 버튼 컨테이너: 화면 양 끝에 배치 */
.slide-btns-wrapper {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between; /* 좌우 끝으로 배치 */
    padding: 0 50px;
    box-sizing: border-box;
    transform: translateY(-50%);
    z-index: 9999;
    pointer-events: none; /* 컨테이너는 클릭 무시, 버튼만 클릭 */
}

.slide-btn {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto; /* 버튼만 클릭 가능 */
    display: none; /* 기본 숨김 */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.slide-btn:hover { background: #fff; color: #000; }

/* 다음 버튼을 오른쪽 끝으로 강제 고정 */
.slide-btn.next {
    margin-left: auto; /* 왼쪽 마진을 자동으로 채워 오른쪽으로 밀어냄 */
}

/* 버튼 가시성 제어 클래스 */
.slide-btn.is-active { display: flex; }
.portfolio-cube-wrapper {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    /* 초기 상태는 부모를 따라 흰색 */
    background-color: inherit; 
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 1s ease;
}

/* 굴절 효과를 위한 텍스트 레이아웃 조정 */
.portfolio-cube-text {
    position: absolute; /* 캔버스 뒤에 완전히 고정 */
    z-index: 1;
    text-align: center;
    color: #333; /* 초기 글자색 (밝은 배경용) */
    transition: color 0.5s ease 0.5s; /* 배경 바뀐 후 0.5초 뒤 변경 */
    pointer-events: none;
}

#portfolio-cube-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 2; /* 텍스트(z-index:1) 위로 올라와서 텍스트를 굴절시킴 */
    outline: none;
}
    .portfolio-cube-text h2 {
    font-size: 8rem;
    margin: -20px 0;
    line-height: 1;
    }

    .title-outline {
    -webkit-text-stroke: 1px #fff;
    color: transparent !important;
    }

    /* ui-container 내부 글자색 전환 */
#main-title, #seongwon-text {
    transition: color 0.3s ease 0.3s;
}

/* 개별 배경색과 트랜지션을 모두 제거하고 body에만 집중합니다 */
canvas, 
.portfolio-cube-wrapper {
    background-color: transparent !important; 
}

.is-dark #main-title, 
.is-dark #seongwon-text,
.is-dark .portfolio-cube-text {
    color: #fff;
}


/* 2페이지 전체 영역을 중앙 정렬 기지로 설정 */
.slide-page.page2 {
    display: flex;
    justify-content: center; /* 가로 중앙 */
    align-items: center;     /* 세로 중앙 */
    width: 100vw;
    height: 100vh;

    background-color: #000;
}

#shanelImg {
    width: 100%;
    height: auto;
}

/* 영상 컨테이너 크기 및 위치 설정 */
.video-container {
    position: relative;
    width: 70vw;      /* 요청하신 가로 크기 */
    height: 70vh;      /* 요청하신 세로 크기 */
    background: #000;   /* 영상 로딩 전 검은 배경 */
    box-shadow: 0 20px 50px rgba(255,255,255,0.1); /* 선택사항: 입체감 */
}

/* iframe이 컨테이너에 꽉 차도록 설정 */
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


.slide-page.page3 {
    background-color: #000;
    overflow: hidden; /* 부모는 스크롤 차단 */
    position: relative;
}

.inner-scroll-content {
    width: 100%;
    height: 100%;
    overflow-y: auto; /* 내부 세로 스크롤 활성화 */
    -webkit-overflow-scrolling: touch;
}

/* 스크롤바 디자인 (선택 사항) */
.inner-scroll-content::-webkit-scrollbar {
    width: 6px;
}
.inner-scroll-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

@media screen and (max-width: 1050px){

    #dynamic-texts {
        font-size: 0.5em
    }

}


@media screen and (max-width: 450px){

    #dynamic-texts {
        font-size: 0.4em
    }

    #ui-container {
        font-size: 0.8em
    }

    #rocket-pagination {
        width: 90%;
    }

    #rocket-illust {
        width: 40px;
    }

    #scrollDown {
        top: 60%;
    }

};