:root {
  --cream: #fff2e4;
  --cream-2: #ffead0;
  --ink: #17191d;
  --green: #367e63;
  --green-dark: #087b58;
  --mint: #76dfcc;
  --red: #ef4655;
  --pink: #f5b7c3;
  --yellow: #f4b51b;
  --gold: #a37a00;
  --blue: #1c5791;
  --white: #fffdf9;
  --shadow: rgba(23, 25, 29, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "Gaegu", cursive;
}
a { color: inherit; }

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 48px;
  background: var(--cream);
}

.hero-invitation-img {
  display: block;
  width: min(100%, 520px);
  height: auto;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(23, 25, 29, .10);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 24px;
}

.paper-card {
  position: relative;
  width: min(100%, 620px);
  background: var(--cream);
  border-radius: 48px 58px 52px 62px / 55px 48px 58px 50px;
  box-shadow: 0 20px 55px var(--shadow);
  border: 1px solid rgba(23,25,29,.04);
}

.section-kicker {
  font-family: "Montserrat", sans-serif;
  font-size: .68rem;
  letter-spacing: .23em;
  font-weight: 700;
  margin: 0 0 10px;
}

.primary-btn, .secondary-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  border-radius: 999px;
  font-family: "Montserrat", sans-serif;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 14px 22px;
  margin-top: 16px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.primary-btn {
  background: var(--ink);
  color: var(--white);
  box-shadow: 5px 5px 0 rgba(239,70,85,.75);
}
.secondary-btn {
  background: var(--cream-2);
  border: 2px solid var(--ink);
}
.primary-btn:hover, .secondary-btn:hover { transform: translateY(-2px) rotate(-.5deg); }
.primary-btn span { font-size: 1.2rem; }
.wide { width: 100%; }

.scroll-hint {
  margin-top: 15px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
}

.section-wrap {
  position: relative;
  padding: 30px 16px;
  background: var(--cream);
}
.section-wrap:nth-of-type(odd) { background: #fffaf2; }

.section-card {
  margin: auto;
  padding: 48px 28px;
  max-width: 720px;
  text-align: center;
  overflow: hidden;
}
.section-star, .scribble-star {
  font-size: 44px;
  margin-bottom: 8px;
}
.section-card h2 {
  margin: 0;
  font-size: clamp(3.1rem, 12vw, 5.3rem);
  line-height: .78;
  letter-spacing: .02em;
}
.lead {
  max-width: 540px;
  margin: 24px auto 0;
  font-size: 1.5rem;
  line-height: 1.05;
  font-weight: 700;
}
.detail-grid {
  display: grid;
  gap: 15px;
  margin-top: 32px;
}
.detail {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  text-align: left;
  padding: 18px;
  background: rgba(255,234,208,.68);
  border-radius: 25px 20px 27px 22px;
}
.detail-icon { font-size: 28px; }
.detail h3 {
  font-size: 1.8rem;
  margin: 0;
  line-height: .9;
}
.detail p {
  margin: 7px 0 0;
  font-size: 1.15rem;
  line-height: 1.05;
  font-weight: 700;
}

.placeholder {
  margin-top: 26px;
  padding: 20px;
  border: 2px dashed rgba(23,25,29,.35);
  border-radius: 24px;
  display: flex;
  gap: 15px;
  text-align: left;
  align-items: center;
  background: rgba(255,253,249,.5);
}
.placeholder-icon { font-size: 35px; }
.placeholder strong, .qr-placeholder strong { font-size: 1.45rem; }
.placeholder p, .qr-placeholder p {
  margin: 3px 0 0;
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
}
code {
  font-family: monospace;
  font-size: .75em;
  background: #fff;
  padding: 2px 5px;
  border-radius: 5px;
}

.gift-art {
  margin: 28px auto 0;
  max-width: 470px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 12px 30px var(--shadow);
}
.gift-art img {
  display: block;
  width: 100%;
  height: auto;
}
.qr-placeholder {
  margin-top: 24px;
  padding: 18px;
  background: rgba(255,234,208,.68);
  border-radius: 24px;
  display: flex;
  gap: 18px;
  align-items: center;
  text-align: left;
}
.qr-fake {
  flex: 0 0 92px;
  width: 92px;
  height: 92px;
  padding: 7px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  background: white;
  border: 5px solid white;
}
.qr-fake span { background: var(--ink); }
.qr-fake span:nth-child(2),
.qr-fake span:nth-child(7),
.qr-fake span:nth-child(10),
.qr-fake span:nth-child(14) { background: transparent; }

/* ── RSVP Form ─────────────────────────────────────── */

#rsvp-form-wrap {
  width: 100%;
  text-align: left;
}
#rsvp-form-wrap h2,
#rsvp-form-wrap .lead {
  text-align: center;
}

.rsvp-field {
  margin-top: 22px;
}

.rsvp-field-label {
  display: block;
  font-family: "Montserrat", sans-serif;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--ink);
}

.rsvp-input {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid rgba(23,25,29,.18);
  border-radius: 18px;
  background: var(--white);
  font-family: "Gaegu", cursive;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rsvp-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(54,126,99,.15);
}
.rsvp-input.is-invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239,70,85,.12);
}

.rsvp-textarea {
  resize: vertical;
  min-height: 90px;
}

.rsvp-optional {
  font-weight: 500;
  opacity: .55;
  text-transform: none;
  letter-spacing: 0;
}

.rsvp-field-error {
  margin: 5px 0 0;
  font-family: "Montserrat", sans-serif;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--red);
  min-height: 1em;
}

/* Attending toggle buttons */
.rsvp-toggle-group {
  border: none;
  padding: 0;
  margin: 22px 0 0;
  display: flex;
  flex-direction: column;
}
.rsvp-toggle-group legend {
  display: block;
  width: 100%;
  margin-bottom: 8px;
}
.rsvp-toggle-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}
.rsvp-toggle {
  flex: 1 1 140px;
  cursor: pointer;
}
.rsvp-toggle input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.rsvp-toggle span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 10px;
  border: 2px solid rgba(23,25,29,.18);
  border-radius: 18px;
  background: var(--white);
  font-family: "Gaegu", cursive;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.rsvp-toggle input[type="radio"]:checked + span {
  border-color: var(--green);
  background: rgba(54,126,99,.08);
  box-shadow: 0 0 0 3px rgba(54,126,99,.15);
}
.rsvp-toggle:hover span {
  border-color: rgba(23,25,29,.35);
}
.rsvp-toggle-group.is-invalid .rsvp-toggle span {
  border-color: var(--red);
}

/* Guest stepper */
.rsvp-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid rgba(23,25,29,.18);
  border-radius: 18px;
  overflow: hidden;
  background: var(--white);
  width: fit-content;
}
.rsvp-step-btn {
  background: none;
  border: none;
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
  transition: background .12s ease;
  font-family: "Montserrat", sans-serif;
}
.rsvp-step-btn:hover { background: rgba(23,25,29,.06); }
.rsvp-step-btn:disabled { opacity: .35; cursor: default; }
.rsvp-step-value {
  min-width: 52px;
  text-align: center;
  font-family: "Montserrat", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  border-left: 2px solid rgba(23,25,29,.12);
  border-right: 2px solid rgba(23,25,29,.12);
  padding: 0 8px;
  line-height: 48px;
}

/* Submit button loading state */
.rsvp-submit-btn[data-loading] {
  opacity: .7;
  pointer-events: none;
}
.rsvp-submit-btn[data-loading]::after {
  content: " …";
}

/* Confirmation panel */
.rsvp-confirmation {
  text-align: center;
  padding: 12px 0;
}
.rsvp-confirm-icon {
  font-size: 3.6rem;
  line-height: 1;
  margin-bottom: 8px;
  animation: pop-in .4s cubic-bezier(.17,.67,.35,1.4) both;
}
@keyframes pop-in {
  from { transform: scale(.4); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}
.rsvp-edit-btn {
  margin-top: 20px;
}

/* ── /RSVP Form ─────────────────────────────────────── */

.footer-section {
  text-align: center;
  padding: 50px 20px 70px;
  background: var(--green-dark);
  color: var(--white);
}
.footer-scribble { font-size: 35px; }
.footer-section p {
  margin: 8px 0;
  font-size: 1.8rem;
  font-weight: 700;
}
.footer-section small {
  font-family: "Montserrat", sans-serif;
  font-size: .65rem;
  letter-spacing: .08em;
}

.hidden-field {
  display: none;
}

@media (min-width: 700px) {
  .hero { padding: 48px 38px 60px; }
  .section-wrap { padding: 55px 30px; }
  .section-card { padding: 64px 60px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
}
