/* base.css — 모든 페이지 공통 (리셋·타이포·버튼·표·FAQ·등장효과·헤더·푸터). 토큰은 style.css :root */

/* ---------- 리셋 / 타이포 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    margin: 0; background: var(--bg); color: var(--ink);
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    font-size: 17px; line-height: 1.75; letter-spacing: -0.01em;
    word-break: keep-all; overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 { margin: 0 0 .6em; color: var(--ink); font-weight: 700; line-height: 1.3; letter-spacing: -0.03em; }
h1, h2 { font-weight: 300; line-height: 1.28; }
h1 strong, h2 strong { font-weight: 700; }
h1 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.2; }
h2 { font-size: clamp(26px, 3.2vw, 40px); }
h3 { font-size: clamp(19px, 1.6vw, 22px); font-weight: 700; letter-spacing: -0.02em; }
p, ul, ol, dl, figure, blockquote { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
strong, b { font-weight: 700; }
mark { background: var(--accent); color: var(--ink); padding: 0 .2em; border-radius: 4px; }
::selection { background: var(--accent); color: var(--ink); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 레이아웃 ---------- */
.rd-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.rd-section { padding: clamp(72px, 9vw, 128px) 0; }
.rd-section-soft { background: var(--bg-soft); }
.rd-grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 버튼 ---------- */
.rd-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 10px 20px; border: 1px solid var(--line); border-radius: 10px;
    background: var(--bg); color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.2;
    letter-spacing: -0.01em; white-space: nowrap; text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background .2s, color .2s, border-color .2s;
}
.rd-btn:hover { color: var(--ink); border-color: var(--ink); }
.rd-btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.rd-btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.rd-btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.rd-btn-outline:hover { background: var(--bg-tint); border-color: var(--primary); color: var(--primary-dark); }
.rd-btn-lg { min-height: 56px; padding: 16px 32px; font-size: 17px; }
a.rd-tel-reveal { color: #fff; } /* 클릭 후 a로 교체돼도 같은 모양 */
a.rd-tel-reveal.rd-btn-outline { color: var(--primary); }
a.rd-tel-reveal:not(.rd-btn-primary):not(.rd-btn-outline) { color: var(--ink); }

/* ---------- 표 ---------- */
.rd-table-wrap {
    width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.5em;
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm);
}
table.rd-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15.5px; line-height: 1.6; }
.rd-table caption { caption-side: top; text-align: left; padding: 16px 20px 0; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.rd-table th, .rd-table td { padding: 15px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.rd-table thead th { background: var(--bg-soft); color: var(--ink-2); font-size: 14px; font-weight: 700; white-space: nowrap; }
.rd-table tbody th { font-weight: 700; color: var(--ink); }
.rd-table tbody tr:last-child > * { border-bottom: 0; }
.rd-table tbody tr { transition: background .15s; }
.rd-table tbody tr:hover { background: var(--bg-soft); }

/* ---------- FAQ ---------- */
.rd-faq-list { display: grid; gap: 12px; }
.rd-faq-item { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); transition: border-color .2s, box-shadow .2s; }
.rd-faq-item:hover { border-color: #cfc9be; }
.rd-faq-item.is-open { border-color: var(--ink); }
.rd-faq-q {
    position: relative; display: block; width: 100%; padding: 20px 60px 20px 24px;
    background: none; border: 0; text-align: left; color: var(--ink);
}
.rd-faq-q h3 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.5; letter-spacing: -0.02em; }
.rd-faq-q::before, .rd-faq-q::after {
    content: ""; position: absolute; right: 24px; top: 50%; width: 14px; height: 2px; margin-top: -1px;
    background: var(--ink-2); border-radius: 2px; transition: transform .25s ease, background .2s;
}
.rd-faq-q::after { transform: rotate(90deg); }
.rd-faq-item.is-open .rd-faq-q::before { transform: rotate(45deg); background: var(--primary); }
.rd-faq-item.is-open .rd-faq-q::after { transform: rotate(135deg); background: var(--primary); }
.rd-faq-a { display: none; padding: 0 24px 22px; color: var(--ink-2); font-size: 16px; }
.rd-faq-a p:last-child { margin-bottom: 0; }
.rd-faq-item.is-open .rd-faq-a { display: block; animation: rd-fade .3s ease; }
@keyframes rd-fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- 등장 애니메이션 (JS 동작 시에만 숨김: main.js가 html.hm-js 추가) ---------- */
html.hm-js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
html.hm-js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    html.hm-js [data-reveal] { opacity: 1; transform: none; transition: none; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 헤더 ---------- */
.rd-header {
    position: sticky; top: 0; z-index: 100; height: var(--header-h);
    background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent; transition: box-shadow .2s, border-color .2s;
}
/* 스크롤 시 그림자: CSS scroll-driven animation (미지원 브라우저는 그림자 없이 동작) */
@supports (animation-timeline: scroll()) {
    .rd-header { animation: rd-header-shadow linear both; animation-timeline: scroll(root); animation-range: 0 80px; }
    @keyframes rd-header-shadow { to { box-shadow: 0 6px 24px rgba(15, 23, 42, .07); border-bottom-color: var(--line); } }
}
.admin-bar .rd-header { top: 32px; }
.rd-header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 24px; }
.rd-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 19px; font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; }
.rd-logo:hover { color: var(--ink); }
.rd-logo-mark { width: 26px; height: 26px; border-radius: 50% 50% 50% 4px; background: var(--primary); flex: none; position: relative; }
.rd-logo-mark::after { content: ""; position: absolute; left: 7px; top: 12px; width: 12px; height: 2px; background: #fff; box-shadow: 0 -5px 0 #fff; border-radius: 2px; }
.rd-logo-badge { display: none; }
.rd-nav-right { display: flex; align-items: center; gap: 28px; }
.rd-nav-pc { display: flex; gap: 4px; }
.rd-navlink { padding: 8px 14px; border-radius: 8px; color: var(--ink-2); font-size: 15px; font-weight: 600; transition: color .2s, background .2s; }
.rd-navlink:hover { color: var(--ink); background: var(--bg-soft); }
.rd-header .rd-btn { min-height: 40px; padding: 8px 18px; font-size: 14.5px; }

.rd-mobile-menu { display: none; position: relative; }
.rd-mobile-menu summary {
    list-style: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--bg); cursor: pointer;
}
.rd-mobile-menu summary::-webkit-details-marker { display: none; }
.rd-burger, .rd-burger::before, .rd-burger::after { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, background .2s; }
.rd-burger { position: relative; }
.rd-burger::before, .rd-burger::after { content: ""; position: absolute; left: 0; }
.rd-burger::before { top: -6px; }
.rd-burger::after { top: 6px; }
.rd-mobile-menu[open] .rd-burger { background: transparent; }
.rd-mobile-menu[open] .rd-burger::before { transform: translateY(6px) rotate(45deg); }
.rd-mobile-menu[open] .rd-burger::after { transform: translateY(-6px) rotate(-45deg); }
.rd-mobile-dropdown {
    position: absolute; right: 0; top: calc(100% + 12px); width: min(300px, calc(100vw - 32px)); padding: 10px;
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow);
    display: grid; gap: 2px; animation: rd-fade .2s ease;
}
.rd-mobile-dropdown a { padding: 12px 14px; border-radius: 8px; color: var(--ink); font-weight: 600; }
.rd-mobile-dropdown a:hover { background: var(--bg-soft); }
.rd-mobile-dropdown .rd-btn { margin-top: 6px; width: 100%; color: #fff; }

@media (max-width: 900px) {
    .rd-nav-pc { display: none; }
    .rd-mobile-menu { display: block; }
    .rd-nav-right { gap: 10px; }
}
@media (max-width: 480px) {
    .rd-container { padding: 0 18px; }
    .rd-logo { font-size: 17px; }
    .rd-logo-badge { display: none; }
    .rd-header .rd-btn { padding: 8px 14px; font-size: 13.5px; }
}

/* ---------- 푸터 ---------- */
.rd-footer { background: var(--bg-soft); border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14.5px; line-height: 1.7; padding: 72px 0 32px; }
.rd-footer a { color: var(--ink-2); }
.rd-footer a:hover { color: var(--primary); }
.rd-footer-top { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.rd-footer-brand .rd-logo { margin-bottom: 14px; }
.rd-footer-brand p { margin: 0 0 20px; max-width: 320px; }
.rd-footer-col-title { margin: 0 0 14px; font-size: 14px; font-weight: 800; color: var(--ink); letter-spacing: 0; }
.rd-footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rd-footer-col li a { display: inline-block; font-size: 14px; }
.rd-footer-info { padding: 28px 0 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; }
.rd-footer-info dl { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 13.5px; max-width: 860px; }
.rd-footer-info dl div { display: flex; gap: 6px; }
.rd-footer-info dt { color: var(--ink-3); }
.rd-footer-info dd { margin: 0; color: var(--ink-2); }
.rd-footer-bottom { margin-top: 24px; color: var(--ink-3); font-size: 13px; }
@media (max-width: 900px) {
    .rd-footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
    .rd-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .rd-footer { padding-top: 56px; }
    .rd-footer-top { grid-template-columns: 1fr; }
}

/* FAQ 펼침 고정 — 사용자 요구: 아코디언(자바라) 금지, 질문·답변 항상 전부 노출 */
.rd-faq-q { cursor: default; padding-right: 24px; }
.rd-faq-q::before, .rd-faq-q::after { display: none; }
.rd-faq-a { display: block !important; animation: none !important; }
.rd-faq-item, .rd-faq-item.is-open, .rd-faq-item:hover { border-color: var(--line); }

/* 전화 버튼: 누르면 번호 자체가 크게 보이고 tel: 링크가 됨 */
a.rd-tel-reveal.is-revealed { font-size: 1.15em; font-weight: 800; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
a.rd-tel-reveal.is-revealed::before { content: ""; width: 16px; height: 16px; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center / contain no-repeat; }

/* 리뷰 반영: 표·FAQ를 박스형에서 라인형으로, 로고는 워드마크 */
.rd-table-wrap { border: 0; border-radius: 0; border-top: 2px solid var(--ink); background: transparent; }
.rd-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rd-table thead th { background: none; color: var(--ink-3); font-weight: 500; }
.rd-table th, .rd-table td { padding: 20px 16px; }
.rd-table tbody tr:hover { background: none; }
.rd-faq-list { gap: 0; border-top: 2px solid var(--ink); }
.rd-faq-item, .rd-faq-item.is-open, .rd-faq-item:hover { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.rd-faq-q { padding: 26px 0 10px; }
.rd-faq-q h3 { font-size: 18px; font-weight: 600; }
.rd-faq-a { padding: 0 0 26px; }
.rd-logo-mark { display: none; }
.rd-logo { font-weight: 700; letter-spacing: -0.04em; }
.rd-footer-phone { display: block; margin: 0 0 6px; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink) !important; }

/* 하단 링크 묶음 접기 — 사용자 요구: 화면엔 안 보이게, HTML엔 남겨 검색엔진이 읽게 (<details> 기본 닫힘) */
.rd-fold > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; color: var(--ink-3); padding: 6px 0; user-select: none; }
.rd-fold > summary::-webkit-details-marker { display: none; }
.rd-fold > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.rd-fold[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.rd-fold > summary:hover { color: var(--ink); }
.rd-footer-top { grid-template-columns: 1fr !important; padding-bottom: 28px; }
.rd-footer-fold { padding: 16px 0; border-bottom: 1px solid var(--line); }
.rd-footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 20px 0 8px; }
@media (max-width: 640px) { .rd-footer-cols { grid-template-columns: 1fr; } }
