:root {
  --wine: #470b13;
  --wine-deep: #2d070c;
  --wine-soft: #5c1a24;
  --cream: #f1ebe2;
  --ink: #4f141c;
  --rose: #ead9d2;
  --ticket: #17151a;
  --serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --display: "Italiana", "Cormorant Garamond", Georgia, serif;
  --script: "Pinyon Script", "Snell Roundhand", cursive;
  --mono: "Space Mono", ui-monospace, Menlo, monospace;
  --col: 560px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--wine);
  color: var(--rose);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  animation: page-in 0.9s ease both;
}
@keyframes page-in { from { opacity: 0; } }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 400; }
.amp { font-family: var(--serif); font-style: italic; text-transform: none; margin: 0 0.25em; }
img, svg { display: block; max-width: 100%; }

.script { font-family: var(--script); font-weight: 400; letter-spacing: 0.01em; }
.caps { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.02em; }
.wrap { width: min(100% - 48px, var(--col)); margin-inline: auto; }

/* ---------- navigation ---------- */
.nav {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: center; gap: clamp(16px, 5vw, 34px);
  padding: 30px 16px 0;
  font-family: var(--display); font-size: clamp(13px, 3.6vw, 16px);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.nav a { text-decoration: none; color: #f6ece6; padding: 6px 0; position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.35s ease;
}
.nav a:hover::after, .nav a:focus-visible::after, .nav a[aria-current]::after { transform: scaleX(1); }

/* ---------- surfaces ---------- */
.paper {
  background-color: var(--cream);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9 .08' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .3 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
}
.curtain {
  background: linear-gradient(180deg, rgba(24, 3, 7, 0.62), rgba(24, 3, 7, 0.4) 30%, rgba(24, 3, 7, 0.45) 70%, rgba(24, 3, 7, 0.7)), url("../images/curtain.jpg") center / cover #3a0810;
}
.vinyl {
  background: linear-gradient(rgba(22, 10, 6, 0.3), rgba(22, 10, 6, 0.3)), url("../images/vinyl.jpg") center bottom / cover #1b1210;
}

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; translate: 0 22px; transition: opacity 1.1s ease, translate 1.1s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.6s ease; }
.js .reveal.in { opacity: 1; translate: none; }
.js .reveal.d1 { transition-delay: 0.15s; }
.js .reveal.d2 { transition-delay: 0.3s; }
.js .reveal.d3 { transition-delay: 0.45s; }

/* ---------- home: hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: 52px; background: #39030f; }
.hero-photo {
  position: relative; width: min(100%, 640px); margin-inline: auto; container-type: inline-size;
  animation: hero-in 2.2s cubic-bezier(0.25, 0.7, 0.2, 1) both;
}
.hero-photo img {
  width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
@keyframes hero-in { from { opacity: 0; transform: scale(1.06); } }
/* Sits on the blank card in images/hero.jpg; adjust these four numbers if the image changes. */
.hero-card {
  position: absolute; left: 29.4%; top: 55.4%; width: 27.9%; height: 20.4%; margin: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #5a1620; line-height: 0.9; text-align: center;
  animation: card-in 1.6s ease 1.4s both;
}
.hero-card .script { font-size: 9.2cqw; margin-left: -1.2em; }
.hero-card .caps { font-size: 5.6cqw; margin-top: -0.28em; letter-spacing: -0.02em; }
.hero-card small { font-family: var(--display); font-size: 2.1cqw; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.5em; white-space: nowrap; }
.hero-card small i { font-family: var(--script); font-style: normal; text-transform: none; font-size: 1.5em; }
@keyframes card-in { from { opacity: 0; } }

/* ---------- home: save the date ---------- */
.save { text-align: center; padding: 56px 0 70px; }
.save h2 { font-size: clamp(34px, 9.4vw, 52px); line-height: 1.1; }
.ticket {
  width: min(44%, 250px); margin: 22px auto 0; padding: 26px 14px 16px;
  background: var(--ticket) radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.07), transparent 60%);
  color: #efe9e2; border-radius: 0 0 14px 14px; position: relative;
  -webkit-mask: radial-gradient(circle at 7px 0, transparent 5px, #000 5.6px) -7px 0 / 14px 100%;
          mask: radial-gradient(circle at 7px 0, transparent 5px, #000 5.6px) -7px 0 / 14px 100%;
}
.ticket-photo { aspect-ratio: 3 / 4.9; border-radius: 50%; width: 76%; margin: 0 auto; }
.ticket-names { margin-top: 16px; font-family: var(--display); font-size: clamp(10px, 2.75vw, 16px); text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }
.ticket-tear { margin: 14px -14px 12px; border-top: 2px dotted rgba(255, 255, 255, 0.75); position: relative; }
.ticket-tear::before, .ticket-tear::after {
  content: ""; position: absolute; top: -10px; width: 18px; height: 18px; border-radius: 50%; background: var(--cream);
}
.ticket-tear::before { left: -9px; }
.ticket-tear::after { right: -9px; }
.ticket-meta { font-family: var(--mono); font-size: clamp(7.5px, 2vw, 10px); line-height: 1.15; text-transform: uppercase; letter-spacing: 0.06em; display: grid; gap: 6px; }
.ticket-meta span { display: block; }
.ticket-meta .when { text-align: left; }
.ticket-meta .where { text-align: right; }
.barcode {
  height: clamp(26px, 7.4vw, 40px); margin-top: 10px;
  background: repeating-linear-gradient(90deg, #f3eee8 0 2px, transparent 2px 4px, #f3eee8 4px 5px, transparent 5px 8px, #f3eee8 8px 11px, transparent 11px 12px, #f3eee8 12px 13px, transparent 13px 17px);
}
.save .note { width: min(50%, 270px); margin: 20px auto 0; font-style: italic; font-size: 12.5px; line-height: 1.2; }
.save .note + .note { margin-top: 14px; }
.families { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: min(78%, 380px); margin: 26px auto 0; }
.family h3 { font-size: 13px; letter-spacing: 0.08em; margin-bottom: 3px; }
.family p { font-size: 12.5px; font-style: italic; line-height: 1.3; }

/* ---------- photos ---------- */
.photo {
  background: linear-gradient(140deg, #9a9087, #4d4640 55%, #24201d);
  background-size: cover; background-position: center;
  filter: grayscale(1) contrast(1.05);
  position: relative; overflow: hidden;
}
.photo:not(.has-photo)::after {
  content: "your photo"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6);
}

/* ---------- home: details teaser ---------- */
.teaser { padding: 54px 0 60px; }
.plate-link { display: block; position: relative; width: min(56%, 340px); aspect-ratio: 1 / 1.19; margin: 0 auto; text-decoration: none; container-type: inline-size; }
.plate { position: absolute; left: 27%; top: 5%; width: 68%; height: auto; filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.55)) brightness(0.92); }
.polaroid { position: absolute; background: #f3efe9; padding: 3% 3% 6%; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45); transition: transform 0.6s ease; }
.polaroid .photo { width: 100%; aspect-ratio: 1 / 1.12; }
.polaroid.p1 { left: 0; top: 2%; width: 47%; transform: rotate(8deg); }
.polaroid.p2 { left: 5%; top: 51%; width: 39%; transform: rotate(-5deg); }
.badge { position: absolute; right: -8%; top: 29%; width: 64%; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45)); transform: rotate(14deg); transition: transform 0.6s ease; }
.badge svg { width: 100%; }
.badge-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: var(--ink); line-height: 0.9; }
.badge-text .script { font-size: 15.5cqw; margin-left: -0.6em; }
.badge-text .caps { font-size: 11cqw; letter-spacing: -0.02em; }
.badge-text small { display: block; margin-top: 0.5em; font-family: var(--display); font-size: 4cqw; letter-spacing: 0.05em; text-transform: uppercase; }
.badge-text small i { font-family: var(--script); font-size: 1.5em; text-transform: none; font-style: normal; }
.plate-link:hover .badge, .plate-link:focus-visible .badge { transform: rotate(8deg) scale(1.04); }
.plate-link:hover .p1 { transform: rotate(5deg) translateY(-4px); }
.plate-link:hover .p2 { transform: rotate(-9deg) translateY(4px); }

/* ---------- home: love story ---------- */
.story { padding: 46px 0 30px; }
.story-head { text-align: center; margin-left: 34%; line-height: 0.8; }
.story-head .caps { display: block; font-size: clamp(24px, 6.6vw, 38px); letter-spacing: -0.03em; }
.story-head .script { display: block; font-size: clamp(30px, 8.6vw, 48px); margin-top: -0.12em; }
.story-grid { display: grid; grid-template-columns: 27% 1fr; gap: 9%; align-items: start; margin-top: 18px; }
.strip { background: #0f0d0c; padding: 5px 6px; display: grid; gap: 5px; transform: rotate(-3deg); margin-top: 26px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); }
.strip .photo { aspect-ratio: 1 / 1.22; border-radius: 2px; }
.story-text p { font-size: clamp(12.5px, 3vw, 15px); line-height: 1.3; font-style: italic; text-align: justify; hyphens: auto; }
.story-text p + p { margin-top: 1.1em; }
.story-text p:first-child::first-letter { font-family: var(--display); font-size: 2.5em; line-height: 0.8; padding-right: 0.06em; }
.ornament { width: clamp(70px, 20vw, 110px); height: auto; margin: 12px 0 0 34%; }

/* ---------- home: kindly reply ---------- */
.reply { padding: clamp(40px, 9vw, 70px) 0 clamp(90px, 22vw, 170px); overflow: hidden; }
.envelope {
  display: block; position: relative; width: min(62%, 400px); margin: 0 auto; container-type: inline-size;
  transform: rotate(11deg); filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.6)); text-decoration: none;
}
.envelope img { width: 100%; height: auto; filter: brightness(0.82) saturate(0.9); }
.envelope:hover, .envelope:focus-visible { transform: rotate(7deg) translateY(-6px); }
/* Sits on the flap of images/envelope.png, above the wax seal. */
.env-text { position: absolute; left: 0; right: 0; top: 5%; text-align: center; color: #f3e7e2; line-height: 0.8; }
.env-text .script { display: block; font-size: 15cqw; margin-left: -0.5em; }
.env-text .caps { display: block; font-size: 9.5cqw; margin-top: -0.3em; }
.env-text small { display: block; margin-top: 0.9em; font-family: var(--display); font-size: 3.3cqw; text-transform: uppercase; letter-spacing: 0.05em; }
.env-text small i { font-family: var(--script); font-style: normal; text-transform: none; font-size: 1.5em; }

/* ---------- footer ---------- */
.foot { background: var(--wine); text-align: center; padding: 46px 0 56px; color: var(--rose); }
.foot .logo { width: 92px; height: auto; margin: 0 auto 14px; }
.foot-names { font-family: var(--display); text-transform: uppercase; font-size: 20px; letter-spacing: 0.04em; }

/* ---------- details page ---------- */
.d-hero { position: relative; overflow: hidden; background: #24060a; }
.d-hero img { width: 100%; height: clamp(215px, 50vw, 430px); object-fit: cover; object-position: 50% 12%; filter: brightness(0.72) saturate(0.9); }
.d-title { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #fff; padding-top: 56px; line-height: 0.85; }
.d-title .script { font-size: clamp(44px, 12vw, 76px); color: rgba(255, 255, 255, 0.8); margin-bottom: -0.3em; margin-left: -0.5em; }
.d-title .caps { font-size: clamp(34px, 9.4vw, 60px); letter-spacing: -0.01em; }
.d-title small { display: block; margin-top: 26px; font-family: var(--display); font-size: clamp(13px, 3.6vw, 18px); text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255, 255, 255, 0.85); }
.d-title small i { font-family: var(--script); text-transform: none; font-style: normal; font-size: 1.5em; }
.js .letter { display: inline-block; opacity: 0; animation: letter-in 0.5s ease forwards; }
@keyframes letter-in { from { opacity: 0; transform: translateY(0.18em); } to { opacity: 1; transform: none; } }

.d-body { text-align: center; padding: 40px 0 70px; }
.block { margin-top: 44px; }
.block:first-child { margin-top: 0; }
.block h2.script { font-size: clamp(30px, 7.6vw, 44px); line-height: 1.1; color: #f3e3dd; }
.block h3.caps { font-size: clamp(13.5px, 3.4vw, 18px); margin-top: 4px; }
.address { font-style: italic; font-size: 12px; line-height: 1.25; margin-top: 6px; }
.address span { display: block; }
.when { font-size: 12px; letter-spacing: 0.08em; margin-top: 10px; }
.itin-item.solo { grid-column: 1 / -1; }
.info { margin-top: 26px; }
.info p { width: min(64%, 300px); margin: 10px auto 0; font-style: italic; font-size: 12px; line-height: 1.2; }

.btn {
  display: inline-block; margin-top: 14px; padding: 4px 18px; min-width: 104px;
  font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 12px; text-decoration: none; text-align: center;
  color: var(--rose); border: 1px solid currentColor; border-radius: 6px; outline: 1px solid currentColor; outline-offset: 2px;
  background: transparent; cursor: pointer; transition: background 0.3s ease, color 0.3s ease;
}
.btn:hover, .btn:focus-visible { background: var(--rose); color: var(--wine); }
.btn-dark { color: var(--ink); }
.btn-dark:hover, .btn-dark:focus-visible { background: var(--ink); color: var(--cream); }

.itin { list-style: none; padding: 0; margin: 18px auto 0; width: min(100%, 210px); display: grid; grid-template-columns: 1fr 1fr; gap: 22px 10px; align-items: start; }
.itin-item { display: grid; justify-items: center; }
.itin-item .ic { width: 54px; height: 54px; }
.itin-time { font-family: var(--display); font-size: 10.5px; letter-spacing: 0.05em; margin-top: 6px; }
.itin-label { font-size: 19px; line-height: 1; text-align: center; }
.palette { display: flex; justify-content: center; gap: 9px; margin-top: 16px; }
.swatch { width: 24px; height: 24px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); }

.stay { text-align: center; padding: 60px 0 70px; }
.stay .key { width: 60px; height: auto; margin: 0 auto 10px; }
.stay h2 { font-size: clamp(30px, 7.6vw, 44px); line-height: 1.1; }
.stay > .wrap > p { font-style: italic; font-size: 12px; line-height: 1.2; margin: 10px auto 0; width: min(100%, 330px); }
.hotel { margin-top: 38px; }
.hotel h3 { font-size: clamp(15px, 3.8vw, 20px); line-height: 0.95; width: min(100%, 190px); margin-inline: auto; }
.hotel p { font-style: italic; font-size: 12px; line-height: 1.2; width: min(100%, 220px); margin: 8px auto 0; }

/* ---------- rsvp page ---------- */
.rsvp { padding: 130px 0 70px; }
.rsvp-head { text-align: center; line-height: 0.8; color: #f3e3dd; }
.rsvp-head .script { display: block; font-size: clamp(52px, 14vw, 84px); margin-left: -0.3em; }
.rsvp-head .caps { display: block; font-size: clamp(34px, 9.4vw, 56px); margin-top: -0.28em; }
.rsvp-head small { display: block; margin-top: 10px; font-family: var(--display); font-size: clamp(12px, 3vw, 16px); text-transform: uppercase; letter-spacing: 0.04em; }
.rsvp-head small i { font-family: var(--script); text-transform: none; font-style: normal; font-size: 1.5em; margin-right: 0.2em; }
.rsvp-intro { text-align: center; font-style: italic; font-size: 14px; line-height: 1.3; margin: 14px auto 0; }
.rsvp .wrap { width: min(100% - 96px, 420px); }
.rsvp form { margin-top: 20px; display: grid; gap: 24px; font-size: 14px; }
.field { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 7px; }
.field > label, .field > legend { font-style: italic; font-size: 14px; padding: 0; margin-bottom: 0; }
.field legend { margin-bottom: 10px; }
.rsvp input[type="text"], .rsvp textarea {
  width: 100%; background: transparent; border: 1px solid rgba(240, 220, 214, 0.85); color: #fff;
  font: inherit; padding: 7px 10px; border-radius: 0;
}
.rsvp textarea { min-height: 74px; resize: vertical; }
.rsvp input:focus-visible, .rsvp textarea:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span { display: block; padding: 7px 10px; background: rgba(255, 255, 255, 0.09); transition: background 0.25s ease, box-shadow 0.25s ease; }
.choice:hover span { background: rgba(255, 255, 255, 0.15); }
.choice input:checked + span { background: rgba(255, 255, 255, 0.24); box-shadow: inset 3px 0 0 var(--rose); }
.choice input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }
.submit {
  width: 100%; border: 0; padding: 8px; font: inherit; font-style: italic; font-size: 16px; color: var(--rose);
  background: rgba(255, 255, 255, 0.09); cursor: pointer; transition: background 0.25s ease;
}
.submit:hover, .submit:focus-visible { background: rgba(255, 255, 255, 0.2); }
.submit:disabled { opacity: 0.5; cursor: default; }
.rsvp-status { text-align: center; font-size: 13px; font-style: italic; min-height: 1.4em; margin-top: -18px; }
.rsvp-done { text-align: center; margin-top: 40px; }
.rsvp-done h2 { font-size: 54px; line-height: 1; }
.rsvp-done p { font-style: italic; margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .letter { opacity: 1; translate: none; }
}
