/* ============================================
   婚礼电子请柬 - 白绿西式浪漫风格
   新人：吴璇 ♥ 董静旋
   ============================================ */

:root {
  --ivory: #faf8f3;        /* 象牙白底 */
  --cream: #f4f0e6;        /* 奶油 */
  --sage: #8a9b7e;         /* 鼠尾草绿 */
  --deep-green: #4d5f46;   /* 深绿 */
  --moss: #6d7f60;         /* 苔绿 */
  --gold: #b99a5a;         /* 金色 */
  --gold-light: #d6c49a;   /* 浅金 */
  --text: #4a4a4a;         /* 正文 */
  --text-light: #8a8a80;   /* 浅色文字 */
  --white: #ffffff;
  --shadow: 0 4px 20px rgba(93, 105, 84, 0.10);
  --serif: "Georgia", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--ivory);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 0 40px rgba(0,0,0,0.06);
  min-height: 100vh;
}

/* ---------------- 通用 ---------------- */
.section { padding: 48px 24px; }

/* 章节顶部花枝装饰 */
.sec-deco { text-align: center; margin-bottom: 4px; }
.sec-deco-svg { width: 168px; height: 28px; }

/* 角落花枝装饰 */
.corner-deco {
  position: absolute;
  width: 82px;
  height: 82px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
}
.corner-tl { top: 12px; left: 12px; }
.corner-br { bottom: 12px; right: 12px; transform: rotate(180deg); }
.corner-svg { width: 100%; height: 100%; }

.section-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: normal;
  color: var(--deep-green);
  text-align: center;
  letter-spacing: 6px;
  margin-bottom: 24px;
  position: relative;
}
.section-title::after {
  content: "";
  display: block;
  width: 44px;
  height: 1px;
  background: var(--gold);
  margin: 12px auto 0;
}

/* ---------------- 封面 ---------------- */
.cover {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px 60px;
  position: relative;
  background:
    radial-gradient(circle at 15% 12%, rgba(138,155,126,0.10), transparent 45%),
    radial-gradient(circle at 85% 88%, rgba(185,154,90,0.10), transparent 45%),
    linear-gradient(180deg, #fdfcf9 0%, #f6f3ea 100%);
}

.cover-ornament { margin-bottom: 28px; }
.ornament-svg { width: 200px; height: 60px; }

.cover-kicker {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 8px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.cover-names {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 22px;
}

.name-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.role {
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 6px;
  text-indent: 6px;
}

.cover-names .name {
  font-size: 34px;
  color: var(--deep-green);
  letter-spacing: 8px;
  text-indent: 8px;
  font-weight: 400;
  line-height: 1.2;
}

.cover-names .amp {
  font-size: 18px;
  color: var(--gold);
  font-style: italic;
  font-family: var(--serif);
  padding-bottom: 18px;
}

.cover-date { margin-bottom: 26px; }
.date-line {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 5px;
  color: var(--text-light);
  border-top: 1px solid var(--gold-light);
  border-bottom: 1px solid var(--gold-light);
  padding: 8px 22px;
  display: inline-block;
}

.cover-words {
  font-size: 14px;
  color: var(--text);
  letter-spacing: 3px;
}

.cover-verse {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 2px;
  margin-top: 16px;
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  color: var(--gold);
  font-size: 20px;
  animation: bounce 1.8s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  50% { transform: translateY(8px); opacity: 0.4; }
}

/* 封面入场动画 */
.fade-in { animation: fadeUp 1.2s ease both; }
.fade-in:nth-child(2) { animation-delay: 0.15s; }
.fade-in:nth-child(3) { animation-delay: 0.35s; }
.fade-in:nth-child(4) { animation-delay: 0.55s; }
.fade-in:nth-child(5) { animation-delay: 0.75s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- 滚动渐显 ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------------- 新人 ---------------- */
.couple { background: var(--white); }

.couple-card {
  text-align: center;
  border: 1px solid var(--gold-light);
  border-radius: 12px;
  padding: 32px 24px;
  background: var(--ivory);
  box-shadow: var(--shadow);
}

.couple-names {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--deep-green);
  letter-spacing: 4px;
  margin-bottom: 16px;
}
.couple-names .heart { color: var(--gold); font-size: 20px; }

.couple-text {
  font-size: 14px;
  color: var(--text-light);
  line-height: 2;
  letter-spacing: 1px;
}

.couple-divider {
  color: var(--gold-light);
  font-size: 15px;
  margin: 18px 0 16px;
}

/* ---------------- 我们的故事 ---------------- */
.story {
  background: linear-gradient(180deg, var(--ivory), var(--white));
}

.story-list {
  max-width: 300px;
  margin: 0 auto;
  padding-top: 6px;
}

.story-item {
  position: relative;
  padding: 0 0 28px 36px;
}
.story-item:last-child { padding-bottom: 4px; }

.story-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--ivory);
  box-shadow: 0 0 0 1px var(--gold-light);
}

.story-item::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 26px;
  bottom: 0;
  width: 1px;
  background: var(--gold-light);
}
.story-item:last-child::after { display: none; }

.story-tag {
  display: inline-block;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 5px;
  color: var(--deep-green);
  margin-bottom: 3px;
}

.story-text {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.9;
  letter-spacing: 1px;
}

/* ---------------- 时间地点 ---------------- */
.when-where { background: linear-gradient(180deg, var(--ivory), #f2efe4); position: relative; }

.info-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(185,154,90,0.25);
}

.info-row {
  display: flex;
  padding: 18px 20px;
  gap: 14px;
}
.info-row + .info-row { border-top: 1px dashed var(--gold-light); }

.info-label {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--gold);
  border: 1px solid var(--gold-light);
  border-radius: 999px;
  padding: 2px 12px;
  height: fit-content;
  margin-top: 3px;
  letter-spacing: 2px;
}

.info-value {
  font-size: 15px;
  color: var(--text);
  line-height: 1.9;
  font-family: var(--serif);
  letter-spacing: 1px;
}
.info-addr { font-family: var(--sans); font-size: 13px; color: var(--text-light); }

.nav-btns {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

/* ---------------- 按钮 ---------------- */
.btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 12px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 1px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--deep-green);
  color: #fff;
  box-shadow: 0 4px 14px rgba(77, 95, 70, 0.35);
}
.btn-primary:active { background: var(--moss); }

.btn-ghost {
  background: var(--white);
  color: var(--deep-green);
  border-color: var(--deep-green);
}

/* ---------------- 倒计时 ---------------- */
.countdown { background: var(--white); }

.cd-grid {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.cd-item {
  background: var(--ivory);
  border: 1px solid rgba(138,155,126,0.35);
  border-radius: 12px;
  width: 72px;
  padding: 14px 0 10px;
  text-align: center;
}

.cd-num {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  color: var(--deep-green);
  font-variant-numeric: tabular-nums;
}

.cd-label {
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 2px;
}

/* ---------------- 流程 ---------------- */
.agenda { background: linear-gradient(180deg, var(--white), var(--ivory)); }

.timeline {
  max-width: 300px;
  margin: 0 auto;
}

.tl-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  position: relative;
}
.tl-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 40px;
  bottom: -2px;
  width: 1px;
  height: 14px;
  background: var(--gold-light);
}

.tl-time {
  font-family: var(--serif);
  color: var(--gold);
  font-size: 16px;
  width: 52px;
  text-align: right;
  letter-spacing: 1px;
}

.tl-desc {
  font-size: 14px;
  color: var(--text);
  letter-spacing: 1px;
}

.agenda-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 16px;
}

/* ---------------- 照片墙 ---------------- */
.photos { background: var(--white); }

.photos-tip {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.photo-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.photo-block + .photo-block { margin-top: 24px; }

.photo-img {
  width: 100%;
  display: block;
  border-radius: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease;
  background: var(--cream);
}
.photo-img:active { transform: scale(0.97); }

/* 首张大图（横跨两列） */
.photo-feature {
  grid-column: span 2;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* 小图奇数时末张全宽横图 */
.photo-wide {
  grid-column: span 2;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

/* 普通小图 */
.photo-item {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* 两组照片之间的过渡文案 */
.photo-quote {
  text-align: center;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 2px;
  margin: 26px 0 20px;
}

/* ---------------- Lightbox 全屏浏览 ---------------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(18, 24, 18, 0.95);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }

.lb-img {
  max-width: 94vw;
  max-height: 80vh;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.lb-btn:active { background: rgba(255, 255, 255, 0.2); }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }

.lb-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  letter-spacing: 2px;
}

/* ---------------- 宾客登记 ---------------- */
.rsvp { background: var(--white); position: relative; }

/* ---------------- 温馨提示 ---------------- */
.tips { background: var(--ivory); }

.rsvp-tip {
  text-align: center;
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.rsvp-form {
  background: var(--ivory);
  border: 1px solid rgba(138,155,126,0.3);
  border-radius: 14px;
  padding: 24px 20px;
  box-shadow: var(--shadow);
}

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--deep-green);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.field input[type="text"],
.field input[type="tel"] {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d8d3c4;
  border-radius: 10px;
  font-size: 15px;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
}
.field input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(138,155,126,0.18);
}
.field input::placeholder { color: #b5b0a0; }

/* 出席切换 */
.attend-toggle { display: flex; gap: 10px; }

.attend-btn {
  flex: 1;
  padding: 13px 0;
  border-radius: 10px;
  border: 1px solid #d8d3c4;
  background: var(--white);
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.attend-btn.active {
  border-color: var(--deep-green);
  background: var(--deep-green);
  color: #fff;
  box-shadow: 0 4px 12px rgba(77, 95, 70, 0.3);
}

/* 人数步进器 */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid #d8d3c4;
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
}

.step-btn {
  width: 48px;
  height: 46px;
  font-size: 20px;
  border: none;
  background: transparent;
  color: var(--deep-green);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.step-btn:active { background: var(--cream); }

.stepper input {
  flex: 1;
  border: none;
  text-align: center;
  font-size: 17px;
  color: var(--deep-green);
  background: transparent;
  outline: none;
  font-family: var(--serif);
  border-left: 1px solid #eee8da;
  border-right: 1px solid #eee8da;
  height: 46px;
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

.btn-submit {
  width: 100%;
  padding: 15px 0;
  font-size: 15px;
  margin-top: 4px;
}

.form-msg {
  text-align: center;
  font-size: 13px;
  margin-top: 12px;
  min-height: 20px;
  letter-spacing: 1px;
}
.form-msg.ok { color: var(--deep-green); }
.form-msg.err { color: #b3564a; }

/* ---------------- 结尾 ---------------- */
.footer {
  position: relative;
  text-align: center;
  padding: 56px 24px 64px;
  background: linear-gradient(180deg, #f4f0e6, #efe9da);
}

.footer .sec-deco { margin-bottom: 20px; }

.footer-names {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--deep-green);
  letter-spacing: 4px;
  margin-bottom: 14px;
}

.footer-words {
  font-size: 13px;
  color: var(--text-light);
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.footer-thanks {
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 2px;
  margin-bottom: 22px;
}

.footer-ornament { color: var(--sage); font-size: 22px; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(40, 50, 40, 0.92);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 1px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 99;
  max-width: 86vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
