/* =====================================================================
 *  청첩장 스타일 — "맑은 하늘 · 도자기빛" 프리미엄 톤
 *  (디자인 손볼 일 거의 없습니다. 색은 아래 :root 에서)
 * ===================================================================== */

:root {
  --bg:       #f4f8fb;   /* 바탕 (도자기빛 쿨 화이트) */
  --surface:  #ffffff;   /* 카드 배경 */
  --text:     #243441;   /* 본문 글자 (잉크 네이비) */
  --muted:    #5b7186;   /* 흐린 글자 */
  --line:     #dce8f1;   /* 경계선/헤어라인 */
  --gold:     #5b93c4;   /* 포인트(정제된 하늘색) — 강조/라인 */
  --gold-soft:#bbd6ec;   /* 파스텔 하늘색 */
  --sky-deep: #2f5e86;   /* 깊은 청 — 진한 강조 */
  --rose:     #d98ba0;   /* 예식일 표시 · 오류 표시 전용 */
  --shadow:   0 14px 40px rgba(47, 94, 134, 0.10);
  --radius:   8px;
  --maxw:     460px;     /* 모바일 폭 기준 */
  /* 폰트 3종 역할 분리 */
  --serif-ko: "Nanum Myeongjo", serif;                                  /* 제목·이름 (공식적) */
  --sans:     "Pretendard", -apple-system, system-ui, "Apple SD Gothic Neo", sans-serif; /* 안내사항 (가독성) */
  --script:   "Nanum Pen Script", "Nanum Myeongjo", cursive;            /* 인사말 (감성 손글씨) */
  --serif-en: "Cormorant Garamond", "Nanum Myeongjo", serif;            /* 영문 숫자·라벨 */
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; }   /* 가로 스크롤/밀림 방지 */

body {
  background:                    /* 모바일 폭 바깥 영역 */
    radial-gradient(120% 55% at 50% -8%, #cfe2f2 0%, rgba(207,226,242,0) 60%),
    linear-gradient(180deg, #e3eef7 0%, #d3e3f0 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

/* 전체를 가운데 한 장의 카드처럼 */
.hero, main, .footer {
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
  background: var(--bg);
}
main { box-shadow: 0 30px 90px rgba(47, 94, 134, 0.16); }

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ── 섹션 공통 ────────────────────────────────────────────────── */
.section {
  padding: 64px 30px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.eyebrow {                       /* 영문 소문자대문자 라벨 */
  font-family: var(--serif-en);
  text-transform: uppercase;
  font-style: normal;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--sky-deep);
  letter-spacing: 0.3em;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--serif-ko);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 28px;
  letter-spacing: 0.01em;
  color: var(--text);
  text-wrap: balance;
}
.subtitle { font-family: var(--serif-ko); font-size: 1.15rem; font-weight: 700; margin: 44px 0 18px; }
.note { color: var(--muted); font-size: 0.92rem; margin-bottom: 24px; }

/* 작은 ✦ 구분자 */
.divider {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  color: var(--gold); margin: 24px auto; max-width: 200px;
}
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.divider span { font-size: 0.72rem; color: var(--gold); }

/* ── 1. 히어로 ────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 92svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero__img {
  position: absolute; inset: 0;
  background: linear-gradient(168deg, #cfe4f5 0%, #aed0ea 52%, #8bbfe4 100%);
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(25,46,68,0.20) 0%, rgba(20,40,60,0.28) 55%, rgba(15,35,55,0.46) 100%);
}
.hero__frame {                   /* 얇은 이중 프레임 (스테이셔너리) */
  position: absolute; inset: 16px; z-index: 1; pointer-events: none;
  border: 1px solid rgba(255,255,255,0.55);
}
.hero__frame::after {
  content: ""; position: absolute; inset: 5px;
  border: 1px solid rgba(255,255,255,0.26);
}
.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  color: #fff;
  text-align: center;
  padding: 60px 28px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.32);
}
.hero__label {
  font-family: var(--serif-en);
  text-transform: uppercase;
  font-style: normal;
  letter-spacing: 0.36em;
  font-size: 0.84rem;
  font-weight: 500;
  opacity: 0.95;
  margin-bottom: 18px;
}
.hero__names {
  font-family: var(--serif-ko);
  font-weight: 700;
  font-size: clamp(2.1rem, 9vw, 2.8rem);
  letter-spacing: 0.01em;
  line-height: 1.3;
  word-break: keep-all;
}
.hero__names .amp {
  font-family: var(--serif-en);
  font-style: italic; font-weight: 400;
  color: var(--gold-soft);
  margin: 0 0.18em;
}
.hero__roman {
  font-family: var(--serif-en);
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-size: 0.82rem;
  margin-top: 10px;
  opacity: 0.9;
}
.hero__roman:empty { display: none; }
.hero__info { margin-top: 22px; }
.hero__date {
  font-family: var(--serif-ko);
  font-size: 1.05rem; letter-spacing: 0.02em;
}
.hero__venue { margin-top: 4px; font-size: 0.92rem; letter-spacing: 0.02em; opacity: 0.92; line-height: 1.6; }
.hero__venue-sub { font-size: 0.82rem; opacity: 0.85; }
.hero__cta {
  margin-top: 32px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.85);
  color: #fff;
  padding: 13px 30px; border-radius: 999px;
  font-size: 0.95rem; letter-spacing: 0.06em;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  transition: transform .12s ease, background .2s ease, color .2s ease;
  text-shadow: none;
}
.hero__cta:hover { background: rgba(255,255,255,0.95); color: var(--sky-deep); }
.hero__cta:active { transform: scale(0.97); }
.hero__scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 2; color: #fff; font-size: 1.4rem; opacity: 0.82;
  animation: bounce 2.2s ease-in-out infinite;
}
@keyframes bounce { 0%,100%{transform:translate(-50%,0)} 50%{transform:translate(-50%,7px)} }

/* ── 2. 인사말 ────────────────────────────────────────────────── */
.section--greeting { background: var(--surface); }
.greeting-text {
  font-family: var(--script);
  white-space: pre-line;
  font-size: 1.5rem;        /* 펜글씨는 작게 렌더되므로 키움 */
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: #3a4855;
}
.parents {
  margin-top: 32px;
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap;
  gap: 14px;
  font-size: 1.02rem;
}
.parents .p-row { color: #4a5a68; }
.parents .p-child { font-family: var(--serif-ko); font-weight: 700; font-size: 1.12rem; color: var(--sky-deep); margin-left: 0.15em; }
.parents .p-sep { color: var(--gold); margin: 0; font-size: 0.8rem; }

/* ── RSVP (CTA) ───────────────────────────────────────────────── */
.section--cta {
  background: linear-gradient(180deg, #e7f3fc 0%, var(--surface) 70%);
  border-bottom: 1px solid var(--line);
}
.section--cta .section-title { color: var(--sky-deep); }

/* ── D-Day ────────────────────────────────────────────────────── */
.section--dday { background: var(--surface); }
.dday-count {
  font-family: var(--serif-en);
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--sky-deep);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
.dday-count .lead { font-style: italic; font-size: 1.4rem; color: var(--text); margin-right: 8px; }
.dday-date { color: var(--muted); margin: 10px 0 22px; }

/* ── 예식 달력 ───────────────────────────────────────────────── */
.cal {
  max-width: 330px; margin: 0 auto 26px; padding: 24px 20px 18px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 4px; box-shadow: var(--shadow);
}
.cal__title {
  font-family: var(--serif-en); font-size: 1.5rem; color: var(--sky-deep);
  text-align: center; margin-bottom: 16px; letter-spacing: 0.1em;
  font-feature-settings: "lnum" 1;
}
.cal__grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  row-gap: 8px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.cal__dow { font-size: 0.74rem; color: var(--muted); padding-bottom: 8px; letter-spacing: 0.03em; }
.cal__dow--sun { color: var(--rose); }
.cal__dow--sat { color: var(--gold); }
.cal__cell {
  position: relative; display: grid; place-items: center;
  height: 36px; font-size: 0.95rem;
}
.cal__cell--sun { color: var(--rose); }
.cal__cell--sat { color: var(--gold); }
.cal__cell--wed {
  color: var(--text); font-weight: 500;
  border: 1.5px solid var(--rose); border-radius: 50%;
  width: 36px; margin: 0 auto;
}
.cal__star {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  font-size: 0.7rem; color: var(--rose); line-height: 1;
}
.cal__legend { margin-top: 18px; font-size: 0.85rem; color: var(--muted); letter-spacing: 0.01em; }

/* 버튼 */
.btn {
  appearance: none; border: 1px solid var(--gold);
  background: var(--gold); color: #fff;
  padding: 13px 22px; border-radius: 999px;
  font-size: 0.92rem; letter-spacing: 0.04em;
  transition: transform .12s ease, background .2s ease, opacity .12s ease;
}
.btn:hover { background: var(--sky-deep); border-color: var(--sky-deep); }
.btn:active { transform: scale(0.97); }
.btn--ghost { background: transparent; color: var(--sky-deep); }
.btn--ghost:hover { background: var(--gold); color: #fff; }
.btn--full { width: 100%; padding: 15px; margin-top: 8px; border-radius: 4px; }
.btn-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── 5. 타임라인 (가로 스크롤) ────────────────────────────────── */
.timeline {
  display: flex; gap: 14px;
  margin: 16px -30px 4px;        /* 좌우 섹션 패딩만큼 음수 마진 → 화면 끝까지 스크롤 */
  padding: 8px 30px 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.timeline::-webkit-scrollbar { height: 5px; }
.timeline::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.tl-item {
  flex: 0 0 auto; width: 212px;
  scroll-snap-align: center;
  padding: 22px 20px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); box-shadow: var(--shadow);
  text-align: left;
}
.tl-year { font-family: var(--serif-en); font-size: 1.75rem; color: var(--gold); font-weight: 500; letter-spacing: 0.04em; font-feature-settings: "lnum" 1; }
.tl-title { font-family: var(--serif-ko); font-weight: 700; font-size: 1.05rem; color: var(--text); margin: 4px 0 8px; }
.tl-title::before { content: ""; display: block; width: 26px; height: 1px; background: var(--gold); margin-bottom: 10px; }
.tl-text { font-size: 0.88rem; color: var(--muted); line-height: 1.7; }
.tl-photo { margin-top: 12px; border-radius: 6px; overflow: hidden; }
.tl-photo img { width: 100%; height: 150px; object-fit: cover; }
.tl-hint { font-size: 0.74rem; color: var(--muted); text-align: center; margin-top: 6px; letter-spacing: 0.08em; }

.studio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.studio-grid img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px; box-shadow: var(--shadow); }
.studio-grid img:first-child:nth-last-child(odd) { grid-column: 1 / -1; aspect-ratio: 4/3; }

/* ── 6. 영상 ──────────────────────────────────────────────────── */
.video-wrap { position: relative; padding-top: 56.25%; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── 7. 예식 정보 ─────────────────────────────────────────────── */
.section--info { background: var(--surface); }
.info-card { display: grid; gap: 0; }
.info-card .big { font-family: var(--serif-ko); font-size: 1.32rem; color: var(--sky-deep); font-weight: 700; margin-bottom: 14px; letter-spacing: 0.01em; }
.info-card .row { padding: 14px 0; border-top: 1px solid var(--line); }
.info-card .row:last-child { border-bottom: 1px solid var(--line); }
.info-card .k { font-family: var(--serif-en); text-transform: uppercase; font-size: 0.74rem; color: var(--gold); letter-spacing: 0.2em; }
.info-card .v { font-size: 1.06rem; margin-top: 4px; }
.info-card .v-sub { font-size: 0.85rem; color: var(--muted); }

/* ── 8. 오시는 길 ─────────────────────────────────────────────── */
.addr { font-size: 1rem; margin-bottom: 4px; }
.addr small { display: block; color: var(--muted); font-size: 0.86rem; margin-top: 4px; }
.floorplan { margin: 18px 0 16px; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); }
.floorplan img { width: 100%; display: block; cursor: zoom-in; }
.floorplan--ph {
  display: grid; place-items: center; min-height: 200px;
  border: 1px dashed var(--sky-deep); box-shadow: none; opacity: 0.9;
  background: repeating-linear-gradient(45deg, #fff, #fff 12px, #f1f7fc 12px, #f1f7fc 24px);
  color: var(--muted); font-size: 0.9rem;
}
.map-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 28px; }
.map-btns .btn { padding: 14px 8px; font-size: 0.88rem; border-radius: 4px; }
.info-block { text-align: left; border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; margin-bottom: 12px; background: var(--surface); }
.info-block h4 { font-size: 0.95rem; color: var(--sky-deep); margin-bottom: 6px; }
.info-block p { white-space: pre-line; font-size: 0.92rem; color: #4a5a68; line-height: 1.7; }

/* ── 9. 연락처 ────────────────────────────────────────────────── */
.contact-cols { display: grid; gap: 22px; }
.contact-col h4 { font-family: var(--serif-en); text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.8rem; color: var(--gold); margin-bottom: 12px; }
.contact-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 6px;
  margin-bottom: 8px; background: var(--surface);
}
.contact-card .who { text-align: left; }
.contact-card .who .role { font-size: 0.78rem; color: var(--muted); }
.contact-card .who .name { font-size: 1rem; }
.contact-card .acts { display: flex; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--gold-soft);
  background: #fff; font-size: 1.05rem; display: grid; place-items: center;
  text-decoration: none;
}

/* ── 폼 (RSVP/방명록/업로드) ──────────────────────────────────── */
.section--form { background: var(--surface); }
.form { display: grid; gap: 16px; text-align: left; max-width: 380px; margin: 0 auto; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 0.85rem; color: var(--muted); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 1rem; color: var(--text);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--gold-soft); outline-offset: 1px; }
.field--radio { border: 0; padding: 0; margin: 0; min-width: 0; }
.field--radio span { display: block; margin-bottom: 8px; }
.radio-row { display: flex; gap: 16px; flex-wrap: wrap; }
.radio-row label { display: flex; align-items: center; gap: 6px; font-size: 0.95rem; white-space: nowrap; }
.form-msg { text-align: center; font-size: 0.92rem; min-height: 1.2em; margin-top: 4px; }
.form-msg.ok { color: var(--sky-deep); }
.form-msg.err { color: var(--rose); }
.up-preview { display: flex; flex-wrap: wrap; gap: 6px; }
.up-preview .chip { font-size: 0.78rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; color: var(--muted); }
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress__bar { height: 100%; width: 0; background: var(--gold); transition: width .2s ease; }

/* 방명록 목록 */
.gb-list { margin-top: 26px; display: grid; gap: 10px; text-align: left; max-width: 380px; margin-left: auto; margin-right: auto; }
.gb-item { border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px; background: #fff; }
.gb-item .gb-name { font-weight: 500; font-size: 0.92rem; color: var(--sky-deep); }
.gb-item .gb-msg { font-size: 0.95rem; margin-top: 4px; white-space: pre-line; }

/* ── 계좌 ─────────────────────────────────────────────────────── */
.acct-group { margin-bottom: 18px; }
.acct-group > .acct-head {
  font-family: var(--serif-en); text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.8rem; color: var(--gold); padding: 12px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
}
.acct-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border: 1px solid var(--line); border-top: 0; background: #fff;
}
.acct-item:first-of-type { margin-top: 8px; border-top: 1px solid var(--line); border-radius: 6px 6px 0 0; }
.acct-item:last-of-type { border-radius: 0 0 6px 6px; }
.acct-item .a-info { text-align: left; }
.acct-item .a-bank { font-size: 0.8rem; color: var(--muted); }
.acct-item .a-num { font-size: 0.98rem; font-variant-numeric: tabular-nums; }
.acct-item .a-hold { font-size: 0.8rem; color: var(--muted); }
.copy-btn { white-space: nowrap; border: 1px solid var(--gold); color: var(--sky-deep); background: #fff; border-radius: 4px; padding: 8px 12px; font-size: 0.85rem; }
.copy-btn:hover { background: var(--gold); color: #fff; }

/* ── 푸터 ─────────────────────────────────────────────────────── */
.footer { padding: 56px 30px 70px; text-align: center; background: linear-gradient(180deg, var(--bg) 0%, #e6f0f8 100%); }
.footer__names { font-family: var(--serif-en); font-size: 1.6rem; color: var(--sky-deep); margin: 8px 0; letter-spacing: 0.08em; }
.footer__names .amp { font-style: italic; color: var(--gold); }
.footer__thanks { color: var(--muted); font-size: 0.9rem; }

/* ── 뷰어(팝업) ───────────────────────────────────────────────── */
.viewer {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(18,30,42,0.96); overflow-y: auto;
  padding: 56px 0 40px;
}
.viewer__inner { max-width: var(--maxw); margin: 0 auto; }
.viewer__inner img { width: 100%; display: block; }
.viewer__close {
  position: fixed; top: 14px; right: 14px; z-index: 101;
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,0.15); color: #fff; font-size: 1.1rem;
}

/* ── 모달(참석 의사 팝업) ─────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 150;
  overflow-y: auto;
}
.modal[hidden] { display: none; }   /* hidden 속성이 확실히 동작하도록 */
.modal__backdrop { position: fixed; inset: 0; background: rgba(20,40,60,0.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.modal__card {
  position: relative; z-index: 1;
  width: calc(100% - 40px); max-width: 360px;
  margin: 8vh auto 40px;
  background: var(--surface); border-radius: 10px;
  padding: 32px 24px 28px; box-shadow: 0 20px 60px rgba(20,40,60,0.3);
  text-align: center;
  animation: modalIn .2s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.modal__title { font-family: var(--serif-ko); font-size: 1.35rem; font-weight: 700; margin-bottom: 22px; }
.modal__close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--muted); font-size: 0.95rem;
}

/* ── 토스트 ───────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(36,52,65,0.95); color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: 0.9rem; z-index: 200; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 등장 애니메이션 ──────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll { animation: none; }
  html { scroll-behavior: auto; }
}
