:root {
  --black: #080807;
  --ink: #11100d;
  --paper: #f4efe6;
  --muted: #bdb5a7;
  --dim: #82796d;
  --orange: #f15a24;
  --gold: #d7b56d;
  --line: rgba(244, 239, 230, 0.14);
  --line-strong: rgba(244, 239, 230, 0.26);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: 7vw;
}
* { box-sizing: border-box; }
html {
  background: var(--black);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(1200px 760px at 72% 26%, #100f0d 0%, var(--black) 68%);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  line-height: 1.62;
  word-break: keep-all;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
em { font-style: normal; color: var(--orange); }

/* 상단 스크림 — 스크롤되는 카피가 고정 탑바와 충돌하지 않게 위쪽을 가린다 */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; height: 96px;
  z-index: 30;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--black) 14%, rgba(8, 8, 7, 0.82) 46%, transparent 100%);
}

/* ---------- top bar (minimal) ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--pad);
  pointer-events: none;
}
.topbar a { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 26px; height: 26px; border-radius: 4px; display: block; }
.brand-eyebrow {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: var(--muted);
}
.top-link {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: var(--dim);
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  transition: color 180ms ease, border-color 180ms ease;
}
.top-link:hover { color: var(--paper); border-color: var(--line-strong); }

/* ---------- journey ---------- */
.journey { position: relative; }

.stage {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 var(--pad);
  z-index: 0;
  pointer-events: none;
}
.figure {
  width: auto;
  height: min(72svh, 540px);
  max-width: 46vw;
  overflow: visible;
}

/* 비트를 sticky 무대 위로 겹쳐 올려, 인물이 핀 고정된 채 카피가 스크롤되게 한다 */
.beats { position: relative; z-index: 1; margin-top: -100svh; }
.beat {
  min-height: 82svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8svh var(--pad);
  padding-right: 46vw;            /* keep copy left of the figure on desktop */
}
.beat:first-child { min-height: 92svh; }

.eyebrow {
  margin: 0 0 18px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px; font-weight: 850; letter-spacing: 0.16em; color: var(--gold);
}
.beat-h {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(30px, 5vw, 62px);
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.beat-p {
  max-width: 30rem;
  margin: 22px 0 0;
  font-size: clamp(15px, 1.7vw, 18px);
  font-weight: 600;
  color: var(--muted);
}
.scroll-hint {
  margin: 40px 0 0;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px; font-weight: 800; letter-spacing: 0.04em; color: var(--dim);
  display: inline-flex; align-items: center; gap: 10px;
}
.scroll-hint::before {
  content: ""; width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent);
}

/* operator confession + photo */
.beat-photo { padding-right: 46vw; }
.confession {
  margin: 0 0 28px;
  width: min(300px, 70%);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 2px;
  border-top: 1px solid var(--gold);
  position: relative;
}
.confession img {
  width: 100%; height: 100%; display: block; object-fit: cover;
  filter: grayscale(1) contrast(1.12) brightness(0.92);
}
.confession::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(150deg, rgba(215,181,109,0.2), rgba(241,90,36,0.06) 55%, transparent);
  mix-blend-mode: color;
}
.confession figcaption {
  position: absolute; left: 14px; bottom: 12px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px; font-weight: 800; color: var(--paper);
  text-shadow: 0 2px 14px rgba(0,0,0,0.7);
}

/* wordmark reveal: 런 → 런 */
.beat-wordmark { align-items: flex-start; }
.wordmark {
  display: flex; align-items: center; gap: clamp(14px, 3vw, 40px);
  margin: 0;
  font-size: clamp(72px, 16vw, 180px);
  font-weight: 950; line-height: 0.92; letter-spacing: -0.03em;
}
.wordmark .arrow { color: var(--orange); font-weight: 800; }
.wordmark-foot {
  margin: 18px 0 0;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(12px, 1.4vw, 15px); font-weight: 750; letter-spacing: 0.04em; color: var(--dim);
}
.beat-wordmark .beat-p { margin-top: 24px; font-weight: 750; color: var(--paper); }

/* action / terminal */
.beat-action .beat-h { font-size: clamp(26px, 3.5vw, 44px); max-width: 16ch; line-height: 1.16; }
.terminal {
  margin: 30px 0 6px;
  width: min(440px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(8, 8, 7, 0.9);
  overflow: hidden;
}
.term-bar { display: flex; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(244,239,230,0.18); }
.term-body {
  margin: 0; padding: 18px 16px 22px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(16px, 2.2vw, 22px); font-weight: 700; color: var(--paper);
  white-space: pre-wrap;
}
.term-prompt { color: var(--gold); }
.term-type { color: var(--paper); }
.term-cursor { color: var(--orange); animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* ---------- handoff ---------- */
.handoff {
  position: relative;
  min-height: 86svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 14svh var(--pad);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--black), #100c0a);
}
.handoff-h {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(30px, 4.6vw, 56px);
  font-weight: 950; line-height: 1.1; letter-spacing: -0.01em;
}
.handoff .beat-p { margin-top: 22px; }
.handoff-cta { margin-top: 36px; }
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 30px;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: 4px;
  font-size: 16px; font-weight: 900;
  transition: background 200ms ease, color 200ms ease, transform 200ms ease;
}
.cta:hover { background: var(--gold); color: var(--ink); transform: translateY(-2px); }
.back-top { margin-top: 26px; color: var(--dim); font-size: 14px; font-weight: 700; }
.back-top:hover { color: var(--paper); }

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 760ms var(--ease), transform 760ms var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: 70ms; }
.reveal:nth-child(3) { transition-delay: 140ms; }
.reveal:nth-child(4) { transition-delay: 210ms; }

/* ---------- mobile: figure behind, copy over a scrim ---------- */
@media (max-width: 860px) {
  :root { --pad: 24px; }
  .stage { justify-content: center; }
  .figure { max-width: 86vw; height: min(60svh, 460px); opacity: 0.3; }
  .beat, .beat-photo { padding-right: var(--pad); }
  .beat::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: 0;
    z-index: -1; pointer-events: none;
    background: radial-gradient(120% 70% at 30% 50%, rgba(8,8,7,0.82) 0%, rgba(8,8,7,0.5) 55%, transparent 100%);
  }
  .beat { position: relative; }
  .beat-h, .beat-p { text-shadow: 0 2px 20px rgba(8,8,7,0.85); }
  .confession { width: min(220px, 60%); }
  .wordmark { font-size: clamp(58px, 22vw, 120px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .term-cursor { animation: none; }
  *, *::before, *::after { transition-duration: 0.001ms !important; }
}
