:root {
  --bg:              #FDF4E8;
  --surface:         #F8E8D4;
  --accent:          #C0395A;
  --accent-hover:    #A02E4A;
  --accent-active:   #80203A;
  --accent-disabled: #DFAFC0;
  --festive:         #C9900A;
  --festive-light:   #FDF0D0;
  --text:            #2D1510;
  --muted:           #8A6258;
  --border:          #E8C9B0;
  --error:           #DC2626;
  --font:            -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius:          8px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  padding: 80px 16px;
}

/* Focus ring — all interactive elements */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
}

/* ── Save-the-Date block ─────────────────────────────────────────────────── */

.save-the-date {
  margin-bottom: 56px; /* extra breathing room before decorative divider */
}

.save-the-date h1 {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 24px;
}

.save-the-date p {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 16px;
}

.deadline {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--muted);
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--festive);
  background-color: var(--festive-light);
  border: 1px solid var(--festive);
  border-radius: 20px;
  padding: 4px 16px;
  margin-bottom: 8px;
}

.divider {
  text-align: center;
  margin: 0 0 32px;
  color: var(--festive);
  font-size: 20px;
  letter-spacing: 0.5em;
}
.divider::before {
  content: "✦  ✦  ✦";
}

/* ── RSVP card ───────────────────────────────────────────────────────────── */

.rsvp-section {
  background-color: var(--surface);
  border-radius: 12px;
  padding: 32px;
}

.rsvp-section h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 24px;
}

/* ── Form fields ─────────────────────────────────────────────────────────── */

.field {
  display: flex;
  flex-direction: column;
  gap: 8px; /* sm — between label and input */
  margin-bottom: 24px; /* lg — between fields */
}

.field label {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

/* ── Text input and select — shared ──────────────────────────────────────── */

input[type="text"],
select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease, outline 0.15s ease;
}

input[type="text"]::placeholder {
  color: var(--muted);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A6258' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

input[type="text"]:focus-visible,
select:focus-visible {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Error state — applied by JS */
input[type="text"].error {
  border-color: var(--error);
}

/* ── Inline error message ─────────────────────────────────────────────────── */

.error-msg {
  display: none;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--error);
  margin-top: 0; /* gap handled by .field gap: 8px */
}

.error-msg.visible {
  display: block;
}

/* ── Stepper ─────────────────────────────────────────────────────────────── */

.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
}

.stepper button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  color: #FFFFFF;
  background-color: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.15s ease;
  font-family: var(--font);
}

.stepper button:hover:not(:disabled) {
  background-color: var(--accent-hover);
}

.stepper button:active:not(:disabled) {
  background-color: var(--accent-active);
}

.stepper button:disabled {
  background-color: var(--surface);
  color: var(--muted);
  cursor: not-allowed;
}

.stepper output {
  min-width: 40px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  color: var(--text);
  background-color: var(--surface);
  border-radius: var(--radius);
  text-align: center;
  user-select: none;
}

/* ── Submit button ───────────────────────────────────────────────────────── */

.btn-submit {
  display: block;
  width: 100%;
  height: 48px;
  margin-top: 32px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  background-color: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-submit:hover {
  background-color: var(--accent-hover);
}

.btn-submit:active {
  background-color: var(--accent-active);
}

.btn-submit:disabled {
  background-color: var(--accent-disabled);
  cursor: not-allowed;
}

/* ── Success message ─────────────────────────────────────────────────────── */

.success-msg {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--accent);
  text-align: center;
  padding: 24px 0;
}

/* ── Hint-page CTA button ────────────────────────────────────────────────── */

.btn-hint {
  display: inline-block;
  margin-top: 32px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  background-color: var(--accent);
  border: none;
  border-radius: var(--radius);
  padding: 12px 24px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-hint:hover {
  background-color: var(--accent-hover);
}

.btn-hint:active {
  background-color: var(--accent-active);
}

/* ── Responsive breakpoint ───────────────────────────────────────────────── */

@media (min-width: 600px) {
  body {
    padding: 80px 32px;
  }
}

@media (max-width: 599px) {
  .save-the-date h1 {
    font-size: 40px;
  }
}
