/* 여헌기념관 v6 «남청 현판» — 화강암 회색 종이 · 먹색 명조 이름 · 남청(현판) 단추 · 기둥 연분홍은 아주 작게 */
:root {
  --paper: #f4f4f2; --paper-2: #e9e9e6; --granite: #8e8f91; --granite-d: #5c5d61; --line: #d3d3d0;
  --ink: #1c1d20; --ink-2: #46484d; --navy: #18283a; --navy-2: #253a52; --pink: #c9837f; --on-navy: #eef0f2;
  --serif: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --wrap: 1240px; --hd: 68px;
}
:lang(zh-CN) { --serif: "Noto Serif SC", "Noto Serif KR", serif; --sans: "Pretendard Variable", Pretendard, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; }
:lang(ja) { --serif: "Noto Serif JP", "Noto Serif KR", serif; --sans: "Pretendard Variable", Pretendard, "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--hd); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.75 var(--sans); word-break: keep-all; overflow-wrap: break-word; }
html:not([lang="ko"]) body { word-break: normal; }
html[lang="ja"] body, html[lang="zh-CN"] body { line-break: strict; }
img { max-width: 100%; height: auto; display: block; }
picture { display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.3; margin: 0; }
p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
address { font-style: normal; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 40px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.ko-alt { font-family: var(--sans); font-size: max(12px, .5em); font-weight: 500; color: var(--ink-2); letter-spacing: 0; white-space: nowrap; margin-left: .45em; }
.nw { white-space: nowrap; }
.only-intl { display: none !important; }
html:not([lang="ko"]) .only-intl { display: block !important; }

/* ── 머리 ── */
.hd { position: sticky; top: 0; z-index: 30; height: var(--hd); background: rgba(244, 244, 242, .97); border-bottom: 1px solid transparent; transition: border-color .25s; }
.hd.is-solid { border-color: var(--line); }
.hd__in { max-width: 1400px; margin: 0 auto; height: 100%; padding: 0 32px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; min-height: 44px; }
.brand b { font: 700 18px/1.2 var(--serif); letter-spacing: .06em; }
html:not([lang="ko"]) .brand b { letter-spacing: 0; font-size: 16px; }
.gnb { flex: 1; min-width: 0; display: flex; justify-content: flex-end; }
.gnb ul { display: flex; gap: 4px; white-space: nowrap; }
.gnb a { display: block; padding: 10px 16px; text-decoration: none; font: 500 15px/1.4 var(--serif); color: var(--ink-2); position: relative; transition: color .2s; }
.gnb a::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--pink); transform: scale(0); transition: transform .25s; }
.gnb a:hover, .gnb a.is-on { color: var(--ink); }
.gnb a.is-on::after { transform: scale(1); }
.hd__tools { display: flex; align-items: center; gap: 12px; flex: none; }
.lang { display: flex; align-items: center; padding-left: 16px; border-left: 1px solid var(--line); }
.lang button { border: 0; background: none; font: 600 13px/1 var(--sans); color: var(--granite-d); padding: 0 8px; min-width: 40px; height: 40px; cursor: pointer; position: relative; }
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { color: var(--navy); }
.lang button[aria-pressed="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 6px; height: 2px; background: var(--navy); }
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: transparent; cursor: pointer; position: relative; flex: none; }
.burger span, .burger span::before, .burger span::after { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--ink); content: ""; }
.burger span { top: 21px; } .burger span::before { top: -6px; left: 0; right: 0; } .burger span::after { top: 6px; left: 0; right: 0; }
.hd.is-fold .gnb { visibility: hidden; overflow: hidden; pointer-events: none; }  /* 자리는 그대로 — 빼면 폭이 바뀌어 접힘·펼침이 번갈음 */
.hd.is-fold .burger { display: block; }

/* ── 단추(길찾기) — 현판의 남청 ── */
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.acts__k { width: 100%; font: 600 13px/1.4 var(--sans); color: var(--granite-d); letter-spacing: .06em; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 16px 10px 14px; text-decoration: none; font: 600 15px/1.2 var(--sans);
  background: var(--navy); color: var(--on-navy); border: 1px solid var(--navy); transition: background .2s, color .2s, border-color .2s; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn svg + span + svg { width: 13px; height: 13px; opacity: .7; margin-left: 2px; }
.btn:hover { background: var(--ink); border-color: var(--ink); }

/* ── 첫 화면: 사진 위 하늘에 먹색 이름(이름 칸 뒤만 종이색 안개) → 사진 아래 한 줄 띠 ── */
.hero { display: flex; flex-direction: column; height: calc(100svh - var(--hd)); min-height: 600px; max-height: 1040px; }
.hero__stage { position: relative; flex: 1; min-height: 0; width: 100%; max-width: 1440px; margin: 0 auto; overflow: hidden; background: #2b6eb2; }
.hero__ph { position: absolute; inset: 0; overflow: hidden; }   /* 자리 잡기 확대(1.035)가 밖으로 안 나가게 — 모바일에서도 */
.hero__ph picture, .hero__ph img { width: 100%; height: 100%; }
.hero__ph img { object-fit: cover; object-position: 30% 100%; }   /* 사진 아래 끝 = 계단 위쪽 — 넓은 화면에서도 계단이 남게 */
/* 안개 = 이름 칸 높이 + 아래 140px 로 번짐 — 글이 길어져도(외국어) 글 뒤는 늘 밝다 */
.hero__top { position: relative; z-index: 1; padding: 44px 0 140px; }
.hero__top::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;   /* 오른쪽 구름·소나무는 맑게 둔다 */
  background: linear-gradient(to bottom, rgba(244, 244, 242, .92) 0, rgba(244, 244, 242, .6) calc(100% - 140px), rgba(244, 244, 242, 0) 100%);
  -webkit-mask-image: linear-gradient(to right, #000 62%, transparent 96%); mask-image: linear-gradient(to right, #000 62%, transparent 96%); }
.badge { display: flex; align-items: flex-start; gap: 10px; font: 600 14px/1.5 var(--sans); color: var(--ink-2); letter-spacing: .02em; text-wrap: balance; }
.badge::before { content: ""; width: 7px; height: 7px; margin-top: .55em; background: var(--pink); flex: none; }
.hero__title { margin-top: 10px; font-size: clamp(64px, 8.6vw, 124px); line-height: 1.02; font-weight: 700; letter-spacing: .06em; color: var(--ink); }
html:not([lang="ko"]) .hero__title { font-size: clamp(36px, 4.6vw, 66px); letter-spacing: -.005em; line-height: 1.08; text-wrap: balance; }
html:not([lang="ko"]) .hero__title .ko-alt { display: block; margin: 10px 0 0; font-size: 17px; letter-spacing: .04em; }
html[lang="zh-CN"] .hero__title, html[lang="ja"] .hero__title { font-size: clamp(56px, 7.6vw, 110px); letter-spacing: .04em; }
.what { margin-top: 14px; max-width: 36em; font-size: 15px; line-height: 1.65; color: var(--ink); }
.what i, .src { font: 500 13px/1.5 var(--sans); color: var(--granite-d); font-style: normal; }
.what i { display: block; margin-top: 2px; color: var(--ink-2); }
.hero__bar { border-bottom: 1px solid var(--line); }
.hero__bar-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px 40px; padding-top: 20px; padding-bottom: 20px; }
.hero__info { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; min-width: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font: 500 13px/1.4 var(--sans); color: var(--ink-2); border: 1px solid var(--granite); padding: 4px 10px; }
.tags .ko-alt { font-size: 12px; border: 0; padding: 0; margin-left: .4em; }
.addr address { font: 600 18px/1.5 var(--serif); }
.addr .tr { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.addr .tip { font-size: 13px; color: var(--granite-d); }
.hours { font-size: 14px; color: var(--ink-2); padding-left: 14px; position: relative; }
.hours::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border: 1px solid var(--granite-d); border-radius: 50%; }
.hero__acts { flex-wrap: nowrap; }
/* 외국어 띠: 옮긴 주소·지도 앱 안내가 더 있어 — 꼬리표 | 주소·운영시간 한 칸(운영시간이 꼬리표 밑에 홀로 떨어지지 않게) */
@media (min-width: 1280px) {
  html:not([lang="ko"]) .hero__info { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 28px; }
  html:not([lang="ko"]) .hero__info .tags { grid-row: span 2; }
}
.hero__acts .acts__k { width: auto; margin-right: 6px; }
.js .hero__name { animation: up .9s cubic-bezier(.2, .7, .2, 1) both; }
.js .hero__bar-in { animation: up .9s .15s cubic-bezier(.2, .7, .2, 1) both; }
.js .hero__ph img { animation: settle 1.6s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes up { from { opacity: 0; transform: translateY(14px); } }
@keyframes settle { from { opacity: .4; transform: scale(1.035); } }

/* ── 섹션 ── */
.sc { padding: 128px 0; border-top: 1px solid var(--line); }
.hero + .sc { border-top: 0; }
.sc__grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; }
.sc-hd h2 { font-size: 26px; font-weight: 600; letter-spacing: .04em; padding-top: 18px; position: relative; }
.sc-hd h2::before { content: ""; position: absolute; left: 0; top: 0; width: 24px; height: 2px; background: var(--pink); }
html:not([lang="ko"]) .sc-hd h2 { letter-spacing: 0; }

/* 소개 */
.lead { font: 500 clamp(24px, 2.5vw, 34px)/1.6 var(--serif); color: var(--ink); max-width: 21em; text-wrap: balance; }
html:not([lang="ko"]) .lead { font-size: clamp(22px, 2.1vw, 29px); max-width: 26em; }
.lead .ko-alt { font-size: 15px; margin-left: .2em; margin-right: .1em; }
.src { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.src::before { content: ""; width: 20px; height: 1px; background: var(--granite); }

/* 위치 */
.way__body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 64px; align-items: start; }
.facts > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 20px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line); }
.facts > div:first-child { padding-top: 0; }
.facts > div:last-child { border-bottom: 0; }
.facts dt { font: 600 13px/1.9 var(--sans); color: var(--granite-d); letter-spacing: .06em; }
.facts dd { font-size: 16px; }
.addr--big address { font-size: 24px; line-height: 1.45; }
.src--in { margin-top: 6px; }
.src--in::before { width: 12px; }
.geo { font: 500 15px/1.9 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--ink-2); }
.plate { display: block; max-width: 280px; margin: 0 auto; text-decoration: none; color: var(--ink); }
.plate svg { width: 100%; height: auto; display: block; }
.plate__k { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; margin-top: 8px; font: 600 14px/1.4 var(--sans); }
.plate__k svg { width: 13px; height: 13px; flex: none; }
.plate__k span { border-bottom: 1px solid var(--granite); }
.plate:hover .plate__k span { border-color: var(--ink); }
.plate:hover .r2 { fill: #dfe3e8; }
.plate .r1 { fill: none; stroke: var(--granite); stroke-width: 1; }
.plate .r2 { fill: var(--paper-2); stroke: var(--pink); stroke-width: 2; }
.plate .r3 { fill: none; stroke: var(--line); stroke-width: 1; }
.plate .lb { font: 600 13px var(--sans); letter-spacing: .1em; fill: var(--granite-d); }
.plate .pin { fill: var(--navy); }
.plate .dot { fill: var(--paper); }

/* 가까운 곳 */
.near__p { font-size: 15px; color: var(--ink-2); margin-bottom: 28px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.card { padding: 26px 24px 30px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.card + .card { border-left: 1px solid var(--line); }
.card:first-child { padding-left: 0; }
.card__t { font: 600 12px/1.4 var(--sans); color: var(--granite-d); letter-spacing: .08em; }
.card h3 { font-size: 20px; line-height: 1.4; }
.card h3 .ko-alt { display: block; margin: 4px 0 0; font-size: 13px; }
.km { margin-top: auto; padding-top: 18px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 4px; color: var(--granite-d); font-size: 13px; }
.km span:first-child { width: 100%; }
.km b { font: 600 44px/1 var(--serif); color: var(--navy); letter-spacing: -.01em; }
.km b + span { font: 600 16px/1 var(--sans); color: var(--navy); }

/* ── 맨 아래 길찾기 띠 — 현판의 남청 ── */
.end { background: var(--navy); color: var(--on-navy); padding: 88px 0; }
.end__in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end; }
.end h2 { font-size: clamp(26px, 2.6vw, 36px); position: relative; padding-top: 22px; text-wrap: balance; }
.end h2::before { content: ""; position: absolute; left: 0; top: 0; width: 28px; height: 2px; background: var(--pink); }
.addr--end { margin-top: 14px; }
.addr--end address { font: 500 17px/1.5 var(--sans); }
.addr--end .tr, .addr--end .tip { color: #c4cad2; }
.acts--end .acts__k { color: #c4cad2; }
.acts--end .btn { background: var(--paper); color: var(--navy); border-color: var(--paper); }
.acts--end .btn:hover { background: #fff; border-color: #fff; }
.end :focus-visible { outline-color: var(--paper); }

/* ── 바닥 ── */
.ft { background: var(--paper-2); padding: 44px 0 56px; font-size: 14px; color: var(--ink-2); }
.ft__in { display: flex; justify-content: space-between; gap: 32px; align-items: flex-start; }
.ft__name { display: flex; align-items: center; gap: 10px; color: var(--ink); margin-bottom: 14px; }
.ft__name b { font: 700 17px/1.3 var(--serif); letter-spacing: .04em; }
html:not([lang="ko"]) .ft__name b { letter-spacing: 0; }
.ft__disc { color: var(--ink); }
.credit { margin-top: 6px; font-size: 13px; color: var(--granite-d); }
.top { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; text-decoration: none; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--ink); }

/* ── 모바일 메뉴 ── */
.menu { position: fixed; inset: 0; z-index: 50; background: var(--paper); padding: 88px 28px 40px; overflow-y: auto; display: flex; flex-direction: column; gap: 40px; }
.menu[hidden] { display: none; }
.menu__x { position: absolute; top: 12px; right: 16px; width: 44px; height: 44px; border: 1px solid var(--line); background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: var(--ink); }
.menu ol { border-top: 1px solid var(--line); }
.menu li a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; font: 600 24px/1.3 var(--serif); }
.menu .acts .btn { flex: 1 1 0; justify-content: center; }
body.menu-open { overflow: hidden; }

/* ── 나타남 ── */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .js .hero__name, .js .hero__bar-in, .js .hero__ph img { animation: none; }
}

/* ── 반응형 ── */
@media (max-width: 1279px) {
  html:not([lang="ko"]) .hero__info { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (max-width: 1100px) {
  .sc__grid { grid-template-columns: 180px minmax(0, 1fr); gap: 40px; }
  .way__body { grid-template-columns: minmax(0, 1fr) 220px; gap: 40px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 900px) {
  .gnb { display: none; }
  .burger { display: block; }
  .sc__grid { grid-template-columns: 1fr; gap: 28px; }
  .way__body { grid-template-columns: 1fr; }
  .plate { max-width: 220px; }
  .end__in { grid-template-columns: 1fr; }
}
@media (max-width: 1023px) {
  html:not([lang="ko"]) .hero__bar-in { grid-template-columns: minmax(0, 1fr); justify-items: start; }   /* 외국어: 길찾기는 안내 아래 왼쪽 */
}
@media (max-width: 767px) {
  :root { --hd: 60px; }
  .wrap { padding: 0 20px; }
  .hd__in { padding: 0 14px 0 16px; gap: 8px; }
  .brand { gap: 8px; min-width: 0; flex: 0 1 auto; }
  .brand b { font-size: 16px; letter-spacing: .03em; }
  html:not([lang="ko"]) .brand b { font-size: 13px; line-height: 1.25; max-width: 7.4em; }
  .hd__tools { gap: 6px; margin-left: auto; }
  .lang { padding-left: 4px; border-left: 0; }
  .lang button { min-width: 40px; padding: 0 5px; font-size: 12px; }
  .lang button[aria-pressed="true"]::after { left: 6px; right: 6px; }
  .burger { width: 40px; height: 40px; }
  .burger span { top: 19px; left: 11px; right: 11px; }
  .hero { height: auto; min-height: 0; max-height: none; }
  .hero__stage { flex: none; overflow: visible; background: none; }
  .hero__top { padding: 28px 0 22px; background: none; }
  .hero__title { font-size: 64px; }
  html:not([lang="ko"]) .hero__title { font-size: 36px; }
  html:not([lang="ko"]) .hero__title .ko-alt { margin-top: 6px; font-size: 15px; }
  html[lang="zh-CN"] .hero__title, html[lang="ja"] .hero__title { font-size: 54px; }
  .what { margin-top: 10px; font-size: 14px; }
  .hero__ph { position: static; }
  .hero__ph picture, .hero__ph img { height: auto; }
  html:not([lang="ko"]) .hero__ph img { height: min(62vw, 250px); object-position: 50% 88%; }   /* 외국어는 설명 줄이 더 있어 하늘을 줄이고 길찾기를 첫 화면에 */
  .hero__bar-in { display: block; padding-top: 22px; padding-bottom: 28px; }
  .hero__info { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero__acts { margin-top: 16px; flex-wrap: wrap; }
  .hero__acts .acts__k { width: 100%; margin: 0; }
  .hero__acts .btn { flex: 1 1 0; justify-content: center; }
  .sc { padding: 80px 0; }
  .facts > div { grid-template-columns: 1fr; gap: 6px; padding: 18px 0; }
  .facts dt { line-height: 1.5; }
  .addr--big address { font-size: 21px; }
  .acts--end .btn { flex: 1 1 0; justify-content: center; }
  .acts--end { width: 100%; }
  .card { padding: 22px 16px 24px; }
  .card:first-child, .card:nth-child(3) { padding-left: 0; }
  .card:nth-child(even) { padding-right: 0; }
  .km b { font-size: 36px; }
  .end { padding: 64px 0; }
  .menu { padding-left: 20px; padding-right: 20px; }   /* 메뉴 속 길찾기 단추 글이 두 줄로 꺾이지 않게(390 日本語) */
  .ft__in { flex-direction: column; gap: 20px; }
}
@media (max-width: 374px) {
  .hd__tools { gap: 4px; }
  .lang button { padding: 0 3px; }
  .hero__title { font-size: 56px; }
  .acts .btn { padding: 10px; gap: 6px; font-size: 14px; }   /* 단추 둘이 한 줄 — 글이 두 줄로 꺾이지 않게 */
  .btn svg + span + svg { margin-left: 0; }
  /* 외국어 360: 사진 띠를 낮추고 분류 꼬리표를 길찾기 뒤로 — 길찾기가 첫 화면(740) 안에 */
  html:not([lang="ko"]) .hero__top { padding: 20px 0 14px; }
  html[lang="en"] .hero__ph img { height: 150px; object-position: 50% 62%; }   /* 영어는 설명이 세 줄 — 사진 띠를 더 낮춘다 */
  html[lang="zh-CN"] .hero__ph img, html[lang="ja"] .hero__ph img { object-position: 50% 50%; }   /* 아래 잔디 위 작은 돌비는 띠 밖으로 */
  html:not([lang="ko"]) .hero .addr .tip { display: none !important; }   /* 지도 앱 안내는 위치·맨 아래 띠에 그대로 */
  html:not([lang="ko"]) .hero__bar-in { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 16px; }
  html:not([lang="ko"]) .hero__info { display: contents; }
  html:not([lang="ko"]) .hero__acts { order: 1; width: 100%; margin-top: 4px; }
  html:not([lang="ko"]) .tags { order: 2; margin-top: 8px; }
}
