/* ─────────────────────────────────────────────────────────────
   손사ON Web 공개 화면(랜딩·로그인·회원가입) 전용 스타일.
   밝은 파랑 + 남색 글자. 로그인 후 화면(site.css)과 같은 파랑(--b-500)을 쓴다.
   격자선이 보이는 그리드 레이아웃: 컨테이너 배경을 선 색으로 두고
   gap:1px 사이로 비치게 해서 셀 경계를 그린다.
   CSP(style-src 'self') 때문에 인라인 스타일 없이 이 파일만 쓴다.
   ───────────────────────────────────────────────────────────── */
:root {
    --b-50: #f4f8fe;
    --b-100: #e6effd;
    --b-200: #c9dcfb;
    --b-300: #9cc0f8;
    --b-500: #2468e5;
    --b-600: #1b50b8;
    --b-700: #173f93;
    --ink: #101d33;
    --ink-2: #3b4960;
    --muted: #66758c;
    --paper: #ffffff;
    --line: #d9e4f4;
    --line-strong: #b9c9e2;
    --on-dark: #c3d0e4;
    --radius: 10px;
    --pill: 999px;
    --wrap: 1200px;
}

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

html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: 76px; }

body.pub {
    margin: 0;
    background: var(--b-50);
    color: var(--ink);
    font-family: "Pretendard", "Pretendard Variable", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    word-break: keep-all;
}

.pub img { max-width: 100%; display: block; }
.pub a { color: inherit; }
.pub :where(h1, h2, h3, p) { margin: 0; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--ink); color: #fff; padding: .5rem 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }

/* ── 공통 격자 ── */
.grid {
    display: grid;
    gap: 1px;
    background: var(--line);
    border-bottom: 1px solid var(--line);
}
.cell { background: var(--paper); padding: 2.5rem; min-width: 0; }
.cell-tint { background: var(--b-50); }
.cell-accent { background: var(--b-500); color: #fff; }
.cell-dark { background: var(--ink); color: #fff; }
.cell-media { padding: 0; overflow: hidden; display: flex; }
.cell-media img { width: 100%; height: 100%; object-fit: cover; }

.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-hero { grid-template-columns: 7fr 5fr; }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }

/* ── 타이포그래피 ── */
.eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .8125rem; font-weight: 700; letter-spacing: .04em;
    color: var(--b-600);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--b-500); }
.cell-dark .eyebrow { color: var(--b-300); }
.cell-accent .eyebrow { color: #fff; }
.cell-accent .eyebrow::before { background: #fff; }

.display {
    font-size: clamp(2.1rem, 4.6vw, 3.5rem);
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -.03em;
    margin-top: 1.25rem;
}
.display em { font-style: normal; color: var(--b-500); }
.title {
    font-size: clamp(1.5rem, 2.8vw, 2.125rem);
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -.02em;
    margin-top: .9rem;
}
.title em { font-style: normal; color: var(--b-500); }
.cell-dark .title em { color: var(--b-300); }
.lead { font-size: 1.0625rem; line-height: 1.7; color: var(--ink-2); margin-top: 1.25rem; max-width: 36rem; }
.cell-dark .lead { color: var(--on-dark); }
.body { font-size: .9375rem; line-height: 1.65; color: var(--ink-2); margin-top: .6rem; }
.cell-dark .body { color: var(--on-dark); }
.cell-accent .body { color: #fff; }

/* ── 버튼 ──
   중요도: primary(파랑 채움, 화면당 하나의 주 행동) > ghost(테두리, 보조 행동) > 글자 링크.
   파랑/남색 바탕 위에서는 light(흰 채움)가 주 행동이다. */
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    min-height: 48px; padding: 0 1.5rem;
    border-radius: var(--radius); border: 1.5px solid transparent;
    font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:focus-visible { outline: 3px solid var(--b-300); outline-offset: 2px; }
.btn-primary { background: var(--b-500); color: #fff; border-color: var(--b-500); box-shadow: 0 6px 16px rgba(36, 104, 229, .24); }
.pub a.btn-primary { color: #fff; }
.btn-primary:hover { background: var(--b-600); border-color: var(--b-600); box-shadow: 0 8px 20px rgba(36, 104, 229, .32); }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover { background: var(--b-700); border-color: var(--b-700); }
.btn-light { background: #fff; color: var(--b-600); border-color: #fff; box-shadow: 0 6px 16px rgba(16, 29, 51, .18); }
.pub a.btn-light { color: var(--b-600); }
.btn-light:hover { background: var(--b-100); border-color: var(--b-100); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); font-weight: 600; }
.btn-ghost:hover { border-color: var(--b-500); color: var(--b-600); background: var(--b-50); }
.cell-dark .btn-ghost, .cell-accent .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .55); }
.cell-dark .btn-ghost:hover, .cell-accent .btn-ghost:hover { background: rgba(255, 255, 255, .14); border-color: #fff; color: #fff; }
.btn-block { width: 100%; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ── 헤더 ── */
.pub-header { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); }
.pub-header .grid { grid-template-columns: auto 1fr auto auto; border-bottom: 0; }
.pub-header .cell { padding: 0 1.5rem; min-height: 68px; display: flex; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand b { color: var(--b-500); }
.pub-nav { gap: 2rem; }
.pub-nav a { text-decoration: none; font-weight: 600; color: var(--ink-2); font-size: .9375rem; padding: .35rem 0; border-bottom: 2px solid transparent; }
.pub-nav a:hover { color: var(--b-600); border-bottom-color: var(--b-500); }
.head-link { text-decoration: none; font-weight: 600; font-size: .9375rem; color: var(--ink-2); }
.pub a.head-link { color: var(--ink-2); }
.head-link:hover { background: var(--b-50); }
.pub a.head-link:hover { color: var(--b-600); }
.head-cta { background: var(--b-500); text-decoration: none; font-weight: 700; font-size: .9375rem; }
.pub a.head-cta { color: #fff; }
.head-cta:hover { background: var(--b-600); }
.head-link.is-active { box-shadow: inset 0 -3px 0 var(--b-500); }
.pub a.head-link.is-active { color: var(--b-600); }
.head-cta.is-active { box-shadow: inset 0 -3px 0 var(--ink); }

/* ── 히어로 ── */
.hero-media {
    align-items: center; justify-content: center; padding: 2rem 1rem;
    background-color: #dbe8fd;
    background-image:
        linear-gradient(rgba(255, 255, 255, .6) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .6) 1px, transparent 1px),
        linear-gradient(135deg, #eef4fe, #c5dafb);
    background-size: 64px 64px, 64px 64px, 100% 100%;
}
.hero-media img { height: auto; object-fit: contain; }
.hero-copy { padding: 4.5rem 3rem; display: flex; flex-direction: column; justify-content: center; }
.badge-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.chip {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .3rem .8rem; border: 1px solid var(--line); border-radius: var(--pill);
    font-size: .8125rem; font-weight: 600; color: var(--ink-2); background: var(--b-50);
}
.chip::before { content: "✓"; color: var(--b-500); font-weight: 800; }

.stat { padding: 2rem 2.5rem; }
.stat-value { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: .55em; font-weight: 700; margin-left: .15rem; }
.stat-label { color: var(--muted); font-size: .875rem; margin-top: .5rem; }
.cell-accent .stat-label { color: #fff; opacity: .88; }

/* ── 섹션 머리 ── */
.section-head { display: flex; flex-direction: column; justify-content: center; padding: 3.5rem 3rem; }
.section-index { font-size: .8125rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.cell-dark .section-index { color: var(--b-300); }

/* ── 이유 / 기능 ── */
.reason-num { font-size: 2.25rem; font-weight: 800; color: var(--b-500); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.reason h3, .feature h3, .step h3 { font-size: 1.125rem; font-weight: 700; margin-top: 1rem; letter-spacing: -.01em; }

.feature { transition: background-color .2s; position: relative; }
.feature:hover { background: var(--b-50); }
.feature-icon { width: 56px; height: 56px; }
.tag-soon {
    position: absolute; top: 1.5rem; right: 1.5rem;
    font-size: .75rem; font-weight: 700; padding: .2rem .6rem; border-radius: var(--pill);
    background: var(--b-100); color: var(--b-700);
}

/* ── 이용 절차 ── */
.step { position: relative; }
.step-num {
    display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    background: var(--b-100); color: var(--b-600); font-weight: 800; font-variant-numeric: tabular-nums;
}
.cell-accent .step-num { background: #fff; color: var(--b-600); }

/* ── 요금 ── */
.price-card { display: flex; flex-direction: column; padding: 3rem; }
.price-plan { font-weight: 700; color: var(--b-300); letter-spacing: .02em; }
.price {
    display: flex; align-items: baseline; flex-wrap: wrap; gap: .4rem;
    margin-top: 1rem; font-weight: 800; letter-spacing: -.04em;
}
.price-amount { font-size: clamp(2.75rem, 5.5vw, 4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.price-unit { font-size: 1.0625rem; color: var(--on-dark); letter-spacing: 0; font-weight: 600; }
.price-note { color: #93a5c0; font-size: .875rem; margin-top: .75rem; }
.check-list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: .8rem; }
.check-list li { display: flex; gap: .7rem; align-items: flex-start; }
.check-list li::before {
    content: "✓"; flex: none; width: 22px; height: 22px; border-radius: 50%;
    display: grid; place-items: center; font-size: .75rem; font-weight: 900;
    background: var(--b-500); color: #fff; margin-top: .15rem;
}
.price-card .btn-row { margin-top: auto; padding-top: 2.5rem; }

.compare { width: 100%; border-collapse: collapse; margin-top: 2rem; font-size: .9375rem; }
.compare th, .compare td { text-align: left; padding: .85rem .5rem; border-bottom: 1px solid var(--line); }
.compare th:last-child, .compare td:last-child { text-align: right; }
.compare thead th { font-size: .8125rem; color: var(--muted); font-weight: 700; }
.compare td:last-child { font-weight: 800; color: var(--b-600); font-variant-numeric: tabular-nums; }

/* ── FAQ ── */
.faq h3 { font-size: 1.0625rem; font-weight: 700; display: flex; gap: .6rem; }
.faq h3::before { content: "Q"; color: var(--b-500); font-weight: 800; }
.faq p { font-size: .9375rem; line-height: 1.65; color: var(--ink-2); margin-top: .6rem; padding-left: 1.4rem; }

/* ── 마지막 CTA ── */
.cta-band { padding: 4rem 3rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band .title { margin-top: 0; max-width: 40rem; }
.cta-band .btn-row { margin-top: 0; }

/* ── 푸터 ── */
.pub-footer { background: var(--ink); color: var(--on-dark); }
.pub-footer .wrap { border-color: #22344f; }
.pub-footer .grid { background: #22344f; border-bottom-color: #22344f; grid-template-columns: 2fr 1fr 1fr 1fr; }
.pub-footer .cell { background: var(--ink); padding: 2.5rem; }
.pub-footer .brand { color: #fff; }
.pub-footer .body { color: var(--on-dark); }
.pub-footer .brand b { color: var(--b-300); }
.pub-footer h4 { margin: 0 0 .8rem; color: #fff; font-size: .875rem; }
.pub-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; font-size: .875rem; }
.pub-footer a { text-decoration: none; }
.pub-footer a:hover { color: #fff; text-decoration: underline; }
.pub-footer .fine { font-size: .8125rem; color: #8597b3; padding: 1.25rem 2.5rem; }

/* ── 인증 화면(로그인·회원가입) ── */
.auth { grid-template-columns: 5fr 7fr; min-height: calc(100vh - 69px); }
.auth-aside { display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: 3.5rem 3rem; }
.auth-aside img { max-width: 360px; margin: 0 auto; }
.auth-aside .check-list li::before { background: #fff; color: var(--b-600); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 3.5rem 2rem; }
.auth-box { width: 100%; max-width: 440px; }
.auth-box .title { margin-top: .6rem; }
.auth-switch { margin-top: 1.5rem; color: var(--muted); font-size: .9375rem; text-align: center; }
.pub .auth-switch a { color: var(--b-600); font-weight: 700; text-underline-offset: 3px; }

.form { margin-top: 2rem; display: grid; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field label { display: block; font-size: .875rem; font-weight: 700; margin-bottom: .4rem; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input:not([type]) {
    width: 100%; min-height: 48px; padding: .65rem 1rem;
    border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: #fff;
    font: inherit; color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: #9aa7ba; }
.field input:focus { outline: none; border-color: var(--b-500); box-shadow: 0 0 0 4px var(--b-100); }
.field input.input-validation-error { border-color: #d64545; background: #fff7f7; }
.field-hint { font-size: .8125rem; color: var(--muted); margin-top: .35rem; }
.field-error { display: block; font-size: .8125rem; color: #c03535; margin-top: .35rem; }
.field-error:empty { display: none; }
.field input.code-input { letter-spacing: .4em; font-size: 1.3rem; text-align: center; font-variant-numeric: tabular-nums; }

.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: .15rem 0 0; accent-color: var(--b-500); flex: none; }

.form-alert {
    border: 1.5px solid #f0b4b4; background: #fff4f4; color: #9b2c2c;
    border-radius: var(--radius); padding: .8rem 1rem; font-size: .875rem;
}
.form-alert ul { margin: 0; padding-left: 1.1rem; }
.form-alert.validation-summary-valid { display: none; }
.form-notice {
    border: 1.5px solid var(--b-200); background: var(--b-50); color: var(--ink);
    border-radius: var(--radius); padding: .8rem 1rem; font-size: .875rem; margin-top: 1.5rem;
}
.form-notice strong { word-break: break-all; }
.form-inline { margin-top: 1rem; display: grid; gap: .75rem; }

/* ── 반응형 ── */
@media (max-width: 960px) {
    .cols-hero, .cols-3, .auth { grid-template-columns: 1fr; }
    .cols-4 { grid-template-columns: repeat(2, 1fr); }
    .span-2 { grid-column: auto; }
    .pub-nav { display: none !important; }
    .pub-header .grid { grid-template-columns: 1fr auto auto; }
    .hero-copy, .section-head, .cta-band, .price-card { padding: 3rem 1.75rem; }
    .cell { padding: 2rem 1.75rem; }
    .auth { min-height: 0; }
    .auth-aside { order: 2; }
    .auth-aside img { max-width: 260px; }
    .pub-footer .grid { grid-template-columns: 1fr 1fr; }
    .pub-footer .grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .cols-2, .cols-4 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .pub-header .cell { padding: 0 1rem; min-height: 60px; }
    .brand-text { display: none; }
    .stat { padding: 1.5rem 1.75rem; }
    .auth-main { padding: 2.5rem 1.25rem; }
    .pub-footer .grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn, .btn .arrow, .feature { transition: none; }
}

/* 약관·정책 문서 */
.legal { max-width: 820px; margin: 0 auto; padding: 3.5rem 1.5rem 4.5rem; background: var(--paper); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.legal h1 { margin: 0 0 .5rem; font-size: 2rem; line-height: 1.3; }
.legal .legal-meta { margin: 0 0 2.5rem; color: var(--muted); font-size: .875rem; }
.legal h2 { margin: 2.25rem 0 .75rem; font-size: 1.125rem; }
.legal p, .legal li { color: var(--ink-2); line-height: 1.8; font-size: .9375rem; }
.legal ol, .legal ul { padding-left: 1.4rem; margin: .5rem 0; }
