/* ============================================================
   LEILA & TIAGO — Site de Casamento
   Paleta: Creme · Rosa · Ouro · Rose Escuro
   ============================================================ */

/* ── Variáveis ── */
:root {
  --cream:      #FFF9F0;
  --cream-dark: #F5EDDE;
  --rose-light: #F0D0D5;
  --rose:       #D4899A;
  --rose-deep:  #8B4558;
  --rose-dark:  #5C2435;
  --gold:       #C9A96E;
  --gold-light: #E8D5B0;
  --text:       #2C1F26;
  --text-soft:  #6B4F58;
  --white:      #FFFFFF;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Lato', system-ui, sans-serif;

  --nav-h: 70px;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(44, 31, 38, 0.12);
  --shadow-sm: 0 4px 16px rgba(44, 31, 38, 0.08);
  --transition: 0.35s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

/* ── Utilitários ── */
.container {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 24px;
}
.container-sm {
  max-width: 700px;
  margin-inline: auto;
  padding-inline: 24px;
}

.divider {
  text-align: center;
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: 0.5em;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-light));
}
.divider::after {
  background: linear-gradient(to left, transparent, var(--gold-light));
}
.divider-light { color: rgba(255,255,255,0.6); }
.divider-light::before { background: linear-gradient(to right, transparent, rgba(255,255,255,0.3)); }
.divider-light::after  { background: linear-gradient(to left,  transparent, rgba(255,255,255,0.3)); }

/* ── Seções ── */
.section { padding: 96px 0; }
.section-alt { background: var(--cream-dark); }

.section-label {
  display: block;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--rose-dark);
  text-align: center;
  line-height: 1.2;
}
.section-subtitle {
  text-align: center;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 40px;
}

/* ── Animações de entrada ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.delay-1 { transition-delay: 0.15s !important; }
.delay-2 { transition-delay: 0.30s !important; }
.delay-3 { transition-delay: 0.45s !important; }
.delay-4 { transition-delay: 0.60s !important; }

/* fade-up para hero (classe diferente — ativa via CSS animation) */
.fade-up { animation: fadeUp 0.9s both; }
.fade-up.delay-1 { animation-delay: 0.3s; }
.fade-up.delay-2 { animation-delay: 0.55s; }
.fade-up.delay-3 { animation-delay: 0.75s; }
.fade-up.delay-4 { animation-delay: 0.95s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════════
   NAVEGAÇÃO
═══════════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  transition: background var(--transition), box-shadow var(--transition);
}
#navbar.scrolled {
  background: rgba(255, 249, 240, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(44, 31, 38, 0.08);
}

.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-style: italic;
  color: var(--white);
  transition: color var(--transition);
  letter-spacing: 0.04em;
}
#navbar.scrolled .nav-brand { color: var(--rose-deep); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  padding: 8px 14px;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.1); }
#navbar.scrolled .nav-link { color: var(--text-soft); }
#navbar.scrolled .nav-link:hover { color: var(--rose-deep); background: var(--rose-light); }

.nav-highlight {
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 20px;
}
#navbar.scrolled .nav-highlight {
  border-color: var(--rose-deep);
  color: var(--rose-deep) !important;
}

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
#navbar.scrolled .hamburger span { background: var(--rose-deep); }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ═══════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════ */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;

  /*
    ✏️  ADICIONAR FOTO DE FUNDO:
    Substitua o gradiente abaixo por:
    background-image: linear-gradient(rgba(44,24,16,0.55), rgba(92,36,53,0.55)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
  */
  background: linear-gradient(135deg, #2C1810 0%, #5C2435 45%, #8B4558 100%);
}

/* Partículas decorativas */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(201,169,110,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(212,137,154,0.12) 0%, transparent 50%);
  pointer-events: none;
}

.hero-overlay { display: none; } /* usado quando houver imagem de fundo */

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 24px;
}
.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 20px;
}
.hero-names {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1;
  margin-bottom: 20px;
}
.hero-names .amp {
  font-style: italic;
  color: var(--gold);
  font-size: 0.85em;
}
.hero-date {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

/* Countdown */
.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-top: 40px;
}
.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}
.count-num {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1;
  min-width: 2ch;
  display: inline-block;
  text-align: center;
}
.count-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-top: 6px;
}
.countdown-sep {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--gold);
  opacity: 0.6;
  margin-top: 4px;
  padding: 0 4px;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 0; }
}

/* Scroll indicator */
.scroll-down {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  animation: bounce 2s infinite;
  transition: color var(--transition);
}
.scroll-down:hover { color: var(--white); }
.scroll-down svg { width: 28px; height: 28px; }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ═══════════════════════════════════════════════
   NOSSA HISTÓRIA — TIMELINE
═══════════════════════════════════════════════ */
.timeline {
  position: relative;
  margin-top: 60px;
  padding: 0 20px;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--rose-light) 10%, var(--rose-light) 90%, transparent);
}

.timeline-item {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  margin-bottom: 48px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: var(--gold);
  border: 3px solid var(--cream);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--rose-light);
  z-index: 1;
  transition: transform var(--transition);
}
.timeline-item:hover .timeline-dot { transform: translateX(-50%) scale(1.3); }

.timeline-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 32px;
  width: calc(50% - 48px);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(201,169,110,0.15);
  transition: transform var(--transition), box-shadow var(--transition);
}
.timeline-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.timeline-card.left  { margin-right: auto; text-align: right; }
.timeline-card.right { margin-left: auto; text-align: left; }

.tl-year {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--gold);
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 6px;
}
.timeline-card h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--rose-dark);
  margin-bottom: 10px;
}
.timeline-card p {
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.75;
}

/* ═══════════════════════════════════════════════
   CERIMÔNIA
═══════════════════════════════════════════════ */
.ceremony-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 48px;
}
.ceremony-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(201,169,110,0.2);
  transition: transform var(--transition), box-shadow var(--transition);
}
.ceremony-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}
.ceremony-icon {
  font-size: 2.4rem;
  margin-bottom: 20px;
  line-height: 1;
}
.ceremony-card h3 {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--rose-dark);
  margin-bottom: 16px;
}
.ceremony-datetime {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.ceremony-place {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text);
  margin: 12px 0 4px;
}
.ceremony-address {
  font-size: 0.88rem;
  color: var(--text-soft);
  margin-bottom: 20px;
}

.dress-code {
  margin-top: 48px;
  text-align: center;
  padding: 28px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px dashed var(--gold-light);
}
.dress-code h4 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--rose-dark);
  margin-bottom: 8px;
}
.dress-code p { color: var(--text-soft); font-size: 0.95rem; }

/* ═══════════════════════════════════════════════
   GALERIA
═══════════════════════════════════════════════ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 40px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--cream-dark);
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.08); }

/* Overlay ao hover */
.gallery-item::after {
  content: '🔍';
  position: absolute;
  inset: 0;
  background: rgba(44, 24, 16, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-item:not(.placeholder)::after { display: flex; }
.gallery-item:not(.placeholder):hover::after { opacity: 1; }

/* Placeholder */
.gallery-item.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--rose-light);
  cursor: default;
  border: 2px dashed var(--rose-light);
}
.gallery-item.placeholder::after { display: none; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 14, 0.93);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}
.lightbox.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox img {
  max-width: min(90vw, 900px);
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 28px;
  font-size: 2.5rem;
  color: rgba(255,255,255,0.7);
  transition: color var(--transition);
  line-height: 1;
}
.lightbox-close:hover { color: var(--white); }

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: rgba(255,255,255,0.6);
  padding: 8px 16px;
  transition: color var(--transition);
}
.lightbox-prev:hover, .lightbox-next:hover { color: var(--white); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ═══════════════════════════════════════════════
   LISTA DE PRESENTES
═══════════════════════════════════════════════ */
.gifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.gift-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(201,169,110,0.2);
  transition: transform var(--transition), box-shadow var(--transition);
}
.gift-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gift-icon { font-size: 2.4rem; margin-bottom: 16px; }
.gift-card h4 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--rose-dark);
  margin-bottom: 8px;
}
.gift-card p { font-size: 0.9rem; color: var(--text-soft); margin-bottom: 20px; }

/* ═══════════════════════════════════════════════
   BOTÕES
═══════════════════════════════════════════════ */
.btn-primary, .btn-outline, .btn-submit {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all var(--transition);
}
.btn-primary {
  background: var(--rose-deep);
  color: var(--white);
}
.btn-primary:hover { background: var(--rose-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(139,69,88,0.3); }

.btn-outline {
  border: 1.5px solid var(--rose-deep);
  color: var(--rose-deep);
}
.btn-outline:hover { background: var(--rose-deep); color: var(--white); transform: translateY(-2px); }

/* ═══════════════════════════════════════════════
   FORMULÁRIO RSVP
═══════════════════════════════════════════════ */
.rsvp-form {
  background: var(--white);
  border-radius: 20px;
  padding: 48px 40px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(201,169,110,0.15);
  margin-top: 40px;
}

.form-row { margin-bottom: 20px; }
.form-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--rose-light);
  border-radius: 10px;
  background: var(--cream);
  color: var(--text);
  font-size: 0.97rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.15);
}
.form-group input.invalid,
.form-group select.invalid { border-color: #e05555; }

.form-group 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='%238B4558' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.form-group textarea { resize: vertical; min-height: 100px; }

.field-error {
  font-size: 0.78rem;
  color: #e05555;
  min-height: 16px;
  display: block;
}

.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--rose-deep), var(--rose-dark));
  color: var(--white);
  padding: 16px;
  margin-top: 8px;
  border-radius: 12px;
  font-size: 0.9rem;
  transition: all var(--transition);
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139,69,88,0.35);
}
.btn-submit:active { transform: none; }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Mensagens pós-submit */
.rsvp-success, .rsvp-error {
  text-align: center;
  padding: 48px 24px;
  animation: fadeUp 0.5s ease;
}
.success-heart {
  font-size: 3.5rem;
  color: var(--rose);
  margin-bottom: 20px;
  animation: pulse 1.5s ease infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.15); }
}
.rsvp-success h3 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--rose-dark);
  margin-bottom: 12px;
}
.rsvp-success p, .rsvp-error p { color: var(--text-soft); font-size: 1.05rem; line-height: 1.7; }
.rsvp-error { color: #e05555; }

/* ═══════════════════════════════════════════════
   RODAPÉ
═══════════════════════════════════════════════ */
#footer {
  background: linear-gradient(135deg, var(--rose-dark), #3D1520);
  color: var(--white);
  text-align: center;
  padding: 64px 24px;
}
.footer-names {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  color: var(--white);
  margin-bottom: 8px;
}
.footer-names .amp {
  font-style: italic;
  color: var(--gold);
}
.footer-date {
  font-size: 0.88rem;
  letter-spacing: 0.25em;
  color: var(--gold-light);
  margin-bottom: 20px;
}
.footer-quote {
  max-width: 520px;
  margin: 20px auto 28px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
}
.footer-copy { font-size: 0.78rem; color: rgba(255,255,255,0.35); }

/* ═══════════════════════════════════════════════
   RESPONSIVO
═══════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Nav mobile */
  #navbar { padding: 0 20px; }
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: var(--cream);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-link { color: var(--rose-deep) !important; font-size: 1rem; padding: 14px 32px; }
  .nav-link:hover { background: var(--rose-light) !important; }

  /* Hero */
  .countdown { gap: 0; }
  .countdown-item { min-width: 60px; }
  .countdown-sep { font-size: 2rem; }

  /* Timeline */
  .timeline::before { left: 16px; }
  .timeline-dot { left: 16px; }
  .timeline-card { width: calc(100% - 48px); margin-left: 48px !important; text-align: left !important; }

  /* Ceremony */
  .ceremony-grid { grid-template-columns: 1fr; }

  /* Gallery */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  /* Form */
  .rsvp-form { padding: 32px 20px; }
  .form-row.two-col { grid-template-columns: 1fr; }

}

@media (max-width: 480px) {
  .section { padding: 64px 0; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gifts-grid { grid-template-columns: 1fr; }
  .hero-names { font-size: 3rem; }
}
