/* ==========================================================================
   법률사무소 미라클파트너스 — 공통 스타일
   색: 디자인 원본(PSD) 기준  ink #151515 · orange #f16417 · cream #fcf9f0
   --u : 1200px 시안의 1px. 화면이 1200px 보다 좁으면 같은 비율로 줄어든다.
   ========================================================================== */

:root {
    --ink: #151515;
    --ink-soft: #454545;
    --muted: #6b6b6b;
    --line: #e7e3da;
    --cream: #fcf9f0;
    --orange: #f16417;
    --orange-dark: #d9540c;
    --yellow: #ffd426;
    --yellow-dark: #f2c200;
    --danger: #d92d20;
    --white: #fff;
    --u: calc(min(100vw, 1200px) / 1200);
    --nav-h: 68px;
    --sticky-h: 73px;    /* 하단 고정 버튼 줄 높이: 12 + 48 + 12 + 테두리 1 */
    --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }

body.mp {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: -0.02em;
    color: var(--ink);
    background: var(--white);
    word-break: keep-all;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(var(--sticky-h) + env(safe-area-inset-bottom, 0px));
}

/* 기본값 초기화 — :where() 로 명시도를 0 으로 두어 아래 컴포넌트 규칙이 항상 이긴다 */
:where(.mp) :where(img, video) { max-width: 100%; height: auto; display: block; }
:where(.mp) :where(a) { color: inherit; }
:where(.mp) :where(h1, h2, h3, h4, p, figure) { margin: 0; }
:where(.mp) :where(button) { font-family: inherit; }
.mp [hidden] { display: none !important; }

.mp-skip {
    position: absolute; left: 8px; top: -60px; z-index: 1000;
    background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.mp-skip:focus { top: 8px; }

.mp :focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

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

.mp-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Navbar ---------- */
.mp-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.mp-nav__inner {
    max-width: 1200px; height: var(--nav-h); margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; gap: 20px;
}
.mp-nav__brand { display: flex; align-items: center; flex: 0 0 auto; text-decoration: none; }
.mp-nav__brand img { height: 34px; width: auto; }
.mp-nav__menu { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.mp-nav__menu a {
    position: relative; padding: 8px 0; font-size: 16px; font-weight: 600; color: var(--ink);
    text-decoration: none; white-space: nowrap;
}
.mp-nav__menu a::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
    background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform .2s;
}
.mp-nav__menu a:hover::after, .mp-nav__menu a.is-active::after { transform: scaleX(1); }
.mp-nav__tel {
    display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
    font-weight: 700; font-size: 16px; text-decoration: none; color: var(--ink);
}
.mp-nav__toggle {
    display: none; flex-direction: column; justify-content: center; gap: 6px;
    width: 44px; height: 44px; margin-left: -10px; padding: 10px; background: none; border: 0; cursor: pointer;
}
.mp-nav__toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }

@media (max-width: 1023px) {
    :root { --nav-h: 60px; }
    .mp-nav__inner { gap: 6px; padding: 0 14px; }
    .mp-nav__toggle { display: flex; }
    .mp-nav__menu { display: none; }
    .mp-nav__brand { margin: 0 auto; }
    .mp-nav__brand img { height: 27px; }
    .mp-nav__tel { width: 44px; height: 44px; margin-right: -10px; justify-content: center; }
    .mp-nav__tel span { display: none; }
    .mp-nav__tel svg { width: 22px; height: 22px; }
}
@media (max-width: 359px) { .mp-nav__brand img { height: 23px; } }
/* 가로 태블릿: 로고·메뉴 4개·전화번호가 한 줄에 들어가도록 간격만 줄인다 (필요한 너비 1060px → 1012px) */
@media (min-width: 1024px) and (max-width: 1099px) {
    .mp-nav__inner { gap: 14px; }
    .mp-nav__menu { gap: 18px; }
}

/* ---------- Drawer ---------- */
.mp-drawer-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .5); }
.mp-drawer {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 201;
    width: min(320px, 86vw); padding: 22px 22px 40px; background: #fff; overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0, 0, 0, .18);
    animation: mp-drawer-in .22s ease-out;
}
@keyframes mp-drawer-in { from { transform: translateX(-100%); } to { transform: none; } }
.mp-drawer__close { position: absolute; top: 12px; right: 10px; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; color: var(--ink); }
.mp-drawer__brand { display: block; padding: 6px 0 22px; border-bottom: 1px solid var(--line); }
.mp-drawer__brand img { height: 30px; width: auto; }
.mp-drawer__menu { list-style: none; margin: 8px 0 0; padding: 0; }
.mp-drawer__menu li { border-bottom: 1px solid var(--line); }
.mp-drawer__menu a { display: block; padding: 18px 2px; font-size: 18px; font-weight: 700; text-decoration: none; }
.mp-drawer__menu a[aria-current="page"] { color: var(--orange); }
.mp-drawer__tel { display: block; margin-top: 24px; padding: 14px 16px; border-radius: 12px; background: var(--cream); text-decoration: none; font-size: 15px; }
.mp-drawer__tel strong { font-size: 19px; margin-left: 6px; }
body.mp-lock { overflow: hidden; }

/* ---------- Footer ---------- */
.mp-footer { background: #111; color: rgba(255, 255, 255, .68); font-size: 14px; line-height: 1.75; }
.mp-footer__inner { max-width: 1200px; margin: 0 auto; padding: 48px 20px 40px; }
.mp-footer__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 24px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.mp-footer__logo { height: 34px; width: auto; }
.mp-footer__tel { color: rgba(255, 255, 255, .7); text-decoration: none; }
.mp-footer__tel strong { color: #fff; font-size: 22px; margin-left: 8px; letter-spacing: 0; }
.mp-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; padding: 26px 0; }
.mp-footer__info { font-style: normal; }
.mp-footer__info p { margin: 0 0 10px; }
.mp-footer__info strong { color: rgba(255, 255, 255, .92); font-weight: 600; }
.mp-footer .sep { margin: 0 8px; color: rgba(255, 255, 255, .25); }
.mp-footer .nb { display: inline-block; }
.mp-footer__links { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.mp-footer__links a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.mp-footer__links a:hover { color: #fff; text-decoration: underline; }
.mp-footer__copy { padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; color: rgba(255, 255, 255, .45); }
@media (max-width: 767px) {
    .mp-footer__inner { padding: 36px 20px 32px; }
    .mp-footer__logo { height: 28px; }
    .mp-footer__grid { grid-template-columns: 1fr; gap: 18px; }
    .mp-footer { font-size: 13px; }
    .mp-footer__info .sep { display: none; }
    .mp-footer__info .nb { display: block; }
}

/* ---------- 하단 고정 버튼 ---------- */
/* 하단 고정 버튼 두 개: 알파추심 사이트(alphacollects.com)의 하단 버튼과 같은 모양 */
.mp-sticky {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    display: flex; justify-content: center; gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, .06);
}
.mp-sticky__btn {
    flex: 1 1 0; max-width: 280px; min-height: 48px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center; text-align: center;
    border-radius: 12px; font-size: 16px; font-weight: 700; letter-spacing: -0.03em; text-decoration: none;
    transition: transform .15s, background-color .15s;
}
.mp-sticky__btn:active { transform: scale(.98); }
.mp-sticky__btn--dark { background: #111; color: #fff !important; }
.mp-sticky__btn--dark:hover { background: #000; }
.mp-sticky__btn--pay { background: #f4efe2; color: #111 !important; }
.mp-sticky__btn--pay:hover { background: #ebe3d0; }
@media (max-width: 420px) { .mp-sticky { gap: 8px; padding-left: 12px; padding-right: 12px; } .mp-sticky__btn { font-size: 15.5px; } }
@media (max-width: 345px) { .mp-sticky__btn { font-size: 14px; } }

/* ---------- 채팅 버튼 (채널톡) ---------- */
.mp-chat {
    position: fixed; right: 16px; bottom: calc(var(--sticky-h) + 16px + env(safe-area-inset-bottom, 0px)); z-index: 89;
    width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    background: var(--ink); color: #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
    transition: transform .15s;
}
.mp-chat:hover { transform: translateY(-2px); }

/* ---------- 버튼 ---------- */
.mp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 56px; padding: 0 28px; border: 0; border-radius: 14px; cursor: pointer;
    font-family: inherit; font-size: 18px; font-weight: 700; letter-spacing: -0.03em; text-decoration: none;
    transition: transform .15s, background-color .15s, box-shadow .15s;
}
.mp-btn:active { transform: scale(.985); }
.mp-btn--yellow { background: var(--yellow); color: var(--ink); }
.mp-btn--yellow:hover { background: var(--yellow-dark); }
.mp-btn--orange { background: var(--orange); color: #fff; }
.mp-btn--orange:hover { background: var(--orange-dark); }
.mp-btn--dark { background: var(--ink); color: #fff; }
.mp-btn--ghost { background: #fff; color: var(--ink); border: 1px solid #cfcabd; }
.mp-btn--block { width: 100%; }
.mp-btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------- 일반 페이지 ---------- */
.mp-page { padding: 44px 0 72px; }
.mp-page--cream { background: var(--cream); }
.mp-head { text-align: center; margin-bottom: 30px; }
.mp-head__eyebrow { font-size: 13px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; margin-bottom: 10px; }
.mp-head__title { font-size: clamp(28px, 4.2vw, 44px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.25; }
.mp-head__sub { margin-top: 10px; font-size: clamp(16px, 2vw, 20px); color: var(--ink-soft); }
.mp-head__sub strong { color: var(--orange); }

.mp-doc { max-width: 860px; margin: 0 auto; font-size: 16px; line-height: 1.85; color: #2b2b2b; }
.mp-doc h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -0.04em; text-align: center; margin-bottom: 28px; }
.mp-doc h2, .mp-doc h3 { font-size: 18px; font-weight: 700; margin: 30px 0 8px; color: var(--ink); }
.mp-doc p { margin: 0 0 12px; }
.mp-doc ul, .mp-doc ol { margin: 0 0 12px; padding-left: 22px; }
.mp-doc li p { margin: 0; }
.mp-doc a { color: var(--orange-dark); }

/* ---------- 라이트박스 ---------- */
.mp-lightbox {
    position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .92); padding: 56px 12px 64px;
}
.mp-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; border-radius: 4px; }
.mp-lightbox button {
    position: absolute; display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border: 0; border-radius: 50%; cursor: pointer;
    background: rgba(255, 255, 255, .16); color: #fff; font-size: 26px; line-height: 1;
}
.mp-lightbox button:hover { background: rgba(255, 255, 255, .3); }
.mp-lightbox__close { top: 8px; right: 10px; }
.mp-lightbox__prev { left: 10px; bottom: 8px; }
.mp-lightbox__next { right: 10px; bottom: 8px; }
.mp-lightbox__count { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .85); font-size: 15px; pointer-events: none; }
@media (min-width: 900px) {
    .mp-lightbox { padding: 40px 90px; }
    .mp-lightbox__prev { left: 22px; top: 50%; bottom: auto; transform: translateY(-50%); }
    .mp-lightbox__next { right: 22px; top: 50%; bottom: auto; transform: translateY(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .mp *, .mp *::before, .mp *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- 위임계약서 ---------- */
.mp-contract { font-size: 15.5px; line-height: 1.85; color: #2b2b2b; letter-spacing: -0.01em; }
.mp-contract h3 { margin: 26px 0 6px; font-size: 16.5px; font-weight: 700; color: var(--ink); }
.mp-contract p { margin: 0 0 8px; }
.mp-contract ul { margin: 0 0 8px; padding: 0; list-style: none; }
.mp-contract li { margin: 0 0 4px; padding-left: 1.5em; text-indent: -1.5em; }
.mp-contract li ul { margin: 4px 0 0; }
.mp-contract li li { text-indent: -1.5em; }
.mp-contract__sign { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.mp-contract__party { font-weight: 700; color: var(--ink); }
.mp-contract__offices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mp-contract__offices dl { margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.mp-contract__offices dt { font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.mp-contract__offices dd { margin: 0; color: var(--ink-soft); }
.mp-doc__cta { margin-top: 36px !important; text-align: center; }
@media (max-width: 600px) { .mp-contract__offices { grid-template-columns: 1fr; } }
