/* 미사 가라오케 꿀단지
   검은 옻칠 바탕에 금으로 그린다. 빛은 전부 꿀에서 나온다.
   옛이야기에서 물건을 빌렸다: 벽장 속 꿀단지, 열쇠, 피리, 호리병, 보물지도.
   움직임의 주제는 하나, "열린다"다. 뚜껑이 열리고, 벽장 문이 열리고, 글자에 꿀이 찬다. */

:root {
  --black: #000;
  --lacquer: #0C0805;    /* 옻칠: 검정 위에 살짝 뜨는 면 */
  --honey: #F5A300;      /* 꿀 */
  --honey-hi: #FFB81C;   /* 꿀 수면 */
  --honey-lo: #E98F00;   /* 꿀 바닥 */
  --nectar: #FFD76A;     /* 밝은 금 */
  --glint: #FFF0C2;      /* 반짝임 */
  --amber: #B86A00;      /* 졸인 꿀 */
  --wax: #FFF4DC;        /* 밀랍: 제목 글자 */
  --soft: rgba(255, 244, 220, .84);   /* 본문 글자 */
  --ink: #1A0E02;        /* 금 위 글자 */
  --line: rgba(255, 215, 106, .26);   /* 금선 */

  --serif: "Hahmlet", "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", "Batang", serif;
  --sans: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;

  --gutter: clamp(20px, 5.2vw, 88px);
  --wrap: 1440px;
  --wave-h: clamp(46px, 7.5vw, 104px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--black);
}
html.is-menu { overflow: hidden; }

body {
  margin: 0;
  background: var(--black);
  color: var(--wax);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg, canvas, iframe { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, figure, address { margin: 0; }
address { font-style: normal; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--honey); color: var(--ink); }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; }

/* 문장 단위로 줄을 바꾼다: 한 문장이 어색한 자리에서 끊기지 않게 */
.lines span { display: block; text-wrap: balance; }
.nb { white-space: nowrap; }

:focus-visible {
  outline: 3px solid var(--nectar);
  outline-offset: 4px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--nectar);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* ── 큰 글자에 꿀이 찬다 ───────────────────────────── */

.fill { color: var(--glint); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .fill {
    padding-bottom: .08em;
    color: transparent;
    background-image: linear-gradient(180deg,
      rgba(255, 244, 220, .2) 0%, rgba(255, 244, 220, .2) 50%,
      #FFF6DC 50%, var(--glint) 64%, #FFE08A 84%, #EDB843 100%);
    background-size: 100% 200%;
    background-position: 0 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
  }
  .fill--deep {
    background-image: linear-gradient(180deg,
      rgba(255, 215, 106, .22) 0%, rgba(255, 215, 106, .22) 50%,
      var(--glint) 50%, var(--nectar) 64%, var(--honey) 84%, var(--amber) 100%);
  }
  .js .fill { background-position: 0 0; transition: background-position 1.7s cubic-bezier(.3, .7, .2, 1); }
  .js .fill.is-in, .is-late .fill { background-position: 0 100%; }
}

/* ── 버튼: 꿀 한 방울 ─────────────────────────────── */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  font: 600 16px/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }

.btn--honey {
  color: var(--ink);
  background: linear-gradient(180deg, var(--glint) 0%, var(--nectar) 22%, var(--honey) 62%, var(--honey-lo) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .7),
    inset 0 -3px 0 rgba(122, 62, 0, .3),
    0 12px 34px -10px rgba(245, 163, 0, .7);
}
.btn--honey::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .85) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform .8s var(--ease-out);
}
.btn--line {
  color: var(--wax);
  background: rgba(0, 0, 0, .4);
  box-shadow: inset 0 0 0 1.5px rgba(255, 244, 220, .6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.btn--xl { min-height: 66px; padding: 0 40px; font-size: 19px; }

@media (hover: hover) {
  .btn--honey:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -3px 0 rgba(122, 62, 0, .3), 0 18px 44px -10px rgba(245, 163, 0, .9); }
  .btn--honey:hover::after { transform: translateX(120%); }
  .btn--line:hover { box-shadow: inset 0 0 0 1.5px var(--nectar); color: var(--nectar); }
}

/* ── 작품 이름표: 액자 아래에 붙는다 ────────────────── */

.cap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  margin-top: 26px;
  padding: 2px 0 2px 14px;
  border-left: 2px solid var(--honey);
}
.cap__name { font-family: var(--serif); font-weight: 700; font-size: 17px; letter-spacing: -.01em; color: var(--wax); }
.cap__note { font-size: 14px; color: var(--soft); }

/* ── 머리띠 ─────────────────────────────────────── */

.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px var(--gutter);
  padding-top: max(14px, env(safe-area-inset-top));
  transition: background-color .45s ease, box-shadow .45s ease;
}
/* 영상의 밝은 부분 위에서도 메뉴가 읽히도록 위쪽에 그늘을 깐다 */
.top::before {
  content: "";
  position: absolute;
  inset: 0 0 -28px 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, .8) 0%, rgba(0, 0, 0, .5) 55%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
  transition: opacity .45s ease;
}
.top.is-solid::before { opacity: 0; }
.top.is-solid {
  background: rgba(0, 0, 0, .8);
  box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
}
.is-menu .top { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.is-menu .top::before { opacity: 0; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--wax);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -.02em;
  line-height: 1;
}
.brand__jar { width: 25px; height: 30px; overflow: visible; }
.brand__edge { fill: none; stroke: var(--nectar); stroke-width: 26; stroke-linejoin: round; }
/* 스크롤한 만큼 단지에 꿀이 찬다 */
.brand__fill { fill: var(--honey); transform: translateY(calc((1 - (.16 + var(--p, 0) * .84)) * 480px)); }

.top__nav { display: flex; gap: clamp(18px, 2.4vw, 36px); margin-left: auto; }
.top__nav a {
  padding: 8px 2px;
  color: var(--wax);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  background: linear-gradient(var(--nectar), var(--nectar)) 0 100% / 0 2px no-repeat;
  transition: background-size .4s var(--ease-out), color .3s;
}
@media (hover: hover) {
  .top__nav a:hover { color: var(--nectar); background-size: 100% 2px; }
}
.top__call { min-height: 44px; padding: 0 20px; font-size: 15px; }

.top__menu {
  position: relative;
  display: none;
  flex: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .4);
  box-shadow: inset 0 0 0 1.5px rgba(255, 244, 220, .6);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.top__menu span {
  position: absolute;
  left: 14px;
  right: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--wax);
  transition: transform .45s var(--ease-out);
}
.top__menu span:first-child { top: 18px; }
.top__menu span:last-child { top: 26px; }
.top__menu[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.top__menu[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 760px) {
  .top { gap: 10px; }
  .top__nav { display: none; }
  .top__call { margin-left: auto; }
  .top__menu { display: block; }
}

/* 펼친 메뉴(모바일) */
.menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(96px + env(safe-area-inset-top)) var(--gutter) calc(36px + env(safe-area-inset-bottom));
  background: var(--black);
  overflow: auto;
  opacity: 0;
  transition: opacity .35s ease;
}
.menu[hidden] { display: none; }
.menu.is-open { opacity: 1; }
.menu::before {            /* 바닥에서 올라오는 꿀빛. 상자 밖으로 나가면 스크롤이 생기므로 안에 둔다 */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 62%;
  background: radial-gradient(90% 78% at 50% 100%, rgba(245, 163, 0, .38), rgba(245, 163, 0, 0) 70%);
  pointer-events: none;
}
.menu__list { position: relative; display: grid; margin: 0; padding: 0; list-style: none; }
.menu__list a {
  display: block;
  padding: 9px 0;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(38px, 11.6vw, 60px);
  line-height: 1.15;
  letter-spacing: -.04em;
  color: var(--wax);
  text-decoration: none;
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity .55s ease, transform .8s var(--ease-out);
}
.menu.is-open .menu__list a { opacity: 1; transform: none; }
.menu.is-open .menu__list li:nth-child(2) a { transition-delay: .05s; }
.menu.is-open .menu__list li:nth-child(3) a { transition-delay: .1s; }
.menu.is-open .menu__list li:nth-child(4) a { transition-delay: .15s; }
.menu.is-open .menu__list li:nth-child(5) a { transition-delay: .2s; color: var(--nectar); }
.menu__foot {
  position: relative;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.7;
  color: var(--soft);
}

/* ── 1. 금고: 단지가 열린다 ───────────────────────── */

.hero {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100vh;
  height: 100svh;
  min-height: 540px;
  overflow: hidden;
  background: var(--black);
}
.hero.is-away { visibility: hidden; }

.hero__media {
  position: absolute;
  inset: -2%;
  transform: translate3d(calc(var(--px, 0) * -14px), calc(var(--py, 0) * -9px), 0) scale(calc(1 + var(--hero-out, 0) * .07));
  transform-origin: 72% 58%;
  transition: opacity .3s ease;
  will-change: transform;
}
.hero__media.is-dim { opacity: 0; }

.hero__poster,
.hero__poster img,
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 82% 50%;   /* 화면이 좁아져도 오른쪽의 단지가 잘리지 않게 */
}
.hero__video { opacity: 0; transition: opacity .7s ease; }
.hero.is-playing .hero__video { opacity: 1; }
.hero__poster--open { opacity: 0; transition: opacity 1.4s ease; }
.hero.is-still .hero__poster--open { opacity: 1; }

.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .56) 32%, rgba(0, 0, 0, 0) 60%),
    linear-gradient(0deg, rgba(0, 0, 0, .8) 0%, rgba(0, 0, 0, 0) 30%),
    linear-gradient(180deg, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, 0) 22%);
}

.hero__dust {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 110px var(--gutter) calc(var(--wave-h) + 5vh);
  transform: translate3d(calc(var(--px, 0) * 6px), calc(var(--hero-out, 0) * -10vh), 0);
  opacity: calc(1 - var(--hero-out, 0) * 1.6);
}

.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1;
}
.hero__kicker {
  display: block;
  margin-bottom: .55em;
  font-size: clamp(19px, 2vw, 30px);
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--wax);
}
/* 글자가 가는 유리관이었다가, 꿀이 차오르며 굵어진다 */
.hero__word {
  display: block;
  width: -moz-fit-content;
  width: fit-content;
  margin-left: -.04em;
  padding: .04em .04em .1em 0;
  font-size: clamp(104px, 17.4vw, 310px);
  font-weight: 200;
  line-height: .92;
  letter-spacing: -.045em;
  color: transparent;
  background-image:
    linear-gradient(105deg, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, .8) 50%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg, rgba(255, 244, 220, .22) 0%, rgba(255, 244, 220, .22) 50%, #FFF0C2 50%, #FFD76A 60%, #F5A300 78%, #B86A00 100%);
  background-size: 250% 100%, 100% 200%;
  background-position: 100% 0, 0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  transition: font-weight 2s var(--ease-out), background-position 2.6s cubic-bezier(.3, .7, .2, 1);
}
.hero__lead {
  max-width: 29em;
  margin-top: clamp(18px, 3vh, 36px);
  font-size: clamp(16px, 1.3vw, 20px);
  font-weight: 500;
  line-height: 1.75;
  color: rgba(255, 244, 220, .92);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(22px, 3.6vh, 42px); }

/* 등장: 글자가 준비된 뒤에만 보여 준다 (js 없으면 그대로 보인다) */
.js .hero__title, .js .hero__lead, .js .hero__cta { opacity: 0; }
.js .hero__lead, .js .hero__cta { transform: translate3d(0, 14px, 0); }
.js.is-fonts .hero__title { opacity: 1; transition: opacity .9s ease; }
.js.is-ready .hero__lead,
.js.is-ready .hero__cta { opacity: 1; transform: none; transition: opacity 1s ease 1.5s, transform 1.2s var(--ease-out) 1.5s; }
.js.is-ready .hero__cta { transition-delay: 1.8s; }

.is-ready .hero__word { font-weight: 900; background-position: 100% 0, 0 100%; }
html:not(.js) .hero__word { font-weight: 900; background-position: 100% 0, 0 100%; }
.is-lit .hero__word { animation: shine 5.2s cubic-bezier(.4, 0, .2, 1) infinite; }
@keyframes shine {
  0%, 60% { background-position: 100% 0, 0 100%; }
  100% { background-position: 0% 0, 0 100%; }
}

/* 정사각형에 가까운 창(태블릿 가로 등): 글자가 단지와 겹치지 않게 한 단계 줄인다 */
@media (min-aspect-ratio: 4/5) and (max-aspect-ratio: 7/5) {
  .hero__poster, .hero__poster img, .hero__video { object-position: 76% 50%; }
  .hero__word { font-size: clamp(96px, 14.4vw, 240px); }
}

@media (max-aspect-ratio: 4/5) {
  .hero__poster, .hero__poster img, .hero__video { object-position: 50% 100%; }
  .hero__media { transform-origin: 50% 80%; }
  .hero__shade {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, .84) 0%, rgba(0, 0, 0, .5) 34%, rgba(0, 0, 0, 0) 56%),
      linear-gradient(0deg, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, 0) 20%);
  }
  .hero__content {
    justify-content: flex-start;
    padding-top: calc(88px + env(safe-area-inset-top));
  }
  .hero__word { font-size: min(29.5vw, 190px); }
  .hero__lead { max-width: 19em; }
}

/* ── 2. 단지 속: 검은 물결이 금선을 두르고 차오른다 ──── */

.inside {
  position: relative;
  z-index: 2;
  padding-bottom: clamp(150px, 17vw, 270px);
  background: var(--black);
  color: var(--wax);
}

.surface {
  --pad: 26px;                    /* 금선의 빛이 잘리지 않게 위로 둔 여백 */
  position: absolute;
  left: 0;
  right: 0;
  top: calc((var(--wave-h) + var(--pad)) * -1 + 1px);
  height: calc(var(--wave-h) + var(--pad));
  overflow: hidden;
  pointer-events: none;
  transform: scaleY(calc(1 + var(--slosh, 0) * .6));
  transform-origin: 50% 100%;
}
.surface__wave {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  max-width: none;
  height: var(--wave-h);
  overflow: visible;
  animation: drift 13s linear infinite;
  will-change: transform;
}
.surface__wave--back { width: 260%; animation-duration: 19s; animation-direction: reverse; }
.surface__wave--front { filter: drop-shadow(0 -3px 9px rgba(255, 184, 28, .6)); }
.surface__back { fill: none; stroke: rgba(255, 215, 106, .5); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.surface__fill { fill: var(--black); }
.surface__edge { fill: none; stroke: url(#g-crest); stroke-width: 2.5px; vector-effect: non-scaling-stroke; }
@keyframes drift { to { transform: translate3d(-50%, 0, 0); } }

/* 꿀빛이 어른거리는 깊이, 그리고 떠오르는 불티 */
.inside__depth { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.inside__depth::before {
  content: "";
  position: absolute;
  inset: -6% -30%;
  background:
    radial-gradient(34% 13% at 78% 9%, rgba(245, 163, 0, .2), rgba(245, 163, 0, 0) 70%),
    radial-gradient(40% 14% at 14% 36%, rgba(245, 163, 0, .15), rgba(245, 163, 0, 0) 70%),
    radial-gradient(36% 13% at 84% 60%, rgba(233, 143, 0, .15), rgba(233, 143, 0, 0) 70%),
    radial-gradient(44% 14% at 24% 88%, rgba(245, 163, 0, .17), rgba(245, 163, 0, 0) 70%);
  animation: caustic 30s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes caustic { to { transform: translate3d(4%, -2%, 0) rotate(2deg) scale(1.08); } }

.inside__depth i {
  position: absolute;
  bottom: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFF6DC 0 16%, rgba(255, 200, 80, .9) 34%, rgba(255, 184, 28, 0) 70%);
  animation: rise var(--rise, 50s) linear var(--delay, 0s) infinite, twinkle var(--tw, 3s) ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes rise {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(var(--dx, 30px), calc(var(--travel, 2400px) * -1), 0); }
}
@keyframes twinkle {
  0%, 100% { opacity: .25; }
  50% { opacity: 1; }
}

/* 옛말 */
.tale {
  position: relative;
  padding: clamp(92px, 11vw, 190px) var(--gutter) clamp(48px, 6vw, 90px);
  scroll-margin-top: 40px;
  /* 활짝 열린 벽장 문이 화면 밖으로 나가도 가로 스크롤이 생기지 않게 여기서 자른다 */
  overflow-x: hidden;
  overflow-x: clip;
}
.tale__h {
  max-width: 9.5em;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(40px, 6.6vw, 108px);
  line-height: 1.14;
  letter-spacing: -.04em;
}
.tale__p {
  max-width: 32em;
  margin-top: 1.2em;
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.85;
  color: var(--soft);
}
.tale__p--lead {
  max-width: 27em;
  margin-top: clamp(22px, 2.6vw, 40px);
  font-size: clamp(17px, 1.5vw, 23px);
  font-weight: 500;
  line-height: 1.75;
  color: var(--wax);
}

.facts {
  max-width: 40em;
  margin-top: clamp(30px, 3.6vw, 56px);
  border-top: 1px solid var(--line);
}
.facts > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt { font-size: 15px; font-weight: 500; color: var(--nectar); }
.facts dd { font-family: var(--serif); font-weight: 700; font-size: 19px; line-height: 1.3; letter-spacing: -.02em; text-align: right; }
@media (min-width: 620px) {
  .facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
  .facts > div { display: block; padding: 18px 18px 20px 0; border-bottom: 0; }
  .facts > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
  .facts dd { margin-top: 4px; font-size: clamp(19px, 1.7vw, 25px); text-align: left; }
}

/* 벽장: 화면에 들어오면 문이 열린다 */
.cabinet {
  position: relative;
  z-index: 0;
  width: min(100%, 440px);
  margin: clamp(44px, 6vw, 64px) auto clamp(20px, 3vw, 30px);
}
.cabinet__box { position: relative; aspect-ratio: 3 / 4; perspective: 1500px; }
.cabinet__box::before {            /* 문틀 */
  content: "";
  position: absolute;
  inset: -9px;
  border: 1px solid rgba(255, 215, 106, .5);
  pointer-events: none;
}
.cabinet__glow {
  position: absolute;
  inset: -24%;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 48%, rgba(245, 163, 0, .46), rgba(245, 163, 0, 0) 68%);
  opacity: 0;
  transition: opacity 1.8s ease .25s;
  pointer-events: none;
}
.cabinet__door {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 5;
  width: 50%;
  background:
    linear-gradient(180deg, #1D120A 0%, #0A0603 52%, #170E07 100%);
  transition: transform 1.5s cubic-bezier(.22, .9, .24, 1);
  will-change: transform;
}
.cabinet__door--l { left: 0; transform-origin: 0 50%; box-shadow: inset 0 0 0 1px rgba(255, 215, 106, .36), inset -2px 0 0 rgba(255, 220, 130, .95); }
.cabinet__door--r { right: 0; transform-origin: 100% 50%; box-shadow: inset 0 0 0 1px rgba(255, 215, 106, .36), inset 2px 0 0 rgba(255, 220, 130, .95); }
.cabinet__door::before {           /* 금선 테 */
  content: "";
  position: absolute;
  inset: 7% 13%;
  border: 1px solid rgba(255, 215, 106, .44);
  box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0), inset 0 0 0 6px rgba(255, 215, 106, .2);
  transition: opacity .5s ease .4s;
}
.cabinet__door::after {            /* 경첩 */
  content: "";
  position: absolute;
  top: 12%;
  bottom: 12%;
  width: 8px;
  background: linear-gradient(180deg, #E7B549 0 9%, rgba(0, 0, 0, 0) 9% 91%, #E7B549 91% 100%);
}
.cabinet__door--l::after { left: 0; }
.cabinet__door--r::after { right: 0; }
.cabinet__door i {                 /* 둥근 자물쇠 판: 두 문에 반쪽씩 */
  position: absolute;
  top: 50%;
  width: 31px;
  height: 62px;
  margin-top: -31px;
  box-shadow: 0 0 22px rgba(245, 163, 0, .55);
  transition: opacity .5s ease .4s;
}
.cabinet__door--l i { right: 0; border-radius: 62px 0 0 62px; background: radial-gradient(circle at 100% 50%, #FFF0C2 0 10%, #FFD76A 26%, #C98510 66%, #7A4A06 100%); }
.cabinet__door--r i { left: 0; border-radius: 0 62px 62px 0; background: radial-gradient(circle at 0 50%, #FFF0C2 0 10%, #FFD76A 26%, #C98510 66%, #7A4A06 100%); }

.cabinet.is-open .cabinet__glow, html:not(.js) .cabinet__glow, .is-late .cabinet__glow { opacity: 1; }
.cabinet.is-open .cabinet__door--l, html:not(.js) .cabinet__door--l, .is-late .cabinet__door--l { transform: rotateY(-114deg); }
.cabinet.is-open .cabinet__door--r, html:not(.js) .cabinet__door--r, .is-late .cabinet__door--r { transform: rotateY(114deg); transition-delay: .12s; }
.cabinet.is-open .cabinet__door::before, .cabinet.is-open .cabinet__door i { opacity: 0; }

@media (min-width: 900px) {
  .tale__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .74fr);
    column-gap: clamp(48px, 7vw, 130px);
    align-items: start;
  }
  .tale__grid > * { grid-column: 1; }
  .tale__grid > .cabinet { grid-column: 2; grid-row: 1 / span 6; align-self: center; justify-self: end; width: min(100%, 480px); margin: 12px 9px 0 0; }
}

/* 세 가지 보물 */
.trove-sec {
  position: relative;
  padding: clamp(76px, 9.5vw, 164px) var(--gutter) 0;
  scroll-margin-top: 20px;
  /* 열린 뚜껑이 화면 오른쪽 밖으로 나가도 가로 스크롤이 생기지 않게 */
  overflow-x: hidden;
  overflow-x: clip;
}
.statement { max-width: 1100px; }
.statement__h {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(36px, 6vw, 98px);
  line-height: 1.14;
  letter-spacing: -.035em;
}
.statement__p {
  max-width: 27em;
  margin-top: clamp(18px, 2.4vw, 36px);
  font-size: clamp(17px, 1.45vw, 22px);
  font-weight: 500;
  line-height: 1.7;
  color: var(--soft);
}

.trove {
  display: grid;
  gap: clamp(76px, 12vw, 100px);
  margin: clamp(64px, 9vw, 130px) 0 0;
  padding: 0;
  list-style: none;
}
.trove__name {
  margin-top: clamp(24px, 2.6vw, 40px);
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(60px, 6.6vw, 104px);
  line-height: 1;
  letter-spacing: -.045em;
}
.trove__obj {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--nectar);
}
.trove__name .fill { display: inline-block; padding: 0 .06em .1em 0; }
.trove__desc {
  max-width: 19.5em;
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--soft);
  text-wrap: balance;
}

.jar {
  position: relative;
  width: min(68vw, 300px);
  padding-top: 27.5%;      /* 뚜껑이 앉는 자리 */
}
.jar__shadow {             /* 단지 아래로 번지는 꿀빛 */
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -9%;
  height: 18%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(245, 163, 0, .5), rgba(245, 163, 0, 0) 72%);
  filter: blur(10px);
}
.jar__body {
  position: relative;
  aspect-ratio: 400 / 480;
  background: #050301;
  -webkit-mask: url(../img/jar-mask.svg) center / 100% 100% no-repeat;
  mask: url(../img/jar-mask.svg) center / 100% 100% no-repeat;
}
.jar__rim {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 400 / 480;
  overflow: visible;
  pointer-events: none;
}
.jar__edge { fill: none; stroke: url(#g-edge); stroke-width: 6; stroke-linejoin: round; }
.jar__gloss { fill: none; stroke: rgba(255, 244, 220, .34); stroke-width: 7; stroke-linecap: round; }
.jar__glow {
  position: absolute;
  left: 4%;
  right: 4%;
  top: -2%;
  height: 40%;
  background: radial-gradient(50% 62% at 50% 78%, rgba(255, 255, 255, .95) 0%, rgba(255, 224, 138, .7) 30%, rgba(245, 163, 0, .28) 52%, rgba(245, 163, 0, 0) 74%);
  opacity: 0;
  transform: scale(.7, .3);
  transform-origin: 50% 85%;
  transition: opacity .6s ease, transform 1s var(--ease-out);
  pointer-events: none;
}
.jar__lid {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 400 / 120;
  overflow: visible;
  fill: url(#g-gold);
  transform-origin: 78% 100%;
  transition: transform .95s var(--ease-spring);
}
.jar__lid-gloss { fill: none; stroke: rgba(255, 255, 255, .8); stroke-width: 7; stroke-linecap: round; }
.jar.is-open .jar__lid { transform: translate3d(5%, -58%, 0) rotate(13deg); }
.jar.is-open .jar__glow { opacity: 1; transform: none; }

/* 영상 겹침 재생(끝과 처음을 섞어 이음매를 지운다) */
.xf { position: absolute; inset: 0; overflow: hidden; background: #050301 center / cover no-repeat; }
.xf video, .xf img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .7s linear;
}
.xf img, .xf video.is-in { opacity: 1; }
.xf video.is-top { z-index: 2; }

@media (max-width: 899px) {
  .trove__item:nth-child(even) { display: grid; justify-items: end; text-align: right; }
}

@media (min-width: 900px) {
  .trove { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 72px); align-items: start; }
  .trove__item:nth-child(2) { margin-top: clamp(48px, 7vw, 120px); }
  .trove__item:nth-child(3) { margin-top: clamp(96px, 14vw, 240px); }
  .jar { width: min(100%, 340px); }
}

/* 꿀팁 */
.tips {
  position: relative;
  padding: clamp(116px, 14vw, 230px) var(--gutter) 0;
  scroll-margin-top: 20px;
}
.tips__h {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(30px, 3.9vw, 58px);
  line-height: 1.22;
  letter-spacing: -.03em;
}
.tips__list { max-width: 1100px; margin-top: clamp(24px, 3vw, 46px); border-top: 2px solid var(--nectar); }
.tips__row {
  display: grid;
  grid-template-columns: minmax(110px, 220px) minmax(0, 1fr);
  gap: 8px 28px;
  padding: clamp(20px, 2.5vw, 34px) 0;
  border-bottom: 1px solid var(--line);
}
.tips__term {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(25px, 2.5vw, 36px);
  line-height: 1.25;
  letter-spacing: -.02em;
  color: var(--nectar);
}
.tips__text { max-width: 33em; font-size: 17px; color: var(--soft); }
@media (max-width: 640px) {
  .tips__row { grid-template-columns: minmax(0, 1fr); }
}

/* 꿀이 보물지도 위로 흘러내린다 */
.drips {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 1px);
  height: clamp(120px, 15vw, 220px);
  pointer-events: none;
}
.drips svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: scaleY(calc(.5 + var(--drip, 0) * .65));
  transform-origin: 50% 0;
}
.drips path { fill: url(#g-gold); }
.drips circle {
  fill: var(--honey);
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: fall 4.2s cubic-bezier(.55, 0, .95, .5) infinite;
}
@keyframes fall {
  0%, 35% { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translate3d(0, var(--fall, 260px), 0) scale(.82, 1.25); opacity: 0; }
}

/* ── 3. 보물지도 ──────────────────────────────────── */

.map {
  position: relative;
  z-index: 1;
  padding-bottom: clamp(90px, 10vw, 160px);
  background: var(--black);
  color: var(--wax);
  overflow: hidden;
}
.map__stage { position: relative; }
.map__media { position: relative; aspect-ratio: 4 / 5; }
.map__media .xf { background-position: 76% 50%; }
.map__media .xf video, .map__media .xf img { object-position: 76% 50%; }
.map__shade {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(0deg, var(--black) 0%, rgba(0, 0, 0, 0) 36%), linear-gradient(180deg, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, 0) 30%);
  pointer-events: none;
}
.map__content {
  position: relative;
  z-index: 4;
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: -12vw auto 0;
  padding: 0 var(--gutter) clamp(54px, 6vw, 90px);
}
.map__h {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(32px, 4.4vw, 68px);
  line-height: 1.2;
  letter-spacing: -.03em;
}
.map__lead { max-width: 24em; margin-top: 16px; font-size: clamp(16px, 1.3vw, 20px); color: rgba(255, 244, 220, .9); }
.map__where {
  margin: clamp(30px, 4.4vw, 64px) 0 clamp(26px, 3.4vw, 48px);
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(54px, 15.5vw, 92px);
  line-height: 1.04;
  letter-spacing: -.045em;
}
.map__where span { display: block; }
.map__facts { display: grid; gap: 14px; max-width: 34em; }
.map__facts div { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; }
.map__facts dt { color: var(--nectar); font-weight: 600; }
.map__facts dd { font-weight: 500; }
.map__actions { display: grid; gap: 10px; margin-top: clamp(26px, 3vw, 40px); }
.map__apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.map__apps .btn { width: 100%; padding: 0 8px; font-size: 15px; }
@media (min-width: 620px) {
  .map__actions { display: flex; flex-wrap: wrap; align-items: center; }
  .map__apps { display: flex; gap: 10px; }
  .map__apps .btn { width: auto; padding: 0 24px; font-size: 16px; }
}
.map__status { display: block; min-height: 1.75em; margin-top: 12px; font-size: 15px; color: var(--nectar); }

/* 진짜 지도 */
.map__live {
  width: calc(100% - 2 * var(--gutter));
  max-width: var(--wrap);
  margin-inline: auto;
}
.map__frame {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--lacquer);
  box-shadow: 0 0 0 1px var(--line);
  overflow: hidden;
}
.map__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  /* 밝은 지도를 검정과 금빛으로 뒤집는다 */
  filter: grayscale(1) invert(.94) sepia(.6) saturate(1.7) hue-rotate(-10deg) brightness(.95) contrast(.94);
}

@media (min-width: 900px) {
  .map__media { position: absolute; inset: 0; aspect-ratio: auto; }
  .map__media .xf { background-position: 60% 50%; }
  .map__media .xf video, .map__media .xf img { object-position: 60% 50%; }
  .map__shade {
    background:
      linear-gradient(90deg, rgba(0, 0, 0, .95) 0%, rgba(0, 0, 0, .82) 34%, rgba(0, 0, 0, .12) 68%),
      linear-gradient(0deg, var(--black) 0%, rgba(0, 0, 0, 0) 24%),
      linear-gradient(180deg, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, 0) 34%);
  }
  .map__content { margin-top: 0; padding-top: clamp(190px, 21vw, 320px); padding-bottom: clamp(84px, 9vw, 140px); }
  .map__where { font-size: clamp(72px, 8.8vw, 156px); }
  .map__where span { display: inline; }
  .map__frame { aspect-ratio: 21 / 8; }
}

/* ── 4. 예약 ─────────────────────────────────────── */

.finale {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  min-height: 92vh;
  min-height: 92svh;
  background: var(--black);
  color: var(--wax);
  overflow: hidden;
}
.finale__media { position: absolute; inset: 0; }
.finale__media .xf { background-position: 80% 50%; }
.finale__media .xf video, .finale__media .xf img { object-position: 80% 50%; }
.finale__shade {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, .95) 0%, rgba(0, 0, 0, .84) 46%, rgba(0, 0, 0, .3) 70%, rgba(0, 0, 0, 0) 86%),
    linear-gradient(180deg, var(--black) 0%, rgba(0, 0, 0, 0) 18%);
  pointer-events: none;
}
.finale__content {
  position: relative;
  z-index: 4;
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 120px var(--gutter) clamp(120px, 12vw, 150px);
}
.finale__h {
  max-width: 10.5em;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(38px, 6.6vw, 108px);
  line-height: 1.12;
  letter-spacing: -.04em;
}
.finale__p { max-width: 23em; margin-top: clamp(16px, 2vw, 28px); font-size: clamp(16px, 1.35vw, 21px); font-weight: 500; color: rgba(255, 244, 220, .92); }
.finale__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: clamp(26px, 3.4vw, 46px); }
.finale__note { font-size: 15px; color: var(--nectar); }

@media (min-width: 900px) {
  .finale { align-items: center; }
  .finale__media .xf { background-position: 50% 50%; }
  .finale__media .xf video, .finale__media .xf img { object-position: 50% 50%; }
  .finale__shade {
    background:
      linear-gradient(90deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .55) 40%, rgba(0, 0, 0, 0) 70%),
      linear-gradient(180deg, var(--black) 0%, rgba(0, 0, 0, 0) 22%),
      linear-gradient(0deg, var(--black) 0%, rgba(0, 0, 0, 0) 16%);
  }
  .finale__content { padding-bottom: 120px; }
}

/* ── 발치 ─────────────────────────────────────────── */

.foot {
  position: relative;
  z-index: 1;
  padding: 44px var(--gutter) calc(110px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--black);
  color: rgba(255, 244, 220, .78);
  font-size: 14px;
  line-height: 1.7;
}
.foot__in { display: grid; gap: 8px; }
.foot__name { font-family: var(--serif); font-weight: 800; font-size: 22px; color: var(--wax); letter-spacing: -.02em; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 8px 0 6px; }
.foot__nav a { padding: 6px 0; font-size: 15px; color: var(--wax); text-decoration: none; }
@media (hover: hover) {
  .foot__nav a:hover { color: var(--nectar); }
}
@media (min-width: 761px) {
  .foot { padding-bottom: 48px; }
}

/* ── 손 닿는 곳의 예약 버튼(모바일) ────────────────── */

.dock {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 40;
  display: none;
  gap: 8px;
  padding: 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .86);
  box-shadow: 0 0 0 1px rgba(255, 215, 106, .3), 0 18px 40px -12px rgba(0, 0, 0, .8);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transform: translate3d(0, 150%, 0);
  transition: transform .55s var(--ease-out);
}
.dock.is-on { transform: none; }
.dock .btn { flex: 1 1 0; min-height: 48px; padding: 0 12px; font-size: 15px; }
.dock .btn--line { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (max-width: 760px) {
  .dock { display: flex; }
}

/* ── 움직임을 줄여 달라는 설정 ─────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .hero__word { font-weight: 900; background-position: 100% 0, 0 100%; }
  .surface, .drips svg { transform: none; }
  .inside__depth i { display: none; }
}
