/* ==========================================================
   THE LUNAR ORBIT — HERO Page (cinematic gate)
   v1.0 · 7 phases · 42s · 6 langs
   ========================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }

:root {
  --bg: #000;
  --gold: #D4AF7A;
  --gold-bright: #E8C896;
  --accent: #C9B8FF;
  --txt: #ECECEC;
  --txt-dim: rgba(255,255,255,0.55);
  --line: rgba(255,255,255,0.18);
  --display-en: 'Cormorant Garamond', serif;
  --display-kr: 'Noto Serif KR', serif;
  --title: 'Cinzel', serif;
  --body: 'Inter', 'Noto Sans KR', sans-serif;
}

body.hero-page {
  font-family: var(--body);
  background: var(--bg);
  color: var(--txt);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  word-break: keep-all;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ============ TOP BAR ============ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px clamp(16px, 4vw, 44px);
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 100%);
}
.topbar > * { pointer-events: auto; }
.topbar__brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  font-family: var(--title);
  font-weight: 700; font-size: 15px;
  letter-spacing: 0.22em;
  color: var(--txt);
}
.topbar__brand-img {
  width: 36px; height: 36px; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(212,175,122,0.3), 0 0 12px rgba(212,175,122,0.15);
  transition: transform 0.4s ease;
}
.topbar__brand:hover .topbar__brand-img { transform: rotate(360deg); }
.topbar__brand-text em {
  font-style: normal;
  color: var(--gold);
}
.topbar__right {
  display: flex; gap: 12px; align-items: center;
}
.lang-chips {
  display: flex; gap: 2px; padding: 3px;
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}
.lang-chip {
  padding: 5px 9px; border-radius: 999px;
  font-family: var(--title); font-weight: 500;
  font-size: 10px; letter-spacing: 0.16em;
  color: var(--txt-dim);
  transition: color 0.2s ease, background 0.2s ease;
}
.lang-chip:hover { color: var(--txt); }
.lang-chip.is-active { background: var(--gold); color: #14141A; }
.topbar__btn {
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.4);
  color: var(--txt-dim);
  font-size: 10.5px; letter-spacing: 0.22em;
  text-transform: uppercase;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.topbar__btn:hover { color: var(--gold); border-color: var(--gold); }
.topbar__btn--skip { animation: skip-pulse 2s ease-in-out 0.5s 2; }
@keyframes skip-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,122,0); }
  50% { box-shadow: 0 0 0 6px rgba(212,175,122,0.18); }
}

/* ============ BGM Prompt ============ */
.bgm-prompt {
  position: fixed; top: 78px; right: 24px; z-index: 99;
  background: rgba(0,0,0,0.78);
  border: 1px solid var(--gold);
  padding: 11px 16px; border-radius: 999px;
  font-family: var(--body);
  font-size: 11px; letter-spacing: 0.14em;
  color: var(--gold);
  opacity: 0; transform: translateY(-8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  backdrop-filter: blur(8px);
}
.bgm-prompt.is-show {
  opacity: 1; transform: translateY(0); pointer-events: auto;
  animation: bgm-pulse 1.6s ease-in-out infinite;
}
@keyframes bgm-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,122,0); }
  50%      { box-shadow: 0 0 0 10px rgba(212,175,122,0.16); }
}

/* ============ STAGE LAYERS ============ */
.stage {
  position: fixed; inset: 0;
  background: #000;
  overflow: hidden;
}
.layer {
  position: absolute; inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease;
}
.layer.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* ============ P1: Universe Video ============ */
.universe-video {
  width: 100%; height: 100%;
  object-fit: cover;
}
.universe-veil {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.4) 100%);
}

/* ============ P3: Poem ============ */
.poem-layer {
  background: radial-gradient(ellipse at center, rgba(15,18,34,0.7) 0%, #000 80%);
  display: flex; align-items: center; justify-content: center;
  padding: 0 8vw;
}
.poem-stars {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 14% 22%, white, transparent),
    radial-gradient(1px 1px at 78% 12%, white, transparent),
    radial-gradient(1px 1px at 56% 64%, rgba(255,255,255,0.8), transparent),
    radial-gradient(2px 2px at 32% 84%, white, transparent),
    radial-gradient(1px 1px at 86% 56%, white, transparent),
    radial-gradient(1px 1px at 8% 70%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 92% 30%, white, transparent),
    radial-gradient(1px 1px at 42% 40%, rgba(255,255,255,0.7), transparent);
}
.poem-lines {
  position: relative;
  max-width: 880px; width: 100%;
  text-align: center;
}
.poem-line {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 1.2s ease, transform 1.2s ease;
  margin-bottom: 1.6em;
}
.poem-line.is-show { opacity: 1; transform: translateY(0); }
.poem-line .en {
  display: block;
  font-family: var(--display-en);
  font-weight: 300; font-style: italic;
  font-size: clamp(20px, 2.8vw, 34px);
  letter-spacing: 0.01em;
  line-height: 1.4;
  color: rgba(255,255,255,0.92);
}
.poem-line .kr {
  display: block; margin-top: 0.45em;
  font-family: var(--display-kr); font-weight: 300;
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: 0.04em;
  color: rgba(212,175,122,0.78);
}
.poem-title {
  opacity: 0; margin-top: 1.8em;
  transition: opacity 1.8s ease;
  font-family: var(--title);
  font-weight: 500;
  font-size: clamp(16px, 2vw, 24px);
  letter-spacing: 0.36em;
  color: var(--gold);
  text-transform: uppercase;
}
.poem-title.is-show { opacity: 1; }

/* ============ P4: LUNA Tear ============ */
.tear-layer { background: #000; }
.tear-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 15%;
  filter: brightness(0.78) saturate(1.05);
}
.tear-veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.88) 100%),
    linear-gradient(180deg, transparent 0%, transparent 50%, rgba(0,0,0,0.55) 100%);
}
.tear-overlay {
  position: absolute;
  left: 0; right: 0;
  bottom: 14vh;
  text-align: center;
  padding: 0 8vw;
  z-index: 5;
}
.tear-hook, .tear-lyric {
  opacity: 0;
  transition: opacity 1.2s ease;
}
.tear-hook.is-show, .tear-lyric.is-show { opacity: 1; }
.tear-hook .en, .tear-lyric .en {
  display: block;
  font-family: var(--display-en);
  font-weight: 300; font-style: italic;
  font-size: clamp(22px, 3vw, 38px);
  letter-spacing: 0.02em; line-height: 1.45;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 2px 24px rgba(0,0,0,0.7);
}
.tear-hook .kr, .tear-lyric .kr {
  display: block; margin-top: 0.55em;
  font-family: var(--display-kr); font-weight: 300;
  font-size: clamp(15px, 1.7vw, 22px);
  letter-spacing: 0.05em; line-height: 1.55;
  color: rgba(232,200,150,0.92);
  text-shadow: 0 2px 18px rgba(0,0,0,0.7);
}

/* Cut 1 — lyric block (선택 언어, 줄별 페이드인) */
.tear-lyric-block { margin-top: 1.5em; }
.tlb-line {
  display: block;
  font-family: 'Cormorant Garamond', 'Noto Serif KR', serif;
  font-weight: 300;
  font-size: clamp(15px, 1.95vw, 24px);
  line-height: 1.75; letter-spacing: 0.03em;
  color: rgba(232,200,150,0.96);
  text-shadow: 0 2px 18px rgba(0,0,0,0.85);
  opacity: 0; transform: translateY(12px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.tlb-line.is-show { opacity: 1; transform: translateY(0); }

/* Cut 2 — orbit line (영어 + 번역, 큰 폰트) */
.tear-lyric .en {
  font-size: clamp(30px, 4.6vw, 62px);
  font-weight: 400;
}
.tear-lyric .kr {
  font-size: clamp(17px, 2.2vw, 30px);
}

/* ============ P5: Concert (1 image Ken Burns) ============ */
.concert-layer { background: #000; }
.concert-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: brightness(0.95) saturate(1.08);
}
.layer.is-active .concert-img {
  animation: ken-burns 6s ease-out forwards;
}
@keyframes ken-burns {
  0%   { transform: scale(1.04) translate(0, 0); }
  100% { transform: scale(1.12) translate(-1%, -2%); }
}
.concert-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.28) 0%, transparent 20%, transparent 40%, rgba(0,0,0,0.84) 100%);
}

/* Stage copy overlay — MOVEMENT CAMPAIGN + lyric */
.stage-copy {
  position: absolute;
  left: 0; right: 0;
  bottom: 10vh;
  text-align: center;
  padding: 0 7vw;
  z-index: 6;
}
.stage-copy__head {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1.3s ease, transform 1.3s ease;
}
.stage-copy__head.is-show { opacity: 1; transform: translateY(0); }
.stage-copy__line {
  display: block;
  font-family: var(--display-en);
  font-weight: 400;
  font-size: clamp(13px, 1.55vw, 20px);
  letter-spacing: 0.1em; line-height: 1.85;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 2px 18px rgba(0,0,0,0.9);
}
.stage-copy__campaign {
  display: block;
  font-family: var(--title);
  font-weight: 700;
  font-size: clamp(24px, 3.7vw, 52px);
  letter-spacing: 0.14em;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0,0,0,0.95), 0 0 50px rgba(212,175,122,0.3);
  margin: 0.15em 0 0.2em;
}
.stage-copy__lyric { margin-top: 1.4em; }
.scl-line {
  display: block;
  font-family: 'Cormorant Garamond', 'Noto Serif KR', serif;
  font-weight: 300;
  font-size: clamp(14px, 1.85vw, 23px);
  line-height: 1.7; letter-spacing: 0.03em;
  color: rgba(232,200,150,0.96);
  text-shadow: 0 2px 18px rgba(0,0,0,0.9);
  opacity: 0; transform: translateY(12px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.scl-line.is-show { opacity: 1; transform: translateY(0); }

/* ============ P6: Logo ============ */
.logo-layer {
  background: transparent;
  display: flex; align-items: center; justify-content: center;
}
.logo-img {
  width: clamp(220px, 28vw, 400px);
  height: auto;
  opacity: 0;
  transform: scale(0.86);
  transition: opacity 2.4s ease, transform 2.4s ease;
  filter: drop-shadow(0 0 60px rgba(212,175,122,0.45));
}
.logo-img.is-show {
  opacity: 1; transform: scale(1);
  animation: logo-glow 4s ease-in-out 2.4s infinite;
}
@keyframes logo-glow {
  0%, 100% { filter: drop-shadow(0 0 60px rgba(212,175,122,0.4)); }
  50%      { filter: drop-shadow(0 0 90px rgba(212,175,122,0.7)); }
}

/* ============ P7: Branch buttons ============ */
.branch {
  position: fixed;
  left: 0; right: 0;
  bottom: clamp(8vh, 12vh, 16vh);
  display: flex; gap: 16px;
  justify-content: center; flex-wrap: wrap;
  padding: 0 20px;
  z-index: 10;
  pointer-events: none;
}
.branch.is-show { pointer-events: auto; }
.branch-btn {
  opacity: 0;
  transform: translateY(20px);
  display: inline-flex; flex-direction: column;
  align-items: center; gap: 4px;
  min-width: 200px;
  padding: 18px 32px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.32);
  color: #fff;
  font-family: var(--body);
  backdrop-filter: blur(8px);
  transition: opacity 0.8s ease, transform 0.8s ease,
              background 0.3s ease, border-color 0.3s ease;
}
.branch.is-show .branch-btn { opacity: 1; transform: translateY(0); }
.branch.is-show .branch-btn:nth-child(1) { transition-delay: 0s; }
.branch.is-show .branch-btn:nth-child(2) { transition-delay: 0.12s; }
.branch.is-show .branch-btn:nth-child(3) { transition-delay: 0.24s; }
.branch-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
  transform: translateY(-3px);
}
.branch-btn__main {
  font-family: var(--title); font-weight: 500;
  font-size: 13px; letter-spacing: 0.24em;
  text-transform: uppercase;
}
.branch-btn__icon { display: inline-block; margin-right: 4px; }
.branch-btn__sub {
  font-family: var(--display-kr); font-weight: 300;
  font-size: 11px; color: rgba(255,255,255,0.6);
  letter-spacing: 0.04em;
}
.branch-btn__arrow { display: inline-block; margin-left: 2px; }
.branch-btn--primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #14141A;
  box-shadow: 0 4px 24px rgba(212,175,122,0.2);
}
.branch-btn--primary .branch-btn__sub { color: rgba(0,0,0,0.55); }
.branch-btn--primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  box-shadow: 0 6px 32px rgba(212,175,122,0.35);
}

/* ============ noscript fallback ============ */
.noscript-fallback {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  background: #000; color: #fff;
  text-align: center; padding: 40px;
}
.ns-logo {
  font-family: var(--title); font-size: clamp(28px, 5vw, 48px);
  letter-spacing: 0.32em; margin-bottom: 28px;
}
.ns-poem {
  font-family: var(--display-en); font-style: italic;
  font-size: clamp(16px, 2.2vw, 22px); max-width: 640px;
  margin-bottom: 44px; color: rgba(255,255,255,0.85);
}
.ns-cta { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.ns-btn {
  padding: 14px 28px;
  border: 1px solid #fff;
  color: #fff;
  font-family: var(--title); font-size: 13px;
  letter-spacing: 0.24em; text-transform: uppercase;
}
.ns-btn--primary { background: var(--gold); border-color: var(--gold); color: #000; }

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  .layer { transition: opacity 0.3s ease; }
  .poem-line, .poem-title, .tear-hook, .tear-lyric, .tlb-line, .scl-line,
  .stage-copy__head, .logo-img, .branch-btn {
    transition: opacity 0.3s ease !important;
    transform: none !important;
    animation: none !important;
  }
  .layer.is-active .concert-img { animation: none; transform: scale(1.04); }
  .topbar__btn--skip { animation: none; }
  .bgm-prompt.is-show { animation: none; }
  .logo-img.is-show { animation: none; }
}

/* ============ Responsive ============ */
@media (max-width: 720px) {
  .topbar { padding: 12px 16px; }
  .topbar__brand { font-size: 13px; }
  .topbar__brand-img { width: 32px; height: 32px; }
  .topbar__right { gap: 8px; }
  .lang-chip { padding: 4px 7px; font-size: 9px; }
  .topbar__btn { padding: 6px 10px; font-size: 9px; letter-spacing: 0.16em; }

  .stage { position: fixed; inset: 0; overflow: hidden; }
  .layer { width: 100%; height: 100%; }

  .universe-video, .concert-img { object-fit: cover; }

  .poem-layer { padding: 0 5vw; }
  .poem-line { font-size: clamp(13px, 4vw, 16px); margin-bottom: 0.9em; }
  .poem-title { font-size: clamp(14px, 5vw, 18px); }

  .tear-overlay { bottom: 13vh; padding: 0 5vw; }
  .tear-lyric-block { margin-top: 1.1em; }
  .stage-copy { bottom: 8vh; padding: 0 5vw; }
  .stage-copy__campaign { letter-spacing: 0.1em; }
  .stage-copy__lyric { margin-top: 1.1em; }

  .branch { bottom: 6vh; gap: 10px; flex-direction: column; align-items: center; width: 90%; max-width: 280px; }
  .branch-btn { width: 100%; min-width: unset; padding: 12px 20px; font-size: 12px; }
  .branch-btn__main { font-size: 14px; letter-spacing: 0.12em; }
  .branch-btn__sub { font-size: 10px; }

  .bgm-prompt { top: auto; bottom: 20px; right: 12px; left: 12px; padding: 12px 16px; font-size: 11px; }
}

@media (max-width: 480px) {
  .topbar { padding: 10px 12px; }
  .topbar__brand { font-size: 11px; gap: 8px; }
  .topbar__brand-img { width: 28px; height: 28px; }
  .topbar__right { gap: 6px; }
  .lang-chips { padding: 2px; gap: 1px; }
  .lang-chip { padding: 3px 6px; font-size: 8px; }
  .topbar__btn { padding: 5px 8px; font-size: 8px; }

  .poem-layer { padding: 0 4vw; }
  .poem-line { font-size: clamp(12px, 3.5vw, 14px); margin-bottom: 0.8em; }
  .poem-title { font-size: clamp(12px, 4.5vw, 15px); }

  .tear-overlay { bottom: 11vh; padding: 0 4vw; }
  .stage-copy { bottom: 7vh; padding: 0 4vw; }

  .branch { bottom: 4vh; gap: 8px; width: 95%; max-width: 260px; }
  .branch-btn { padding: 10px 16px; font-size: 11px; }
  .branch-btn__main { font-size: 12px; letter-spacing: 0.10em; }
  .branch-btn__sub { font-size: 9px; }

  .bgm-prompt { bottom: 16px; right: 10px; left: 10px; padding: 10px 14px; font-size: 10px; }
}
