/* ══════════════════════════════════════════════
   Design System
══════════════════════════════════════════════ */
:root {
  --bg:       #FAF8F3;
  --white:    #FFFFFF;
  --sage:     #8B9D6E;
  --sage-light: #B8C9A0;
  --sage-pale: #EDF2E6;
  --text:     #3D3531;
  --sub:      #7A6F68;
  --border:   #E2DDD6;
  --max-w:    480px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: #ffffff;
  color: #333;
  font-family: 'Pretendard Variable', Pretendard, 'Noto Sans KR', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
}

.page {
  max-width: var(--max-w);
  margin: 0 auto;
  background: #ffffff;
  min-height: 100vh;
  box-shadow: 0 0 24px rgba(0,0,0,0.04);
}
.page.revealed { /* always visible — cover provides reveal */ }

/* ── 공통 섹션 ── */
section {
  padding: 64px 24px;
}

.section-label {
  font-size: 10px;
  letter-spacing: 4px;
  color: #aaa;
  text-transform: uppercase;
  margin-bottom: 24px;
  text-align: center;
}

/* ── 얇은 구분선 ── */
.thin-rule {
  width: 48px;
  height: 1px;
  background: var(--sage-light);
  margin: 0 auto;
}

/* ── 가로 구분자 ── */
.divider-line {
  height: 1px;
  background: var(--border);
  margin: 0 28px;
}

/* ══════════════════════════════════════════════
   Sticky Collapsing Hero
══════════════════════════════════════════════ */
/* Wrapper holds 100vh space in flow — prevents content jump on collapse */
.hero-wrapper {
  height: 100vh;
}
.hero {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 100vh;
  overflow: hidden;
}
/* 히어로 하단 흰색 페이드 */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to top, rgba(255,255,255,0.85) 0%, transparent 100%);
  pointer-events: none;
  z-index: 5;
}
.hero-slides {
  display: flex;
  height: 100%;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hero-slides::-webkit-scrollbar { display: none; }
.hero-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  height: 100%;
  position: relative;
}
.hero-slide-1 { background: #f5f5f5; }
.hero-slide-2 { background: #f8f8f8; }
.hero-slide-3 { background: #f0f0f0; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.arc-text-wrapper { margin-bottom: 12px; }
.hero-identity-section {
  padding: 40px 24px 32px;
  text-align: center;
  background: #ffffff;
}
.hero-overlay-names {
  font-family: 'Noto Serif KR', serif;
  font-size: 26px;
  font-weight: 300;
  color: #333;
  letter-spacing: 4px;
  margin-bottom: 8px;
}
.hero-overlay-date {
  font-size: 13px;
  letter-spacing: 3px;
  color: #aaa;
}
/* Slide thumbnails */
.hero-thumbs {
  position: absolute;
  bottom: 58px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.hero-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  opacity: 0.45;
  border: 2px solid transparent;
  transition: opacity 0.25s, border-color 0.25s;
  cursor: pointer;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}
.hero-thumb.active {
  opacity: 1;
  border-color: rgba(255,255,255,0.85);
}
.hero-thumb img, .hero-thumb video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

.hero-bar {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  padding: 12px 24px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.hero-bar.visible { opacity: 1; }
.hero-bar-name { font-size: 14px; font-weight: 500; color: #333; }
.hero-bar-date { font-size: 12px; color: #aaa; }

/* ══════════════════════════════════════════════
   Info Section (below hero)
══════════════════════════════════════════════ */
.info-section {
  padding: 56px 24px 48px;
  text-align: center;
  background: #ffffff;
}
.hero-headline {
  font-family: 'Noto Serif KR', serif;
  font-size: 20px;
  font-weight: 600;
  color: #333;
  line-height: 1.6;
  letter-spacing: 0.5px;
  margin-bottom: 32px;
}
.hero-poem {
  font-family: 'Noto Serif KR', serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 2.4;
  color: #888;
  margin-bottom: 32px;
}
.invite-formal {
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 2.2;
  color: #666;
  margin-bottom: 32px;
  letter-spacing: 0.3px;
}
.hero-family { margin-bottom: 32px; }
.hero-family-line {
  font-size: 16px;
  color: #555;
  line-height: 2.6;
  letter-spacing: 0.5px;
}
.hero-family-line strong { font-weight: 600; color: #222; font-size: 17px; }
.hero-divider {
  width: 40px; height: 1px;
  background: #e8e8e8; margin: 24px auto;
}
.hero-date-line {
  font-family: 'Noto Serif KR', serif;
  font-size: 20px; font-weight: 500; letter-spacing: 3px;
  color: #1a1a1a; margin-bottom: 8px;
}
.hero-time-line {
  font-size: 16px; letter-spacing: 2px;
  color: #777; margin-bottom: 8px;
}
.hero-venue-name {
  font-family: 'Noto Serif KR', serif;
  font-size: 22px; font-weight: 700;
  color: #1a1a1a; margin-bottom: 8px;
}
.hero-venue-line {
  font-size: 13px; color: #aaa;
  letter-spacing: 0.3px; margin-top: 6px;
}
.dday-section { text-align: center; padding: 32px 24px 8px; }
.dday-count {
  font-size: 36px; font-weight: 300;
  letter-spacing: 4px; color: #333;
}
.dday-label {
  font-size: 10px; letter-spacing: 5px;
  color: #bbb; margin-top: 8px;
}

/* ══════════════════════════════════════════════
   지도
══════════════════════════════════════════════ */
.map-section {
  background: #ffffff;
  padding: 0 24px 48px;
}
#naver-map {
  display: none;
  width: 100%;
  height: 240px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.map-placeholder {
  width: 100%;
  height: 180px;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: #ccc;
}

.map-image-wrap {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.map-image-wrap img {
  width: 100%;
  display: block;
}

.map-placeholder .map-ph-icon { font-size: 32px; }
.map-placeholder .map-ph-text { font-size: 13px; letter-spacing: 0.06em; }

.map-pill {
  display: flex;
  align-items: center;
  width: fit-content;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 999px;
  padding: 4px 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.map-pill a {
  padding: 10px 18px;
  font-size: 13px;
  font-family: 'Pretendard Variable', sans-serif;
  font-weight: 500;
  color: #444;
  text-decoration: none;
  letter-spacing: 0.02em;
  border-radius: 999px;
  transition: background 0.15s;
  white-space: nowrap;
}
.map-pill a:active { background: #f5f5f5; }
.map-pill-divider {
  width: 1px;
  height: 14px;
  background: #e5e5e5;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   RSVP
══════════════════════════════════════════════ */
.rsvp-section {
  background: #ffffff;
}

/* RSVP 한 줄 인라인 */
.rsvp-inline {
  display: flex;
  gap: 6px;
  align-items: center;
}
.rsvp-name-sm {
  flex: 1;
  min-width: 0;
  padding: 11px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  font-size: 14px;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 300;
  color: #333;
  outline: none;
  background: #fff;
  -webkit-appearance: none;
}
.rsvp-name-sm:focus { border-color: #8B9D6E; }
.attend-sm {
  padding: 11px 16px;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #555;
  border-radius: 999px;
  font-size: 13px;
  font-family: 'Pretendard Variable', sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.attend-sm.active { background: #3D3531; color: #fff; border-color: #3D3531; }
.submit-sm {
  padding: 11px 18px;
  background: #3D3531;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-family: 'Pretendard Variable', sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s;
}
.submit-sm:active { background: #2a2422; }
.submit-sm:disabled { background: #bbb; cursor: not-allowed; }

.rsvp-success {
  text-align: center;
  padding: 32px 0;
  display: none;
}
.rsvp-success.show { display: block; }
.rsvp-success-icon { font-size: 40px; margin-bottom: 12px; }
.rsvp-success-text {
  font-family: 'Noto Serif KR', serif;
  font-size: 15px;
  color: #555;
  line-height: 2;
}

/* ══════════════════════════════════════════════
   연락처
══════════════════════════════════════════════ */
.contacts-section {
  background: #ffffff;
}

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contacts-col-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #aaa;
  text-align: center;
  margin-bottom: 12px;
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.contact-row:last-child { border-bottom: none; }

.contact-person {
  font-size: 14px;
  color: var(--text);
  font-family: 'Noto Serif KR', serif;
}

.contact-role-tag {
  font-size: 11px;
  color: var(--sub);
  margin-left: 4px;
}

.contact-btns {
  display: flex;
  gap: 6px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid #e0e0e0;
  background: #f8f8f8;
  text-decoration: none;
  font-size: 14px;
  color: #555;
  cursor: pointer;
  transition: background 0.15s;
  font-family: sans-serif;
  line-height: 1;
}
.btn-icon:active { background: #eee; }

/* ── 연락처 아코디언 ── */
.contacts-accordion {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.contacts-toggle {
  width: 100%;
  background: var(--bg);
  border: none;
  cursor: pointer;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Pretendard Variable', sans-serif;
  font-size: 14px;
  color: var(--text);
  letter-spacing: 0.03em;
  transition: background 0.2s;
}
.contacts-toggle:active { background: #f0f0f0; }
.contacts-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: var(--white);
}
.contacts-body.open { max-height: 600px; }
.contacts-body-inner {
  padding: 16px 16px 20px;
  border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════════════
   계좌 (마음 전하기)
══════════════════════════════════════════════ */
.accounts-section {
  background: #ffffff;
}

.accounts-sub {
  font-size: 13px;
  color: var(--sub);
  text-align: center;
  margin-bottom: 20px;
}

.account-accordion {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.account-toggle {
  width: 100%;
  background: var(--bg);
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Noto Serif KR', serif;
  font-size: 15px;
  color: var(--text);
  letter-spacing: 0.03em;
  transition: background 0.2s;
}
.account-toggle:last-of-type { border-bottom: none; }
.account-toggle:active { background: var(--sage-pale); }

.account-arrow {
  font-size: 12px;
  color: var(--sub);
  transition: transform 0.25s ease;
  display: inline-block;
}
.account-toggle[aria-expanded="true"] .account-arrow {
  transform: rotate(180deg);
}

.account-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--white);
}
.account-body.open {
  max-height: 180px;
}

.account-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
}

.btn-kpay {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-family: 'Pretendard Variable', sans-serif;
  font-weight: 600;
  color: #191919;
  background: #FFEB00;
  border: none;
  border-radius: 20px;
  padding: 8px 14px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}
.btn-kpay:active { background: #f0dd00; }
.kpay-icon {
  width: 14px;
  height: 14px;
  display: block;
}

.account-body-inner {
  padding: 20px 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
}

.account-number {
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  color: var(--text);
  letter-spacing: 0.03em;
  word-break: break-all;
}

.btn-copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-family: 'Pretendard Variable', sans-serif;
  font-weight: 500;
  color: var(--white);
  background: #3D3531;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-copy:active { background: #2a2422; }

/* ── 토스트 ── */
#toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(61, 53, 49, 0.88);
  color: #fff;
  font-size: 13px;
  padding: 11px 26px;
  border-radius: 24px;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 9999;
  transition: opacity 0.25s, transform 0.25s;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════════
   갤러리 CTA
══════════════════════════════════════════════ */
.gallery-cta {
  background: #ffffff;
  text-align: center;
  padding: 48px 24px 56px;
}

.gallery-cta-icon {
  font-size: 36px;
  margin-bottom: 14px;
  display: block;
}

.gallery-cta-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 17px;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.gallery-cta-sub {
  font-size: 13px;
  color: var(--sub);
  margin-bottom: 28px;
  line-height: 1.8;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 36px;
  font-size: 15px;
  font-family: 'Pretendard Variable', sans-serif;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--white);
  background: #3D3531;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:active {
  background: #2a2422;
  transform: scale(0.97);
}

/* ══════════════════════════════════════════════
   공유하기
══════════════════════════════════════════════ */
.share-section {
  background: #ffffff;
  padding-top: 0;
}
.share-buttons {
  display: flex;
  justify-content: center;
  gap: 36px;
}
.share-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.share-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #f4f4f4;
  color: #555;
  transition: background 0.15s, transform 0.1s;
}
.share-cta:active .share-circle { background: #e8e8e8; transform: scale(0.94); }
.share-circle.kakao { background: #FEE500; color: #191919; }
.share-cta:active .share-circle.kakao { background: #f0d900; }
.share-icon {
  width: 22px;
  height: 22px;
  display: block;
}
.share-label {
  font-size: 12px;
  font-family: 'Pretendard Variable', sans-serif;
  font-weight: 400;
  color: var(--sub);
  letter-spacing: 0.02em;
}

/* ══════════════════════════════════════════════
   푸터
══════════════════════════════════════════════ */
.footer {
  background: var(--white);
  text-align: center;
  padding: 28px 28px 36px;
  border-top: 1px solid var(--border);
}

.footer-date {
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: var(--sub);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.footer-names {
  font-family: 'Noto Serif KR', serif;
  font-size: 15px;
  color: var(--text);
  letter-spacing: 0.08em;
}

/* ══════════════════════════════════════════════
   커버 — 좌우 분할
══════════════════════════════════════════════ */
#cover {
  position: fixed; inset: 0; z-index: 1000;
  pointer-events: auto; cursor: pointer;
}
#cover-left, #cover-right {
  position: absolute; top: 0; width: 50%; height: 100%;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  transition: transform 1.4s cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
}
#cover-left { left: 0; transform-origin: left center; border-right: 1px solid rgba(255,255,255,0.4); }
#cover-right { right: 0; transform-origin: right center; border-left: 1px solid rgba(255,255,255,0.4); }
#cover.open #cover-left { transform: translateX(-100%); }
#cover.open #cover-right { transform: translateX(100%); }
#cover-center-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; pointer-events: none;
  opacity: 1;
  transition: opacity 0.9s ease;
}
#cover.open #cover-center-text {
  opacity: 0;
}
.cover-names {
  font-family: 'Pretendard Variable', Pretendard, 'Noto Serif KR', serif;
  font-size: 22px; font-weight: 200;
  color: #333; letter-spacing: 6px;
}
.cover-date {
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  font-size: 12px; font-weight: 300; letter-spacing: 4px; color: #bbb;
}
