/*
 * 모나리자 모션 스타일 (v1.2.0) — 등급: 절제
 * 근거: 페가수스 모션 분석(analysis/motion-analysis.md, motion-design-monaliza.md)
 * 원칙: opacity·transform 만 사용 / 스크롤을 가로채지 않음 / 움직임 줄이기 설정을 존중.
 * 끄고 싶으면 functions.php 의 'mz-motion' 두 줄(CSS·JS)만 지우면 된다.
 */

/* =====================================================
   M1. 히어로 패럴랙스 (PC·태블릿)
   배경 사진을 화면에 고정해 두고, 본문이 위로 덮이게 한다.
   background-attachment:fixed 는 iOS 에서 깨져서, 같은 효과를 clip-path 방식으로 만든다.
   ===================================================== */
@media (min-width: 768px) {
	@supports (clip-path: inset(0)) {
		.mz-hero.wp-block-cover { clip-path: inset(0); }
		.mz-hero .wp-block-cover__image-background {
			position: fixed;
			top: 0;
			left: 0;
			width: 100%;
			height: 100vh;
			object-fit: cover;
		}
	}
}
/* 모바일(≤767)은 효과를 끄고 기본 배치(스크롤과 함께 이동)를 그대로 쓴다. */

/* =====================================================
   M2. 섹션 등장 효과 (JS 가 html 에 .mz-js 를 붙였을 때만 숨김 → JS 가 꺼져도 내용은 항상 보임)
   ===================================================== */
.mz-js .mz-reveal {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .6s ease-out, transform .6s ease-out;
	transition-delay: var(--mz-d, 0ms);
}
.mz-js .mz-reveal.is-in {
	opacity: 1;
	transform: none;
}
@media (max-width: 767px) {
	/* 모바일: 움직임 없이 서서히 나타나기만 */
	.mz-js .mz-reveal { transform: none; transition-duration: .4s; transition-delay: 0ms; }
}

/* =====================================================
   M3. hover (마우스 있는 기기에서만)
   ===================================================== */
a, .wp-block-button__link, .mz-btn {
	transition: color .3s ease, background-color .3s ease, border-color .3s ease, filter .3s ease;
}
@media (hover: hover) {
	.mz-card:hover { transform: translateY(-2px); }
	.mz-section .wp-block-image { overflow: hidden; border-radius: var(--mz-radius); }
	.mz-section .wp-block-image img { transition: transform .5s ease; }
	.mz-section .wp-block-image:hover img { transform: scale(1.03); }
}
@media (hover: none) {
	.mz-card:hover { transform: none; }
}

/* =====================================================
   갤러리: 일시정지 버튼 (자동 재생이 5초 넘게 움직이므로 정지 수단을 항상 제공)
   ===================================================== */
.mz-gal-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	margin: 4px 0 0 auto;
	padding: 0 14px;
	border: 1px solid var(--mz-border);
	border-radius: var(--mz-radius);
	background: var(--mz-secondary);
	color: var(--mz-text);
	font-size: .875rem;
	cursor: pointer;
}
.mz-gal-toggle:hover { border-color: var(--mz-primary); color: #fff; }
.mz-gal-toggle:focus-visible { outline: 2px solid var(--mz-accent); outline-offset: 2px; }
.mz-gal-wrap { display: flex; flex-direction: column; }
.mz-scroller { scroll-behavior: smooth; }

/* =====================================================
   M5. 하단 상담 띠 (전화·카톡·LINE) — 입력된 연락처가 있을 때만 PHP 가 출력한다.
   ===================================================== */
.mz-dock {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 30; /* 헤더(100)·모달보다 낮게 */
	display: flex;
	gap: 8px;
	justify-content: center;
	align-items: center;
	height: 72px;
	padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
	box-sizing: content-box;
	background: rgba(11, 11, 13, .94);
	border-top: 1px solid var(--mz-border);
}
.mz-dock a {
	flex: 0 1 220px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 14px;
	border-radius: var(--mz-radius);
	font-weight: 700;
	text-decoration: none;
	text-align: center;
	color: #000;
}
.mz-dock .mz-dock--tel   { background: var(--mz-primary); color: #fff; }
.mz-dock .mz-dock--kakao { background: #F7E600; }
.mz-dock .mz-dock--line  { background: #00E028; }
.mz-dock a:hover { filter: brightness(.92); }
.mz-dock a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* 띠가 본문 맨 아래(푸터)를 가리지 않도록 여백 확보 */
body.mz-has-dock { padding-bottom: calc(72px + 16px + env(safe-area-inset-bottom)); }

@media (max-width: 767px) {
	.mz-dock { height: 64px; padding-left: 10px; padding-right: 10px; }
	.mz-dock a { flex: 1 1 0; min-width: 0; padding: 0 8px; font-size: .9375rem; }
	body.mz-has-dock { padding-bottom: calc(64px + 16px + env(safe-area-inset-bottom)); }
}
@media print { .mz-dock { display: none; } }

/* =====================================================
   움직임 줄이기 설정: 모든 모션을 끄고 최종 상태를 바로 보여준다.
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
	.mz-js .mz-reveal { opacity: 1; transform: none; transition: none; }
	.mz-card, .mz-section .wp-block-image img, a, .wp-block-button__link, .mz-btn { transition: none; }
	.mz-card:hover, .mz-section .wp-block-image:hover img { transform: none; }
	.mz-scroller { scroll-behavior: auto; }
	.mz-hero.wp-block-cover { clip-path: none; }
	.mz-hero .wp-block-cover__image-background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
}
