/* ============================================
   KS & ZY 婚礼网页 — 颜色、字体都在这里改
   ============================================ */
:root {
  --wine: #5E1220;        /* 酒红（主色） */
  --wine-dark: #3E0B15;   /* 深酒红（正文字） */
  --gold: #E6C98A;        /* 金色 */
  --gold-light: #F3E2BC;  /* 浅金（大标题） */
  --gold-text: #7A5A22;   /* 浅底上的金色小字 */
  --cream: #F7EFE3;       /* 米白底 */
  --white: #FFFFFF;
  --serif-en: 'Cormorant Garamond', serif;
  --serif-zh: 'Noto Serif SC', serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--wine-dark);
  font-family: var(--serif-en), var(--serif-zh);
  -webkit-font-smoothing: antialiased;
}

.zh { font-family: var(--serif-zh); }
.page { max-width: 480px; margin: 0 auto; }

p, h1, h2 { margin: 0; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 4px;
  font-weight: 600;
}

/* ---------- 封面 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 56px 32px;
  text-align: center;
}
.frame, .frame-inner {
  position: absolute;
  pointer-events: none;
  border: 1.5px solid var(--gold);
  opacity: .75;
  inset: 14px;
}
.frame-inner { inset: 21px; border-width: .75px; opacity: .45; }

/* ---------- 酒红区：暗纹＋光影（让红不那么平） ---------- */
.hero, .venue, footer, .card-invite {
  background-color: var(--wine);
  background-image:
    radial-gradient(ellipse 70% 45% at 50% 42%, rgba(243, 226, 188, .16), transparent 70%),
    radial-gradient(ellipse 120% 60% at 50% 110%, rgba(30, 4, 10, .55), transparent 70%),
    radial-gradient(ellipse 120% 50% at 50% -10%, rgba(30, 4, 10, .35), transparent 70%),
    url("pattern.svg");
  background-size: auto, auto, auto, 64px 64px;
}
.venue, footer {
  background-image:
    radial-gradient(ellipse 80% 70% at 50% 50%, rgba(243, 226, 188, .10), transparent 70%),
    url("pattern.svg");
  background-size: auto, 64px 64px;
}

/* 四个角的金色花纹 */
.corner {
  position: absolute; width: 118px; height: 118px; pointer-events: none;
  background: url("ornament-corner.svg") no-repeat center / contain;
  opacity: .85;
}
.corner.tl { top: 26px; left: 26px; }
.corner.tr { top: 26px; right: 26px; transform: scaleX(-1); }
.corner.bl { bottom: 26px; left: 26px; transform: scaleY(-1); }
.corner.br { bottom: 26px; right: 26px; transform: scale(-1, -1); }

/* 封面飘浮金色光点 */
.sparks { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.spark {
  position: absolute; bottom: -10px; border-radius: 50%;
  background: radial-gradient(circle, #FFF3D1 0%, rgba(230, 201, 138, .85) 40%, rgba(230, 201, 138, 0) 70%);
  opacity: 0;
  animation: rise var(--dur, 14s) linear var(--delay, 0s) infinite;
}
@keyframes rise {
  0%   { transform: translate(0, 0); opacity: 0; }
  12%  { opacity: var(--peak, .8); }
  50%  { transform: translate(var(--sway, 14px), -48vh); }
  85%  { opacity: var(--peak, .8); }
  100% { transform: translate(0, -96vh); opacity: 0; }
}

/* 徽章慢慢亮一下 */
.crest { animation: glow 5s ease-in-out infinite; }
@keyframes glow {
  50% { box-shadow: 0 0 22px rgba(243, 226, 188, .28), inset 0 0 14px rgba(243, 226, 188, .12); }
}

.crest {
  width: 104px; height: 104px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
}
.crest-inner {
  width: 90px; height: 90px;
  border-radius: 50%;
  border: .75px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 25px; font-style: italic; font-weight: 500;
  white-space: nowrap;
}

.stack { display: flex; flex-direction: column; gap: 6px; align-items: center; }

.hero h1 {
  font-size: 58px; line-height: 1;
  font-style: italic; font-weight: 500;
  color: var(--gold-light);
}
.names-en { font-size: 17px; }
.names-zh { font-size: 18px; letter-spacing: 4px; font-weight: 600; }

.divider {
  display: flex; align-items: center; gap: 12px; width: 180px;
}
.divider span { flex: 1; height: 1px; background: currentColor; opacity: .7; }
.divider i { width: 7px; height: 7px; transform: rotate(45deg); background: currentColor; }

.date-big {
  font-size: 42px; line-height: 1; font-weight: 500;
  letter-spacing: 2px; color: var(--gold-light);
}
.date-sub { font-size: 14px; letter-spacing: 4px; font-weight: 600; }
.date-zh { font-size: 13px; letter-spacing: 3px; }

.scroll-hint {
  margin-top: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--gold); text-decoration: none;
  font-size: 13px; letter-spacing: 3px;
}
.scroll-hint svg { animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }

/* ---------- 合照 ---------- */
.photo {
  padding: 48px 28px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.photo-frame {
  margin: 0; width: 100%; max-width: 420px;
  padding: 8px;
  border: 1px solid var(--gold);
  outline: 1px solid var(--gold); outline-offset: 4px;
  background: var(--white);
}
.photo-frame img { display: block; width: 100%; height: auto; }
.photo-caption {
  font-size: 18px; font-style: italic; letter-spacing: 1px; color: var(--wine);
}

/* ---------- 倒数 ---------- */
.countdown {
  padding: 56px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  text-align: center;
}
.countdown .eyebrow { color: var(--gold-text); }
.cd-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; width: 100%;
}
.cd-box {
  border: 1px solid var(--wine);
  padding: 16px 4px;
  display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.cd-num { font-size: 40px; line-height: 1; font-weight: 500; color: var(--wine); }
.cd-label { font-size: 13px; color: var(--gold-text); }
.vow { margin-top: 8px; font-size: 21px; font-style: italic; line-height: 1.35; color: var(--wine); }
.vow-zh { font-size: 15px; letter-spacing: 3px; color: var(--wine); }

/* ---------- 地点 ---------- */
.venue {
  color: var(--gold);
  padding: 52px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  text-align: center;
}
.venue-addr { font-size: 17px; line-height: 1.5; color: var(--gold-light); }
.venue-time { font-size: 14px; letter-spacing: 2px; }
.nav-row { display: flex; gap: 12px; width: 100%; margin-top: 8px; }
.nav-btn {
  flex: 1; height: 48px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--gold); color: var(--gold);
  text-decoration: none; font-size: 15px; letter-spacing: 1px;
}
.nav-btn:hover { background: rgba(230, 201, 138, .12); }
.cal-title { margin-top: 18px; }

/* ---------- 往下滑淡入（有 JS 才隐藏，减少动态效果时不动） ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint svg, .crest { animation: none; }
  .spark { animation: none; opacity: var(--peak, .8); bottom: auto; top: var(--y, 50%); }
  html { scroll-behavior: auto; }
}

/* ---------- 回复表格 ---------- */
.rsvp { padding: 56px 28px; display: flex; flex-direction: column; gap: 22px; }
.rsvp-head { text-align: center; }
.rsvp-head .eyebrow { color: var(--gold-text); }
.rsvp-head h2 { font-size: 38px; font-style: italic; font-weight: 500; color: var(--wine); }
.rsvp-head p.zh { font-size: 14px; }

form { display: flex; flex-direction: column; gap: 18px; }
form[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .label { font-family: var(--serif-zh); font-size: 14px; font-weight: 600; }

input[type="text"], input[type="tel"], textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--wine);
  border-radius: 0;
  background: var(--white);
  color: var(--wine-dark);
  font-size: 16px;
  font-family: var(--serif-en), var(--serif-zh);
}
textarea { padding: 12px 14px; resize: vertical; }
input:focus, textarea:focus, button:focus-visible {
  outline: 2px solid var(--gold-text); outline-offset: 2px;
}

.choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  height: 48px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--wine);
  background: var(--white); color: var(--wine);
  font-family: var(--serif-zh); font-size: 16px;
  cursor: pointer;
}
.choice input:checked + label { background: var(--wine); color: var(--gold-light); }
.choice input:checked + label::after { content: " ✓"; }
.choice input:focus-visible + label { outline: 2px solid var(--gold-text); outline-offset: 2px; }

.counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.counts[hidden] { display: none; }
.stepper {
  height: 48px;
  display: flex; align-items: center;
  border: 1px solid var(--wine); background: var(--white);
}
.stepper button {
  width: 44px; height: 46px;
  border: none; background: transparent;
  color: var(--wine); font-size: 22px; cursor: pointer;
}
.stepper output { flex: 1; text-align: center; font-size: 20px; font-weight: 600; }

.submit {
  height: 54px; border: none;
  background: var(--wine); color: var(--gold-light);
  font-size: 18px; letter-spacing: 3px;
  font-family: var(--serif-zh);
  cursor: pointer;
}
.submit:disabled { opacity: .6; cursor: wait; }

.error { color: #A3122A; font-family: var(--serif-zh); font-size: 14px; }
.error:empty { display: none; }

.card {
  border: 1px solid var(--wine); background: var(--white);
  padding: 36px 24px;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
  text-align: center;
}
.card[hidden] { display: none; }
.card .big { font-size: 34px; font-style: italic; color: var(--wine); }
.card p.zh { font-size: 16px; line-height: 1.6; }
.ghost-btn {
  margin-top: 8px; height: 44px; padding: 0 20px;
  border: 1px solid var(--wine); background: transparent;
  color: var(--wine); font-size: 14px; font-family: var(--serif-zh);
  cursor: pointer;
}

/* ---------- 底部 ---------- */
footer {
  color: var(--gold);
  padding: 40px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
}
footer .mono { font-size: 26px; font-style: italic; }
footer .d { font-size: 13px; letter-spacing: 4px; }

/* ---------- 电脑：中间一张卡片，左右酒红底 ---------- */
@media (min-width: 600px) {
  body {
    background: var(--wine-dark);
    background-image: radial-gradient(circle at 50% 0%, rgba(230, 201, 138, .10), transparent 60%);
    padding: 40px 0;
  }
  .page {
    background: var(--cream);
    box-shadow: 0 0 0 1px rgba(230, 201, 138, .45), 0 0 0 8px var(--wine-dark), 0 0 0 9px rgba(230, 201, 138, .25), 0 30px 80px rgba(0, 0, 0, .45);
  }
  .hero { min-height: 820px; }
}
