/* ================================================================
   layout/kr/main_visual/main_visual.css — 메인 롤링 비주얼
   - 모든 클래스는 mv- 접두어 (기존 사이트 스타일과 충돌 방지)
   - 색상은 global.css 변수 사용: --point-color-1(주) / -2(서브) / -3(딥)
   - 슬라이드 색조(data-tone)에 따라 화살표·숫자 색이 바뀜 (dark 사진 → 흰색 / light 사진 → 딥포인트)
   - 등장 모션은 롤링이 화면에 보일 때(.is-inview) + 현재 슬라이드(.is-active)일 때만 재생
   ================================================================ */
.mv {
	--mv-dur: 4s;                          /* 롤링 시간 — main_visual.js 는 bar 가 다 차면 넘김 */
	--mv-top: 100px;                       /* 고정 헤더 높이 */
	--mv-side: 140px;                      /* 좌우 여백 */
	--mv-ui: #fff;                         /* 화살표·숫자 색 */
	--mv-ease: cubic-bezier(.22, 1, .36, 1);
	position: relative;
	width: 100%;
	height: 100vh;
	height: 100svh;                        /* 모바일 주소창을 뺀 실제 화면 높이 */
	min-height: 560px;                     /* 아주 낮은 화면에서 글씨가 겹치지 않도록 */
	overflow: hidden;
	background: #1a1410;
	font-family: var(--body-noto), sans-serif;
	user-select: none;
}
.mv[data-tone="light"] {--mv-ui: var(--point-color-3);}

/* ── 슬라이드 ─────────────────────────────────────────────── */
.mv-track {position: absolute; inset: 0;}
.mv-slide {position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.1s ease, visibility 0s 1.1s;}
.mv-slide.is-active {opacity: 1; visibility: visible; z-index: 2; transition: opacity 1.1s ease, visibility 0s;}
.mv-bg {position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat;}
.mv.is-inview .mv-slide.is-active .mv-bg {animation: mv-zoom 7s ease-out both;}

.mv-inner {position: absolute; inset: var(--mv-top) 0 0 0; display: flex; align-items: center; padding: 0 var(--mv-side) 40px;}

/* 아래 → 위 순차 등장 */
.mv-up {opacity: 0; transform: translateY(40px);}
.mv.is-inview .mv-slide.is-active .mv-up {animation: mv-up 1.1s var(--mv-ease) forwards;}
.mv-title, .mv-eyebrow {animation-delay: .25s !important;}
.mv-eng, .mv-name       {animation-delay: .45s !important;}
.mv-lead                {animation-delay: .65s !important;}
.mv-desc                {animation-delay: .85s !important;}

/* ── 01 : 自然주의 ───────────────────────────────────────── */
.mv-slide-1 .mv-bg {background-position: 65% center;}
/* 글씨가 가운데 → 가운데를 중심으로 어둡게 (가장자리로 갈수록 옅게) */
.mv-shade {position: absolute; inset: 0; background: radial-gradient(ellipse 60% 70% at 50% 55%, rgba(24, 16, 10, .62) 0%, rgba(24, 16, 10, .42) 55%, rgba(24, 16, 10, .22) 100%);}
.mv-slide-1 .mv-inner {justify-content: center;}
.mv-copy {color: #fff; text-align: center; text-shadow: 0 2px 14px rgba(0, 0, 0, .3);}
.mv-title {font-family: var(--body-diph); font-size: 96px; font-weight: 400; line-height: 1; letter-spacing: -0.01em;}
.mv-hanja {font-family: "Noto Serif KR", "Batang", serif; font-weight: 500; margin-right: .04em;}
.mv-eng {display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 22px; font-family: var(--body-inter); font-size: 20px; font-weight: 300; letter-spacing: .28em; padding-left: .28em; color: rgba(255, 255, 255, .88);}  /* 자간만큼 왼쪽 보정 → 정확히 가운데 */
.mv-eng::before, .mv-eng::after {content: ""; width: 48px; height: 1px; background: var(--point-color-2); box-shadow: 0 0 0 .5px rgba(255, 255, 255, .3);}
.mv-lead {margin-top: 46px; font-size: 26px; font-weight: 600; letter-spacing: -0.02em;}
.mv-desc {margin-top: 14px; font-size: 18px; font-weight: 300; line-height: 1.75; color: rgba(255, 255, 255, .85);}

/* ── 02 : 원장 소개 ───────────────────────────────────────── */
.mv-bg-plain {background: radial-gradient(ellipse at 50% 45%, #f1f1f1 0%, #e9e9e9 60%, #e3e3e3 100%);}
.mv-figure {
	position: absolute; top: var(--mv-top); bottom: 0; left: 50%;
	height: calc(100% - var(--mv-top)); width: auto; max-width: none;
	transform: translateX(-50%);
	/* 사진 가장자리를 배경색으로 자연스럽게 흐리게 */
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(180deg, transparent 0, #000 6%, #000 94%, transparent 100%);
	-webkit-mask-composite: source-in;
	mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(180deg, transparent 0, #000 6%, #000 94%, transparent 100%);
	mask-composite: intersect;
	pointer-events: none;
}
.mv.is-inview .mv-slide-2.is-active .mv-figure {animation: mv-figure 1.6s var(--mv-ease) both;}

.mv-split {justify-content: space-between;}
.mv-side {width: 30%;}
.mv-side-r {display: flex; justify-content: flex-end;}
.mv-eyebrow {display: flex; align-items: center; gap: 14px; font-family: var(--body-inter); font-size: 14px; font-weight: 600; letter-spacing: .42em; color: var(--point-color-1);}
.mv-eyebrow::after {content: ""; width: 40px; height: 1px; background: currentColor;}
.mv-name {margin-top: 22px; font-size: 46px; font-weight: 300; line-height: 1.35; letter-spacing: -0.03em; color: #1c2530;}
.mv-name b {font-weight: 700; color: var(--point-color-3);}

/* [자세히 보기] — 화면에 보이면 왼쪽 → 오른쪽으로 색이 채워짐 */
.mv-more {
	position: relative; isolation: isolate; overflow: hidden;
	display: inline-flex; align-items: center; gap: 22px;
	padding: 24px 34px 24px 42px;
	border: 1px solid var(--point-color-3);
	font-size: 17px; font-weight: 500; letter-spacing: .12em;
	color: var(--point-color-3);
	opacity: 0; transform: translateY(20px);
	transition: border-color .4s ease;
}
.mv-more::before {content: ""; position: absolute; inset: 0; z-index: -1; background: var(--point-color-1); transform: scaleX(0); transform-origin: left center;}
.mv-more::after {content: ""; position: absolute; inset: 0; z-index: -1; background: var(--point-color-3); transform: scaleX(0); transform-origin: left center; transition: transform .5s var(--mv-ease);}
.mv-more-arr {position: relative; width: 40px; height: 1px; background: currentColor; transition: width .4s var(--mv-ease);}
.mv-more-arr::after {content: ""; position: absolute; right: 0; top: -4px; width: 9px; height: 9px; border-top: 1px solid currentColor; transform: rotate(45deg) skewX(-10deg); transform-origin: right top;}
.mv.is-inview .mv-slide.is-active .mv-more {animation: mv-btn-in .8s var(--mv-ease) .55s forwards, mv-btn-color .9s ease 1.05s forwards;}
.mv.is-inview .mv-slide.is-active .mv-more::before {animation: mv-fill 1.1s var(--mv-ease) .95s forwards;}
.mv-more:hover::after, .mv-more:focus-visible::after {transform: scaleX(1);}
.mv-more:hover .mv-more-arr, .mv-more:focus-visible .mv-more-arr {width: 56px;}

/* ── 화살표 ───────────────────────────────────────────────── */
.mv-arrow {
	position: absolute; top: calc(50% + var(--mv-top) / 2); z-index: 5;
	width: 64px; height: 64px; margin-top: -32px;
	display: flex; align-items: center; justify-content: center;
	border: 1px solid color-mix(in srgb, var(--mv-ui) 45%, transparent); border-radius: 50%;
	color: var(--mv-ui);
	transition: color .6s ease, border-color .6s ease, background-color .3s ease;
}
.mv-arrow svg {width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;}
.mv-arrow:hover {background-color: color-mix(in srgb, var(--mv-ui) 15%, transparent);}
.mv-prev {left: 40px;}
.mv-next {right: 40px;}

/* ── 숫자 + 진행 bar ──────────────────────────────────────── */
.mv-pager {position: absolute; left: 50%; bottom: 46px; z-index: 5; display: flex; gap: 30px; transform: translateX(-50%); color: var(--mv-ui); transition: color .6s ease;}
.mv-page {display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 4px 0; color: inherit; opacity: .55; transition: opacity .4s ease;}
.mv-page.is-active, .mv-page:hover {opacity: 1;}
.mv-num {font-family: var(--body-inter); font-size: 15px; font-weight: 500; letter-spacing: .12em; line-height: 1;}
.mv-bar {position: relative; display: block; width: 90px; height: 2px; background: color-mix(in srgb, currentColor 28%, transparent); overflow: hidden;}
.mv-bar i {position: absolute; inset: 0; background: currentColor; transform: scaleX(0); transform-origin: left center;}
.mv.is-inview .mv-page.is-active .mv-bar i {animation: mv-progress var(--mv-dur) linear forwards;}

/* ── keyframes ────────────────────────────────────────────── */
@keyframes mv-up       {to {opacity: 1; transform: translateY(0);}}
@keyframes mv-zoom     {from {transform: scale(1.1);} to {transform: scale(1);}}
@keyframes mv-figure   {from {opacity: 0; transform: translateX(-50%) scale(1.05);} to {opacity: 1; transform: translateX(-50%) scale(1);}}
@keyframes mv-btn-in   {to {opacity: 1; transform: translateY(0);}}
@keyframes mv-btn-color {to {color: #fff; border-color: var(--point-color-1);}}
@keyframes mv-fill     {to {transform: scaleX(1);}}
@keyframes mv-progress {to {transform: scaleX(1);}}

/* ── 반응형 ───────────────────────────────────────────────── */
@media (max-width: 1280px) {
	.mv {--mv-side: 120px;}
	.mv-title {font-size: 80px;}
	.mv-name {font-size: 38px;}
}
@media (max-width: 1024px) {
	.mv {--mv-top: 80px; --mv-side: 90px;}
	.mv-title {font-size: 64px;}
	.mv-eng {font-size: 16px;}
	.mv-lead {margin-top: 34px; font-size: 21px;}
	.mv-desc {font-size: 16px;}
	.mv-arrow {width: 48px; height: 48px; margin-top: -24px;}
	.mv-arrow svg {width: 18px; height: 18px;}
	.mv-prev {left: 20px;}
	.mv-next {right: 20px;}

	/* 02: 문구는 위, 버튼은 아래 */
	.mv-figure {top: calc(var(--mv-top) + 70px); height: calc(100% - var(--mv-top) - 70px);}
	.mv-split {flex-direction: column; justify-content: space-between; align-items: center; padding: 24px 24px 110px; text-align: center;}
	.mv-side {width: auto;}
	.mv-eyebrow {justify-content: center; font-size: 12px; letter-spacing: .3em;}
	.mv-eyebrow::before {content: ""; width: 40px; height: 1px; background: currentColor;}
	.mv-name {margin-top: 10px; font-size: 26px;}
	.mv-name br {display: none;}
	.mv-more {padding: 16px 24px 16px 30px; font-size: 15px; gap: 16px;}
	.mv-more-arr {width: 28px;}
	.mv-pager {bottom: 30px;}
}
@media (max-width: 640px) {
	.mv {--mv-side: 24px; min-height: 520px;}
	.mv-slide-1 .mv-bg {background-position: 72% center;}
	.mv-shade {background: rgba(24, 16, 10, .45);}
	.mv-title {font-size: 50px;}
	.mv-eng {margin-top: 14px; font-size: 13px; letter-spacing: .2em; padding-left: .2em; gap: 10px;}
	.mv-eng::before, .mv-eng::after {width: 28px;}
	.mv-lead {margin-top: 22px; font-size: 17px;}
	.mv-desc {margin-top: 8px; font-size: 14px;}
	.mv-name {font-size: 22px;}
	.mv-arrow {display: none;}   /* 작은 화면은 스와이프로 넘김 */
	.mv-bar {width: 60px;}
}

/* 움직임 줄이기 설정 시 모션 없이 바로 표시 */
@media (prefers-reduced-motion: reduce) {
	.mv-slide, .mv-slide.is-active {transition: none;}
	.mv .mv-up, .mv .mv-more {opacity: 1; transform: none; animation: none !important;}
	.mv .mv-bg, .mv .mv-figure {animation: none !important;}
	.mv .mv-more {color: #fff; border-color: var(--point-color-1);}
	.mv .mv-more::before {transform: scaleX(1); animation: none !important;}
}
