/* Save the Date. Change the colors here. */
:root {
  --bg: #fbf7f0;
  --card: #fffdf9;
  --ink: #3b3127;
  --muted: #7a6d5e;
  --gold: #b08d57;
  --gold-dark: #8a6a37;
  --line: #e8dcc8;
  --sage: #8c9a7a;
  --serif: "Cormorant Garamond", "Garamond", "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 19px/1.6 var(--serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--gold-dark); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.sprig { position: fixed; width: clamp(120px, 18vw, 220px); height: auto; fill: none; stroke: var(--sage); stroke-width: 1.6; stroke-linecap: round; opacity: 0.8; pointer-events: none; }
.sprig path + path { fill: rgb(140 154 122 / 0.12); }
.sprig-left { left: -10px; bottom: -10px; }
.sprig-right { right: -10px; top: -10px; transform: rotate(180deg); }
.sprig path:first-child { stroke-dasharray: 400; animation: grow 3s ease-out both; }

.card {
  position: relative;
  width: min(640px, 100% - 32px);
  margin: clamp(24px, 6vw, 64px) auto;
  padding: clamp(32px, 6vw, 64px) clamp(20px, 6vw, 64px);
  background: var(--card);
  border: 1px solid var(--line);
  outline: 1px solid var(--line);
  outline-offset: -14px;
  text-align: center;
  box-shadow: 0 20px 60px rgb(59 49 39 / 0.08);
}

.kicker { margin: 0 0 12px; color: var(--gold-dark); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.75rem; letter-spacing: 0.4em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(3rem, 11vw, 5.4rem); font-weight: 400; font-style: italic; line-height: 1; }
h1 span { display: inline-block; }
h1 i { display: inline-block; margin: 0 0.1em; color: var(--gold); font-weight: 300; }
.invite { margin: 8px 0 32px; color: var(--muted); font-size: 1.2rem; font-style: italic; }

.date { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 0 0 12px; }
.date strong { padding: 6px 18px; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); font-size: clamp(1.6rem, 5vw, 2.2rem); font-weight: 500; letter-spacing: 0.08em; }
.date span { color: var(--muted); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase; }
.venue { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 28px; color: var(--muted); }
.venue svg { width: 18px; height: 18px; color: var(--gold); stroke-width: 1.5; }

.countdown { display: flex; justify-content: center; gap: 24px; margin-bottom: 40px; color: var(--muted); font-style: italic; }
.countdown p { margin: 0; }
.countdown span { display: block; color: var(--ink); font-size: 2rem; font-style: normal; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }

.rsvp { padding-top: 32px; border-top: 1px solid var(--line); text-align: left; }
.rsvp h2 { margin: 0 0 20px; font-size: 1.6rem; font-weight: 400; font-style: italic; text-align: center; }
form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-wide, fieldset.field { grid-column: 1 / -1; }
.field > label, legend { color: var(--muted); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; }
legend { margin-bottom: 8px; padding: 0; }
input:not([type="radio"]), select, textarea {
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid var(--gold);
  background: transparent;
  color: var(--ink);
  font: inherit;
}
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }
.choice { display: inline-flex; align-items: center; gap: 10px; margin-right: 24px; font-size: 1.1rem; }
.choice input { width: 18px; height: 18px; accent-color: var(--gold-dark); }
button {
  grid-column: 1 / -1;
  justify-self: center;
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 8px;
  padding: 14px 36px;
  border: 1px solid var(--gold-dark);
  background: var(--gold-dark);
  color: var(--card);
  font: 600 0.82rem ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}
button svg { width: 16px; height: 16px; }
button:hover { background: transparent; color: var(--gold-dark); }
.note { grid-column: 1 / -1; min-height: 1.6em; margin: 0; color: var(--gold-dark); font-style: italic; text-align: center; }

.foot { margin: 32px 0 0; color: var(--muted); font-size: 0.95rem; font-style: italic; }

@media (max-width: 560px) {
  form { grid-template-columns: 1fr; }
  .date { flex-direction: column; gap: 6px; }
  .sprig { opacity: 0.4; }
}

@keyframes grow { from { stroke-dashoffset: 400; } }

@media (prefers-reduced-motion: reduce) {
  .sprig path:first-child { animation: none; }
  button { transition: none; }
}
