/* ==========================================================================
   MYLOCUS — Cinematic flight (세로 스크롤, 실사 에셋 슬롯)
   구름 통과 → 비행기가 구름 속으로 → 화이트아웃 → 착륙 → MYLOCUS 공항 등장
   비행기 / 창문 내부 / 공항 = 실사 이미지 슬롯 (assets/ 교체)
   하늘 / 구름 / 안개 / 사인 = 고퀄 CSS
   ========================================================================== */

.flight { position: relative; height: 860vh; }

.flight-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: #8fc0f5;
  perspective: 1400px;
}

/* ---- 하늘 (고고도 → 접근 → 착륙) ---- */
.sky { position: absolute; inset: 0; will-change: opacity; }
.sky.high     { background: linear-gradient(180deg, #2f6fd6 0%, #5fa0ec 42%, #a8d0f7 100%); }
.sky.approach { background: linear-gradient(180deg, #7fb3f2 0%, #bfe0ff 55%, #eef6ff 100%); opacity: 0; }
.sky.land     { background: linear-gradient(180deg, #cfe6ff 0%, #eef6ff 50%, #fbfdff 100%); opacity: 0; }

/* 태양 글로우 */
.sun {
  position: absolute; top: 12%; right: 16%;
  width: 130px; height: 130px; border-radius: 999px;
  background: radial-gradient(circle at 42% 42%, #fff8e6, #ffe2a0 58%, rgba(255,210,120,0));
  box-shadow: 0 0 110px 40px rgba(255, 225, 150, 0.6);
  will-change: opacity;
}

/* ---- 실사 이미지 슬롯 ---- */
.slot { position: relative; overflow: hidden; }
.slot > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.slot.cover > img { object-fit: cover; }
.slot::after {
  content: attr(data-label);
  position: absolute; inset: 0;
  display: grid; align-content: center; justify-items: center; gap: 4px;
  padding: 16px; text-align: center;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12px; line-height: 1.6; letter-spacing: 0.02em;
  color: #1f3c6b;
  background:
    repeating-linear-gradient(-45deg, rgba(47,111,237,.10) 0 2px, transparent 2px 16px),
    linear-gradient(160deg, #e9f1fd, #d4e4fb);
  border: 1.5px dashed rgba(47,111,237,.5);
  border-radius: 14px;
}
/* 이미지가 로드되면 placeholder 라벨 숨김 */
.slot.filled::after { display: none; }

/* ---- 비행기 ---- */
.plane-wrap {
  position: absolute; top: 38%; left: 50%; z-index: 5;
  width: clamp(340px, 60vw, 820px);
  margin-left: calc(clamp(340px, 60vw, 820px) / -2);
  will-change: transform, opacity;
}
.plane-bob { animation: planeBob 6s ease-in-out infinite; }
.plane-slot { aspect-ratio: 16 / 9; border-radius: 18px; filter: drop-shadow(0 30px 40px rgba(15, 40, 85, 0.3)); }
@keyframes planeBob {
  0%, 100% { transform: translateY(0) rotate(-0.8deg); }
  50% { transform: translateY(-14px) rotate(0.8deg); }
}
.contrail {
  position: absolute; top: 52%; right: 96%;
  width: 60vw; height: 12px; margin-top: -6px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.85));
  filter: blur(4px);
}

/* ---- 구름 (CSS, 세로 패럴랙스) ---- */
.clouds { position: absolute; inset: -60vh 0 0 0; will-change: transform, opacity; pointer-events: none; }
.clouds.far  { z-index: 2; }
.clouds.near { z-index: 7; }

.cloud { position: absolute; background: #fff; border-radius: 999px; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 999px; }
.cloud::before { width: 62%; height: 134%; left: 9%; top: -48%; }
.cloud::after  { width: 50%; height: 168%; right: 11%; top: -76%; }
.clouds.far .cloud  { opacity: .55; filter: blur(10px); }
.clouds.near .cloud { opacity: .96; filter: blur(5px); box-shadow: 0 30px 60px rgba(120,160,210,.25); }

/* ---- 화이트아웃 (구름 속 진입) ---- */
.whiteout {
  position: absolute; inset: 0; z-index: 8;
  background: radial-gradient(circle at 50% 46%, #ffffff 0%, #ffffff 55%, #eaf2fb 100%);
  opacity: 0; pointer-events: none; will-change: opacity;
}

/* ---- 창문 인터루드 (실사 캐빈) ---- */
.window-scene {
  position: absolute; inset: 0; z-index: 6;
  display: grid; place-items: center;
  opacity: 0; pointer-events: none; will-change: opacity, transform;
}
.window-frame {
  position: relative;
  width: min(560px, 84%);
  aspect-ratio: 3 / 4;
  max-height: 78vh;
  border-radius: 120px / 90px;
  padding: 22px;
  background: linear-gradient(160deg, #f4f7fb, #d9e2ee);
  box-shadow: 0 40px 90px rgba(15, 40, 85, 0.32), inset 0 2px 6px rgba(255,255,255,.7);
}
.window-frame .glass {
  position: absolute; inset: 22px;
  border-radius: 100px / 74px;
  overflow: hidden;
  box-shadow: inset 0 0 0 8px rgba(255,255,255,.45), inset 0 0 40px rgba(20,40,80,.25);
}
.window-frame .glass .slot { width: 100%; height: 100%; border-radius: inherit; }
.window-frame .glass .slot::after { border-radius: inherit; border: none; }
.window-shade {
  position: absolute; left: 22px; right: 22px; top: 22px; height: 0;
  background: linear-gradient(180deg, #e7edf5, #cdd8e6);
  border-radius: 100px 100px 0 0 / 74px 74px 0 0;
  z-index: 2;
}
.window-cap {
  position: absolute; left: 50%; bottom: -52px; transform: translateX(-50%);
  white-space: nowrap; text-align: center;
  color: #fff; font-size: clamp(15px, 2vw, 20px); font-weight: 750;
  text-shadow: 0 2px 16px rgba(15,40,85,.5);
}

/* ---- MYLOCUS 공항 (착륙) ---- */
.airport {
  position: absolute; left: 0; right: 0; bottom: 0; height: 70vh; z-index: 3;
  transform: translateY(103%); will-change: transform;
}
.airport .slot { position: absolute; inset: 0; }
.airport .slot::after { border-radius: 0; }
.airport .ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 26vh;
  background: linear-gradient(180deg, rgba(140,160,185,.0), #aab8cb 40%, #93a2b7);
  z-index: 1;
}

/* 공항 사인 (도착 점등) */
.sign {
  position: absolute; left: 50%; bottom: 40vh; transform: translateX(-50%); z-index: 4;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 14px 28px; border-radius: 16px;
  background: rgba(255,255,255,.92); border: 1px solid #dbe5f3;
  box-shadow: 0 18px 50px rgba(15,40,85,.22);
  white-space: nowrap;
}
.sign .mk {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  color: #fff; font-weight: 850; font-size: 20px;
  background: linear-gradient(145deg, #6aa0ff, #1f4fd8);
  box-shadow: 0 10px 22px rgba(47,111,237,.4);
}
.sign .nm { font-size: clamp(22px, 3vw, 32px); font-weight: 850; letter-spacing: .14em; color: var(--ink); }
.sign .nm i { font-style: normal; color: var(--blue-deep); }
.sign .tag {
  margin-left: 6px; padding-left: 14px; border-left: 1px solid var(--line);
  font-size: 12px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--gold);
}

/* ---- 도착 텍스트 ---- */
.arrival-copy {
  position: absolute; left: 0; right: 0; top: 7%; z-index: 9;
  text-align: center; padding: 0 24px;
  opacity: 0; transform: translateY(20px); will-change: opacity, transform; pointer-events: none;
}
.arrival-copy h1 {
  margin: 0; font-size: clamp(30px, 4.6vw, 56px); font-weight: 850; line-height: 1.14;
  letter-spacing: -.02em; color: var(--ink); text-wrap: balance;
  text-shadow: 0 2px 26px rgba(246,251,255,.8);
}
.arrival-copy h1 .hl { color: var(--blue-deep); }

/* ---- 좌상단 타이틀 + 인트로 건너뛰기 ---- */
.cine-ui {
  position: absolute; inset: 0; z-index: 10;
  pointer-events: none; will-change: opacity;
}
.cine-brand {
  position: absolute; top: 26px; left: 30px;
  display: inline-flex; align-items: center; gap: 11px;
  pointer-events: auto;
  font-weight: 850; font-size: 19px; letter-spacing: .14em; color: #fff;
  text-shadow: 0 2px 14px rgba(15,40,85,.4);
}
.cine-brand .cb-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  color: #fff; font-size: 19px; font-weight: 850;
  background: linear-gradient(145deg, #6aa0ff, #1f4fd8);
  box-shadow: 0 10px 24px rgba(47,111,237,.45);
}
.cine-skip {
  position: absolute; top: 26px; right: 30px;
  display: inline-flex; align-items: center; gap: 9px;
  pointer-events: auto; cursor: pointer;
  padding: 10px 18px; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 750; color: #fff;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  text-shadow: 0 1px 8px rgba(15,40,85,.35);
  transition: background .2s, transform .2s;
}
.cine-skip:hover { background: rgba(255,255,255,.28); transform: translateY(-1px); }
.cine-skip .cs-arrow { font-size: 14px; line-height: 1; }

/* ---- HUD ---- */
.scroll-hint {
  position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 10;
  display: grid; justify-items: center; gap: 9px;
  color: rgba(255,255,255,.94); font-size: 11.5px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(15,40,85,.35); transition: opacity .4s;
}
.scroll-hint .mouse { width: 25px; height: 40px; border-radius: 999px; border: 2px solid rgba(255,255,255,.88); position: relative; }
.scroll-hint .mouse::before {
  content: ""; position: absolute; top: 7px; left: 50%; width: 3.5px; height: 8px; border-radius: 999px;
  background: #fff; transform: translateX(-50%); animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel { 0%{opacity:0;transform:translate(-50%,0)} 40%{opacity:1} 80%{opacity:0;transform:translate(-50%,11px)} 100%{opacity:0} }

.j-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(15,40,85,.14); z-index: 10; }
.j-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #fff, var(--gold-bright)); }

.site-header.cine-hidden { opacity: 0; transform: translateY(-100%); pointer-events: none; }
.site-header { transition: opacity .5s var(--ease), transform .5s var(--ease), border-color .3s, box-shadow .3s; }

/* ---- 모션 최소화 / JS 미동작: 정적 도착 ---- */
html.flight-static .flight { height: auto; }
html.flight-static .flight-stage { position: static; height: auto; min-height: 0; padding: 80px 0; }
html.flight-static .sky.land { opacity: 1; }
html.flight-static .airport { position: relative; transform: none; height: 60vh; }
html.flight-static .arrival-copy { position: relative; opacity: 1; transform: none; top: 0; margin-bottom: 24px; }
html.flight-static .plane-wrap { position: relative; top: 0; margin: 0 auto 30px; }
html.flight-static .clouds, html.flight-static .contrail, html.flight-static .whiteout,
html.flight-static .cine-ui, html.flight-static .scroll-hint, html.flight-static .j-progress { display: none; }
html.flight-static .site-header.cine-hidden { opacity: 1; transform: none; pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  .plane-bob, .scroll-hint .mouse::before { animation: none; }
}

@media (max-width: 640px) {
  .flight { height: 600vh; }
  .sign .tag { display: none; }
  .arrival-copy h1 { font-size: clamp(24px, 7.5vw, 34px); padding: 0 16px; }
  .plane-wrap { width: 90vw; margin-left: -45vw; }
  .cine-brand { top: 18px; left: 16px; font-size: 16px; }
  .cine-brand .cb-name { display: none; }
  .cine-skip { top: 18px; right: 16px; padding: 8px 14px; font-size: 12px; }
  .scroll-hint { bottom: 22px; font-size: 10px; }
  .sign { padding: 10px 18px; gap: 10px; }
  .sign .nm { font-size: clamp(18px, 4.5vw, 26px); }
}
