/* ============================================================
   홈 허브 — 소개 랜딩
   장부의 표지와 내지: 먹 한 줄, 종이 두 면, 괘선.
   ============================================================ */

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -.011em;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--on-ink);
  padding: 10px 14px; z-index: 200;
}
.skip:focus { left: 12px; top: 12px; }

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

:focus-visible { outline: 2.5px solid var(--teal); outline-offset: 2px; }

/* ---------- 상단 내비 ---------- */
.lnav {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper-rise);
  border-bottom: 1px solid var(--ink);
}
.lnav-in {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 0 40px; height: 64px;
}
.lbrand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.lmark {
  width: 28px; height: 28px; display: grid; place-items: center;
  border: 1.4px solid var(--ink); background: var(--paper-rise);
}
.lmark svg { width: 17px; height: 17px; }
.lbrand-text b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.lbrand-text small { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.4; }

.lnav-links { display: flex; align-items: center; gap: 28px; }
.lnav-links a {
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  text-decoration: none; padding: 6px 0;
}
.lnav-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.lnav-links .lapp {
  height: 44px; padding: 0 16px; display: inline-grid; place-items: center;
  background: var(--ink); color: var(--paper-rise);
  border: 1.4px solid var(--ink); text-decoration: none;
}
.lnav-links .lapp:hover { background: var(--teal-ink); border-color: var(--teal-ink); color: var(--paper-rise); text-decoration: none; }
.lnav-links .llogin {
  height: 44px; padding: 0 14px; display: inline-grid; place-items: center;
  border: 1.4px solid var(--line-2); color: var(--ink); text-decoration: none;
}
.lnav-links .llogin:hover { background: var(--paper-2); border-color: var(--ink); text-decoration: none; }

/* ---------- 본문 ---------- */
.landing { max-width: 1180px; margin: 0 auto; padding: 32px 40px 0; }

/* ---------- 첫 화면: 펼친 장부 ---------- */
.book {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1.4px solid var(--ink);
  background: var(--paper-rise);
}
.page { padding: 40px 42px; min-width: 0; }
.page.left { border-right: 2px solid var(--ink); display: flex; flex-direction: column; }
.page.right { background: var(--paper); }

h1 {
  font-size: 40px; line-height: 1.1; letter-spacing: -.048em;
  font-weight: 800; text-wrap: balance; word-break: keep-all;
}
h1 em {
  font-style: normal;
  background: linear-gradient(transparent 62%, var(--hl) 62%);
}
.lede {
  margin-top: 20px; font-size: 16px; line-height: 1.75;
  color: var(--ink-2); max-width: 31ch; word-break: keep-all;
}

.ctas { margin-top: 26px; display: flex; flex-direction: column; gap: 9px; max-width: 340px; }
.btn {
  height: 50px; padding: 0 18px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 700; letter-spacing: -.015em;
  text-decoration: none; border: 1.4px solid var(--ink);
  transition: background .14s ease, color .14s ease, border-color .14s ease, transform .06s ease;
}
.btn.primary { background: var(--ink); color: var(--paper-rise); }
.btn.primary:hover { background: var(--teal-ink); border-color: var(--teal-ink); }
.btn.soft { background: transparent; color: var(--ink); border-color: var(--rule-2); }
.btn.soft:hover { background: var(--ink); border-color: var(--ink); color: var(--paper-rise); }
.btn:active { transform: translateY(1px); }

.note { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); }

.stamp {
  margin-top: auto; padding-top: 34px;
  display: flex; gap: 12px; align-items: center;
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-3);
  letter-spacing: .06em;
}
.stamp span:first-child { letter-spacing: .16em; }

/* ---------- 오른쪽 면: 샘플 장부 ---------- */
.sheet-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; padding-bottom: 9px; border-bottom: 2px solid var(--ink);
}
.sheet-head b { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.sheet-head span { font-size: 12px; color: var(--ink-3); }

.totals { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--rule-2); }
.tot { padding: 13px 0 11px; }
.tot + .tot { border-left: 1px solid var(--rule); padding-left: 16px; }
.tot b {
  display: block; font-family: var(--mono); font-weight: 500;
  font-size: 27px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.tot b.hot { color: var(--seal); }
.tot span { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-3); }

.sheet { width: 100%; border-collapse: collapse; margin-top: 4px; table-layout: fixed; }
.sheet th, .sheet td { text-align: left; font-weight: 400; }
.sheet thead th {
  padding: 10px 0 8px; border-bottom: 1px solid var(--rule);
  font-size: 11.5px; font-weight: 700; color: var(--ink-3);
}
.sheet tbody th, .sheet tbody td { padding: 11px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.sheet tbody th { padding-right: 12px; overflow-wrap: anywhere; }
.sheet tbody th b { display: block; font-size: 14.5px; font-weight: 700; letter-spacing: -.02em; }
.sheet tbody th span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--ink-3); }
.sheet .num {
  width: 82px; font-family: var(--mono); font-size: 11.5px;
  color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.sheet .st { width: 84px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.sheet .st.over { color: var(--seal); }
.sheet .st.due { color: var(--amber); }
.sheet .act { width: 78px; text-align: right; }
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 62px; height: 34px; padding: 0 10px;
  border: 1.4px solid var(--ink); background: var(--paper-rise);
  font-size: 12.5px; font-weight: 700; color: var(--ink);
}

.sheet-foot {
  display: flex; justify-content: space-between; gap: 12px;
  padding-top: 12px; font-size: 12px; color: var(--ink-3);
}
.sheet-foot b { color: var(--ink); }

.sheet-note {
  margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--rule);
  font-size: 12px; color: var(--ink-3);
}

/* ---------- 섹션 공통 ---------- */
.sec { margin-top: 64px; scroll-margin-top: 80px; }
.sec-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  border-top: 2px solid var(--ink); padding-top: 14px; margin-bottom: 16px;
}
.sec-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.035em; line-height: 1.25; }
.sec-head p { font-size: 13px; color: var(--ink-3); text-align: right; word-break: keep-all; }

/* ---------- 네 장 ---------- */
.chapters { display: grid; grid-template-columns: 1fr 1fr; column-gap: 44px; }
.chapter {
  display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center;
  padding: 15px 0; border-bottom: 1px solid var(--rule);
  text-decoration: none; color: var(--ink);
  transition: background .14s ease;
}
.chapter:hover { background: var(--paper-rise); }
.ch-no { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.ch-body b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.025em; }
.ch-body span { display: block; margin-top: 3px; font-size: 13px; color: var(--ink-3); word-break: keep-all; }
.ch-go { font-size: 12.5px; font-weight: 700; color: var(--teal-ink); white-space: nowrap; }

/* ---------- 3단계 ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; list-style: none; }
.steps li { border-top: 1px solid var(--rule-2); padding-top: 14px; }
.st-no { display: block; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.steps b { display: block; margin-top: 8px; font-size: 17px; font-weight: 800; letter-spacing: -.025em; }
.steps p { margin-top: 6px; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); word-break: keep-all; }

/* ---------- 저장과 백업 ---------- */
.backup {
  border: 1.4px solid var(--ink); background: var(--paper-rise);
  padding: 26px 28px 28px;
}
.backup h2 { font-size: 24px; font-weight: 800; letter-spacing: -.035em; }
.backup p { margin-top: 12px; font-size: 14px; line-height: 1.7; color: var(--ink-2); max-width: 62ch; word-break: keep-all; }
.backup .backup-warn { margin-top: 10px; font-size: 15px; font-weight: 700; color: var(--ink); }
.backup .link {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px;
  font-size: 14px; font-weight: 700; color: var(--teal-ink); text-decoration: none;
  border-bottom: 1px solid var(--teal-soft); padding-bottom: 2px;
}
.backup .link:hover { border-bottom-color: var(--teal); }

/* ---------- 가이드 ---------- */
.gl { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 40px; list-style: none; }
.gl a {
  display: block; padding: 11px 0; border-bottom: 1px solid var(--rule);
  font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none;
}
.gl a:hover { background: var(--paper-rise); padding-left: 8px; }
.gl a::after { content: " →"; color: var(--ink-3); }

/* ---------- 마지막 CTA ---------- */
.final { margin-top: 72px; border-top: 2px solid var(--ink); padding: 30px 0 6px; }
.final h2 { font-size: 36px; font-weight: 800; letter-spacing: -.04em; line-height: 1.2; word-break: keep-all; }
.final p { margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.ctas-row { flex-direction: row; flex-wrap: wrap; margin-top: 22px; max-width: none; }
.ctas-row .btn { padding: 0 20px; }

/* ---------- 푸터 ---------- */
.lfoot { margin-top: 56px; border-top: 1px solid var(--ink); background: var(--paper-rise); }
.lfoot-in {
  max-width: 1180px; margin: 0 auto; padding: 26px 40px 30px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.lfoot-brand b { font-size: 14px; font-weight: 800; letter-spacing: -.02em; }
.lfoot-brand span { margin-left: 8px; font-size: 12px; color: var(--ink-3); }
.lfoot nav { display: flex; gap: 18px; margin-left: auto; }
.lfoot nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-decoration: none;
}
.lfoot nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.lfoot p { flex-basis: 100%; font-size: 12px; color: var(--ink-3); }

/* ---------- 반응형 ---------- */
@media (max-width: 900px) {
  .lnav-in { padding: 0 20px; height: auto; min-height: 60px; }
  .lnav-links { gap: 16px; }
  .lnav-links a:not(.lapp):not(.llogin) { display: none; }
  .landing { padding: 20px 16px 0; }
  .book { grid-template-columns: 1fr; }
  .page { padding: 28px 22px; }
  .page.left { border-right: 0; border-bottom: 2px solid var(--ink); }
  h1 { font-size: 30px; }
  .ctas { max-width: none; }
  .stamp { padding-top: 26px; }
  .chapters { grid-template-columns: 1fr; column-gap: 0; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .gl { grid-template-columns: repeat(2, 1fr); column-gap: 24px; }
  .sec { margin-top: 48px; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .sec-head p { text-align: left; }
  .backup { padding: 20px 20px 22px; }
  .final h2 { font-size: 27px; }
  .lfoot-in { padding: 22px 20px 26px; }
  .lfoot nav { margin-left: 0; flex-basis: 100%; }
}

@media (max-width: 560px) {
  .col-due { display: none; }
  .page { padding: 26px 20px; }
  .sheet .st { width: 70px; }
  .sheet .act { width: 64px; }
  .tot b { font-size: 24px; }
  .sheet tbody th b { font-size: 13.5px; }
}

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