/* 미암마루 — 벽돌과 하늘, 볕 드는 벽의 색 */

:root {
  --paper: #F5EFE4;
  --paper-2: #EBE2D1;
  --ink: #2A2019;
  --ink-2: #5B4D41;
  --rule: rgba(42, 32, 25, .16);
  --olive: #4F6631;
  --tape: #A9B892;
  --night: #17131B;
  --plum: #C4B0DC;
  --cream: #F8F2E8;

  --serif: 'Gowun Batang', 'Noto Serif KR', serif;
  --sans: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --gut: clamp(20px, 4.5vw, 72px);
  --max: 1320px;
  --sec: clamp(88px, 12vw, 176px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure { margin: 0; }
section[id] { scroll-margin-top: 56px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }
.br-m { display: none; }

/* 손글씨 로고 — 색은 currentColor를 따른다 */
.wm {
  display: block;
  aspect-ratio: 1551 / 401;
  background: currentColor;
  -webkit-mask: url(assets/wordmark.png) center / contain no-repeat;
  mask: url(assets/wordmark.png) center / contain no-repeat;
}

.label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--olive);
}

/* 탁상 이름표의 줄무늬 */
.tape {
  height: 22px;
  background: linear-gradient(90deg, transparent 18px, var(--tape) 18px 48px, transparent 48px) 0 0 / 66px 100% round;
}

figcaption {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* ─── 스크롤 등장 ─── */
.js .r {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.2, .7, .2, 1);
}
.js .r.in { opacity: 1; transform: none; }

/* ─── 상단 메뉴 ─── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gut);
  color: var(--cream);
  transition: background-color .4s, color .4s, padding .4s, box-shadow .4s;
}
.nav.scrolled {
  padding-block: 11px;
  background: rgba(245, 239, 228, .95);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--rule);
}
.nav-mark { display: block; width: 92px; opacity: 0; pointer-events: none; transition: opacity .4s; }
.nav.scrolled .nav-mark { opacity: 1; pointer-events: auto; }
.nav ul {
  display: flex;
  gap: clamp(16px, 2.6vw, 38px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  font-weight: 500;
}
.nav li a { display: block; padding-block: 6px; }
.nav li a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

/* ─── 첫 화면 ─── */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--ink);
  color: var(--cream);
}
.hero-img { position: absolute; inset: 0; }
.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 100%;
  animation: settle 9s cubic-bezier(.16, .6, .3, 1) both;
}
@keyframes settle { from { transform: scale(1.06); } to { transform: none; } }
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(24, 18, 14, .42), transparent 22%),
    linear-gradient(to top, rgba(24, 18, 14, .88), rgba(24, 18, 14, .62) 34%, transparent 62%);
}
.hero-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px 48px;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: 0 var(--gut) clamp(32px, 5vw, 64px);
}
.hero h1 { width: clamp(240px, 33vw, 480px); }
.hero-line {
  margin-top: 20px;
  font-family: var(--serif);
  font-size: clamp(22px, 2.3vw, 32px);
  line-height: 1.4;
}
.hero-sub { margin-top: 6px; font-size: 16px; opacity: .88; }
.hero-open { display: block; text-align: right; }
.hero-date {
  display: block;
  font-family: var(--serif);
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1.15;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.hero-when { display: block; margin-top: 8px; font-size: 16px; }
.hero-when b, .visit-line b { margin-left: 6px; font-weight: 700; color: #DCE8C6; }

/* ─── 소개 ─── */
.intro { padding-block: var(--sec); }
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(220px, 25vw, 340px);
  gap: clamp(40px, 7vw, 110px);
  align-items: center;
}
.big {
  font-family: var(--serif);
  font-size: clamp(27px, 3.5vw, 50px);
  line-height: 1.5;
  letter-spacing: -.015em;
}
.big em { font-style: normal; color: var(--olive); }
.body { max-width: 34em; margin-top: clamp(26px, 3vw, 40px); font-size: 18px; color: var(--ink-2); }
.intro-card { transform-origin: center; }
.js .intro-card.r { transform: translateY(20px) rotate(0deg); }
.js .intro-card.r.in, .intro-card { transform: rotate(2deg); }
.intro-card img { box-shadow: 0 22px 44px -22px rgba(42, 32, 25, .5); }
.intro-card figcaption { transform: rotate(-2deg); text-align: center; margin-top: 16px; }

/* ─── 큰 창 ─── */
.window { position: relative; background: var(--ink); color: var(--cream); }
.window img { width: 100%; }
.window::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(24, 18, 14, .78), transparent 40%);
  pointer-events: none;
}
.window-cap {
  position: absolute;
  z-index: 1;
  left: var(--gut);
  bottom: clamp(24px, 4.5vw, 60px);
}
.window-title {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 46px);
  line-height: 1.35;
}

/* ─── 공간 ─── */
.space { padding-block: var(--sec); }
.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(36px, 4.6vw, 64px) clamp(18px, 2.4vw, 32px);
  align-items: start;
}
.gallery img { width: 100%; }
.g-seats { grid-column: 1 / 9; grid-row: 1 / 3; }
.g-head { grid-column: 9 / 13; grid-row: 1; }
.g-head h2 {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: clamp(32px, 3.7vw, 54px);
  line-height: 1.25;
  letter-spacing: -.02em;
}
.g-coffee { grid-column: 9 / 13; grid-row: 2; align-self: end; }
.g-lamp { grid-column: 1 / 5; grid-row: 3; margin-top: clamp(40px, 8vw, 120px); }
.g-roof { grid-column: 5 / 10; grid-row: 3; }
.g-roof figcaption b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
}
.g-case { grid-column: 10 / 13; grid-row: 3; align-self: end; }

/* ─── 고구마빵 ─── */
.bread {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  background: var(--night);
  color: var(--cream);
}
.bread-text {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: clamp(64px, 8vw, 120px) 0 clamp(64px, 8vw, 120px) max(var(--gut), calc((100vw - var(--max)) / 2 + var(--gut)));
}
.bread .label { color: var(--plum); }
.bread h2 {
  margin-top: 16px;
  font-family: var(--serif);
  font-size: clamp(36px, 4.2vw, 62px);
  line-height: 1.25;
  letter-spacing: -.02em;
}
.bread-text > p:not(.bread-quote) { max-width: 26em; margin-top: 24px; color: rgba(248, 242, 232, .84); }
.bread-inset { display: flex; align-items: center; gap: 18px; margin-top: 36px; }
.bread-inset img { width: 104px; height: 104px; object-fit: cover; border-radius: 50%; }
.bread-inset figcaption { margin: 0; color: rgba(248, 242, 232, .84); }
.bread-quote {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid rgba(248, 242, 232, .22);
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.5;
  color: var(--plum);
}
.bread-img { position: relative; min-height: 100%; }
.bread-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.bread-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--night), rgba(23, 19, 27, 0) 34%);
}

/* ─── 어르신 ─── */
.people { padding-block: var(--sec); background: var(--paper-2); text-align: center; }
.people-face { width: 104px; margin-inline: auto; }
.people h2 {
  margin-top: 26px;
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 52px);
  line-height: 1.4;
  letter-spacing: -.015em;
}
.people-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 72px);
  margin-top: clamp(48px, 6vw, 84px);
  text-align: left;
}
.people-grid h3 {
  padding-top: 18px;
  border-top: 1px solid var(--ink);
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.4;
}
.people-grid p { margin-top: 10px; color: var(--ink-2); }

/* ─── 메뉴 — 펄 바닥 위에 놓인 종이 ─── */
.menu {
  padding: var(--sec) var(--gut);
  background: #D9BFA9 url(assets/floor.jpg) center / cover;
}
.menu-card {
  max-width: 1120px;
  margin-inline: auto;
  padding: clamp(18px, 2.4vw, 30px) clamp(20px, 5vw, 72px);
  background: var(--cream);
  box-shadow: 0 40px 70px -40px rgba(60, 36, 20, .6);
}
.menu-head { padding-block: clamp(36px, 5vw, 64px) clamp(28px, 4vw, 48px); text-align: center; }
.menu-head .wm { width: clamp(150px, 18vw, 220px); margin-inline: auto; }
.menu-head h2 {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: .24em;
  text-indent: .24em;
  color: var(--ink-2);
}
.menu-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(36px, 6vw, 84px);
}
.m { width: 100%; margin-bottom: 44px; border-collapse: collapse; }
.m caption {
  padding-bottom: 8px;
  text-align: left;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.3;
  color: var(--olive);
}
.m thead th {
  padding: 0 0 8px 14px;
  text-align: right;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--ink-2);
}
.m thead td { padding: 0; }
.m tbody th, .m tbody td {
  padding-block: 13px;
  border-top: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.4;
}
.m tbody th { padding-right: 8px; text-align: left; font-size: 18px; font-weight: 600; }
.m tbody td {
  padding-left: 14px;
  text-align: right;
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.m small { display: block; margin-top: 3px; font-size: 15px; font-weight: 400; line-height: 1.45; color: var(--ink-2); }
.m-extra { padding: 0; }
.m-extra caption { font-size: 21px; }
.m-extra tbody th, .m-extra tbody td { padding-block: 9px; font-size: 16px; font-weight: 500; }
.menu-note {
  padding-block: 8px 28px;
  text-align: center;
  font-size: 14.5px;
  color: var(--ink-2);
}

/* ─── 오시는 길 ─── */
.visit { background: var(--ink); color: var(--cream); }
.visit-sky {
  position: relative;
  padding-block: clamp(96px, 13vw, 190px) clamp(48px, 7vw, 96px);
  background: url(assets/sky.jpg) center / cover;
}
.visit-sky::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(26, 34, 72, .3), rgba(26, 34, 72, .52) 62%, var(--ink));
}
.visit-sky .wrap { position: relative; }
.visit .label { color: var(--cream); }
.visit-date {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: clamp(104px, 21vw, 300px);
  line-height: 1;
  letter-spacing: -.03em;
}
.visit-line { margin-top: 14px; font-family: var(--serif); font-size: clamp(21px, 2.3vw, 30px); line-height: 1.45; }
.visit-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(44px, 6vw, 80px) clamp(64px, 8vw, 110px);
}
.visit-info h3 { font-size: 15px; font-weight: 500; letter-spacing: .1em; color: rgba(248, 242, 232, .72); }
.visit-info p { margin-top: 10px; font-family: var(--serif); font-size: clamp(20px, 1.8vw, 24px); line-height: 1.5; }
.visit-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.visit-info .visit-links { margin-top: 16px; font-family: var(--sans); font-size: 16px; }
.visit-links a { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* ─── 맨 아래 ─── */
.footer { padding-bottom: 40px; background: var(--paper); color: var(--ink); }
.footer-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 32px;
  padding-top: 32px;
}
.footer .wm { width: 104px; }
.footer p { font-size: 15px; color: var(--ink-2); }

/* ─── 작은 화면 ─── */
@media (max-width: 960px) {
  .intro-grid { grid-template-columns: 1fr; }
  .intro-card { width: min(62vw, 300px); margin-inline: auto; }

  .gallery { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .g-head { grid-column: 1 / -1; grid-row: 1; }
  .g-seats { grid-column: 1 / -1; grid-row: 2; }
  .g-coffee { grid-column: 2 / -1; grid-row: 3; }
  .g-lamp { grid-column: 1 / 4; grid-row: 4; margin-top: 0; }
  .g-case { grid-column: 4 / -1; grid-row: 4; }
  .g-roof { grid-column: 1 / 6; grid-row: 5; }

  .bread { grid-template-columns: 1fr; }
  .bread-img { grid-row: 1; aspect-ratio: 1; min-height: 0; }
  .bread-img::before { background: linear-gradient(to top, var(--night), rgba(23, 19, 27, 0) 30%); }
  .bread-text { padding: 12px var(--gut) 72px; }

  .people-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 760px) {
  .br-m { display: inline; }
  .nav { padding-block: 14px; }
  .nav ul { font-size: 15px; gap: 14px; }

  .hero { flex-direction: column; align-items: stretch; }
  .hero-img { position: relative; inset: auto; flex: 1 1 0; min-height: 0; overflow: hidden; }
  .hero-img img { position: absolute; inset: 0; object-position: 50% 100%; }
  .hero::after { inset: 0 0 auto; height: 22%; background: linear-gradient(to bottom, rgba(24, 18, 14, .42), transparent); }
  .hero-text { flex: none; flex-direction: column; align-items: stretch; gap: 20px; padding-top: 26px; }
  .hero h1 { width: 200px; }
  .hero-line { margin-top: 14px; font-size: 23px; }
  .hero-sub { font-size: 15.5px; }
  .hero-open {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(248, 242, 232, .24);
    text-align: left;
  }
  .hero-date { font-size: 26px; }
  .hero-when { margin: 0; font-size: 15px; white-space: nowrap; }

  .window::after { display: none; }
  .window-cap { position: static; padding: 24px var(--gut) 32px; }

  .menu { padding-inline: 12px; }
  .menu-cols { grid-template-columns: 1fr; }
  .m { margin-bottom: 36px; }

  .visit-info { grid-template-columns: 1fr; gap: 28px; }
  .footer-in { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-img img { animation: none; }
  .js .r { opacity: 1; transform: none; transition: none; }
  .js .intro-card.r { transform: rotate(2deg); }
}
