/* MEMORYCORD — Minimalism, editorial.
   하나의 그리드: 모든 요소의 좌우 기준선은 --pad. 콘텐츠 최대폭 1440.
   타입 스케일: 12 / 14 / 16 / 18 / 22~32(h2) / 40~64(display) — 전부 Pretendard 한 서체
   간격 스케일: 8 · 16 · 24 · 40 · 64 · --space */
:root {
  --bg: #FFFFFF;
  --fg: #1A1A1A;
  --text: #333333;
  --muted: #6B6B6B;          /* #818181 은 흰 배경 3.9:1 → 5.3:1 로 조정 */
  --surface: #F5F5F5;
  --line: #E0E0E0;
  --pad: max(5vw, calc((100vw - 1440px) / 2));
  --space: clamp(72px, 8vw, 120px);
  --gap: clamp(32px, 5vw, 80px);
  --ease: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--fg);
  font: 400 16px/1.75 "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", sans-serif;
  letter-spacing: -0.015em; word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; width: 100%; height: auto; }
strong { font-weight: 600; }
.nw { white-space: nowrap; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--pad); top: 8px; background: var(--fg); color: var(--bg); padding: 8px 12px; z-index: 10; }

/* ───────── header ───────── */
.hdr { position: absolute; inset: 0 0 auto; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 32px var(--pad); }
.logo { font-weight: 600; letter-spacing: 0.32em; text-decoration: none; font-size: 13px; }
.logo span { display: none; }
.nav { display: flex; gap: 36px; font-size: 14px; }
.nav a { text-decoration: none; color: var(--muted); transition: color var(--ease); }
.nav a:hover, .nav a[aria-current] { color: var(--fg); }
@media (min-width: 901px) { /* 메뉴가 우측 사진 위 */
  .nav a { color: rgba(255,255,255,.85); text-shadow: 0 1px 8px rgba(0,0,0,.25); }
  .nav a:hover, .nav a[aria-current] { color: #fff; }
}

/* ───────── hero : 좌 텍스트 5 / 우 사진 7 ───────── */
.hero { display: grid; grid-template-columns: 5fr 7fr; min-height: clamp(640px, 100vh, 960px); }
.hero-txt {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end;
  padding: 160px var(--gap) clamp(64px, 10vh, 120px) var(--pad);
}
.hero-txt h1 { order: -1; }   /* 화면: 한글 H1 → 영문 → 답변. DOM 은 H1 바로 뒤가 답변 문단 */
h1 { font-size: 16px; line-height: 1.4; font-weight: 500; letter-spacing: 0.02em; padding-bottom: 16px; margin-bottom: 32px; border-bottom: 1px solid var(--fg); }
/* 영문 디스플레이: 레퍼런스(Minimalism)대로 얇은 산세리프. 둘째 줄은 이탤릭 대신 회색으로 위계 */
.display { font-weight: 250; font-size: clamp(40px, 4vw, 64px); line-height: 1.08; letter-spacing: -0.045em; margin-bottom: 40px; }
.display em { display: block; font-style: normal; color: var(--muted); white-space: nowrap; }
.lead { font-size: 16px; line-height: 1.85; color: var(--text); max-width: 440px; }
.lead strong { font-weight: 500; color: var(--fg); }

.hero-img { position: relative; overflow: hidden; background: var(--surface); }
.hero-img::after { content: ""; position: absolute; inset: 0 0 auto; height: 160px; background: linear-gradient(rgba(0,0,0,.28), transparent); pointer-events: none; }
.hero-img img { position: absolute; inset: 0; height: 100%; object-fit: cover; opacity: 0; animation: heroFade 18s infinite; }
.hero-img img:nth-child(1) { opacity: 1; animation-delay: 0s; }
.hero-img img:nth-child(2) { animation-delay: -12s; }
.hero-img img:nth-child(3) { animation-delay: -6s; }
@keyframes heroFade { /* 3장 크로스페이드(각 6초) + 느린 줌 */
  0% { opacity: 1; transform: scale(1); }
  28% { opacity: 1; }
  34% { opacity: 0; transform: scale(1.06); }
  94% { opacity: 0; transform: scale(1); }
  100% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-img img { animation: none; }
  .hero-img img:not(:first-child) { display: none; }
}

/* CTA : 텍스트 + hairline */
.btn { display: inline-flex; align-items: center; gap: 16px; margin-top: 48px; font-size: 15px; font-weight: 500; text-decoration: none; padding-bottom: 10px; border-bottom: 1px solid var(--fg); }
.btn::after { content: "→"; transition: transform var(--ease); }
.btn:hover::after { transform: translateX(6px); }

/* ───────── sections : 좌 제목 4 / 우 내용 8 ───────── */
article { counter-reset: sec; }
.sec {
  display: grid; grid-template-columns: 4fr 8fr; column-gap: var(--gap);
  padding: var(--space) var(--pad);
  /* 구분선은 콘텐츠 폭에만 */
  background: linear-gradient(var(--line), var(--line)) no-repeat center top / calc(100% - 2 * var(--pad)) 1px;
}
.hero + .sec, .cta + .sec { background: none; }
.related { padding-bottom: 64px; }
.sec > * { grid-column: 2; min-width: 0; }
.sec > h2 { grid-column: 1; grid-row: 1 / span 30; align-self: start; position: sticky; top: 48px; }
.sec:not(.related) > h2::before {
  counter-increment: sec; content: counter(sec, decimal-leading-zero);
  display: block; margin-bottom: 16px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.16em; color: var(--muted); font-variant-numeric: tabular-nums;
}
h2 { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.35; font-weight: 400; letter-spacing: -0.035em; }
h3 { font-size: 18px; line-height: 1.5; font-weight: 500; margin: 40px 0 8px; }
.sec > p { max-width: 680px; color: var(--text); }
.sec > p + p { margin-top: 16px; }
.sec > p + .tbl, .sec > p + .list, .sec > p + .steps, .sec > p + .channels, .sec > p + .checks, .sec > p + .facts, .sec > p + .prose { margin-top: 40px; }

/* table */
.tbl { overflow-x: auto; margin-bottom: 24px; }
.sec > .tbl ~ .tbl { margin-top: 64px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 680px; }
caption { text-align: left; font-size: 12px; letter-spacing: 0.04em; color: var(--muted); padding-bottom: 16px; }
th, td { text-align: left; padding: 22px 24px 22px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th:last-child, td:last-child { padding-right: 0; }
thead th { font-size: 12px; letter-spacing: 0.04em; color: var(--muted); font-weight: 400; border-bottom-color: var(--fg); padding-top: 0; padding-bottom: 14px; }
tbody th { font-weight: 500; }
.price tbody th { white-space: nowrap; }
td { color: var(--text); }
.price td:nth-last-child(-n+3) { white-space: nowrap; }
.price td:last-child { font-weight: 600; color: var(--fg); }
.note { font-size: 13px; color: var(--muted); line-height: 1.75; }

/* list */
.list { list-style: none; }
.list li { padding: 20px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.list li:first-child { border-top: 1px solid var(--line); }
.list li strong { color: var(--fg); font-weight: 500; }
.list.cols { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 24px; }
.list.cols li:nth-child(-n+3) { border-top: 1px solid var(--line); }
.venues small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
ol.steps { list-style: none; counter-reset: s; }
ol.steps li { counter-increment: s; position: relative; padding: 28px 0 28px 80px; border-bottom: 1px solid var(--line); color: var(--text); }
ol.steps li:first-child { border-top: 1px solid var(--line); }
ol.steps li strong { color: var(--fg); font-weight: 500; }
ol.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 18px; font-size: 30px; font-weight: 200; letter-spacing: -0.03em; color: var(--muted); font-variant-numeric: tabular-nums; }

/* gallery : 첫 장 크게, 나머지 2~3열 */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 64px; }
.sec > .gallery { grid-column: 1 / -1; } /* 사진은 제목 칸까지 넓게 */
.gallery:has(> figure:nth-child(4)) { grid-template-columns: repeat(3, 1fr); }
.gallery figure:first-child { grid-column: 1 / -1; }
.gallery:has(> figure:nth-child(2)):not(:has(> figure:nth-child(3))) figure:first-child { grid-column: auto; } /* 2장이면 나란히 */
.gallery figure.tall { grid-column: auto; grid-row: span 2; }
.gallery figure.tall img { height: 100%; object-fit: cover; }
figcaption { font-size: 12px; letter-spacing: 0.04em; color: var(--muted); margin-top: 12px; }

/* FAQ */
.qa { padding: 32px 0; border-bottom: 1px solid var(--line); }
.qa:first-of-type { border-top: 1px solid var(--line); }
.qa h3 { margin: 0 0 12px; }
.qa p { color: var(--text); max-width: 680px; }

/* closing CTA band */
.cta { background: var(--surface); padding: var(--space) var(--pad); text-align: center; }
.cta .display { margin-bottom: 24px; }
.cta-txt { font-size: 18px; color: var(--text); max-width: 520px; margin: 0 auto; }
.cta .btn { margin-top: 40px; }

/* contact channels */
.channels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ch { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-height: 200px; padding: 32px; background: var(--bg); text-decoration: none; transition: background var(--ease); }
.ch:hover { background: var(--surface); }
.ch strong { font-size: 20px; font-weight: 500; }
.ch span { color: var(--muted); font-size: 14px; }
.ch.primary { background: var(--fg); color: var(--bg); }
.ch.primary span { color: #BDBDBD; }
.ch.primary:hover { background: #333; }
.channels + .note { margin-top: 16px; }

/* related */
.related ul { list-style: none; }
.related li { border-bottom: 1px solid var(--line); }
.related li:first-child { border-top: 1px solid var(--line); }
.related a { display: flex; justify-content: space-between; padding: 20px 0; text-decoration: none; font-size: 18px; transition: padding var(--ease); }
.related a::after { content: "→"; color: var(--muted); }
.related a:hover { padding-left: 8px; }
.updated { padding: 0 var(--pad) 40px; font-size: 13px; color: var(--muted); }

/* footer */
.ftr { display: grid; grid-template-columns: 4fr 8fr; column-gap: var(--gap); padding: 64px var(--pad) 80px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); line-height: 1.9; }
.ftr-logo { font-weight: 600; letter-spacing: 0.32em; color: var(--fg); font-size: 13px; }
.ftr-sig { font-size: 13px; margin-top: 4px; }
.ftr a { color: var(--fg); }

/* ───────── tablet / mobile ───────── */
@media (max-width: 900px) {
  :root { --space: 64px; }
  .hdr { position: static; padding: 20px var(--pad); }
  .nav { gap: 20px; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-txt { padding: 24px var(--pad) 48px; }
  .hero-img { aspect-ratio: 4 / 3; }
  .hero-img::after { display: none; }
  .btn { margin-top: 36px; }
  .sec { grid-template-columns: 1fr; }
  .sec > *, .sec > h2 { grid-column: 1; grid-row: auto; position: static; }
  .sec > h2 { margin-bottom: 32px; }
  .list li { padding: 16px 0; }
  ol.steps li { padding: 24px 0 24px 56px; }
  ol.steps li::before { font-size: 28px; top: 18px; }
  .gallery, .gallery:has(> figure:nth-child(4)) { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; }
  .gallery figure:last-child:nth-child(even) { grid-column: 1 / -1; } /* 첫 장 뒤 홀수 개면 마지막 장을 꽉 채움 */
  .gallery figure.tall { grid-row: auto; }
  .channels { grid-template-columns: 1fr; }
  .ch { min-height: 0; gap: 20px; padding: 28px 24px; }
  .ftr { grid-template-columns: 1fr; row-gap: 24px; padding: 48px var(--pad) 64px; }
  .note { font-size: 14px; }
  figcaption { font-size: 13px; }
  caption { font-size: 13px; }
  /* 히어로: 모바일은 사진 먼저 */
  .hero-img { order: -1; }
  .hero-txt { padding-top: 32px; }
  /* 예식장 목록 2열 */
  .list.cols { grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .list.cols li:nth-child(2) { border-top: 1px solid var(--line); }
  .list.cols li:nth-child(3) { border-top: 0; }
}
@media (max-width: 720px) {
  /* 표: 행 단위로 쌓고, 각 칸 위에 열 이름(data-label) */
  table { min-width: 0; font-size: 15px; }
  thead { display: none; }
  tr { display: block; padding: 18px 0; border-bottom: 1px solid var(--line); }
  tbody tr:first-child { border-top: 1px solid var(--fg); }
  th, td { display: block; border: 0; padding: 0; white-space: normal !important; }
  tbody th { font-size: 16px; margin-bottom: 8px; }
  td + td { margin-top: 10px; }
  td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); letter-spacing: 0.02em; margin-bottom: 2px; font-weight: 400; }
  /* 가격표: 구성은 한 줄, 숫자 3칸은 가로로 */
  .price tr { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 12px; }
  .price th, .price td:nth-child(2) { grid-column: 1 / -1; }
  .price td:nth-child(2) { margin: 0 0 12px; font-size: 14px; }
  .price td:nth-child(2)::before { display: none; }
  .price td + td { margin-top: 0; }
}
@media (max-width: 480px) {
  .nav { gap: 14px; font-size: 13px; }
  .display { font-size: 40px; }
}

/* ───────── 페이지별 구성 요소 (페이지마다 다른 모듈을 써서 템플릿 반복을 피함) ───────── */
/* 핵심 수치 띠 */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--fg); }
.facts div { padding: 28px 24px 8px 0; }
.facts b { display: block; font-weight: 250; font-size: clamp(34px, 3.2vw, 48px); line-height: 1; letter-spacing: -0.045em; }
.facts span { display: block; margin-top: 12px; font-size: 14px; color: var(--muted); line-height: 1.6; }
/* 카드 */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.sec > p + .cards { margin-top: 40px; }
.card { background: var(--surface); padding: 32px; }
.card h3 { margin: 0 0 4px; }
.card .price-tag { font-size: 24px; font-weight: 300; letter-spacing: -0.03em; margin-bottom: 16px; }
.card p { color: var(--text); font-size: 15px; }
.card ul { list-style: none; margin-top: 16px; font-size: 15px; color: var(--text); }
.card li { padding: 8px 0; border-top: 1px solid var(--line); }
/* 인용 */
.quote { font-weight: 300; letter-spacing: -0.04em; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.35; padding: 8px 0 8px 32px; border-left: 1px solid var(--fg); margin: 8px 0 40px; }
.quote small { display: block; margin-top: 16px; font-family: inherit; font-size: 15px; font-style: normal; color: var(--muted); }
/* 긴 글 */
.prose h3 { margin-top: 48px; }
.prose h3:first-child { margin-top: 0; }
.prose p { color: var(--text); max-width: 680px; }
.prose p + p { margin-top: 14px; }
/* 체크리스트 */
.checks { list-style: none; counter-reset: c; }
.checks li { position: relative; padding: 22px 0 22px 44px; border-bottom: 1px solid var(--line); color: var(--text); }
.checks li:first-child { border-top: 1px solid var(--line); }
.checks li::before { content: ""; position: absolute; left: 4px; top: 30px; width: 14px; height: 8px; border-left: 1.5px solid var(--fg); border-bottom: 1.5px solid var(--fg); transform: rotate(-45deg); }
.checks li strong { display: block; color: var(--fg); font-weight: 500; margin-bottom: 2px; }
/* 이미지 + 글 */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-top: 56px; }
.split + .split { margin-top: 40px; }
.split.rev figure { order: 2; }
.split h3 { margin-top: 0; }
.split p { color: var(--text); font-size: 15px; }
.split p + p { margin-top: 12px; }
@media (max-width: 900px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cards { grid-template-columns: 1fr; gap: 16px; }
  .card { padding: 24px; }
  .split, .split.rev { grid-template-columns: 1fr; gap: 20px; }
  .split.rev figure { order: 0; }
  .quote { padding-left: 20px; }
}
