:root {
  --wine: #5a1320;
  --wine-deep: #350b14;
  --wine-soft: #7c2634;
  --ivory: #f6f1e9;
  --ivory-soft: #ebe2d6;
  --gold: #c3a36b;
  --gold-light: #e4cfaa;
  --sage: #677260;
  --ink: #27211f;
  --muted: #7f746c;
  --white: #fffdf9;
  --serif: "Songti SC", "STSong", "SimSun", "Times New Roman", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --latin: "Times New Roman", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #241016;
}

body {
  margin: 0;
  color: var(--ink);
  background: #241016;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  position: relative;
  width: 100%;
  max-width: 560px;
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--ivory);
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.34);
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 22px;
  color: var(--white);
  background: var(--wine-deep);
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-monogram {
  font: 44px/1 var(--latin);
  letter-spacing: 0.1em;
}

.loader-monogram span {
  color: var(--gold-light);
  font-style: italic;
}

.loader-line {
  width: 110px;
  height: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
}

.loader-line span {
  display: block;
  width: 45%;
  height: 100%;
  background: var(--gold-light);
  animation: loading 1.2s ease-in-out infinite;
}

@keyframes loading {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(250%); }
}

.floating-actions {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, calc((100vw - 560px) / 2 + 16px));
  z-index: 30;
  display: flex;
  gap: 9px;
}

.icon-button {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: var(--white);
  background: rgba(29, 14, 18, 0.35);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button.is-active {
  color: var(--wine-deep);
  background: var(--gold-light);
  border-color: var(--gold-light);
}

.sound-wave {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: none;
  align-items: flex-end;
  gap: 1px;
  width: 13px;
  height: 13px;
  padding: 2px;
  border-radius: 50%;
  background: var(--lime, #d9f36a);
}

.icon-button.is-active .sound-wave {
  display: flex;
}

.sound-wave i {
  width: 2px;
  background: var(--wine-deep);
  animation: sound 0.8s ease-in-out infinite alternate;
}

.sound-wave i:nth-child(1) { height: 4px; }
.sound-wave i:nth-child(2) { height: 7px; animation-delay: 0.15s; }
.sound-wave i:nth-child(3) { height: 5px; animation-delay: 0.3s; }

@keyframes sound {
  to { height: 9px; }
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  color: var(--white);
  background: var(--wine-deep);
}

.hero-image {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(30, 7, 13, 0.46) 0%, rgba(30, 7, 13, 0.14) 32%, rgba(30, 7, 13, 0.82) 100%),
    linear-gradient(90deg, rgba(80, 18, 31, 0.32), transparent 72%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 15px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.18;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
}

.hero-content {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 112px;
  z-index: 3;
  text-align: center;
}

.hero-eyebrow,
.section-overline {
  margin: 0;
  color: var(--gold-light);
  font: 700 10px/1.4 var(--latin);
  letter-spacing: 0.24em;
}

.hero-monogram {
  margin: 12px 0 10px;
  font: 34px/1 var(--latin);
  letter-spacing: 0.12em;
}

.hero-monogram span {
  color: var(--gold-light);
  font-style: italic;
}

.hero-kicker {
  margin: 0 0 11px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
}

.hero-names {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 8vw, 40px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.4);
}

.hero-names i {
  color: var(--gold-light);
  font: 25px/1 var(--latin);
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  font: 700 11px/1 var(--latin);
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.86);
}

.hero-meta i {
  width: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.45);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 10px;
  letter-spacing: 0.18em;
  transform: translateX(-50%);
}

.scroll-cue i {
  position: relative;
  display: block;
  width: 1px;
  height: 34px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.24);
}

.scroll-cue i::after {
  content: "";
  position: absolute;
  top: -40%;
  left: 0;
  width: 100%;
  height: 40%;
  background: var(--gold-light);
  animation: scrollLine 1.7s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { transform: translateY(0); }
  100% { transform: translateY(240%); }
}

.section {
  position: relative;
  padding: 88px 38px;
}

.section-title {
  margin: 16px 0 0;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.08em;
}

.section-title.light,
.section-overline.light {
  color: var(--white);
}

.invitation-section {
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(195, 163, 107, 0.16), transparent 38%),
    var(--ivory);
}

.invitation-section::before,
.invitation-section::after {
  content: "囍";
  position: absolute;
  color: rgba(90, 19, 32, 0.035);
  font-family: var(--serif);
  font-size: 170px;
  line-height: 1;
}

.invitation-section::before {
  left: -45px;
  top: 85px;
  transform: rotate(-8deg);
}

.invitation-section::after {
  right: -55px;
  bottom: 8px;
  transform: rotate(7deg);
}

.section-ornament {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 28px;
}

.section-ornament span {
  width: 45px;
  height: 1px;
  background: var(--gold);
}

.section-ornament b {
  color: var(--wine);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
}

.invitation-section .section-title {
  position: relative;
  z-index: 1;
  color: var(--wine);
  font-size: 39px;
}

.invitation-copy {
  position: relative;
  z-index: 1;
  margin: 28px 0 0;
  color: #5f5650;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.05em;
}

.invitation-sign {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin: 44px auto 0;
  width: 100%;
  max-width: 360px;
}

.invitation-person {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
}

.invitation-person span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.2em;
  line-height: 1;
}

.invitation-person strong {
  color: var(--wine);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.invitation-sign i {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  color: var(--gold);
  font: 22px/1.2 var(--latin);
}

.invitation-note {
  position: relative;
  z-index: 1;
  margin: 35px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.08em;
}

.date-section {
  overflow: hidden;
  color: var(--white);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%) -28px 0 / 56px 56px,
    linear-gradient(225deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%) -28px 0 / 56px 56px,
    var(--wine);
}

.date-section::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 22px;
  bottom: 22px;
  border: 1px solid rgba(228, 207, 170, 0.28);
  pointer-events: none;
}

.date-backdrop {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.date-backdrop span {
  color: rgba(255, 255, 255, 0.035);
  font: 900 150px/1 var(--latin);
  letter-spacing: -0.05em;
  transform: rotate(-7deg) scale(1.3);
}

.date-lockup {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 34px;
}

.date-year,
.date-week {
  display: flex;
  flex-direction: column;
  color: var(--gold-light);
  font: 700 11px/1.6 var(--latin);
  letter-spacing: 0.16em;
}

.date-week {
  align-items: flex-start;
}

.date-week span:last-child {
  color: rgba(255, 255, 255, 0.54);
  font-size: 8px;
}

.date-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.date-main span {
  font-family: var(--serif);
  font-size: 22px;
}

.date-main strong {
  font: 400 74px/0.85 var(--latin);
}

.countdown {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 38px;
}

.countdown div {
  display: flex;
  flex-direction: column;
  min-width: 52px;
}

.countdown strong {
  font: 400 23px/1 var(--latin);
  letter-spacing: 0.04em;
}

.countdown span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.countdown i {
  width: 3px;
  height: 3px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--gold-light);
}

.outline-button,
.solid-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 36px;
  padding: 0 20px;
  border: 1px solid rgba(228, 207, 170, 0.54);
  color: var(--gold-light);
  background: transparent;
  font-size: 12px;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.outline-button svg,
.solid-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.story-section {
  padding-bottom: 42px;
  background: var(--ivory);
}

.story-intro {
  text-align: center;
}

.story-intro .section-title {
  color: var(--wine);
}

.story-copy {
  margin: 24px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.05em;
}

.story-collage {
  position: relative;
  margin: 52px -38px 0;
  height: 610px;
}

.story-photo {
  position: absolute;
  margin: 0;
  overflow: hidden;
  background: var(--ivory-soft);
}

.story-photo img {
  height: 100%;
  object-fit: cover;
}

.story-photo-main {
  left: 0;
  top: 0;
  width: 77%;
  height: 475px;
}

.story-photo-main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(54, 10, 18, 0.22));
}

.story-photo-small {
  right: 0;
  bottom: 50px;
  width: 44%;
  height: 260px;
  border: 8px solid var(--ivory);
}

.story-quote {
  position: absolute;
  left: 24px;
  bottom: 15px;
  width: 64%;
  color: var(--wine);
}

.story-quote span {
  display: block;
  height: 18px;
  color: var(--gold);
  font: 38px/1 var(--latin);
}

.story-quote span:last-child {
  height: auto;
  text-align: right;
}

.story-quote p {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.8;
  letter-spacing: 0.05em;
}

.gallery-section {
  padding-right: 0;
  padding-left: 0;
  background: var(--ivory);
}

.gallery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 0 38px;
}

.gallery-heading .section-title {
  color: var(--wine);
}

.gallery-tip {
  flex: none;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.gallery-track {
  display: flex;
  gap: 14px;
  margin-top: 38px;
  padding: 0 38px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-item {
  position: relative;
  flex: 0 0 76%;
  height: 455px;
  margin: 0;
  overflow: hidden;
  scroll-snap-align: center;
  background: var(--ivory-soft);
}

.gallery-item img {
  height: 100%;
  object-fit: cover;
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 58%, rgba(34, 10, 16, 0.66));
}

.gallery-item figcaption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  z-index: 1;
  color: var(--white);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.venue-section {
  padding: 0;
  color: var(--white);
  background: var(--wine-deep);
}

.venue-image {
  position: relative;
  height: 330px;
  overflow: hidden;
}

.venue-image img {
  height: 100%;
  object-fit: cover;
}

.venue-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(35, 9, 15, 0.08), var(--wine-deep));
}

.venue-image span {
  position: absolute;
  left: 38px;
  bottom: 25px;
  z-index: 1;
  color: var(--gold-light);
  font: 700 10px/1 var(--latin);
  letter-spacing: 0.22em;
}

.venue-content {
  position: relative;
  padding: 68px 38px 84px;
}

.venue-content::before {
  content: "";
  position: absolute;
  left: 38px;
  top: 0;
  width: 90px;
  height: 2px;
  background: var(--gold);
}

.venue-list {
  margin: 34px 0 0;
}

.venue-list div {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.venue-list dt {
  color: var(--gold-light);
  font-size: 11px;
  letter-spacing: 0.15em;
}

.venue-list dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: 0.04em;
}

.solid-button {
  width: 100%;
  margin-top: 34px;
  color: var(--wine-deep);
  background: var(--gold-light);
  border-color: var(--gold-light);
  font-weight: 700;
}

.wedding-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 76px 38px calc(58px + env(safe-area-inset-bottom));
  color: var(--white);
  text-align: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 100% 36px,
    var(--wine);
}

.footer-monogram {
  font: 38px/1 var(--latin);
  letter-spacing: 0.12em;
}

.footer-monogram span {
  color: var(--gold-light);
  font-style: italic;
}

.wedding-footer p {
  margin: 23px 0 10px;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.08em;
}

.wedding-footer > span {
  color: rgba(255, 255, 255, 0.58);
  font: 700 9px/1.5 var(--latin);
  letter-spacing: 0.2em;
}

.share-text-button {
  margin-top: 34px;
  padding: 0 0 5px;
  border: 0;
  border-bottom: 1px solid rgba(228, 207, 170, 0.6);
  color: var(--gold-light);
  background: transparent;
  font-size: 11px;
  letter-spacing: 0.15em;
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 50;
  max-width: calc(100vw - 48px);
  padding: 11px 16px;
  border-radius: 2px;
  color: var(--white);
  background: rgba(44, 15, 22, 0.92);
  font-size: 12px;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: 0.3s ease;
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 390px) {
  .section {
    padding-right: 30px;
    padding-left: 30px;
  }

  .hero-content {
    left: 32px;
    right: 32px;
  }

  .hero-names {
    gap: 9px;
    font-size: 28px;
  }

  .hero-names i {
    font-size: 20px;
  }

  .story-collage {
    margin-right: -30px;
    margin-left: -30px;
  }

  .gallery-heading {
    padding-right: 30px;
    padding-left: 30px;
  }

  .gallery-track {
    padding-right: 30px;
    padding-left: 30px;
  }

  .venue-content {
    padding-right: 30px;
    padding-left: 30px;
  }
}

@media (min-width: 700px) {
  .hero,
  .section {
    padding-left: 48px;
    padding-right: 48px;
  }

  .floating-actions {
    right: calc((100vw - 560px) / 2 + 18px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
