@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--rotate)); }
  50% { transform: translate3d(var(--drift), 18px, 0) rotate(calc(var(--rotate) + 22deg)); }
}

@keyframes pulse-ring {
  0% { transform: scale(.92); opacity: .8; }
  75%, 100% { transform: scale(1.35); opacity: 0; }
}

:root {
  color-scheme: light;
  --ink: #302c29;
  --muted: #786f67;
  --paper: #fffdf9;
  --warm: #f4eee6;
  --gold: #ad8d61;
  --red: #a4493f;
  --line: rgba(59, 49, 42, .22);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --script: 'Marck Script', cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}
button, input { font: inherit; }
a { color: inherit; }
main { overflow: clip; }
.paper-noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: .045;
  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='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

section { position: relative; padding: 96px max(22px, env(safe-area-inset-right)) 100px max(22px, env(safe-area-inset-left)); }
.section-warm { background: var(--warm); }
.section-light { background: var(--paper); }
.narrow { width: min(100%, 650px); margin-inline: auto; text-align: center; }
.narrow p { margin: 0 0 15px; }
.eyebrow {
  margin: 0;
  text-transform: lowercase;
  letter-spacing: .34em;
  font-size: 13px;
}
.handwritten { color: var(--red); font-family: var(--script); font-size: 22px; line-height: 1.15; }
.script-title { color: var(--gold); font-family: var(--script); font-size: clamp(64px, 16vw, 92px); font-weight: 400; line-height: .9; }

.hero {
  min-height: 100svh;
  padding-top: clamp(42px, 8vh, 78px);
  text-align: center;
  isolation: isolate;
}
.hero__title {
  margin: clamp(36px, 7vh, 72px) auto 26px;
  color: var(--gold);
  font-size: clamp(56px, 13vw, 106px);
  font-style: italic;
  font-weight: 400;
  line-height: .82;
  letter-spacing: -.045em;
}
.hero__title span { display: inline-block; }
.hero__title em { padding: 0 .08em; font-size: .72em; font-weight: 400; }
.flourish { display: flex; align-items: center; justify-content: center; gap: 13px; color: var(--red); }
.flourish span { width: 72px; border-top: 1px solid rgba(164, 73, 63, .25); }
.flourish b { font-size: 13px; font-weight: 400; }
.hero__question { margin: 30px 0 4px; font-size: clamp(27px, 6vw, 38px); }
.hero .handwritten { max-width: 360px; margin: 16px auto 34px; }
.polaroids { display: flex; width: min(680px, 100%); margin: 0 auto; gap: 14px; align-items: start; }
.polaroid {
  flex: 1;
  margin: 0;
  padding: 9px 9px 18px;
  background: #fbfaf6;
  box-shadow: 0 8px 30px rgba(62, 45, 32, .12);
  transform: rotate(-1.1deg);
}
.polaroid--right { margin-top: 9px; transform: rotate(1.2deg); }
.photo-placeholder {
  display: grid;
  place-content: center;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  color: rgba(68, 58, 49, .55);
  background:
    radial-gradient(circle at 50% 37%, #d8c6b0 0 13%, transparent 13.5%),
    radial-gradient(ellipse at 50% 96%, #c7b29a 0 32%, transparent 32.5%),
    linear-gradient(145deg, #e8ded2, #cfc0ae);
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.photo-placeholder img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder__icon { font-size: 34px; line-height: 1; }
.photo-placeholder span { position: relative; z-index: 1; }
.polaroid figcaption { padding-top: 11px; font-family: var(--script); font-size: clamp(13px, 3.2vw, 18px); line-height: 1.05; }
.heart-sketch { margin: 27px auto -4px; color: var(--red); font-family: var(--script); font-size: 64px; transform: rotate(-8deg); }
.petals i {
  position: absolute;
  z-index: -1;
  width: 11px;
  height: 7px;
  border-radius: 80% 20% 70% 30%;
  background: #d9a99d;
  opacity: .7;
  --rotate: 12deg;
  --drift: 9px;
  animation: drift 4s ease-in-out infinite;
}
.petals i:nth-child(1) { left: 12%; top: 19%; }
.petals i:nth-child(2) { right: 13%; top: 8%; --rotate: -24deg; animation-delay: -.8s; }
.petals i:nth-child(3) { left: 23%; top: 47%; background: #b6c0aa; --rotate: 30deg; animation-delay: -1.5s; }
.petals i:nth-child(4) { right: 25%; top: 41%; background: #dfcaa0; --rotate: -10deg; animation-delay: -.3s; }
.petals i:nth-child(5) { left: 7%; top: 72%; --rotate: 41deg; animation-delay: -2.1s; }
.petals i:nth-child(6) { right: 7%; top: 68%; background: #b6c0aa; --rotate: -35deg; animation-delay: -1.2s; }

.intro { padding-block: 106px; }
.intro .narrow { font-size: clamp(20px, 4vw, 26px); }
.date-section { padding-top: 20px; text-align: center; }
.scratch-hint { position: relative; display: grid; width: 58px; height: 58px; margin: 0 auto 13px; place-items: center; border: 1px solid var(--red); border-radius: 50%; font-size: 23px; }
.scratch-hint::before { content: ''; position: absolute; inset: -9px; border: 1px solid #dba49f; border-radius: inherit; animation: pulse-ring 2.2s infinite; }
.scratch-instruction { margin: 0 0 48px; letter-spacing: .04em; }
.date-section .script-title { margin: 0 0 52px; }
.scratch-row { display: flex; width: min(680px, 100%); margin: 0 auto; justify-content: center; gap: clamp(10px, 5vw, 34px); }
.scratch-card { position: relative; width: min(29vw, 150px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(124, 94, 63, .12); }
.scratch-value { position: absolute; inset: 0; display: grid; place-content: center; color: var(--ink); background: #faf4e9; }
.scratch-value strong { display: block; font-size: clamp(20px, 5vw, 32px); font-weight: 500; line-height: 1; }
.scratch-value small { margin-top: 8px; color: var(--muted); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
.scratch-card canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; transition: opacity .5s ease; }
.scratch-card canvas:active { cursor: grabbing; }
.scratch-card.is-revealed canvas { opacity: 0; pointer-events: none; }

.section-heading { width: min(100%, 620px); margin: 0 auto 52px; text-align: center; }
.section-heading .handwritten { margin: 0 0 15px; }
.section-heading h2 { margin: 0; color: var(--gold); font-size: clamp(54px, 13vw, 86px); font-style: italic; font-weight: 400; line-height: .9; }
.timeline { display: grid; width: min(100%, 640px); margin: 0 auto; gap: 34px; }
.timeline__item { display: grid; grid-template-columns: 68px 1fr; align-items: center; gap: 24px; }
.line-icon svg { display: block; width: 60px; height: 60px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.timeline__item h3 { width: fit-content; margin: 0 0 5px; padding: 0 8px 7px; border-bottom: 1px solid var(--line); font-size: clamp(21px, 5vw, 28px); font-weight: 400; }
.timeline__item p { margin: 0; padding-left: 8px; color: var(--muted); font-size: 13px; }
.ring-mark { margin: 52px auto -28px; color: var(--red); font-size: 62px; text-align: center; transform: rotate(45deg); }

.location { text-align: center; }
.locations-grid { display: grid; width: min(100%, 1020px); margin: 0 auto; gap: 84px; }
.venue-card { width: min(100%, 620px); margin: 0 auto; }
.venue-card__art { width: min(320px, 90%); margin: -20px auto 6px; color: #a78462; }
.venue-card__art svg { width: 100%; fill: none; stroke: currentColor; stroke-width: 1.25; }
.venue-card__art--rings { display: grid; height: 142px; place-items: center; color: var(--red); font-size: 92px; line-height: 1; letter-spacing: -.28em; transform: rotate(-12deg); }
.venue-card__kind { margin: 0 0 6px; color: var(--red); font-family: var(--script); }
.venue-card h3 { margin: 0; font-size: clamp(36px, 9vw, 55px); font-weight: 400; }
.venue-card address { margin: 9px 0 26px; font-size: clamp(20px, 4.5vw, 26px); font-style: normal; }
.outline-button {
  display: inline-flex;
  min-height: 54px;
  padding: 12px 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--red);
  border-radius: 999px;
  color: var(--red);
  background: transparent;
  cursor: pointer;
  font-family: var(--script);
  font-size: 19px;
  text-decoration: none;
  transition: background-color .25s, color .25s, transform .25s;
}
.outline-button:hover { color: white; background: var(--red); transform: translateY(-2px); }
.bus-note { display: grid; grid-template-columns: auto 1fr; width: min(100%, 740px); margin: 86px auto 0; padding: 26px; gap: 24px; border: 1px solid rgba(164, 73, 63, .36); text-align: left; }
.bus-note__time { color: var(--red); font-size: clamp(34px, 8vw, 54px); font-style: italic; line-height: 1; }
.bus-note h3 { margin: 0 0 6px; font-size: 25px; font-weight: 500; }
.bus-note p { margin: 0 0 10px; }
.bus-note a { color: var(--red); text-underline-offset: 4px; }

.memory .section-heading h2 { font-size: clamp(36px, 9vw, 62px); }
.compare { position: relative; width: min(100%, 620px); aspect-ratio: 4 / 5; margin: 0 auto; overflow: hidden; border: 12px solid #f8f5ef; border-bottom-width: 70px; background: #d8cec1; box-shadow: 0 9px 30px rgba(60, 44, 32, .12); touch-action: none; user-select: none; }
.compare__photo { position: absolute; inset: 0; overflow: hidden; }
.compare__photo img { width: 100%; height: 100%; object-fit: cover; }
.compare__photo--now { background: #d4c6b8; }
.compare__before { position: absolute; inset: 0; overflow: hidden; clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.compare__photo--then { background: #bbb6ae; }
.compare__line { position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px; background: #fff; transform: translateX(-1px); }
.compare__handle { position: absolute; top: calc(50% - 28px); left: var(--split); width: 56px; height: 56px; border: 0; border-radius: 50%; color: var(--red); background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.12); cursor: ew-resize; font-family: Georgia, serif; font-size: 24px; transform: translateX(-50%); }
.compare__labels { display: flex; width: min(100%, 620px); margin: 16px auto 0; justify-content: space-between; color: var(--muted); font-size: 11px; letter-spacing: .25em; text-transform: uppercase; }
.memory__caption { width: min(100%, 590px); margin: 26px auto 0; text-align: center; }

.dress-code { text-align: center; }
.dress-code .narrow { font-size: clamp(20px, 4vw, 25px); }
.palette { display: flex; margin: 40px auto 0; justify-content: center; gap: clamp(9px, 3vw, 20px); }
.palette i { position: relative; display: block; width: min(17vw, 78px); aspect-ratio: 1; border-radius: 50%; background: var(--color); }
.palette i::after { content: ''; position: absolute; inset: -4px 5px 4px -5px; border: 1px solid rgba(61, 51, 43, .7); border-radius: 50%; }

.wishes { text-align: center; }
.wishes .narrow { font-size: clamp(20px, 4vw, 25px); }
.wishes .narrow p + p { margin-top: 30px; }
.envelope { position: relative; width: 66px; height: 43px; margin: 43px auto 0; border: 2px solid var(--red); border-radius: 3px; color: var(--red); }
.envelope::before, .envelope::after { content: ''; position: absolute; top: 3px; width: 42px; border-top: 2px solid var(--red); }
.envelope::before { left: 1px; transform: rotate(32deg); transform-origin: left; }
.envelope::after { right: 1px; transform: rotate(-32deg); transform-origin: right; }
.envelope span { position: relative; z-index: 1; display: inline-grid; width: 21px; height: 21px; margin-top: 13px; place-items: center; background: var(--warm); font-size: 18px; }

.rsvp { padding-bottom: max(100px, calc(70px + env(safe-area-inset-bottom))); }
.rsvp .section-heading h2 { font-size: clamp(48px, 11vw, 74px); }
.rsvp-form { display: grid; width: min(100%, 560px); margin: 52px auto 0; gap: 33px; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.rsvp-form fieldset { display: grid; margin: 0; padding: 0; border: 0; gap: 9px; }
.rsvp-form legend, .field > span { margin-bottom: 13px; font-size: 24px; font-weight: 500; }
.rsvp-form label { cursor: pointer; }
.rsvp-form fieldset label { display: flex; align-items: center; gap: 12px; }
.rsvp-form input[type='radio'] { width: 20px; height: 20px; margin: 0; accent-color: var(--red); }
.check-option { display: flex; align-items: flex-start; gap: 13px; padding: 18px; border: 1px solid rgba(164, 73, 63, .32); }
.check-option input { width: 20px; height: 20px; margin: 4px 0 0; accent-color: var(--red); }
.check-option span { display: grid; }
.check-option strong { font-size: 21px; font-weight: 500; }
.check-option small { color: var(--muted); font-size: 16px; }
.field { display: grid; }
.field input { width: 100%; padding: 10px 0 12px; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; outline: none; background: transparent; font-size: 22px; }
.field input:focus { border-color: var(--red); box-shadow: 0 1px 0 var(--red); }
.submit-button { min-height: 58px; border: 1px solid var(--red); border-radius: 999px; color: var(--red); background: transparent; cursor: pointer; font-family: var(--script); font-size: 22px; transition: .25s; }
.submit-button:hover { color: white; background: var(--red); }
.submit-button:disabled { cursor: wait; opacity: .58; }
.form-status { min-height: 1.2em; margin: -16px 0 0; color: var(--red); text-align: center; }

.share-dialog { width: min(calc(100% - 34px), 470px); padding: 50px 26px 32px; border: 0; border-radius: 4px; color: var(--ink); background: var(--paper); text-align: center; box-shadow: 0 20px 80px rgba(42, 32, 24, .25); }
.share-dialog::backdrop { background: rgba(43, 35, 29, .55); backdrop-filter: blur(4px); }
.share-dialog__close { position: absolute; top: 10px; right: 14px; border: 0; background: transparent; cursor: pointer; font-size: 32px; }
.share-dialog .handwritten { margin: 0 0 8px; }
.share-dialog h2 { margin: 0; color: var(--gold); font-size: 42px; font-weight: 400; }
.share-dialog__actions { display: grid; gap: 15px; margin-top: 25px; }
.text-button { border: 0; color: var(--muted); background: transparent; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .85s ease, transform .85s cubic-bezier(.2,.7,.2,1); }
.reveal.in-view { opacity: 1; transform: none; }
.polaroids.reveal { transition-delay: .08s; }

@media (min-width: 760px) {
  section { padding-block: 130px; }
  .hero { padding-top: 70px; }
  .intro { padding-block: 135px; }
  .date-section { padding-top: 35px; }
  .timeline__item { grid-template-columns: 86px 1fr; }
  .line-icon svg { width: 72px; height: 72px; }
  .locations-grid { grid-template-columns: 1fr 1fr; align-items: start; gap: 42px; }
}

@media (max-width: 420px) {
  section { padding-inline: 20px; }
  .hero__title span { display: block; }
  .hero__title em { display: block; margin: .04em 0; }
  .hero__title { margin-top: 28px; font-size: 58px; }
  .hero__question { margin-top: 22px; }
  .polaroid { padding: 6px 6px 14px; }
  .scratch-card { width: 28vw; }
  .scratch-value strong { font-size: 20px; }
  .timeline__item { grid-template-columns: 58px 1fr; gap: 13px; }
  .line-icon svg { width: 50px; }
  .timeline__item h3 { padding-inline: 4px; font-size: 20px; }
  .compare { border-width: 8px; border-bottom-width: 54px; }
  .bus-note { grid-template-columns: 1fr; gap: 10px; text-align: center; }
}

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