:root {
  --ivory: #f7f2e9;
  --paper: #fbf8f2;
  --ink: #2b2322;
  --muted: #82736d;
  --burgundy: #762c3b;
  --burgundy-deep: #511e2b;
  --wine: #3a1d24;
  --gold: #c7934b;
  --line: rgba(118, 44, 59, .2);
  --serif: "Songti SC", "Noto Serif CJK SC", "STSong", serif;
  --sans: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --script: "Xingkai SC", "STKaiti", "Kaiti SC", "Songti SC", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ivory); }
body { margin: 0; color: var(--ink); background: var(--ivory); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, a { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.site-shell { overflow: hidden; position: relative; }
.music-control { position: fixed; z-index: 20; top: max(24px, env(safe-area-inset-top)); right: clamp(16px, 4vw, 54px); display: flex; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 9px 16px 9px 9px; color: #fffaf3; background: rgba(51, 25, 31, .64); backdrop-filter: blur(14px); box-shadow: 0 8px 26px rgba(35, 14, 20, .16); transition: background .25s, transform .25s; }
.music-control:hover { background: rgba(101, 39, 54, .85); transform: translateY(-2px); }
.music-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--burgundy-deep); background: #f6eee2; font-family: Georgia, serif; font-size: 21px; }
.music-copy { display: grid; text-align: left; line-height: 1.1; }
.music-copy strong { font-size: 13px; font-weight: 600; letter-spacing: .08em; }
.music-copy small { margin-top: 3px; color: rgba(255,250,243,.78); font-size: 11px; }
.music-control.is-playing .music-icon { animation: pulse 1.7s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(.9); } }

.hero { position: relative; min-height: min(930px, 100svh); display: grid; align-items: end; color: #fffaf2; isolation: isolate; }
.hero-photo { position: absolute; z-index: -3; inset: 0; background: url('./assets/images/01-hero-bride.jpg') 64% center / cover no-repeat; }
.hero-shade { position: absolute; z-index: -2; inset: 0; background: linear-gradient(90deg, rgba(47, 20, 23, .78) 0%, rgba(54, 25, 28, .43) 44%, rgba(28, 14, 18, .12) 100%), linear-gradient(0deg, rgba(35, 14, 20, .68) 0%, transparent 57%); }
.hero-grain { position: absolute; z-index: -1; inset: 0; opacity: .16; background-image: url('./assets/images/paper-fiber-ivory.webp'); mix-blend-mode: soft-light; }
.hero-content { width: min(1200px, calc(100% - 64px)); margin: 0 auto; padding: 90px 0 58px; }
.eyebrow { margin: 0 0 18px; font-size: 13px; font-weight: 600; letter-spacing: .2em; }
.script-accent { font-family: var(--script); font-size: 19px; font-weight: 400; letter-spacing: .14em; }
.eyebrow.burgundy { color: var(--burgundy); }
.eyebrow.light { color: rgba(255,250,243,.75); }
.hero-kicker { margin: 0 0 8px; color: #f2d8a5; font-size: 17px; letter-spacing: .12em; }
.hero h1 { max-width: 650px; margin: 0; font-family: var(--serif); font-size: clamp(70px, 10vw, 146px); font-weight: 400; line-height: .97; letter-spacing: .04em; text-shadow: 0 5px 25px rgba(20,7,11,.2); }
.hero h1 em { color: #f3d6a1; font-style: normal; }
.hero-lead { margin: 34px 0 34px; color: rgba(255,250,243,.88); font-family: var(--serif); font-size: clamp(20px, 2.3vw, 29px); line-height: 1.8; letter-spacing: .06em; }
.hero-meta { display: flex; gap: 0; width: min(700px, 100%); border-top: 1px solid rgba(255,255,255,.38); padding-top: 22px; }
.hero-meta > div { min-width: 230px; padding-right: 30px; }
.hero-meta > div + div { border-left: 1px solid rgba(255,255,255,.3); padding-left: 30px; }
.hero-meta span, .hero-meta small { display: block; color: rgba(255,250,243,.76); font-size: 12px; letter-spacing: .12em; }
.hero-meta strong { display: block; margin: 7px 0 3px; color: #fffaf2; font-size: 23px; font-weight: 500; }
.hero-meta small { font-size: 12px; letter-spacing: .06em; }
.scroll-button { display: inline-flex; align-items: center; gap: 17px; margin-top: 42px; padding: 0; border: 0; color: #fffaf3; background: none; font-size: 13px; letter-spacing: .12em; }
.scroll-button i { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.6); border-radius: 50%; font-style: normal; font-size: 20px; transition: background .25s, color .25s, transform .25s; }
.scroll-button:hover i { color: var(--burgundy); background: #fffaf3; transform: translateY(4px); }

.paper-section { position: relative; background: var(--paper); background-image: linear-gradient(rgba(251,248,242,.93), rgba(251,248,242,.93)), url('./assets/images/paper-fiber-ivory.webp'); }
.section-inner { width: min(1200px, calc(100% - 64px)); margin: 0 auto; }
.section-inner.narrow { width: min(720px, calc(100% - 64px)); }
.welcome { padding: 142px 0 128px; text-align: center; }
.welcome h2, .closing h2 { margin: 0; font-family: var(--serif); font-size: clamp(43px, 6vw, 74px); font-weight: 400; line-height: 1.24; letter-spacing: .05em; }
.welcome h2 span, .closing h2 span { color: var(--burgundy); }
.ornament { margin: 34px 0 30px; color: var(--gold); font-size: 21px; }
.body-copy { margin: 0 auto; color: var(--muted); font-family: var(--serif); font-size: 19px; line-height: 2.05; letter-spacing: .08em; }
.signature { margin: 35px 0 0; color: var(--burgundy); font-size: 12px; letter-spacing: .2em; }

.photo-story { padding: 0 0 135px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.section-heading h2 { margin: 0; font-family: var(--serif); font-size: clamp(38px, 5vw, 62px); font-weight: 400; letter-spacing: .06em; }
.heading-note { padding-bottom: 8px; color: var(--muted); font-size: 13px; letter-spacing: .08em; }
.photo-rail { display: flex; gap: 18px; overflow-x: auto; padding: 4px 2px 22px; scrollbar-width: thin; scrollbar-color: rgba(118,44,59,.42) transparent; scroll-snap-type: x mandatory; }
.photo-rail::-webkit-scrollbar { height: 5px; }
.photo-rail::-webkit-scrollbar-thumb { background: rgba(118,44,59,.38); border-radius: 99px; }
.photo-card { position: relative; flex: 0 0 clamp(260px, 28vw, 360px); padding: 0; border: 0; overflow: hidden; border-radius: 2px; background: #e4d8c9; scroll-snap-align: start; box-shadow: 0 18px 35px rgba(74,39,36,.13); text-align: left; }
.photo-card-wide { flex-basis: clamp(310px, 37vw, 470px); }
.photo-card img { display: block; width: 100%; height: 390px; object-fit: cover; transition: transform .6s ease; }
.photo-card-wide img { height: 315px; }
.photo-card:hover img { transform: scale(1.035); }
.photo-card span { position: absolute; left: 17px; bottom: 15px; color: #fffaf3; font-size: 12px; letter-spacing: .1em; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.photo-card::after { content: ''; position: absolute; inset: 38% 0 0; background: linear-gradient(transparent, rgba(28,13,17,.58)); pointer-events: none; }
.rail-hint { display: flex; justify-content: center; gap: 6px; margin-top: 5px; }
.rail-hint span { width: 4px; height: 4px; border-radius: 50%; background: #cfbbb0; }
.rail-hint span:first-child { width: 24px; border-radius: 9px; background: var(--burgundy); }

.event-section { position: relative; padding: 145px 0 155px; color: #fffaf3; isolation: isolate; }
.event-backdrop { position: absolute; z-index: -2; inset: 0; background: linear-gradient(120deg, rgba(71,28,39,.98), rgba(112,40,54,.92)), url('./assets/images/04-qipao.jpg') center / cover; background-blend-mode: multiply; }
.event-section::after { content: ''; position: absolute; z-index: -1; inset: 0; opacity: .16; background: url('./assets/images/paper-fiber-ivory.webp'); mix-blend-mode: soft-light; }
.event-section h2 { margin: 0 0 55px; font-family: var(--serif); font-size: clamp(49px, 7vw, 88px); font-weight: 400; line-height: 1.14; letter-spacing: .04em; }
.event-section h2 em { color: #f1cb88; font-style: normal; }
.event-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 860px; }
.event-card { position: relative; min-height: 250px; padding: 29px 30px; border: 1px solid rgba(255,245,229,.28); background: rgba(45, 17, 25, .25); }
.event-card .event-number { position: absolute; top: 25px; right: 26px; color: rgba(255,245,229,.45); font-family: Georgia, serif; font-size: 17px; font-style: italic; }
.event-card h3 { margin: 38px 0 16px; font-family: var(--serif); font-size: clamp(25px, 3vw, 36px); font-weight: 400; }
.event-card p:not(.eyebrow) { margin: 0; color: rgba(255,250,243,.83); font-family: var(--serif); font-size: 18px; line-height: 1.9; }
.event-card small { color: rgba(255,250,243,.7); font-size: 14px; }
.map-button { display: inline-flex; align-items: center; gap: 19px; margin-top: 35px; padding: 14px 20px; border: 1px solid rgba(255,245,229,.54); color: #fffaf3; text-decoration: none; font-size: 13px; letter-spacing: .1em; transition: background .25s, color .25s; }
.map-button span { font-size: 18px; }
.map-button:hover { color: var(--burgundy); background: #fffaf3; }

.closing { padding: 135px 0 150px; text-align: center; }
.closing .body-copy { max-width: 610px; margin-top: 35px; }
.closing-line { display: flex; align-items: center; gap: 18px; margin-top: 44px; color: var(--burgundy); font-size: 12px; letter-spacing: .18em; }
.closing-line span { flex: 1; height: 1px; background: var(--line); }
.site-footer { padding: 60px 24px max(60px, env(safe-area-inset-bottom)); color: rgba(255,250,243,.72); background: var(--wine); text-align: center; font-family: var(--serif); font-size: 14px; letter-spacing: .12em; }
.footer-names { margin: 0 0 17px; color: #f2d19a; font-size: 24px; letter-spacing: .14em; }
.footer-names span { color: rgba(255,250,243,.5); font-family: Georgia, serif; font-style: italic; }
.site-footer p { margin: 8px 0; }
.site-footer .footer-small { margin-top: 28px; color: rgba(255,250,243,.48); font-size: 12px; }

.lightbox { width: min(920px, calc(100% - 30px)); max-width: none; padding: 16px; border: 0; color: #fffaf3; background: rgba(29, 13, 18, .97); box-shadow: 0 20px 80px rgba(0,0,0,.45); }
.lightbox::backdrop { background: rgba(28, 11, 16, .78); backdrop-filter: blur(6px); }
.lightbox img { display: block; max-width: 100%; max-height: 82svh; margin: 0 auto; object-fit: contain; }
.lightbox p { margin: 13px 4px 2px; color: rgba(255,250,243,.72); font-size: 12px; letter-spacing: .1em; }
.lightbox-close { position: absolute; top: 8px; right: 11px; width: 36px; height: 36px; border: 0; border-radius: 50%; color: #fffaf3; background: rgba(0,0,0,.4); font-size: 25px; line-height: 1; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 700px) {
  .music-control { top: max(13px, env(safe-area-inset-top)); right: 13px; padding: 7px 11px 7px 7px; }
  .music-icon { width: 29px; height: 29px; font-size: 19px; }
  .music-copy strong { font-size: 11px; }
  .music-copy small { font-size: 10px; }
  .hero { min-height: 810px; }
  .hero-photo { background-position: 59% center; }
  .hero-content, .section-inner { width: calc(100% - 42px); }
  .hero-content { padding-bottom: 40px; }
  .hero h1 { font-size: clamp(64px, 20vw, 100px); }
  .hero-lead { margin: 25px 0 27px; font-size: 18px; }
  .hero-meta { padding-top: 17px; }
  .hero-meta > div { min-width: 0; flex: 1; padding-right: 10px; }
  .hero-meta > div + div { padding-left: 16px; }
  .hero-meta strong { font-size: 18px; }
  .hero-meta span, .hero-meta small { font-size: 11px; }
  .script-accent { font-size: 17px; }
  .welcome, .closing { padding: 93px 0 90px; }
  .section-inner.narrow { width: calc(100% - 42px); }
  .body-copy { font-size: 17px; line-height: 1.95; text-align: left; }
  .section-heading { display: block; }
  .heading-note { display: block; margin-top: 12px; font-size: 12px; }
  .photo-story { padding-bottom: 90px; }
  .photo-card { flex-basis: 73vw; }
  .photo-card-wide { flex-basis: 82vw; }
  .photo-card img { height: 390px; }
  .photo-card-wide img { height: 290px; }
  .event-section { padding: 92px 0 100px; }
  .event-grid { grid-template-columns: 1fr; }
  .event-card { min-height: 210px; }
  .event-section h2 { margin-bottom: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
