/* ==========================================================================
   新岁雅集 · 商务晚宴邀请函
   黑色极简 / 香槟金 / 宋体排版
   ========================================================================== */

:root {
  --ink: #050505;
  --ink-soft: #0b0a09;
  --gold: #c8a86b;
  --gold-lt: #e6d3a6;
  --cream: #f1ece2;
  --muted: #8d8677;
  --line: rgba(200, 168, 107, 0.2);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --latin: "Didot", "Bodoni MT", "Playfair Display", "Times New Roman", serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--serif);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- 分屏 ---------- */

.slide {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(84px, 13vh, 132px) clamp(26px, 6vw, 56px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 78% at 50% 0%, rgba(200, 168, 107, 0.1), transparent 62%);
  pointer-events: none;
}

.slide + .slide::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 42px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(200, 168, 107, 0.45), transparent);
}

.inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

/* ---------- 入场动效 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1.05s var(--ease), transform 1.05s var(--ease);
  transition-delay: calc(var(--d, 0) * 115ms);
}

.is-in .reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 通用文字 ---------- */

.eyebrow {
  margin: 0 0 clamp(18px, 3vh, 26px);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--muted);
}

.h2 {
  margin: 0 0 clamp(22px, 4vh, 34px);
  font-size: clamp(26px, 6.4vw, 36px);
  font-weight: 400;
  letter-spacing: 0.22em;
  line-height: 1.4;
  color: var(--cream);
}

.h2 .spark {
  margin-right: 0.32em;
  font-size: 0.62em;
  vertical-align: 0.16em;
  filter: saturate(0.55) brightness(1.15);
}

.lead {
  margin: 0 0 clamp(26px, 4.4vh, 38px);
  font-size: clamp(14px, 3.7vw, 16px);
  letter-spacing: 0.08em;
  color: rgba(241, 236, 226, 0.62);
  line-height: 2;
}

.note {
  margin: clamp(24px, 4vh, 34px) 0 0;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(241, 236, 226, 0.38);
}

.rule {
  width: min(220px, 54vw);
  height: 1px;
  margin: clamp(26px, 5vh, 44px) auto 0;
  background: linear-gradient(90deg, transparent, rgba(200, 168, 107, 0.8), transparent);
  transform: scaleX(0);
  transition: transform 1.7s var(--ease) 0.15s;
}

.is-in .rule { transform: scaleX(1); }

/* ---------- 01 封面 ---------- */

.slide--cover { text-align: center; }

.cover {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cover .eyebrow {
  margin-bottom: clamp(30px, 7vh, 64px);
  font-size: 10.5px;
  letter-spacing: 0.36em;
  color: rgba(241, 236, 226, 0.7);
}

.cover-title { margin: 0; font-weight: 400; }

.cover-title-cn {
  display: block;
  font-size: clamp(23px, 6.4vw, 40px);
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  line-height: 1.5;
  white-space: nowrap;
}

.cover-title-en {
  display: block;
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.52em;
  text-indent: 0.52em;
  text-transform: uppercase;
  color: var(--muted);
}

.cover-date {
  margin: clamp(20px, 3.6vh, 30px) 0 0;
  font-family: var(--latin);
  font-size: clamp(36px, 12.2vw, 82px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--cream);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .cover-date {
    background: linear-gradient(168deg, #ffffff 6%, #f0e6d2 42%, #c1a06a 96%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.cover-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin: clamp(18px, 3vh, 26px) 0 0;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(241, 236, 226, 0.6);
}

.dot-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.75;
}

.cover-invite {
  margin: clamp(34px, 7vh, 62px) 0 0;
  font-size: clamp(12px, 3.3vw, 14px);
  letter-spacing: 0.88em;
  text-indent: 0.88em;
  color: var(--gold-lt);
}

.vertical {
  position: absolute;
  top: 50%;
  left: clamp(14px, 3vw, 32px);
  transform: translateY(-50%);
  margin: 0;
  writing-mode: vertical-rl;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.6em;
  color: rgba(241, 236, 226, 0.24);
  pointer-events: none;
}

/* ---------- 02 致辞 ---------- */

.letter p {
  margin: 0 0 1.55em;
  font-size: clamp(15px, 4vw, 17.5px);
  line-height: 2.4;
  letter-spacing: 0.055em;
  text-align: justify;
  text-justify: inter-ideograph;
  color: rgba(241, 236, 226, 0.85);
}

.letter p:last-child { margin-bottom: 0; }

.letter p:first-child::first-letter {
  float: left;
  margin: 0.08em 0.14em 0 0;
  font-size: 2.5em;
  line-height: 1;
  color: var(--gold);
}

.sign {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: clamp(30px, 5vh, 46px);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--muted);
}

.sign i {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--line);
}

/* ---------- 03 时 · 地 ---------- */

.info {
  margin-top: clamp(6px, 1.6vh, 14px);
  border-top: 1px solid var(--line);
}

.info-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px 20px;
  padding: clamp(20px, 3.6vh, 30px) 0;
  border-bottom: 1px solid var(--line);
}

.info-k {
  padding-top: 7px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--muted);
}

.info-v { font-size: clamp(14px, 3.8vw, 16px); }

.info-v strong {
  display: block;
  font-weight: 400;
  font-size: clamp(16px, 4.2vw, 20px);
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: var(--cream);
}

.info-v em {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  color: rgba(241, 236, 226, 0.5);
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.mini {
  padding: 9px 20px;
  border: 1px solid rgba(200, 168, 107, 0.26);
  background: transparent;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: rgba(241, 236, 226, 0.72);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.4s, color 0.4s, background 0.4s;
}

.mini:hover,
.mini:focus-visible {
  border-color: rgba(200, 168, 107, 0.7);
  color: var(--gold-lt);
  background: rgba(200, 168, 107, 0.06);
  outline: none;
}

/* ---------- 04 回执 ---------- */

.form {
  display: flex;
  flex-direction: column;
  gap: clamp(26px, 4.4vh, 38px);
  margin-top: clamp(4px, 1vh, 10px);
}

.field-label {
  display: block;
  margin-bottom: 14px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.text-input {
  width: 100%;
  padding: 6px 2px 14px;
  border: 0;
  border-bottom: 1px solid rgba(241, 236, 226, 0.22);
  border-radius: 0;
  background: transparent;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.12em;
  color: var(--cream);
  outline: none;
  transition: border-color 0.45s;
  -webkit-appearance: none;
  appearance: none;
}

.text-input::placeholder {
  font-size: 15px;
  letter-spacing: 0.14em;
  color: rgba(241, 236, 226, 0.22);
}

.text-input:focus { border-bottom-color: var(--gold); }

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.seg {
  padding: 15px 8px;
  border: 1px solid rgba(241, 236, 226, 0.16);
  background: transparent;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.12em;
  line-height: 1.7;
  color: rgba(241, 236, 226, 0.55);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.4s, color 0.4s, background 0.4s, box-shadow 0.4s;
  -webkit-tap-highlight-color: transparent;
}

.seg b {
  display: block;
  margin-bottom: 3px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: inherit;
}

.seg.is-active {
  border-color: rgba(200, 168, 107, 0.72);
  background: rgba(200, 168, 107, 0.07);
  box-shadow: inset 0 0 24px rgba(200, 168, 107, 0.08);
  color: var(--gold-lt);
}

.hint {
  margin: 12px 0 0;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.8;
  color: rgba(241, 236, 226, 0.36);
}

.cta {
  display: block;
  width: 100%;
  padding: 18px;
  border: 0;
  background: linear-gradient(96deg, #c2a066, #e7d6ad 52%, #c2a066);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.46em;
  text-indent: 0.46em;
  color: #100e0a;
  cursor: pointer;
  transition: filter 0.4s, opacity 0.4s;
  -webkit-tap-highlight-color: transparent;
}

.cta:hover:not([disabled]) { filter: brightness(1.07); }

.cta[disabled] {
  cursor: not-allowed;
  opacity: 0.42;
  filter: saturate(0.3);
}

.cta.is-busy { opacity: 0.72; }

.cta.is-busy .cta-label::after {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-left: 12px;
  border: 1px solid rgba(16, 14, 10, 0.35);
  border-top-color: rgba(16, 14, 10, 0.95);
  border-radius: 50%;
  vertical-align: -1px;
  animation: spin 0.75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.form-msg {
  min-height: 22px;
  margin: 14px 0 0;
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  line-height: 1.8;
  color: var(--gold-lt);
}

.form-msg.is-err { color: #dd8a76; }

.form-msg a {
  color: var(--gold-lt);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 05 完成 ---------- */

.done-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: clamp(24px, 4vh, 36px);
  border: 1px solid rgba(200, 168, 107, 0.45);
  border-radius: 50%;
}

.done-mark svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
}

.is-in .done-mark svg {
  animation: draw 1.1s cubic-bezier(0.6, 0.05, 0.2, 1) 0.35s forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }

.summary {
  display: grid;
  gap: 11px;
  margin: clamp(20px, 3.6vh, 30px) 0;
  padding: 20px 22px;
  border: 1px solid var(--line);
}

.summary[hidden] { display: none; }

.summary > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(241, 236, 226, 0.78);
}

.summary > div > span:first-child {
  flex: none;
  font-size: 9.5px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.done-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: clamp(22px, 4vh, 34px);
}

.ghost {
  width: 100%;
  max-width: 340px;
  padding: 16px 20px;
  border: 1px solid rgba(200, 168, 107, 0.42);
  background: transparent;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: var(--gold-lt);
  cursor: pointer;
  transition: background 0.4s, color 0.4s, border-color 0.4s;
}

.ghost:hover {
  background: rgba(200, 168, 107, 0.9);
  border-color: rgba(200, 168, 107, 0.9);
  color: #100e0a;
}

.link {
  padding: 4px;
  border: 0;
  background: none;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: rgba(241, 236, 226, 0.38);
  cursor: pointer;
  transition: color 0.4s;
}

.link:hover { color: rgba(241, 236, 226, 0.7); }

/* ---------- 固定层 ---------- */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 70;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(200, 168, 107, 0.15), var(--gold));
  transition: width 0.55s var(--ease);
}

.counter {
  position: fixed;
  top: max(20px, env(safe-area-inset-top));
  right: clamp(18px, 5vw, 40px);
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--latin);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(241, 236, 226, 0.34);
  pointer-events: none;
}

.counter #counterCur { color: rgba(200, 168, 107, 0.9); }

.counter i {
  display: block;
  width: 14px;
  height: 1px;
  background: rgba(241, 236, 226, 0.22);
}

.dots {
  position: fixed;
  top: 50%;
  right: clamp(12px, 2.6vw, 26px);
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translateY(-50%);
}

.dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 1px solid rgba(200, 168, 107, 0.42);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background 0.4s, border-color 0.4s, transform 0.4s, box-shadow 0.4s;
  -webkit-tap-highlight-color: transparent;
}

.dot.is-active {
  border-color: var(--gold);
  background: var(--gold);
  transform: scale(1.18);
  box-shadow: 0 0 12px rgba(200, 168, 107, 0.55);
}

.pager {
  position: fixed;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  border: 1px solid rgba(200, 168, 107, 0.2);
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.66);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  color: rgba(241, 236, 226, 0.82);
  cursor: pointer;
  transform: translateX(-50%);
  transition: opacity 0.45s, border-color 0.45s, color 0.45s, transform 0.45s;
  -webkit-tap-highlight-color: transparent;
}

.pager:hover {
  border-color: rgba(200, 168, 107, 0.6);
  color: var(--gold-lt);
}

.pager svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: nudge 2.6s var(--ease) infinite;
}

.pager.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
}

@keyframes nudge {
  0%, 68%, 100% { transform: translateY(0); }
  82% { transform: translateY(4px); }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.048;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.noscript {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 80;
  width: 100%;
  margin: 0;
  padding: 12px;
  background: #14100a;
  font-size: 12px;
  text-align: center;
  color: var(--gold-lt);
}

/* ---------- 响应式 ---------- */

@media (max-width: 520px) {
  .info-row { grid-template-columns: 1fr; gap: 8px; padding: 22px 0; }
  .info-k { padding-top: 0; }
  .seg { padding: 13px 6px; }
  .pager { padding: 11px 20px; letter-spacing: 0.24em; }
  .dots { gap: 11px; }
  .dot { width: 5px; height: 5px; }
  .vertical { display: none; }
  .cover-title-en { font-size: 8.5px; letter-spacing: 0.34em; text-indent: 0.34em; }
  .cover-invite { letter-spacing: 0.7em; text-indent: 0.7em; }
}

@media (max-width: 370px) {
  .cover-meta { font-size: 9.5px; letter-spacing: 0.2em; gap: 9px; }
  .segmented { grid-template-columns: 1fr; }
}

@media (min-width: 900px) {
  .slide { padding-left: clamp(56px, 7vw, 96px); padding-right: clamp(56px, 7vw, 96px); }
}

@media (max-height: 720px) {
  .slide { padding-top: 68px; padding-bottom: 78px; }
  .eyebrow { margin-bottom: 12px; }
  .h2 { margin-bottom: 16px; }
  .lead { margin-bottom: 20px; line-height: 1.8; }
  .form { gap: 18px; }
  .cover-invite { margin-top: 26px; }
  .cover .eyebrow { margin-bottom: 22px; }
  .letter p { line-height: 2.15; }
  .info-row { padding: 16px 0; }
}
