@font-face {
  font-family: "Pretendard";
  src: url("../fonts/Pretendard.woff2") format("woff2-variations");
  font-weight: 45 920;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono.woff2") format("woff2-variations");
  font-weight: 100 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2012-2015, U+2212, U+20A9;
}

:root {
  --color-ink: #14191b;
  --color-ink-2: #2b3335;
  --color-muted: #566164;
  --color-line: #dce1df;
  --color-line-strong: #c3cbc8;
  --color-bg: #ffffff;
  --color-shade: #f3f5f4;
  --color-accent: #0e6b4e;
  --color-accent-strong: #0a553e;
  --color-accent-soft: #e6f2ed;
  --color-loss: #b42318;
  --color-loss-soft: #fdf0ee;
  --color-pending: #8a5a00;
  --color-pending-soft: #fdf5e3;

  --font-sans: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --fs-h1: clamp(2.125rem, 1.35rem + 3.1vw, 3.75rem);
  --fs-h2: clamp(1.625rem, 1.2rem + 1.6vw, 2.5rem);
  --fs-h3: 1.25rem;
  --fs-body: 1.0625rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-lift: 0 1px 2px rgb(20 25 27 / 0.05), 0 12px 32px -12px rgb(20 25 27 / 0.16);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--color-ink);
  background: var(--color-bg);
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; text-wrap: balance; color: var(--color-ink); }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
img, svg { display: block; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--color-muted); }
.loss { color: var(--color-loss); }
.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; }

:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: 16px; top: 12px; transform: translateY(-200%); z-index: 30; padding: 10px 14px; background: var(--color-ink); color: #fff; border-radius: var(--radius-sm); text-decoration: none; }
.skip:focus { transform: none; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none;
  border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.12s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--color-accent); color: #fff; }
.btn--primary:hover { background: var(--color-accent-strong); }
.btn--ghost { background: var(--color-bg); color: var(--color-ink); border-color: var(--color-line-strong); }
.btn--ghost:hover { border-color: var(--color-ink); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.topbar.is-scrolled { border-bottom-color: var(--color-line); }
.topbar__inner { display: flex; align-items: center; gap: 40px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 30px; height: 30px; }
.brand__name { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
.nav { display: flex; gap: 28px; font-size: 0.9375rem; color: var(--color-ink-2); }
.nav a, .link-quiet { text-decoration: none; padding-block: 8px; }
.nav a:hover, .link-quiet:hover { color: var(--color-accent); }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 20px; font-size: 0.9375rem; }

/* Hero */
.hero { padding: clamp(40px, 6vw, 88px) 0 clamp(64px, 8vw, 112px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__kicker { font-size: 0.9375rem; font-weight: 600; color: var(--color-accent); margin-bottom: 20px; }
.hero h1 { font-size: var(--fs-h1); font-weight: 700; line-height: 1.3; letter-spacing: -0.015em; }
.br-sm { display: none; }
.lead { margin-top: 24px; font-size: 1.1875rem; line-height: 1.7; color: var(--color-ink-2); max-width: 34em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.fineprint { margin-top: 18px; font-size: 0.875rem; color: var(--color-muted); }

/* Ledger: the product artifact */
.ledger {
  margin: 0;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift), 0 0 0 1px rgb(20 25 27 / 0.07);
  padding: 22px 22px 16px;
  position: relative;
}
.ledger__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ledger__period { font-size: 0.875rem; color: var(--color-muted); }
.ledger__sum { margin-top: 2px; font-size: 1.125rem; font-weight: 600; }
.ledger__sum .num { font-size: 1.5rem; font-weight: 700; margin-right: 4px; }
.nowrap { white-space: nowrap; }
.tag { flex: none; font-size: 0.75rem; font-weight: 600; color: var(--color-muted); background: var(--color-shade); padding: 4px 8px; border-radius: 4px; }

.filters { display: flex; gap: 6px; margin: 18px 0 8px; padding: 4px; background: var(--color-shade); border-radius: var(--radius-md); width: fit-content; }
.filter {
  font: inherit; font-size: 0.875rem; font-weight: 600; color: var(--color-muted);
  min-height: 36px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.filter .num { font-size: 0.8125rem; margin-left: 4px; font-weight: 500; }
.filter:hover { color: var(--color-ink); }
.filter.is-on { background: var(--color-bg); color: var(--color-ink); box-shadow: 0 1px 2px rgb(20 25 27 / 0.1); }

.rows { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.rows th { font-size: 0.8125rem; font-weight: 500; color: var(--color-muted); text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--color-line-strong); }
.rows td { padding: 12px 8px; border-bottom: 1px solid var(--color-line); vertical-align: middle; }
.rows tbody tr:last-child td { border-bottom: 0; }
.rows .r { text-align: right; white-space: nowrap; }
.rows th:first-child, .rows td:first-child { padding-left: 0; }
.rows th:last-child, .rows td:last-child { padding-right: 0; }
.store { display: block; font-size: 0.75rem; color: var(--color-muted); line-height: 1.4; }
.item { display: block; font-weight: 500; line-height: 1.45; }
.rows tr[hidden] { display: none; }
.rows tbody tr { transition: opacity 0.3s var(--ease); }

.status { display: inline-flex; align-items: baseline; gap: 6px; font-size: 0.8125rem; font-weight: 600; padding: 3px 8px; border-radius: 4px; white-space: nowrap; }
.status b { font-weight: 600; }
.status--ok { color: var(--color-muted); padding-inline: 0; }
.status--loss { color: var(--color-loss); background: var(--color-loss-soft); }
.status--pending { color: var(--color-pending); background: var(--color-pending-soft); }
.status.is-checking { color: var(--color-muted); background: transparent; padding-inline: 0; }
.status.is-checking::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--color-line-strong); align-self: center; animation: pulse 0.9s ease-in-out infinite; }
@keyframes pulse { 50% { background: var(--color-accent); } }
.ledger__foot { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--color-line); font-size: 0.8125rem; color: var(--color-muted); }

/* Section heads */
.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head h2, .faq h2, .start h2, .trust h2 { font-size: var(--fs-h2); font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; }
.section-head p { margin-top: 16px; color: var(--color-ink-2); max-width: 38em; }
.section-head--row { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; }
.section-head--row p { margin-top: 0; }

/* Leaks */
.leaks { padding: clamp(72px, 9vw, 128px) 0; background: var(--color-shade); }
.leak { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(28px, 6vw, 96px); align-items: center; padding: clamp(36px, 4vw, 56px) 0; border-top: 1px solid var(--color-line-strong); }
.leak--flip .leak__text { order: 2; }
.leak__no { font-size: 0.875rem; color: var(--color-accent); font-weight: 600; margin-bottom: 12px; }
.leak h3 { font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem); font-weight: 700; line-height: 1.4; }
.leak__text p:last-child { margin-top: 14px; color: var(--color-ink-2); max-width: 32em; }

.slip { background: var(--color-bg); border-radius: var(--radius-md); padding: 22px 24px; box-shadow: 0 1px 2px rgb(20 25 27 / 0.06); }
.slip__title { font-size: 0.875rem; color: var(--color-muted); padding-bottom: 12px; border-bottom: 1px solid var(--color-line); }
.slip__lines { margin: 0; }
.slip__lines div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--color-line); }
.slip__lines dt { color: var(--color-ink-2); }
.slip__lines dd { margin: 0; }
.slip__lines .slip__total { border-bottom: 0; border-top: 1px solid var(--color-ink); margin-top: 6px; padding-top: 14px; font-weight: 700; }
.slip__total dd { font-size: 1.125rem; }

.days { list-style: none; margin: 18px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.days::before { content: ""; position: absolute; left: 6px; right: 6px; top: 6px; height: 2px; background: linear-gradient(90deg, var(--color-line-strong) 50%, var(--color-pending) 50%); }
.days li { position: relative; padding-top: 24px; font-size: 0.9375rem; color: var(--color-ink-2); }
.days li::before { content: ""; position: absolute; top: 0; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--color-bg); border: 2px solid var(--color-line-strong); }
.days li:last-child { text-align: right; }
.days li:last-child::before { left: auto; right: 0; }
.days li:nth-child(2) { text-align: center; }
.days li:nth-child(2)::before { left: calc(50% - 7px); }
.days span { display: block; font-size: 0.8125rem; color: var(--color-muted); }
.days .is-late { color: var(--color-pending); font-weight: 600; }
.days .is-late::before { border-color: var(--color-pending); background: var(--color-pending); }
.days b { display: block; font-size: 0.8125rem; font-weight: 600; }

/* How */
.how { padding: clamp(72px, 9vw, 128px) 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; position: relative; border-top: 2px solid var(--color-line); }
.steps::before { content: ""; position: absolute; left: 0; top: -2px; height: 2px; width: 100%; background: var(--color-accent); transform-origin: left; transform: scaleX(var(--progress, 1)); }
.step { padding-top: 28px; }
.step__no { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--color-ink); font-size: 0.875rem; font-weight: 600; margin-bottom: 18px; }
.step h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.4; }
.step p { margin-top: 10px; color: var(--color-ink-2); }

/* Trust */
.trust { padding: clamp(64px, 8vw, 112px) 0; border-top: 1px solid var(--color-line); }
.trust__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px 64px; }
.trust__list { margin: 0; }
.trust__list div { display: grid; grid-template-columns: 11em 1fr; gap: 8px 24px; padding: 20px 0; border-bottom: 1px solid var(--color-line); }
.trust__list div:first-child { padding-top: 6px; }
.trust__list dt { font-weight: 700; }
.trust__list dd { margin: 0; color: var(--color-ink-2); }

/* Pricing */
.pricing { padding: clamp(72px, 9vw, 128px) 0; background: var(--color-shade); }
.plans { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; align-items: stretch; }
.plan { display: flex; flex-direction: column; background: var(--color-bg); border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 36px); border: 1px solid var(--color-line); }
.plan--main { border: 2px solid var(--color-accent); }
.plan h3 { font-size: var(--fs-h3); font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan__note { font-size: 0.8125rem; font-weight: 600; color: var(--color-accent); }
.plan__price { margin-top: 14px; font-size: 1.125rem; font-weight: 600; }
.plan__price .num { font-size: clamp(2rem, 1.6rem + 1.2vw, 2.625rem); font-weight: 700; letter-spacing: -0.03em; }
.plan__price small { font-size: 0.875rem; font-weight: 400; color: var(--color-muted); }
.plan__fit { margin-top: 6px; color: var(--color-muted); font-size: 0.9375rem; }
.plan__list { list-style: none; margin: 24px 0 28px; padding: 0; border-top: 1px solid var(--color-line); flex: 1; }
.plan__list li { padding: 11px 0 11px 28px; border-bottom: 1px solid var(--color-line); position: relative; }
.plan__list li::before { content: ""; position: absolute; left: 4px; top: 19px; width: 10px; height: 5px; border-left: 2px solid var(--color-accent); border-bottom: 2px solid var(--color-accent); transform: rotate(-45deg); }
.plan .btn { align-self: flex-start; }
.plans__more { margin-top: 24px; color: var(--color-ink-2); font-size: 0.9375rem; }
.plans__more a { color: var(--color-accent); font-weight: 600; }

/* FAQ */
.faq { padding: clamp(72px, 9vw, 128px) 0; }
.faq h2 { margin-bottom: 40px; }
.faq__grid { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; }
.faq__grid div { padding: 24px 0; border-top: 1px solid var(--color-line); }
.faq__grid dt { font-weight: 700; font-size: 1.0625rem; }
.faq__grid dd { margin: 8px 0 0; color: var(--color-ink-2); }

/* Start */
.start { padding: clamp(64px, 8vw, 104px) 0; background: var(--color-ink); color: #e9eeec; }
.start h2 { color: #fff; }
.start__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; }
.start p { margin-top: 14px; color: #b9c3c0; max-width: 30em; }
.signup label { display: block; font-size: 0.9375rem; font-weight: 600; margin-bottom: 10px; color: #fff; }
.signup__row { display: flex; gap: 8px; }
.signup input {
  flex: 1; min-width: 0; min-height: 52px; padding: 0 16px;
  font: inherit; color: var(--color-ink); background: #fff;
  border: 2px solid transparent; border-radius: var(--radius-sm);
}
.signup input::placeholder { color: #7d8789; }
.signup input:focus-visible { outline: 2px solid #5fd3a8; outline-offset: 2px; }
.signup input[aria-invalid="true"] { border-color: #f08a7e; }
.signup .btn { min-height: 52px; }
.start .btn--primary { background: #5fd3a8; color: var(--color-ink); }
.start .btn--primary:hover { background: #82e0bd; }
.start :focus-visible { outline-color: #5fd3a8; }
.signup__msg { min-height: 1.7em; margin-top: 10px; font-size: 0.9375rem; color: #b9c3c0; }
.signup__msg.is-error { color: #ffb4a9; }
.signup__msg.is-ok { color: #8fe6c4; }

/* Footer */
.footer { padding: 32px 0 40px; border-top: 1px solid var(--color-line); font-size: 0.875rem; color: var(--color-muted); }
.footer__inner { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.brand--sm .brand__mark { width: 24px; height: 24px; }
.brand--sm .brand__name { font-size: 1rem; color: var(--color-ink); }
.footer__links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer__links a { text-decoration: none; padding-block: 6px; }
.footer__links a:hover { color: var(--color-ink); }
.footer__links b { color: var(--color-ink-2); font-weight: 600; }
.footer__copy { margin-left: auto; }

/* Reveal motion */
.js .reveal.is-below { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js .reveal.is-below.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .status.is-checking::before { animation: none; }
  .steps::before { transform: none; }
}

/* Tablet */
@media (max-width: 1024px) {
  .nav { gap: 20px; }
  .topbar__inner { gap: 24px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__copy { max-width: 640px; }
  .ledger { max-width: 680px; }
  .trust__grid, .start__grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .section-head--row { grid-template-columns: 1fr; }
  .leak { grid-template-columns: 1fr; }
  .leak--flip .leak__text { order: 0; }
  .slip { max-width: 520px; }
  .steps { grid-template-columns: 1fr; border-top: 0; border-left: 2px solid var(--color-line); gap: 0; }
  .steps::before { top: 0; left: -2px; width: 2px; height: 100%; transform-origin: top; transform: scaleY(var(--progress, 1)); }
  .step { padding: 0 0 32px 28px; }
  .step:last-child { padding-bottom: 0; }
  .plans { grid-template-columns: 1fr; }
  .faq__grid { grid-template-columns: 1fr; }
}
/* Phone */
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .wrap { width: min(100% - 32px, var(--wrap)); }
  .topbar__inner { height: 60px; }
  .topbar__actions .link-quiet { display: none; }
  .br-sm { display: inline; }
  .lead { font-size: 1.0625rem; }
  .hero__cta .btn { flex: 1 1 100%; }
  .ledger { padding: 18px 16px 12px; }
  .rows thead { display: none; }
  .rows, .rows tbody { display: block; }
  .rows tr { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "item status" "nums nums"; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--color-line); }
  .rows tbody tr:last-child { border-bottom: 0; }
  .rows td { display: block; padding: 0; border: 0; }
  .rows td:first-child { grid-area: item; }
  .rows td:last-child { grid-area: status; align-self: start; }
  .rows td:nth-child(2), .rows td:nth-child(3) { grid-row: 2; text-align: left; font-size: 0.8125rem; color: var(--color-muted); }
  .rows td:nth-child(2) { grid-column: 1; }
  .rows td:nth-child(3) { grid-column: 1; padding-left: 7.5em; }
  .rows td:nth-child(2)::before { content: "예상 "; font-family: var(--font-sans); }
  .rows td:nth-child(3)::before { content: "입금 "; font-family: var(--font-sans); }
  .status { flex-direction: column; align-items: flex-end; gap: 0; }
  .status--ok { flex-direction: row; }
  .trust__list div { grid-template-columns: 1fr; }
  .signup__row { flex-direction: column; }
  .footer__copy { margin-left: 0; }
}
