:root {
  --paper: #f4f0ea;
  --paper-light: #fffdf9;
  --ink: #272825;
  --muted: #746d65;
  --line: rgba(55, 49, 43, 0.22);
  --forest: #173a30;
  --forest-light: #dfe8df;
  --celebration: #9d302f;
  --celebration-dark: #6f1f22;
  --gold: #ad8653;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  text-rendering: optimizeLegibility;
}

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

.music-control {
  position: fixed;
  z-index: 20;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 50%;
  background: rgba(30, 35, 31, 0.7);
  color: #fffdf8;
  box-shadow: 0 5px 18px rgba(22, 29, 24, 0.2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(8px);
}

.music-control:focus-visible {
  outline: 2px solid #fffdf8;
  outline-offset: 3px;
}

.music-record {
  position: relative;
  display: grid;
  width: 1.65rem;
  height: 1.65rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.music-record::after {
  position: absolute;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: #fffdf8;
  content: "";
}

.music-note {
  position: relative;
  z-index: 1;
  font-family: Georgia, serif;
  font-size: 0.7rem;
  line-height: 1;
  transform: translate(0.42rem, -0.38rem);
}

.music-control.is-playing .music-record {
  animation: recordSpin 8s linear infinite;
}

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

figure,
h1,
h2,
p {
  margin-top: 0;
}

.section-pad {
  padding: 7.5rem max(1.5rem, calc((100% - 1120px) / 2));
}

.eyebrow,
.section-number,
.warm-main figcaption span,
.location-label {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-number {
  color: var(--muted);
}

.hero,
.closing {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}

.hero > img,
.closing > img {
  height: 100svh;
  object-fit: cover;
}

.hero > img {
  object-position: 52% center;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: rgba(43, 32, 24, 0.06);
}

.hero-copy {
  position: absolute;
  top: 4.5rem;
  left: max(1.5rem, calc((100% - 1120px) / 2));
  color: #382b25;
}

.hero h1 {
  margin: 1.1rem 0 1rem;
  font-size: 3rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero h1 i {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.7em;
  font-weight: 400;
}

.date {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.82rem;
  letter-spacing: 0;
}

.scroll-cue {
  position: absolute;
  z-index: 2;
  bottom: 2rem;
  left: 50%;
  width: 1.75rem;
  height: 2.5rem;
  transform: translateX(-50%);
}

.scroll-cue-arrow {
  position: absolute;
  top: 0;
  left: 0.45rem;
  width: 0.9rem;
  height: 0.9rem;
  border-right: 1px solid rgba(56, 43, 37, 0.82);
  border-bottom: 1px solid rgba(56, 43, 37, 0.82);
  animation: cueDown 1.8s ease-in-out infinite;
}

.scroll-cue-arrow:last-child {
  top: 0.8rem;
  animation-delay: 180ms;
}

@keyframes cueDown {
  0%, 100% {
    opacity: 0.18;
    transform: translateY(-4px) rotate(45deg);
  }

  48% {
    opacity: 0.92;
    transform: translateY(4px) rotate(45deg);
  }
}

.opening {
  display: grid;
  min-height: 70vh;
  grid-template-columns: 0.75fr minmax(300px, 1.25fr);
  gap: 4rem;
  align-items: start;
}

.opening-copy {
  padding-top: 6.5rem;
}

.opening-quote,
.portrait-caption,
.cinema-heading h2,
.chinese-heading h2,
.details h2 {
  margin: 0;
  font-size: 3.4rem;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
}

.opening-body {
  margin: 2.5rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 2.1;
}

.portrait-story {
  display: grid;
  grid-template-columns: 0.45fr minmax(320px, 500px) 1fr;
  gap: 3rem;
  align-items: center;
  background: var(--paper-light);
}

.portrait-story > .section-number {
  align-self: start;
}

.formal-portrait {
  margin: 0;
  overflow: hidden;
}

.formal-portrait img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.portrait-caption {
  max-width: 11em;
  font-size: 2rem;
  line-height: 1.7;
}

.warm-story {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 9rem 4rem 10rem;
}

.warm-story figure {
  margin: 0;
}

.warm-main {
  position: relative;
  width: 78%;
}

.warm-main img,
.warm-secondary img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.warm-main figcaption {
  position: absolute;
  right: -14rem;
  bottom: 1.5rem;
  width: 12rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--gold);
}

.warm-main figcaption span {
  display: block;
  color: var(--muted);
}

.warm-main figcaption strong {
  display: block;
  margin-top: 1.25rem;
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1.65;
}

.warm-secondary {
  width: 58%;
  margin: 3rem 0 0 auto !important;
}

.cinema-story {
  padding-bottom: 7rem;
  background: var(--forest);
  color: #f2f2ea;
}

.cinema-heading {
  min-height: 55vh;
}

.cinema-story .section-number {
  color: rgba(242, 242, 234, 0.62);
}

.cinema-heading h2 {
  max-width: 760px;
  margin-top: 6rem;
}

.cinema-wide,
.cinema-pair {
  width: min(calc(100% - 3rem), 1180px);
  margin-right: auto;
  margin-left: auto;
}

.cinema-wide {
  margin-bottom: 2rem;
  overflow: hidden;
}

.cinema-wide img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.cinema-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.cinema-pair figure {
  margin: 0;
  overflow: hidden;
}

.cinema-pair img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.chinese-story {
  padding-bottom: 6.5rem;
  background: var(--celebration);
  color: #fff7ee;
}

.chinese-heading {
  display: grid;
  min-height: 45vh;
  grid-template-columns: 0.7fr 1.3fr;
  align-items: end;
}

.chinese-story .section-number {
  align-self: start;
  color: rgba(255, 247, 238, 0.67);
}

.chinese-heading h2 {
  font-size: 3rem;
}

.qipao-wide,
.qipao-pair {
  width: min(calc(100% - 3rem), 1080px);
  margin-right: auto;
  margin-left: auto;
}

.qipao-wide {
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.qipao-wide img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.qipao-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.qipao-pair figure {
  margin: 0;
  overflow: hidden;
}

.qipao-pair img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.white-editorial {
  background: var(--paper-light);
}

.editorial-heading,
.warm-heading {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  align-items: end;
  margin-bottom: 4rem;
}

.editorial-heading h2,
.warm-heading h2 {
  margin: 0;
  font-size: 3rem;
  font-weight: 400;
  line-height: 1.45;
}

.editorial-lead,
.warm-panorama,
.warm-finale {
  width: min(100%, 1080px);
  margin: 0 auto;
}

.editorial-duo,
.warm-pair {
  display: grid;
  width: min(100%, 1040px);
  margin: 2rem auto;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: end;
}

.editorial-triptych,
.chinese-triptych {
  display: grid;
  width: min(100%, 1080px);
  margin: 2rem auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.editorial-triptych-offset {
  width: min(92%, 980px);
  margin-top: 3.5rem;
}

.warm-story {
  width: 100%;
  max-width: none;
  padding: 0 0 9rem;
}

.warm-heading {
  width: min(100%, 1120px);
  margin-right: auto;
  margin-left: auto;
}

.cinema-sequence {
  display: grid;
  width: min(calc(100% - 3rem), 1080px);
  margin: 2rem auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.pink-sequence figure:first-child {
  grid-column: 1 / -1;
}

.chinese-story {
  padding-bottom: 8rem;
}

.chinese-heading {
  min-height: 32vh;
  margin-bottom: 4rem;
}

.chinese-wide {
  width: min(100%, 1080px);
  margin: 0 auto 1.5rem !important;
}

.white-editorial figure,
.warm-story figure,
.cinema-story figure,
.chinese-story figure {
  margin: 0;
  overflow: hidden;
}

.white-editorial img,
.warm-story img,
.cinema-story img,
.chinese-story img {
  height: 100%;
  object-fit: cover;
}

.editorial-lead img,
.warm-panorama img,
.warm-finale img,
.chinese-wide img,
.pink-sequence figure:first-child img {
  aspect-ratio: 3 / 2;
}

.editorial-duo img,
.editorial-triptych img,
.warm-pair img,
.chinese-triptych img {
  aspect-ratio: 4 / 5;
}

.cinema-sequence img {
  aspect-ratio: 4 / 3;
}

.album {
  overflow: hidden;
  background: var(--paper-light);
}

.album-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.album-heading h2 {
  margin: 0;
  font-size: 2.35rem;
  font-weight: 400;
  letter-spacing: 0;
}

.photo-rail {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 0 8vw 1rem 0;
  scroll-padding-inline: 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.photo-rail.is-auto-scrolling {
  scroll-snap-type: none;
}

.photo-rail.is-user-active {
  cursor: grabbing;
}

.photo-rail::-webkit-scrollbar {
  display: none;
}

.photo-rail:focus-visible {
  outline: 1px solid var(--forest);
  outline-offset: 6px;
}

.rail-photo {
  flex: 0 0 30%;
  margin: 0;
  overflow: hidden;
  scroll-snap-align: start;
}

.rail-photo img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.details {
  display: grid;
  min-height: 82vh;
  grid-template-columns: 0.75fr 1.25fr;
  grid-template-rows: auto 1fr;
  gap: 3rem;
  align-items: start;
  background: var(--paper-light);
}

.details h2 {
  grid-column: 2;
  margin-top: 5.5rem;
}

.details dl {
  grid-column: 2;
  width: min(100%, 500px);
  margin: 0;
  border-top: 1px solid var(--line);
}

.details dl div {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.details dt,
.details dd {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.85;
}

.details dt {
  color: var(--muted);
}

.location {
  background: #e4e9e4;
}

.location > .section-number {
  margin-bottom: 3rem;
}

.location-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(33, 59, 50, 0.26);
  border-radius: 4px;
  background: var(--paper-light);
}

.real-map {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  background: var(--forest-light);
}

#wedding-map {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 430px;
}

.map-fallback {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 2rem;
  color: var(--forest);
  text-align: center;
}

.map-fallback strong {
  font-size: 1.1rem;
  font-weight: 500;
}

.map-fallback span {
  max-width: 24rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.8;
}

.real-map[data-map-state="ready"] .map-fallback {
  display: none;
}

.location-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem;
}

.location-label {
  color: var(--celebration);
}

.location-copy h2 {
  margin: 1rem 0 1.25rem;
  font-size: 2.35rem;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
}

.location-copy > p:last-of-type {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 2;
}

.location-actions {
  display: flex;
  margin-top: 2.5rem;
}

.location-actions a {
  min-width: 7.2rem;
  padding: 0.85rem 1.2rem;
  border: 1px solid var(--forest);
  border-radius: 2px;
  color: var(--forest);
  font-family: system-ui, sans-serif;
  font-size: 0.86rem;
  text-align: center;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease;
}

.location-actions a:hover,
.location-actions a:focus-visible {
  background: var(--forest-light);
}

.location-actions .primary-action {
  background: var(--forest);
  color: #ffffff;
}

.location-actions .primary-action:hover,
.location-actions .primary-action:focus-visible {
  background: #245346;
}

.closing > img {
  object-position: 58% center;
  filter: saturate(0.88);
}

.closing-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 30, 29, 0.3);
}

.closing-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 1.5rem 5rem;
  color: #fffdf8;
  text-align: center;
}

.closing-copy p {
  margin: 0 0 1.2rem;
  font-size: 0.88rem;
}

.closing-copy h2 {
  margin: 0;
  font-size: 3rem;
  font-weight: 400;
  letter-spacing: 0;
}

.closing-copy span {
  margin-top: 1.4rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.78rem;
}

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

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 900ms ease, transform 900ms ease;
}

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

@media (min-width: 821px) {
  .hero > img {
    object-position: 52% 28%;
  }
}

@media (max-width: 820px) {
  .section-pad {
    padding-top: 5.5rem;
    padding-bottom: 5.5rem;
  }

  .hero-copy {
    top: 3rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .opening {
    display: block;
    min-height: auto;
  }

  .opening-copy {
    padding-top: 4rem;
  }

  .opening-quote,
  .cinema-heading h2,
  .chinese-heading h2,
  .details h2 {
    font-size: 2.5rem;
  }

  .portrait-story {
    grid-template-columns: 0.25fr minmax(270px, 440px);
    gap: 2rem;
  }

  .formal-portrait {
    grid-column: 2;
  }

  .portrait-caption {
    grid-column: 2;
    font-size: 1.7rem;
  }

  .warm-story {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }

  .warm-main {
    width: calc(100% - 7rem);
  }

  .warm-main figcaption {
    right: -7rem;
    width: 6rem;
    padding-left: 0.8rem;
  }

  .warm-main figcaption strong {
    font-size: 1.15rem;
  }

  .warm-secondary {
    width: 72%;
    margin-top: -1.5rem !important;
  }

  .chinese-heading {
    grid-template-columns: 0.5fr 1.5fr;
  }

  .details {
    display: block;
    min-height: auto;
  }

  .details h2 {
    margin: 4rem 0 3.5rem;
  }

  .location-card {
    grid-template-columns: 1fr;
  }

  .real-map {
    min-height: 320px;
  }

  #wedding-map {
    height: 320px;
  }
}

@media (max-width: 560px) {
  .hero > img {
    object-position: 55% center;
  }

  .hero-copy {
    left: 1.5rem;
  }

  .opening-quote,
  .cinema-heading h2,
  .chinese-heading h2,
  .details h2 {
    font-size: 2.1rem;
  }

  .portrait-story {
    display: block;
  }

  .formal-portrait {
    width: 78%;
    margin: 3.5rem 0 0 auto;
  }

  .portrait-caption {
    margin: 2.5rem 0 0;
    max-width: 12em;
    font-size: 1.55rem;
  }

  .warm-story {
    padding-top: 6rem;
    padding-bottom: 7rem;
  }

  .warm-main {
    width: calc(100% - 3rem);
  }

  .warm-main figcaption {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin: 1.5rem 0 0 3rem;
  }

  .warm-main figcaption strong {
    font-size: 1.3rem;
  }

  .warm-secondary {
    width: 82%;
    margin-top: 2.5rem !important;
  }

  .cinema-story {
    padding-bottom: 4.5rem;
  }

  .cinema-heading {
    min-height: 48vh;
  }

  .cinema-heading h2 {
    margin-top: 4rem;
  }

  .cinema-wide,
  .cinema-pair,
  .qipao-wide,
  .qipao-pair {
    width: calc(100% - 2rem);
  }

  .cinema-pair {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .cinema-pair img {
    aspect-ratio: 4 / 3;
  }

  .chinese-story {
    padding-bottom: 4rem;
  }

  .chinese-heading {
    display: block;
    min-height: 40vh;
  }

  .chinese-heading h2 {
    margin-top: 3.5rem;
  }

  .qipao-pair {
    gap: 0.75rem;
  }

  .details dl div {
    grid-template-columns: 3.75rem 1fr;
  }

  .location > .section-number {
    margin-bottom: 2rem;
  }

  .real-map {
    min-height: 260px;
  }

  #wedding-map {
    height: 260px;
  }

  .location-copy {
    padding: 2.25rem 1.5rem 2.5rem;
  }

  .location-copy h2 {
    font-size: 1.8rem;
  }

  .location-actions {
    display: block;
  }

  .location-actions a {
    display: inline-block;
    min-width: 0;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .closing-copy {
    padding-bottom: 3.5rem;
  }

  .closing > img {
    object-position: 56% center;
  }

  .closing-copy h2 {
    font-size: 2.1rem;
  }
}

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

  .js .reveal,
  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .location-actions a {
    transition: none;
  }

  .scroll-cue-arrow {
    opacity: 0.7;
    animation: none;
    transform: rotate(45deg);
  }

  .music-control.is-playing .music-record {
    animation: none;
  }

  .photo-rail,
  .photo-rail.is-auto-scrolling {
    scroll-behavior: auto;
    scroll-snap-type: x mandatory;
  }
}

@media (max-width: 560px) {
  .editorial-heading,
  .warm-heading {
    display: block;
  }

  .editorial-heading h2,
  .warm-heading h2 {
    margin-top: 3.5rem;
    font-size: 2.1rem;
  }

  .editorial-duo,
  .warm-pair,
  .cinema-sequence {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .editorial-triptych,
  .chinese-triptych {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .editorial-triptych figure:first-child,
  .chinese-triptych figure:first-child {
    grid-column: 1 / -1;
  }

  .editorial-triptych-offset {
    width: 100%;
    margin-top: 0.75rem;
  }

  .warm-story {
    padding-bottom: 5.5rem;
  }

  .chinese-heading {
    min-height: 28vh;
  }

  .chinese-wide {
    width: 100%;
  }

  .album {
    padding-right: 0;
  }

  .album-heading {
    padding-right: 1.5rem;
  }

  .photo-rail {
    gap: 0.75rem;
    padding-right: 14vw;
  }

  .rail-photo {
    flex-basis: 84%;
  }
}
