/* =============================================================
   모바일 청첩장 — 미니멀 화이트
   색상만 바꾸고 싶다면 아래 :root 부분의 값만 수정하세요.
   ============================================================= */

:root {
  --bg:            #ffffff;
  --bg-tint:       #faf9f7;   /* 섹션 번갈아 들어가는 아주 옅은 배경 */
  --text:          #2f2b28;   /* 본문 글자 */
  --text-soft:     #6f6862;   /* 보조 설명 */
  --text-faint:    #a49d96;   /* 아주 옅은 글자 */
  --line:          #e8e4df;   /* 구분선 */
  --accent:        #b09a7f;   /* 포인트 (베이지 골드) */
  --field-bg:      #ffffff;

  --serif:  'Gowun Batang', 'Nanum Myeongjo', serif;
  --sans:   'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  --latin:  'Cormorant Garamond', serif;

  --page-max: 460px;
  --pad: 28px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* hidden 속성이 항상 이기도록 (아래 display 규칙들보다 우선) */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: #efedea;
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.85;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; color: inherit; }

.page {
  max-width: var(--page-max);
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.06);
}

/* ---------- 등장 애니메이션 ----------
   .reveal 은 "화면에 들어왔는지" 감지하는 방아쇠 역할만 하고,
   실제 움직임은 JS 가 붙여준 .reveal-item 들이 --d(지연시간) 순서대로 수행합니다.
   이렇게 하면 JS 가 멈춰도 글이 사라지지 않습니다. */
.reveal-item {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0ms);
}
.reveal.is-visible .reveal-item {
  opacity: 1;
  transform: none;
}

/* 사진은 살짝 커진 상태에서 제자리를 찾아오게 (더 부드럽게) */
.reveal-item--zoom { transform: translateY(26px) scale(1.04); }
.reveal.is-visible .reveal-item--zoom { transform: none; }

/* 스크롤을 시작하면 커버의 "아래로" 힌트를 지웁니다 */
.scroll-hint { transition: opacity 0.5s ease; }
.is-scrolled .scroll-hint { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .reveal-item,
  .reveal-item--zoom { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

/* ---------- 공통 섹션 ---------- */
.section {
  padding: 64px var(--pad);
  text-align: center;
}
.section--tint { background: var(--bg-tint); }

.section__label {
  font-family: var(--latin);
  font-size: 13px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 400;
}
/* 한글 라벨은 명조 + 좁은 자간 (JS가 is-ko 클래스를 붙여줍니다) */
.section__label.is-ko {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: none;
}

/* 숫자를 또렷한 모양으로 (Cormorant 기본값은 옛날식 숫자라 1이 I 처럼 보임) */
.cover__date,
.calendar__grid div,
.gb-item__date,
.lightbox__count,
.account-item__num {
  font-variant-numeric: lining-nums;
  font-feature-settings: 'lnum' 1;
}

.divider {
  width: 1px;
  height: 40px;
  margin: 18px auto 30px;
  background: linear-gradient(to bottom, var(--line), transparent);
}

.section__notice {
  font-size: 14px;
  line-height: 2;
  color: var(--text-soft);
  white-space: pre-line;
  margin-bottom: 30px;
}

/* ============ 1. 커버 ============ */
.cover {
  padding: 56px var(--pad) 44px;
  text-align: center;
}
.cover__subtitle {
  font-family: var(--latin);
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--text-faint);
  margin-bottom: 26px;
}
.cover__photo {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(150deg, #f2efeb, #e6e1db);
  position: relative;
}
/* 위아래로 10% 씩 여유를 줘서, 패럴랙스로 사진이 움직여도 빈 공간이 안 생깁니다.
   움직임은 JS 가 translate 속성으로 넣습니다.
   (animation 이 쓰는 transform 과 별개의 속성이라 서로 부딪히지 않습니다) */
.cover__photo img {
  position: absolute;
  top: -10%; left: 0;
  width: 100%; height: 120%;
  object-fit: cover;
  animation: slowZoom 14s ease-out forwards;
}
@keyframes slowZoom { from { transform: scale(1.06); } to { transform: scale(1); } }

.cover__names {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.06em;
  margin-top: 34px;
}
.cover__names em { font-style: normal; color: var(--accent); margin: 0 10px; }

.cover__date {
  font-family: var(--latin);
  font-size: 15px;
  letter-spacing: 0.16em;
  color: var(--text-soft);
  margin-top: 14px;
}
.cover__place { font-size: 13px; color: var(--text-faint); margin-top: 4px; }

.scroll-hint { margin-top: 34px; height: 40px; position: relative; }
.scroll-hint span {
  position: absolute; left: 50%; top: 0;
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--line), transparent);
  animation: drop 2.2s ease-in-out infinite;
}
@keyframes drop {
  0%, 100% { opacity: 0; transform: translateY(-8px); }
  50%      { opacity: 1; transform: translateY(0); }
}

/* ============ 2. 인사말 ============ */
.greeting__message {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2.3;
  color: var(--text);
  white-space: pre-line;
}

/* ============ 3. 신랑 신부 ============ */
.couple { font-family: var(--serif); font-size: 15px; line-height: 2.6; }
.couple .parents { color: var(--text-soft); font-size: 14px; }
.couple .parents .sep { color: var(--line); margin: 0 6px; }
.couple .role { font-size: 13px; color: var(--text-faint); margin-right: 5px; }
.couple .mark { font-size: 12px; color: var(--text-faint); }
.couple .child { font-size: 17px; }

.contact-grid {
  margin-top: 34px;
  border-top: 1px solid var(--line);
}
.contact-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.contact-row__who { font-size: 14px; }
.contact-row__who b { font-weight: 500; }
.contact-row__who span { color: var(--text-faint); font-size: 12px; margin-right: 8px; }
.contact-row__btns { display: flex; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid; place-items: center;
  transition: background 0.2s, border-color 0.2s;
}
.icon-btn:active { background: var(--bg-tint); border-color: var(--accent); }
.icon-btn svg { width: 16px; height: 16px; fill: var(--text-soft); }

/* ============ 4. 달력 ============ */
.calendar__headline {
  font-family: var(--serif);
  font-size: 17px;
  margin-bottom: 28px;
}
.calendar {
  max-width: 300px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px 0;
}
.calendar__grid div {
  font-family: var(--latin);
  font-size: 14px;
  line-height: 32px;
  color: var(--text-soft);
}
.calendar__grid .head { font-size: 11px; letter-spacing: 0.08em; color: var(--text-faint); font-family: var(--sans); }
.calendar__grid .head.sun,
.calendar__grid .sun { color: #c98b8b; }
.calendar__grid .today {
  position: relative;
  color: #fff;
  font-weight: 500;
}
.calendar__grid .today::before {
  content: '';
  position: absolute; inset: 2px 50% auto 50%;
  width: 30px; height: 30px;
  transform: translateX(-50%);
  background: var(--accent);
  border-radius: 50%;
  z-index: -1;
}
.calendar__grid .today { z-index: 0; }

.dday {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-soft);
}
.dday b { color: var(--accent); font-weight: 500; }

/* ============ 5. 갤러리 ============ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.gallery-grid button {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-tint);
}
.gallery-grid img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-grid button:active img { transform: scale(1.06); }

/* 라이트박스 */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(20, 18, 16, 0.96);
  z-index: 200;
  display: grid;
  place-items: center;
  touch-action: pan-y;
}
.lightbox img { max-width: 100%; max-height: 82vh; object-fit: contain; }
.lightbox__close {
  position: absolute; top: 12px; right: 16px;
  font-size: 34px; line-height: 1; color: #fff; opacity: 0.8;
  width: 44px; height: 44px;
}
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 40px; color: #fff; opacity: 0.55;
  width: 52px; height: 72px;
}
.lightbox__nav--prev { left: 2px; }
.lightbox__nav--next { right: 2px; }
.lightbox__count {
  position: absolute; bottom: 26px; left: 0; right: 0;
  text-align: center; color: #fff; opacity: 0.7;
  font-family: var(--latin); font-size: 14px; letter-spacing: 0.1em;
}

/* ============ 6. 오시는 길 ============ */
.place__name { font-family: var(--serif); font-size: 19px; font-weight: 400; }
.place__hall { font-size: 14px; color: var(--text-soft); margin-top: 2px; }
.place__address { font-size: 14px; color: var(--text-soft); margin-top: 12px; }
.place__tel { margin-top: 4px; font-size: 14px; }
.place__tel a { color: var(--accent); border-bottom: 1px solid var(--line); }

.map {
  width: 100%;
  height: 260px;
  margin-top: 24px;
  background: #eeeae5;
  border: 1px solid var(--line);
}
.map-fallback {
  margin-top: 24px; padding: 40px 20px;
  border: 1px solid var(--line);
  font-size: 13px; color: var(--text-faint);
}

.map-buttons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.map-btn {
  border: 1px solid var(--line);
  background: #fff;
  padding: 11px 0;
  font-size: 13px;
  color: var(--text-soft);
  text-align: center;
  transition: border-color 0.2s, color 0.2s;
}
.map-btn:active { border-color: var(--accent); color: var(--accent); }

.transport { margin-top: 34px; text-align: left; }
.transport__item { padding: 18px 0; border-top: 1px solid var(--line); }
.transport__item h4 {
  font-size: 13px; font-weight: 500; color: var(--accent);
  letter-spacing: 0.04em; margin-bottom: 6px;
}
.transport__item p { font-size: 14px; color: var(--text-soft); white-space: pre-line; line-height: 1.9; }

/* ============ 개인정보처리방침 페이지 ============ */
.legal {
  text-align: left;
  padding-bottom: 60px;
}
.legal > p, .legal > ul {
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--text-soft);
  margin-top: 14px;
}
.legal h3 {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.legal ul { padding-left: 18px; }
.legal li { margin-top: 6px; }
.legal b { font-weight: 500; color: var(--text); }
.legal a { color: var(--accent); text-decoration: underline; }

/* ============ 버스 신청 페이지 ============ */
.bus-back {
  display: inline-block;
  font-size: 13px;
  color: var(--text-faint);
  padding-top: 20px;
}
.bus-couple {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--text-soft);
}

/* ============ 7. 버스 ============ */
.info-card {
  border: 1px solid var(--line);
  padding: 6px 18px;
  text-align: left;
}
.info-card__row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.info-card__row:last-child { border-bottom: 0; }
.info-card__row .name { color: var(--text); }
.info-card__row .time { color: var(--accent); font-size: 13.5px; white-space: nowrap; }

.bus__deadline {
  margin-top: 14px; font-size: 13px; color: var(--text-faint);
}
.bus__contact {
  margin-top: 20px; font-size: 13px; color: var(--text-faint);
}
.bus__contact a { color: var(--accent); border-bottom: 1px solid var(--line); }

/* ============ 폼 공통 ============ */
.form { margin-top: 26px; text-align: left; }
.form__row { margin-bottom: 18px; }
.form__row > label,
.form__row > div > label {
  display: block;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}
.form__row--half { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.optional { color: var(--text-faint); font-size: 12px; }

.form input[type="text"],
.form input[type="tel"],
.form input[type="password"],
.form select,
.form textarea {
  width: 100%;
  background: var(--field-bg);
  border: 1px solid var(--line);
  padding: 12px 13px;
  font-size: 15px;
  font-weight: 300;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s;
}
.form select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23a49d96' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 11px;
  padding-right: 34px;
}
.form textarea { resize: none; line-height: 1.7; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form ::placeholder { color: #cfc9c3; }

.radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio { flex: 1 1 0; min-width: 76px; }
.radio input { position: absolute; opacity: 0; pointer-events: none; }
.radio span {
  display: block;
  text-align: center;
  border: 1px solid var(--line);
  padding: 11px 4px;
  font-size: 14px;
  color: var(--text-soft);
  transition: all 0.2s;
}
.radio input:checked + span {
  border-color: var(--accent);
  color: var(--accent);
  background: #fdfbf8;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-soft);
  margin: 22px 0 16px;
  line-height: 1.6;
}
.consent input { margin-top: 3px; accent-color: var(--accent); width: 15px; height: 15px; flex: none; }
.link-btn { text-decoration: underline; color: var(--accent); font-size: 12.5px; }

.submit-btn {
  display: block;
  width: 100%;
  background: var(--text);
  color: #fff;
  padding: 15px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
}
.submit-btn:active { opacity: 0.75; }
.submit-btn:disabled { opacity: 0.4; cursor: default; }

.form__msg {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
  color: var(--accent);
}
.form__msg.error { color: #c46a6a; }

/* ============ 9. 계좌 ============ */
.accounts { text-align: left; }
.account-group { border-top: 1px solid var(--line); }
.account-group:last-child { border-bottom: 1px solid var(--line); }
.account-group__head {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  padding: 17px 4px;
  font-size: 15px;
}
.account-group__head .arrow {
  color: var(--text-faint); font-size: 12px;
  transition: transform 0.3s;
}
.account-group.is-open .arrow { transform: rotate(180deg); }

.account-group__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.34s ease;
}
.account-group.is-open .account-group__body { grid-template-rows: 1fr; }
.account-group__inner { overflow: hidden; }

.account-item {
  padding: 14px 4px 16px;
  border-top: 1px dashed var(--line);
}
.account-item__who { font-size: 13px; color: var(--text-faint); }
.account-item__who b { color: var(--text); font-weight: 400; font-size: 14px; margin-left: 6px; }
.account-item__num {
  font-size: 14px;
  color: var(--text-soft);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.account-item__btns { display: flex; gap: 8px; margin-top: 10px; }
.copy-btn, .pay-btn {
  border: 1px solid var(--line);
  padding: 8px 14px;
  font-size: 12.5px;
  color: var(--text-soft);
}
.copy-btn:active { border-color: var(--accent); color: var(--accent); }
.pay-btn { background: #ffe812; border-color: #ffe812; color: #3c1e1e; }

/* ============ 10. 방명록 ============ */
.gb-list { list-style: none; margin-top: 30px; text-align: left; }
.gb-item {
  border-top: 1px solid var(--line);
  padding: 16px 2px;
}
.gb-item__top { display: flex; justify-content: space-between; align-items: baseline; }
.gb-item__name { font-size: 14px; font-weight: 500; }
.gb-item__meta { display: flex; align-items: center; gap: 10px; }
.gb-item__date { font-size: 11.5px; color: var(--text-faint); font-family: var(--latin); letter-spacing: 0.04em; }
.gb-item__del { font-size: 15px; color: var(--text-faint); line-height: 1; padding: 2px 4px; }
.gb-item__msg {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.85;
  margin-top: 7px;
  white-space: pre-line;
  word-break: break-word;
}
.gb-empty { text-align: center; color: var(--text-faint); font-size: 13.5px; padding: 34px 0; }

.more-btn {
  display: block; width: 100%;
  border: 1px solid var(--line);
  padding: 13px;
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--text-soft);
}

/* ============ 11. 마무리 ============ */
.ending { padding: 70px var(--pad) 54px; text-align: center; }
.ending__photo { aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 40px; background: var(--bg-tint); }
.ending__photo img { width: 100%; height: 100%; object-fit: cover; }
.ending__message {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 2.2;
  color: var(--text-soft);
  white-space: pre-line;
}
.share { display: flex; flex-direction: column; gap: 9px; margin-top: 36px; }
.share-btn {
  border: 1px solid var(--line);
  padding: 14px;
  font-size: 14px;
  color: var(--text-soft);
}
.share-btn--kakao { background: #ffe812; border-color: #ffe812; color: #3c1e1e; }

.footer {
  padding: 26px;
  text-align: center;
  font-family: var(--latin);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  border-top: 1px solid var(--line);
}
.footer span { color: var(--accent); }
.footer__legal { margin-top: 10px; }
.footer__legal a { color: var(--text-faint); text-decoration: underline; font-size: 11px; letter-spacing: 0.02em; }

/* ============ BGM 버튼 ============ */
.bgm-btn {
  position: fixed;
  top: 14px;
  right: max(14px, calc(50% - var(--page-max) / 2 + 14px));
  z-index: 120;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  display: grid; place-items: center;
}
.bgm-btn svg { width: 15px; height: 15px; fill: var(--text-soft); }
.bgm-btn.is-playing svg { fill: var(--accent); }
.bgm-slash {
  position: absolute;
  width: 20px; height: 1px;
  background: var(--text-soft);
  transform: rotate(-45deg);
}
.bgm-btn.is-playing .bgm-slash { display: none; }

/* ============ 모달 / 토스트 ============ */
.modal {
  position: fixed; inset: 0;
  background: rgba(20, 18, 16, 0.5);
  z-index: 210;
  display: grid; place-items: center;
  padding: 24px;
}
.modal__box {
  background: #fff;
  max-width: 380px; width: 100%;
  max-height: 80vh; overflow-y: auto;
  padding: 26px 24px;
  text-align: left;
}
.modal__box h4 { font-family: var(--serif); font-size: 16px; font-weight: 400; margin-bottom: 16px; }
.modal__box dl { font-size: 13.5px; }
.modal__box dt { color: var(--accent); margin-top: 12px; font-size: 12.5px; }
.modal__box dd { color: var(--text-soft); line-height: 1.7; }
.modal__note { font-size: 12px; color: var(--text-faint); margin: 18px 0 20px; line-height: 1.6; }

.toast {
  position: fixed;
  bottom: 34px; left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(35, 32, 29, 0.92);
  color: #fff;
  font-size: 13.5px;
  padding: 11px 20px;
  border-radius: 30px;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  white-space: nowrap;
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 사진이 없을 때 회색 자리표시 */
img.is-missing { opacity: 0; }
