:root {
  --color-bg: #f9f7f4;
  --color-cream: #fdfbf7;
  --color-sage: #8a9a7b;
  --color-sage-dark: #6b7a5e;
  --color-sage-light: #d4dbc8;
  --color-text: #3d3d3d;
  --color-text-light: #6b6b6b;
  --color-gold: #c4a35a;
  --color-gold-light: #e8d5a3;
  --color-rose: #d4a5a5;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Raleway', 'Segoe UI', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  line-height: 1.6;
  background-image: 
    radial-gradient(ellipse at 20% 20%, rgba(212, 219, 200, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(212, 165, 165, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(196, 163, 90, 0.1) 0%, transparent 70%);
}

.page-wrapper {
  min-height: 100vh;
  position: relative;
  padding: 2rem;
}

/* Corner decorations */
.corner-decor {
  position: fixed;
  width: 120px;
  height: 120px;
  opacity: 0.15;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M0,0 Q50,20 50,50 Q20,50 0,0' fill='none' stroke='%238a9a7b' stroke-width='1'/%3E%3Cpath d='M10,0 Q50,30 50,50 Q30,50 10,0' fill='none' stroke='%238a9a7b' stroke-width='0.5'/%3E%3Ccircle cx='50' cy='50' r='3' fill='%23c4a35a'/%3E%3C/svg%3E");
}

.corner-decor.top-left { top: 0; left: 0; }
.corner-decor.top-right { top: 0; right: 0; transform: rotate(90deg); }
.corner-decor.bottom-left { bottom: 0; left: 0; transform: rotate(-90deg); }
.corner-decor.bottom-right { bottom: 0; right: 0; transform: rotate(180deg); }

.container {
  max-width: 580px;
  margin: 0 auto;
  background: var(--color-cream);
  border-radius: 4px;
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.02),
    0 20px 60px rgba(0, 0, 0, 0.06);
  padding: 3.5rem 3rem;
  position: relative;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.pre-title {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-sage);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  animation: fadeIn 1s ease-out 0.2s both;
}

.title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  animation: fadeIn 1s ease-out 0.4s both;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
  animation: fadeIn 1s ease-out 0.5s both;
}

.divider::before,
.divider::after {
  content: '';
  height: 1px;
  width: 80px;
  background: linear-gradient(90deg, transparent, var(--color-gold-light), transparent);
}

.divider-ornament {
  color: var(--color-gold);
  font-size: 1.5rem;
  margin: 0 1rem;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--color-text-light);
  font-weight: 300;
  animation: fadeIn 1s ease-out 0.6s both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Form */
.rsvp-form {
  animation: fadeIn 1s ease-out 0.7s both;
}

.form-section {
  margin-bottom: 1.75rem;
}

.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.form-hint {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 1px solid var(--color-sage-light);
  border-radius: 3px;
  background: white;
  color: var(--color-text);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-sage);
  box-shadow: 0 0 0 3px rgba(138, 154, 123, 0.15);
}

.form-input::placeholder {
  color: #b0b0b0;
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

/* Attendance Toggle */
.attendance-toggle {
  display: flex;
  gap: 1rem;
}

.attendance-toggle input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-option {
  flex: 1;
  padding: 1rem;
  text-align: center;
  border: 1px solid var(--color-sage-light);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.toggle-icon {
  font-size: 1.25rem;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.attendance-toggle input[type="radio"]:checked + .toggle-option {
  background: var(--color-sage);
  border-color: var(--color-sage);
  color: white;
}

.attendance-toggle input[type="radio"]:checked + .toggle-option .toggle-icon {
  opacity: 1;
}

.toggle-option:hover {
  border-color: var(--color-sage);
}

/* Guest Inputs */
.guest-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.guest-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.guest-name {
  flex: 1;
}

.btn-remove-guest {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--color-rose);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove-guest:hover {
  background: rgba(212, 165, 165, 0.2);
}

.btn-add-guest {
  margin-top: 0.75rem;
  padding: 0.625rem 1rem;
  background: transparent;
  border: 1px dashed var(--color-sage-light);
  border-radius: 3px;
  color: var(--color-sage-dark);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-add-guest:hover {
  border-color: var(--color-sage);
  background: rgba(138, 154, 123, 0.05);
}

.btn-add-guest span {
  font-size: 1.2rem;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  padding: 1.125rem;
  margin-top: 1rem;
  background: var(--color-sage);
  border: none;
  border-radius: 3px;
  color: white;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.btn-submit:hover {
  background: var(--color-sage-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(138, 154, 123, 0.3);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit.loading {
  pointer-events: none;
  background: var(--color-sage-light);
}

.btn-submit.loading .btn-text {
  visibility: hidden;
}

.btn-submit .btn-loading {
  display: none;
}

.btn-submit.loading .btn-loading {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Success Message */
.success-message {
  text-align: center;
  padding: 2rem;
  animation: fadeInUp 0.6s ease-out;
}

.success-message.hidden {
  display: none;
}

.success-icon {
  font-size: 3rem;
  color: var(--color-sage);
  margin-bottom: 1rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.success-message h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.success-message p {
  color: var(--color-text-light);
  font-size: 1rem;
}

.success-message.decline .success-icon {
  color: var(--color-rose);
}

/* Hidden sections when declining */
.form-section.hidden {
  display: none;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 2rem;
  padding: 1rem;
  color: var(--color-text-light);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 640px) {
  .page-wrapper {
    padding: 1rem;
  }
  
  .container {
    padding: 2.5rem 1.5rem;
  }
  
  .title {
    font-size: 2.25rem;
  }
  
  .attendance-toggle {
    flex-direction: column;
  }
  
  .corner-decor {
    width: 80px;
    height: 80px;
  }
}

