:root {
  --bg: #fff8ef;
  --ink: #2d2244;
  --ink-soft: #6f6590;
  --accent: #6fb28d;       /* green from photo */
  --accent-2: #9b7ec9;     /* purple from photo */
  --accent-soft: rgba(111, 178, 141, 0.22);
  --accent-bg: #eaf5ef;
  --card: #ffffff;
  --ring: #2d2244;
  --radius: 22px;
  --shadow: 0 20px 50px -20px rgba(45, 34, 68, 0.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: linear-gradient(180deg, rgba(255, 248, 239, 0.55), rgba(255, 248, 239, 0.25)), url('/photos/IMG_5688.JPG');
  background-size: 20%;
  background-position: center top;
  background-attachment: fixed;
}

.wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(43, 36, 64, 0.06);
}

.invite { text-align: center; }

.eyebrow {
  margin: 0 0 12px;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}

.headline {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-weight: 800;
  line-height: 1;
  margin: 0 0 20px;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  flex-wrap: nowrap;
}
.headline .name {
  font-size: clamp(56px, 12vw, 96px);
  color: var(--accent-2);
  font-weight: 800;
  -webkit-text-stroke: 2px var(--accent);
  paint-order: stroke fill;
}
.headline .turning {
  font-size: clamp(22px, 4.5vw, 34px);
  font-weight: 600;
  color: var(--ink-soft);
  font-family: 'IBM Plex Sans', sans-serif;
  font-style: normal;
}
.headline .one {
  font-size: clamp(56px, 12vw, 96px);
  color: var(--accent);
  letter-spacing: 0.02em;
  font-weight: 800;
  -webkit-text-stroke: 2px var(--accent-2);
  paint-order: stroke fill;
}

.subhead {
  margin: 4px 0 28px;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: clamp(18px, 3.6vw, 24px);
  color: var(--ink-soft);
}

.details {
  list-style: none;
  padding: 0;
  margin: 8px 0 20px;
  display: grid;
  gap: 18px;
  text-align: left;
}
.details li {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px dashed rgba(43, 36, 64, 0.15);
}
.details li:last-child { border-bottom: 1px dashed rgba(43, 36, 64, 0.15); }
.details .label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.details .value {
  font-size: 17px;
  line-height: 1.45;
}
.details a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }

.note {
  margin: 20px 0 0;
  font-size: 15px;
  color: var(--ink-soft);
  font-style: italic;
}

.rsvp h2 {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-weight: 700;
  font-size: 36px;
  margin: 0 0 4px;
}
.rsvp .sub {
  margin: 0 0 24px;
  color: var(--ink-soft);
}

form { display: grid; gap: 18px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink); }
label em { color: var(--ink-soft); font-style: normal; font-weight: 400; }

input[type="text"],
input[type="email"],
input[type="number"],
textarea {
  font: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(43, 36, 64, 0.15);
  background: #fdfbf7;
  color: var(--ink);
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
textarea { resize: vertical; min-height: 80px; }

fieldset.attending {
  border: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
fieldset legend {
  font-size: 14px;
  font-weight: 500;
  padding: 0;
  margin-bottom: 8px;
}
.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid rgba(43, 36, 64, 0.12);
  border-radius: 12px;
  cursor: pointer;
  background: #fdfbf7;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
}
.radio:hover { border-color: var(--accent); }
.radio input { accent-color: var(--accent); margin: 0; }
.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); }

button[type="submit"] {
  font: inherit;
  font-weight: 600;
  font-size: 17px;
  padding: 14px 20px;
  border-radius: 999px;
  border: none;
  background: var(--accent-2);
  color: #fff;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}
button[type="submit"]:hover { background: #4f9e75; }
button[type="submit"]:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}
button[type="submit"]:active { transform: translateY(1px); }
button[type="submit"]:disabled { opacity: 0.6; cursor: progress; }

.status {
  margin: 4px 0 0;
  min-height: 20px;
  font-size: 14px;
  color: var(--ink-soft);
}
.status.success { color: #207a4f; }
.status.error { color: #b3383c; }

.foot {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 15% 0%;
  color: var(--ink-soft);
  font-size: 14px;
  text-shadow: 1px 1px 1px #FFF;
}

@media (max-width: 480px) {
  .card { padding: 28px 20px; }
  .details li { grid-template-columns: 60px 1fr; gap: 12px; }
}
