/* 레이아웃과 컴포넌트. 색·글꼴 값은 theme.css의 변수만 쓴다. */

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

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--gray-100);
  line-height: 1.6;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p,
dl,
dd,
blockquote {
  margin: 0;
}

/* 모바일 전용. 큰 화면에서는 가운데 기둥으로만 보여 준다. */
.page {
  max-width: var(--page-width);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--white);
}

/* ── 머리말 ── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 var(--gutter);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy-800);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-logo {
  width: 30px;
  height: 30px;
  background: var(--logo) center / contain no-repeat;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--navy-800);
  cursor: pointer;
}

.icon-button svg {
  width: 22px;
  height: 22px;
}

.icon-button[aria-pressed="true"] .icon-off,
.icon-button[aria-pressed="false"] .icon-on {
  display: none;
}

/* ── 청소 체험 ── */

.demo {
  padding: 22px var(--gutter) 28px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
}

.demo h1 {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--navy-900);
}

.lead {
  margin-top: 8px;
  font-size: 15px;
  color: var(--gray-700);
}

.scene {
  position: relative;
  margin-top: 18px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--gray-50);
  box-shadow: 0 1px 2px rgba(11, 24, 52, 0.06), 0 8px 24px rgba(11, 24, 52, 0.08);
}

.scene canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.scene-fx {
  pointer-events: none;
}

/* 손잡이가 움직이는 아래쪽 띠. 세로로 밀면 화면이 스크롤된다. */
.track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32%;
  touch-action: pan-y;
  transition: opacity 0.35s ease;
}

.track.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.track-rail {
  position: absolute;
  bottom: 12px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.tool {
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 15%;
  transform: translateX(-50%);
  touch-action: none;
  cursor: grab;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* 엄지로 잡기 쉽게 실제 그림보다 넓게 */
.tool::before {
  content: "";
  position: absolute;
  inset: -10px -20px;
}

.track.is-active .tool {
  cursor: grabbing;
}

.tool img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 2;
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.35));
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.tool:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.progress li {
  position: relative;
  padding-top: 10px;
  font-size: 12px;
  text-align: center;
  color: var(--gray-500);
  transition: color 0.3s ease;
}

.progress li::before,
.progress li::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 2px;
  background: var(--gray-200);
}

.progress li::after {
  background: var(--navy-800);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.progress li.is-active {
  color: var(--ink);
  font-weight: 600;
}

.progress li.is-done {
  color: var(--navy-800);
  font-weight: 600;
}

.progress li.is-done::after {
  transform: scaleX(1);
}

.zone-info {
  min-height: 3.2em;
  margin-top: 12px;
  font-size: 14px;
  color: var(--gray-700);
}

.zone-info strong {
  margin-right: 6px;
  color: var(--navy-800);
}

.zone-info.is-done {
  animation: rise 0.4s ease both;
}

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

.demo-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--gray-50);
  font-size: 14px;
  color: var(--gray-700);
}

.button {
  flex: none;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--navy-800);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* ── 신뢰 정보 ── */

.trust {
  padding: 0 var(--gutter) 28px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
}

.trust-grid div {
  padding: 14px 10px;
  text-align: center;
}

.trust-grid div + div {
  border-left: 1px solid var(--gray-200);
}

.trust-grid dt {
  font-size: 12px;
  color: var(--gray-500);
}

.trust-grid dd {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy-800);
}

/* ── 아래 섹션 ── */

.section {
  padding: 32px var(--gutter);
  border-top: 8px solid var(--gray-100);
}

.section h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy-900);
}

.section-lead {
  margin-top: 8px;
  font-size: 15px;
  color: var(--gray-700);
}

.price-table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.price-table th,
.price-table td {
  padding: 12px 6px;
  border-bottom: 1px solid var(--gray-200);
  text-align: center;
}

.price-table thead th {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-500);
}

.price-table th[scope="row"] {
  text-align: left;
  color: var(--navy-800);
}

.note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--gray-500);
}

.principle {
  margin-top: 16px;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--navy-800);
  font-size: 15px;
  line-height: 1.75;
  color: var(--gray-700);
}

/* ── 꼬리말 ── */

.site-footer {
  padding: 28px var(--gutter) 40px;
  background: var(--gray-50);
  font-size: 12px;
  line-height: 1.8;
  color: var(--gray-500);
}

.footer-brand {
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-800);
}
