:root{
  --bg: #fbf7f1;
  --panel: rgba(255,255,255,0.72);
  --ink: #2a2623;
  --muted: rgba(42,38,35,0.72);
  --line: rgba(54,45,38,0.14);
  --accent: #8e6e5a;
  --danger: #b34040;
}

*,
*::before,
*::after{
  box-sizing: border-box;
}

body{
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1000px 600px at 20% 0%, rgba(225,211,193,0.34), transparent 58%),
    radial-gradient(860px 580px at 90% 10%, rgba(164,179,154,0.20), transparent 54%),
    linear-gradient(180deg, #fbf7f1 0%, #fffdf7 100%);
}

.rsvp-page{
  width: min(860px, calc(100% - 28px));
  margin: 38px auto;
}

.rsvp-card{
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: 0 20px 70px rgba(20,16,12,0.08);
  padding: clamp(20px, 4vw, 34px);
}

.rsvp-head{
  text-align: center;
  margin-bottom: 24px;
}

.rsvp-kicker{
  margin: 0 0 10px;
  color: rgba(42,38,35,0.6);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 11px;
}

h1{
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.rsvp-desc{
  margin: 0 auto;
  max-width: 66ch;
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
}

form{
  display: grid;
  gap: 16px;
}

.field{
  display: grid;
  gap: 8px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(54,45,38,0.1);
  border-radius: 16px;
  background: rgba(255,255,255,0.42);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.field legend,
.field label{
  font-size: 14px;
  font-weight: 550;
}

.req{
  color: var(--danger);
}

input[type="text"],
input[type="email"],
input[type="tel"]{
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(54,45,38,0.16);
  background: rgba(255,255,255,0.9);
  color: var(--ink);
  padding: 0 12px;
  font-size: 14px;
}

input:focus-visible{
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(142,110,90,0.16);
}

fieldset{
  margin: 0;
}

.option-row{
  display: flex;
  gap: 10px;
}

.option-row.wrap{
  flex-wrap: wrap;
}

.choice{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(54,45,38,0.14);
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  padding: 9px 12px;
  font-size: 14px;
}

.choice input{
  accent-color: var(--accent);
}

.conditional{
  display: grid;
  gap: 16px;
}

.error{
  min-height: 16px;
  margin: 0;
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.3;
}

.field.is-invalid{
  border-color: rgba(179,64,64,0.72);
  box-shadow: 0 0 0 4px rgba(179,64,64,0.14);
}

.status{
  margin: 2px 0 0;
  min-height: 20px;
  font-size: 13.5px;
  line-height: 1.45;
}

.status.is-success{
  color: #21683a;
}

.status.is-error{
  color: var(--danger);
}

.submit-btn{
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  height: 44px;
  border: 1px solid rgba(54,45,38,0.16);
  border-radius: 999px;
  padding: 0 18px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.9);
  color: var(--ink);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.submit-btn:hover{
  transform: translateY(-1px);
  background: #fff;
  box-shadow: 0 10px 30px rgba(20,16,12,0.1);
}

.submit-btn:disabled{
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

@media (max-width: 640px){
  .rsvp-page{
    width: calc(100% - 16px);
    margin: 14px auto 20px;
  }

  .rsvp-card{
    border-radius: 20px;
    padding: 14px;
  }

  .field{
    padding: 12px 10px 10px;
  }

  .option-row{
    flex-wrap: wrap;
  }
}
