:root {
  --gold: #f5e1b6;
  --cream: #faf7ef;
  --ink: #303b37;
  --accent: #505d55;
  --script: "Marck Script", "Segoe Script", cursive;
  --serif: "Cormorant Garamond", Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #e9e7df; font: 600 22px/1.45 var(--serif); text-align: center; }
p, h1, h2, figure { margin: 0; }
h1, h2, .signature { font: 400 1em/1 var(--script); }
h2 { font-size: clamp(42px, 8vw, 68px); }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.cover, footer { background: #4d5651 url("satin.svg") center / cover; color: var(--cream); }
.cover { position: relative; min-height: 100svh; display: grid; place-content: center; justify-items: center; padding: 52px 20px; isolation: isolate; }
.cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(#272b252b,#272e2b72); z-index: -1; }
.date-rail { position: absolute; inset: 9% auto 27% max(5%,calc((100% - 1020px)/2)); padding-right: 12px; border-right: 1px solid #ffffffa0; line-height: 1.25; font-size: 20px; }
.intro { font-size: clamp(20px, 4vw, 27px); color: var(--gold); margin-bottom: 10px; }
.cover h1 { font-size: clamp(79px, 17vw, 170px); text-shadow: 0 2px 20px #262b2550; }
.age { font-size: clamp(140px, 25vw, 225px); line-height: .76; margin-top: 18px; letter-spacing: -.065em; color: var(--gold); }
.age span { display: flex; justify-content: center; align-items: center; gap: 13px; font-size: 25px; font-style: italic; letter-spacing: 0; margin-top: 20px; }
.age span::before,.age span::after { content: ""; width: clamp(54px, 12vw, 125px); height: 1px; background: #d6bd87b0; }
.date { margin: 21px 0 25px; font-size: 25px; }
.date b { color: var(--gold); }
.open { display: flex; align-items: center; gap: 18px; min-width: min(325px, 88vw); background: #282e2bcc; border: 1px solid #ffffff63; border-radius: 99px; padding: 5px 20px 5px 5px; color: white; font: 600 14px system-ui,sans-serif; text-decoration: none; }
.open span { display: grid; place-items: center; background: #fff; color: var(--ink); width: 42px; height: 42px; border-radius: 50%; font-size: 22px; }
.open:hover { background: #202923; }
.paper { max-width: 770px; margin: auto; background: #fbf8f0; padding: clamp(42px, 8vw, 85px) clamp(20px, 7vw, 75px); }
.ornament { color: #8d7952; letter-spacing: .3em; font-size: 12px; margin: 0 auto 15px; }
#greeting { scroll-margin-top: 22px; }
#greeting p { max-width: 470px; margin: 22px auto 0; }
.signature { font-size: clamp(31px, 6vw, 44px); }
.calendar { margin: 42px auto; border-block: 1px solid #b3a689; max-width: 420px; padding: 22px 0; }
.calendar h2 { font-size: 43px; }
.date-card { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: center; font-size: clamp(13px, 4vw, 19px); }
.date-card strong { font-size: clamp(76px, 16vw, 106px); line-height: 1; }
.calendar p { letter-spacing: .45em; font-size: 17px; padding-left: .45em; }
figure { width: min(100%, 330px); margin: 42px auto; padding: 7px; border: 1px solid #ae9f7a; border-radius: 45% 45% 5px 5px; }
figure img { display: block; width: 100%; height: auto; border-radius: 45% 45% 2px 2px; }
.place { font-size: 30px; margin-top: 14px; }
address { font: inherit; margin: 11px 0; }
.map, button[type=submit] { display: inline-block; border: 0; border-radius: 99px; margin-top: 18px; padding: 15px 23px; background: #42534a; color: white; text-decoration: none; font: 600 14px system-ui,sans-serif; cursor: pointer; }
.map:hover,button[type=submit]:hover { background: #25342d; }
.reply { max-width: 770px; margin: auto; padding: 58px 22px; background: #dce0d7; scroll-margin-top: 18px; }
.reply h2 { margin: 13px 0; }
.label, form { font: 600 14px/1.45 system-ui,sans-serif; }
.label { text-transform: uppercase; letter-spacing: .13em; font-size: 11px; }
form { background: #fbf9f2; border-radius: 18px; max-width: 455px; padding: clamp(17px, 5vw, 29px); margin: 25px auto 0; text-align: left; }
input[name=name] { display: block; width: 100%; padding: 12px; margin: 7px 0 19px; font: inherit; border: 1px solid #aab2a7; border-radius: 7px; }
fieldset { padding: 0; border: 0; margin: 0; }
legend { margin-bottom: 7px; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { display: flex; align-items: center; gap: 6px; border: 1px solid #aab2a7; padding: 9px; border-radius: 8px; cursor: pointer; }
.choices label:has(:checked) { background: #dce0d7; border-color: #42534a; }
.choices input { accent-color: #42534a; }
form button { width: 100%; }
form button:disabled { opacity: .65; }
#reply-status:not(:empty) { margin-top: 12px; }
footer { padding: 54px 16px 64px; }
footer .ornament,footer h2 { color: var(--gold); }
#countdown p { margin: 12px 0; }
.clock { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; max-width: 360px; margin: auto; }
.clock div { border: 1px solid #e2d5b790; border-radius: 7px; padding: 8px 2px; background: #29332eca; }
.clock strong,.clock span { display: block; }
.clock strong { color: var(--gold); font-size: 31px; line-height: 1; }
.clock span { font-size: 15px; }
@media(max-width:620px) { .date-rail { display: none; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } }


/* Moving fabric and the cover's sliding invitation link */
.cover { overflow: hidden; background: #4d5651; }
.cover::before {
  inset: -12%;
  background: url("satin.svg") center / cover;
  transform: scale(1.02);
  animation: satin-sway 13s ease-in-out infinite alternate;
}
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(#29322b44, #222a26a0),
    linear-gradient(112deg, transparent 32%, #fff3d542 49%, transparent 64%);
  background-size: 100% 100%, 240% 100%;
  animation: satin-light 11s ease-in-out infinite alternate;
}
.cover h1 { font-size: clamp(55px, 17vw, 170px); }
@keyframes satin-sway {
  from { transform: translate3d(-3%, -2%, 0) scale(1.025) rotate(-1.5deg); }
  to { transform: translate3d(4%, 2%, 0) scale(1.12) rotate(2.2deg); }
}
@keyframes satin-light {
  from { background-position: 0 0, 100% 0; }
  to { background-position: 0 0, 0 0; }
}
.open {
  --slide: 0px;
  width: min(340px, 87vw);
  min-width: 0;
  min-height: 56px;
  position: relative;
  isolation: isolate;
  justify-content: center;
  padding: 5px 47px;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  background: #282e2bb8;
  backdrop-filter: blur(8px);
  -webkit-tap-highlight-color: transparent;
}
.open .open-thumb {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 42px;
  height: 42px;
  box-shadow: 0 2px 8px #0004;
  transform: translateX(var(--slide));
  transition: transform .25s ease;
}
.open .open-label { color: white; background: none; width: auto; height: auto; display: block; border-radius: 0; font: inherit; }
.open::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, #fff8 49%, transparent 68%);
  background-size: 280% 100%;
  animation: open-glint 3.8s ease-in-out infinite;
}
@keyframes open-glint {
  0%, 20% { background-position: 110% 0; }
  72%, 100% { background-position: -25% 0; }
}
.open:not(.dragging):not(.opening):hover .open-thumb,
.open:not(.dragging):not(.opening):focus-visible .open-thumb { transform: translateX(9px); }
.open.dragging .open-thumb { transition: none; }
.open.opening .open-label { opacity: .65; }
.open.opening::before, .open.dragging::before { animation-play-state: paused; opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .cover::before, .cover::after, .open::before { animation: none; }
  .open .open-thumb { transition: none; }
}


.menu-preferences { margin-top: 22px; padding-top: 19px; border-top: 1px solid #d6d3c4; }
.menu-preferences h3 { margin: 0 0 5px; font: 600 28px/1.1 var(--serif); }
.menu-hint { font-size: 13px; color: #53605a; }
.menu-preferences fieldset { margin-top: 18px; }
.menu-preferences legend { font-weight: 700; margin-bottom: 3px; }


.cover .honoree { margin-top: 2px; color: var(--cream); font: italic 500 clamp(26px, 5vw, 42px)/1 var(--serif); }
#greeting .surprise { border: 1px solid #d7c8a8; border-radius: 14px; padding: 16px 18px; background: #f5eee0; }
#greeting .surprise strong { display: block; }
.menu-preferences .party-size { margin: 0 0 21px; padding-bottom: 20px; border-bottom: 1px solid #d6d3c4; }
.party-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 10px; }
.party-fields label { display: grid; gap: 5px; }
.party-fields input { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #aab2a7; border-radius: 8px; background: #fffdf7; color: var(--ink); font: inherit; }

.cover h1 .honoree { display: block; }

.cover .honoree { max-width: min(95vw, 620px); font-size: clamp(23px, 5vw, 42px); text-wrap: balance; }
.reply .reply-intro { max-width: 460px; margin: 10px auto 0; font-size: 20px; }
.menu-preferences .party-size { margin: 0 0 15px; padding-bottom: 0; border-bottom: 0; }
.guest-list { display: block; margin-bottom: 6px; }
#guest-list { display: block; resize: vertical; width: 100%; padding: 10px; border: 1px solid #aab2a7; border-radius: 8px; background: #fffdf7; color: var(--ink); font: inherit; }
#guest-list-help { margin-top: 6px; }


