/* 승찬 ♡ 수진 — 모바일 청첩장 */

:root {
  --paper: #F7F5F1;
  --white: #FFFFFF;
  --ink: #2B2927;
  --ink-2: #736D66;
  --ink-3: #A9A39B;
  --line: #E5E0D8;
  --accent: #B98A80;
  --accent-soft: #F3E7E3;
  --serif: 'Gowun Batang', 'Nanum Myeongjo', 'Apple SD Gothic Neo', 'Malgun Gothic', serif;
  --latin: 'Cormorant Garamond', 'Gowun Batang', 'Times New Roman', serif;
  --pad: 26px;
  --col: 430px;
  color-scheme: only light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.is-locked, html.is-locked body { overflow: hidden; }

body {
  margin: 0;
  background: #EAE6DF;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.9;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Cormorant 의 옛 숫자꼴은 11 이 로마숫자처럼 보여서 줄맞춤 숫자를 쓴다 */
  font-variant-numeric: lining-nums;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.page {
  position: relative;
  max-width: var(--col);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 0 70px rgba(70, 58, 44, .10);
}

/* ---------- 표지 ---------- */

.cover {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 44px var(--pad) 76px;
  background: var(--white);
  text-align: center;
}

.cover__script {
  position: relative;
  z-index: 1;
  margin-bottom: -.46em;
  font-family: var(--latin);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(32px, 9.6vw, 40px);
  line-height: 1;
  letter-spacing: .01em;
  color: var(--ink);
  white-space: nowrap;
}

.cover__photo {
  width: min(72vw, 300px, (100vh - 320px) * .667);
  width: min(72vw, 300px, (100svh - 320px) * .667);
  min-width: 170px;
  aspect-ratio: 820 / 1229;
  background: #E9E7E3;
  overflow: hidden;
}
.cover__photo img { width: 100%; height: 100%; object-fit: cover; }

.cover__names {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 16px;
  margin-top: 34px;
  font-size: 23px;
  font-weight: 400;
  line-height: 1.4;
}
.cover__names span { letter-spacing: .36em; margin-right: -.36em; }
.cover__names i {
  font-family: var(--latin);
  font-style: italic;
  font-weight: 300;
  font-size: 22px;
  color: var(--ink-3);
}

.cover__date, .cover__venue { font-size: 13.5px; letter-spacing: .05em; color: var(--ink-2); line-height: 1.85; }
.cover__date { margin-top: 18px; }

.cover__cue {
  position: absolute;
  left: 50%;
  bottom: 20px;
  width: 1px;
  height: 36px;
  background: linear-gradient(var(--ink-3), rgba(169, 163, 155, 0));
  transform-origin: top;
  animation: cue 2.6s cubic-bezier(.6, 0, .3, 1) infinite;
}

@keyframes cue {
  0% { transform: scaleY(0); opacity: 0; }
  35% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(14px); opacity: 0; }
}

.cover > * { animation: rise 1.3s cubic-bezier(.2, .7, .2, 1) both; }
.cover__photo { animation-delay: .15s; }
.cover__script { animation-delay: .55s; }
.cover__names { animation-delay: .8s; }
.cover__date { animation-delay: 1s; }
.cover__venue { animation-delay: 1.1s; }
.cover > .cover__cue { animation: cue 2.6s cubic-bezier(.6, 0, .3, 1) 1.8s infinite both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 공통 구역 ---------- */

.sec {
  padding: 78px var(--pad) 84px;
  background: var(--paper);
  text-align: center;
}
.sec--white { background: var(--white); }

.eyebrow {
  font-family: var(--latin);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .34em;
  margin-right: -.34em;
  text-transform: uppercase;
  color: var(--accent);
}

.title {
  margin-top: 8px;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .16em;
  margin-right: -.16em;
}
.title::after {
  content: "";
  display: block;
  width: 1px;
  height: 30px;
  margin: 20px auto 0;
  background: var(--ink-3);
  opacity: .55;
  transform: translateX(-.08em);
}

.lead { margin-top: 28px; font-size: 14.5px; color: var(--ink-2); }
.note { margin-top: 16px; font-size: 12px; color: var(--ink-3); letter-spacing: .02em; }

.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 1s ease, transform 1s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- 버튼 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 14px;
  letter-spacing: .04em;
  line-height: 1.2;
  color: var(--ink);
  transition: background .25s, border-color .25s, color .25s, transform .15s;
}
.btn:active { transform: scale(.98); }
.btn--solid { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn--ghost { background: transparent; }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 13px; }
@media (hover: hover) {
  .btn:hover { border-color: var(--ink-3); }
  .btn--solid:hover { background: #45413D; border-color: #45413D; }
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 12.5px;
  letter-spacing: .02em;
  color: var(--ink-2);
}

.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 30px; }
.stack--row { flex-direction: row; justify-content: center; }

/* ---------- 인사말 ---------- */

.family {
  display: grid;
  grid-template-columns: auto auto auto;
  justify-content: center;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 10px;
  margin-top: 34px;
  font-size: 16px;
  line-height: 1.6;
}
.family p { display: contents; }
.family__parents { text-align: right; letter-spacing: .04em; }
.family__rel { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.family strong { font-weight: 700; font-size: 17px; letter-spacing: .12em; text-align: left; }

/* ---------- 신랑 신부 ---------- */

.couple { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.person__photo {
  aspect-ratio: 3 / 4;
  border-radius: 999px 999px 0 0;
  background: var(--paper);
  overflow: hidden;
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; }
.person__lead { margin-top: 20px; font-size: 12.5px; color: var(--ink-2); letter-spacing: .03em; line-height: 1.5; }
.person__name { margin-top: 4px; font-size: 17px; font-weight: 700; letter-spacing: .14em; margin-right: -.14em; line-height: 1.5; }
.person__text { margin-top: 12px; font-size: 12.5px; line-height: 1.75; color: var(--ink-2); }
.person__text span { display: block; text-wrap: balance; }
.person__text span + span { margin-top: 5px; }

/* ---------- 갤러리 ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin: 36px -14px 0;
}
.g { position: relative; display: block; aspect-ratio: 2 / 3; background: #ECE9E4; overflow: hidden; }
.g img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.g--wide { grid-column: span 2; aspect-ratio: auto; }
.g--full { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.gallery:not(.is-open) .g--more { display: none; }
@media (hover: hover) { .g:hover img { transform: scale(1.04); } }

.gallery__more { margin-top: 22px; }
.gallery__more span { font-family: var(--latin); font-size: 15px; color: var(--ink-3); }

/* ---------- 예식일 ---------- */

.day { margin-top: 30px; }
.day__num { display: block; font-family: var(--latin); font-size: 34px; font-weight: 400; line-height: 1.2; letter-spacing: .08em; }
.day__txt { display: block; margin-top: 6px; font-size: 14px; color: var(--ink-2); letter-spacing: .06em; }

.cal {
  max-width: 320px;
  margin: 30px auto 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cal__row { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal__row span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  font-family: var(--latin);
  font-size: 17px;
  line-height: 1;
}
.cal__row--head span { height: 34px; font-family: var(--serif); font-size: 12px; color: var(--ink-2); }
.cal .is-sun { color: var(--accent); }
.cal .is-day { position: relative; z-index: 0; color: var(--white); font-weight: 500; }
.cal .is-day::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: var(--accent);
}

.count { display: flex; align-items: flex-start; justify-content: center; gap: 12px; margin-top: 30px; }
.count div { width: 54px; }
.count b { display: block; font-family: var(--latin); font-size: 30px; font-weight: 400; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.count span { display: block; margin-top: 4px; font-family: var(--latin); font-size: 10.5px; letter-spacing: .22em; margin-right: -.22em; text-transform: uppercase; color: var(--ink-3); }
.count i { font-family: var(--latin); font-style: normal; font-size: 22px; line-height: 1.4; color: var(--ink-3); }
.count__msg { margin-top: 24px; font-size: 14px; color: var(--ink-2); }
.count__msg b { font-weight: 700; color: var(--ink); }
.count__msg i { font-style: normal; color: var(--accent); }

/* ---------- 오시는 길 ---------- */

.venue { margin-top: 30px; }
.venue__name { font-size: 18px; font-weight: 700; letter-spacing: .1em; line-height: 1.6; }
.venue__hall { font-size: 13.5px; color: var(--ink-2); }
.venue__addr { margin-top: 10px; font-size: 14.5px; }
.venue__acts { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.map { position: relative; margin: 28px -10px 0; border: 1px solid var(--line); background: #EEEDEA; overflow: hidden; }
.map img { width: 100%; }
.map figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 1px 6px;
  background: rgba(255, 255, 255, .78);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 8.5px;
  line-height: 1.6;
  color: #77736D;
}

.map__pin { position: absolute; width: 0; height: 0; }
.map__pin i {
  position: absolute;
  left: -8px;
  top: -8px;
  width: 16px;
  height: 16px;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 1px 6px rgba(60, 40, 30, .35);
}
.map__pin i::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .5;
  z-index: -1;
  animation: ping 2.4s ease-out infinite;
}
.map__pin em {
  position: absolute;
  left: 0;
  bottom: 15px;
  transform: translateX(-34%);
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--ink);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .06em;
  color: var(--white);
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(40, 30, 20, .22);
}
@keyframes ping {
  from { transform: scale(1); opacity: .5; }
  to { transform: scale(3.2); opacity: 0; }
}

.map__station { position: absolute; width: 0; height: 0; }
.map__station i, .line2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #00A84D;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}
.map__station i { position: absolute; left: -8.5px; top: -8.5px; box-shadow: 0 0 0 2px #fff; }
.map__station em {
  position: absolute;
  top: 12px;
  left: 0;
  transform: translateX(-50%);
  font-style: normal;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  white-space: nowrap;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff;
}

.navs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.navs .btn { padding: 0 6px; font-size: 13.5px; }

.ways { margin-top: 34px; text-align: left; border-top: 1px solid var(--line); }
.ways > div { display: grid; grid-template-columns: 68px 1fr; gap: 10px; padding: 16px 2px; border-bottom: 1px solid var(--line); }
.ways dt { font-size: 13px; font-weight: 700; letter-spacing: .06em; line-height: 1.8; }
.ways dd { font-size: 14px; line-height: 1.8; }
.ways dd b { font-weight: 700; }
.ways dd small { display: block; font-size: 12.5px; color: var(--ink-2); }
.line2 { margin-right: 6px; vertical-align: 2px; }

/* ---------- 마음 전하는 곳 ---------- */

.accts { display: grid; gap: 12px; margin-top: 28px; }
.acct {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 12px;
  padding: 18px 16px 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  text-align: left;
}
.acct__who { grid-column: 1; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.acct__who span { display: inline-block; margin-right: 8px; padding-right: 8px; border-right: 1px solid var(--line); font-weight: 700; color: var(--accent); letter-spacing: .04em; line-height: 1.1; }
.acct__who b { color: var(--ink); font-weight: 700; }
.acct__num { grid-column: 1; margin-top: 6px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.acct__num b { display: block; font-weight: 400; font-size: 16px; letter-spacing: .04em; color: var(--ink); white-space: nowrap; }
.acct .btn { grid-column: 2; grid-row: 1 / span 2; }

/* ---------- 맺음 ---------- */

.closing { background: var(--white); text-align: center; }
.closing__photo { aspect-ratio: 4 / 5; background: #E9E7E3; overflow: hidden; }
.closing__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.closing__body { padding: 44px var(--pad) calc(56px + env(safe-area-inset-bottom, 0px)); }
.closing__names { font-size: 18px; letter-spacing: .2em; margin-right: -.2em; }
.closing__names i { font-style: normal; font-size: 12.5px; letter-spacing: .08em; color: var(--ink-3); margin: 0 .5em 0 .3em; }
.closing__date { margin-top: 4px; font-family: var(--latin); font-size: 17px; letter-spacing: .2em; margin-right: -.2em; color: var(--ink-2); }

/* ---------- 사진 크게 보기 ---------- */

.lb { position: fixed; inset: 0; z-index: 50; display: flex; background: #141312; color: #fff; outline: 0; animation: fade .25s ease both; }
.lb[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.lb__track {
  flex: 1;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.lb__track::-webkit-scrollbar { display: none; }
.lb__slide { flex: 0 0 100%; display: flex; align-items: center; justify-content: center; scroll-snap-align: center; scroll-snap-stop: always; }
.lb__slide img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  max-height: calc(100svh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  -webkit-user-select: none;
  user-select: none;
}
.lb__count {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-family: var(--latin);
  font-size: 15px;
  letter-spacing: .2em;
  color: rgba(255, 255, 255, .72);
  pointer-events: none;
}
.lb__close { position: absolute; top: calc(8px + env(safe-area-inset-top, 0px)); right: 8px; width: 48px; height: 48px; display: grid; place-items: center; color: rgba(255, 255, 255, .86); }
.lb__nav { position: absolute; top: 50%; width: 52px; height: 72px; margin-top: -36px; display: none; place-items: center; color: rgba(255, 255, 255, .7); }
.lb__nav--prev { left: 6px; }
.lb__nav--next { right: 6px; }
@media (hover: hover) and (pointer: fine) { .lb__nav { display: grid; } .lb__nav:hover { color: #fff; } }

/* ---------- 알림 ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(34px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  max-width: calc(100vw - 40px);
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(38, 36, 34, .94);
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: .02em;
  color: #fff;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 좁은 화면 · 동작 줄이기 ---------- */

@media (max-width: 359px) {
  :root { --pad: 20px; }
  .family { font-size: 15px; column-gap: 8px; }
  .couple { gap: 12px; }
  .count { gap: 8px; }
  .count div { width: 48px; }
  .acct { padding: 16px 12px 16px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
