:root {
  --cream: #FFF8F0;
  --cream-dark: #F5EDE3;
  --bg: #E8DDD3;
  --wine: #722F37;
  --wine-light: #8B3A42;
  --gold: #C9A84C;
  --text: #2C2C2C;
  --text-light: #5A5A5A;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Lora', 'Times New Roman', serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 3rem 1rem;
}

.bg-photo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
}

/* Card */

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  border: 1px solid var(--gold);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

/* Hero */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2.5rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--gold);
}

.hero-subtitle {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
}

.hero-names {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 7vw, 3.5rem);
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-invite {
  font-style: italic;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2rem;
  max-width: 28ch;
}

.hero-date {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Sections */

section {
  padding: 3.5rem 2.5rem;
  background: var(--cream);
}

h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.8rem;
  text-align: center;
  color: var(--wine);
  margin-bottom: 0.5rem;
}

/* Details */

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.detail-card {
  text-align: center;
  padding: 1.5rem 1rem;
  border: 1px solid var(--gold);
  border-radius: 3px;
}

.detail-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--wine);
  margin-bottom: 0.8rem;
}

.detail-time {
  font-style: italic;
  color: var(--text-light);
  font-size: 0.95rem;
}

.detail-venue {
  font-weight: 500;
  margin-top: 0.4rem;
}

.detail-address {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* RSVP */

.rsvp {
  background: var(--cream-dark);
  padding: 3rem 2.5rem;
  border-top: 1px solid var(--gold);
}

.rsvp-note {
  text-align: center;
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 2rem;
}

#rsvp-form {
  max-width: 100%;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.3rem;
  border: none;
}

label,
legend {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text);
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--cream);
  border: 1px solid #ccc;
  border-radius: 3px;
  transition: border-color 0.2s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.radio-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.4rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 400;
  cursor: pointer;
}

.radio-label input[type="radio"] {
  accent-color: var(--wine);
}

.btn {
  display: block;
  width: 100%;
  padding: 0.75rem;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--cream);
  background: var(--wine);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--wine-light);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-status {
  text-align: center;
  margin-top: 1rem;
  font-style: italic;
  min-height: 1.5em;
}

.form-status.success {
  color: #3a7d44;
}

.form-status.error {
  color: var(--wine);
}

/* Checkbox */

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 400;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--wine);
  margin-top: 0.3rem;
  flex-shrink: 0;
}

/* Confirmation */

.confirmation-message {
  text-align: center;
  font-size: 1.1rem;
  color: #3a7d44;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.confirmation-code-box {
  text-align: center;
  padding: 1.2rem;
  border: 1px dashed var(--gold);
  border-radius: 3px;
  background: var(--cream);
}

.confirmation-code-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.3rem;
}

.confirmation-code {
  font-family: monospace;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--wine);
  letter-spacing: 0.15em;
}

.confirmation-code-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: 0.5rem;
}

/* Review */

.review {
  padding: 3rem 2.5rem;
  border-top: 1px solid var(--gold);
}

.review-details {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1rem;
}

.review-details dt {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-light);
}

.review-details dd {
  font-size: 0.95rem;
}

.review-details > div {
  display: contents;
}

/* Footer */

footer {
  text-align: center;
  padding: 2.5rem 2rem;
  font-style: italic;
  color: var(--text-light);
  border-top: 1px solid var(--gold);
  background: var(--cream);
}

/* Responsive */

@media (min-width: 551px) and (max-width: 1024px) and (min-height: 900px) {
  body {
    padding-top: 40vh;
  }

  .bg-photo {
    object-position: center 30%;
  }
}

@media (max-width: 550px) {
  body {
    padding: 0;
  }

  .card {
    border-left: none;
    border-right: none;
    box-shadow: none;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .radio-group {
    flex-direction: column;
    gap: 0.6rem;
  }
}
