/* 계절식탁 함덕점 — 먹색(검은 대리석 상) + 돌빛 흰색(건물 외벽) + 낙관 붉은색(간판) + 붓글씨 제목(간판) */
:root {
  --ink-rgb: 13 13 12;
  --paper-rgb: 240 241 238;
  --ink: rgb(var(--ink-rgb));
  --ink-2: #2a2a28;
  --paper: rgb(var(--paper-rgb));
  --paper-2: #e2e5e1;
  --white: #fbfbf9;
  --line: rgb(var(--paper-rgb) / .16);
  --line-ink: rgb(var(--ink-rgb) / .14);
  --mute: rgb(var(--paper-rgb) / .68);
  --mute-ink: rgb(var(--ink-rgb) / .64);
  --seal: #a62a52; /* 로고 낙관 색 */
  /* 제목: 간판의 붓글씨를 닮은 연성체(굵기 한 가지). 숫자와 본문은 고딕 */
  --display: "Yeon Sung", "Pretendard Variable", Pretendard, sans-serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(20px, 5vw, 64px);
  --section: clamp(72px, 11vw, 152px);
  --top-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: var(--top-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font: 400 1rem/1.7 var(--sans); word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.22; letter-spacing: 0; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.8vw, 3.5rem); }
h3 { font-family: var(--display); font-weight: 400; letter-spacing: 0; }
::selection { background: var(--seal); color: var(--white); }
/* 초점 표시: 밝은 띠 + 어두운 테두리라 어느 배경에서도 보임 */
:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; box-shadow: 0 0 0 6px var(--ink); border-radius: 4px; }
.wrap { width: min(1200px, 100% - var(--pad) * 2); margin-inline: auto; }
.paper { background: var(--paper); color: var(--ink); }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--paper); color: var(--ink); padding: 12px 16px; }
.skip:focus { left: 8px; top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sec-head { margin-bottom: clamp(32px, 5vw, 64px); }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .9375rem; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .1s ease-out;
}
.btn:active, .dock a:active, .copy:active { transform: scale(.97); }
.btn--solid { background: var(--paper); color: var(--ink); }
.btn--ghost, .btn--line { border-color: rgb(var(--paper-rgb) / .45); color: var(--paper); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink-line { border-color: var(--ink); color: var(--ink); }
@media (hover: hover) {
  .btn--solid:hover { background: var(--white); }
  .btn--ghost:hover, .btn--line:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
  .btn--ink:hover { background: var(--ink-2); }
  .btn--ink-line:hover { background: var(--ink); color: var(--paper); }
  .nav a:hover, .lang:hover { color: var(--paper); }
  .nav a:hover::after { transform: scaleX(1); }
  .copy:hover { background: var(--paper-2); }
}

/* 상단 */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--top-h);
  display: flex; align-items: center; gap: 24px; padding: 0 var(--pad);
  transition: background .3s, backdrop-filter .3s, border-color .3s; border-bottom: 1px solid transparent;
}
.top.is-stuck { background: rgb(var(--ink-rgb) / .82); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); border-color: var(--line); }
.brand { display: inline-flex; align-items: baseline; gap: 8px; min-height: 44px; align-content: center; }
.brand > * { align-self: center; }
/* 로고: 식당에서 받은 원본 파일 (img/logo.svg) */
.brand__logo { height: 40px; width: auto; }
.brand__branch { font-size: .75rem; font-weight: 600; color: var(--mute); }
.nav { display: flex; gap: clamp(16px, 2.4vw, 32px); margin-left: auto; font-size: .9375rem; font-weight: 500; }
.nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; color: var(--mute); transition: color .2s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px; background: var(--paper); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease-out); }
.nav a:active { color: var(--paper); }
.top__call { min-height: 44px; padding: 0 20px; font-size: .875rem; }
.lang { display: inline-flex; align-items: center; min-height: 44px; font-size: .8125rem; font-weight: 600; color: var(--mute); transition: color .2s; }
.lang:active { color: var(--paper); }

/* 첫 화면 */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; align-content: center; gap: clamp(20px, 3vw, 36px); padding: var(--top-h) var(--pad); overflow: hidden; isolation: isolate; text-align: center; }
.hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; animation: settle 9s var(--ease-out) both; }
@keyframes settle { from { transform: scale(1.09); } to { transform: scale(1); } }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgb(var(--ink-rgb) / .6) 0%, rgb(var(--ink-rgb) / 0) 22%),
    rgb(var(--ink-rgb) / .56);
}
.hero__logo { display: block; width: clamp(140px, 15vw, 220px); height: auto; margin: clamp(20px, 3vw, 36px) auto 0; }
/* 붓글씨체는 굵기가 하나뿐이라 첫 화면 제목만 얇은 고딕으로 */
.hero h1 { font-family: var(--sans); font-weight: 200; font-size: clamp(2rem, 5.4vw, 4.5rem); line-height: 1.3; letter-spacing: -.01em; animation: rise .9s var(--ease-out) both; }
/* 첫 화면 글자만 한 번 떠오름: 이 페이지의 유일한 연출 */
/* 글자는 처음부터 보이고 위치만 움직임: 애니메이션이 멈춰도 내용이 사라지지 않음 */
@keyframes rise { from { transform: translateY(20px); } to { transform: none; } }

.open-badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--paper); }
.open-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #8a8c88; }
.open-badge.is-open::before { background: #55c46a; }
.open-badge--ink { color: var(--ink); font-size: .8125rem; padding: 2px 12px; border: 1px solid var(--line-ink); border-radius: 999px; margin-left: 8px; vertical-align: 2px; }

/* 이야기 */
.story { padding: var(--section) 0; }
.story__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 7vw, 112px); align-items: center; }
.story__body { font-size: clamp(1rem, 1.35vw, 1.125rem); color: rgb(var(--ink-rgb) / .82); max-width: 34em; }
.story__body h2 { margin-bottom: clamp(24px, 3vw, 40px); color: var(--ink); }
.story__body p + p { margin-top: 1em; }
.story__photo { order: -1; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; background: var(--ink); }
.story__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 50%; }

/* 대표 메뉴 */
.signature { padding: var(--section) 0; background: var(--ink); }
.sig { display: grid; gap: clamp(48px, 8vw, 112px); }
.sig__item { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.sig__item--flip .sig__media { order: 2; }
.sig__img { aspect-ratio: 1; overflow: hidden; border-radius: 4px; }
.sig__img img { width: 100%; height: 100%; object-fit: cover; }
.sig__text h3 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.2; margin: 0 0 12px; }
.sig__with { color: var(--mute); }
.price-row { display: flex; flex-wrap: wrap; margin-top: 28px; border-top: 1px solid var(--line); }
.price-row div { flex: 1 1 110px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.price-row dt { font-size: .8125rem; color: var(--mute); }
.price-row dd { font-weight: 700; font-size: clamp(1.375rem, 2.4vw, 1.875rem); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.price-row dd::after, .dish__price dd::after { content: "원"; font-weight: 500; font-size: .55em; margin-left: 2px; opacity: .75; }
/* 영어 페이지는 숫자 앞에 ₩를 쓰므로 뒤의 "원"은 뺌 */
:lang(en) .price-row dd::after, :lang(en) .dish__price dd::after { content: none; }

/* 전체 메뉴 */
.menu { padding: var(--section) 0; }
.menu__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.menu__list { border-top: 2px solid var(--ink); }
.dish { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; padding: 24px 12px 24px 0; border-bottom: 1px solid var(--line-ink); }
.dish__thumb { display: none; }
.dish h3 { font-size: clamp(1.4375rem, 2.3vw, 1.875rem); line-height: 1.3; }
.dish__main p { margin-top: 4px; color: var(--mute-ink); font-size: .9375rem; }
.dish__price { display: flex; gap: 24px; text-align: right; }
.dish__price dt { font-size: .75rem; color: var(--mute-ink); }
.dish__price dd { font-weight: 700; letter-spacing: -.01em; font-size: clamp(1.0625rem, 1.6vw, 1.3125rem); font-variant-numeric: tabular-nums; white-space: nowrap; }
.menu__preview { position: sticky; top: calc(var(--top-h) + 28px); aspect-ratio: 1; overflow: hidden; border-radius: 4px; background: var(--ink); }
.menu__preview img { width: 100%; height: 100%; object-fit: cover; transition: opacity .28s ease-out; }
.menu__preview img.is-swap { opacity: 0; }
@media (hover: hover) and (min-width: 901px) {
  .dish.is-active { background: linear-gradient(90deg, var(--paper-2), transparent 70%); box-shadow: -16px 0 0 var(--paper-2), -19px 0 0 var(--seal); }
}

/* 매장 */
.space { background: var(--ink); padding: var(--section) 0; }
.gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 20px); }
.gallery figure { position: relative; overflow: hidden; border-radius: 4px; }
.gallery figure:nth-child(1) { grid-column: span 7; aspect-ratio: 4 / 3; }
.gallery figure:nth-child(2) { grid-column: span 5; }
.gallery figure:nth-child(3) { grid-column: span 8; aspect-ratio: 16 / 10; }
.gallery figure:nth-child(4) { grid-column: span 4; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }

/* 오시는 길 */
.visit { padding: var(--section) 0; }
.visit__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.info { border-top: 2px solid var(--ink); }
.info > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--line-ink); }
.info dt { font-size: .875rem; font-weight: 600; color: var(--mute-ink); padding-top: 2px; }
.info strong { font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.tel { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1.5rem; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.copy { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; font: 600 .8125rem/1 var(--sans); color: var(--ink); background: none; border: 1px solid var(--line-ink); border-radius: 999px; padding: 0 16px; cursor: pointer; transition: background .2s, transform .1s ease-out; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: .8125rem; font-weight: 600; padding: 4px 12px; border: 1px solid var(--line-ink); border-radius: 999px; }
.map iframe { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: 4px; background: var(--paper-2); filter: grayscale(.35) contrast(1.05); }
.map__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

/* 하단 */
.foot { background: var(--ink); border-top: 1px solid var(--line); padding: 48px 0 56px; font-size: .875rem; color: var(--mute); }
.foot__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: start; }
.brand--foot { color: var(--paper); min-height: 0; }
.foot address { font-style: normal; line-height: 1.9; }
.foot address a { color: var(--paper); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.foot__biz { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .8125rem; }
.foot__biz dt { display: inline; }
.foot__biz dd { display: inline; margin-left: 6px; color: var(--paper); }
.foot__copy { grid-column: 1 / -1; font-size: .8125rem; }

/* 모바일 하단 고정 버튼 */
.dock { display: none; }

/* 스크롤 등장: 스크립트가 준비됐을 때만 숨김. 스크립트가 없으면 전부 보임 */
.motion-ready .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.motion-ready .reveal.is-in { opacity: 1; transform: none; }

/* 태블릿 이하 */
@media (max-width: 900px) {
  .nav { display: none; }
  .lang { margin-left: auto; }
  .story__grid, .sig__item, .menu__grid, .visit__grid { grid-template-columns: minmax(0, 1fr); }
  .story__photo { order: 0; aspect-ratio: 4 / 3; }
  .story__photo img { object-position: 50% 50%; }
  .sig__item--flip .sig__media { order: 0; }
  .menu__preview { display: none; }
  .dish { grid-template-columns: 72px minmax(0, 1fr); padding-right: 0; align-items: start; }
  .dish__thumb { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: 4px; }
  .dish__price { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: left; padding-top: 8px; }
  .gallery figure:nth-child(n) { grid-column: span 12; aspect-ratio: 4 / 3; }
  .gallery figure:nth-child(2), .gallery figure:nth-child(4) { grid-column: span 6; aspect-ratio: 3 / 4; }
  .gallery figure:nth-child(3) { order: 3; }
  .foot__grid { grid-template-columns: minmax(0, 1fr); }
}

/* 휴대폰 */
@media (max-width: 760px) {
  :root { --top-h: 60px; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .brand__logo { height: 36px; }
  .top__call { display: none; }
  .hero { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .hero h1 { font-weight: 300; }
  .info > div { grid-template-columns: 72px minmax(0, 1fr); }
  /* 첫 화면의 예약 버튼이 보이는 동안에는 숨고, 지나가면 올라옴 */
  .dock {
    position: fixed; inset: auto 0 0 0; z-index: 60; display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: rgb(var(--ink-rgb) / .88);
    -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); border-top: 1px solid var(--line);
  }
  .dock a { display: grid; place-items: center; min-height: 48px; border-radius: 999px; font-weight: 700; font-size: .9375rem; transition: transform .1s ease-out; }
  .dock a:first-child { background: var(--paper); color: var(--ink); }
  .dock a:last-child { border: 1px solid rgb(var(--paper-rgb) / .45); }
}

/* 움직임 줄이기: 이동·확대는 끄고 짧은 색·투명도 변화만 남김 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .motion-ready .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .copy, .dock a { transition: background .2s, color .2s, border-color .2s; }
  .btn:active, .dock a:active, .copy:active { transform: none; }
}
/* 투명도 줄이기·고대비: 반투명 바를 단색으로 */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .top.is-stuck, .dock { background: var(--ink); -webkit-backdrop-filter: none; backdrop-filter: none; }
  :root { --mute: rgb(var(--paper-rgb) / .86); --mute-ink: rgb(var(--ink-rgb) / .82); --line: rgb(var(--paper-rgb) / .4); --line-ink: rgb(var(--ink-rgb) / .4); }
}
