:root {
  --wine: #724856;
  --wine-deep: #4d2d38;
  --rose: #c48e9a;
  --blush: #f6e9e7;
  --ivory: #fffdf9;
  --ink: #322b2c;
  --muted: #786d6d;
  --line: rgba(114, 72, 86, .17);
  --shadow: 0 22px 70px rgba(75, 43, 52, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(196, 142, 154, .16), transparent 22rem),
    radial-gradient(circle at 92% 36%, rgba(114, 72, 86, .10), transparent 20rem),
    #fbf7f5;
  font-family: 'Manrope', Arial, sans-serif;
  line-height: 1.55;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }

.page-shell {
  position: relative;
  z-index: 1;
  width: min(100% - 32px, 820px);
  margin: 0 auto;
  padding: 68px 0 42px;
}

.page-orb { position: fixed; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.orb-one { width: 360px; height: 360px; left: -220px; top: 220px; background: rgba(196, 142, 154, .09); }
.orb-two { width: 430px; height: 430px; right: -300px; bottom: 70px; background: rgba(114, 72, 86, .08); }

.hero { text-align: center; padding: 0 12px 36px; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--wine);
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.floral-line { display: inline-flex; align-items: center; gap: 12px; color: var(--rose); margin-bottom: 10px; }
.floral-line span { width: 45px; height: 1px; background: currentColor; }
.floral-line i { font-style: normal; font-size: 1rem; }
.hero h1 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .24em;
  margin: 0;
  color: var(--wine-deep);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(3.7rem, 12vw, 6.6rem);
  font-weight: 600;
  line-height: .9;
}
.hero h1 em { color: var(--rose); font-size: .58em; font-style: italic; font-weight: 500; }
.hero-copy { width: min(100%, 510px); margin: 24px auto 0; color: var(--muted); font-size: 1rem; }

.event-details {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px 18px;
  margin: 30px auto 0;
}
.event-detail {
  display: flex;
  align-items: center;
  min-width: 220px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
  background: rgba(255, 253, 249, .62);
  box-shadow: 0 10px 20px rgba(75, 43, 52, .03);
}
.detail-icon { display: grid; width: 34px; height: 34px; place-items: center; color: var(--wine); margin-right: 10px; font-size: 1.25rem; }
.event-detail small { display: block; color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.event-detail strong { display: block; color: var(--wine-deep); font-size: .9rem; font-weight: 700; }

.form-card, .success-card {
  border: 1px solid rgba(114, 72, 86, .13);
  border-radius: 24px;
  background: rgba(255, 253, 249, .96);
  box-shadow: var(--shadow);
}
.form-card { padding: clamp(26px, 6vw, 52px); }
.form-header { max-width: 530px; margin-bottom: 34px; }
.form-header .eyebrow { margin-bottom: 8px; }
h2 { margin: 0; color: var(--wine-deep); font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(2.2rem, 6vw, 3.2rem); font-weight: 600; line-height: 1; }
.form-header p:last-child { margin: 13px 0 0; color: var(--muted); font-size: .94rem; }

.field-group { margin: 0 0 25px; }
label, legend, .field-label { display: block; color: var(--wine-deep); font-size: .9rem; font-weight: 700; }
label > span[aria-hidden="true"], legend > span[aria-hidden="true"] { color: var(--rose); }
input[type="text"], textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 13px 15px;
  border: 1px solid rgba(114, 72, 86, .2);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
textarea { min-height: 120px; resize: vertical; }
input[type="text"]::placeholder, textarea::placeholder { color: #aaa1a1; }
input[type="text"]:focus, textarea:focus { border-color: var(--wine); box-shadow: 0 0 0 4px rgba(114, 72, 86, .09); }
.has-error { border-color: #b34558 !important; }
.field-error { min-height: 19px; margin: 5px 0 0; color: #a1364b; font-size: .79rem; font-weight: 600; }
.field-help { margin: 5px 0 10px; color: var(--muted); font-size: .79rem; }

fieldset { min-width: 0; padding: 0; border: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin-top: 10px; }
.choice-card { position: relative; display: flex; gap: 12px; align-items: flex-start; min-height: 100px; padding: 18px; border: 1px solid rgba(114, 72, 86, .18); border-radius: 15px; background: #fff; cursor: pointer; transition: .2s ease; }
.choice-card:hover { border-color: rgba(114, 72, 86, .45); transform: translateY(-1px); }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card:has(input:checked) { border-color: var(--wine); box-shadow: 0 0 0 4px rgba(114, 72, 86, .08); background: #fffafa; }
.choice-card strong { display: block; color: var(--wine-deep); font-size: .87rem; }
.choice-card small { display: block; margin-top: 4px; color: var(--muted); font-size: .74rem; line-height: 1.35; font-weight: 500; }
.choice-icon { display: grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; border: 1px solid rgba(114, 72, 86, .28); border-radius: 50%; color: var(--wine); font-size: 1rem; }
.choice-card:has(input:checked) .choice-icon { color: #fff; border-color: var(--wine); background: var(--wine); }

.attending-fields { margin: 0 0 25px; padding: 22px 0 0; border-top: 1px solid var(--line); animation: fieldReveal .28s ease; }
.attending-fields[hidden] { display: none; }
@keyframes fieldReveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.form-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; }
.sleeping-field { margin: 0; }
.field-label { margin-bottom: 8px; }
.checkbox-card { display: flex; min-height: 50px; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid rgba(114, 72, 86, .2); border-radius: 12px; background: #fff; cursor: pointer; }
.checkbox-card input { position: absolute; opacity: 0; }
.checkmark { display: grid; width: 21px; height: 21px; flex: 0 0 21px; place-items: center; border: 1px solid rgba(114, 72, 86, .4); border-radius: 6px; }
.checkbox-card input:checked + .checkmark { border-color: var(--wine); background: var(--wine); }
.checkbox-card input:checked + .checkmark::after { content: '✓'; color: #fff; font-size: .83rem; }
.checkbox-card strong { display: block; color: var(--wine-deep); font-size: .82rem; }
.checkbox-card small { display: block; color: var(--muted); font-size: .68rem; font-weight: 500; line-height: 1.25; }

.guests-section { margin: 24px 0 0; }
.label-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.text-button { padding: 0; border: 0; color: var(--wine); background: none; font-size: .8rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--wine-deep); }
.extra-guests { display: grid; gap: 9px; }
.guest-row { display: flex; align-items: center; gap: 9px; }
.guest-row input { margin-top: 0; }
.remove-guest { width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid rgba(114, 72, 86, .18); border-radius: 10px; color: var(--wine); background: #fff; font-size: 1.35rem; line-height: 1; }
.remove-guest:hover { border-color: var(--wine); background: var(--blush); }

.textarea-meta { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: .72rem; }
.privacy-note { display: flex; gap: 9px; align-items: flex-start; margin: 7px 0 22px; padding: 12px 13px; border-radius: 10px; color: var(--muted); background: var(--blush); font-size: .76rem; }
.privacy-note span { color: var(--wine); }
.privacy-note p { margin: 0; }
.submit-button { display: inline-flex; width: 100%; justify-content: center; align-items: center; gap: 14px; padding: 15px 20px; border: 0; border-radius: 12px; color: #fff; background: var(--wine); box-shadow: 0 12px 22px rgba(114, 72, 86, .25); font-weight: 700; transition: transform .2s ease, background .2s ease; }
.submit-button:hover { background: var(--wine-deep); transform: translateY(-2px); }
.submit-button:active { transform: translateY(0); }

.success-card { display: flex; gap: 15px; align-items: center; margin: 0 0 22px; padding: 20px 22px; background: #fffdf9; }
.success-mark { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 50%; color: #fff; background: var(--wine); font-size: 1.2rem; }
.success-card h2 { font-size: 1.75rem; }
.success-card p { margin: 3px 0 0; color: var(--muted); font-size: .86rem; }
.page-footer { padding: 28px 0 0; text-align: center; color: var(--muted); font-size: .76rem; }
.page-footer p { margin: 0; }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

@media (max-width: 620px) {
  .page-shell { width: min(100% - 22px, 820px); padding-top: 42px; }
  .hero { padding-bottom: 28px; }
  .event-detail { width: 100%; min-width: 0; }
  .choice-grid, .form-grid { grid-template-columns: 1fr; }
  .form-card { border-radius: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; }
}
