/* ---------- 사이트 모션 (첫 화면 시연, 카드 얹어 보기, 스크롤 등장) ----------
   화면 요소는 흑백 그대로 두고, 색은 "예시 영상"과 모션 안에만 쓴다.
   움직임 줄이기(prefers-reduced-motion)를 켠 사람에게는 멈춘 장면만 보여 준다. */

/* 예시 영상: 실제 촬영 대신 그라데이션과 흐린 빛망울로 만든 가짜 장면(가볍고 저작권 걱정 없음) */
.scene { position: absolute; inset: 0; overflow: hidden; background: #111; }
.scene i { position: absolute; inset: -8%; display: block; animation: fx-kenburns 18s ease-in-out infinite alternate; }
.scene b { position: absolute; border-radius: 50%; filter: blur(6px); opacity: .55; animation: fx-drift 9s ease-in-out infinite alternate; }
.scene[data-scene="dusk"] i { background:
  radial-gradient(60% 50% at 70% 78%, rgba(255,170,110,.55), transparent 70%),
  linear-gradient(180deg, #1d2440 0%, #4b3a5e 38%, #b86a5f 66%, #e9a46f 80%, #2a1d1c 81%, #120d0d 100%); }
.scene[data-scene="cafe"] i { background:
  radial-gradient(40% 40% at 25% 30%, rgba(255,214,150,.6), transparent 70%),
  radial-gradient(50% 45% at 80% 70%, rgba(120,70,40,.7), transparent 70%),
  linear-gradient(160deg, #3b2a20 0%, #6d4a32 45%, #2a1c15 100%); }
.scene[data-scene="sea"] i { background:
  radial-gradient(70% 40% at 50% 15%, rgba(255,255,255,.45), transparent 70%),
  linear-gradient(180deg, #8fc6e6 0%, #cfe6ef 42%, #2f7fa3 43%, #1c5a7a 70%, #0f3247 100%); }
.scene[data-scene="dusk"] b { background: #ffd2a0; }
.scene[data-scene="cafe"] b { background: #ffe2b0; }
.scene[data-scene="sea"] b { background: #ffffff; opacity: .35; }
.scene .tagline {
  position: absolute; right: 10px; top: 10px;
  font-size: 11px; color: rgba(255,255,255,.85); background: rgba(0,0,0,.45);
  padding: 1px 7px; border-radius: 5px; letter-spacing: .02em;
}
@keyframes fx-kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.08) translate(-2%, 1%); } }
@keyframes fx-drift { from { transform: translate(0, 0); } to { transform: translate(18px, -14px); } }

/* ---------- 첫 화면: 첫 인사 + 메탈·유리 도형 (js/hero3d.js) ---------- */
.hero3d { position: relative; min-height: min(78vh, 720px); display: grid; place-items: center; overflow: hidden; text-align: center; }
.hero3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #0a0a0a; }
.hero-copy { position: relative; max-width: 820px; padding: 72px 28px 64px; }
.hero-copy .hello { margin: 0 0 14px; font-size: 15px; letter-spacing: .02em; color: #b9c6e0; animation: fx-rise .9s .1s cubic-bezier(.2,.8,.2,1) both; }
.hero-copy h1 {
  margin: 0 0 16px; font-size: clamp(34px, 5.4vw, 64px); line-height: 1.12; letter-spacing: -0.045em; font-weight: 800; word-break: keep-all; text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0,0,0,.55); animation: fx-rise .9s .25s cubic-bezier(.2,.8,.2,1) both;
}
.hero-copy > p:not(.hello) { margin: 0 auto 26px; max-width: 46ch; color: #b4b4b4; word-break: keep-all; text-shadow: 0 1px 12px rgba(0,0,0,.6); animation: fx-rise .9s .4s cubic-bezier(.2,.8,.2,1) both; }
.hero-down { display: inline-flex; gap: 6px; font-size: 14px; color: var(--text); padding: 8px 18px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(10,10,10,.35); backdrop-filter: blur(6px); animation: fx-rise .9s .55s cubic-bezier(.2,.8,.2,1) both; }
.hero-down:hover { border-color: rgba(255,255,255,.6); }
@keyframes fx-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- 내 영상 화면에 얹어 보기 ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.try { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 36px; align-items: center; padding: 56px 0 8px; }
.try-text h2 { margin: 0 0 10px; font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.03em; line-height: 1.25; word-break: keep-all; }
.try-text > p { margin: 0 0 20px; color: var(--muted); word-break: keep-all; }
.drop { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px dashed #3a3a3a; border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover, .drop.over, .drop:focus-within { border-color: var(--text); }
.drop.over { background: #1b1b1b; }
.mine-thumb { flex: none; width: 96px; aspect-ratio: 16 / 9; border-radius: 6px; background: #1f1f1f center / cover no-repeat; border: 1px solid var(--line); position: relative; }
.mine-thumb::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; color: #6b6b6b; }
.has-mine .mine-thumb::after { content: none; }
.drop-txt strong { display: block; font-size: 16px; }
.drop-txt small { display: block; font-size: 13px; color: var(--muted); word-break: keep-all; }
.clear-mine { margin-top: 10px; font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.clear-mine:hover { color: var(--text); }
.mine-msg { margin: 10px 0 0; min-height: 1.4em; font-size: 14px; }
.mine-msg:empty { min-height: 0; }
.mine-note { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
/* 내 화면을 넣으면 예시 장면 대신 그 그림을 깐다 */
.scene.mine i { inset: 0; background-color: #111; background-position: center; background-size: cover; background-repeat: no-repeat; animation: none; }
.scene.mine b { display: none; }

/* ---------- 인기 모션 띠: 두 줄이 서로 반대로 흐른다 ---------- */
.belt-sec { padding-top: 56px; }
.belt-sec > h2 { margin: 0 0 18px; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.03em; }
.belt { overflow: hidden; margin: 0 -28px 14px; padding: 4px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.belt-track { display: flex; width: max-content; animation: fx-belt var(--belt-dur, 60s) linear infinite; }
.belt[data-dir="right"] .belt-track { animation-direction: reverse; }
.belt:hover .belt-track, .belt:focus-within .belt-track { animation-play-state: paused; }
.belt-group { display: flex; gap: 14px; padding-right: 14px; }
.belt-group .card { width: 300px; flex: none; }
@keyframes fx-belt { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.hl { position: relative; display: inline-block; }
.hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: .04em; height: .09em; background: currentColor; transform-origin: left; animation: fx-underline 1s .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes fx-underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.stage {
  position: relative; max-width: 860px; margin: 0 auto; aspect-ratio: 16 / 9;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #000;
  touch-action: pan-y; cursor: ew-resize;
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage .green { clip-path: inset(0 calc(100% - var(--split, 0%)) 0 0); }
.stage .divider { position: absolute; top: 0; bottom: 0; left: var(--split, 0%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.stage .divider::after {
  content: "⇆"; position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px;
  display: grid; place-items: center; font-size: 15px; color: #000; background: #fff; border-radius: 50%;
}
.stage.done .divider { opacity: 0; }
.stage .label { position: absolute; bottom: 12px; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(0,0,0,.66); color: #fff; transition: opacity .3s; }
.stage .label.l { left: 12px; } .stage .label.r { right: 12px; }
.now { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 14px 0 0; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.now strong { color: var(--text); }
.now .dots { display: inline-flex; gap: 5px; }
.now .dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; }
.now .dots button[aria-current="true"] { background: var(--text); width: 20px; border-radius: 4px; transition: width .3s; }
.now a { text-decoration: underline; text-underline-offset: 3px; color: var(--text); }

/* ---------- 공통: 카드에 마우스를 올리면 "내 영상 위"로 ---------- */
.thumb .scene { opacity: 0; transition: opacity .35s ease; }
.thumb.on-video .scene { opacity: 1; }
.thumb canvas { position: relative; }
.thumb .ov-hint { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); font-size: 11px; padding: 1px 8px; border-radius: 5px; background: #fff; color: #0a0a0a; opacity: 0; transition: opacity .25s; z-index: 1; white-space: nowrap; }
.thumb.on-video .ov-hint { opacity: 1; }

/* ---------- 공통: 스크롤하면 아래에서 떠오르기 ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.steps li.reveal:nth-child(2) { transition-delay: .1s; }
.steps li.reveal:nth-child(3) { transition-delay: .2s; }

@media (max-width: 999px) {
  .hero3d { min-height: 0; place-items: end center; }
  .hero-copy { padding: max(240px, 44vw) 20px 36px; }
}
@media (max-width: 760px) {
  .try { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 40px; }
  .belt { margin: 0 -18px 10px; }
  .belt-group .card { width: 220px; }
  .stage { border-radius: 10px; }
  .stage .label { font-size: 10px; padding: 2px 7px; bottom: 8px; }
  .stage .label.l { left: 8px; } .stage .label.r { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .scene i, .scene b, .hl::after { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-copy > *, .hero-copy h1 { animation: none !important; }
  .belt { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .belt-track { animation: none; }
  .belt-group[aria-hidden="true"] { display: none; }
}
