@charset "UTF-8";

/* ============================================================
   최사장의 비밀노트 — 공통 스타일 (모든 페이지)
   리셋 · 토큰 · 버튼 · 헤더 · 메인 메뉴 5칸 · 폼 · 상담 모달 · 푸터
   모든 페이지: 이 파일 + style.css
============================================================ */

/* ---------- Reset ---------- */
html { -webkit-text-size-adjust: none; }
*, ::before, ::after { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-size: 15px;
    line-height: 1.5;
    font-family: 'Paperlogy', 'Pretendard', 'Malgun Gothic', '맑은 고딕', 'Apple SD Gothic Neo', sans-serif;
    word-break: keep-all;
    -webkit-font-smoothing: antialiased;
}
html, body { overflow-x: hidden; }
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; vertical-align: middle; border: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
input, textarea, select { outline: 0; }
em { font-style: normal; }
[hidden] { display: none !important; }

/* ---------- Tokens ---------- */
:root {
    --navy: #1C1F26;
    --navy-dark: #111317;
    --navy-soft: #F1F2F4;
    --beige: #F2B705;
    --beige-light: #FFF4CC;
    --cream: #FAF8F3;
    --gold: #B98900;
    --ink: #1C1F26;
    --muted: #7E8692;
    --line: #E4E6E9;
    --white: #FFFFFF;
    --marker: #FFD95A;     /* 형광펜 */
    --redpen: #D9443B;     /* 빨간펜 */
    --kakao: #FEE500;
    --kakao-ink: #191919;
    --danger: #D9534F;
    --header-h: 76px;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(28, 31, 38, .08);
    --shadow-sm: 0 4px 14px rgba(28, 31, 38, .06);
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1400px; }
.sr-only {
    position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.page { min-height: 60vh; }
.no-scroll { overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 22px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    transition: transform .15s, box-shadow .15s, background .15s, color .15s;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-dark); box-shadow: var(--shadow-sm); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--beige-light); }
.btn-outline { border: 1.5px solid var(--navy); color: var(--navy); background: var(--white); }
.btn-outline:hover { background: var(--navy-soft); }
.btn-kakao { background: var(--kakao); color: var(--kakao-ink); }
.btn-kakao:hover { background: #F5DC00; }
.btn-block { width: 100%; }
.btn-lg { height: 56px; padding: 0 30px; font-size: 16px; border-radius: 14px; }
.text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--navy);
    font-weight: 600;
    font-size: 15px;
}
.text-link::after {
    content: '';
    width: 6px; height: 6px;
    border-right: 1.8px solid currentColor;
    border-top: 1.8px solid currentColor;
    transform: rotate(45deg);
    transition: transform .15s;
}
.text-link:hover::after { transform: translateX(3px) rotate(45deg); }

/* ============================================================
   Header — 왼쪽 로고, 가운데 메인 메뉴, 오른쪽 카카오 로그인
============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
    height: var(--header-h);
}
.site-logo { display: flex; align-items: center; gap: 5px; justify-self: start; }
.logo-full { display: block; height: 42px; width: auto; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-title { font-size: 19px; font-weight: 700; color: var(--navy); letter-spacing: -.01em; }
.logo-sub { font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .04em; }

.header-nav { display: flex; align-items: stretch; gap: 36px; height: 100%; }
.header-nav a {
    position: relative;
    display: flex; align-items: center;
    font-size: 15.5px; font-weight: 600; color: var(--ink);
    letter-spacing: -.02em; white-space: nowrap;
    transition: color .15s;
}
.header-nav a::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--navy);
    transform: scaleX(0);
    transition: transform .2s;
}
.header-nav a:hover, .header-nav a.is-active { color: var(--navy); }
.header-nav a.is-active { font-weight: 700; }
.header-nav a:hover::after, .header-nav a.is-active::after { transform: scaleX(1); }

.header-right { display: flex; align-items: center; gap: 6px; justify-self: end; }
.header-login {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 6px 12px;
    border-radius: 12px;
    transition: background .15s;
}
.header-login:hover { background: var(--cream); }
.login-text { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.login-hint { font-size: 12px; color: var(--muted); }
.login-kakao { font-size: 14px; font-weight: 700; color: var(--ink); }
.kakao-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--kakao);
    color: var(--kakao-ink);
}
.kakao-badge svg { width: 19px; height: 19px; }
.header-user { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; }
.header-user:hover { background: var(--cream); }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--beige-light); }
.user-avatar-blank { display: inline-block; background: var(--beige) url('/assets/image/category/ceo.png') center/80% no-repeat; }
.user-text { display: flex; flex-direction: column; line-height: 1.2; }
.user-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.user-sub { font-size: 12px; color: var(--muted); }
.header-logout { font-size: 13px; color: var(--muted); padding: 6px 8px; }
.header-logout:hover { color: var(--ink); }

/* ============================================================
   메인 메뉴 5칸 — 메인 히어로
============================================================ */
.svc-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.svc-tab > a {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px;
    aspect-ratio: 1 / 1;
    padding: 12px 6px;
    border-radius: 20px;
    background: #F5F6F8;
    border: 2px solid transparent;
    transition: transform .18s, box-shadow .18s, background .18s, border-color .18s;
}
.svc-tab img { width: 60%; max-width: 88px; aspect-ratio: 1; object-fit: contain; transition: transform .18s; }
.svc-tab span { font-size: 16px; font-weight: 600; color: var(--ink); white-space: nowrap; letter-spacing: -.02em; }
.svc-tab > a:hover { background: var(--white); border-color: var(--line); box-shadow: var(--shadow); transform: translateY(-3px); }
.svc-tab > a:hover img { transform: scale(1.06); }

.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.form-row label em { color: var(--danger); }
.form-row input, .form-row select, .form-row textarea {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--white);
    font-size: 15px;
    transition: border-color .15s, box-shadow .15s;
}
.form-row textarea { height: auto; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(28, 31, 38, .1); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-hint { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.form-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--muted); margin: 4px 0 16px; cursor: pointer; }
.form-check input { margin-top: 3px; accent-color: var(--navy); }
.form-check a { text-decoration: underline; }
.form-error { color: var(--danger); font-size: 13.5px; margin-bottom: 12px; }
.form-success { padding: 12px 16px; border-radius: 12px; background: #EAF6EC; color: #2E7D32; font-size: 14px; margin-bottom: 16px; }

/* ============================================================
   Modal (상담 신청)
============================================================ */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(17, 19, 23, .55); backdrop-filter: blur(2px); }
.modal-panel {
    position: relative;
    width: 100%; max-width: 520px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 36px 32px 28px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
    animation: modal-in .2s ease-out;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; right: 16px; top: 14px; width: 36px; height: 36px; border-radius: 50%; font-size: 26px; color: var(--muted); line-height: 1; }
.modal-close:hover { background: var(--cream); color: var(--ink); }
.modal-head { text-align: center; margin-bottom: 24px; }
.modal-icon { width: 64px; height: 64px; }
.modal-head h3 { font-size: 22px; font-weight: 700; margin-top: 8px; }
.modal-head p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.consult-done { text-align: center; padding: 20px 0 8px; }
.consult-done img { width: 80px; height: 80px; }
.consult-done h4 { font-size: 20px; font-weight: 700; margin-top: 8px; }
.consult-done p { color: var(--muted); margin: 8px 0 20px; }

/* ============================================================
   Footer
============================================================ */
.site-footer { background: var(--navy-dark); color: rgba(255, 255, 255, .75); padding: 80px 0 64px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 36px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.footer-logo { display: flex; align-items: center; gap: 8px; color: var(--white); font-weight: 700; font-size: 23px; letter-spacing: -.02em; }
.footer-logo img { width: 58px; height: 58px; filter: brightness(0) invert(1); opacity: .9; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15.5px; }
.footer-links a:hover { color: var(--white); }
.footer-links strong { font-weight: 700; color: var(--white); }
.footer-info { padding-top: 32px; font-size: 14.5px; line-height: 2; }
.footer-info p { display: flex; flex-wrap: wrap; gap: 0 18px; }
.footer-copy { margin-top: 18px; color: rgba(255, 255, 255, .45); }

/* 내용이 짧거나 화면을 축소해도 푸터가 화면 바닥에 붙도록 — 본문이 남는 높이를 채운다 */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body > .page, body > .calc-wrap { flex: 1 0 auto; width: 100%; }
.site-footer { flex-shrink: 0; margin-top: auto; }

/* ============================================================
   Responsive — 공통 영역
============================================================ */
@media (max-width: 1024px) {
    .header-nav { gap: 22px; }
    .header-nav a { font-size: 14.5px; }
    .login-hint { display: none; }
}
@media (max-width: 768px) {
    :root { --header-h: 64px; }

    /* 모바일 — 메뉴는 로고 아래 둘째 줄 */
    .header-inner { grid-template-columns: 1fr auto; grid-template-rows: var(--header-h) 46px; gap: 0 12px; height: auto; }
    .site-logo { grid-row: 1; grid-column: 1; }
    .header-right { grid-row: 1; grid-column: 2; }
    .header-nav {
        grid-row: 2; grid-column: 1 / -1;
        justify-content: space-between; gap: 14px;
        margin: 0 -20px; padding: 0 20px;
        border-top: 1px solid var(--line);
        overflow-x: auto; scrollbar-width: none;
    }
    .header-nav::-webkit-scrollbar { display: none; }
    .header-nav a { font-size: 13.5px; }

    .header-logout { display: none; }
    .logo-full { height: 32px; }
    .logo-title { font-size: 16px; }
    .login-hint { display: none; }
    .login-kakao { font-size: 13px; }
    .kakao-badge { width: 32px; height: 32px; }

    .svc-tabs { gap: 6px; }
    .svc-tab > a { gap: 6px; padding: 8px 2px; border-radius: 14px; }
    .svc-tab span { font-size: 11.5px; letter-spacing: -.04em; }

    .site-footer { padding: 56px 0 44px; }
    .footer-top { flex-direction: column; align-items: flex-start; gap: 16px; }
    .footer-logo { font-size: 19px; }
    .footer-logo img { width: 44px; height: 44px; }
    .footer-links { font-size: 14px; gap: 8px 18px; }
    .footer-info { font-size: 13px; }
    .footer-links { flex-wrap: wrap; gap: 10px 16px; }
    .footer-info p { gap: 0 12px; }
    .modal { padding: 12px; }
    .modal-panel { max-height: 92vh; }
}
