:root {
  --creme: #fbf7f2;
  --creme-2: #f4ece2;
  --texto: #3d3430;
  --texto-suave: #7a6d66;
  --dourado: #b98b5e;
  --dourado-escuro: #9a6f45;
  --rosa: #e9c6c0;
  --sombra: 0 10px 40px rgba(80, 50, 30, 0.12);
  --raio: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 300;
  color: var(--texto);
  background: var(--creme);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.script { font-family: "Great Vibes", cursive; font-weight: 400; }
.e { color: var(--dourado); }

/* ---------- Botões ---------- */
.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  font: 500 0.95rem "Montserrat", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--dourado), var(--dourado-escuro));
  padding: 0.95em 2em;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(154, 111, 69, 0.35);
  transition: transform 0.25s, box-shadow 0.25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(154, 111, 69, 0.45); }
.btn-grande { font-size: 1.1rem; padding: 1.1em 2.6em; }
.btn-pequeno { font-size: 0.75rem; padding: 0.7em 1.3em; }
.btn-contorno { background: transparent; color: var(--dourado-escuro); border: 1.5px solid var(--dourado); box-shadow: none; }

/* ---------- Intro 3D ---------- */
#intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: radial-gradient(ellipse at 50% 30%, #fff6ef 0%, #f6e3d8 55%, #e9cfc3 100%);
  transition: opacity 1s ease, transform 1s ease;
}
#intro-canvas { width: 100%; height: 100%; display: block; }
body.intro-ativa { overflow: hidden; }
body.intro-ativa .topo, body.intro-ativa main, body.intro-ativa .rodape { visibility: hidden; }
body.intro-saindo #intro { opacity: 0; transform: scale(1.08); }
body.intro-saindo .topo, body.intro-saindo main, body.intro-saindo .rodape { visibility: visible; }

.intro-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 7vh 16px 8vh;
  pointer-events: none;
  text-align: center;
}
.intro-nomes {
  padding: 1rem 2.5rem 1.4rem; border-radius: 40px;
  background: radial-gradient(ellipse at center, rgba(255,248,242,.85) 0%, rgba(255,248,242,.6) 55%, rgba(255,248,242,0) 75%);
  opacity: 0; transform: translateY(-20px); transition: opacity 1.4s ease, transform 1.4s ease; }
.intro-nomes.visivel { opacity: 1; transform: none; }
.intro-pre { letter-spacing: 0.35em; text-transform: uppercase; font-size: 0.78rem; color: var(--texto-suave); }
.intro-nomes h1 { font-size: clamp(2.8rem, 9vw, 5.5rem); line-height: 1.15; color: var(--texto); text-shadow: 0 2px 20px rgba(255,255,255,.8); }
.intro-sub { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: clamp(1.05rem, 2.6vw, 1.4rem); }
.intro-data { margin-top: 0.3em; letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.85rem; color: var(--dourado-escuro); }

.btn-entrar { pointer-events: auto; opacity: 0; transform: translateY(20px); transition: opacity 1s, transform 1s, box-shadow .25s; visibility: hidden; }
.btn-entrar.visivel { opacity: 1; transform: none; visibility: visible; animation: pulsar 2.4s ease-in-out 1s infinite; }
@keyframes pulsar { 50% { box-shadow: 0 8px 40px rgba(185, 139, 94, 0.7); } }

.btn-pular {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,.6); border: none; border-radius: 999px;
  padding: .5em 1.1em; font: 400 .8rem "Montserrat", sans-serif; color: var(--texto-suave);
  cursor: pointer; backdrop-filter: blur(6px);
}
.btn-pular:hover { background: #fff; }

/* ---------- Topo ---------- */
.topo {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.8rem clamp(16px, 4vw, 48px);
  background: rgba(251, 247, 242, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(185, 139, 94, 0.15);
}
.logo { font-size: 1.9rem; color: var(--dourado-escuro); text-decoration: none; }
.topo nav { display: flex; gap: clamp(0.8rem, 3vw, 2rem); }
.topo nav a { color: var(--texto); text-decoration: none; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }
.topo nav a:hover { color: var(--dourado-escuro); }

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100vh - 64px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 4rem 16px;
  background:
    radial-gradient(circle at 15% 20%, rgba(233,198,192,.45), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(185,139,94,.18), transparent 45%);
}
.hero-pre { letter-spacing: 0.4em; text-transform: uppercase; font-size: 0.8rem; color: var(--texto-suave); }
.hero-nomes { font-size: clamp(3.2rem, 11vw, 7rem); line-height: 1.1; margin: 0.2em 0; }
.hero-data { font-family: "Cormorant Garamond", serif; font-size: 1.6rem; }
.hero-local { color: var(--texto-suave); margin-bottom: 2rem; }
.contagem { display: flex; gap: clamp(0.6rem, 3vw, 1.5rem); margin-bottom: 2.5rem; }
.contagem div {
  background: #fff; border-radius: var(--raio); box-shadow: var(--sombra);
  width: clamp(68px, 18vw, 96px); padding: 0.9rem 0.3rem;
}
.contagem strong { display: block; font-family: "Cormorant Garamond", serif; font-size: clamp(1.8rem, 6vw, 2.6rem); font-weight: 600; color: var(--dourado-escuro); line-height: 1.1; }
.contagem span { font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--texto-suave); }
.ja-casamos { font-family: "Great Vibes", cursive; font-size: 2.5rem; color: var(--dourado-escuro); }

/* ---------- Seções ---------- */
.secao { padding: clamp(4rem, 10vw, 7rem) 16px; text-align: center; }
.secao-alt { background: var(--creme-2); }
.titulo { font-family: "Great Vibes", cursive; font-weight: 400; font-size: clamp(2.8rem, 8vw, 4.2rem); color: var(--dourado-escuro); line-height: 1.2; }
.subtitulo { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 1.25rem; color: var(--texto-suave); max-width: 640px; margin: 0.4rem auto 3rem; }

/* ---------- Carrossel ---------- */
.carrossel {
  position: relative; max-width: 960px; margin: 0 auto;
  border-radius: var(--raio); overflow: hidden; box-shadow: var(--sombra);
  touch-action: pan-y; user-select: none; background: #eee;
}
.carrossel-trilho { display: flex; transition: transform 0.7s cubic-bezier(.65,.05,.36,1); }
.slide { flex: 0 0 100%; position: relative; aspect-ratio: 3 / 2; }
.slide img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 3rem 1rem 2.6rem; color: #fff;
  font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 1.35rem;
  background: linear-gradient(transparent, rgba(0,0,0,.5));
}
.carrossel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.85); color: var(--texto); font-size: 1.8rem; line-height: 1;
  box-shadow: 0 4px 14px rgba(0,0,0,.15); transition: background .2s;
}
.carrossel-nav:hover { background: #fff; }
.anterior { left: 14px; }
.proxima { right: 14px; }
.carrossel-pontos { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.carrossel-pontos button { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255,255,255,.55); cursor: pointer; padding: 0; transition: all .3s; }
.carrossel-pontos button.ativo { background: #fff; width: 26px; border-radius: 5px; }

/* ---------- Linha do tempo ---------- */
.linha-tempo { list-style: none; max-width: 820px; margin: 0 auto; position: relative; }
.linha-tempo::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--rosa), var(--dourado)); transform: translateX(-50%); }
.linha-tempo li { position: relative; width: 50%; padding: 0 2.5rem 3rem; text-align: right; }
.linha-tempo li:nth-child(even) { margin-left: 50%; text-align: left; }
.linha-tempo li::after {
  content: "♥"; position: absolute; top: 0.1rem; right: -0.75rem; width: 1.5rem; height: 1.5rem;
  display: grid; place-items: center; font-size: .8rem; color: #fff; background: var(--dourado); border-radius: 50%;
  box-shadow: 0 0 0 5px var(--creme-2);
}
.linha-tempo li:nth-child(even)::after { right: auto; left: -0.75rem; }
.lt-data { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.5rem; color: var(--dourado-escuro); }
.lt-cartao { background: #fff; padding: 1.3rem 1.5rem; border-radius: var(--raio); box-shadow: var(--sombra); margin-top: .4rem; }
.lt-cartao h3 { font-family: "Cormorant Garamond", serif; font-size: 1.45rem; font-weight: 600; margin-bottom: .3rem; }
.lt-cartao p { font-size: 0.95rem; color: var(--texto-suave); }

@media (max-width: 680px) {
  .topo nav a { font-size: 0.68rem; letter-spacing: .06em; }
  .logo { font-size: 1.5rem; }
  .linha-tempo::before { left: 12px; }
  .linha-tempo li, .linha-tempo li:nth-child(even) { width: 100%; margin-left: 0; text-align: left; padding: 0 0 2.5rem 2.6rem; }
  .linha-tempo li::after, .linha-tempo li:nth-child(even)::after { left: 0; right: auto; }
  .carrossel-nav { width: 38px; height: 38px; font-size: 1.5rem; }
}
@media (max-width: 420px) { .topo nav a[href="#historia"] { display: none; } }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px;
  background: rgba(40, 28, 22, 0.55); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .3s;
}
.modal.aberto { opacity: 1; }
.modal-caixa {
  position: relative; background: var(--creme); border-radius: 24px; padding: 2.5rem 2rem 2rem;
  max-width: 440px; width: 100%; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.3);
  transform: translateY(20px) scale(.97); transition: transform .3s;
}
.modal.aberto .modal-caixa { transform: none; }
.modal-caixa h3 { font-size: 2.6rem; color: var(--dourado-escuro); line-height: 1.2; margin-bottom: .5rem; }
.modal-fechar { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 2rem; color: var(--texto-suave); cursor: pointer; line-height: 1; }
.pix-qr { width: 200px; margin: 1rem auto; border-radius: 12px; background: #fff; padding: 8px; }
.pix-chave { display: flex; flex-direction: column; align-items: center; gap: .8rem; margin: 1.2rem 0; padding: 1rem; background: #fff; border-radius: 14px; border: 1px dashed var(--dourado); }
.pix-chave code { font-size: 1rem; word-break: break-all; color: var(--texto); }
.pix-nome { font-size: .9rem; color: var(--texto-suave); margin-bottom: 1.2rem; }

/* ---------- Rodapé ---------- */
.rodape { text-align: center; padding: 3rem 16px; background: var(--texto); color: var(--creme-2); font-size: .85rem; }
.rodape .script { font-size: 2.4rem; color: var(--rosa); }

/* ---------- Revelação ao rolar ---------- */
.revelar { opacity: 0; transform: translateY(30px); transition: opacity .9s ease, transform .9s ease; }
.revelar.visivel { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
