/* The invitation, once the envelope has opened. */

.page {
  background: var(--paper);
  min-height: 100%;
  min-height: 100dvh;
  color: var(--ink);
}
.page:focus { outline: none; }

.wrap {
  width: min(100%, 440px);
  margin: 0 auto;
  padding: max(36px, env(safe-area-inset-top)) var(--page-pad) 8px;
}

.invite {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-block: 12px 36px;
  text-align: center;
}
.invite h1 {
  margin: 0;
  color: var(--burgundy);
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(52px, 15vw, 88px);
  line-height: 0.92;
}
.invite h1 .amp {
  display: block;
  margin: 0.12em 0;
  color: var(--rose);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.32em;
  line-height: 1;
}
.date {
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 500;
  line-height: 1.25;
}
.date span {
  display: block;
  margin-bottom: 4px;
  color: var(--metal-deep);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track);
  text-transform: uppercase;
}

.page.on .invite > * { animation: lift 1.05s var(--ease-out) both; }
.page.on .invite > *:nth-child(2) { animation-delay: 0.12s; }
.page.on .reply { animation: lift 1.05s var(--ease-out) 0.24s both; }
@keyframes lift { from { opacity: 0; transform: translateY(16px); } }

.reply {
  display: grid;
  gap: 18px;
  width: 100%;
  text-align: left;
}
.reply label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track-tight);
  text-transform: uppercase;
}
.reply input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border: var(--ring) solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--paper-raised);
  color: var(--ink);
  font-size: 18px;
}
.reply input:focus {
  outline: none;
  border-color: var(--gold);
}

.stepper {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  overflow: hidden;
  border: var(--ring) solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--paper-raised);
}
.stepper button {
  min-height: 52px;
  border: 0;
  background: none;
  color: var(--burgundy);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.stepper button:hover { background: var(--champagne); }
.stepper input {
  width: 100%;
  border: 0;
  border-inline: var(--ring) solid var(--line);
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 24px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: center;
  -moz-appearance: textfield;
}
.stepper input::-webkit-inner-spin-button,
.stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; background: var(--champagne); }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.btn {
  justify-self: center;
  min-height: 52px;
  margin-top: 4px;
  padding: 16px 36px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--burgundy);
  color: var(--ivory);
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: var(--track);
  text-transform: uppercase;
  cursor: pointer;
}
.btn:hover { background: var(--envelope-deep); }
.btn:disabled { opacity: 0.65; cursor: wait; }

.err {
  margin: 0;
  color: var(--danger);
  font-size: 17px;
  text-align: center;
}

.thanks {
  padding: 28px 18px;
  border: var(--ring) solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  text-align: center;
}
.thanks .sc,
footer .mono {
  color: var(--burgundy);
  font-family: var(--font-script);
  line-height: 1;
}
.thanks .sc { font-size: 52px; }
.thanks p {
  margin: 10px 0 0;
  color: var(--ink-soft);
}

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px var(--page-pad) calc(48px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}
footer .mono { font-size: 52px; }
.eyebrow {
  color: var(--metal-deep);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track);
  text-transform: uppercase;
}
.ghost {
  padding: 12px;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: var(--track-tight);
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

@media (min-width: 800px) {
  .wrap { padding-top: 72px; }
  .invite { padding-bottom: 48px; }
}
