:root {
  color-scheme: light;
  --navy: #082849;
  --gold: #b58a38;
  --line: #d2b57c;
  --paper: #faf6ee;
}
* { box-sizing: border-box; }
html { background: var(--navy); }
body { margin: 0; color: var(--navy); font: 16px/1.65 Arial, sans-serif; }
button, input { font: inherit; color: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, a, label.choice { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; }
button:disabled { opacity: .4; cursor: default; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.invitation { width: min(100%, 1024px); margin-inline: auto; background: var(--paper); }
.art-crop {
  display: block; position: relative; overflow: hidden;
  aspect-ratio: var(--crop-w) / var(--crop-h);
}
.art-crop img {
  position: absolute; display: block; max-width: none; height: auto;
  width: calc(1024 * 100% / var(--crop-w));
  left: calc(var(--crop-x) * -100% / var(--crop-w));
  top: calc(var(--crop-y) * -100% / var(--crop-h));
}
.hero { margin: 0; }
.sections { display: grid; gap: 24px; padding: 24px 18px 28px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 3px; padding: 28px; }
h2, h3 { font-family: Georgia, "Times New Roman", serif; text-transform: uppercase; }
h2 { font-size: clamp(24px, 2.85vw, 30px); line-height: 1.25; letter-spacing: .045em; margin: 0; }
h3 { font-size: 18px; line-height: 1.4; letter-spacing: .01em; margin: 0; }
p { margin: 0; }
address { font-style: normal; font-size: 16px; line-height: 1.65; }
.flourish {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 138px; margin: 10px auto 24px; color: var(--gold);
  font: 15px/1 Georgia, serif;
}
.flourish::before, .flourish::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.flourish-start { margin: 8px 0 18px; width: 120px; }
.introduction { display: grid; grid-template-columns: 38% minmax(0, 1fr); align-items: center; gap: 28px; }
.portrait { width: 100%; }
.introduction-copy { position: relative; padding-right: 54px; }
.introduction h2 { font-size: 36px; }
.introduction p { font-size: 17px; line-height: 1.7; }
.introduction p + p { margin-top: 16px; }
.introduction-star { position: absolute; right: -18px; top: 35%; width: 70px; }
.celebration > h2, .practical > h2, .reply > h2, .program > h2 { text-align: center; }
.events { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.event { display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: center; gap: 18px; }
.event + .event { border-left: 1px solid var(--line); padding-left: 24px; }
.event-icon { width: 90px; }
.event-icon.glasses { width: 76px; justify-self: center; }
.event-date { font: 17px/1.5 Georgia, serif; color: #996c22; text-transform: uppercase; margin-top: 6px; }
.event-time { margin-block: 7px; font: 18px/1.5 Georgia, serif; text-transform: uppercase; }
.reply-layout { display: grid; grid-template-columns: minmax(0, .37fr) minmax(0, .63fr); gap: 22px; align-items: stretch; }
.program { padding: 28px 24px; background: linear-gradient(130deg, #062747, #021e38); color: #fffaf0; display: flex; flex-direction: column; }
.program h2 { font-size: 27px; }
.program .flourish { width: 80%; margin-bottom: 30px; }
.timeline { display: flex; flex: 1; flex-direction: column; justify-content: space-between; gap: 28px; list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; width: 1px; background: var(--line); left: 30px; top: 30px; bottom: 30px; }
.timeline li { display: grid; grid-template-columns: 60px minmax(0, 1fr); align-items: center; gap: 16px; position: relative; }
.timeline-icon { width: 60px; border-radius: 50%; }
.timeline time { display: block; font-size: 17px; letter-spacing: .04em; text-transform: uppercase; }
.timeline h3 { font: 16px/1.45 Arial, sans-serif; color: #e9bf68; margin-block: 4px; }
.timeline p { font-size: 14px; line-height: 1.5; }
.reply { padding: 26px 20px; }
.reply h2 { font-size: 27px; letter-spacing: .01em; }
.reply-intro { margin: 12px 0 24px; text-align: center; font-size: 15px; line-height: 1.6; }
.honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.form-privacy { margin-top: 14px; text-align: center; font-size: 13px; line-height: 1.5; }
.names { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 26px; }
.names label { min-width: 0; font-size: 14px; text-transform: uppercase; letter-spacing: .025em; }
.names input {
  display: block; width: 100%; min-height: 44px; margin-top: 7px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 5px; background: #fffdf8; font-size: 16px;
}
fieldset { min-width: 0; padding: 14px 12px 12px; border: 1px solid var(--line); border-radius: 5px; margin: 0; }
legend { padding-inline: 6px; font: 15px/1.4 Georgia, serif; text-transform: uppercase; text-align: center; }
.attendance { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 26px; }
.event-caption { text-align: center; font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
.choice { display: flex; align-items: center; gap: 9px; min-height: 44px; padding-block: 5px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.choice input { appearance: none; -webkit-appearance: none; flex: 0 0 17px; width: 17px; height: 17px; margin: 0; border: 1px solid var(--gold); border-radius: 50%; }
.choice input:checked { background: radial-gradient(circle, var(--navy) 0 42%, transparent 49%); }
.guests { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 18px 14px; margin-bottom: 24px; }
.counter-group { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; }
.counter-group + .counter-group { border-left: 1px solid var(--line); padding-left: 16px; }
.counter-group > label { grid-column: 1 / -1; text-align: center; font: 15px/1.5 Georgia, serif; text-transform: uppercase; margin-bottom: 10px; }
.step { width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 50%; font-size: 25px; line-height: 1; background: transparent; }
.step:hover:not(:disabled) { background: #f1e5cf; }
.count { appearance: textfield; -moz-appearance: textfield; width: 100%; min-width: 0; height: 42px; padding: 0; border: 0; text-align: center; background: transparent; font: bold 25px/1 Georgia, serif; }
.count::-webkit-inner-spin-button, .count::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.submit, .dialog-button {
  display: block; width: 100%; min-height: 48px; padding: 12px 16px;
  border: 1px solid var(--gold); border-radius: 7px;
  background: linear-gradient(#103354, #06233e); color: #f0cd7b;
  font: 18px/1.4 Georgia, serif; text-transform: uppercase; letter-spacing: .025em;
}
.submit span { margin-left: 12px; }
.submit:hover, .dialog-button:hover { background: #123e63; }
.locations { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 26px; }
.location { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 20px; }
.location + .location { border-left: 1px solid var(--line); padding-left: 28px; }
.location-icon { width: 76px; }
.location-pin { width: 65px; justify-self: center; }
.location h3 { margin-bottom: 10px; }
.contact { position: relative; overflow: hidden; padding: 20px 16px 24px; text-align: center; background: var(--navy); color: #fffaf0; }
.footer-corner { position: absolute; bottom: 0; width: 30%; max-width: 300px; pointer-events: none; }
.footer-left { left: 0; }
.footer-right { right: 0; }
.contact p, .contact a { position: relative; z-index: 1; }
.contact-heading { text-transform: uppercase; letter-spacing: .13em; font: 17px/1.4 Georgia, serif; }
.contact-name { margin-top: 4px; font: italic 34px/1.3 "Snell Roundhand", "Apple Chancery", cursive; color: #efc971; }
.contact a { display: inline-block; padding: 5px 12px; font-size: 20px; letter-spacing: .04em; text-decoration: none; }
.contact a:hover { text-decoration: underline; }
.contact a:focus-visible { outline-color: #f0cd7b; }
body:has(dialog[open]) { overflow: hidden; }
.reply-dialog { width: min(94vw, 620px); max-height: 90dvh; padding: 24px; overflow: auto; border: 1px solid var(--gold); border-radius: 12px; color: var(--navy); background: var(--paper); box-shadow: 0 16px 80px rgb(0 0 0 / 30%); font-size: 16px; line-height: 1.65; }
.reply-dialog::backdrop { background: rgb(3 24 47 / 78%); }
.dialog-header { display: flex; align-items: start; gap: 16px; margin-bottom: 20px; }
.dialog-header h2 { flex: 1; font-size: 26px; text-transform: none; }
.close-dialog { width: 44px; height: 44px; flex: 0 0 44px; padding: 0; margin-top: -8px; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 26px; }
.reply-dialog p { margin-bottom: 18px; }
.reply-dialog .dialog-button { margin-top: 20px; }
@media (max-width: 900px) {
  .panel { padding: 24px 20px; }
  .introduction { grid-template-columns: 36% minmax(0, 1fr); gap: 20px; }
  .introduction-copy { padding-right: 0; }
  .introduction-star { display: none; }
  .events { gap: 20px; }
  .event { grid-template-columns: 68px minmax(0, 1fr); gap: 12px; }
  .event + .event { padding-left: 20px; }
  .event-icon { width: 68px; }
  .event-icon.glasses { width: 58px; }
  .reply-layout { grid-template-columns: minmax(0, .35fr) minmax(0, .65fr); gap: 18px; }
  .program { padding-inline: 16px; }
  .program h2 { font-size: 23px; }
  .timeline li { gap: 12px; grid-template-columns: 50px minmax(0, 1fr); }
  .timeline-icon { width: 50px; }
  .timeline::before { left: 25px; }
  .timeline h3 { font-size: 15px; }
  .attendance { grid-template-columns: 1fr; }
  .location { grid-template-columns: 60px minmax(0, 1fr); gap: 14px; }
  .location-icon { width: 60px; }
}
@media (max-width: 680px) {
  .sections { gap: 22px; padding: 22px 12px 24px; }
  .panel { padding: 24px 20px; }
  h2, .program h2, .reply h2 { font-size: 25px; }
  .introduction { grid-template-columns: 1fr; gap: 24px; }
  .portrait { max-width: 395px; margin-inline: auto; }
  .introduction h2 { font-size: 32px; }
  .introduction p { font-size: 16px; line-height: 1.75; }
  .events { grid-template-columns: 1fr; gap: 24px; }
  .event { grid-template-columns: 74px minmax(0, 1fr); gap: 16px; }
  .event + .event { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
  .reply-layout { grid-template-columns: 1fr; gap: 22px; }
  .program { padding: 28px 26px; }
  .timeline { gap: 28px; }
  .timeline li { grid-template-columns: 60px minmax(0, 1fr); gap: 20px; }
  .timeline-icon { width: 60px; }
  .timeline::before { left: 30px; }
  .timeline h3 { font-size: 16px; }
  .names { gap: 12px; }
  .attendance { gap: 22px; }
  .attendance fieldset { padding: 16px; }
  .choice { font-size: 16px; min-height: 48px; }
  legend { font-size: 16px; }
  .reply-intro, .event-caption { font-size: 16px; }
  .guests { gap: 12px; padding: 16px 10px; }
  .counter-group { grid-template-columns: 36px minmax(0, 1fr) 36px; }
  .counter-group + .counter-group { padding-left: 12px; }
  .step { width: 36px; height: 44px; }
  .locations { grid-template-columns: 1fr; gap: 24px; }
  .location { grid-template-columns: 64px minmax(0, 1fr); gap: 18px; }
  .location + .location { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
  .contact { padding-block: 24px 30px; }
}
@media (max-width: 360px) {
  .names, .guests { grid-template-columns: 1fr; }
  .counter-group + .counter-group { border-left: 0; border-top: 1px solid var(--line); padding: 14px 0 0; }
  .event { grid-template-columns: 54px minmax(0, 1fr); gap: 12px; }
  .event-icon, .event-icon.glasses { width: 52px; }
}
@media print {
  html, body { background: white; }
  .invitation { width: 100%; }
  .panel, .hero { break-inside: avoid; }
  dialog { display: none !important; }
}
