/* === Reset & Variables === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --purple: #5B3A7A;
  --purple-light: #8B6BAF;
  --purple-pale: #C8B8DE;
  --purple-bg: #EDE7F4;
  --gold: #C9A84C;
  --gold-light: #D4BC72;
  --pink: #E8879B;
  --pink-light: #F4B8C8;
  --pink-pale: #FDE8EE;
  --white: #FFFFFF;
  --off-white: #FDFBFE;
  --gray-100: #F8F6FA;
  --gray-200: #EDE8F2;
  --gray-400: #A99BBF;
  --gray-600: #6B5F7A;
  --gray-800: #3A2E47;
  --font-script: 'Great Vibes', cursive;
  --font-display: 'Cinzel', serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --transition: 0.3s ease;
  --radius: 16px;
  --radius-sm: 10px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* === Hero === */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: url('Background Hero Image.png') center/cover no-repeat;
  padding: 6rem 1.5rem 4rem;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  max-width: 900px;
  width: 100%;
  animation: fadeInUp 1s ease-out;
}

.hero-text {
  text-align: center;
  flex: 1;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gray-600);
  margin-bottom: 0.3rem;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  font-weight: 700;
  color: var(--purple);
  line-height: 1.1;
  margin-bottom: 0.3rem;
}

.hero-homenajeada {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  color: var(--gray-600);
  line-height: 1.6;
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1rem 0;
}

.divider-line {
  width: 50px;
  height: 1px;
  background: var(--gold);
}

.divider-line.light {
  background: rgba(255, 255, 255, 0.4);
}

.divider-heart {
  display: flex;
  align-items: center;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--gray-600);
  line-height: 1.7;
  display: none;
}

.hero-image {
  flex-shrink: 0;
}

.hero-character {
  width: 480px;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(91, 58, 122, 0.15));
}

.scroll-down {
  position: absolute;
  bottom: 6rem;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  text-decoration: none;
  transition: var(--transition);
  animation: bounce 2s infinite;
  z-index: 3;
}

.scroll-down:hover {
  color: var(--purple);
  border-color: var(--purple-pale);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* === Section Shared === */
.section-ornament {
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--purple);
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--gray-600);
  text-align: center;
  line-height: 1.7;
  margin-bottom: 0;
}

/* === Countdown === */
.countdown-section {
  padding: 0 1.5rem 4rem;
  background: var(--white);
  position: relative;
}

.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: 80px;
}

.countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.countdown-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  color: var(--purple);
  line-height: 1;
}

.countdown-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray-400);
  margin-top: 0.4rem;
}

.countdown-separator {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--gold);
  font-weight: 700;
  padding-bottom: 1.2rem;
}

/* === RSVP Section === */
.rsvp-section {
  padding: 5rem 1.5rem;
  background: var(--white);
}

.rsvp-header {
  margin-bottom: 2.5rem;
}

/* === Form Card === */
.form-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 24px rgba(91, 58, 122, 0.06);
}

.form-card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--purple);
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

/* === Form === */
.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-800);
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  color: var(--gray-800);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray-400);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--purple-light);
  box-shadow: 0 0 0 3px rgba(91, 58, 122, 0.08);
  background: var(--white);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B5F7A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* === Toggle Buttons === */
.toggle-group {
  display: flex;
  gap: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--gray-200);
}

.toggle-btn {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.7rem 1rem;
  border: none;
  background: var(--gray-100);
  color: var(--gray-600);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.toggle-btn:first-child {
  border-right: 1px solid var(--gray-200);
}

.toggle-btn.active {
  background: var(--pink-pale);
  color: var(--pink);
  font-weight: 600;
}

.toggle-btn:not(.active):hover {
  background: var(--gray-200);
}

/* === Submit Button === */
.btn-submit {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--pink) 0%, #D4708A 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  margin-top: 0.5rem;
  width: 100%;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 135, 155, 0.35);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit .btn-loading,
.btn-submit .btn-success {
  display: none;
}

.btn-submit.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-submit.loading .btn-text,
.btn-submit.loading .btn-icon {
  display: none;
}

.btn-submit.loading .btn-loading {
  display: inline;
}

.btn-submit.success {
  background: linear-gradient(135deg, #6B9E6B 0%, #4E8B4E 100%);
  pointer-events: none;
}

.btn-submit.success .btn-text,
.btn-submit.success .btn-icon {
  display: none;
}

.btn-submit.success .btn-success {
  display: inline;
}

.form-footer-text {
  text-align: center;
  font-size: 0.82rem;
  color: var(--gray-400);
  margin-top: 1.25rem;
}

/* === Form Message === */
.form-message {
  max-width: 680px;
  margin: 1.5rem auto 0;
  text-align: center;
  font-size: 0.9rem;
  padding: 0 1.5rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.form-message.visible {
  opacity: 1;
}

.form-message.error {
  color: #C62828;
}

.form-message.success {
  color: #2E7D32;
}

/* === Details Section === */
.details-section {
  padding: 5rem 1.5rem;
  background: var(--gray-100);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 750px;
  margin: 2rem auto 0;
}

.detail-card {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  transition: transform var(--transition), box-shadow var(--transition);
}

.detail-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(91, 58, 122, 0.08);
}

.detail-icon {
  margin-bottom: 0.75rem;
}

.detail-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 0.4rem;
}

.detail-card p {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.5;
}

/* === Footer === */
.footer {
  position: relative;
  background: var(--purple-light);
  margin-top: -1px;
  overflow: hidden;
}

.footer-wave {
  position: relative;
  width: 100%;
}

.footer-wave svg {
  display: block;
  width: 100%;
  height: 80px;
}

.footer-content {
  padding: 1rem 1.5rem 2.5rem;
  text-align: center;
  color: var(--white);
}

.footer-character {
  margin-bottom: 1rem;
}

.footer-character-img {
  width: 140px;
  height: auto;
}

.footer-thanks {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

/* === Animations === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column-reverse;
    gap: 2rem;
    text-align: center;
  }

  .hero-character {
    width: 280px;
  }

  .hero-name {
    font-size: 3rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

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

  .form-card {
    padding: 2rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 5rem 1rem 3rem;
  }

  .hero-tagline {
    font-size: 0.85rem;
  }

  .hero-name {
    font-size: 2.5rem;
  }

  .hero-character {
    width: 220px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .rsvp-section,
  .details-section {
    padding: 3.5rem 1rem;
  }
}
