/* Section Editor 스튜디오 블록: 3D 첫 화면, 영상 카드, 기능 카드
 * 아주 옅은 바탕 + 굵은 고딕 + 알약 버튼 + 모서리에 + 표시가 달린 큰 둥근 카드.
 */

/* ---------- 아주 옅은 바탕 톤 ---------- */
.se-tone--pale {
	--se-tone-bg: #f2f1ee;
	--se-tone-ink: #16151a;
	--se-tone-muted: #66646e;
	--se-tone-line: rgba(22, 21, 26, 0.14);
	--se-tone-card: #ffffff;
	--se-tone-accent: var(--se-accent-warm, #897251);
}

/* ---------- + 표시 ---------- */
.se-plus {
	position: absolute;
	width: max(9px, calc(14 * var(--se-u)));
	height: max(9px, calc(14 * var(--se-u)));
	color: var(--se-tone-ink);
	pointer-events: none;
}

.se-plus::before,
.se-plus::after {
	content: "";
	position: absolute;
	background: currentColor;
}

.se-plus::before { left: 50%; top: 0; width: 1.5px; height: 100%; margin-left: -0.75px; }
.se-plus::after { top: 50%; left: 0; width: 100%; height: 1.5px; margin-top: -0.75px; }

.se-plus--tl,
.se-plus--tc,
.se-plus--tr { top: calc(-1 * max(22px, calc(34 * var(--se-u)))); }

.se-plus--bl,
.se-plus--bc,
.se-plus--br { bottom: calc(-1 * max(22px, calc(34 * var(--se-u)))); }

.se-plus--tl,
.se-plus--bl { left: 0; }

.se-plus--tr,
.se-plus--br { right: 0; }

.se-plus--tc,
.se-plus--bc { left: 50%; transform: translateX(-50%); }

/* ---------- 3D 첫 화면 ---------- */
.se-hero3d {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: max(560px, calc(100vh - 94px));
	overflow: hidden;
	text-align: center;
}

.se-hero3d__canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 1.2s ease;
}

.se-hero3d.is-ready .se-hero3d__canvas { opacity: 1; }

.se-hero3d__text {
	position: relative;
	width: min(84cqw, calc(1100 * var(--se-u)));
	min-width: min(84cqw, 320px);
	padding: calc(120 * var(--se-u)) 0;
	pointer-events: none;
}

.se-hero3d__text a { pointer-events: auto; }

/* 시작 영상: 첫 화면을 덮고 한 번 재생된 뒤 걷힌다 */
.se-hero3d__intro {
	position: absolute;
	inset: 0;
	z-index: 3;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	transition: opacity 0.9s ease;
	/* 스크립트가 못 돌아도 영상이 화면을 계속 가리지 않게 한다 */
	animation: se-intro-out 0.9s ease 7s forwards;
}

.se-hero3d.is-intro-done .se-hero3d__intro { opacity: 0; }

@keyframes se-intro-out {
	to { opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
	.se-hero3d__intro { display: none; }
}

.se-hero3d__title {
	margin: 0;
	padding: 0;
	font-family: var(--se-kr);
	font-size: max(34px, calc(104 * var(--se-u)));
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.035em;
	color: inherit;
	word-break: keep-all;
}

.se-hero3d .se-lead {
	max-width: calc(820 * var(--se-u));
	margin-left: auto;
	margin-right: auto;
}

.se-hero3d__action { margin: calc(44 * var(--se-u)) 0 0; }

.se-hero3d__hint {
	position: absolute;
	left: 50%;
	bottom: max(22px, calc(40 * var(--se-u)));
	font-family: var(--se-grotesk);
	font-size: max(10px, calc(12 * var(--se-u)));
	letter-spacing: 0.3em;
	color: var(--se-tone-muted);
	transform: translateX(-50%);
}

/* ---------- 영상 카드 ---------- */
.se-reel {
	position: relative;
	width: 90cqw;
	margin: max(22px, calc(34 * var(--se-u))) auto;
}

/* 스크롤하면 커지는 연출: 화면 아래에서 올라올 때는 작다가, 가운데에 가까워질수록 제 크기가 된다.
 * --se-reel-p 는 스크립트가 0(막 보이기 시작)~1(다 커짐) 사이로 넣어 준다. 스크립트가 없으면 처음부터 제 크기다. */
.se-reel.is-grow {
	width: calc(48cqw + 42cqw * var(--se-reel-p, 1));
	will-change: width;
}

.se-reel.is-grow .se-reel__label {
	font-size: calc(max(28px, calc(112 * var(--se-u))) * (0.6 + 0.4 * var(--se-reel-p, 1)));
}

.se-reel__card {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 8;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: max(14px, calc(28 * var(--se-u)));
	background: #16151a;
	cursor: pointer;
}

.se-reel__card[disabled] { cursor: default; }

.se-reel__preview {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.se-reel__card:hover .se-reel__preview,
.se-reel__card:focus-visible .se-reel__preview {
	transform: scale(1.04);
}

.se-reel__label {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: max(12px, calc(34 * var(--se-u)));
	background: rgba(22, 21, 26, 0.18);
	font-family: var(--se-grotesk);
	font-size: max(28px, calc(112 * var(--se-u)));
	font-weight: 400;
	line-height: 1;
	letter-spacing: -0.02em;
	color: #fff;
}

.se-reel__play {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.5em;
	height: 0.92em;
	border-radius: 999px;
	background: #fff;
	transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.se-reel__play svg {
	width: 0.36em;
	height: 0.36em;
	fill: #16151a;
}

.se-reel__card:hover .se-reel__play,
.se-reel__card:focus-visible .se-reel__play {
	transform: scale(1.12);
}

.se-reel__dialog {
	width: 100vw;
	max-width: 100vw;
	height: 100vh;
	max-height: 100vh;
	margin: 0;
	padding: 0;
	border: 0;
	background: #000;
}

.se-reel__dialog::backdrop { background: #000; }

.se-reel__player {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
}

.se-reel__close {
	position: absolute;
	top: 18px;
	right: 18px;
	z-index: 1;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	font-size: 28px;
	line-height: 1;
	color: #16151a;
	cursor: pointer;
}

.se-reel__close:hover,
.se-reel__close:focus {
	background: #e8e6e1;
	color: #16151a;
}

/* ---------- 기능 카드 ---------- */
.se-hovercards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: calc(28 * var(--se-u));
	margin-top: calc(72 * var(--se-u));
}

.se-hovercards__card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: max(12px, calc(24 * var(--se-u)));
	background: var(--se-tone-card);
	color: inherit;
	text-decoration: none;
	transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.5s ease;
}

.se-hovercards__card:hover,
.se-hovercards__card:focus-visible {
	transform: translateY(calc(-10 * var(--se-u)));
	box-shadow: 0 calc(30 * var(--se-u)) calc(70 * var(--se-u)) rgba(22, 21, 26, 0.12);
	color: inherit;
}

.se-hovercards__media {
	display: block;
	aspect-ratio: 16 / 11;
	overflow: hidden;
	background: var(--se-tone-line);
}

.se-hovercards__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: left top;
	transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.se-hovercards__card:hover .se-hovercards__media img,
.se-hovercards__card:focus-visible .se-hovercards__media img {
	transform: scale(1.08);
}

.se-hovercards__text {
	display: block;
	padding: calc(32 * var(--se-u)) calc(32 * var(--se-u)) calc(38 * var(--se-u));
}

.se-hovercards__tag {
	display: inline-block;
	margin-bottom: calc(18 * var(--se-u));
	padding: 5px 12px;
	border: 1px solid var(--se-tone-line);
	border-radius: 999px;
	font-family: var(--se-grotesk);
	font-size: max(10px, calc(13 * var(--se-u)));
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--se-tone-muted);
}

.se-hovercards__title {
	display: block;
	font-family: var(--se-kr);
	font-size: max(18px, calc(30 * var(--se-u)));
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.02em;
	word-break: keep-all;
}

.se-hovercards__body {
	display: block;
	margin-top: calc(14 * var(--se-u));
	font-family: var(--se-kr);
	font-size: max(13px, calc(18 * var(--se-u)));
	line-height: 1.7;
	color: var(--se-tone-muted);
	word-break: keep-all;
}

@container (max-width: 1023px) {
	.se-hovercards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container (max-width: 767px) {
	.se-hero3d { min-height: 86vh; }
	.se-hero3d__title { font-size: 11cqw; }
	.se-hero3d__action { margin-top: 7cqw; }
	.se-reel { width: 88cqw; }
	.se-reel__card { aspect-ratio: 4 / 3; }
	.se-reel__label { font-size: 11cqw; }
	.se-hovercards {
		grid-template-columns: minmax(0, 1fr);
		gap: 5cqw;
		margin-top: 9cqw;
	}
	.se-hovercards__text { padding: 6cqw; }
	.se-hovercards__tag { margin-bottom: 3cqw; }
	.se-hovercards__title { font-size: 5.6cqw; }
	.se-hovercards__body { margin-top: 2.4cqw; font-size: max(13px, 3.9cqw); }
}

@media (prefers-reduced-motion: reduce) {
	.se-reel__preview,
	.se-reel__play,
	.se-hovercards__card,
	.se-hovercards__media img {
		transition: none;
	}
}

/* ==========================================================
 * 소개 + 커지는 영상
 * 글 옆의 작은 영상이 스크롤에 따라 기울어지며 날아가 아래의 큰 카드 자리를 채운다.
 * 기본 상태(스크립트 없음·좁은 화면·편집 화면)에서는 영상이 큰 카드 자리에 그대로 놓인다.
 * ========================================================== */
.se-flow {
	position: relative;
	padding: calc(150 * var(--se-u)) 0 calc(170 * var(--se-u));
	--se-flow-tint-color: var(--se-flow-tint, transparent);
}

.se-flow__intro,
.se-flow__big {
	position: relative;
	width: 90cqw;
	margin: 0 auto;
}

.se-flow__heading {
	margin: 0;
	padding: 0;
	font-family: var(--se-kr);
	font-size: max(34px, calc(124 * var(--se-u)));
	font-weight: 700;
	line-height: 1.14;
	letter-spacing: -0.04em;
	color: inherit;
	word-break: keep-all;
}

.se-flow__row {
	display: grid;
	grid-template-columns: minmax(0, 45fr) minmax(0, 49fr);
	gap: 6cqw;
	align-items: start;
	margin-top: calc(70 * var(--se-u));
}

/* 작은 영상이 처음 놓이는 자리 */
.se-flow__small {
	/* 큰 자리와 같은 비율이어야 영상이 찌그러지지 않고 커진다 */
	aspect-ratio: 16 / 8;
	margin-top: calc(150 * var(--se-u));
	border-radius: max(10px, calc(22 * var(--se-u)));
}

.se-flow__body {
	margin: 0;
	font-family: var(--se-kr);
	font-size: max(15px, calc(27 * var(--se-u)));
	line-height: 1.6;
	letter-spacing: -0.01em;
	word-break: keep-all;
}

.se-flow__action { margin: calc(56 * var(--se-u)) 0 0; }

.se-pill-button--light {
	background: var(--se-tone-card);
	box-shadow: 0 calc(8 * var(--se-u)) calc(30 * var(--se-u)) rgba(22, 21, 26, 0.08);
	color: var(--se-tone-ink);
}

.se-pill-button--light:hover,
.se-pill-button--light:focus {
	color: var(--se-tone-ink);
}

.se-pill-button--light::before {
	content: "";
	display: inline-block;
	width: 0.42em;
	height: 0.42em;
	margin-right: 0.9em;
	border-radius: 50%;
	background: currentColor;
	vertical-align: middle;
}

/* 큰 카드가 놓이는 자리 */
.se-flow__stage { margin-top: calc(240 * var(--se-u)); }

.se-flow__big { aspect-ratio: 16 / 8; }

.se-flow__ghost { display: none; }

.se-flow__mover {
	width: 100%;
	height: 100%;
	margin: 0;
}

.se-flow__mover .se-reel__card {
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
}

/* 작을 때 영상에 덧입히는 색. 커지면서 걷힌다. */
.se-flow__tint {
	position: absolute;
	inset: 0;
	background: var(--se-flow-tint-color);
	mix-blend-mode: color;
	opacity: 0;
	pointer-events: none;
}

.se-flow__ribbon { display: none; }

/* ---------- 스크립트가 움직임을 맡았을 때 ---------- */
/* 큰 자리는 화면 가운데에 붙은 채로 한동안 머문다 */
.se-flow.is-live .se-flow__stage { height: calc(45cqw + 55vh); }

.se-flow.is-live .se-flow__big {
	position: sticky;
	top: max(70px, calc(50vh - 22.5cqw));
}

/* 영상이 오기 전 큰 자리에 미리 보이는 글자 */
.se-flow.is-live .se-flow__ghost {
	display: flex;
	background: none;
	pointer-events: none;
}

.se-flow.is-live .se-flow__mover {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	transform-origin: 0 0;
	will-change: transform;
}

.se-flow.is-live .se-reel__card {
	transition: none;
	will-change: transform;
}

.se-flow.is-live .se-flow__ribbon {
	position: absolute;
	z-index: 0;
	display: block;
	overflow: visible;
	pointer-events: none;
}

.se-flow__ribbon path {
	fill: none;
	stroke: var(--se-flow-tint-color);
	stroke-width: max(18px, calc(46 * var(--se-u)));
	stroke-linecap: round;
	stroke-dasharray: 1;
	stroke-dashoffset: 1;
}

@container (max-width: 767px) {
	.se-flow { padding: 16cqw 0 18cqw; }
	.se-flow__heading { font-size: 11cqw; }
	.se-flow__row {
		grid-template-columns: minmax(0, 1fr);
		margin-top: 7cqw;
	}
	.se-flow__small { display: none; }
	.se-flow__body { font-size: max(15px, 4.3cqw); }
	.se-flow__action { margin-top: 7cqw; }
	.se-flow__stage { margin-top: 14cqw; }
	.se-flow__big { aspect-ratio: 4 / 3; }
}
