/* ============================================================
   v6-hero.css — 시네마틱 히어로
   ------------------------------------------------------------
   원본 문제 : 영상이 화면 전체를 100vh 로 꽉 채운 뒤 다음 섹션에서
              뚝 끊긴다. "고급스럽기도 하고 아니기도 한" 이유가 이것.

   v6 해법  : 히어로에 스크롤 여백(.v6-stage = 240vh)을 주고
              그 안에서 #main 을 sticky 로 붙인다. 스크롤할수록
                 · 영상이 라운드 프레임으로 접히고 (scale 1 → .84)
                 · 밝기가 떨어지며 (brightness 1 → .35)
                 · 배경 어둠이 위로 차오른다
              → 영상이 "끝나는" 게 아니라 다음 섹션의 어둠으로 잠긴다.
============================================================ */

.v6-stage {
    position: relative;
    height: 240vh;
    z-index: 1;
}

.v6-hero {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
    display: block;
}

/* 스크롤 진행도 --hp (0 → 1) 는 hero6.js 가 넣는다 */
.v6-hero-frame {
    position: absolute;
    inset: 0;
    overflow: hidden;
    transform-origin: 50% 42%;
    transform: scale(calc(1 - var(--hp, 0) * .16));
    border-radius: calc(var(--hp, 0) * 34px);
    will-change: transform;
}

.v6-hero-media {
    position: absolute;
    inset: 0;
    /* 영상이 교체되는 순간 뒤가 비면 흰 바탕이 번쩍인다 */
    background: #04070E;
    filter: brightness(calc(1 - var(--hp, 0) * .65)) saturate(calc(1 - var(--hp, 0) * .35));
}

.v6-hero-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    /* 영상이 시작되거나 다음 영상으로 넘어갈 때 1.5초에 걸쳐 오간다.
       바뀌는 순간 화면이 툭 끊기던 것을 부드럽게 잇는다.
       heroVideo.js 가 .is-fading 을 붙였다 뗀다. */
    opacity: 1;
    transition: opacity 1.5s ease;
}

.v6-hero-media video.is-fading {
    opacity: 0;
}

/* 움직임을 줄이도록 설정한 이용자에게는 즉시 전환한다 */
@media (prefers-reduced-motion: reduce) {
    .v6-hero-media video {
        transition: none;
    }
}

/* 가독성 스크림 — 상단(레일/자막) · 하단(운영 dock) 두 방향으로만 깐다.
   원본처럼 파란 판을 화면 전체에 씌우지 않아 영상 본연의 색이 산다. */
.v6-hero-scrim {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(4, 7, 14, .78) 0%, rgba(4, 7, 14, .28) 22%, transparent 42%),
        linear-gradient(0deg, rgba(4, 7, 14, .88) 0%, rgba(4, 7, 14, .35) 26%, transparent 52%),
        radial-gradient(120% 90% at 50% 55%, transparent 45%, rgba(4, 7, 14, .45) 100%);
}

/* ---------- 카피 ---------- */
.v6-hero-copy {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, calc(-50% - var(--hp, 0) * 60px));
    width: min(920px, 88vw);
    text-align: center;
    opacity: calc(1 - var(--hp, 0) * 1.45);
    z-index: 3;
}

.v6-eyebrow {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .38em;
    color: var(--gold);
    margin-bottom: 22px;
    opacity: 0;
}

.v6-hero-copy p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, .7);
}

.v6-hero-copy .line-1 {
    font-size: clamp(.95rem, 1.5vw, 1.22rem);
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--tx-2);
    opacity: 0;
}

.v6-hero-copy .line-2 {
    font-family: 'Nanum Myeongjo', serif;
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1.1;
    color: #fff;
    opacity: 0;
}

.v6-hero-cta {
    margin-top: 38px;
    display: flex;
    justify-content: center;
    gap: 12px;
    opacity: 0;
}

.v6-btn-primary,
.v6-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform .25s var(--ease), background .25s, box-shadow .25s;
}

.v6-btn-primary {
    background: linear-gradient(135deg, var(--gold), #E6C200);
    color: #12140A;
    box-shadow: 0 10px 30px rgba(245, 237, 0, .25);
}

.v6-btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 16px 40px rgba(245, 237, 0, .35);
}

.v6-btn-ghost {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .38);
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.v6-btn-ghost:hover {
    transform: translateY(-2px) !important;
    background: rgba(255, 255, 255, .14);
}

/* 인트로 종료 후 순차 등장 */
.v6-hero.is-ready .v6-eyebrow {
    animation: v6rise .9s var(--ease) .05s forwards;
}

.v6-hero.is-ready .line-1 {
    animation: v6rise 1s var(--ease) .25s forwards;
}

.v6-hero.is-ready .line-2 {
    animation: v6rise 1.1s var(--ease) .45s forwards;
}

.v6-hero.is-ready .v6-hero-cta {
    animation: v6rise 1s var(--ease) .85s forwards;
}

/* 조작부는 CTA 바로 뒤에 따라 올라온다 */
.v6-vidctl {
    opacity: 0;
}

.v6-hero.is-ready .v6-vidctl {
    animation: v6rise .9s var(--ease) 1.05s forwards;
}

@keyframes v6rise {
    from {
        opacity: 0;
        transform: translateY(26px);
    }

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

/* ---------- 날씨 위젯 (히어로 우상단) ---------- */
#main-weather-info {
    position: absolute;
    right: clamp(16px, 3vw, 44px);
    top: calc(var(--rail-h) + var(--ann-h) + 26px);
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(4, 7, 14, .42);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .38);
    opacity: calc(1 - var(--hp, 0) * 2);
    transition: opacity .3s;
}

#main-weather-info[hidden] {
    display: none;
}

.w6-icon svg {
    display: block;
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5));
}

.w6-main {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.w6-temp {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.1rem;
    letter-spacing: .02em;
    color: #fff;
}

.w6-temp span {
    font-size: 1rem;
    color: var(--tx-2);
    margin-left: 2px;
}

.w6-desc {
    font-size: .74rem;
    color: var(--gold);
    letter-spacing: .04em;
}

.w6-meta {
    padding-left: 14px;
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: .7rem;
    color: var(--tx-3);
    white-space: nowrap;
}

.w6-meta b {
    color: var(--tx-2);
    font-weight: 600;
}

/* 날씨 아이콘 애니메이션 (원본 weather.js 의 인라인 <style> 을 CSS 로 뺐다) */
@keyframes w6ray {

    0%,
    100% {
        stroke-width: 2;
        opacity: .8;
    }

    50% {
        stroke-width: 3.5;
        opacity: 1;
    }
}

@keyframes w6cloud {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(2px, 0);
    }
}

@keyframes w6drop {
    0% {
        transform: translateY(-5px);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(10px);
        opacity: 0;
    }
}

.w6-ray {
    animation: w6ray 2s ease-in-out infinite;
}

.w6-ray:nth-child(2) {
    animation-delay: .25s;
}

.w6-ray:nth-child(3) {
    animation-delay: .5s;
}

.w6-ray:nth-child(4) {
    animation-delay: .75s;
}

.w6-ray:nth-child(5) {
    animation-delay: 1s;
}

.w6-ray:nth-child(6) {
    animation-delay: 1.25s;
}

.w6-ray:nth-child(7) {
    animation-delay: 1.5s;
}

.w6-ray:nth-child(8) {
    animation-delay: 1.75s;
}

.w6-cloud {
    animation: w6cloud 3s ease-in-out infinite;
}

.w6-d1 {
    animation: w6drop 2s linear infinite;
}

.w6-d2 {
    animation: w6drop 2s linear .5s infinite;
}

.w6-d3 {
    animation: w6drop 2s linear 1s infinite;
}

/* ---------- 고도 표기 (히어로 좌하단) ---------- */
.v6-hero-alt {
    position: absolute;
    left: clamp(16px, 3vw, 44px);
    bottom: clamp(140px, 18vh, 190px);
    z-index: 3;
    display: flex;
    align-items: baseline;
    gap: 8px;
    opacity: calc(1 - var(--hp, 0) * 2);
}

.v6-hero-alt b {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: .9;
    color: #fff;
    letter-spacing: .03em;
    text-shadow: 0 4px 24px rgba(0, 0, 0, .6);
}

.v6-hero-alt span {
    font-family: 'Montserrat', sans-serif;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .24em;
    color: var(--gold);
}

/* ---------- 스크롤 큐 ---------- */
.v6-scrollcue {
    position: absolute;
    left: 50%;
    bottom: clamp(140px, 17vh, 180px);
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: calc(1 - var(--hp, 0) * 3);
}

.v6-scrollcue i {
    display: block;
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .8));
    animation: v6cue 2.2s var(--ease) infinite;
}

.v6-scrollcue span {
    font-family: 'Montserrat', sans-serif;
    font-size: .56rem;
    letter-spacing: .3em;
    color: var(--tx-3);
}

@keyframes v6cue {

    0%,
    100% {
        transform: scaleY(.35);
        transform-origin: top;
        opacity: .35;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
        opacity: 1;
    }
}

/* ============================================================
   반응형
============================================================ */
@media (max-width: 900px) {
    .v6-stage {
        height: 200vh;
    }

    #main-weather-info {
        gap: 10px;
        padding: 10px 14px;
        border-radius: 14px;
    }

    .w6-icon svg {
        width: 32px;
        height: 32px;
    }

    .w6-temp {
        font-size: 1.5rem;
    }

    .w6-meta {
        display: none;
    }

    .v6-hero-alt {
        bottom: clamp(150px, 20vh, 200px);
    }

    .v6-hero-cta {
        margin-top: 26px;
        flex-direction: column;
        align-items: center;
    }

    .v6-btn-primary,
    .v6-btn-ghost {
        width: min(300px, 78vw);
    }

    .v6-scrollcue {
        display: none;
    }
}

/* ===============================================================
   배경 영상 조작 — ◀ ❚❚ ▶
   두 CTA 아래에 아이콘만 둔다. 버튼처럼 무겁게 그리면
   "티켓 구매하기" 와 시선을 다투게 되므로 선만 남긴다.
   =============================================================== */

.v6-vidctl {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    /* 판을 깔지 않는다 — 영상 위에 아이콘만 얹어 두 CTA 를 방해하지 않는다.
       대신 어두운 영상에서도 보이도록 아이콘에 그림자를 준다. */
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .55));
}

.v6-vidctl button {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(242, 245, 250, .7);
    cursor: pointer;
    transition: color .2s, transform .2s;
}

.v6-vidctl button:hover {
    color: #fff;
    background: transparent;
    transform: scale(1.12);
}

.v6-vidctl svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 정지/재생은 상태에 따라 아이콘 하나만 보인다 */
.v6-vidctl .ico-play,
.v6-vidctl.is-paused .ico-pause {
    display: none;
}

.v6-vidctl.is-paused .ico-play {
    display: block;
}

/* 몇 번째 영상인지 — 더 있다는 걸 알려 주는 역할이라 작게 둔다 */
.v6-vidctl-count {
    padding: 0 8px 0 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .06em;
    color: rgba(242, 245, 250, .5);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
    .v6-vidctl {
        margin-top: 14px;
    }

    .v6-vidctl button {
        width: 34px;
        height: 34px;
        /* 손가락으로 누르는 곳이라 조금 키운다 */
    }
}
