/* ==========================================================================
   Base Design System - Wedding RSVP
   Paleta Harmoniosa, Tipografia Nobre e Utilitários
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,400;1,600&family=Great+Vibes&family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root,
[data-theme="rose_gold"] {
  /* Tema 1: Rose Gold & Blush (Padrão Oficial) */
  --theme-id: 'rose_gold';
  --theme-name: 'Rose Gold & Blush';

  --primary: #c4737d;
  --primary-hover: #b05d68;
  --primary-dark: #8a3d47;
  --primary-light: #fbf0f2;
  --accent: #e8b4b8;
  --accent-gold: #d4a373;

  --bg-canvas: #fdf8f6;
  --bg-surface: #ffffff;
  --bg-soft: #f7ebea;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-overlay: rgba(45, 25, 28, 0.70);

  --text-primary: #3d2125;
  --text-secondary: #6b464b;
  --text-muted: #9a7479;
  --text-light: #fffbf9;

  --border-theme: rgba(196, 115, 125, 0.24);
  --border-subtle: rgba(196, 115, 125, 0.12);
  --gradient-theme: linear-gradient(135deg, #e4a2a8 0%, #c4737d 50%, #9e4b55 100%);
  --gradient-shimmer: linear-gradient(90deg, #c4737d 0%, #fae1e3 50%, #c4737d 100%);
  --seal-gradient: radial-gradient(circle at 35% 35%, #f1bcc1, #c4737d 55%, #803741 100%);
  --envelope-body-bg: #faeff0;
  --envelope-flap-bg: #f4dcde;
  --envelope-liner: linear-gradient(135deg, #fdf4f6, #f3d6da);
  --shadow-theme: 0 8px 25px rgba(196, 115, 125, 0.32);

  /* Legado Dourado Mapeado */
  --gold-400: #e4a2a8;
  --gold-500: #c4737d;
  --gold-600: #9e4b55;
  --gold-gradient: var(--gradient-theme);
  --border-light: var(--border-theme);

  /* Tipografia */
  --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-script: 'Great Vibes', cursive;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Raios de Borda */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Transições */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="sage_green"] {
  /* Tema 2: Verde Sálvia & Eucalipto (Jardim Botânico / Rústico Chic) */
  --theme-id: 'sage_green';
  --theme-name: 'Verde Sálvia & Eucalipto';

  --primary: #5f8566;
  --primary-hover: #4e7054;
  --primary-dark: #37533c;
  --primary-light: #f1f6f2;
  --accent: #a3c4a8;
  --accent-gold: #c2aa7d;

  --bg-canvas: #f6f9f6;
  --bg-surface: #ffffff;
  --bg-soft: #eaf1eb;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-overlay: rgba(25, 38, 28, 0.70);

  --text-primary: #1d2f21;
  --text-secondary: #455c4a;
  --text-muted: #738c78;
  --text-light: #f6fbf7;

  --border-theme: rgba(95, 133, 102, 0.24);
  --border-subtle: rgba(95, 133, 102, 0.12);
  --gradient-theme: linear-gradient(135deg, #8cb593 0%, #5f8566 50%, #3e6044 100%);
  --gradient-shimmer: linear-gradient(90deg, #5f8566 0%, #dceade 50%, #5f8566 100%);
  --seal-gradient: radial-gradient(circle at 35% 35%, #b2d5b8, #5f8566 55%, #2c4731 100%);
  --envelope-body-bg: #eef4ef;
  --envelope-flap-bg: #dce8de;
  --envelope-liner: linear-gradient(135deg, #f4f8f4, #d5e5d7);
  --shadow-theme: 0 8px 25px rgba(95, 133, 102, 0.32);

  --gold-400: #8cb593;
  --gold-500: #5f8566;
  --gold-600: #3e6044;
  --gold-gradient: var(--gradient-theme);
  --border-light: var(--border-theme);
}

[data-theme="serenity_blue"] {
  /* Tema 3: Azul Serenity & Névoa (Praia, Céu Aberto & Alta Elegância) */
  --theme-id: 'serenity_blue';
  --theme-name: 'Azul Serenity & Névoa';

  --primary: #537c99;
  --primary-hover: #416782;
  --primary-dark: #2c4a61;
  --primary-light: #f1f6fa;
  --accent: #9ec0db;
  --accent-gold: #d4b07b;

  --bg-canvas: #f6f9fc;
  --bg-surface: #ffffff;
  --bg-soft: #e8f0f6;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-overlay: rgba(20, 35, 48, 0.70);

  --text-primary: #182836;
  --text-secondary: #3e5568;
  --text-muted: #6c8599;
  --text-light: #f6faff;

  --border-theme: rgba(83, 124, 153, 0.24);
  --border-subtle: rgba(83, 124, 153, 0.12);
  --gradient-theme: linear-gradient(135deg, #81a8c7 0%, #537c99 50%, #31536d 100%);
  --gradient-shimmer: linear-gradient(90deg, #537c99 0%, #d8e8f5 50%, #537c99 100%);
  --seal-gradient: radial-gradient(circle at 35% 35%, #aed1ec, #537c99 55%, #223c50 100%);
  --envelope-body-bg: #eaf1f7;
  --envelope-flap-bg: #d7e6f2;
  --envelope-liner: linear-gradient(135deg, #f3f8fc, #d0e2f0);
  --shadow-theme: 0 8px 25px rgba(83, 124, 153, 0.32);

  --gold-400: #81a8c7;
  --gold-500: #537c99;
  --gold-600: #31536d;
  --gold-gradient: var(--gradient-theme);
  --border-light: var(--border-theme);
}

[data-theme="terracotta"] {
  /* Tema 4: Terracota & Areia Quente (Boho Chic & Pôr do Sol) */
  --theme-id: 'terracotta';
  --theme-name: 'Terracota & Areia Quente';

  --primary: #b0634c;
  --primary-hover: #9b4f39;
  --primary-dark: #743522;
  --primary-light: #fdf4f0;
  --accent: #e39c84;
  --accent-gold: #d4a359;

  --bg-canvas: #fdf8f4;
  --bg-surface: #ffffff;
  --bg-soft: #faeae2;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-overlay: rgba(45, 25, 18, 0.70);

  --text-primary: #361d15;
  --text-secondary: #684135;
  --text-muted: #9a6e61;
  --text-light: #fffaf7;

  --border-theme: rgba(176, 99, 76, 0.24);
  --border-subtle: rgba(176, 99, 76, 0.12);
  --gradient-theme: linear-gradient(135deg, #d88972 0%, #b0634c 50%, #873e28 100%);
  --gradient-shimmer: linear-gradient(90deg, #b0634c 0%, #f7ded6 50%, #b0634c 100%);
  --seal-gradient: radial-gradient(circle at 35% 35%, #f2ab96, #b0634c 55%, #632615 100%);
  --envelope-body-bg: #f8ebe5;
  --envelope-flap-bg: #f5ded6;
  --envelope-liner: linear-gradient(135deg, #fdf6f2, #f5d6cb);
  --shadow-theme: 0 8px 25px rgba(176, 99, 76, 0.32);

  --gold-400: #d88972;
  --gold-500: #b0634c;
  --gold-600: #873e28;
  --gold-gradient: var(--gradient-theme);
  --border-light: var(--border-theme);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-canvas);
  line-height: 1.65;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  transition: var(--transition-fast);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

/* Utilitários de Tipografia */
.font-serif {
  font-family: var(--font-serif);
}

.font-script {
  font-family: var(--font-script);
}

.text-gold {
  color: var(--gold-600);
}

.text-center {
  text-align: center;
}

/* Container Responsivo */
.container {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-narrow {
  max-width: 760px;
}

/* Botões Estilizados */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.8rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all var(--transition-normal);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gold-gradient);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(197, 168, 128, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(197, 168, 128, 0.55);
}

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

.btn-outline {
  border: 1.5px solid var(--gold-500);
  color: var(--gold-700);
  background: transparent;
}

.btn-outline:hover {
  background: var(--gold-500);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-soft);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--gold-100);
  border-color: var(--gold-300);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}

.btn-success:hover {
  background: #23553e;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}

/* Cards com Glassmorphism */
.card-glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Divisores Ornamentais */
.ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--gold-500);
}

.ornament-divider::before,
.ornament-divider::after {
  content: '';
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--gold-300), transparent);
}

/* Toast de Notificação */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: 1rem 1.4rem;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border-left: 4px solid var(--gold-500);
  animation: slideInToast 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  font-size: 0.95rem;
}

.toast.toast-success {
  border-left-color: var(--success);
}

.toast.toast-error {
  border-left-color: var(--danger);
}

@keyframes slideInToast {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideOutToast {
  to {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
}

/* Animações de Scroll com Visibilidade Total e Imediata Garantida */
.reveal {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.reveal-scale,
.reveal.reveal-left,
.reveal.reveal-right,
.reveal.is-revealed,
.reveal.is-visible {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

/* Delays escalonados para listas de cards */
.delay-1 { transition-delay: 0.05s; }
.delay-2 { transition-delay: 0.1s; }
.delay-3 { transition-delay: 0.15s; }
.delay-4 { transition-delay: 0.2s; }
.delay-5 { transition-delay: 0.25s; }
