:root {
  --bronze: #2b2621;
  --bronze-2: #37312a;
  --ivory: #f3ede1;
  --sub: #beb3a1;
  --rule: rgba(243, 237, 225, .15);
  --lamp: #ffb760;
  --logo-dot: #c98f45;
  --pad: clamp(16px, 4vw, 56px);
  --serif: "Hahmlet", "Noto Serif KR", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y mandatory; }
body {
  margin: 0; background: #0c0d10; color: var(--ivory);
  font-family: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px; line-height: 1.65; word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
#stage:active { cursor: grabbing; }
/* 글이 놓이는 쪽만 살짝 눌러 읽히게 한다 */
.shade { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(8, 8, 10, .5), rgba(8, 8, 10, 0) 46%); }

.led { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #6d655a; flex: none; transition: background-color .25s, box-shadow .25s; }
.top { position: fixed; inset: 0 0 auto 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 14px var(--pad); pointer-events: none; }
.top > * { pointer-events: auto; }
.mark { display: inline-flex; color: var(--ivory); filter: drop-shadow(0 1px 8px rgba(0, 0, 0, .55)); }
.logo { height: 26px; width: auto; display: block; }
.logo .dot { fill: var(--logo-dot); }
/* 첫 접속: 모델과 텍스처를 받는 동안 덮어 둔다 */
#loader { position: fixed; inset: 0; z-index: 20; background: #0c0d10; color: var(--ivory); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; transition: opacity .6s; }
#loader.done { opacity: 0; pointer-events: none; }
#loader .logo { height: 46px; }
#loader .bar { width: min(220px, 56vw); height: 2px; background: var(--rule); }
#loader .bar i { display: block; height: 100%; width: 0; background: var(--logo-dot); transition: width .25s; }
#loader p { margin: 0; font-size: 14px; color: var(--sub); font-variant-numeric: tabular-nums; }
nav { display: flex; gap: clamp(10px, 2vw, 26px); align-items: center; font-size: 15px; font-weight: 500; }
nav a { color: var(--ivory); text-decoration: none; padding: 8px 2px; text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }
nav a.cta, .snd { white-space: nowrap; }
.more { margin: 26px 0 0; }
nav a.insta { display: inline-flex; padding: 8px; }
nav a.insta svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .6)); }
nav a.insta .fill { fill: currentColor; stroke: none; }
nav a.insta:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
nav a.cta { background: var(--bronze); border: 1px solid var(--rule); padding: 8px 16px; border-radius: 4px; text-shadow: none; }

main { position: relative; z-index: 2; pointer-events: none; }
/* 장면 하나가 화면 하나. 스크롤은 장면마다 멈춘다 */
section { height: 100vh; height: 100svh; padding: 0 var(--pad); display: flex; scroll-snap-align: start; scroll-snap-stop: always; }
section > * { pointer-events: auto; }
.copy { padding-top: clamp(96px, 20vh, 190px); max-width: 31rem; text-shadow: 0 2px 22px rgba(0, 0, 0, .65); }
h1 { font-family: var(--serif); font-size: clamp(34px, 4.7vw, 64px); line-height: 1.22; letter-spacing: -.035em; font-weight: 500; margin: 0 0 22px; }
.copy p { color: #ded5c6; font-size: clamp(16px, 1.3vw, 18.5px); max-width: 27rem; margin: 0 0 30px; }
.enter { display: inline-flex; align-items: center; gap: 12px; color: var(--ivory); font-weight: 500; text-decoration: none; border-bottom: 1px solid rgba(243, 237, 225, .55); padding-bottom: 5px; }
.doors { display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: center; }
.enter.quiet { color: #d0c6b6; border-bottom-color: rgba(243, 237, 225, .25); font-weight: 400; }
.snd { font: inherit; font-size: 14px; font-weight: 500; color: var(--ivory); background: rgba(12, 13, 16, .45); border: 1px solid var(--rule); border-radius: 4px; padding: 8px 12px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.snd[aria-pressed="true"] .led { background: var(--lamp); box-shadow: 0 0 9px var(--lamp); }
/* 자동 재생 단추: 세모는 재생, 네모는 멈춤 */
.tour .play { width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent var(--ivory); }
.tour[aria-pressed="true"] .play { width: 9px; height: 9px; border: 0; background: var(--lamp); }
.tour[aria-pressed="true"] { border-color: rgba(255, 183, 96, .65); }
button.enter { font: inherit; background: none; border: 0; border-bottom: 1px solid rgba(243, 237, 225, .25); border-radius: 0; cursor: pointer; padding: 0 0 5px; }
.snd:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
.closing h2 { font-family: var(--serif); font-size: clamp(28px, 3.5vw, 46px); line-height: 1.26; letter-spacing: -.035em; font-weight: 500; margin: 0 0 16px; }
.apply { display: inline-block; background: var(--ivory); color: #241f1a; font-weight: 600; font-size: 17px; padding: 15px 26px; border-radius: 4px; text-decoration: none; text-shadow: none; }
.closing small { display: block; color: var(--sub); font-size: 14px; margin-top: 12px; min-height: 1.5em; }

/* 벽에 붙는 키패드처럼: 짙은 금속판, 얇게 나뉜 단추, 켜지면 불이 드는 점 */
.pad {
  align-self: center;
  width: min(392px, 100%); padding: 26px 24px 22px;
  background: linear-gradient(170deg, var(--bronze-2), var(--bronze)); color: var(--ivory);
  border: 1px solid rgba(243, 237, 225, .1); border-radius: 6px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.pad h2 { font-family: var(--serif); font-size: 24px; line-height: 1.34; letter-spacing: -.03em; font-weight: 500; margin: 0 0 10px; }
.pad p { margin: 0 0 18px; color: var(--sub); font-size: 15.5px; }

.keys { display: grid; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; margin-bottom: 14px; }
.keys.cols { grid-auto-flow: column; grid-auto-columns: 1fr; }
.key {
  font: inherit; font-weight: 500; font-size: 15px; color: var(--ivory); background: transparent; border: 0;
  display: flex; align-items: center; gap: 11px; padding: 13px 14px; min-height: 50px; text-align: left; cursor: pointer;
  border-top: 1px solid var(--rule); -webkit-tap-highlight-color: transparent; transition: background-color .15s;
}
.key:first-child { border-top: 0; }
.keys.cols .key { border-top: 0; border-left: 1px solid var(--rule); justify-content: center; gap: 8px; padding: 13px 6px; }
.keys.cols .key:first-child { border-left: 0; }
.key span { flex: 1; }
.keys.cols .key span { flex: none; }
.key b { font-weight: 400; font-size: 13.5px; color: var(--sub); font-variant-numeric: tabular-nums; }
.key:active { background: rgba(0, 0, 0, .22); }
.key[aria-pressed="true"], .key.busy { background: rgba(255, 183, 96, .09); }
.key[aria-pressed="true"] .led, .key.busy .led { background: var(--lamp); box-shadow: 0 0 9px var(--lamp); }
.key[disabled] { cursor: default; }
.key:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
/* 누르는 것임이 보이게: 단추마다 테두리와 볼록한 면, 올리면 밝아지고 누르면 들어간다 */
.keys, .keys.cols { border: 0; border-radius: 0; overflow: visible; gap: 6px; }
.keys .key, .keys.cols .key, .keys .key:first-child, .keys.cols .key:first-child {
  border: 1px solid rgba(243, 237, 225, .26); border-radius: 6px; background: rgba(243, 237, 225, .07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 2px 0 rgba(0, 0, 0, .35);
}
.keys .key:hover:not([disabled]) { background: rgba(243, 237, 225, .14); }
.keys .key:active:not([disabled]) { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.keys .key[aria-pressed="true"], .keys .key.busy { background: rgba(255, 183, 96, .2); border-color: rgba(255, 183, 96, .65); }
.keys .key[disabled] { box-shadow: none; border-style: dashed; }
/* 조명 단추 오른쪽의 스위치 */
.key[data-light]::after { content: ""; flex: none; width: 36px; height: 20px; border-radius: 10px; background: rgba(243, 237, 225, .2) radial-gradient(circle at 10px 10px, #f3ede1 0 7px, transparent 7.5px); }
.key[data-light][aria-pressed="true"]::after { background: #d98f3a radial-gradient(circle at 26px 10px, #fff7ea 0 7px, transparent 7.5px); }
input[type="range"] { cursor: pointer; }
/* 이 장면이 스스로 움직이는지, 직접 눌러 보는지 */
.pad .mode { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-size: 13px; color: var(--sub); line-height: 1.4; }
.mode b { flex: none; font-weight: 600; font-size: 12px; padding: 3px 9px; border-radius: 99px; }
.mode.auto b { color: var(--ivory); border: 1px solid rgba(243, 237, 225, .45); }
.mode.hand b { color: #241f1a; background: var(--lamp); border: 1px solid var(--lamp); }
.rail { position: fixed; z-index: 5; right: 14px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; }
.rail a { display: block; width: 18px; height: 18px; padding: 0; position: relative; }
.rail a::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: rgba(243, 237, 225, .4); box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.rail a.on::after { inset: 4px; background: var(--lamp); }

.slide { display: grid; grid-template-columns: 4.4em 1fr 5.6em; align-items: center; gap: 10px; font-weight: 500; font-size: 14.5px; padding: 5px 0; }
.slide output { text-align: right; color: var(--sub); font-size: 13.5px; font-variant-numeric: tabular-nums; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: rgba(243, 237, 225, .34); }
input[type="range"]::-moz-range-track { height: 2px; background: rgba(243, 237, 225, .34); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 26px; margin-top: -12px; border-radius: 2px; background: var(--ivory); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
input[type="range"]::-moz-range-thumb { width: 12px; height: 26px; border: 0; border-radius: 2px; background: var(--ivory); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
/* 두 LED 채널이 지금 얼마나 켜져 있는지 */
.mix { display: grid; gap: 7px; border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 8px; }
.ch { display: grid; grid-template-columns: 6.2em 1fr 3em; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; }
.ch i { display: block; height: 6px; background: rgba(243, 237, 225, .12); border-radius: 3px; overflow: hidden; }
.ch i b { display: block; height: 100%; width: 0; border-radius: 3px; }
.ch.ww i b { background: #ffb463; }
.ch.cw i b { background: #e6f0ff; }
.ch output { text-align: right; color: var(--sub); font-variant-numeric: tabular-nums; }
/* 시계: 지금이 하루 중 언제인지 한눈에 */
.clockrow { display: flex; align-items: center; gap: 16px; margin: 4px 0 8px; }
.clockrow svg { flex: none; width: 88px; height: 88px; }
.clockrow > div { flex: 1; min-width: 0; }
.clockrow output { display: block; font-family: var(--serif); font-size: 24px; color: var(--ivory); font-variant-numeric: tabular-nums; }
#clock .face { fill: #f3ede1; stroke: rgba(0, 0, 0, .35); stroke-width: 2; transition: fill .6s; }
#clock line { stroke: #2a2420; stroke-width: 2; stroke-linecap: round; transition: stroke .6s; }
#clock .hand.h { stroke-width: 5; }
#clock .hand.m { stroke-width: 3; }
#clock .pin { fill: #d98f3a; }
#clock.night .face { fill: #1d2233; stroke: rgba(243, 237, 225, .4); }
#clock.night line { stroke: #f3ede1; }
.readout { flex-wrap: wrap; row-gap: 2px; }
.readout { display: flex; align-items: baseline; gap: 14px; margin: 2px 0 0 !important; }
.readout b { font-family: var(--serif); font-size: 26px; font-weight: 500; color: var(--ivory); font-variant-numeric: tabular-nums; }
.readout span { font-size: 14px; }
/* 블라인드가 움직이는 조건 세 줄. 지금 걸린 줄만 밝다. 왼쪽 네모는 내려온 만큼 채운 창 */
.rules { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--rule); }
.rules li { display: grid; grid-template-columns: 14px 5.4em 1fr; gap: 10px; align-items: center; padding: 4px 0; font-size: 14px; line-height: 1.4; color: #8f8676; transition: color .4s; }
.rules b { font-weight: 600; }
.rules .lv { width: 14px; height: 16px; border: 1px solid currentColor; display: block; position: relative; }
.rules .lv::before { content: ""; position: absolute; inset: 0 0 auto 0; height: var(--lv); background: currentColor; opacity: .75; }
.rules li.on { color: var(--ivory); }
.rules li.on .lv { color: var(--lamp); }
.status { margin: 0 !important; font-size: 14px !important; color: var(--ivory) !important; border-top: 1px solid var(--rule); padding-top: 12px; min-height: 3.2em; }

.steps { margin: 4px 0 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 1.8em 3.2em 1fr; gap: 6px; padding: 12px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.steps li::before { content: counter(s); font-family: var(--serif); color: var(--lamp); }
.steps b { font-weight: 600; }
.steps span { color: var(--sub); }

footer { scroll-snap-align: end; position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 22px var(--pad) 30px; font-size: 13.5px; color: var(--sub); font-weight: 600; background: rgba(12, 13, 16, .7); }
footer span { font-weight: 400; }
footer a { color: inherit; margin-left: auto; }

@media (max-width: 820px) {
  .shade { background: linear-gradient(180deg, rgba(8, 8, 10, .5), rgba(8, 8, 10, 0) 38%); }
  section { flex-direction: column; justify-content: flex-end; padding-bottom: 12px; }
  .hero { justify-content: flex-start; padding-bottom: 0; }
  .rail { right: 2px; }
  .pad .mode { margin-bottom: 8px; }
  .copy { padding-top: 88px; }
  .copy p { font-size: 15.5px; margin-bottom: 22px; }
  .pad { align-self: stretch; width: auto; padding: 16px 15px 14px; }
  .pad h2 { font-size: 20px; margin-bottom: 6px; }
  .pad p { font-size: 14.5px; margin-bottom: 11px; line-height: 1.5; }
  .keys { margin-bottom: 8px; }
  .key { min-height: 46px; padding: 10px 12px; }
  .status { min-height: 2.9em; padding-top: 9px; }
  .steps li { padding: 8px 0; }
  nav a:not(.cta):not(.insta) { display: none; }
  nav { gap: 5px; }
  nav a.cta { padding: 7px 10px; font-size: 13px; }
  nav a.insta { padding: 6px; }
  .logo { height: 22px; }
  .snd { padding: 7px 10px; font-size: 13px; }
  .tour span { display: none; }
  .tour { padding: 10px 11px; }
  .mix { padding-top: 8px; margin-top: 4px; gap: 4px; }
  .readout b { font-size: 21px; }
  .rules { margin-top: 6px; padding-top: 5px; }
  .rules li { font-size: 13px; padding: 2px 0; gap: 8px; grid-template-columns: 14px 4.9em 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .led, .key, #loader, #loader .bar i, .rules li { transition: none; } }

/* 소개 페이지: 3D 없이 글만 */
html:has(body.about) { scroll-snap-type: none; }
body.about { background: #14120f; }
body.about .top { position: static; }
.about-main { pointer-events: auto; max-width: 46rem; padding: clamp(40px, 9vh, 96px) var(--pad) 96px; }
.about-main h1 { margin-bottom: 28px; }
.about-main .lead { color: #ded5c6; font-size: clamp(16px, 1.3vw, 18.5px); max-width: 34rem; margin: 0 0 56px; }
.people { margin: 0 0 56px; border-top: 1px solid var(--rule); }
.people div { display: grid; grid-template-columns: 7rem 1fr; gap: 8px 24px; padding: 22px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.people dt { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.people dd { margin: 0; color: #ded5c6; }
nav a[aria-current="page"] { border-bottom: 1px solid var(--logo-dot); }
@media (max-width: 560px) { .people div { grid-template-columns: 1fr; } }
