@font-face { font-family: 'Cormorant Garamond'; src: url('fonts/cormorant-garamond.woff2') format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('fonts/cormorant-garamond-italic.woff2') format('woff2'); font-weight: 300 700; font-style: italic; font-display: swap; }

:root {
	--pearl: #faf8f3;
	--pearl-deep: #f1ece2;
	--rust: #8a4f1d;
	--rust-line: #a0642a;
	--ink: #5c3415;
	--ink-soft: #7a4f2a;
	--hair: #dcc6a6;
	--serif: 'Cormorant Garamond', 'Songti SC', 'STSong', 'Noto Serif CJK SC', 'Source Han Serif SC', SimSun, Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--pearl);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 19px;
	line-height: 1.55;
	font-weight: 500;
	-webkit-font-smoothing: antialiased;
}
html[lang='zh-Hans'] body { font-size: 17px; line-height: 1.8; font-weight: 400; }
a { color: var(--rust); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }

.bloom ellipse { fill: #fff; stroke: var(--rust-line); stroke-width: .9; }
.bloom circle { fill: var(--rust-line); }

.lang-switch {
	position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 5;
	padding: 5px 13px; border: 1px solid var(--hair); border-radius: 999px;
	background: rgba(250, 248, 243, .86); backdrop-filter: blur(6px);
	font-size: 15px; text-decoration: none;
}

/* ---------- Opening ---------- */
.opening {
	position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
	display: flex; align-items: center; justify-content: center;
	background:
		radial-gradient(ellipse 90% 45% at 22% 12%, rgba(244, 226, 232, .75), transparent 70%),
		radial-gradient(ellipse 85% 42% at 84% 40%, rgba(222, 234, 242, .75), transparent 70%),
		radial-gradient(ellipse 90% 45% at 26% 82%, rgba(240, 235, 214, .8), transparent 70%),
		var(--pearl);
}
.opening::after {
	content: ''; position: absolute; inset: -40%; pointer-events: none;
	background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .7) 50%, transparent 58%);
	animation: sheen 8s ease-in-out infinite;
}
@keyframes sheen { 0%, 25% { transform: translateX(-55%); } 75%, 100% { transform: translateX(55%); } }

.garden {
	position: relative; flex: none; aspect-ratio: 276 / 566;
	height: 100vh; height: 100svh; max-width: 100vw;
	container-type: inline-size;
}
@media (max-aspect-ratio: 276 / 566) {
	.garden { width: 100vw; height: auto; }
}
.garden-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.garden-art .draw { fill: none; stroke: var(--rust-line); stroke-width: 1.2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.no-animate .garden-art .draw { stroke-dashoffset: 0; }

.words { position: absolute; left: 16%; right: 16%; top: 27.5%; text-align: center; z-index: 1; }
.js .words > * { opacity: 0; transform: translateY(8px); transition: opacity 1.5s, transform 1.5s; }
.js .opening.show .words > * { opacity: 1; transform: none; }
.opening.show .words > :nth-child(2) { transition-delay: .35s; }
.opening.show .words > :nth-child(3) { transition-delay: .9s; }
.opening.show .words > :nth-child(4) { transition-delay: 1.4s; }
.opening.show .words > :nth-child(5) { transition-delay: 2.2s; }
.no-animate .words > * { transition: none !important; }

.eyebrow { font-size: 4.5cqw; letter-spacing: .24em; text-transform: uppercase; }
.guest { font-size: 10.1cqw; font-style: italic; margin: 2.8cqw 0 6cqw; line-height: 1.1; font-weight: 400; overflow-wrap: anywhere; }
.invite { font-size: 5.8cqw; line-height: 1.35; }
.names {
	font-family: var(--serif); font-size: 19.5cqw; line-height: 1.02; font-weight: 500; font-style: italic;
	margin: 3cqw -9cqw 0; padding: 2cqw 9cqw 3cqw;
	background: linear-gradient(105deg, #8a4f1d 0%, #b5772f 30%, #d8a657 48%, #a9682a 62%, #7f4818 100%);
	background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
	animation: foil 7s ease-in-out infinite alternate;
}
@keyframes foil { from { background-position: 0% 0; } to { background-position: 100% 0; } }
.enter { display: inline-block; margin-top: 4cqw; font-size: 5.2cqw; font-style: italic; position: relative; z-index: 2; }
html[lang='zh-Hans'] .guest, html[lang='zh-Hans'] .enter { font-style: normal; }

/* ---------- Sections ---------- */
.section { max-width: 620px; margin: 0 auto; padding: 72px 24px 16px; }
.section h2 {
	font-size: 38px; font-weight: 400; font-style: italic; text-align: center; color: var(--rust);
	line-height: 1.15; margin-bottom: 26px;
}
html[lang='zh-Hans'] .section h2 { font-style: normal; font-size: 28px; letter-spacing: .08em; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s, transform .9s; }
.js .reveal.seen { opacity: 1; transform: none; }

.placeholder {
	display: flex; align-items: center; justify-content: center;
	background: linear-gradient(145deg, #fff, var(--pearl-deep));
	border: 1px solid var(--hair);
	position: relative;
}
.placeholder::before { content: ''; position: absolute; inset: 7px; border: 1px solid var(--hair); opacity: .6; pointer-events: none; }
.placeholder .bloom { width: 58px; height: 58px; opacity: .75; }

.couple-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; max-width: 440px; margin: 0 auto 34px; }
.welcome { text-align: center; }
.lead { font-size: 25px; line-height: 1.4; font-style: italic; font-weight: 400; text-align: center; }
html[lang='zh-Hans'] .lead { font-style: normal; font-size: 20px; line-height: 1.8; }
.lead.small { font-size: 20px; margin-bottom: 34px; }
html[lang='zh-Hans'] .lead.small { font-size: 17px; }
.date { margin-top: 22px; letter-spacing: .05em; color: var(--rust); font-size: 20px; }
.seats { margin-top: 6px; color: var(--ink-soft); }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 34px auto 0; max-width: 420px; }
.countdown[hidden] { display: none; }
.countdown div { padding: 12px 2px; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.countdown strong { display: block; font-size: 34px; font-weight: 400; color: var(--rust); line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.countdown span { font-size: 14px; letter-spacing: .06em; color: var(--ink-soft); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 13px; top: 18px; bottom: 30px; width: 1px; background: var(--rust-line); opacity: .55; }
.stop { position: relative; padding: 0 0 44px 46px; }
.marker { position: absolute; left: 0; top: 2px; width: 27px; height: 27px; background: var(--pearl); border-radius: 50%; }
.marker .bloom { width: 27px; height: 27px; display: block; }
.time { color: var(--rust); letter-spacing: .03em; font-size: 18px; }
.stop h3 { font-size: 31px; font-weight: 400; line-height: 1.2; margin-bottom: 14px; }
html[lang='zh-Hans'] .stop h3 { font-size: 24px; }
.venue-photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: 16px; }
.venue { font-size: 21px; }
.address { color: var(--ink-soft); }
.arrival { margin-top: 14px; padding: 12px 14px; border-left: 2px solid var(--rust); background: var(--pearl-deep); }
.arrival h4 { font-size: 16px; font-weight: 700; color: var(--rust); letter-spacing: .03em; }
details { margin-top: 14px; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
summary { cursor: pointer; padding: 10px 0; color: var(--rust); }
details p { margin-bottom: 12px; }
.links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: 17px; }
.links a { padding: 3px 0; }
.calendar-all { text-align: center; font-size: 17px; }


/* ---------- Route map ---------- */
.map-heading { text-align: center; font-weight: 400; font-size: 21px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin: -6px 0 14px; }
html[lang='zh-Hans'] .map-heading { letter-spacing: .3em; font-size: 17px; }
.route-map {
	position: relative; margin: 0 0 44px; aspect-ratio: 600 / 400; container-type: inline-size;
	border: 1px solid var(--hair); overflow: hidden;
	background:
		radial-gradient(ellipse 70% 60% at 15% 20%, rgba(244, 226, 232, .55), transparent 70%),
		radial-gradient(ellipse 70% 60% at 85% 75%, rgba(222, 234, 242, .55), transparent 70%),
		#fffdf9;
}
.route-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rm-roads path { fill: none; stroke: #ebe1d2; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.rm-casing { fill: none; stroke: #fff; stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.rm-route { fill: none; stroke: var(--rust-line); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .route-map .rm-route { stroke-dashoffset: 1; transition: stroke-dashoffset 2.6s cubic-bezier(.45, .05, .4, 1) .4s; }
.js .reveal.seen .route-map .rm-route { stroke-dashoffset: 0; }
.rm-labels text { font-family: var(--serif); font-style: italic; font-size: 13px; fill: #8a6a4c; text-anchor: middle; }
.rm-labels .rm-street { font-size: 11px; }
.rm-distance { font-family: var(--serif); font-size: 15px; font-style: italic; fill: var(--rust); text-anchor: middle; }
.rm-north path { fill: var(--rust-line); }
.rm-north text { font-family: var(--serif); font-size: 12px; fill: var(--rust-line); text-anchor: middle; }
.rm-pin circle { fill: var(--rust); stroke: #fff; stroke-width: 3; }
.rm-pin text { fill: #fff; font-family: var(--serif); font-size: 16px; font-weight: 700; text-anchor: middle; }

.map-card {
	position: absolute; top: 2.5%; display: flex; flex-direction: column; gap: .1em;
	padding: clamp(5px, 1.7cqw, 12px) clamp(7px, 2cqw, 14px);
	background: rgba(255, 255, 255, .94); border: 1px solid var(--hair); border-top: 3px solid var(--rust);
	font-size: clamp(10.5px, 2.55cqw, 15.5px); line-height: 1.28; color: var(--ink);
	box-shadow: 0 6px 18px rgba(92, 52, 21, .08);
}
.map-card-1 { right: 2%; width: 38%; }
.map-card-2 { left: 14%; width: 40%; }
.map-card-title { color: var(--rust); font-weight: 700; display: flex; align-items: center; }
.map-no {
	flex: none; display: inline-flex; align-items: center; justify-content: center;
	width: 1.45em; height: 1.45em; margin-right: .4em; border-radius: 50%;
	background: var(--rust); color: #fff; font-size: .82em; font-weight: 700;
}
.map-card-time { font-weight: 700; }
.map-card-note { font-style: italic; color: var(--ink-soft); }
html[lang='zh-Hans'] .map-card-note { font-style: normal; }
@container (max-width: 460px) {
	.rm-labels text { font-size: 19px; }
	.rm-labels .rm-street { font-size: 16px; }
	.rm-distance { font-size: 21px; }
	.rm-north text { font-size: 17px; }
}
/* ---------- Good to know ---------- */
.info { margin: 0; }
.info > div { padding: 16px 0; border-top: 1px solid var(--hair); }
.info > div:last-child { border-bottom: 1px solid var(--hair); }
.info > div.important { border: 1px solid var(--rust); background: #fff; padding: 16px 18px; margin-bottom: 14px; }
.info > div.important + div { border-top: 0; }
.info .important dt { font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 15px; }
.info .important dd { font-weight: 600; font-size: 20px; line-height: 1.4; color: var(--ink); }
html[lang='zh-Hans'] .info .important dd { font-size: 17px; line-height: 1.8; }
.info dt { color: var(--rust); font-size: 17px; letter-spacing: .03em; }
.info dd { margin: 3px 0 0; }

/* ---------- RSVP ---------- */
.note { text-align: center; margin-bottom: 26px; color: var(--ink-soft); }
.guest-row { border: 0; border-top: 1px solid var(--hair); padding: 18px 0; margin: 0; }
.guest-row legend { float: left; width: 100%; font-size: 23px; padding: 0; margin-bottom: 11px; }
.choices { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choices label { cursor: pointer; display: block; position: relative; }
.choices input { position: absolute; opacity: 0; inset: 0; }
.choices span {
	display: flex; align-items: center; justify-content: center; text-align: center; min-height: 50px; padding: 8px 6px;
	border: 1px solid var(--rust-line); font-size: 17px; line-height: 1.2; transition: background .2s, color .2s;
}
.choices input:checked + span { background: var(--rust); border-color: var(--rust); color: #fff; }
.choices input:focus-visible + span { outline: 2px solid var(--rust); outline-offset: 2px; }
.button {
	display: block; width: 100%; min-height: 54px; margin-top: 12px; padding: 12px 20px;
	background: var(--rust); color: #fff; border: 1px solid var(--rust); border-radius: 0;
	font: inherit; font-size: 20px; cursor: pointer;
}
.button:disabled { opacity: .6; cursor: default; }
.button.quiet { background: transparent; color: var(--rust); min-height: 46px; font-size: 17px; }
.form-message { text-align: center; margin-top: 16px; font-size: 21px; font-style: italic; color: var(--rust); min-height: 1.5em; }
html[lang='zh-Hans'] .form-message { font-style: normal; font-size: 17px; }
.closed-answers { list-style: none; padding: 0; text-align: center; }

/* ---------- Closing ---------- */
.closing { text-align: center; padding: 64px 24px 72px; }
.closing .bloom { width: 44px; height: 44px; margin-bottom: 8px; }
.closing-names { font-size: 38px; font-style: italic; color: var(--rust); line-height: 1.3; }

/* ---------- Private page ---------- */
.private-page { display: flex; min-height: 100vh; align-items: center; justify-content: center; background: radial-gradient(ellipse at 30% 20%, rgba(244, 226, 232, .6), transparent 60%), radial-gradient(ellipse at 80% 70%, rgba(222, 234, 242, .6), transparent 60%), var(--pearl); }
.private { max-width: 430px; padding: 32px 24px; text-align: center; }
.private .bloom { width: 62px; height: 62px; margin-bottom: 14px; }
.private h1 { font-weight: 400; font-style: italic; font-size: 40px; color: var(--rust); line-height: 1.15; margin-bottom: 14px; }
html[lang='zh-Hans'] .private h1 { font-style: normal; font-size: 30px; }
.lang-link { display: inline-block; margin-top: 20px; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.opening::after, .names { animation: none; }
	.js .reveal, .js .words > * { transition: none; opacity: 1; transform: none; }
	.js .route-map .rm-route { transition: none; stroke-dashoffset: 0; }
}
