/* 매일내림 랜딩 — 밤의 아파트 복도와 엘리베이터 층 표시기.
   색은 전부 HSL 토큰. 유일한 어두운 면은 층 표시기(lift) 하나다. */

:root {
  --hall: hsl(205 25% 93%);        /* 복도 벽 */
  --hall-deep: hsl(207 24% 88%);
  --door: hsl(0 0% 100%);          /* 현관문·카드 면 */
  --ink: hsl(222 50% 16%);
  --ink-soft: hsl(220 16% 40%);
  --line: hsl(208 22% 80%);
  --plate: hsl(222 45% 10%);       /* 층 표시기 판 */
  --led: hsl(36 100% 56%);         /* 층 표시기 글자 */
  --done: hsl(156 67% 33%);
  --warn: hsl(4 70% 46%);
  --focus: hsl(212 100% 45%);

  --font-display: "Black Han Sans", "IBM Plex Sans KR", sans-serif;
  --font-body: "IBM Plex Sans KR", system-ui, sans-serif;
  --font-led: "DotGothic16", ui-monospace, monospace;

  --gutter: 20px;
  --radius: 14px;
  --measure: 1040px;
}

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

/* display를 지정한 클래스가 hidden 속성을 덮어쓰지 않게 한다 */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: linear-gradient(180deg, var(--hall) 0%, var(--hall-deep) 100%) fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
}

h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

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

.preview-banner {
  background: var(--ink);
  color: var(--hall);
  font-size: 13px;
  text-align: center;
  padding: 8px var(--gutter);
}

/* ── 히어로 ─────────────────────────────── */
.hero {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 56px var(--gutter) 40px;
  display: grid;
  gap: 36px;
}

.eyebrow { font-size: 14px; font-weight: 600; color: var(--ink-soft); letter-spacing: 0.02em; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(46px, 13vw, 92px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 10px 0 18px;
}

.lead { font-size: 18px; max-width: 30em; color: var(--ink); }

.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* ── 층 표시기 (이 페이지의 서명 요소) ───────── */
.lift { display: grid; justify-items: start; gap: 10px; }

.lift__plate {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  background: var(--plate);
  color: var(--led);
  font-family: var(--font-led);
  padding: 18px 26px 16px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px hsl(222 30% 22%), 0 18px 40px -22px hsl(222 60% 12% / 0.7);
  text-shadow: 0 0 14px hsl(36 100% 56% / 0.55);
}

.lift__floor { font-size: 84px; line-height: 1; min-width: 2ch; text-align: right; font-variant-numeric: tabular-nums; }
.lift__arrow { font-size: 30px; }
.lift__unit { font-size: 30px; }
.lift__caption { font-size: 14px; color: var(--ink-soft); font-weight: 500; }

.lift.is-arrived .lift__plate { color: hsl(152 80% 60%); text-shadow: 0 0 14px hsl(152 80% 60% / 0.5); }
.lift.is-arrived .lift__arrow { visibility: hidden; }
.lift.is-moving .lift__arrow { animation: blink 0.7s steps(2, start) infinite; }

.lift--mini .lift__plate { padding: 8px 14px 7px; gap: 6px; border-radius: 8px; }
.lift--mini .lift__floor { font-size: 30px; }
.lift--mini .lift__arrow, .lift--mini .lift__unit { font-size: 14px; }

@keyframes blink { to { opacity: 0.25; } }

/* ── 버튼 ─────────────────────────────── */
.btn {
  appearance: none;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 13px 22px;
  font: 600 16px/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.btn--primary { background: var(--ink); color: var(--door); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn:hover { transform: translateY(-1px); }
.btn--ghost:hover { background: var(--door); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ── 섹션 공통 ─────────────────────────── */
.section { max-width: var(--measure); margin: 0 auto; padding: 44px var(--gutter); }
.section h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(28px, 6vw, 40px); line-height: 1.2; }
.section__note { color: var(--ink-soft); font-size: 15px; margin-top: 6px; }

/* ── 이용 방법: 실제 순서이므로 ol, 번호 대신 '언제'를 표지로 쓴다 ── */
.how { display: grid; gap: 12px; margin-top: 22px; }
.how li {
  background: var(--door);
  border-radius: var(--radius);
  padding: 20px;
  display: grid;
  gap: 6px;
  border-left: 6px solid var(--ink);
}
.how__when { font-family: var(--font-led); font-size: 15px; color: var(--ink-soft); }
.how strong { font-size: 19px; font-weight: 600; }
.how li > span:last-child { color: var(--ink-soft); font-size: 15px; }

/* ── 가격 ─────────────────────────────── */
.prices { display: grid; gap: 12px; margin-top: 22px; }
.price {
  background: var(--door);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}
.price__name { font-weight: 600; font-size: 17px; flex: 1 1 0; min-width: 0; }
.price__desc { color: var(--ink-soft); font-size: 14px; display: block; font-weight: 400; }
.price__won { font-family: var(--font-display); font-size: 28px; white-space: nowrap; }
.price__won small { font: 500 14px var(--font-body); color: var(--ink-soft); margin-left: 4px; }

/* ── 설문 ─────────────────────────────── */
.section--survey { scroll-margin-top: 12px; }
.survey__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.survey { background: var(--door); border-radius: var(--radius); padding: 24px 20px; margin-top: 18px; }
.survey__step { min-height: 220px; }
.survey__step fieldset { border: 0; padding: 0; margin: 0; }
.survey__step legend { font-size: 20px; font-weight: 600; padding: 0; margin-bottom: 4px; }
.survey__hint { color: var(--ink-soft); font-size: 14px; margin-bottom: 16px; }

.choices { display: grid; gap: 10px; margin-top: 14px; }
.choices--buildings { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }

.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice__face {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 500;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}
.choice__face small { color: var(--ink-soft); font-weight: 400; font-size: 14px; }
.choice input:hover + .choice__face { border-color: var(--ink-soft); }
.choice input:checked + .choice__face { border-color: var(--ink); background: var(--hall); }
.choice input:focus-visible + .choice__face { outline: 3px solid var(--focus); outline-offset: 2px; }
.choices--buildings .choice__face { justify-content: center; padding: 12px 6px; font-family: var(--font-led); font-size: 18px; }

.total { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; align-items: baseline; }
.total strong { font-family: var(--font-display); font-weight: 400; font-size: 26px; }

.field { display: grid; gap: 6px; margin-top: 14px; }
.field label { font-weight: 600; font-size: 15px; }
.field input[type="tel"] {
  font: 500 18px var(--font-body);
  padding: 13px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--door);
  width: 100%;
}
.field input[type="tel"]:focus { border-color: var(--ink); outline: none; }

.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 14px; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.consent__detail { margin-top: 10px; font-size: 13px; color: var(--ink-soft); background: var(--hall); border-radius: 10px; padding: 12px 14px; }
.consent__detail dt { font-weight: 600; color: var(--ink); margin-top: 6px; }
.consent__detail dt:first-child { margin-top: 0; }
.consent__detail dd { margin: 0; }

.survey__error { color: var(--warn); font-weight: 600; font-size: 14px; margin-top: 12px; }
.survey__nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.done { background: var(--door); border-radius: var(--radius); padding: 28px 20px; margin-top: 18px; display: grid; gap: 12px; justify-items: start; border-left: 6px solid var(--done); }
.done h3 { font-family: var(--font-display); font-weight: 400; font-size: 26px; }

/* ── 동별 현황: 타일 하나가 동 하나, 채움 높이 = 대기 세대 / 임계치 ── */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.tile {
  position: relative;
  overflow: hidden;
  background: var(--door);
  border-radius: 12px;
  padding: 14px 12px 12px;
  min-height: 92px;
  display: grid;
  align-content: space-between;
  isolation: isolate;
}
.tile::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: calc(var(--fill, 0) * 100%);
  background: hsl(205 40% 84%);
  z-index: -1;
  transition: height 0.6s ease;
}
.tile__no { font-family: var(--font-led); font-size: 20px; }
.tile__count { font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.tile.is-open::before { background: hsl(156 50% 80%); }
.tile.is-open .tile__count { color: var(--done); font-weight: 600; }
.tile.is-mine { box-shadow: inset 0 0 0 3px var(--ink); }

/* ── 개인정보처리방침 ───────────────────── */
.policy { max-width: 760px; }
.policy h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 8vw, 48px); line-height: 1.15; margin: 10px 0 6px; }
.policy h2 { font-family: var(--font-body); font-weight: 600; font-size: 19px; margin: 34px 0 8px; }
.policy p { margin-top: 8px; }
.policy a, .footer a, .consent__more a { color: var(--ink); text-underline-offset: 3px; }
.policy__table { overflow-x: auto; margin-top: 10px; background: var(--door); border-radius: var(--radius); }
.policy__table table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14px; }
.policy__table th, .policy__table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.policy__table tr:last-child td { border-bottom: 0; }
.policy__table th { font-weight: 600; white-space: nowrap; }
.consent__more { font-size: 13px; margin-top: 8px; }

/* ── 푸터 ─────────────────────────────── */
.footer { max-width: var(--measure); margin: 0 auto; padding: 36px var(--gutter) 56px; color: var(--ink-soft); font-size: 13px; display: grid; gap: 8px; border-top: 1px solid var(--line); }

/* ── 넓은 화면 ─────────────────────────── */
@media (min-width: 760px) {
  :root { --gutter: 32px; }
  .hero { grid-template-columns: 1fr auto; align-items: end; padding-top: 96px; padding-bottom: 64px; }
  .lift { justify-items: end; }
  .lift__floor { font-size: 120px; }
  .how { grid-template-columns: repeat(3, 1fr); }
  .how li { border-left: 0; border-top: 6px solid var(--ink); }
  .prices { grid-template-columns: repeat(2, 1fr); }
  .survey { padding: 32px; }
  .grid { grid-template-columns: repeat(7, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
