/* ============================================================
 *  婚礼请柬 · 样式
 *  颜色和字体都在下面 :root 里
 * ============================================================ */

/* 字体全部放在本地 assets/fonts/（国内打不开 Google Fonts） */
@font-face { font-family: "WK-page";   src: url("fonts/wenkai-page.woff2") format("woff2");   font-display: swap; }
@font-face { font-family: "WK-common"; src: url("fonts/wenkai-common.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Pinyon Script"; src: url("fonts/pinyon-script.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("fonts/cormorant-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("fonts/cormorant-500.woff2") format("woff2"); font-style: normal; font-weight: 500; font-display: swap; }

:root {
  --cream: #f7f4ee;   /* 底色 */
  --wine:  #6b1b29;   /* 酒红色大区块 */
  --rose:  #8c2f45;   /* 奶油底上的强调色 */
  --ink:   #440a0a;   /* 奶油底上的正文 */
  --light: #fdfcfc;   /* 酒红底上的文字 */

  --kai:    "WK-page", "WK-common", "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
  --script: "Pinyon Script", "Snell Roundhand", cursive;
  --serif:  "Cormorant", "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 16px/1.85 var(--kai);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-weight: 400; }
[hidden] { display: none !important; }

.script { font-family: var(--script); font-weight: 400; }
.italic { font-family: var(--serif); font-style: italic; }
.num    { font-family: var(--serif); font-weight: 500; letter-spacing: .04em; }

/* 花体字母 C Q */
.mono { font-family: var(--script); line-height: 1; white-space: nowrap; }
.mono span:last-child { display: inline-block; margin-left: -.18em; transform: translateY(.18em); }

/* ============ 区块 & 外框线 ============ */
.sec {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  overflow: hidden; overflow: clip;
}
.sec.cream { background: var(--cream); color: var(--ink); --rule: rgba(140, 47, 69, .45); --soft: rgba(68, 10, 10, .72); --accent: var(--rose); }
.sec.wine  { background: var(--wine);  color: var(--light); --rule: rgba(253, 252, 252, .32); --soft: rgba(253, 252, 252, .78); --accent: var(--light); }
.wrap {
  position: relative;
  max-width: 1080px; margin: 0 auto;
  padding: 88px 22px;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  text-align: center;
}
.sec h2 {
  font-size: 34px; letter-spacing: .24em; text-indent: .24em;
  color: var(--accent);
  margin-bottom: 18px;
}
.lead { max-width: 30em; margin: 0 auto 48px; color: var(--soft); }
@media (min-width: 760px) {
  .sec { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
  .wrap { padding: 112px 48px; }
  .sec h2 { font-size: 42px; }
}

.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font: 17px/1 var(--kai); letter-spacing: .3em; text-indent: .3em;
  padding: 17px 52px; border-radius: 2px;
  background: var(--light); color: var(--wine); border: 1px solid var(--light);
}
.btn:active { transform: scale(.98); }
.btn.disabled { opacity: .55; cursor: default; }
.btn-ghost { background: transparent; color: var(--light); font-size: 14px; padding: 12px 30px; }
.link-btn {
  font: 13px var(--kai); background: none; border: 0; color: inherit; opacity: .6;
  text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}

/* 拍立得 */
.polaroid {
  background: var(--light);
  padding: 9px 9px 36px;
  box-shadow: 0 22px 44px -20px rgba(40, 0, 8, .55);
  transform: rotate(var(--r, 0deg));
}
.polaroid img { width: 100%; }

/* 滚动出现 */
.reveal .wrap > * { opacity: 0; transform: translateY(22px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in .wrap > * { opacity: 1; transform: none; }
.reveal.in .wrap > .deco { transform: rotate(var(--r)); }
@media (prefers-reduced-motion: reduce) {
  .reveal .wrap > * { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============ 门禁 ============ */
.gate {
  position: fixed; inset: 0; z-index: 50;
  background: var(--cream); color: var(--ink);
  transition: opacity .8s ease;
}
.gate.leaving { opacity: 0; pointer-events: none; }
.gate-frame {
  position: absolute; inset: 14px;
  border: 1px solid rgba(140, 47, 69, .45);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 20px; text-align: center;
}
.gate .mono { font-size: 56px; color: var(--rose); margin-bottom: 28px; }
.gate-names { font-size: clamp(48px, 13vw, 76px); line-height: 1.15; color: var(--rose); }
.gate-names span { display: block; }
.gate-tagline { font-size: 22px; margin-top: 6px; }
#gate-form { width: min(290px, 100%); margin-top: 52px; display: flex; flex-direction: column; gap: 12px; }
#gate-form label { font-size: 15px; letter-spacing: .2em; color: rgba(68, 10, 10, .72); }
#gate-input {
  font: 19px var(--kai); text-align: center; color: var(--ink);
  padding: 11px 12px;
  background: transparent; border: 1px solid rgba(140, 47, 69, .45); border-radius: 2px;
  outline: none;
}
#gate-input:focus { border-color: var(--rose); }
#gate-form button {
  font: 17px var(--kai); letter-spacing: .4em; text-indent: .4em;
  padding: 13px; border: 0; border-radius: 2px;
  background: var(--rose); color: var(--light); cursor: pointer;
}
.gate-error { color: var(--rose); font-size: 14px; margin-top: 16px; max-width: 290px; }

/* ============ 首屏 ============ */
.sec:first-child { padding-top: 40px; }
.hero { border-top: 1px solid var(--rule); padding-top: 0; }
.topnav {
  display: inline-flex; align-items: center; gap: 18px;
  margin-top: -16px; padding: 0 14px;
  background: var(--cream);
  font-size: 15px; letter-spacing: .12em; line-height: 32px;
}
.topnav a { text-decoration: none; color: var(--rose); }
.topnav .mono { font-size: 32px; margin: 0 6px; letter-spacing: 0; }
@media (min-width: 760px) { .topnav { gap: 40px; font-size: 16px; padding: 0 28px; } }

.greeting { margin: 64px 0 22px; font-size: 17px; letter-spacing: .1em; color: var(--rose); }
.hero-names {
  color: var(--rose);
  font-size: clamp(54px, 15vw, 128px);
  line-height: 1.1;
}
.hero-names > span { display: inline-block; }
.hero-names #groomEn { display: block; transform: translateX(-7%); }
.hero-names .amp, .gate-names .amp { font-family: var(--serif); font-style: italic; font-size: .5em; margin-right: .2em; }
.hero-names .amp, .hero-names #brideEn { transform: translateX(6%); }
.hero-cn { margin: 22px 0 56px; font-size: 19px; letter-spacing: .3em; text-indent: .3em; }

.hero-photo-wrap { position: relative; max-width: 820px; margin: 0 auto; }
.hero-photo { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.deco-hero { position: absolute; width: 40%; left: -24px; bottom: -64px; }
@media (min-width: 760px) { .deco-hero { width: 31%; left: -96px; bottom: -80px; } }

.hero-meta {
  display: flex; justify-content: center; align-items: center; gap: 28px;
  margin-top: 112px;
}
.hero-meta .num { font-size: 34px; line-height: 1.2; color: var(--rose); }
.hero-meta .italic-cn { font-size: 14px; color: var(--soft); line-height: 1.7; }
.vrule { width: 1px; align-self: stretch; background: var(--rule); }
@media (min-width: 760px) { .hero-meta { gap: 56px; } .hero-meta .num { font-size: 44px; } }

/* ============ next chapter ============ */
.chapter { display: flex; flex-direction: column; align-items: center; gap: 56px; }
.chapter-line { font-size: clamp(40px, 10vw, 68px); line-height: 1.08; max-width: 9em; }
.chapter-cn { margin-top: 22px; font-size: 18px; letter-spacing: .14em; color: var(--soft); }
.chapter-photo { width: min(300px, 72vw); }
@media (min-width: 860px) {
  .chapter { flex-direction: row; justify-content: center; gap: 96px; text-align: left; }
  .chapter-photo { width: 320px; flex: none; }
}

/* ============ 流程 ============ */
.timeline {
  list-style: none; padding: 0;
  max-width: 460px; margin: 44px auto 72px;
  text-align: left;
}
.tl-item {
  display: grid; grid-template-columns: 58px 1fr; gap: 18px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}
.tl-item:last-child { border-bottom: 1px solid var(--rule); }
.tl-icon {
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--rose); color: var(--rose);
}
.tl-item.hot .tl-icon { background: var(--rose); color: var(--light); }
.icon { width: 36px; height: 36px; }
.tl-time { font-size: 26px; line-height: 1.1; color: var(--rose); }
.tl-body h3 { font-size: 21px; margin-top: 4px; }
.hot-tag {
  display: inline-block; vertical-align: 3px; margin-left: 10px;
  font-size: 12px; line-height: 20px; padding: 0 8px;
  border: 1px solid var(--rose); border-radius: 999px; color: var(--rose);
}
.tl-desc { font-size: 15px; color: var(--soft); margin: 2px 0 8px; }
.venue-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--rose); text-decoration: none; }
.venue-tag .dot, .venue-num {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--rose); color: var(--light);
  font-family: var(--serif); font-weight: 500;
}
.venue-tag .dot { width: 19px; height: 19px; font-size: 13px; }

@media (min-width: 900px) {
  .timeline {
    position: relative;
    max-width: none;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
    padding-top: 30px; text-align: center;
  }
  .timeline::before {        /* 顶部的「梳子」线 */
    content: ""; position: absolute; top: 0; left: 12.5%; right: 12.5%;
    border-top: 1px solid var(--rose);
  }
  .tl-item {
    position: relative;
    grid-template-columns: 1fr; justify-items: center; align-content: start; gap: 14px;
    padding: 0; border: 0;
  }
  .tl-item:last-child { border: 0; }
  .tl-item::before {
    content: ""; position: absolute; top: -30px; left: 50%; height: 20px;
    border-left: 1px solid var(--rose);
  }
  .tl-icon { width: 92px; height: 92px; }
  .icon { width: 54px; height: 54px; }
  .tl-time { font-size: 30px; }
}

/* ============ 地点 ============ */
.venues { display: grid; gap: 14px; max-width: 860px; margin: 0 auto; text-align: left; }
@media (min-width: 760px) { .venues { grid-template-columns: 1fr 1fr; gap: 20px; } }
.venue {
  display: grid; grid-template-columns: 38px 1fr; gap: 4px 16px; align-items: start;
  padding: 20px 18px;
  border: 1px solid var(--rule);
  scroll-margin-top: 24px;
}
.venue-num { width: 38px; height: 38px; font-size: 19px; grid-row: span 2; }
.venue h3 { font-size: 19px; line-height: 1.4; }
.venue-sub { font-size: 13px; color: var(--soft); }
.venue-events { display: flex; flex-wrap: wrap; gap: 0 14px; font-size: 14px; margin-top: 4px; }
.venue-events b { color: var(--rose); font-size: 16px; }
.map-link { grid-column: 2; justify-self: start; margin-top: 8px; font-size: 14px; color: var(--rose); text-decoration: none; border-bottom: 1px solid var(--rose); white-space: nowrap; }

/* ============ 出行 & 住宿 ============ */
.deco-travel { width: min(280px, 70vw); margin: 0 auto 64px; }
@media (min-width: 1040px) {
  .deco-travel { position: absolute; width: 270px; right: -96px; top: 64px; margin: 0; }
  #travel h2, #travel .lead { margin-right: 120px; margin-left: 120px; }
}
.travel { max-width: 440px; margin: 0 auto; text-align: left; }
.travel-item {
  display: grid; grid-template-columns: 64px 1fr; column-gap: 12px;
  padding: 18px 0; border-top: 1px solid var(--rule);
}
.travel-item:last-child { border-bottom: 1px solid var(--rule); }
.travel-item h3 { grid-row: span 2; font-size: 20px; letter-spacing: .1em; line-height: 1.5; }
.travel-item .sub { font-size: 14px; color: var(--soft); }
@media (min-width: 760px) {
  .travel { max-width: 820px; display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
  .travel-item { display: block; padding: 28px 12px; border: 0; }
  .travel-item + .travel-item { border-left: 1px solid var(--rule); }
  .travel-item:last-child { border-bottom: 0; }
  .travel-item h3 { margin-bottom: 8px; }
}
.notes { list-style: none; padding: 0; margin: 40px auto 0; font-size: 16px; }
.notes li + li { margin-top: 6px; }
.notes li::before { content: "✦"; font-size: 10px; vertical-align: 3px; margin-right: 10px; opacity: .7; }
.stay { margin-top: 80px; }
.stay h3 { font-size: 26px; letter-spacing: .24em; text-indent: .24em; margin-bottom: 12px; }
.stay p { max-width: 24em; margin: 0 auto; color: var(--soft); }

/* ============ 着装 ============ */
.dress { display: grid; gap: 56px; max-width: 820px; margin: 0 auto; }
@media (min-width: 760px) { .dress { grid-template-columns: 1fr 1fr; gap: 64px; } }
.dress-group h3 { font-size: 22px; letter-spacing: .3em; text-indent: .3em; color: var(--rose); margin-bottom: 20px; }
.swatches { display: flex; justify-content: center; gap: 14px; margin-bottom: 18px; }
.swatch { width: 60px; }
.paint {               /* 水彩色块 */
  display: block; width: 60px; height: 48px;
  background: var(--c);
  background: radial-gradient(120% 120% at 30% 25%, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 60%, color-mix(in srgb, var(--c) 86%, #000));
  border-radius: 46% 54% 42% 58% / 58% 44% 56% 42%;
  transform: rotate(var(--r));
  box-shadow: inset 0 0 7px rgba(0, 0, 0, .08);
}
.swatch figcaption { font-size: 13px; color: var(--soft); margin-top: 8px; }
.dress-group p { max-width: 21em; margin: 0 auto; font-size: 15px; color: var(--soft); }
.winter {
  max-width: 28em; margin: 64px auto 0; padding: 20px 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  font-size: 15px;
}

/* ============ 问答 ============ */
.strip.deco-strip { width: 150px; margin: 0 auto 64px; }
@media (min-width: 1040px) {
  .strip.deco-strip { position: absolute; width: 170px; left: -64px; top: 88px; margin: 0; }
}
.strip {
  background: var(--light); padding: 7px 7px 30px;
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
  box-shadow: 0 22px 44px -20px rgba(20, 0, 4, .7);
  transform: rotate(var(--r));
}
.strip img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.strip-date {
  position: absolute; left: 0; right: 0; bottom: 8px;
  font: 10px "Courier New", monospace; letter-spacing: .2em; color: var(--wine);
}
.faq { max-width: 26em; margin: 44px auto 0; }
.faq > div + div { margin-top: 34px; }
.faq dt { font-size: 21px; letter-spacing: .12em; }
.faq dd { margin-top: 6px; color: var(--soft); }

/* ============ 海门小攻略 ============ */
.explore { display: grid; gap: 40px; max-width: 700px; margin: 0 auto 72px; }
@media (min-width: 680px) { .explore { grid-template-columns: 1fr 1fr; gap: 56px; } }
.explore .label {
  font-size: 14px; letter-spacing: .5em; text-indent: .5em; color: var(--rose);
  padding-bottom: 10px; margin-bottom: 22px; border-bottom: 1px solid var(--rule);
}
.explore-item + .explore-item { margin-top: 20px; }
.explore-item b { font-weight: 400; font-size: 19px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.explore-item p { font-size: 15px; color: var(--soft); margin-top: 2px; }

.secret {
  position: relative; display: block; width: 100%; max-width: 380px; min-height: 140px;
  margin: 0 auto; padding: 0; cursor: pointer;
  font: inherit; color: var(--rose);
  border: 1px dashed var(--rose); border-radius: 2px; background: transparent;
  transition: background .5s ease, color .5s ease;
}
.secret > span {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity .45s ease;
}
.secret b { font-weight: 400; font-size: 23px; letter-spacing: .3em; text-indent: .3em; }
.secret-tap { font-size: 13px; opacity: .7; }
.secret-back { opacity: 0; }
.secret-back b.script { font-size: 42px; letter-spacing: 0; text-indent: 0; line-height: 1.2; }
.secret.open { background: var(--rose); color: var(--light); }
.secret.open .secret-front { opacity: 0; }
.secret.open .secret-back { opacity: 1; }

/* ============ 回执 & 页脚 ============ */
.rsvp { padding-bottom: 56px; }
.rsvp .lead { margin-bottom: 36px; }
.footer {
  margin-top: 104px; padding-top: 64px;
  border-top: 1px solid var(--rule);
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.footer .mono { font-size: 64px; margin-bottom: 8px; }
.footer-line { font-size: 17px; letter-spacing: .24em; text-indent: .24em; margin-bottom: 18px; }

/* ============ 音乐按钮 ============ */
.music-btn {
  position: fixed; right: 16px; bottom: 20px; z-index: 20;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--rose); background: var(--cream); color: var(--rose);
  font-size: 18px; cursor: pointer;
}
.music-btn.playing { animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
