/* =========================================================
   달칵 브랜딩 사이트 — 공통 스타일
   Figma: (브랜딩페이지)신규 작업 추가건 V2 / 신규 페이지 처리 요청건
   Desktop 1440 · Mobile 390 기준
   ========================================================= */

:root {
  /* Color tokens (Figma variables) */
  --bg-page: #0c0f18;
  --bg-card: #141924;
  --bg-muted: #1e232f;
  --border: #252a37;
  --border-input: #656e81;
  /* 브랜드 대표 색상 (요청사항: 주색상 #7C4BF2 / 보조 색상 #FFFFFF) */
  --brand: #7c4bf2;
  --brand-hover: #8d62f5;
  --on-brand: #ffffff;
  --brand-gradient: linear-gradient(135deg, #4b66ff 0%, #7c4bf2 55%, #913ffa 100%); /* 앱 아이콘 배경 */
  /* 어두운 배경 위 작은 글자·아이콘용 밝은 보라 (가독성 확보) */
  --primary: #ac8cf8;
  --on-primary: #130a29;
  --secondary: #2a2140;
  --on-secondary: #cfbdfa;
  --hero-muted: #e3d8fd;
  --logo: #ffffff;
  --text: #ebeff5;
  --text-2: #9ca5b4;
  --success: #47d191;

  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui,
    'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;

  --gnb-h: 72px;
  --gutter: clamp(40px, 8.333vw, 120px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg-page);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 8px; }
section[id] { scroll-margin-top: var(--gnb-h); }

.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Buttons (Figma: Button component) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-hover); }
.btn--white { background: var(--on-brand); color: var(--brand); }
.btn--white:hover { background: #f1ebff; }
.btn--outline { border: 1px solid var(--border-input); color: var(--text); }
.btn--outline:hover { background: rgba(235, 239, 245, .06); }
.btn--lg { height: 52px; font-weight: 600; }          /* Primary · Large (hero / final) */
.btn--md-semibold { height: 48px; font-weight: 600; } /* Primary · Large 48 (mobile) */
.btn--text {
  height: 44px;
  padding: 0;
  font-size: 13px;
  line-height: 19.5px;
  color: var(--primary);
}
.btn--text:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- GNB ---------- */
.gnb {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
}
.gnb__inner {
  height: calc(var(--gnb-h) - 1px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gnb__logo { display: flex; align-items: center; }
.gnb__logo img { width: auto; height: 36px; }
.gnb__menu {
  display: flex;
  gap: 40px;
  font-size: 15px;
  line-height: 24px;
  font-weight: 500;
  color: var(--text-2);
}
.gnb__menu a { transition: color .15s ease; }
.gnb__menu a:hover { color: var(--text); }

/* ---------- Section title (shared) ---------- */
.sec-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.sec-eyebrow {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: var(--primary);
}
.sec-h2 {
  font-size: 36px;
  line-height: 46px;
  font-weight: 700;
  letter-spacing: -0.54px;
  color: var(--text);
}
.sec-sub {
  font-size: 16px;
  line-height: 24px;
  color: var(--text-2);
}

/* ---------- Icon box ---------- */
.icon-box {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-box img { width: 24px; height: 24px; }

/* ---------- Phone mockup ---------- */
.phone {
  flex: none;
  width: 358px;
  height: 663px;
  padding: 10px;
  background: #05050a;
  border: 1.5px solid var(--border-input);
  border-radius: 44px;
  box-shadow: 0 24px 64px rgba(107, 77, 217, .35);
}
.phone__screen {
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: var(--bg-page);
}
.phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(to bottom right, #502f9a 0%, var(--bg-page) 86%);
  overflow: hidden;
}
.hero__inner {
  display: flex;
  align-items: center;
  gap: 64px;
  padding-top: 96px;
  padding-bottom: 104px;
}
.hero__copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand);
  border: 1px solid var(--brand);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: var(--on-brand);
}
.hero__title {
  font-size: 56px;
  line-height: 68px;
  font-weight: 700;
  letter-spacing: -1.12px;
  color: var(--logo);
}
.hero__desc {
  font-size: 17px;
  line-height: 1.6;
  color: var(--hero-muted);
}
.hero__cta { display: flex; gap: 12px; }
.hero__cta .btn--primary { width: 200px; }
.hero__cta .btn--outline { width: 180px; height: 52px; }
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.trust li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--hero-muted);
}
.trust img { width: 18px; height: 18px; }

/* ---------- Why 달칵 ---------- */
.why__inner,
.how__inner,
.faq-teaser__inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: 120px;
  padding-bottom: 120px;
}
.cards4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.benefit {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.benefit__title {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.1px;
  color: var(--text);
}
.benefit__desc {
  font-size: 14px;
  line-height: 20px;
  color: var(--text-2);
}

/* ---------- How it works ---------- */
.how { background: var(--bg-card); }
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.step__num {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--on-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}
.step--active .step__num { background: var(--brand); color: var(--on-brand); }
.step__body { display: flex; flex-direction: column; gap: 8px; }
.step__label { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--primary); }
.step__title { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.1px; }
.step__desc { font-size: 14px; line-height: 20px; color: var(--text-2); }

/* ---------- Convenience ---------- */
.conv__inner {
  display: flex;
  align-items: center;
  gap: 80px;
  padding-top: 120px;
  padding-bottom: 120px;
}
.conv__copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.conv__head { display: flex; flex-direction: column; gap: 12px; }
.feature { display: flex; align-items: flex-start; gap: 16px; }
.feature__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.feature__title { font-size: 16px; line-height: 24px; font-weight: 600; }
.feature__desc { font-size: 14px; line-height: 20px; color: var(--text-2); }

/* ---------- For Landlord ---------- */
.landlord { background: var(--secondary); }
.landlord__inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: 96px;
  padding-bottom: 96px;
}
.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.compare__card {
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.compare__card--tenant { background: var(--bg-page); border: 1.5px solid var(--brand); }
.compare__card--landlord { background: var(--bg-card); }
.compare__title { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.1px; }
.compare__card--tenant .compare__title { color: var(--primary); }
.check-list { display: flex; flex-direction: column; gap: 14px; }
.check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}
.check-list img { flex: none; width: 20px; height: 20px; }

/* ---------- FAQ (Figma: FAQ Item component) ---------- */
.faq-teaser__inner { align-items: center; }
.faq-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.faq-teaser .faq-card { max-width: 800px; }
.faq-item:not([hidden]) ~ .faq-item:not([hidden]) { border-top: 1px solid var(--border); }
.faq-item.is-open { background: var(--bg-muted); }
.faq-q {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 16px;
  text-align: left;
  font-size: 15px;
  line-height: 24px;
  font-weight: 500;
}
.faq-q:hover .faq-q__text { color: #fff; }
.faq-q__mark { flex: none; color: var(--primary); }
.faq-q__text { flex: 1; min-width: 0; color: var(--text); }
.faq-q__icon { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.faq-q__icon--up { display: none; }
.faq-item.is-open .faq-q__icon--down { display: none; }
.faq-item.is-open .faq-q__icon--up { display: block; }
.faq-a {
  display: none;
  padding: 0 16px 18px 43px;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-2);
}
.faq-item.is-open .faq-a { display: block; }

/* ---------- Final CTA ---------- */
.final__inner { padding-bottom: 96px; }
.final__card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--brand-gradient);
  border-radius: 32px;
  padding: 72px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.final__title {
  font-size: 36px;
  line-height: 46px;
  font-weight: 700;
  letter-spacing: -0.54px;
  color: var(--logo);
}
.final__desc { font-size: 16px; line-height: 24px; color: rgba(255, 255, 255, .88); }
.final__card .btn { width: 240px; }

/* ---------- Footer (Figma: Footer / 사업자 정보) ---------- */
.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
  padding-bottom: 16px;
}
.footer__block { width: 358px; max-width: 100%; color: var(--text-2); }
.footer__head { font-size: 13px; line-height: 19.5px; }
.footer__head strong { font-weight: 500; color: var(--text); }
.footer__dl {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  padding-top: 2px;
  font-size: 13px;
  line-height: 19.5px;
}
.footer__dl > div { display: flex; gap: 4px; }
.footer__dl > div.is-full { flex-basis: 100%; }
.footer__dl dt { flex: none; }
.footer__dl dd { min-width: 0; }
.footer__dl > div.is-full dd { flex: 1; }
.footer__block--sm .footer__head,
.footer__block--sm .footer__dl { font-size: 12px; line-height: 16px; }
.footer__nav {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 13px;
  line-height: 19.5px;
  color: var(--text-2);
}
.footer__nav a { display: inline-flex; align-items: center; min-height: 44px; }
.footer__nav a:hover { color: var(--text); }
.footer__nav a.is-strong { font-weight: 600; color: var(--text); }
.footer__nav .dot { color: rgba(156, 165, 180, .6); }

/* =========================================================
   Responsive
   ========================================================= */

/* Tablet & small desktop */
@media (max-width: 1100px) {
  .hero__inner { gap: 40px; }
  .hero__title { font-size: 48px; line-height: 58px; letter-spacing: -0.96px; }
  .cards4, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .conv__inner { gap: 48px; }
}

@media (max-width: 1023px) {
  .hero__inner { flex-direction: column; align-items: stretch; }
  .hero .phone { align-self: center; }
  .conv__inner { flex-direction: column; align-items: stretch; }
  .conv .phone { align-self: center; }
}

/* Mobile (Figma: V2-2 Mobile 390) */
@media (max-width: 767px) {
  :root { --gnb-h: 60px; --gutter: 20px; }

  .gnb__logo img { height: 30px; }
  .gnb__menu { display: none; }

  .sec-title { align-items: flex-start; text-align: left; }
  .sec-h2 { font-size: 28px; line-height: 36px; letter-spacing: -0.28px; }

  /* Hero */
  .hero__inner { gap: 40px; padding-top: 48px; padding-bottom: 56px; }
  .hero__copy { gap: 20px; }
  .hero__title { font-size: 36px; line-height: 46px; letter-spacing: -0.54px; }
  .hero__desc { font-size: 16px; }
  .hero__cta { flex-direction: column; width: 100%; }
  .hero__cta .btn--primary { width: 100%; height: 48px; }
  .hero__cta .btn--outline { width: 100%; height: 44px; }
  .trust { flex-direction: column; gap: 10px; }

  .phone {
    width: 327px;
    height: 543px;
    border-radius: 40px;
  }
  .phone__screen { border-radius: 31px; }

  /* Why */
  .why__inner, .how__inner, .faq-teaser__inner { gap: 28px; padding-top: 64px; padding-bottom: 64px; }
  .cards4 { grid-template-columns: 1fr; gap: 12px; }
  .benefit { padding: 24px; }

  /* How */
  .steps { display: flex; flex-direction: column; gap: 0; }
  .step { flex-direction: row; gap: 16px; padding-bottom: 24px; }
  .step__body { flex: 1; min-width: 0; }

  /* Convenience */
  .conv__inner { gap: 40px; padding-top: 64px; padding-bottom: 64px; }

  /* Landlord */
  .landlord__inner { gap: 28px; padding-top: 56px; padding-bottom: 56px; }
  .compare { grid-template-columns: 1fr; }

  /* FAQ teaser */
  .faq-teaser__inner { align-items: stretch; }
  .faq-teaser .btn--text { align-self: center; }

  /* Final CTA */
  .final__inner { padding-bottom: 56px; }
  .final__card { border-radius: 24px; padding: 48px 24px; }
  .final__title { font-size: 28px; line-height: 36px; letter-spacing: -0.28px; }
  .final__card .btn { width: 100%; height: 48px; }

  /* Footer */
  .footer .container { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 359px) {
  .hero .phone-wrap { width: 100%; }
  .phone { width: 100%; height: auto; aspect-ratio: 327 / 543; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* =========================================================
   FAQ 페이지 (Figma: 07-1 자주 묻는 질문 — Mobile 390)
   ========================================================= */
.page-faq { min-height: 100vh; display: flex; flex-direction: column; }
.page-faq main { flex: 1; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-page);
}
.app-header__inner {
  max-width: 720px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
}
.app-header__back {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-header__back:hover { background: rgba(235, 239, 245, .06); }
.app-header__title { font-size: 17px; line-height: 24px; font-weight: 600; }

.faq-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 32px;
}
.faq-intro { display: flex; flex-direction: column; gap: 6px; }
.faq-intro__title { font-size: 22px; line-height: 30px; font-weight: 700; letter-spacing: -0.22px; }
.faq-intro__desc { font-size: 14px; line-height: 20px; color: var(--text-2); }

.search {
  margin-top: 24px;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .15s ease;
}
.search:focus-within { border-color: var(--primary); }
.search img { flex: none; width: 20px; height: 20px; }
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--text);
}
.search input::placeholder { color: var(--text-2); }
.search input::-webkit-search-cancel-button { filter: invert(.7); }

.chips {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--text-2);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.chip:hover { color: var(--text); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

.faq-group { margin-top: 24px; }
.faq-group__label { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text-2); }
.faq-group .faq-card { margin-top: 10px; }

.faq-empty {
  margin-top: 24px;
  padding: 32px 16px;
  text-align: center;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-2);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.contact-card {
  margin-top: 24px;
  padding: 20px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.contact-card__title { font-size: 16px; line-height: 24px; font-weight: 600; }
.contact-card__desc { margin-top: 12px; font-size: 14px; line-height: 20px; color: var(--text-2); }
.contact-card__actions { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.contact-card__actions .btn { width: 100%; }

.page-faq .footer__inner { max-width: 720px; padding-left: 16px; padding-right: 16px; }

/* =========================================================
   앱 내려받기 선택 창 (PC에서 '앱 시작하기' 클릭 시)
   ========================================================= */
.store-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.store-modal__backdrop { position: absolute; inset: 0; background: rgba(5, 5, 10, .72); }
.store-modal__panel {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 28px 24px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(107, 77, 217, .35);
  text-align: center;
}
.store-modal__title { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.1px; }
.store-modal__desc { margin-top: 8px; font-size: 14px; line-height: 20px; color: var(--text-2); }
.store-modal__actions { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.store-modal__actions .btn { width: 100%; height: 48px; font-weight: 600; }
.store-modal__close {
  margin-top: 8px;
  height: 44px;
  padding: 0 16px;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-2);
}
.store-modal__close:hover { color: var(--text); }

/* =========================================================
   브랜드 배경 그림 요소 (집 · 마우스)
   ========================================================= */
.hero .phone-wrap,
.conv .phone { position: relative; }
.phone-wrap { position: relative; flex: none; }
.deco { position: absolute; pointer-events: none; user-select: none; height: auto; }
.deco--house { filter: drop-shadow(0 16px 32px rgba(20, 10, 60, .45)); }
.deco--mouse { filter: drop-shadow(0 12px 28px rgba(20, 10, 60, .4)); }

.hero .deco--house { width: 200px; left: -150px; top: 44px; z-index: 2; animation: float 5s ease-in-out infinite; }
.hero .phone { position: relative; z-index: 1; }
.hero .deco--mouse { width: 230px; right: -96px; bottom: -104px; z-index: 0; filter: none; }

.final__card > *:not(.deco) { position: relative; z-index: 1; }
.final .deco--house { width: 230px; right: 72px; top: 44px; z-index: 0; }
.final .deco--mouse { width: 260px; left: 88px; bottom: 0; z-index: 0; filter: none; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (max-width: 1100px) {
  .final .deco--house { width: 180px; right: 32px; }
  .final .deco--mouse { width: 200px; left: 32px; }
}
@media (max-width: 1023px) {
  .hero .phone-wrap { align-self: center; }
  .hero .deco--house { width: 150px; left: -96px; top: 40px; }
  .hero .deco--mouse { width: 190px; right: -110px; bottom: -104px; }
}
@media (max-width: 767px) {
  .hero .deco--house { width: 108px; left: auto; right: -12px; top: -34px; }
  .hero .deco--mouse { width: 140px; right: -16px; bottom: -56px; }
  .final__card { padding: 64px 24px 96px; }
  .final .deco--house { width: 72px; right: 14px; top: 14px; }
  .final .deco--mouse { width: 128px; left: 50%; margin-left: -64px; }
}
@media (prefers-reduced-motion: reduce) {
  .deco { animation: none !important; }
}
