/* =========================================================
   디자인포스 (DESIGN FOS) — Intro UI Layer
   3D는 canvas, 이 파일은 오버레이 UI만 담당
   ========================================================= */

:root {
  --bg: #ffffff;   /* 3D 배경(COLORS.bg)과 동일하게 유지 */
  --ink: #1c1f1e;
  --ink-soft: #6c716e;
  --line: #dfe1dd;
  --accent: #ff5a2b;
  --ui-pad: clamp(16px, 3.2vw, 40px);
  --font: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI',
          'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

#scene {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* ---------- 공통 UI 바 ---------- */
.ui {
  position: fixed;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: var(--ui-pad);
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.ui--top { top: 0; padding-top: max(var(--ui-pad), env(safe-area-inset-top)); }
.ui--bottom {
  bottom: 0;
  justify-content: flex-end;   /* 남은 항목은 CONTACT 하나 — 우하단 고정 */
  transform: translateY(6px);
  padding-bottom: max(var(--ui-pad), env(safe-area-inset-bottom));
}
body.ui-ready .ui { opacity: 1; transform: translateY(0); }
.ui > * { pointer-events: auto; }

/* ---------- 브랜드 ---------- */
.brand { display: flex; flex-direction: column; gap: 2px; line-height: 1; }
.brand__ko { font-size: 15px; font-weight: 900; letter-spacing: -0.02em; }
.brand__en {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.42em;
  color: var(--ink-soft);
}

/* ---------- 문의전화 ---------- */
.contact {
  display: inline-flex;
  align-items: baseline;
  gap: 11px;
  padding: 6px 2px;
  position: relative;
  text-decoration: none;
  color: var(--ink);
}
.contact__label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.26em;
  color: var(--ink-soft);
  transition: color 0.4s var(--ease);
}
.contact__tel {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.005em;
  line-height: 1;
}
.contact::after {
  content: '';
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.contact:hover::after, .contact:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}
.contact:hover .contact__label { color: var(--accent); }

/* ---------- 로더 ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--bg);
  transition: opacity 0.7s var(--ease);
}
.loader.is-out { opacity: 0; pointer-events: none; }
.loader__mark { font-size: 22px; font-weight: 900; letter-spacing: 0.12em; }
.loader__bar { width: 128px; height: 1px; background: var(--line); overflow: hidden; }
.loader__bar span {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--ink);
  animation: slide 1.1s var(--ease) infinite;
}
@keyframes slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}
.loader__txt {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.34em;
  color: var(--ink-soft);
}

/* ---------- 페이지 전환 커튼 ---------- */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

/* ---------- 서브페이지 자리(추후 구현) ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--ui-pad);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
}
.sheet.is-on { opacity: 1; pointer-events: auto; }
.sheet__inner {
  max-width: 460px;
  text-align: center;
  transform: translateY(14px);
  transition: transform 0.7s var(--ease);
}
.sheet.is-on .sheet__inner { transform: translateY(0); }
.sheet__idx {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 18px;
}
.sheet__title {
  font-size: clamp(34px, 7vw, 58px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}
.sheet__sub {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.sheet__desc {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.btn-line {
  margin-top: 34px;
  padding: 13px 26px;
  background: none;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.btn-line:hover { background: var(--ink); color: var(--bg); }

.noscript {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: var(--bg);
  font-size: 14px;
}

/* ---------- 반응형 ---------- */
@media (max-width: 720px) {
  .brand__ko { font-size: 13px; }
  .contact__tel { font-size: 16px; }
}
@media (max-width: 420px) {
  .ui--bottom { flex-direction: column; align-items: flex-end; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .loader__bar span { animation: none !important; }
}
