/* Tela do convidado — celular primeiro.
   A abertura é a foto dos noivos na plantação de lavanda, de ponta a ponta;
   o resto da página é papel com um fio de lilás, e o ramo de lavanda marca
   cada seção. */

/* ---------- abertura ---------- */
.abertura {
  position: relative; height: min(88svh, 720px); min-height: 460px; overflow: hidden;
  background: var(--tinta); color: #fff;
}
.abertura-foto {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
  animation: respira 18s ease-in-out infinite alternate;
}
@keyframes respira { from { transform: scale(1); } to { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .abertura-foto { animation: none; } }
.abertura::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgb(37 31 51 / .35) 0%, transparent 22%),
    linear-gradient(to top, rgb(37 31 51 / .92) 0%, rgb(37 31 51 / .55) 26%, transparent 55%);
}
.abertura-texto {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; text-align: center;
  padding: 0 20px 76px;
}
.abertura .sobre {
  margin: 0 0 10px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; font-weight: 600;
  color: var(--lavanda-tela);
}
.abertura h1 {
  font-size: clamp(44px, 13vw, 64px); font-weight: 400; letter-spacing: -.015em; line-height: 1;
  text-shadow: 0 2px 24px rgb(0 0 0 / .35);
}
.abertura .subtitulo { margin: 14px auto 0; max-width: 30ch; color: rgb(255 255 255 / .86); font-size: 15px; }

/* ---------- corpo ---------- */
.pagina {
  position: relative; z-index: 2; max-width: 560px; margin: -52px auto 0;
  padding: 0 16px 56px;
}

.cartao { position: relative; background: var(--cartao); border-radius: 20px; box-shadow: var(--sombra), 0 20px 50px rgb(37 31 51 / .10); padding: 24px 20px; }
.cartao h2 { font-size: 26px; font-weight: 500; }
.cartao form { display: grid; gap: 12px; margin-top: 18px; }
.cartao-nome { padding-top: 28px; }
.ramo-cartao { position: absolute; right: 14px; top: -34px; height: 96px; transform: rotate(18deg); }
.nota { color: var(--tinta-2); font-size: 14px; margin: 6px 0 0; }
.centro { text-align: center; }

.ola { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; font-size: 17px; }
.acoes { display: grid; gap: 10px; }
.botao.grande { min-height: 62px; font-size: 18px; }
.botao.grande svg { width: 26px; height: 26px; }

.envio { margin-top: 14px; }
.envio-texto { font-size: 14px; color: var(--tinta-2); margin-bottom: 8px; }
.barra { height: 6px; background: var(--lavanda-clara); border-radius: 99px; overflow: hidden; }
.barra div { height: 100%; width: 0; background: var(--lavanda-viva); transition: width .2s; }

.bloco { margin-top: 44px; }
.titulo-secao { display: flex; align-items: center; gap: 10px; }
.titulo-secao img { height: 54px; width: auto; transform: rotate(28deg); flex: none; margin: -6px -4px 0 -2px; }
.titulo-secao h2 { font-size: 30px; font-weight: 400; letter-spacing: -.01em; }
.titulo-secao .alternar { margin-left: auto; }

/* ---------- desafios ---------- */
.progresso { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.progresso-numero { flex: none; display: grid; justify-items: center; width: 74px; height: 74px; place-content: center; border-radius: 50%; background: var(--lavanda-clara); }
.progresso-numero strong { font-family: var(--titulo); font-weight: 500; font-size: 30px; line-height: 1; color: var(--lavanda); font-variant-numeric: tabular-nums; }
.progresso-numero span { font-size: 12px; color: var(--tinta-2); }
.progresso .nota { margin: 0; }

.desafios { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; counter-reset: desafio; }
.desafio {
  counter-increment: desafio;
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 12px;
  width: 100%; text-align: left; background: var(--cartao); border: 0; border-radius: 14px;
  padding: 14px 14px 14px 12px; box-shadow: 0 0 0 1px var(--filete); cursor: pointer;
  transition: box-shadow .15s, transform .15s;
}
.desafio:active { transform: scale(.99); }
.desafio::before {
  content: counter(desafio); font-family: var(--titulo); font-size: 22px; color: var(--lavanda);
  font-variant-numeric: tabular-nums; text-align: center; opacity: .8;
}
.desafio .texto { font-weight: 500; line-height: 1.3; }
.desafio .estado {
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--lavanda); background: var(--lavanda-clara); padding: 5px 9px; border-radius: 99px; white-space: nowrap;
}
.desafio.feito { background: var(--feito-claro); box-shadow: 0 0 0 1px #d3e2c2; }
.desafio.feito::before { content: "✓"; color: var(--feito); font-family: var(--texto); font-weight: 700; opacity: 1; }
.desafio.feito .estado { color: var(--feito); background: #fff; }

/* ---------- placar ---------- */
.placar { list-style: none; margin: 14px 0 0; padding: 0; }
.placar li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--filete); }
.placar .pos { font-family: var(--titulo); font-size: 20px; color: var(--tinta-3); font-variant-numeric: tabular-nums; }
.placar li:first-child .pos {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--lavanda-viva); color: #fff; font-size: 16px;
}
.placar li:first-child { font-size: 18px; }
.placar .qtd { font-variant-numeric: tabular-nums; color: var(--tinta-2); font-size: 14px; }
.placar .eu { font-weight: 700; }
.placar .vazio { display: block; color: var(--tinta-2); font-size: 14px; border: 0; }

/* ---------- mural ---------- */
.alternar { display: inline-flex; background: var(--lavanda-clara); border-radius: 10px; padding: 3px; }
.alternar button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-size: 14px; color: var(--tinta-2); cursor: pointer; }
.alternar button.ativo { background: #fff; color: var(--tinta); font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.mural { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 16px; border-radius: 14px; overflow: hidden; }
.mural button { padding: 0; border: 0; background: var(--lavanda-clara); aspect-ratio: 1; overflow: hidden; cursor: pointer; }
.mural img { width: 100%; height: 100%; object-fit: cover; }
.mural .nova { animation: chegou .6s ease-out; }
@keyframes chegou { from { opacity: 0; transform: scale(.94); } }

/* ---------- rodapé: a lavanda da foto deles ---------- */
.rodape {
  position: relative; text-align: center; color: #fff; padding: 64px 20px calc(56px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to bottom, var(--papel) 0%, rgb(247 245 251 / 0) 30%, rgb(37 31 51 / .35) 100%), url("/noivos/faixa.jpg") center / cover;
}
.rodape p { margin: 0; font-family: var(--titulo); font-size: 26px; text-shadow: 0 1px 16px rgb(0 0 0 / .45); }
.rodape span { display: block; margin-top: 6px; font-size: 14px; opacity: .92; text-shadow: 0 1px 10px rgb(0 0 0 / .5); }

.rodape .credito { display: block; margin-top: 36px; font-size: 12px; letter-spacing: .06em; opacity: .8; text-shadow: 0 1px 8px rgb(0 0 0 / .6); }

/* ---------- visor ---------- */
.visor { position: fixed; inset: 0; background: rgb(21 17 29 / .97); z-index: 40; display: grid; grid-template-rows: 1fr auto; }
.visor img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.visor-pe { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); color: #e9e5f3; }
.visor-pe span { flex: 1 1 100%; font-size: 14px; }
.visor .botao.linha { color: #fecaca; box-shadow: inset 0 0 0 1.5px #7f1d1d; }
.visor .botao { flex: 1; }
