/* ===================================================================
   소유의 박물관 — Design tokens
   Palette: cold gray-white / steel-blue / slate / silver / void
   =================================================================== */

:root {
  --bg: #F0F2F3;
  --bg-panel: #E4E8EA;
  --bg-panel-2: #DADFE2;
  --ink: #13181C;
  --ink-soft: #4E5A63;
  --ink-faint: #8B969D;
  --steel: #45607C;
  --steel-deep: #2B3B4C;
  --slate: #262E35;
  --silver: #AEB8BE;
  --silver-line: rgba(19, 24, 28, 0.14);
  --void: #0A0D10;
  --void-ink: #C7CDD1;
  --void-line: rgba(255, 255, 255, 0.14);

  --font-display: 'IBM Plex Sans KR', 'IBM Plex Sans', sans-serif;
  --font-body: 'IBM Plex Sans KR', 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --room-pad-x: clamp(24px, 6vw, 96px);
  --room-pad-y: clamp(64px, 12vh, 160px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

h1, h2 {
  font-family: var(--font-display);
  margin: 0;
  color: var(--ink);
}

p { margin: 0 0 1.3em 0; }
p:last-child { margin-bottom: 0; }

/* ================= progress rail ================= */

.progress-rail {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 200;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--steel);
  transition: width 0.1s linear;
}

/* ================= side nav ================= */

.room-nav {
  position: fixed;
  right: clamp(10px, 2.5vw, 28px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 150;
}

.nav-dot {
  width: 26px;
  height: 26px;
  border-radius: 2px;
  border: 1px solid var(--silver-line);
  background: transparent;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  padding: 0;
}

.nav-dot:hover {
  border-color: var(--steel);
  color: var(--steel);
}

.nav-dot.active {
  background: var(--steel);
  border-color: var(--steel);
  color: var(--bg);
}

@media (max-width: 720px) {
  .room-nav { display: none; }
}

/* ================= hero ================= */

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 6vw, 90px);
  padding: var(--room-pad-y) var(--room-pad-x);
  flex-wrap: wrap;
  position: relative;
  background:
    linear-gradient(180deg, var(--bg) 0%, var(--bg-panel) 100%);
}

.hero-vitrine {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.vitrine-svg {
  width: clamp(140px, 20vw, 220px);
  height: auto;
  overflow: visible;
}

.vitrine-frame {
  fill: none;
  stroke: var(--steel-deep);
  stroke-width: 1.4;
}

.vitrine-shelf {
  stroke: var(--silver-line);
  stroke-width: 1;
}

.vitrine-fill {
  fill: var(--steel);
  opacity: 0.55;
  transform-origin: bottom;
  animation: vitrine-breathe 7s ease-in-out infinite;
}

@keyframes vitrine-breathe {
  0%   { height: 4px;  y: 216; opacity: 0.35; }
  38%  { height: 96px; y: 124; opacity: 0.6; }
  60%  { height: 70px; y: 150; opacity: 0.45; }
  100% { height: 4px;  y: 216; opacity: 0.35; }
}

.vitrine-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.hero-copy {
  flex: 1 1 420px;
  max-width: 640px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0 0 22px 0;
}

.hero-title {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.01em;
}

.hero-sub {
  margin-top: 28px;
  font-size: clamp(0.98rem, 1.5vw, 1.08rem);
  color: var(--ink-soft);
  max-width: 52ch;
  font-weight: 300;
}

.hero-enter {
  margin-top: 36px;
  background: none;
  border: 1px solid var(--steel-deep);
  color: var(--steel-deep);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 12px 22px;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: all 0.25s ease;
}

.hero-enter:hover {
  background: var(--steel-deep);
  color: var(--bg);
}

/* ================= rooms ================= */

.room {
  padding: var(--room-pad-y) var(--room-pad-x);
  border-top: 1px solid var(--silver-line);
  position: relative;
}

.room:nth-of-type(odd) {
  background: var(--bg);
}
.room:nth-of-type(even) {
  background: var(--bg-panel);
}

.room-inner {
  max-width: 760px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.room-inner.in-view {
  opacity: 1;
  transform: translateY(0);
}

.room-label {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--silver-line);
}

.room-number {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--steel);
  white-space: nowrap;
}

.room-name {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.room-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 34px;
  max-width: 22ch;
}

.room-text {
  font-size: 1.02rem;
  color: var(--ink);
  font-weight: 350;
}

.room-text p {
  max-width: 62ch;
}

.room-quote {
  margin: 44px 0;
  padding: 22px 0 22px 24px;
  border-left: 2px solid var(--steel);
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--steel-deep);
  max-width: 50ch;
  font-style: normal;
}

.room-fact {
  margin-top: 40px;
  padding: 22px 26px;
  background: var(--bg-panel-2);
  border: 1px solid var(--silver-line);
}

.room:nth-of-type(even) .room-fact {
  background: var(--bg);
}

.fact-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--steel);
  margin-bottom: 10px;
}

.room-fact p {
  font-size: 0.94rem;
  color: var(--ink-soft);
  margin: 0;
  max-width: 58ch;
}

/* ================= void rooms (09 + conclusion) ================= */

.room--void {
  background: var(--void) !important;
  color: var(--void-ink);
  border-top: 1px solid var(--void-line);
}

.room--void .room-label { border-bottom-color: var(--void-line); }
.room--void .room-number { color: var(--silver); }
.room--void .room-name { color: var(--void-ink); opacity: 0.7; }
.room--void .room-title { color: #F4F5F6; }
.room--void .room-text { color: var(--void-ink); }
.room--void .room-quote {
  border-left-color: var(--silver);
  color: #F4F5F6;
}
.room--void .room-fact {
  background: rgba(255,255,255,0.04);
  border-color: var(--void-line);
}
.room--void .fact-label { color: var(--silver); }
.room--void .room-fact p { color: var(--void-ink); }

.room-inner--conclusion {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.closing-vitrine {
  margin-top: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.closing-svg {
  width: min(100%, 320px);
  height: auto;
}

.closing-frame {
  fill: none;
  stroke: var(--silver);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.closing-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--void-ink);
  text-transform: uppercase;
  opacity: 0.6;
}

/* ================= fact source lines ================= */

.fact-source {
  margin-top: 12px !important;
  font-family: var(--font-mono);
  font-size: 11.5px !important;
  letter-spacing: 0.03em;
  color: var(--ink-faint) !important;
  max-width: none !important;
}

.room--void .fact-source { color: var(--silver) !important; }

/* ================= references section ================= */

.references {
  background: var(--bg-panel);
  border-top: 1px solid var(--silver-line);
  padding: var(--room-pad-y) var(--room-pad-x);
}

.references-inner {
  max-width: 760px;
  margin: 0 auto;
}

.references-title {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-deep);
  margin: 0 0 18px 0;
}

.references-note {
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 60ch;
  margin-bottom: 30px;
}

.references-list {
  padding-left: 22px;
  margin: 0;
}

.references-list li {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--ink);
  line-height: 1.7;
  margin-bottom: 14px;
  max-width: 66ch;
}

.references-list em {
  font-style: italic;
  color: var(--steel-deep);
}

/* ================= footer ================= */

.site-footer {
  background: var(--void);
  color: var(--void-ink);
  opacity: 0.55;
  text-align: center;
  padding: 30px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.site-footer p { margin: 0 0 8px 0; }
.site-footer p:last-child { margin-bottom: 0; }

.footer-link a {
  color: var(--silver);
  text-decoration: none;
  border-bottom: 1px solid var(--void-line);
  transition: color 0.2s ease;
}

.footer-link a:hover {
  color: var(--void-ink);
  opacity: 1;
}

/* ================= responsive ================= */

@media (max-width: 640px) {
  .hero { flex-direction: column-reverse; text-align: left; }
  .room-title { max-width: none; }
}
