/* ============================================================
   wedding-korean｜韓系極簡喜帖
   象牙白底、暖棕單一強調色、拱形主視覺照、細線與置中排版
   輕盈無襯線內文 × 襯線名字，大量留白
   色彩與間距 token 覆寫自 /shared/base.css
   ============================================================ */

:root {
  --paper:        #faf9f6;              /* 象牙白底 */
  --paper-raise:  #ffffff;              /* 浮起表面 */
  --ink:          #45403a;              /* 暖深灰（正文/標題） */
  --ink-soft:     #948c81;              /* 次要文字 */
  --accent:       #a98e6f;              /* 暖棕（唯一強調色） */
  --accent-ink:   #fbfaf7;              /* 暖棕底上的文字色 */
  --hairline:     rgba(69, 64, 58, .14);
  --sand:         #f2eee7;              /* RSVP 淺沙底 */
  --font-sans-tc: "Noto Sans TC", "PingFang TC", sans-serif;

  --radius: 1rem;
  --shadow-soft: 0 20px 50px -28px rgba(69, 64, 58, .25);
}

:root {
  --font-script: "Great Vibes", "Cormorant Garamond", cursive; /* 手寫花體（英文標用） */
}

body {
  font-family: var(--font-sans-tc);
  font-weight: 400;
  font-size: var(--text-body);
  background: var(--paper);
  color: var(--ink);
}

/* ---------- 動態語彙：柔焦浮現 ＋ 輕盈漂浮 ---------- */
/* 進場改「晨霧散開」：由模糊到清晰，比單純淡入更夢幻 */
.reveal {
  filter: blur(9px);
  transform: translateY(18px);
  transition:
    opacity 1.1s var(--ease-out),
    transform 1.1s var(--ease-out),
    filter 1.1s var(--ease-out);
}
.reveal.is-in { filter: blur(0); }

/* ---------- 通用 ---------- */
.section-title {
  font-family: var(--font-serif-tc);
  font-size: var(--text-h2);
  font-weight: 500;
  letter-spacing: .18em;
  text-align: center;
  margin-bottom: clamp(2rem, 6vw, 3.5rem);
}
/* 英文小標改手寫花體：韓系文具的簽名筆觸 */
.label-en {
  font-family: var(--font-script);
  font-size: clamp(1.5rem, 4.5vw, 1.9rem);
  font-weight: 400;
  color: var(--accent);
  text-align: center;
  letter-spacing: .04em;
  margin-bottom: .6rem;
  line-height: 1.3;
  padding-bottom: .2rem; /* script descender 保留 */
}
.dot-sep::before { content: "\00B7"; margin-inline: .6em; opacity: .6; }

/* 區塊之間用髮絲線輕輕隔開（極簡的呼吸感） */
main .section + .section { border-top: 1px solid var(--hairline); }

/* ============ ① Hero：白底 ＋ 拱形照片 ＋ 花瓣飄落 ============ */
.hero {
  position: relative;
  overflow: hidden; /* 花瓣不外溢 */
  padding: clamp(4.5rem, 14vw, 7rem) var(--gutter) clamp(3.5rem, 10vw, 5rem);
  text-align: center;
}
.hero-content {
  position: relative;
  max-width: var(--content-max);
  margin-inline: auto;
}
.hero-label {
  font-family: var(--font-script);
  font-size: clamp(1.7rem, 6vw, 2.4rem);
  letter-spacing: .04em;
  line-height: 1.3;
  color: var(--accent);
  margin-bottom: clamp(1.25rem, 4vw, 2rem);
  padding-bottom: .2rem; /* script descender 保留 */
}

/* 花瓣飄落（render.js 注入 .wk-petals；極淡、關動畫時整組隱藏） */
.wk-petals { position: absolute; inset: 0; pointer-events: none; }
.wk-petals i {
  position: absolute;
  top: -3rem;
  width: 12px; height: 10px;
  background: #e3c9bc;           /* 乾燥玫瑰粉，襯象牙白 */
  border-radius: 68% 32% 60% 40% / 55% 60% 40% 45%;
  opacity: 0;
  animation: petal-fall var(--fall, 16s) linear var(--wait, 0s) infinite;
}
@keyframes petal-fall {
  0%   { opacity: 0; transform: translate3d(0, 0, 0) rotate(0deg); }
  8%   { opacity: .5; }
  85%  { opacity: .5; }
  100% { opacity: 0; transform: translate3d(var(--sway, 3rem), 105vh, 0) rotate(300deg); }
}
@media (prefers-reduced-motion: reduce) {
  .wk-petals { display: none; }
}
.hero-greeting {
  font-size: clamp(.9rem, 2.6vw, 1rem);
  font-weight: 300;
  letter-spacing: .22em;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}
.hero-names {
  font-family: var(--font-serif-tc);
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-weight: 500;
  letter-spacing: .14em;
  line-height: 1.3;
  text-wrap: balance;
}
.hero-names .amp {
  font-family: var(--font-serif-latin);
  font-style: italic;
  font-weight: 400;
  font-size: .58em;
  margin-inline: .3em;
  color: var(--accent);
}
.hero-names-en {
  font-family: var(--font-serif-latin);
  font-size: clamp(.95rem, 2.8vw, 1.15rem);
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: .6rem;
}
.hero-names-en:empty { display: none; }
.hero-date {
  margin-top: 1.1rem;
  font-size: clamp(.95rem, 2.8vw, 1.1rem);
  font-weight: 300;
  letter-spacing: .2em;
}

/* 拱形主視覺：韓系請帖的招牌形狀，外圈多一道離線細拱（文具的燙線） */
.hero-arch {
  position: relative;
  width: min(78%, 21rem);
  margin: clamp(2rem, 6vw, 3rem) auto 0;
  aspect-ratio: 3 / 4;
  border-radius: 999px 999px var(--radius) var(--radius);
  box-shadow: var(--shadow-soft);
  animation: arch-float 7s ease-in-out infinite alternate;
}
.hero-arch::after {
  content: "";
  position: absolute;
  inset: -.8rem;
  border: 1px solid rgba(169, 142, 111, .45);
  border-radius: 999px 999px calc(var(--radius) * 1.5) calc(var(--radius) * 1.5);
  pointer-events: none;
}
.hero-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 999px 999px var(--radius) var(--radius);
}
/* 主視覺的呼吸：緩慢上下漂浮，像掛在晨風裡 */
@keyframes arch-float {
  from { transform: translateY(0); }
  to   { transform: translateY(-9px); }
}

/* 倒數：細線分隔、Cormorant 數字（墨色，非白） */
.countdown {
  display: inline-flex;
  margin-top: clamp(2rem, 6vw, 2.75rem);
}
.cd-cell {
  display: grid;
  gap: .1rem;
  padding-inline: clamp(.9rem, 4vw, 1.6rem);
  text-align: center;
}
.cd-cell + .cd-cell { border-left: 1px solid var(--hairline); }
.cd-cell strong {
  font-family: var(--font-serif-latin);
  font-weight: 500;
  font-size: clamp(1.5rem, 5.5vw, 2.2rem);
  line-height: 1.1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.cd-cell span { font-size: var(--text-tiny); letter-spacing: .3em; color: var(--ink-soft); }
.countdown.is-past .cd-cell span { opacity: .5; }

/* ============ ② Our Story：置中、無軸線的極簡時間軸 ============ */
.story { text-align: center; }
.timeline {
  display: grid;
  gap: clamp(2.75rem, 8vw, 4rem);
}
.timeline-item { display: grid; gap: .35rem; justify-items: center; }
/* 每則之間一顆小圓點（取代整條線），進場時輕輕綻開 */
.timeline-item + .timeline-item::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .55;
  margin-bottom: clamp(1.5rem, 5vw, 2.25rem);
  transform: scale(0);
  transition: transform .7s var(--ease-out) .2s;
}
.timeline-item.is-in + .timeline-item::before,
.timeline-item.is-in::before { transform: scale(1); }
.tl-date {
  font-family: var(--font-serif-latin);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .22em;
  color: var(--accent);
}
.tl-title {
  font-family: var(--font-serif-tc);
  font-size: var(--text-h3);
  font-weight: 500;
  letter-spacing: .14em;
}
.tl-text {
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 30em;
}

/* ============ ③ Gallery：留白更大的雙欄 ============ */
.photo-grid {
  columns: 2;
  column-gap: clamp(1rem, 3.5vw, 2rem);
}
.photo-item {
  break-inside: avoid;
  margin-bottom: clamp(1rem, 3.5vw, 2rem);
}
.photo-item {
  overflow: hidden;
  border-radius: var(--radius);
}
.photo-item img {
  width: 100%;
  border-radius: var(--radius);
  transition: transform 1.1s var(--ease-out), opacity .6s var(--ease-out);
}
@media (hover: hover) {
  /* 柔軟的推近，不加陰影、維持輕盈 */
  .photo-item:hover img { transform: scale(1.04); }
}
@media (min-width: 900px) {
  .photo-grid { columns: 3; }
}

/* Lightbox */
.wk-lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(48, 44, 39, .93);
  padding: 4vh 4vw;
}
.wk-lightbox.is-open { display: flex; }
.wk-lightbox img {
  max-width: 100%; max-height: 88dvh;
  border-radius: .5rem;
  margin-inline: auto;
}
.wk-lightbox button {
  position: absolute;
  color: #faf9f6;
  font-size: 2rem;
  line-height: 1;
  padding: .75rem 1rem;
  opacity: .8;
  transition: opacity .3s var(--ease-out);
}
.wk-lightbox button:hover { opacity: 1; }
.wk-lb-close { top: .5rem; right: .75rem; font-size: 2.4rem; }
.wk-lb-prev { left: .25rem; top: 50%; transform: translateY(-50%); }
.wk-lb-next { right: .25rem; top: 50%; transform: translateY(-50%); }

/* ============ ④ Event Details：全置中 ============ */
.details { text-align: center; }
.details-date {
  font-family: var(--font-serif-latin);
  font-size: var(--text-h3);
  letter-spacing: .18em;
}
.details-note { color: var(--ink-soft); font-weight: 300; font-size: var(--text-small); letter-spacing: .14em; margin-top: .25rem; }
.details-note:empty { display: none; }

.event-list {
  margin: clamp(2rem, 6vw, 3rem) auto 0;
  max-width: 22rem;
  display: grid;
  gap: clamp(1.75rem, 5vw, 2.25rem);
}
.event-row { display: grid; gap: .2rem; justify-items: center; }
.event-row dt {
  font-family: var(--font-serif-latin);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: .12em;
}
.event-row dd strong {
  font-family: var(--font-serif-tc);
  font-size: var(--text-h3);
  font-weight: 500;
  letter-spacing: .16em;
  display: block;
}
.event-row dd span { color: var(--ink-soft); font-weight: 300; font-size: var(--text-small); letter-spacing: .1em; }

.calendar-actions {
  display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center;
  margin-top: clamp(2rem, 6vw, 2.75rem);
}
.parents {
  margin-top: clamp(2.5rem, 7vw, 3.5rem);
  color: var(--ink-soft);
  font-weight: 300;
  font-size: var(--text-small);
  letter-spacing: .18em;
}

/* ============ ⑤ Venue ============ */
.venue { text-align: center; }
.venue .section-title { margin-bottom: .5rem; }
.venue-hall { color: var(--accent); letter-spacing: .2em; font-weight: 300; }
.venue-hall:empty { display: none; }
.venue-address { color: var(--ink-soft); font-weight: 300; margin-top: .25rem; letter-spacing: .06em; }
.map-frame {
  margin-top: clamp(1.5rem, 5vw, 2.5rem);
  border-radius: calc(var(--radius) * .5);
  overflow: hidden;
  border: 1px solid var(--hairline);
  aspect-ratio: 4 / 3;
}
@media (min-width: 700px) { .map-frame { aspect-ratio: 16 / 8; } }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.venue-bottom {
  margin-top: clamp(1.75rem, 5vw, 2.5rem);
  display: grid;
  gap: 1.5rem;
  text-align: left;
}
.transport { display: grid; gap: .9rem; }
.transport li { display: grid; grid-template-columns: 3.5rem 1fr; gap: 1rem; align-items: baseline; }
.transport strong { font-weight: 500; letter-spacing: .2em; color: var(--accent); }
.transport span { color: var(--ink-soft); font-weight: 300; }
@media (min-width: 700px) {
  .venue-bottom { grid-template-columns: 1fr auto; align-items: start; }
}

/* ============ ⑥ RSVP（淺沙底，維持明亮）============ */
.rsvp { background: var(--sand); }
.rsvp-intro { max-width: 30em; margin-inline: auto; text-align: center; font-weight: 300; }
.rsvp-deadline {
  font-size: var(--text-small);
  letter-spacing: .12em;
  color: var(--ink-soft);
  margin-top: .5rem;
  text-align: center;
}

.rsvp-form {
  margin-top: clamp(2rem, 6vw, 3rem);
  display: grid;
  gap: 1.5rem;
}
.rsvp .field label, .rsvp .field legend {
  font-size: var(--text-small);
  letter-spacing: .12em;
  color: var(--ink);
}
.rsvp .field input, .rsvp .field textarea, .rsvp .field select {
  background: var(--paper-raise);
  border-color: var(--hairline);
}

.attend-field { border: 0; }
.attend-options { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: .5rem; }
.attend-pill input { position: absolute; opacity: 0; pointer-events: none; }
.attend-pill span {
  display: flex; align-items: center; justify-content: center;
  padding: .8rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--paper-raise);
  box-shadow: inset 0 0 0 1px var(--hairline);
  letter-spacing: .1em;
  transition: background .35s var(--ease-out), color .35s var(--ease-out), box-shadow .35s var(--ease-out);
  user-select: none;
}
.attend-pill input:checked + span {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: none;
  font-weight: 500;
}
.attend-pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(169, 142, 111, .35); }

.rsvp-details { display: grid; gap: 1.5rem; }
.field-row { display: grid; gap: 1.5rem; }
@media (min-width: 520px) { .field-row { grid-template-columns: repeat(3, 1fr); } }

.rsvp-error { color: var(--warn); font-size: var(--text-small); }
.rsvp-submit { width: 100%; padding-block: 1.05rem; letter-spacing: .3em; }
@media (min-width: 700px) { .rsvp-submit { width: auto; justify-self: center; padding-inline: 3.5rem; } }

.rsvp-success, .rsvp-closed {
  margin-top: clamp(2rem, 6vw, 3rem);
  text-align: center;
  display: grid;
  gap: .75rem;
  justify-items: center;
  padding: clamp(2rem, 6vw, 3rem) var(--gutter);
  border-radius: var(--radius);
  background: var(--paper-raise);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.success-mark {
  width: 3rem; height: 3rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.4rem;
}
.rsvp-success h3, .rsvp-closed h3 {
  font-family: var(--font-serif-tc);
  font-size: var(--text-h3);
  font-weight: 500;
  letter-spacing: .14em;
}
.success-note { font-size: var(--text-small); color: var(--ink-soft); }

/* ============ ⑦ Footer ============ */
.footer {
  text-align: center;
  padding: clamp(3.5rem, 10vw, 5.5rem) 0;
  border-top: 1px solid var(--hairline);
}
.footer-message { color: var(--ink-soft); font-weight: 300; max-width: 28em; margin-inline: auto; }
.footer-names {
  margin-top: 1rem;
  font-family: var(--font-serif-tc);
  font-size: var(--text-h3);
  font-weight: 500;
  letter-spacing: .24em;
}
.footer-brand {
  display: inline-block;
  margin-top: 2.5rem;
  font-size: var(--text-tiny);
  letter-spacing: .12em;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: .15rem;
  transition: color .3s var(--ease-out), border-color .3s var(--ease-out);
}
.footer-brand:hover { color: var(--accent); border-color: var(--accent); }
