@charset "utf-8";

/* ==========================================
   메인 공통
=========================================== */
.main-inner {
    max-width: var(--layout-width);
    margin: 0 auto;
    padding: 0 var(--layout-side-margin);
}

.main-section {
    padding: var(--gap-140) 0;
}

/* 섹션 타이틀 */
.main-section-title {
    text-align: center;
    margin-bottom: var(--gap-100);
}

.main-section-title .section-en {
    font-size: var(--font-size-xxlarge);
    color: var(--color-point);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: var(--gap-10);
}

.main-section-title .section-kr {
    font-size: var(--font-size-xxxxxlarge);
    color: var(--color-dark);
    font-weight: 700;
    line-height: 1.2;
}

/* view more 버튼 공통 */
.main-view-more-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--gap-20);
    border: 1px solid var(--color-point);
    border-radius: 30px;
    padding: 8px 10px 8px 20px;
    background: var(--color-bright);
    color: var(--color-point);
    font-size: var(--font-size-normal);
    font-weight: 500;
    transition: background 0.25s, color 0.25s;
    cursor: pointer;
}

.main-view-more-btn:hover {
    background: var(--color-point);
    color: var(--color-bright);
}

.main-view-more-btn:hover .btn-arrow circle {
    fill: var(--color-bright);
}

.main-view-more-btn:hover .btn-arrow path {
    stroke: var(--color-point);
}

.main-view-more-btn .btn-arrow {
    display: flex;
    align-items: center;
    line-height: 0;
    transition: inherit;
}

.main-view-more-btn .btn-arrow circle,
.main-view-more-btn .btn-arrow path {
    transition: fill 0.25s, stroke 0.25s;
}

/* ==========================================
   히어로 섹션
=========================================== */

/* 섹션 자체 높이 = 스크롤 거리 (뷰포트 × 7배) */
.main-hero-section {
    height: 300vh;
    position: relative;
}

/* 뷰포트에 고정되는 캔버스 : 배경색을 여기에 설정 → 항상 H 바깥을 크림색으로 채움 */
.hero-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    background: #f7f0db;
}

/* ── 검정 30% 오버레이 : scene4 직전 등장 ── */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    opacity: 0;
    will-change: opacity;
}

/* ── 영상 : hero-sticky 직속, 고정 배경 (scale 영향 없음) ── */
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* ── 장면 wrapper : hero-cover + 런닝피플을 한 덩어리로 scale up ── */
.hero-scene-wrap {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.hero-cover {
    --hero-mask-size: 35vw;
}

/* ── 크림색 덮개 + H 구멍 (XOR 마스크)
   원리: 흰색 그라디언트 전체 - H 흰색 영역 = H 빼고 나머지만 크림색 표시
   → H 모양만 투명해져서 아래 영상이 H 모양으로 비쳐 보임 ── */
.hero-cover {
    position: absolute;
    inset: 0;
    background: #f7f0db;

    /* 레이어1: H 모양(흰색) / 레이어2: 전체 흰색 */
    -webkit-mask-image:
        url("/project/templates/image/main/main_visual/h_mask.svg"),
        linear-gradient(white, white);
    mask-image:
        url("/project/templates/image/main/main_visual/h_mask.svg"),
        linear-gradient(white, white);

    /* H는 35vw 크기로 중앙, 전체 레이어는 전체 커버 */
    -webkit-mask-size: var(--hero-mask-size) auto, cover;
    mask-size:          var(--hero-mask-size) auto, cover;
    -webkit-mask-repeat: no-repeat, no-repeat;
    mask-repeat:         no-repeat, no-repeat;
    -webkit-mask-position: center, center;
    mask-position:         center, center;

    /* XOR: H영역(두 레이어 겹침)은 투명, 나머지(전체 레이어만)는 표시 */
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* ── 런닝피플 + 텍스트 SVG : hero-scene-wrap 안에서 함께 줌인됨 ── */
.hero-running-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
}

/* 런닝피플 SVG : 725×595 비율, 화면 높이 기준으로 자연스러운 크기 */
.hero-running-svg {
    height: auto;
    width: 40vw;
    display: block;
    flex-shrink: 0;
}

/* ── scene4 : 타이틀 + 정보 블록 ── */
.hero-info-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: max(var(--layout-side-margin), calc((100vw - var(--layout-width)) / 2 + var(--layout-side-margin)));
    padding-bottom: 4vh;
    z-index: 4;
}

.hero-title-svg {
    width: auto;
    max-width: 351px;
    height: auto;
    display: block;
    margin-bottom: var(--gap-30);
    will-change: opacity, transform;
}

.hero-date {
    font-size: var(--font-size-medium);
    color: #fff;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: var(--gap-10);
    will-change: opacity, transform;
}

.hero-location {
    font-size: var(--font-size-normal);
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    margin-bottom: var(--gap-40);
    will-change: opacity, transform;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 30px;
    padding: 10px 22px;
    color: #fff;
    font-size: var(--font-size-normal);
    background: transparent;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
    width: fit-content;
    will-change: opacity, transform;
}

.hero-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
}

/* ==========================================
   히어로 섹션 반응형
=========================================== */

@media only screen and (max-width: 767px) {
    .main-hero-section {
        height: 560px;
    }

    .hero-sticky {
        position: relative;
        top: auto;
        height: 560px;
        overflow: hidden;
    }

    .hero-scene-wrap {
        display: none;
    }

    .hero-overlay {
        opacity: 1;
    }

    .hero-info-wrap {
        padding-left: var(--layout-side-margin);
        padding-right: var(--layout-side-margin);
        justify-content: flex-end;
        padding-bottom: 36px;
    }

    .hero-title-svg,
    .hero-date,
    .hero-location,
    .hero-btn {
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-title-svg {
        max-width: 260px;
        margin-bottom: var(--gap-20);
    }

    .hero-date {
        font-size: var(--font-size-normal);
    }

    .hero-location {
        margin-bottom: var(--gap-30);
    }
}

@media only screen and (max-width: 640px) {
    .main-hero-section {
        height: 420px;
    }

    .hero-sticky {
        height: 420px;
    }

    .hero-title-svg {
        max-width: 200px;
        margin-bottom: var(--gap-20);
    }

    .hero-location {
        margin-bottom: var(--gap-30);
    }
}


/* ==========================================
   행사개요 섹션
=========================================== */
.main-overview-section {
    position: relative;
    background: var(--color-bright);
    overflow: hidden;
}

/* 번팅 장식 */
.overview-bunting {
    position: absolute;
    top: 0;
    pointer-events: none;
    z-index: 0;
    width: 570px;
    height: auto;
}

.overview-bunting img {
    width: 100%;
    height: auto;
    display: block;
}

.overview-bunting-right {
    right: -10%;
    transform: rotate(20deg);
    transform-origin: top left;
}

.overview-bunting-left {
    left: -10%;
    transform: rotate(-20deg);
    transform-origin: top right;
}

.main-overview-section .main-inner {
    position: relative;
    z-index: 1;
}

/* 개요 콘텐츠 */
.main-overview-content {
    display: flex;
    align-items: flex-start;
    gap: var(--gap-60);
    justify-content: center;
}

.main-overview-poster {
    flex: 0 0 auto;
    max-width: 410px;
	width:100%;
}

.main-overview-poster img {
    width: 100%;
    height: auto;
    display: block;
}

/* 개요 카드 */
.main-overview-card {
    flex: 0 0 auto;
    width: 554px;
    background: var(--color-bright);
    padding: 0px;
    display: flex;
    flex-direction: column;
    gap: var(--gap-30);
}

.overview-item {
    display: flex;
    flex-direction: column;
    gap: var(--gap-20);
}

.overview-item .item-label {
    font-size: var(--font-size-large);
    color: var(--color-dark);
    font-weight: 400;
    line-height: 1.4;
}

.overview-item .item-body {
    display: flex;
    flex-direction: column;
    gap: var(--gap-10);
}

.overview-item .item-value {
    font-size: var(--font-size-large);
    color: var(--color-font);
    line-height: 1.5;
}

.overview-item .item-divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 0;
    display: block;
    width: 100%;
}

.overview-item .item-list {
    display: flex;
    flex-direction: column;
    gap: var(--gap-10);
    padding-left: 18px;
}

.overview-item .item-list li {
    font-size: var(--font-size-large);
    color: var(--color-font);
    list-style: disc;
    line-height: 1.5;
}

/* ==========================================
   5H 테마 웰니스 섹션
=========================================== */
.main-5h-section {
    position: relative;
    background-color: var(--color-background-bg);
    padding: 0; /* sticky 컨테이너가 레이아웃 담당 */
}

.main-5h-bg-wrap {
    position: absolute;
    inset: 0;
    background-image: url('/project/templates/image/main/5h_section_particle.png');
    background-position: center;
    pointer-events: none;
    z-index: 0;
}

/* 스크롤 여백 공간 (JS에서 height 설정) */
.main-5h-sticky-outer {
    position: relative;
    z-index: 1;
}

/* 뷰포트에 고정되는 컨테이너 */
.main-5h-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.main-5h-stage-wrap {
    width: 100%;
    max-width: var(--layout-width);
    padding: 0 var(--layout-side-margin);
    margin: 0 auto;
}

.main-5h-stage-wrap .main-section-title {
    margin-bottom: var(--gap-60);
}

/* 3열 그리드: 왼쪽정보 | 이미지 | 오른쪽정보 */
.main-5h-stage {
    display: grid;
    grid-template-columns: 1fr 500px 1fr;
    gap: 0 var(--gap-60);
    align-items: center;
}

.main-5h-col {
    position: relative;
    height: 420px;
    z-index: 2;
}

.main-5h-image {
    z-index: 1;
}

/* 중앙 이미지: 여러 이미지 스택 */
.main-5h-image {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
}

.fiveh-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    visibility: hidden;
    display: block;
}

/* 각 info 패널: 절대 위치로 겹쳐쌓기 */
.main-5h-info {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
}

.theme-mobile-img {
    display: none;
}

.theme-label {
    font-size: var(--font-size-large);
    color: var(--color-point);
    font-weight: 400;
    margin-bottom: var(--gap-10);
    line-height: 1.4;
}

.theme-name {
    display: flex;
    align-items: flex-end;
    line-height: 1;
    margin-bottom: var(--gap-20);
}

.theme-h {
    font-size: var(--font-size-xhuge);
    font-weight: 700;
    color: var(--color-dark);
    line-height: 1;
}

.theme-rest {
    font-size: var(--font-size-xxlarge);
    color: var(--color-dark);
    font-weight: 400;
    line-height: 1;
    padding-bottom: 0.08em;
}

.theme-desc {
    font-size: var(--font-size-large);
    color: var(--color-font);
    line-height: 1.6;
    margin-bottom: var(--gap-40);
}

/* ==========================================
   현장 스케치 섹션
=========================================== */
.main-sketch-section {
    background: var(--color-bright);
    padding-top: var(--gap-140);
    padding-bottom: var(--gap-100);
}

.main-sketch-desc {
    text-align: center;
    font-size: var(--font-size-large);
    color: var(--color-font);
    line-height: 1.6;
    margin-bottom: var(--gap-60);
}

/* 갤러리 */
.main-sketch-gallery-outer {
	width:calc(100% - var(--layout-flax-margin));
	max-width:var(--layout-width);
    margin:0 auto var(--gap-60) auto;
}

.main-sketch-gallery {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    user-select: none;
}

.main-sketch-gallery::-webkit-scrollbar {
    display: none;
}

.main-sketch-gallery.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.sketch-item {
    flex: 0 0 auto;
    width: 659px;
    height: 496px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.sketch-item:first-child {
    border: none;
}

.sketch-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* 커스텀 스크롤바 */
.sketch-scroll-track {
    position: relative;
    height: 5px;
    background: var(--color-border);
    margin-top: var(--gap-20);
    margin-right: var(--layout-side-margin);
    overflow: hidden;
}

.sketch-scroll-thumb {
    position: absolute;
    left: 0;
    top: 0;
    height: 5px;
    width: 200px;
    background: var(--color-point);
    transition: left 0.05s linear;
}

/* view more 래퍼 */
.main-viewmore-wrap {
    display: flex;
    justify-content: center;
    margin-top: var(--gap-60);
}

#sketchGallery {
    cursor: grab;
}

#sketchGallery.is-dragging {
    cursor: grabbing;
    user-select: none;
}

#sketchGallery.is-dragging * {
    user-select: none;
}

/* ==========================================
   반응형
=========================================== */
@media only screen and (max-width: 1400px) {
    .main-overview-content {
        gap: var(--gap-40);
    }



    .main-overview-card {
        width: 480px;
    }

    .main-5h-stage {
        grid-template-columns: 1fr 440px 1fr;
    }

    .main-5h-image {
        height: 440px;
    }

    .main-5h-col {
        height: 380px;
    }
}

@media only screen and (max-width: 1100px) {
    .overview-bunting {
        width: 380px;
    }



    .main-overview-card {
        width: auto;
        flex: 1;
    }

    .main-5h-stage {
        grid-template-columns: 1fr 380px 1fr;
    }

    .main-5h-image {
        height: 380px;
    }

    .main-5h-col {
        height: 340px;
    }

    .sketch-item {
        width: 480px;
        height: 360px;
    }
}

@media only screen and (max-width: 767px) {
    .overview-bunting {
        width: 220px;
    }

    .main-overview-content {
        flex-direction: column;
        align-items: center;
        gap: var(--gap-40);
    }

    .main-overview-card {
        width: 100%;
        padding: var(--gap-30);
    }

    .main-5h-sticky-outer {
        height: auto !important;
    }

    .main-5h-sticky {
        position: relative;
        top: auto;
        height: auto;
        display: block;
        overflow: visible;
        padding: var(--gap-140) 0;
    }

    .main-5h-stage {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .main-5h-image {
        display: none;
    }

    .main-5h-col {
        position: static;
        height: auto;
    }

    .main-5h-col-left,
    .main-5h-col-right {
        display: contents;
    }

    .main-5h-info {
        position: relative;
        inset: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        margin-bottom: var(--gap-100);
        pointer-events: auto;
    }

    .main-5h-info[data-step="0"] {
        order: 1;
    }

    .main-5h-info[data-step="1"] {
        order: 2;
    }

    .main-5h-info[data-step="2"] {
        order: 3;
    }

    .main-5h-info[data-step="3"] {
        order: 4;
    }

    .main-5h-info[data-step="4"] {
        order: 5;
    }

    .main-5h-info:last-child {
        margin-bottom: 0;
    }

    .theme-mobile-img {
        display: block;
        width: 100%;
        border-radius: 12px;
        margin-bottom: var(--gap-20);
    }

    .sketch-item {
        width: 340px;
        height: 256px;
    }
}

@media only screen and (max-width: 640px) {
    .main-hero-section {
        height: 420px;
    }

    .hero-sticky {
        height: 420px;
    }

    .main-section-title .section-en {
        font-size: var(--font-size-xlarge);
    }

    .main-overview-card {
        padding: var(--gap-20);
        gap: var(--gap-20);
    }

    .sketch-item {
        width: 280px;
        height: 210px;
    }

    .theme-desc {
        margin-bottom: var(--gap-30);
    }

    .overview-bunting-right {
        right: -20%;
        transform: rotate(20deg);
        transform-origin: top left;
    }

    .overview-bunting-left {
        left: -20%;
        transform: rotate(-20deg);
        transform-origin: top right;
    }
}
