:root {
  color-scheme: light;
  --folio: 30rem;
  --wine: #32121a;
  --dark: #1d1015;
  --gold: #dbb77e;
  --pale: #f4e2bf;
  --ink: #fbf1dc;
  --muted: #dfc9a8;
  --line: rgba(209, 169, 108, .45);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --script: "Great Vibes", "Cormorant Garamond", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-family: var(--serif);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(ellipse at 50% 12%, #fbf7ee, #eee7da 70%, #e6ddce);
  background-attachment: fixed;
  -webkit-text-size-adjust: 100%;
}
body.sealed { overflow: hidden; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button, a, h1 { outline-offset: 5px; }
button:focus-visible, a:focus-visible { outline: 2px solid #ffe2a7; }
img { display: block; max-width: 100%; }
.folio {
  width: min(100%, var(--folio)); min-height: 100vh; min-height: 100svh;
  position: relative; margin: auto; isolation: isolate;
  background: var(--dark);
  box-shadow: 0 0 0 1px #9e82573b, 0 20px 65px #3d251f26;
  container-type: inline-size;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.flourish { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; color: var(--gold); }
.flourish::before, .flourish::after { content: ""; display: block; width: 2.7rem; height: 1px; background: linear-gradient(90deg, transparent, currentColor); }
.flourish::after { transform: rotate(180deg); }
.flourish i { display: block; width: .42rem; height: .42rem; border: 1px solid currentColor; transform: rotate(45deg); }
.script { font-family: var(--script); font-weight: 400; }
.envelope {
  z-index: 5; position: absolute; top: 0; left: 0; width: 100%; height: 100vh; height: 100svh;
  overflow: hidden; isolation: isolate; background: transparent;
}
.paper { position: absolute; inset: 0; background: #5e1121 url("konvert.webp") center/100% 100% no-repeat; pointer-events: none; backface-visibility: hidden; }
.flap { clip-path: polygon(0 0,100% 0,100% 22.6%,50.2% 54.7%,0 22.8%); z-index: 1; transform-origin: center top; }
.pocket { clip-path: polygon(0 22.4%,50.2% 54.1%,100% 22.2%,100% 100%,0 100%); }
.envelope::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at 51% 52%, #ffe5ad, #cd995e 18%, #76353a 46%, transparent 78%);
}
.cover-text { position: absolute; left: 7%; right: 7%; text-align: center; z-index: 2; pointer-events: none; color: #f4dbb3; }
.envelope-heading { top: 12.3%; display: flex; flex-direction: column; align-items: center; gap: .85rem; }
.envelope-heading p, .hero-kicker, .eyebrow, .cover-date, .hero-date, .closing-date {
  font: 500 .78rem/1.55 var(--sans);
  letter-spacing: .2em; text-transform: uppercase;
}
.envelope-heading p { font-family: var(--serif); font-weight: 600; font-size: .99rem; letter-spacing: .17em; text-shadow: 0 1px 8px #370910; }
.cover-date {
  bottom: max(8.3%, env(safe-area-inset-bottom)); padding-block: .25rem;
  font: 500 1rem/1.2 var(--serif); letter-spacing: .24em; color: #f1d3a1;
}
.open-button { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; border: 0; padding: 0; background: transparent; }
.open-button:focus-visible { outline: 0; }
.wax {
  position: absolute; top: 53.9%; left: 50%; width: clamp(6.5rem, 29%, 8.8rem); aspect-ratio: 1;
  transform: translate(-50%,-50%); filter: drop-shadow(0 5px 8px #27060dd1); transition: scale .25s ease;
}
.wax::before {
  content: ""; position: absolute; inset: -6.5%; border-radius: 50%; border: 1px solid #e7c286a9;
  animation: breathe 3.4s ease-in-out infinite;
}
.wax img { width: 100%; height: 100%; object-fit: contain; }
.initials {
  position: absolute; inset: 0; display: flex; gap: .045em; align-items: center; justify-content: center;
  padding-bottom: .02em; color: #6d492b;
  font: italic 500 clamp(2rem, 8cqw, 2.6rem)/1 var(--serif); text-shadow: 0 1px .4px #fff0ca;
}
.initials i { font-style: inherit; }
.initials small { font-size: .55em; margin-inline: .04em; }
.open-button:focus-visible .wax::before { outline: 2px solid var(--ink); outline-offset: 6px; }
@media (hover: hover) { .open-button:hover .wax { scale: 1.025; } }
.open-hint {
  position: absolute; top: calc(53.9% + clamp(4.3rem, 18cqw, 5.75rem)); left: 0; right: 0;
  text-align: center; color: #fff0d0; font: 500 1.06rem/1.6 var(--serif);
  letter-spacing: .07em; text-shadow: 0 2px 5px #360913;
}
@keyframes breathe { 0%,100% { transform: scale(.98); opacity: .45; } 52% { transform: scale(1.065); opacity: .9; } }
.envelope.opening { pointer-events: none; }
.opening .flap { animation: flap-open 1.8s cubic-bezier(.52,.02,.30,1) forwards; }
.opening .pocket { animation: pocket-open 1.8s .32s cubic-bezier(.55,.01,.21,1) forwards; }
.opening .cover-text, .opening .open-hint { animation: fade-out .38s ease forwards; }
.opening .wax { animation: wax-open 1.25s cubic-bezier(.55,0,.35,1) forwards; }
.opening::before { animation: light-out 1.9s .30s ease-in-out forwards; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes flap-open { 18% { transform: translateY(-1.5%); } to { transform: translateY(-65%) rotateX(30deg); opacity: 0; } }
@keyframes pocket-open { to { transform: translateY(92%); opacity: 0; } }
@keyframes wax-open { 15% { transform: translate(-50%,-55%) rotate(-5deg); } 100% { transform: translate(-50%,-215%) rotate(-9deg); opacity: 0; } }
@keyframes light-out { 12% { opacity: 1; } 100% { opacity: 0; } }
.no-script { position: absolute; bottom: 1rem; left: 5%; right: 5%; z-index: 10; background: #350d1b; padding: 1rem; text-align: center; }

.hero {
  position: relative; display: grid; place-items: center;
  min-height: max(35rem, 100vh); min-height: max(35rem, 100svh); text-align: center;
  background: #320f1b url("peshtoq.webp") center / 100% 100% no-repeat;
}
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #1e101638, transparent 17%, transparent 88%, #1e101610); pointer-events: none; }
.hero-content { position: relative; z-index: 1; width: 72%; max-width: 24rem; padding-bottom: 1.65rem; }
.hero-kicker { display: flex; align-items: center; justify-content: center; gap: .6rem; color: #eed1a1; letter-spacing: .15em; line-height: 1.4; font-size: .76rem; }
.hero-kicker b { font-weight: 500; }
.hero-kicker span { height: 1px; width: clamp(.35rem,4cqw,1.6rem); flex: 0 1 auto; background: var(--line); }
.names { display: grid; justify-items: center; margin: clamp(1.1rem, 6vh, 3.4rem) 0 1.8rem; color: #fff0d1; font-family: var(--script); font-weight: 400; line-height: 1.12; text-shadow: 0 2px 15px #1d0c12; outline: none; }
.person {
  max-width: 100%; display: block; white-space: nowrap; padding-inline: .035em;
  font-size: 3.9rem; font-size: min(16.8cqw, 5.1rem);
}
.amp { display: inline-flex; gap: .65rem; align-items: center; margin: .16em 0 .13em; color: var(--gold); font: italic 500 1.65rem/1.2 var(--serif); }
.amp i { display: inline-block; width: 1.7rem; height: 1px; background: linear-gradient(90deg,transparent,var(--line)); }
.amp i:last-child { transform: rotate(180deg); }
.hero-date { color: #ecd0a4; font-family: var(--serif); font-size: 1rem; letter-spacing: .11em; }
.read-link { position: absolute; z-index: 2; bottom: 2.3%; left: 50%; transform: translateX(-50%); display: grid; justify-items: center; gap: .35rem; padding: .5rem .7rem; background: #210b1245; border-radius: 8px; color: #ffedce; font: 500 .94rem/1.2 var(--serif); letter-spacing: .05em; white-space: nowrap; }
.read-link i { display: block; width: .48rem; height: .48rem; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg); }
main { background: radial-gradient(ellipse at 26% 14%, #3a1a23 0, transparent 34%), #201116; }
.section-pad { padding: 3.6rem clamp(1.1rem, 6.6cqw, 2.15rem); text-align: center; }
.letter-section { padding-top: 4.1rem; padding-bottom: 1.8rem; background: radial-gradient(ellipse at 7% 21%, #48222a6e, transparent 65%); }
.letter {
  position: relative; margin: .4rem .45rem;
  padding: clamp(3.5rem, 16cqw, 5.2rem) clamp(1rem, 5.6cqw, 1.75rem) clamp(3.5rem, 16cqw, 5rem);
  border: 1px solid #9c7450; border-radius: 47% 47% .35rem .35rem / 18% 18% .35rem .35rem;
  background: linear-gradient(160deg,#49232c54,#26151a52);
}
.letter::before { content: ""; position: absolute; inset: 5px; border: 1px solid #aa81563a; border-radius: inherit; pointer-events: none; }
.sprig { position: absolute; width: 39%; max-width: 10.5rem; pointer-events: none; }
.sprig-start { top: .25rem; left: -1.1rem; transform: rotate(-22deg); transform-origin: center; }
.sprig-end { right: -.9rem; bottom: -.75rem; transform: rotate(158deg); }
.letter .flourish { margin-bottom: 1.15rem; }
.greeting { font-size: clamp(2.4rem, 11.1cqw, 3.5rem); line-height: 1.13; color: var(--pale); overflow-wrap: anywhere; }
.invitation-text { position: relative; margin: 1.4rem auto; max-width: 30ch; font-size: clamp(1.2rem, 5.05cqw, 1.48rem); line-height: 1.47; color: #f8e9d2; }
.signature { margin: 1.2rem auto 0; font: italic 500 1.36rem/1.35 var(--serif); color: #e3bd87; }
.keepsake { padding-top: .9rem; padding-bottom: 3.5rem; }
.picture { margin: .65rem auto 1.1rem; padding: 5px; border: 1px solid #a88354; border-radius: 48% 48% 3px 3px / 28% 28% 3px 3px; overflow: hidden; max-width: 23.7rem; }
.picture img { width: 100%; aspect-ratio: 4/4.5; object-fit: cover; object-position: center 58%; border-radius: inherit; }
.keepsake blockquote { margin: 2rem auto 0; max-width: 32ch; }
.quote-mark { display: block; height: 2.7rem; font-size: 4.8rem; line-height: 1; color: #c89b6b; }
.keepsake blockquote p { font: italic 500 clamp(1.52rem, 6.2cqw, 1.85rem)/1.3 var(--serif); color: var(--pale); }
.keepsake cite { display: block; margin-top: 1rem; color: #dec196; font: 500 .77rem/1.6 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.wish { max-width: 31ch; margin: 1.6rem auto 0; color: #e5cdb7; font: 500 1.24rem/1.45 var(--serif); }
.date-section { padding-top: 3.2rem; background: linear-gradient(150deg,#401b25,#2d141d 46%,#361820); border-block: 1px solid #8d68454f; }
.section-title { color: var(--pale); font-size: clamp(2.65rem, 11.8cqw, 3.8rem); line-height: 1.16; overflow-wrap: anywhere; }
.date-section > .section-title { margin: .9rem 0 1.65rem; }
.calendar { position: relative; border: 1px solid #ae865a; padding: 1.3rem clamp(.65rem, 4.8cqw, 1.5rem) 1.1rem; background: #21121960; box-shadow: inset 0 0 0 4px #2c1620, inset 0 0 0 5px #87624142; }
.calendar-heading { display: flex; align-items: center; justify-content: center; gap: .85rem; padding: .2rem .1rem 1rem; }
.calendar-heading h3 { font-size: 2.05rem; font-weight: 500; }
.calendar-heading > span:last-child { color: var(--muted); font-size: 1.3rem; font-variant-numeric: lining-nums; }
.hairline { width: 1.75rem; height: 1px; background: var(--line); }
.calendar table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.calendar th { padding: .45rem 0; border-block: 1px solid #b58f5b4a; color: #e1c7a1; font: 500 .78rem/1.5 var(--sans); }
.calendar td { height: 2.44rem; padding: .06rem 0; text-align: center; color: #f5e6ca; font-size: 1.14rem; font-weight: 500; font-variant-numeric: lining-nums tabular-nums; }
.calendar td > span { width: 2rem; height: 2rem; display: inline-grid; place-items: center; }
.calendar td .chosen { border-radius: 50%; background: #ebc990; color: #3c1420; font-weight: 700; box-shadow: 0 0 0 2px #33222b, 0 0 0 3px #ac8255; }
.meeting-time { display: flex; align-items: center; justify-content: center; gap: 1rem; padding-top: .85rem; margin-top: .4rem; border-top: 1px solid #b58f5b4a; color: var(--pale); font: 500 1.35rem/1.2 var(--serif); }
.meeting-time i { width: .32rem; height: .32rem; border: 1px solid var(--gold); transform: rotate(45deg); }
.meeting-time time { font-variant-numeric: lining-nums tabular-nums; }
.quiet-button, .map-link { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; min-height: 2.85rem; padding: .65rem 1.15rem; border: 1px solid #b48d60a6; border-radius: 2px; background: transparent; color: var(--pale); font: 500 .9rem/1.45 var(--sans); }
.quiet-button { margin-top: 1rem; }
.quiet-button svg, .map-link svg, .music svg, .pin-icon { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.quiet-button:hover, .map-link:hover { background: #f2cf9120; }
.countdown { margin-top: 2.6rem; }
.countdown h3 { font: italic 500 1.55rem/1.3 var(--serif); color: var(--pale); }
.count-units { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .12rem; margin: 1.1rem auto 0; max-width: 22rem; }
.count-units > div { display: grid; align-content: center; gap: .3rem; border-right: 1px solid #b18b5a53; }
.count-units > div:last-child { border: 0; }
.count-units span { color: #fae5bb; font: 500 clamp(1.85rem, 9cqw, 2.9rem)/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.count-units small { color: var(--muted); font: 500 .77rem/1.5 var(--sans); letter-spacing: .04em; }
.place-section { padding-top: 3.5rem; padding-bottom: 2.8rem; }
.pin-icon { width: 1.7rem; height: 1.7rem; color: var(--gold); margin-bottom: .8rem; }
.eyebrow { color: #ebc899; letter-spacing: .14em; font-size: .78rem; }
.place-section .section-title { margin: .85rem 0 .9rem; }
.address { max-width: 33ch; margin: 0 auto; color: var(--muted); font-size: 1.27rem; line-height: 1.4; }
.map-stage { position: relative; margin: 1.55rem auto 0; width: 100%; height: 12rem; border: 1px solid #a8855e86; background: #301d24; overflow: hidden; }
.map-preview { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: .25rem; border: 0; border-radius: 0; background: radial-gradient(ellipse, #52343b, #2a1820 76%); color: #f5dcac; }
.map-preview::before, .map-preview::after { content: ""; position: absolute; border: 1px solid #b9976933; border-radius: 50%; width: 12rem; height: 12rem; top: -6.6rem; right: -4.6rem; pointer-events: none; }
.map-preview::after { top: auto; right: auto; left: -4.6rem; bottom: -7rem; }
.compass { font: 400 2.8rem/1 Georgia,serif; color: #e7c38c; }
.map-prompt { font: 500 1.2rem/1.4 var(--serif); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }
.map-preview small { margin-top: .5rem; font: 500 .76rem/1.5 var(--sans); color: #d5bda0; letter-spacing: .06em; }
.map-stage iframe { display: block; border: 0; width: 100%; height: 100%; }
.map-link { margin-top: 1rem; padding-inline: 1.4rem; color: #3c1621; background: #e7c795; border-color: #e7c795; }
.map-link:hover { background: #f6dcac; }
.closing { padding-top: .5rem; padding-bottom: 3.6rem; background: radial-gradient(ellipse at 50% 62%, #40212a, transparent 68%); }
.doves { margin: 0 auto 1rem; width: 78%; max-width: 20.5rem; height: auto; }
.hosts { margin: .7rem auto 1.1rem; font: italic 500 clamp(1.8rem, 8.1cqw, 2.65rem)/1.32 var(--serif); color: var(--pale); text-wrap: balance; overflow-wrap: anywhere; }
.farewell { margin: 1.5rem auto .65rem; font-size: clamp(2.3rem,10.6cqw,3.4rem); line-height: 1.15; max-width: 13ch; color: #f7e6c7; }
.closing-date { margin: 1.25rem 0 .5rem; font-family: var(--serif); font-size: 1rem; letter-spacing: .14em; color: var(--muted); }
.cover-date, .hero-date, .closing-date { font-variant-numeric: lining-nums; }
.music { position: fixed; z-index: 4; right: max(calc((100% - var(--folio)) / 2 + .75rem), .75rem); bottom: max(1rem,env(safe-area-inset-bottom)); width: 2.8rem; height: 2.8rem; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid #e0c399; color: #f7daad; background: #381b24ee; box-shadow: 0 2px 9px #1608106b; }
.music svg { width: 1.28rem; height: 1.28rem; }
.music[aria-pressed="true"] .sound-off, .music[aria-pressed="false"] .sound-on { display: none; }
.arrived { animation: arrive .76s cubic-bezier(.2,.7,.24,1) both; }
@keyframes arrive { from { opacity: .68; transform: translateY(.8rem); } to { opacity: 1; transform: translateY(0); } }
.confetti { position: absolute; inset: -.45rem 0 0; height: min(95%,15rem); pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute; left: var(--x); top: -.5rem; width: .26rem; height: .5rem;
  border-radius: 70% 5% 70% 4%; background: var(--petal);
  animation: petal-fall 2.15s var(--delay) cubic-bezier(.16,.55,.36,.95) both;
}
@keyframes petal-fall {
  from { opacity: 0; transform: translate(0,0) rotate(0); }
  18% { opacity: .88; }
  to { opacity: 0; transform: translate(var(--drift),11rem) rotate(158deg); }
}
@media (max-width: 520px) { html { scrollbar-gutter: auto; } }
@media (max-height: 550px) {
  .envelope-heading { top: 6%; gap: .45rem; }
  .cover-date { bottom: 4.5%; }
  .wax { width: min(26%, 25vh); }
  .open-hint { top: calc(54% + 15vh); }
  .hero { min-height: 32rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
