/* 시간가구 — 모바일 우선. 색·글자 크기는 analysis.json 실측값(1440px 기준)을 따른다. */
:root {
  --bg: #37322f;
  --ink: #fff;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --px: 0;
  --py: 0;
  --nav-size: 19.9083px;
  --body-size: 15.9694px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.2;
  overflow-x: hidden;
  word-break: keep-all;
  overflow-wrap: break-word;
  transition: background-color 0.6s ease, color 0.6s ease;
}

ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
h1, h2, p, figure { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 8px; top: -60px; z-index: 200; padding: 12px 16px; min-height: 44px; display: inline-flex; align-items: center;
  background: #fff; color: #000; transition: top 0.2s;
}
.skip:focus { top: 8px; }

:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ───────── 머리글 ───────── */
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 110;
  height: calc(92px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  display: flex; justify-content: center; align-items: flex-start;
  pointer-events: none;
  mix-blend-mode: difference;
}
.main-nav { display: none; pointer-events: auto; padding-top: 24px; }
.main-nav ul { display: flex; gap: 83px; }
.main-nav a {
  display: flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center;
  font-size: var(--nav-size); line-height: 1.2; letter-spacing: 0.04em; text-transform: uppercase;
  font-weight: 300;
  opacity: 0.6;
  transition: opacity 0.25s var(--ease);
}
.main-nav .is-current a { opacity: 1; }
.main-nav a:hover, .main-nav a:focus-visible { opacity: 1; }

.menu-opener {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right));
  width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  pointer-events: auto; color: #fff;
}
.menu-opener .line {
  position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor;
  transition: all 0.25s var(--ease);
}
.menu-opener .line:nth-child(1) { top: 17px; }
.menu-opener .line:nth-child(2) { top: 26px; }
.menu-open .menu-opener .line:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-open .menu-opener .line:nth-child(2) { top: 21px; transform: rotate(-45deg); }

.menu-wrap {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(110px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));
  height: 100dvh; overflow-y: auto;
  opacity: 0; visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0s linear 0.5s;
}
.menu-open .menu-wrap { opacity: 1; visibility: visible; transition-delay: 0s; }
.menu-open { overflow: hidden; }
.menu-list a {
  display: block; padding: 10px 0; min-height: 44px;
  font-size: 28px; letter-spacing: 0.04em; opacity: 0.55;
  transition: opacity 0.25s var(--ease);
}
.menu-list li:first-child a { opacity: 1; }
.menu-list a:hover, .menu-list a:focus-visible { opacity: 1; }
.menu-foot { font-size: 16px; line-height: 1.6; letter-spacing: 0.02em; }
.menu-foot a { display: inline-block; padding: 8px 0; opacity: 0.8; }

/* 머리글 오른쪽 [로그인] ↔ [내 정보] — 모바일은 햄버거 왼쪽, 900px 이상은 맨 오른쪽 */
.head-auth {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); right: calc(56px + env(safe-area-inset-right));
  pointer-events: auto;
}
.auth-link {
  display: flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 8px;
  font-size: var(--body-size); line-height: 1.2; letter-spacing: 0.04em; white-space: nowrap;
  opacity: 0.8; transition: opacity 0.25s var(--ease);
}
.auth-link[hidden] { display: none; }
.auth-link:hover, .auth-link:focus-visible { opacity: 1; }

/* ───────── 히어로 (스크롤 연출 키트 자리) ───────── */
.hero { background: var(--bg); }
.hero .hm-s3d-media {
  /* 마우스 반응: 키트 안쪽은 건드리지 않고 바깥 틀만 살짝 움직인다 */
  transform: translate3d(calc(var(--px) * -14px), calc(var(--py) * -10px), 0) scale(1.05);
  will-change: transform;
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(40, 34, 30, 0.34) 0%, rgba(40, 34, 30, 0) 62%),
    rgba(55, 50, 47, 0.46);
}
.logo-block {
  position: absolute; left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 0 16px; text-align: center;
}
.logo { font-weight: 300; }
.logo-mark {
  display: block;
  font-size: clamp(27px, 8.4vw, 74px);
  line-height: 1.1; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
  text-shadow: 0 1px 24px rgba(30, 24, 20, 0.35);
}
.logo-sub {
  font-size: var(--body-size); line-height: 1.2; letter-spacing: 0.02em;
  text-shadow: 0 1px 12px rgba(30, 24, 20, 0.5);
}

/* 첫 화면 인트로: 불러오기 전엔 단색 + 메뉴만 (JS 가 있을 때만) */
html.js:not(.intro-done) .hm-s3d-media,
html.js:not(.intro-done) .hero-scrim,
html.js:not(.intro-done) .logo-block { opacity: 0; }

/* ───────── 마지막 화면: 마우스 반응 공간 + 푸터 ───────── */
.scene {
  position: relative; background: var(--bg);
  height: 100vh; height: 100svh; min-height: 640px;
  overflow: hidden; overflow: clip;
}
.scene-stage { position: relative; width: 100%; height: 100%; perspective: 1200px; }
.scene-world {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateY(calc(var(--px) * 2.2deg)) rotateX(calc(var(--py) * -1.6deg));
  will-change: transform;
}
.layer { position: absolute; margin: 0; --k: 1; }
.layer .inner {
  width: 100%; height: 100%;
  transform: translate3d(calc(var(--px) * var(--k) * -9px), calc(var(--py) * var(--k) * -7px), 0);
  will-change: transform;
}
.layer-bg { inset: -10%; --k: 0.5; }
.layer-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 38% 50%; transform: scale(1.04); filter: blur(9px) brightness(0.9); }
.scene-tint {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(55,50,47,0.3) 0%, rgba(55,50,47,0.45) 45%, rgba(55,50,47,0.88) 100%);
}

.card { z-index: 2; }
.card .reveal { width: 100%; height: 100%; }
.card .inner { position: relative; overflow: hidden; background: #2a2623; box-shadow: 0 24px 60px rgba(30, 24, 20, 0.28); }
.card img, .card video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.card:hover img, .card:hover video { transform: scale(1.05); }
.card figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 10px;
  font-size: 14px; line-height: 1.2; letter-spacing: 0.04em;
  background: linear-gradient(0deg, rgba(40,34,30,0.7), rgba(40,34,30,0));
  opacity: 0.9; transition: opacity 0.25s var(--ease);
}
.card:hover figcaption { opacity: 1; }

/* 모바일(390px 기준) 배치 — 위 절반에 사진, 아래에 글과 푸터 */
.card-video { left: 6%; top: 11%; width: 64%; aspect-ratio: 16 / 9; --k: 1.6; }
.card-tall  { right: 5%; top: 8%; width: 22%; aspect-ratio: 3 / 4; --k: 2.4; z-index: 1; }
.card-chair { right: 5%; top: 26%; width: 38%; aspect-ratio: 4 / 5; --k: 3.4; z-index: 3; }
.card-lamp  { left: 9%; top: 34%; width: 36%; aspect-ratio: 5 / 4; --k: 4.4; z-index: 4; }
.card-small { display: none; }

.scene-copy {
  position: absolute; z-index: 6; left: 0; right: 0;
  bottom: calc(112px + env(safe-area-inset-bottom));
  padding: 0 20px;
}
.scene-copy h2 {
  font-size: 24px; line-height: 1.35; letter-spacing: 0.01em; font-weight: 300; max-width: 15em;
  text-shadow: 0 1px 14px rgba(30, 24, 20, 0.55);
}
.scene-copy p {
  margin-top: 12px; font-size: 16px; line-height: 1.55; letter-spacing: 0.02em; max-width: 34em;
  text-shadow: 0 1px 10px rgba(30, 24, 20, 0.6);
}
.scene-copy .cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  background: #fff; color: #000; font-size: 16px; letter-spacing: 0.02em; font-weight: 400;
  border: 1px solid #fff; text-shadow: none;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover, .btn:focus-visible { background: transparent; color: #fff; }
.btn-line { background: transparent; color: #fff; }
.btn-line:hover, .btn-line:focus-visible { background: #fff; color: #000; }

.footer-wrap {
  position: absolute; z-index: 7; left: 0; right: 0; bottom: 0;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 2px;
  background: rgba(55, 50, 47, 0.9);
  font-size: 15.9694px; line-height: 1.2; letter-spacing: 0.02em;
}
.footer-wrap p { padding: 10px 0 0; }
.footer-wrap ul { display: flex; flex-wrap: wrap; column-gap: 24px; }
.footer-wrap a {
  display: inline-flex; align-items: center; min-height: 44px; opacity: 0.8;
  transition: opacity 0.25s var(--ease);
}
.footer-wrap a:hover, .footer-wrap a:focus-visible { opacity: 1; }

@media (min-width: 768px) {
  .scene-copy { padding: 0 48px; bottom: calc(96px + env(safe-area-inset-bottom)); }
  .scene-copy h2 { font-size: 32px; }
  .footer-wrap { flex-direction: row; justify-content: space-between; align-items: center; padding: 6px 48px calc(6px + env(safe-area-inset-bottom)); }
  .footer-wrap p { padding: 0; }
  .card-video { left: 6%; top: 12%; width: 44%; --k: 1.6; }
  .card-tall  { right: 7%; top: 9%; width: 18%; }
  .card-chair { right: 8%; top: 27%; width: 28%; }
  .card-lamp  { left: auto; right: 34%; top: 38%; width: 22%; }
  .card-small { display: block; left: 52%; top: 10%; width: 16%; aspect-ratio: 16 / 9; --k: 5.4; z-index: 1; }
}

@media (min-width: 900px) {
  .site-head { height: 92px; }
  .main-nav { display: block; }
  .main-nav ul { gap: 28px; }
  .head-auth { top: 24px; right: 24px; }
  .menu-opener { display: none; }
  .menu-wrap { display: none; }
}

@media (min-width: 1200px) {
  .main-nav ul { gap: 56px; }
  .head-auth { right: 48px; }
}

@media (min-width: 1440px) {
  .main-nav ul { gap: 83px; }
}

@media (min-width: 1100px) {
  .scene-copy { padding: 0 8%; bottom: 112px; }
  .scene-copy h2 { font-size: 40px; max-width: 11.5em; }
  .footer-wrap { padding-left: 8%; padding-right: 8%; }
  .card-video { left: 8%; top: 14%; width: 36%; }
  .card-tall  { right: 8%; top: 9%; width: 13%; aspect-ratio: 3 / 4; }
  .card-chair { right: 14%; top: 33%; width: 20%; aspect-ratio: 4 / 5; }
  .card-lamp  { right: 36%; top: 46%; width: 17%; aspect-ratio: 5 / 4; }
  .card-small { left: 47%; top: 12%; width: 15%; }
}

@media (max-height: 640px) and (min-width: 768px) {
  .scene-copy h2 { font-size: 26px; }
}

/* 카카오톡 상담 플로팅 버튼 (색은 카카오 규정: #FEE500 + 검정 글자). z-index 는 메뉴(100)·머리글(110)보다 낮게 */
.kakao-dock {
  position: fixed; z-index: 90;
  right: calc(16px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.kakao-float, .kakao-tel {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  text-decoration: none; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s var(--ease);
}
.kakao-float { width: 52px; height: 52px; background: #FEE500; color: #191600; }
.kakao-tel { width: 48px; height: 48px; background: #fff; color: #000; }
.kakao-float:hover, .kakao-float:focus-visible, .kakao-tel:hover, .kakao-tel:focus-visible { transform: translateY(-2px); }
@media (max-width: 767px) {
  .scene-copy { bottom: calc(168px + env(safe-area-inset-bottom)); }
  .footer-wrap { padding-right: calc(84px + env(safe-area-inset-right)); }
  .footer-wrap ul { column-gap: 16px; }
}
@media (min-width: 768px) {
  .kakao-dock { right: calc(24px + env(safe-area-inset-right)); bottom: calc(24px + env(safe-area-inset-bottom)); }
  .kakao-float { width: 56px; height: 56px; }
  .footer-wrap { padding-right: 112px; }
}
@media (min-width: 1100px) {
  .footer-wrap { padding-right: 112px; }
}

@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
  .hero .hm-s3d-media, .scene-world, .layer .inner { transform: none; will-change: auto; }
  .hero .hm-s3d-media { transform: scale(1.02); }
  .card img, .card video, .btn, .main-nav a, .kakao-float, .kakao-tel { transition: none; }
}
