/* Breno & Larissa
   Paleta e elementos tirados do convite: papel rosado, oliva, ouro velho,
   terracota, a moldura de fio duplo em L e o arco do monograma. */

/* Fontes hospedadas junto com o site (Cormorant, licença OFL) */
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fontes/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fontes/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fontes/cormorant-garamond-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: italic; font-display: swap; src: url("/assets/fontes/cormorant-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant SC"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fontes/cormorant-sc-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant SC"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fontes/cormorant-sc-latin-600-normal.woff2") format("woff2"); }

:root {
  --papel: #E6DAD4;
  --papel-claro: #EFE6E1;
  --branco: #FBF8F6;
  --oliva: #595436;
  --oliva-escuro: #454129;
  --ouro: #937854;
  --bronze: #6E5739;
  --terracota: #92644D;
  --rosa: #CFAFAE;
  --salvia: #B9BBA6;
  --erro: #9A3A2C;
  --fio: rgba(147, 120, 84, .6);

  --serifa: "Cormorant Garamond", "EB Garamond", Garamond, "Times New Roman", serif;
  --versalete: "Cormorant SC", "Cormorant Garamond", Garamond, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4rem; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--papel);
  color: var(--bronze);
  font-family: var(--serifa);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.55;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
strong { font-weight: 700; color: var(--oliva); }

h2, h3 {
  font-family: var(--versalete);
  font-weight: 500;
  color: var(--oliva);
  line-height: 1.12;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 6.2vw, 2.9rem); letter-spacing: .01em; }
h3 { font-size: 1.65rem; }

:focus-visible { outline: 2px solid var(--oliva); outline-offset: 3px; border-radius: 3px; }

.oculto {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

.pular {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--oliva); color: var(--branco); padding: .5rem 1rem; border-radius: 999px;
}
.pular:focus { top: 1rem; }

/* ---------- estrutura ---------- */
.coluna { width: min(100% - 2.5rem, 40rem); margin-inline: auto; }
.coluna.larga { width: min(100% - 2.5rem, 68rem); }
.centro { text-align: center; }
.secao { padding-block: clamp(3.75rem, 11vw, 6.5rem); }
.secao-clara { background: var(--papel-claro); }

.fio { border: 0; height: 2px; width: min(60%, 26rem); margin: 0 auto; background: var(--oliva); }

.destaque { font-size: 1.4rem; color: var(--ouro); text-wrap: balance; }
.link { color: var(--oliva); text-underline-offset: .25em; text-decoration-thickness: 1px; font-weight: 600; }
.link:hover { color: var(--terracota); }

/* Moldura do convite: dois fios finos em L, um no canto superior direito
   e outro no inferior esquerdo. Tudo desenhado com gradientes. */
.moldura { position: relative; }
.moldura::before {
  --c: var(--fio);
  --g: 9px;
  content: "";
  position: absolute;
  inset: var(--moldura-topo, var(--moldura-recuo, 0)) var(--moldura-recuo, 0) var(--moldura-recuo, 0);
  pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) right 0 top 0 / 72% 1px,
    linear-gradient(var(--c), var(--c)) right var(--g) top var(--g) / calc(72% - var(--g)) 1px,
    linear-gradient(var(--c), var(--c)) right 0 top 0 / 1px 58%,
    linear-gradient(var(--c), var(--c)) right var(--g) top var(--g) / 1px calc(58% - var(--g)),
    linear-gradient(var(--c), var(--c)) left 0 bottom 0 / 72% 1px,
    linear-gradient(var(--c), var(--c)) left var(--g) bottom var(--g) / calc(72% - var(--g)) 1px,
    linear-gradient(var(--c), var(--c)) left 0 bottom 0 / 1px 46%,
    linear-gradient(var(--c), var(--c)) left var(--g) bottom var(--g) / 1px calc(46% - var(--g));
  background-repeat: no-repeat;
}

/* ---------- botões ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: .55rem 1.6rem;
  border: 1px solid var(--oliva); border-radius: 999px;
  background: var(--oliva); color: var(--branco);
  font-family: var(--versalete); font-size: 1.12rem; font-weight: 600; letter-spacing: .06em;
  text-decoration: none; cursor: pointer; line-height: 1.15; text-align: center;
  transition: background-color .15s, color .15s;
}
.botao:hover { background: var(--oliva-escuro); }
.botao-linha { background: transparent; color: var(--oliva); }
.botao-linha:hover { background: var(--oliva); color: var(--branco); }
.botao-cheio { width: 100%; }
.botao[disabled] { opacity: .55; cursor: progress; }
.acoes { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* ---------- menu ---------- */
.menu {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: center; gap: clamp(1.25rem, 6vw, 3rem);
  padding: calc(.7rem + env(safe-area-inset-top, 0px)) 1rem .7rem;
  font-family: var(--versalete); font-weight: 600; font-size: 1.05rem; letter-spacing: .1em;
  transition: background-color .25s, box-shadow .25s;
}
.menu a { color: var(--oliva); text-decoration: none; padding: .2rem .1rem; border-bottom: 1px solid transparent; }
.menu a:hover { border-bottom-color: var(--oliva); }
.menu.rolou { background: rgba(230, 218, 212, .94); box-shadow: 0 1px 0 var(--fio); backdrop-filter: blur(6px); }

/* ---------- capa ---------- */
.capa {
  --moldura-recuo: clamp(.7rem, 2.6vw, 2rem);
  --moldura-topo: calc(3.4rem + env(safe-area-inset-top, 0px));
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
  padding: 5rem 1.25rem 4rem;
  overflow: hidden; text-align: center;
}
.capa-miolo { position: relative; z-index: 2; display: grid; justify-items: center; }
.flor { position: absolute; z-index: 1; pointer-events: none; user-select: none; }
.flor-esq { left: -15vw; top: 4.25rem; width: clamp(150px, 42vw, 340px); }
.flor-dir { right: -14vw; bottom: 0; width: clamp(150px, 42vw, 350px); }
@media (min-width: 46rem) {
  .flor-esq { left: 0; top: 5%; width: clamp(220px, 23vw, 340px); }
  .flor-dir { right: 0; width: clamp(220px, 23vw, 350px); }
}

.monograma { width: clamp(190px, 52vw, 300px); }
.nomes { margin: 1.6rem 0 0; }
.nomes img { width: clamp(250px, 72vw, 470px); }
.capa-data {
  margin: 1.5rem 0 .1rem;
  font-family: var(--serifa); font-weight: 700; color: var(--terracota);
  font-size: 1.45rem; letter-spacing: .16em;
}
.capa-local { margin: 0; font-size: 1.3rem; color: var(--ouro); line-height: 1.35; }
.contagem {
  margin: 1.1rem 0 0; min-height: 1.5em;
  font-style: italic; color: var(--oliva); font-size: 1.3rem;
}
.capa .acoes { margin-top: 1.6rem; }

@media (prefers-reduced-motion: no-preference) {
  .flor-esq { animation: chega-esq 1.5s cubic-bezier(.2, .7, .2, 1) both; }
  .flor-dir { animation: chega-dir 1.5s cubic-bezier(.2, .7, .2, 1) .15s both; }
  .capa-miolo > * { animation: sobe .9s ease-out both; }
  .capa-miolo > :nth-child(1) { animation-delay: .25s; }
  .capa-miolo > :nth-child(2) { animation-delay: .5s; }
  .capa-miolo > :nth-child(n+3) { animation-delay: .75s; }
  @keyframes chega-esq { from { opacity: 0; transform: translate(-40px, -14px) rotate(-4deg); } }
  @keyframes chega-dir { from { opacity: 0; transform: translate(40px, 14px) rotate(4deg); } }
  @keyframes sobe { from { opacity: 0; transform: translateY(14px); } }
}

/* ---------- o dia ---------- */
.quando-onde { display: grid; gap: 1.6rem; margin-top: 1.5rem; }
.quando-onde p { margin: 0; color: var(--ouro); font-size: 1.3rem; line-height: 1.35; }
.quando-onde .rotulo, .rotulo {
  font-weight: 700; color: var(--terracota); letter-spacing: .16em; text-transform: uppercase; font-size: 1.3rem;
}
.mapa-area { margin-top: 2.5rem; }
.mapa { --moldura-recuo: -14px; margin-bottom: 2.25rem; }
.mapa iframe {
  display: block; width: 100%; aspect-ratio: 4 / 3; border: 0;
  filter: sepia(.28) saturate(.75);
}
@media (min-width: 46rem) { .mapa iframe { aspect-ratio: 16 / 9; } }

/* ---------- formulários ---------- */
.formulario { margin-top: 2rem; display: grid; gap: 1.1rem; }
.campo { display: grid; gap: .3rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.campo label, .campo legend { font-weight: 600; color: var(--oliva); font-size: 1.1rem; padding: 0; }
.opcional { font-weight: 500; color: var(--ouro); }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; min-height: 3rem;
  padding: .55rem .85rem;
  font: inherit; font-size: 1.2rem; color: var(--oliva-escuro);
  background: var(--branco);
  border: 1px solid var(--fio); border-radius: 6px;
  appearance: none;
}
textarea { resize: vertical; line-height: 1.4; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23595436' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; background-size: .75rem;
  padding-right: 2.4rem;
}
::placeholder { color: #A99680; opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--oliva); outline-offset: 1px; border-color: var(--oliva); }
.invalido { border-color: var(--erro) !important; background: #FBF1EE; }

.dupla { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.tripla { display: grid; grid-template-columns: 1.2fr 1.2fr 4.5rem; gap: .9rem; }
@media (max-width: 26rem) { .tripla { grid-template-columns: 1fr 4.5rem; } .tripla > :first-child { grid-column: 1 / -1; } }

/* escolhas em pílula (rádios) */
.escolha, .metodo { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.escolha legend, .metodo legend { grid-column: 1 / -1; margin-bottom: .3rem; }
.escolha label, .metodo label { position: relative; display: block; }
.escolha input, .metodo input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.escolha span, .metodo span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 3rem; padding: .4rem .8rem;
  border: 1px solid var(--fio); border-radius: 999px;
  background: var(--branco); color: var(--oliva); font-weight: 600; font-size: 1.1rem; line-height: 1.15;
}
.escolha input:checked + span, .metodo input:checked + span { background: var(--oliva); border-color: var(--oliva); color: var(--branco); }
.escolha input:focus-visible + span, .metodo input:focus-visible + span { outline: 2px solid var(--oliva); outline-offset: 3px; }

.aviso {
  margin: 0; padding: .7rem .9rem; border-left: 3px solid var(--erro);
  background: #F7E9E4; color: var(--erro); font-weight: 600; font-size: 1.1rem; line-height: 1.35; text-align: left;
}
.retorno { margin-top: 2.5rem; }
.retorno:focus { outline: none; }
.raminho { width: 3rem; height: 3rem; color: var(--ouro); margin: 0 auto .5rem; display: block; }
.raminho.grande { width: 4.25rem; height: 4.25rem; }

/* ---------- presentes ---------- */
.filtros { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 2.25rem 0 0; }
.filtros button {
  min-height: 2.5rem; padding: .25rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--fio); background: transparent; color: var(--oliva);
  font: inherit; font-weight: 600; font-size: 1.08rem; cursor: pointer;
}
.filtros button[aria-pressed="true"] { background: var(--oliva); border-color: var(--oliva); color: var(--branco); }

.estado { text-align: center; margin: 2.5rem 0 0; font-style: italic; }

.grade {
  list-style: none; margin: 2.75rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14.5rem), 1fr));
  gap: 3rem 2rem;
}
@media (max-width: 34rem) { .grade { grid-template-columns: 1fr 1fr; gap: 2.25rem 1.1rem; } }

.presente { display: flex; flex-direction: column; align-items: center; text-align: center; }
.presente-foto {
  width: 100%; aspect-ratio: 4 / 5; margin-bottom: 1.15rem;
  border-radius: 999px 999px 4px 4px; overflow: hidden;
  outline: 1px solid var(--fio); outline-offset: 6px;
  background: var(--tom, var(--papel-claro));
  display: grid; place-items: center;
}
.presente-foto img { width: 100%; height: 100%; object-fit: cover; }
.presente-foto svg { width: 46%; height: auto; color: var(--tinta, var(--ouro)); opacity: .9; }
.presente:nth-child(3n+1) .presente-foto { --tom: #E3CFCC; --tinta: #9B6F6C; }
.presente:nth-child(3n+2) .presente-foto { --tom: #D6D6C6; --tinta: #6F7257; }
.presente:nth-child(3n) .presente-foto { --tom: #F1E9DC; --tinta: #937854; }

.presente h3 { font-family: var(--serifa); font-weight: 600; font-size: 1.4rem; margin: 0 0 .25rem; line-height: 1.15; }
.presente-descricao { font-size: 1.1rem; line-height: 1.3; margin: 0 0 .5rem; color: var(--ouro); }
.presente-preco { margin: auto 0 .2rem; padding-top: .35rem; font-weight: 700; color: var(--terracota); font-size: 1.35rem; letter-spacing: .04em; }
.presente-cotas { margin: 0 0 .2rem; font-size: 1rem; font-style: italic; }
.presente .botao { margin-top: .6rem; min-height: 2.6rem; padding-inline: 1.3rem; font-size: 1.02rem; }
.presente.esgotado .presente-foto { filter: grayscale(.6); opacity: .6; }
.presente.esgotado .botao { background: transparent; border-color: var(--fio); color: var(--ouro); cursor: default; }
@media (max-width: 34rem) {
  .presente h3 { font-size: 1.2rem; }
  .presente-descricao { font-size: 1rem; }
  .presente-preco { font-size: 1.2rem; }
  .presente-foto { outline-offset: 4px; }
}

.livre {
  --moldura-recuo: 0;
  margin: 4.5rem auto 0; max-width: 34rem; padding: 2.4rem 1.75rem; text-align: center;
}
.livre h3 { margin-bottom: .2em; }
.livre-linha { display: flex; gap: .7rem; justify-content: center; margin-top: 1.1rem; flex-wrap: wrap; }
.com-prefixo { position: relative; flex: 1 1 9rem; max-width: 13rem; }
.com-prefixo span { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--ouro); font-weight: 600; }
.com-prefixo input { padding-left: 2.7rem; }
.livre .aviso { margin-top: 1rem; }

/* ---------- rodapé ---------- */
.rodape { text-align: center; padding: 3.5rem 1.25rem calc(2.5rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--fio); }
.rodape p { margin: 0; color: var(--ouro); }
.rodape-nomes { font-family: var(--versalete); font-size: 1.8rem; color: var(--oliva) !important; }
.rodape-fim { margin-top: 1.75rem !important; font-size: 1rem; }
.rodape-fim a { text-underline-offset: .2em; }

/* ---------- pagamento (dialog) ---------- */
.pagamento {
  width: min(100%, 31rem); max-width: 100%; max-height: 100dvh;
  margin: auto auto 0; padding: 2rem 1.35rem calc(1.75rem + env(safe-area-inset-bottom, 0px));
  border: 0; border-radius: 22px 22px 0 0;
  background: var(--papel-claro); color: var(--bronze);
  overflow-y: auto; overscroll-behavior: contain;
}
@media (min-width: 36rem) {
  .pagamento { margin: auto; padding: 2.5rem 2.25rem 2.25rem; border-radius: 10px; max-height: calc(100dvh - 3rem); }
}
.pagamento::backdrop { background: rgba(69, 65, 41, .55); }
.pagamento[open] { animation: abre .28s ease-out; }
@keyframes abre { from { opacity: 0; transform: translateY(24px); } }
@media (prefers-reduced-motion: reduce) { .pagamento[open] { animation: none; } html { scroll-behavior: auto; } }

.fechar {
  position: absolute; right: .7rem; top: .7rem; width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: transparent; color: var(--oliva); cursor: pointer;
}
.fechar:hover { background: rgba(89, 84, 54, .1); }
.fechar svg { width: 1.3rem; height: 1.3rem; }

.pg-topo { text-align: center; padding: 0 2rem 1.3rem; border-bottom: 1px solid var(--fio); }
.pg-sobre { margin: 0; font-style: italic; font-size: 1.1rem; }
.pg-topo h2 { font-family: var(--serifa); font-weight: 600; font-size: 1.6rem; margin: .1rem 0; }
.pg-valor { margin: 0; font-weight: 700; color: var(--terracota); font-size: 1.5rem; letter-spacing: .04em; }

.pagamento .formulario { margin-top: 1.4rem; }
.subtitulo { margin: .6rem 0 0; font-weight: 700; color: var(--terracota); letter-spacing: .1em; text-transform: uppercase; font-size: 1rem; }
#pg-cartao { display: grid; gap: 1.1rem; }
.seguro { margin: 0; font-size: 1rem; line-height: 1.3; text-align: center; color: var(--ouro); }

.etapa[data-etapa="pix"], .etapa[data-etapa="ok"], .etapa[data-etapa="falha"], .etapa[data-etapa="analise"] { padding-top: 1.5rem; }
.passo { font-size: 1.15rem; line-height: 1.35; }
.qr { width: 220px; height: 220px; margin: 0 auto 1rem; background: #fff; padding: 8px; border-radius: 6px; }
.pix-codigo { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; line-height: 1.35; word-break: break-all; margin-bottom: .8rem; color: var(--bronze); }
.aguardando { display: flex; align-items: center; justify-content: center; gap: .6rem; margin: 1.3rem 0 .3rem; font-style: italic; line-height: 1.3; text-align: left; }
.validade { font-size: 1.05rem; margin: 0; }
.girando {
  flex: none; width: 1.05rem; height: 1.05rem; border-radius: 50%;
  border: 2px solid var(--fio); border-top-color: var(--oliva);
  animation: gira 1s linear infinite;
}
@keyframes gira { to { transform: rotate(360deg); } }
.etapa h3:focus { outline: none; }
.etapa[data-etapa="ok"] .botao, .etapa[data-etapa="falha"] .botao { margin-top: .75rem; }

/* ---------- fotos do casal ---------- */
.secao-fotos { padding-top: 0; }
.galeria { list-style: none; margin: 1.25rem 0 0; padding: 0; columns: 2; column-gap: .7rem; }
.galeria li { break-inside: avoid; margin: 0 0 .7rem; }
.galeria.uma { columns: 1; max-width: 30rem; margin-inline: auto; }
@media (min-width: 46rem) {
  .galeria { columns: 3; column-gap: 1.1rem; }
  .galeria li { margin-bottom: 1.1rem; }
  .galeria.uma { columns: 1; }
}
.foto {
  display: block; width: 100%; padding: 0; border: 0; border-radius: 3px; overflow: hidden;
  background: var(--papel-claro); cursor: zoom-in;
}
.foto img { width: 100%; height: auto; }
.foto:focus-visible { outline: 2px solid var(--oliva); outline-offset: 3px; }

.ampliada {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; overflow: hidden;
  background: #2B2919; color: var(--papel);
}
.ampliada[open] { display: grid; place-items: center; }
.ampliada::backdrop { background: #2B2919; }
.ampliada img { max-width: calc(100vw - 1rem); max-height: calc(100dvh - 7.5rem); object-fit: contain; border-radius: 2px; }
.ampliada-conta {
  position: absolute; left: 0; right: 0; bottom: calc(.9rem + env(safe-area-inset-bottom, 0px));
  margin: 0; text-align: center; font-size: 1.05rem; letter-spacing: .08em;
}
.ampliada-botao {
  position: absolute; width: 2.9rem; height: 2.9rem; display: grid; place-items: center;
  border: 1px solid rgba(230, 218, 212, .45); border-radius: 50%;
  background: rgba(43, 41, 25, .6); color: var(--papel); cursor: pointer;
}
.ampliada-botao:hover { background: rgba(230, 218, 212, .16); }
.ampliada-botao:focus-visible { outline: 2px solid var(--papel); outline-offset: 2px; }
.ampliada-botao svg { width: 1.25rem; height: 1.25rem; }
.ampliada-fechar { top: calc(.7rem + env(safe-area-inset-top, 0px)); right: .7rem; }
.ampliada-anterior { left: .6rem; top: 50%; transform: translateY(-50%); }
.ampliada-proxima { right: .6rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 34rem) {
  .ampliada-anterior, .ampliada-proxima { top: auto; bottom: calc(.5rem + env(safe-area-inset-bottom, 0px)); transform: none; }
}
