/* 블로그랩 인트로 — 서늘한 회녹색 건축 도면지 위 실시간 3D 흰색 복층 유리 주택과 그 아래 세 제품 선택 탭 */
:root {
  --paper: #e8eae5;
  --ivory: #f3f4f0;
  --ink: #262a29;
  --muted: #565c58;
  --body: #3b403e;
  --line: #cdd1cb;
  --warm: #df793c;
  --warm-ink: #9e5228;
  --warm-soft: #f6e6d8;
  --pad: clamp(20px, 3.4vw, 56px);
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* 배경: 서늘한 회녹색 도면지 + 위쪽의 옅은 대기 밝음, 아주 약한 결. 고정·정적·클릭 불가 */
body::before, body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background:
    /* 위쪽 중앙의 밝은 안개 / 아래 가장자리의 서늘한 그늘 — 따뜻한 햇살·창살 그림자 없음 */
    radial-gradient(ellipse 80% 70% at 50% 18%, rgb(246 247 243 / .75), transparent 72%),
    radial-gradient(ellipse 70% 50% at 8% 100%, rgb(150 160 152 / .16), transparent 70%),
    radial-gradient(ellipse 60% 50% at 96% 96%, rgb(140 152 160 / .14), transparent 72%);
}
/* 종이 결: SVG 노이즈를 아주 옅게 곱하기 (도면지처럼 거의 보이지 않게) */
body::after {
  opacity: .12;
  mix-blend-mode: multiply;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .24 0 0 0 0 .27 0 0 0 0 .25 .6 0 0 0 -.27'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }

:focus-visible { outline: 2px solid var(--warm-ink); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- header ---------- */
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  padding: clamp(10px, 1.6svh, 18px) var(--pad);
}

.wordmark { display: block; width: auto; height: 26px; flex: none; }

/* 제품 메뉴: 인테리어·방충망은 새 탭(↗), 청소는 같은 출시 예정 안내 */
.menu {
  display: flex;
  flex-wrap: wrap;
  margin: 0 auto 0 0;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}
.menu a, .menu button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s;
}
.menu a:hover, .menu button:hover { background: rgb(38 42 41 / .07); }
.menu a::after { content: "↗"; content: "↗" / ""; margin-left: 3px; color: var(--warm-ink); font-size: .85em; }
.menu button::after {
  content: "출시 예정"; content: "출시 예정" / "";
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--warm-soft);
  color: var(--warm-ink);
  font-size: 12px;
}

.login {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .25s, color .25s;
}
.login:hover { background: var(--ink); color: var(--paper); }

/* ---------- 3D 건축 주택 장면 ---------- */
.stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 var(--pad);
}

/* 좌우 끝까지 펼친 투명 WebGL 캔버스: 도면 선이 화면 가장자리까지 이어짐 */
.scene {
  position: relative;
  flex: 1 1 auto;
  min-height: 300px;
  margin: 0 calc(var(--pad) * -1);
  overflow: hidden;
}
.scene canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.scene[data-ready="fallback"] canvas { display: none; }

.scene-status {
  position: absolute;
  inset: 42% var(--pad) auto;
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  text-align: center;
  word-break: keep-all;
}
.scene-status span { display: none; }
.scene[data-ready="loading"] .st-loading { display: inline; animation: breathe 2.4s ease-in-out infinite alternate; }
.scene[data-ready="fallback"] .st-fallback { display: inline-block; max-width: 34ch; padding: 14px 20px; border: 1px solid var(--line); border-radius: 4px; color: var(--body); background: rgb(243 244 240 / .82); line-height: 1.6; }
@keyframes breathe { from { opacity: .45; } }

/* 분리된 부품을 가리키는 작은 도면 주석: 점 + 사선 지시선 + 이름표. 위치는 house-scene.js가 매 프레임 지정 */
.scene-label {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
.scene-label i {
  position: absolute;
  left: -4px;
  top: -4px;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--warm);
  border-radius: 50%;
  background: var(--ivory);
}
.scene-label i::after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: 6px;
  width: 44px;
  height: 1px;
  background: var(--warm-ink);
  transform: rotate(-42deg);
  transform-origin: left center;
}
.scene-label .tag {
  position: absolute;
  left: 34px;
  bottom: 30px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 11px 6px;
  border: 1px solid rgb(38 42 41 / .14);
  border-radius: 3px;
  background: rgb(243 244 240 / .88);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.01em;
  box-shadow: 0 6px 18px rgb(38 42 41 / .08);
}
.scene-label b { color: var(--warm-ink); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.scene-label.flip i::after { left: auto; right: 5px; transform: rotate(42deg); transform-origin: right center; }
.scene-label.flip .tag { left: auto; right: 34px; }
.scene-label.compact i::after { left: 2.5px; bottom: 7px; width: 1px; height: calc(var(--rise, 40px) - 7px); transform: none; }
.scene-label.compact .tag { left: -14px; right: auto; bottom: var(--rise, 40px); gap: 6px; padding: 3px 8px 4px; box-shadow: none; }
.scene-label.compact.flip .tag { left: auto; right: -14px; }

/* 자동 둘러보기 일시정지/재생 */
.scene-pause {
  position: absolute;
  right: var(--pad);
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(232 234 229 / .84);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .25s, border-color .25s;
}
.scene-pause:hover { border-color: var(--ink); background: var(--ivory); }
.scene-pause .pi { width: 10px; height: 11px; }
.scene-pause[data-state="playing"] .pi { border-inline: 3px solid currentColor; }
.scene-pause[data-state="paused"] .pi { width: 0; height: 0; border-block: 5.5px solid transparent; border-left: 9px solid currentColor; }

/* ---------- 제품 선택: 집 아래 낮은 탭 + 선택 제품 설명/CTA ---------- */
.chooser {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 0 clamp(10px, 2svh, 26px);
}
.tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(16px, 2.4vw, 40px);
}
.tab {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-height: 64px;
  padding: 16px 0 10px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: #8a8c88;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color .35s;
}
.tab::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.tab:hover { color: var(--body); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::before { transform: scaleX(1); }
.idx { color: var(--warm-ink); font-size: 12px; font-weight: 600; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.tab-name {
  font-size: clamp(1.3rem, 2.15vw, 2.05rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.035em;
  word-break: keep-all;
}
.tab-name .lt { font-weight: 300; }

/* 패널 셋을 한 칸에 겹쳐 높이 고정: 선택 안 된 패널은 보이지 않게만 숨김 */
.panels { display: grid; margin-top: 6px; }
.panel {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  animation: reveal .5s cubic-bezier(.2, .7, .2, 1) both;
}
.panel[hidden] { display: flex; visibility: hidden; animation: none; }

.desc {
  margin: 0;
  max-width: 52ch;
  color: var(--body);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.55;
  word-break: keep-all;
  text-wrap: pretty;
}
.desc .soon { margin-left: 6px; vertical-align: 1px; }

.cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px 0 26px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s, color .25s;
}
.cta i { font-style: normal; color: #f2b48c; transition: translate .35s ease; }
.cta:hover { background: #111413; }
.cta:hover i { translate: 2px -2px; }
.cta--soon { background: none; color: var(--ink); }
.cta--soon:hover { background: var(--ink); color: var(--paper); }

@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }

.soon {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--warm-soft);
  color: var(--warm-ink);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
}

/* ---------- footer: 구분선 + 브랜드·약관/고객지원 + 사업자 정보 ---------- */
.foot {
  margin: 0 var(--pad);
  padding: 2px 0 clamp(10px, 1.6svh, 18px);
  border-top: 1px solid var(--line);
  color: var(--body);
  font-size: 13.5px;
  line-height: 1.6;
}
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; }
.foot-mark { display: block; width: auto; height: 15px; flex: none; }
.copyright { margin: 0 auto 0 0; color: var(--muted); font-size: 13px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; text-decoration: none; }
.foot-nav strong { font-weight: 700; }
.foot-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.biz { display: flex; flex-wrap: wrap; gap: 2px 20px; margin: 0; }
.biz div { display: flex; gap: 6px; word-break: keep-all; }
.biz dt { color: var(--muted); }
.biz dd { margin: 0; color: var(--ink); }
.biz a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.biz a:hover { text-decoration-color: currentColor; }

/* ---------- cleaning dialog ---------- */
.notice {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--ivory);
  color: var(--ink);
  box-shadow: 0 30px 80px rgb(38 42 41 / .28);
}
.notice[open] { animation: rise .26s ease-out; }
.notice::backdrop { background: rgb(38 42 41 / .38); }
.notice-inner { padding: 30px 30px 26px; }
.notice .soon { margin: 0; }
.notice h2 { margin: 14px 0 0; font-size: 1.6rem; letter-spacing: -.03em; }
.notice p:not(.soon) { margin: 10px 0 0; color: var(--muted); line-height: 1.65; word-break: keep-all; }
.notice form { margin: 22px 0 0; display: flex; justify-content: flex-end; }
.close {
  min-height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* 좁은 화면: 메뉴를 로고·로그인 아래 한 줄로 내림 (가로 넘침 없이 줄바꿈). 장면은 고정 높이, 탭은 세로로 쌓고 자연 스크롤 */
@media (max-width: 760px) {
  .scene { flex: none; min-height: 0; height: clamp(280px, 80vw, 460px); }
  .tabs { grid-template-columns: minmax(0, 1fr); }
  .tab { min-height: 56px; padding: 12px 0 8px; }
  .tab-name { font-size: 1.35rem; }
  .panels { margin-top: 10px; }
  .panel { flex-direction: column; align-items: flex-start; }
  .chooser { padding-bottom: 28px; }
  .top { justify-content: space-between; }
  .menu { order: 3; flex-basis: 100%; margin: 0 0 0 -10px; padding-left: 0; border-left: 0; }
  .menu a, .menu button { padding: 0 10px; }
}

@media (max-width: 560px) {
  .wordmark { height: 22px; }
  .menu a, .menu button { padding: 0 8px; font-size: 14.5px; }
  .menu { margin-left: -8px; }
  .foot-nav { gap: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .panel, .scene[data-ready="loading"] .st-loading { animation: none; }
  .tab, .tab::before, .cta, .cta i, .scene-pause, .login, .menu a, .menu button { transition: none; }
  .notice[open] { animation: none; }
}
