/* ============================================================
 *  Mobile wedding invitation — "Warm Editorial"
 *  Palette: warm paper · espresso ink · clay · olive
 *  Type: Fraunces (EN display) · Nanum Myeongjo (KR) ·
 *        Pinyon Script (accent) · Gowun Dodum (body)
 * ============================================================ */

:root {
  --paper: #f2ece2;
  --paper-2: #e8dfd0;
  --cream: #fbf8f2;
  --ink: #241f19;
  --ink-soft: #6a6153;
  --muted: #9a8f7d;
  --line: #ded4c3;
  --line-2: #cec2ad;
  --clay: #a2603a;
  --olive: #6f7357;

  --f-en: "Fraunces", Georgia, serif;
  --f-script: "Pinyon Script", cursive;
  --f-kr: "Nanum Myeongjo", serif;
  --f-body: "Gowun Dodum", sans-serif;

  --col: 520px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

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

body {
  font-family: var(--f-body);
  color: var(--ink);
  background: #ddd4c5;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.locked { overflow: hidden; height: 100vh; }

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--ink); }
a { color: inherit; }

.amp { font-family: var(--f-script); color: var(--clay); font-size: 1.05em; }

/* ── shared type ─────────────────────────────── */
.eyebrow {
  font-family: var(--f-en);
  font-size: 11.5px;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 14px;
}
.eyebrow.center { text-align: center; }
.script { font-family: var(--f-script); font-size: 40px; color: var(--clay); line-height: 1.25; }
.section__title {
  font-family: var(--f-kr);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.06em;
  text-align: center;
}
.section__hint { text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0 26px; }

/* ── app column ──────────────────────────────── */
.app {
  max-width: var(--col);
  margin: 0 auto;
  background: var(--paper);
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 70px rgba(45, 35, 20, 0.18);
}
.section { padding: 76px 30px; position: relative; }
.app > section:not(.hero) {
  opacity: 0; transform: translateY(28px);
  transition: opacity 1s ease, transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.app > section.in { opacity: 1; transform: none; }

/* ── Opening cover (curtain) ─────────────────── */
.cover { position: fixed; inset: 0; z-index: 100; overflow: hidden; background: transparent; }
.cover__panel {
  position: absolute; top: 0; width: 50%; height: 100%;
  background-image: var(--cover-img, none);
  background-size: 100vw 100vh;
  background-repeat: no-repeat;
  transition: transform 1.15s cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
}
.cover__panel--l { left: 0; background-position: left center; }
.cover__panel--r { right: 0; background-position: right center; }
.cover.opened .cover__panel--l { transform: translateX(-101%); }
.cover.opened .cover__panel--r { transform: translateX(101%); }

.cover__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(24, 19, 14, 0.34) 0%, rgba(24, 19, 14, 0.5) 55%, rgba(24, 19, 14, 0.74) 100%);
  transition: opacity 0.6s ease;
}
.cover.opened .cover__scrim { opacity: 0; }

.cover__inner {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff; padding: 28px;
  transition: opacity 0.5s ease, transform 0.8s ease;
}
.cover.opened .cover__inner { opacity: 0; transform: translateY(-16px); }
.cover__inner > * { opacity: 0; transform: translateY(16px); animation: rise 1.1s ease forwards; }
.cover__script { font-family: var(--f-script); font-size: 40px; color: #f2e4d1; animation-delay: 0.2s; }
.cover__names {
  font-family: var(--f-kr); font-weight: 400; font-size: 34px; letter-spacing: 0.06em;
  margin: 16px 0 4px; animation-delay: 0.4s;
}
.cover__names span { font-family: var(--f-en); font-style: italic; color: #e6c9a8; }
.cover__rule { width: 0; height: 1px; background: rgba(242, 228, 209, 0.7); margin: 14px 0 20px; animation: ruleGrow 1.3s 0.9s ease forwards; }
@keyframes ruleGrow { to { width: 60px; } }
.cover__date { font-family: var(--f-en); font-size: 15px; letter-spacing: 0.3em; color: #f0e7d8; animation-delay: 0.6s; }
.cover__enter {
  margin-top: 40px; padding: 14px 36px; border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.8); color: #fff; background: rgba(255, 255, 255, 0.06);
  font-family: var(--f-kr); font-size: 14px; letter-spacing: 0.2em; animation-delay: 0.8s;
  transition: background 0.4s, color 0.4s, border-color 0.4s;
}
.cover__enter:hover { background: #fff; color: var(--ink); border-color: #fff; }

@keyframes rise { to { opacity: 1; transform: none; } }

/* ── BGM toggle ──────────────────────────────── */
.bgm {
  position: fixed; z-index: 60;
  right: max(16px, calc(50vw - var(--col) / 2 + 16px)); bottom: 20px;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(36, 31, 25, 0.85); display: grid; place-items: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}
.bgm__bars { display: flex; align-items: flex-end; gap: 3px; height: 15px; }
.bgm__bars i { width: 2.5px; height: 5px; background: var(--cream); border-radius: 2px; }
.bgm.playing .bgm__bars i { animation: eq 0.9s ease-in-out infinite; }
.bgm.playing .bgm__bars i:nth-child(2) { animation-delay: 0.25s; }
.bgm.playing .bgm__bars i:nth-child(3) { animation-delay: 0.5s; }
@keyframes eq { 0%, 100% { height: 5px; } 50% { height: 15px; } }

/* ── Hero ────────────────────────────────────── */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero__media { position: absolute; inset: -6% 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9) contrast(1.02); will-change: transform; }
.hero__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(24, 19, 14, 0.22) 0%, rgba(24, 19, 14, 0.04) 34%, rgba(242, 236, 226, 0.98) 100%);
}
.hero__text { position: relative; z-index: 2; width: 100%; padding: 0 30px 76px; text-align: center; }
.hero__text .eyebrow { color: var(--clay); }
.hero__names {
  font-family: var(--f-en); font-style: italic; font-weight: 400;
  font-size: 54px; line-height: 1.05; color: var(--ink); letter-spacing: 0.01em;
}
.hero__names .amp { display: block; font-size: 40px; margin: 4px 0; }
.hero__date { margin-top: 18px; font-family: var(--f-kr); font-size: 14px; letter-spacing: 0.24em; color: var(--ink-soft); }
.scroll-hint {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 24px; height: 36px; border: 1px solid rgba(36, 31, 25, 0.45); border-radius: 14px;
}
.scroll-hint i {
  position: absolute; top: 6px; left: 50%; width: 3px; height: 7px; border-radius: 2px;
  background: var(--ink-soft); transform: translateX(-50%); animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel { 0% { opacity: 0; top: 6px; } 40% { opacity: 1; } 100% { opacity: 0; top: 20px; } }

/* ── Wave divider (draws in) ─────────────────── */
.wave { height: 64px; margin: -1px 0; }
.wave svg { width: 100%; height: 100%; display: block; }
.wave path {
  fill: none; stroke: var(--clay); stroke-width: 1.2; opacity: 0.55;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 2600; stroke-dashoffset: 2600;
}
.wave.draw path { transition: stroke-dashoffset 2s ease; stroke-dashoffset: 0; }

/* ── Greeting ────────────────────────────────── */
.greeting { text-align: center; padding-top: 34px; }
.greeting__body { font-family: var(--f-kr); font-size: 15.5px; line-height: 2.2; color: var(--ink-soft); margin: 24px 0; }
.greeting__sign { font-family: var(--f-kr); font-size: 15px; letter-spacing: 0.1em; }

/* ── Couple ──────────────────────────────────── */
.couple__row { display: flex; align-items: center; justify-content: center; gap: 16px; text-align: center; }
.couple__person { flex: 1; }
.couple__label { font-family: var(--f-en); font-size: 11px; letter-spacing: 0.36em; text-transform: uppercase; color: var(--clay); margin-bottom: 12px; }
.couple__name { font-family: var(--f-kr); font-size: 23px; letter-spacing: 0.1em; }
.couple__parents { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.7; }
.couple__parents span { color: var(--ink-soft); }
.couple__amp { font-family: var(--f-script); font-size: 32px; color: var(--clay); }

/* ── Date ────────────────────────────────────── */
.date__card { text-align: center; border: 1px solid var(--line-2); padding: 42px 24px 34px; background: var(--cream); }
.date__num { display: flex; align-items: baseline; justify-content: center; gap: 12px; margin: 8px 0 12px; }
.date__num .m, .date__num .w { font-family: var(--f-kr); font-size: 16px; color: var(--ink-soft); }
.date__num .d { font-family: var(--f-en); font-weight: 500; font-size: 74px; line-height: 1; }
.date__time { font-family: var(--f-kr); font-size: 15px; letter-spacing: 0.08em; }
.date__venue { font-size: 14px; color: var(--muted); margin-top: 6px; }
.date__actions { display: flex; justify-content: center; gap: 10px; margin-top: 28px; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────────────── */
.btn { font-family: var(--f-kr); font-size: 13.5px; letter-spacing: 0.1em; padding: 12px 24px; border-radius: 0; transition: all 0.35s ease; }
.btn--ghost { border: 1px solid var(--line-2); color: var(--ink-soft); }
.btn--ghost:hover { border-color: var(--clay); color: var(--clay); }
.btn--solid { background: var(--ink); color: var(--cream); width: 100%; padding: 14px; }
.btn--solid:hover { background: var(--clay); }
.btn.done { background: var(--olive); border-color: var(--olive); color: #fff; }

/* ── Gallery (2-column masonry) ──────────────── */
.gallery { padding-top: 34px; }
.gallery__grid { column-count: 2; column-gap: 10px; margin-top: 20px; }
.gallery__item { display: block; width: 100%; break-inside: avoid; margin-bottom: 10px; padding: 0; overflow: hidden; position: relative; }
.gallery__item img { width: 100%; filter: saturate(0.92) contrast(1.02); transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item::after {
  content: ""; position: absolute; inset: 0;
  border: 1px solid rgba(36, 31, 25, 0.06); pointer-events: none;
}

/* ── Location ────────────────────────────────── */
.location { text-align: center; }
.location__addr { font-family: var(--f-kr); font-size: 15px; margin-top: 14px; }
.location__tel { font-size: 13.5px; color: var(--muted); margin-top: 4px; letter-spacing: 0.08em; }
.location__map { margin: 24px 0 18px; height: 220px; border: 1px solid var(--line-2); overflow: hidden; background: var(--cream); }
.location__map iframe { width: 100%; height: 100%; border: 0; filter: saturate(0.8) sepia(0.16) contrast(1.02); }
.map-empty { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 14px; }
.location__links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.map-link { font-family: var(--f-kr); font-size: 13px; padding: 10px 18px; border: 1px solid var(--line-2); color: var(--ink-soft); text-decoration: none; transition: all 0.3s; }
.map-link:hover { border-color: var(--clay); color: var(--clay); }

/* ── Accounts accordion ──────────────────────── */
.accounts__list { margin-top: 28px; }
.acc { border-bottom: 1px solid var(--line); }
.acc:first-child { border-top: 1px solid var(--line); }
.acc__head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 18px 4px; text-align: left; }
.acc__role { font-family: var(--f-kr); font-size: 14.5px; color: var(--ink-soft); }
.acc__bank { margin-left: auto; font-size: 13px; color: var(--muted); }
.acc__chev { width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform 0.35s; }
.acc.open .acc__chev { transform: rotate(-135deg); }
.acc__body { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease; padding: 0 4px; }
.acc.open .acc__body { max-height: 190px; padding: 0 4px 22px; }
.acc__num { font-size: 15px; letter-spacing: 0.05em; }
.acc__holder { font-size: 13px; color: var(--muted); margin-top: 2px; }
.acc__actions { display: flex; gap: 8px; margin-top: 12px; }
.acc__kakao { font-family: var(--f-kr); font-size: 13.5px; padding: 12px 24px; background: #fee500; color: #3c1e1e; text-decoration: none; transition: filter 0.3s; }
.acc__kakao:hover { filter: brightness(0.95); }

/* ── Forms ───────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); text-align: left; }
.form input, .form select, .form textarea {
  border: 1px solid var(--line-2); background: var(--cream); padding: 12px 14px; border-radius: 0; transition: border-color 0.3s;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--clay); }
.form textarea { resize: vertical; }
.form__full { grid-column: 1 / -1; }
#rsvpForm { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form__row { display: flex; gap: 10px; }
.form__row input { flex: 1; }
.form--guest { text-align: left; }
.form__status { font-size: 13px; }
.form__status.ok { color: var(--olive); }
.form__status.err { color: #b0553f; }

/* ── Guestbook ───────────────────────────────── */
.guest-list { list-style: none; margin-top: 30px; display: flex; flex-direction: column; gap: 12px; }
.guest { border: 1px solid var(--line); border-left: 2px solid var(--clay); background: var(--cream); padding: 16px 18px; animation: rise 0.6s ease both; }
.guest__top { display: flex; align-items: center; gap: 10px; }
.guest__name { font-family: var(--f-kr); font-size: 14.5px; }
.guest__del { margin-left: auto; font-size: 12px; color: var(--muted); }
.guest__del:hover { color: #b0553f; }
.guest__msg { font-size: 14.5px; color: var(--ink-soft); margin: 8px 0; line-height: 1.8; }
.guest__time { font-size: 11.5px; color: var(--muted); letter-spacing: 0.06em; }
.guest__delbox { display: flex; gap: 8px; margin-top: 12px; }
.guest__delbox input { flex: 1; border: 1px solid var(--line-2); background: #fff; padding: 9px 12px; }
.guest__delok { font-size: 13px; padding: 9px 16px; border: 1px solid var(--line-2); }
.guest-empty { text-align: center; color: var(--muted); font-size: 14px; padding: 30px 0; }

/* ── Footer ──────────────────────────────────── */
.footer { text-align: center; padding: 66px 30px 96px; border-top: 1px solid var(--line); }
.footer__names { font-family: var(--f-kr); font-size: 18px; letter-spacing: 0.12em; margin: 14px 0 28px; }

/* ── Lightbox ────────────────────────────────── */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(24, 19, 14, 0.93); display: grid; place-items: center; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 88vh; }

@media (max-width: 380px) {
  .section { padding: 60px 22px; }
  .hero__names { font-size: 44px; }
  .date__num .d { font-size: 60px; }
}
