/* ============================================================
   mevu 미브 — 브릿지 랜딩 페이지 (Framer 재구현판)
   원본 커스텀 컴포넌트의 디자인 토큰/키프레임을 그대로 반영.
   ============================================================ */

/* Pretendard Variable — SIL OFL 1.1 (orioncactus/pretendard v1.3.9) */
@font-face {
  font-family: 'Pretendard Variable';
  font-style: normal;
  font-weight: 45 920;
  font-display: swap;
  src: url('fonts/PretendardVariable.woff2') format('woff2-variations');
}

/* 단일 스크린 브릿지 페이지: 오버스크롤/여백에 흰 배경이 비치지 않게 */
html, body {
  background: #000 !important;
  overscroll-behavior: none;
}
@media (max-width: 809px) {
  html, body { height: 100%; overflow: hidden; }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, system-ui,
    'Noto Sans KR', sans-serif;
  color: #fff;
  -webkit-font-smoothing: antialiased;
}

/* ── 헤더 ─────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 0;
  z-index: 20;
}
.brand img {
  display: block;
  width: 88px;
  height: auto;
}
@media (max-width: 1199.98px) {
  .brand img { width: 72px; }
}
.socials {
  display: flex;
  align-items: center;
  gap: 14px;
}
.mevu-sns {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  opacity: 0.92;
  transition: opacity 160ms ease, transform 160ms ease;
}
.mevu-sns:hover { opacity: 1; transform: scale(1.08); }
.mevu-sns:active { transform: scale(0.94); }

/* ── 스테이지(씬 컨테이너) ─────────────────────────────── */
#stage {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: rgb(0, 0, 0);
}

.scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--fade, 400ms) cubic-bezier(0.3, 0.6, 0.2, 1);
}
.scene.on { opacity: 1; }

/* A: 큰카드 캐러셀 */
.scene-a {
  display: flex;
  justify-content: center;
  transition: opacity calc(var(--fade, 400ms) * 1.6) cubic-bezier(0.3, 0.6, 0.2, 1),
              transform calc(var(--fade, 400ms) * 1.6) cubic-bezier(0.3, 0.6, 0.2, 1);
}
.scene-a:not(.on) { transform: scale(0.97); }
.carousel { position: relative; }
.car-track {
  position: absolute;
  inset: 0;
  will-change: transform;
}
.car-card {
  position: absolute;
  top: 0;
  overflow: hidden;
  background: #f2f2f2;
  will-change: transform;
}
.car-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

/* G: 세로 스크롤 갤러리 */
.scene-g {
  transform-origin: center 60%;
  transition: opacity calc(var(--fade, 400ms) * 1.8) cubic-bezier(0.3, 0.6, 0.2, 1),
              transform calc(var(--fade, 400ms) * 1.8) cubic-bezier(0.3, 0.6, 0.2, 1);
}
.scene-g.on { transform: scale(1) rotate(0deg); }
.scene-g.side { transform: scale(0.88) rotate(-7deg); }
.mosaic { position: absolute; inset: 0; display: flex; }
.gal-col {
  position: relative;
  height: 100%;
  overflow: hidden;
}
.gal-track {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  will-change: transform;
  animation: mevu-gal-up var(--gal-dur, 12.9s) linear infinite;
}
.gal-track.down { animation-name: mevu-gal-down; }
.gal-tile {
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 8px;
  background: #1c1c1e;
  animation: mevu-tile-in 380ms cubic-bezier(0.34, 1.25, 0.64, 1) both;
}
.gal-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gal-fade {
  position: absolute;
  left: 0; right: 0;
  pointer-events: none;
  z-index: 2;
}
.gal-fade.top { top: 0; background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0) 100%); }
.gal-fade.bottom { bottom: 0; background: linear-gradient(0deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0) 100%); }

/* S: 하이라이트 카드 */
.scene-s {
  transform-origin: center 60%;
  transition: opacity calc(var(--fade, 400ms) * 1.8) cubic-bezier(0.3, 0.6, 0.2, 1),
              transform calc(var(--fade, 400ms) * 1.8) cubic-bezier(0.3, 0.6, 0.2, 1);
}
.scene-s.on { transform: scale(1) rotate(0deg); }
.scene-s:not(.on) { transform: scale(0.94) rotate(0deg); }
.feature-card {
  position: absolute;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}
.feature-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* B: 가로 흐르는 카드 2줄 */
.scene-b {
  transition: opacity calc(var(--fade, 400ms) * 1.5) cubic-bezier(0.3, 0.6, 0.2, 1),
              transform calc(var(--fade, 400ms) * 1.5) cubic-bezier(0.3, 0.6, 0.2, 1);
}
.scene-b:not(.on) { transform: scale(0.97); }
.mq-wrap {
  position: absolute;
  left: 0;
  width: 100%;
  overflow: hidden;
}
.mq-track {
  position: absolute;
  top: 0;
  display: flex;
  will-change: transform;
  animation: mevu-mq-left var(--mq-dur, 55.8s) linear infinite;
}
.mq-track.right { animation-name: mevu-mq-right; }
.mq-card {
  flex: 0 0 auto;
  position: relative;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}
.mq-card img {
  position: absolute;
  object-fit: cover;
}
.mq-card .label {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  color: #1a1a1a;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* T: 태그라인 오버레이 */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity calc(var(--fade, 400ms) * 1.6) cubic-bezier(0.3, 0.6, 0.2, 1);
}
.overlay.on { opacity: 1; }
.overlay-tagline .lines {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 0.18em;
  max-width: 92%;
  color: #fff;
  letter-spacing: -0.01em;
  font-weight: 700;
  text-align: center;
}
.overlay-tagline .line {
  display: flex;
  justify-content: center;
  column-gap: 0.32em;
  white-space: nowrap;
}
.overlay-tagline .word {
  display: inline-block;
  animation: mevu-line 920ms cubic-bezier(0.34, 1.25, 0.64, 1) both;
}

/* L: 로고 오버레이 */
.overlay-logo {
  transition: opacity var(--fade, 400ms) cubic-bezier(0.3, 0.6, 0.2, 1),
              transform var(--fade, 400ms) cubic-bezier(0.3, 0.6, 0.2, 1);
}
.overlay-logo:not(.on) { transform: scale(1.04); }
.overlay-logo img {
  object-fit: contain;
  animation: mevu-tile-in 620ms cubic-bezier(0.34, 1.25, 0.64, 1) both;
}

/* 가로 모드 상단 그라데이션 */
.topfade {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 55%, rgba(0,0,0,0) 100%);
  pointer-events: none;
  z-index: 5;
}

/* ── QR / 다운로드 CTA ────────────────────────────────── */
.cta {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}
.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.qr-card img { display: block; }
.qr-card .caption {
  font-size: 10px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.cta-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #000;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.cta-pill:active { transform: translateX(-50%) scale(0.97); }

/* ── 키프레임 (원본과 동일한 커브) ─────────────────────── */
@keyframes mevu-line {
  0%   { opacity: 0; transform: translateY(0.9em) scale(0.92); filter: blur(6px); font-variation-settings: 'wght' 300; }
  55%  { opacity: 1; transform: translateY(0) scale(1); filter: blur(0px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0px); font-variation-settings: 'wght' 700; }
}
@keyframes mevu-typo {
  0%   { font-variation-settings: 'wght' 100; letter-spacing: 0.1em; opacity: 0; }
  22%  { opacity: 1; }
  48%  { font-variation-settings: 'wght' 900; letter-spacing: -0.01em; }
  70%  { font-variation-settings: 'wght' 300; letter-spacing: 0.03em; }
  100% { font-variation-settings: 'wght' 800; letter-spacing: -0.02em; opacity: 1; }
}
@keyframes mevu-tile-in {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes mevu-gal-up {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, var(--gal-loop, -790px), 0); }
}
@keyframes mevu-gal-down {
  from { transform: translate3d(0, var(--gal-loop, -790px), 0); }
  to   { transform: translate3d(0, 0, 0); }
}
@keyframes mevu-mq-left {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(var(--mq-loop, -1805px), 0, 0); }
}
@keyframes mevu-mq-right {
  from { transform: translate3d(var(--mq-loop, -1805px), 0, 0); }
  to   { transform: translate3d(0, 0, 0); }
}

/* ── 접근성: 모션 최소화 ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .gal-track, .mq-track { animation: none; }
  .gal-tile, .overlay-logo img, .overlay-tagline .word { animation: none; }
  .scene, .overlay, .car-track, .car-card { transition-duration: 1ms; }
}
