/* ==========================================================================
   Maurício & Maria Clara — convite "Noite Estrelada"
   Paleta: só branco, azul-marinho e os tons de azul / cinza-azulado entre eles.
   ========================================================================== */

:root {
  --noite-0: #081433;
  --noite-1: #0a1840;
  --noite-2: #0b1b44;
  --noite-3: #10265c;
  --noite-4: #1a3676;
  --azul-5: #2f4f9a;
  --azul-6: #5672b3;
  --azul-7: #8ea5d6;
  --azul-8: #bccbea;
  --azul-9: #dfe7f6;
  --luz: #c9d7f7;            /* rótulos sobre o céu */
  --papel: #fbfcff;
  --tinta: #13224a;          /* texto sobre o papel */
  --tinta-2: #34446e;
  --tinta-3: #55668f;        /* texto secundário sobre o papel (AA) */

  --serifa: 'EB Garamond', 'Cormorant Garamond', Garamond, 'Palatino Linotype', Palatino, 'Book Antiqua', 'Times New Roman', serif;
  --script: 'Pinyon Script', 'Great Vibes', 'Snell Roundhand', 'Apple Chancery', 'Segoe Script', cursive;
  --sans: 'Jost', 'Avenir Next', Avenir, 'Century Gothic', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --suave: cubic-bezier(.22, .8, .24, 1);

  /* imagens em SVG inline usadas nos cartões de papel */
  --img-estrela: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%235672b3' d='M12 1.5c.7 6.6 3.9 9.8 10.5 10.5-6.6.7-9.8 3.9-10.5 10.5-.7-6.6-3.9-9.8-10.5-10.5 6.6-.7 9.8-3.9 10.5-10.5z'/%3E%3C/svg%3E");   /* estrelinha de 4 pontas (cantos da moldura) */
  --img-grao: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .07 0 0 0 0 .13 0 0 0 0 .29 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)'/%3E%3C/svg%3E");   /* grão bem leve do papel */
}

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

[hidden] { display: none !important; }

html {
  background: var(--noite-1);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-y: scroll;                 /* a barra de rolagem já reserva o lugar: nada pula quando a abertura termina */
}

body {
  margin: 0;
  min-height: 100vh;
  color: #fff;
  font-family: var(--serifa);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.6;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main,
.rodape {
  overflow-x: hidden;
  overflow-x: clip;
}

p, h1, h2, h3, figure, blockquote { margin: 0; }
a { color: inherit; }
svg { display: block; }
i { font-style: italic; }

/* foco sempre visível no teclado (com plano B para navegadores sem :focus-visible) */
a:focus,
button:focus {
  outline: 2px solid #a9c4ff;
  outline-offset: 4px;
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) { outline: none; }
:focus-visible {
  outline: 2px solid #a9c4ff;
  outline-offset: 4px;
}
.papel a:focus,
.papel :focus-visible { outline-color: var(--noite-4); }

.so-leitor {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Céu: gradiente + duas camadas de canvas, fixo atrás de tudo
   -------------------------------------------------------------------------- */
.ceu {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 85% 55% at 84% -2%, rgba(64, 100, 184, .52) 0%, rgba(64, 100, 184, 0) 70%),
    radial-gradient(ellipse 110% 60% at 8% 106%, rgba(38, 68, 146, .44) 0%, rgba(38, 68, 146, 0) 70%),
    linear-gradient(180deg, #0a1840 0%, #0c1d4a 44%, #0f2456 100%);   /* azul-marinho de ponta a ponta, sem preto */
}
.ceu-camada {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: block;
}
/* enquanto o canvas não pinta (ou se o JS faltar): um punhado de estrelas em CSS para o céu não ficar vazio */
.ceu::after {
  content: '';
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background-image:
    radial-gradient(circle, #fff 0, #fff .7px, transparent 1.3px),
    radial-gradient(circle, #dfe7f6 0, #dfe7f6 .6px, transparent 1.1px),
    radial-gradient(circle, #bccbea 0, #bccbea .5px, transparent 1px);
  background-size: 310px 290px, 230px 370px, 170px 190px;
  background-position: 40px 60px, 120px 20px, 10px 130px;
  opacity: .7;
  transition: opacity .7s ease;
}
html.ceu-vivo .ceu::after { opacity: 0; }

/* --------------------------------------------------------------------------
   Peças comuns
   -------------------------------------------------------------------------- */
.estrelinha {
  width: 1.05rem; height: 1.05rem;
  margin: 0 auto .9rem;
  fill: currentColor;
  color: var(--azul-6);
}

.rotulo {
  margin: 0 0 .75rem;
  padding-left: .3em;                 /* compensa o espaçamento da última letra */
  font-family: var(--sans);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--tinta-3);
}

.titulo {
  font-family: var(--serifa);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, 8.4vw, 2.9rem);
  line-height: 1.12;
  color: var(--tinta);
  text-wrap: balance;
}
.titulo--grande { font-size: clamp(2.7rem, 11.5vw, 3.7rem); }

.cabecalho { margin: 0 auto 1.7rem; text-align: center; }
.cabecalho--claro .estrelinha { color: #e3ebff; }
.cabecalho--claro .rotulo { color: var(--luz); }
.cabecalho--claro .titulo { color: #fff; }

.secao {
  position: relative;
  padding: clamp(4rem, 12vw, 7.5rem) 1.125rem;
}

/* Cartão de papel flutuando sobre o céu.
   ::before = a folha (fundo, textura, sombra e a moldura fina impressa);
   ::after  = a folha de trás, levemente fora de esquadro. */
.papel {
  position: relative;
  z-index: 0;
  max-width: 39rem;
  margin: 0 auto;
  padding: clamp(2.9rem, 9.5vw, 4.4rem) clamp(1.5rem, 6vw, 4.2rem) clamp(2.6rem, 8.5vw, 4rem);
  color: var(--tinta);
  color-scheme: light;                  /* campos e listas nativas do formulário em versão clara sobre o papel */
  text-align: center;
}
.papel::before,
.papel::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  border-radius: 3px;
  pointer-events: none;
}
.papel::before {
  /* a moldura fina (4 fios) e as estrelinhas dos cantos são só imagens de fundo: nada de elementos extras */
  --m: .6rem;                            /* distância da moldura até a borda do papel */
  --fio: rgba(19, 34, 74, .17);
  z-index: -1;
  background-color: var(--papel);
  background-image:
    var(--img-estrela), var(--img-estrela), var(--img-estrela), var(--img-estrela),
    linear-gradient(var(--fio), var(--fio)), linear-gradient(var(--fio), var(--fio)),
    linear-gradient(var(--fio), var(--fio)), linear-gradient(var(--fio), var(--fio)),
    var(--img-grao),
    linear-gradient(172deg, #ffffff 0%, #f4f7fd 100%);
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat, no-repeat;
  background-size:
    11px 11px, 11px 11px, 11px 11px, 11px 11px,
    calc(100% - 2 * var(--m) - 20px) 1px, calc(100% - 2 * var(--m) - 20px) 1px,
    1px calc(100% - 2 * var(--m) - 20px), 1px calc(100% - 2 * var(--m) - 20px),
    180px 180px,
    100% 100%;
  background-position:
    left calc(var(--m) - 5px) top calc(var(--m) - 5px), right calc(var(--m) - 5px) top calc(var(--m) - 5px),
    left calc(var(--m) - 5px) bottom calc(var(--m) - 5px), right calc(var(--m) - 5px) bottom calc(var(--m) - 5px),
    center top var(--m), center bottom var(--m),
    left var(--m) center, right var(--m) center,
    0 0,
    0 0;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .6),
    0 2.4rem 4.6rem -1.7rem rgba(0, 3, 18, .9),
    0 .9rem 1.8rem -.9rem rgba(0, 3, 18, .55),
    0 0 5rem rgba(126, 164, 255, .16);
}
.papel::after {
  z-index: -2;
  background: rgba(205, 219, 248, .34);
  transform: rotate(-.9deg) translate3d(-.1rem, .45rem, 0);
}

/* Botões */
.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 3.5rem;
  padding: .85rem 1.7rem;
  border: 1px solid transparent;
  border-radius: 99rem;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .03em;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .25s var(--suave);
}
.botao:active { transform: scale(.97); }
.botao .icone,
.agenda-ics .icone {
  flex: none;
  width: 1.4rem; height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Duas variantes só: contorno (ação secundária) e cheio (ação principal).
   O cheio é marinho sobre o papel e branco sobre o céu. Sem brilho de "aplicativo". */
.botao--contorno {
  color: var(--noite-3);
  border-color: rgba(16, 38, 92, .6);
}
.botao--marinho {
  color: #fff;
  background: var(--noite-3);
  box-shadow: 0 .8rem 1.4rem -.9rem rgba(8, 22, 60, .75);
}
.botao--claro {
  color: var(--noite-2);
  background: #fff;
  box-shadow: 0 1rem 2rem -1rem rgba(0, 4, 20, .8);
}
@media (hover: hover) {
  .botao--contorno:hover { background: var(--noite-3); color: #fff; }
  .botao--marinho:hover { transform: translate3d(0, -2px, 0); }
  .botao--claro:hover { transform: translate3d(0, -2px, 0); }
}

/* --------------------------------------------------------------------------
   0 · Abertura (só com JS)
   -------------------------------------------------------------------------- */
.abertura,
.abertura-fx { display: none; }

html.js .abertura {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 1.5rem) 1rem calc(env(safe-area-inset-bottom, 0px) + 4.6rem);
  overflow: hidden;
  text-align: center;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
html.convite-aberto .abertura { display: none; }

html.js .abertura-fx.ativa {
  display: block;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 70;
  pointer-events: none;
}

/* enquanto a abertura está em cena: página travada e conteúdo guardado */
html.abertura-ativa { height: 100%; }
html.abertura-ativa body {
  height: 100%;
  overflow: hidden;
}
html.abertura-ativa main,
html.abertura-ativa .rodape { visibility: hidden; }
html.abertura-ativa.revelando main,
html.abertura-ativa.revelando .rodape { visibility: visible; }
html.abertura-ativa .lua { visibility: visible; }

.abertura-linha {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 clamp(2.2rem, 8vh, 5rem);
  padding-left: .22em;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-wrap: balance;
  color: #e3ebff;
  animation: entra-desce 1s var(--suave) .15s both;
}
.abertura-linha .estrelinha { color: #e3ebff; margin-bottom: .95rem; }

.abrir {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  animation: entra-sobe 1.15s var(--suave) .1s both;
}
.abrir:focus-visible { outline-offset: 14px; }

.abertura-dica {
  display: block;
  margin-top: clamp(2.2rem, 6.5vh, 3.6rem);
  font-family: var(--serifa);
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.2;
  color: #fff;
}
.abertura-dica span {
  display: inline-block;
  animation: respira 2.6s ease-in-out 1.2s infinite;
}

.abertura-base {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + .6rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1rem;
  animation: surge 1s ease 1s both;
}
.abertura-pular {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .55rem 1.1rem;
  font-family: var(--sans);
  font-size: .9375rem;
  letter-spacing: .05em;
  color: var(--azul-7);                 /* discreto: quem manda na tela é o "Toque para abrir" */
  text-decoration: underline;
  text-decoration-color: rgba(142, 165, 214, .5);
  text-underline-offset: .3em;
}
/* aparelho com movimento reduzido: o link vira "Abrir sem animação" e ganha destaque de escolha de verdade */
html.calmo .abertura-pular {
  font-size: 1.0625rem;
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, .6);
}

.abertura-clarao {
  position: absolute;
  left: 50%; top: 42%;
  width: 150vmin; height: 150vmin;
  margin: -75vmin 0 0 -75vmin;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(176, 204, 255, .34) 0%, rgba(126, 164, 255, .12) 42%, rgba(126, 164, 255, 0) 70%);
  opacity: 0;
  pointer-events: none;
}

/* ---- o envelope: 30em × 20em, tudo em "em" para escalar junto ---- */
.env {
  --env-w: 78vw;
  --env-w: min(78vw, 50vh, 500px);
  position: relative;
  display: block;
  width: var(--env-w);
  height: calc(var(--env-w) * .6667);
  font-size: calc(var(--env-w) / 30);
}
.env-aura {
  position: absolute;
  left: 50%; top: 50%;
  width: 54em; height: 54em;
  margin: -27em 0 0 -27em;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(132, 170, 255, .26) 0%, rgba(132, 170, 255, .09) 52%, rgba(132, 170, 255, 0) 100%);
  pointer-events: none;
}
.env-sombra {
  position: absolute;
  left: 9%; right: 9%;
  bottom: -3.6em;
  height: 2.3em;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(1, 4, 18, .6), rgba(1, 4, 18, 0));
  animation: sombra-flutua 6.5s ease-in-out infinite;
}
.env-flutua {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  display: block;
  animation: flutua 6.5s ease-in-out infinite;
}
.env-grupo {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  display: block;
  -webkit-perspective: 62em;
  perspective: 62em;
  -webkit-perspective-origin: 50% 0%;
  perspective-origin: 50% 0%;
}
.env-tras {
  z-index: 1;
  border-radius: .6em;
  box-shadow: 0 2em 3.2em -1.2em rgba(1, 5, 22, .8), 0 0 4.5em rgba(140, 175, 255, .18);
}
.env-diante { z-index: 3; }
.env-peca {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

.env-aba {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 12em;
  display: block;
  -webkit-transform-origin: 50% 0;
  transform-origin: 50% 0;
}
.env-aba svg { width: 100%; height: 100%; overflow: visible; }
.env-aba--verso {
  opacity: 0;
  transform: rotateX(90deg);
}
.env-aba-sombra {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 12.6em;
}

.env-lacre {
  position: absolute;
  left: 50%; top: 11.2em;
  width: 7.4em; height: 7.4em;          /* ~1/4 da largura do envelope: o monograma dá para ler no celular */
  margin: -3.7em 0 0 -3.7em;
  display: block;
}
.lacre-anel {
  position: absolute;
  top: -.1em; right: -.1em; bottom: -.1em; left: -.1em;
  border: 1px solid rgba(206, 222, 255, .85);
  border-radius: 50%;
  animation: pulso 2.6s ease-out 1.4s infinite both;
}
.lacre-cera {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  display: block;
}
.lacre-cera svg {
  width: 100%; height: 100%;
  filter: drop-shadow(0 .28em .3em rgba(2, 8, 30, .5));
}
.lacre-mono {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: .1em;
  font-family: var(--serifa);
  font-size: 2em;
  font-weight: 500;
  line-height: 1;
  color: #e9efff;
  text-shadow: 0 1px 1px rgba(2, 8, 30, .7);
}
.lacre-mono i {
  margin: 0 .06em;
  font-size: .62em;
  font-weight: 400;
  opacity: .85;
}

/* o cartão marinho guardado no envelope */
.env-cartao {
  position: absolute;
  z-index: 2;
  top: 1.2em; left: 1.6em; right: 1.6em;
  height: 17.4em;
  display: block;
  border-radius: .3em;
  background: linear-gradient(180deg, #17357a 0%, #0c1e4d 62%, #0a1a44 100%);
  box-shadow: inset 0 0 0 1px rgba(214, 226, 255, .6);
}
.env-cartao::before {
  content: '';
  position: absolute;
  top: .6em; right: .6em; bottom: .6em; left: .6em;
  border: 1px solid rgba(200, 216, 255, .3);
  border-radius: .12em;
}
.cartao-estrela {
  position: absolute;
  left: 50%; top: 1.35em;
  width: 1.15em; height: 1.15em;
  margin: 0 0 0 -.575em;
  color: #e3ebff;
}
.cartao-nomes {
  position: absolute;
  top: 3em; left: 2.2em; right: 2.2em;
  height: 7.9em;
  display: block;
}
.cartao-nomes-fixo {
  position: absolute;
  top: 50%; left: 0; right: 0;
  transform: translateY(-50%);
  font-family: var(--script);
  font-size: 2.5em;
  line-height: 1.15;
  color: #fff;
}

/* ---- movimento em repouso ---- */
@keyframes flutua {
  0%, 100% { transform: translate3d(0, -.38em, 0) rotate(-.55deg); }
  50% { transform: translate3d(0, .46em, 0) rotate(.5deg); }
}
@keyframes sombra-flutua {
  0%, 100% { transform: scale(.93); opacity: .72; }
  50% { transform: scale(1.03); opacity: 1; }
}
@keyframes pulso {
  0% { transform: scale(.92); opacity: 0; }
  18% { opacity: .85; }
  100% { transform: scale(1.95); opacity: 0; }
}
@keyframes respira {
  0%, 100% { opacity: 1; }
  50% { opacity: .7; }
}
@keyframes entra-sobe {
  from { opacity: 0; transform: translate3d(0, 1.6rem, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes entra-desce {
  from { opacity: 0; transform: translate3d(0, -.9rem, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes surge {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes some {
  to { opacity: 0; }
}
@keyframes sai-cima {
  to { opacity: 0; transform: translate3d(0, -.6rem, 0); }
}

/* ---- a sequência de abrir (classes postas pelo JS) ---- */
/* 1. resposta imediata ao toque: o lacre afunda, solta uma onda de luz e cai */
.abrindo .abertura-linha { animation: sai-cima .32s ease forwards; }
.abrindo .abertura-dica { animation: some .22s ease forwards; }
.abrindo .lacre-anel { animation: onda .7s cubic-bezier(.2, .6, .3, 1) forwards; }
.abrindo .lacre-cera { animation: lacre-solta .74s cubic-bezier(.5, 0, .8, .45) forwards; }
@keyframes onda {
  0% { transform: scale(.9); opacity: 1; }
  100% { transform: scale(3.8); opacity: 0; }
}
@keyframes lacre-solta {
  0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); opacity: 1; }
  12% { transform: translate3d(0, .05em, 0) scale(.9) rotate(0deg); opacity: 1; }
  30% { transform: translate3d(0, -.3em, 0) scale(1.1) rotate(-5deg); opacity: 1; }
  78% { opacity: 1; }
  100% { transform: translate3d(.9em, 9.5em, 0) scale(.84) rotate(26deg); opacity: 0; }
}

/* 2. a aba abre em 3D: primeiro a face de fora até ficar de perfil, depois o forro estrelado */
.abrindo .env-aba-sombra { animation: some .3s ease .34s forwards; }
.abrindo .env-aba--frente { animation: aba-abre-1 .42s cubic-bezier(.5, 0, .9, .65) .36s forwards; }
.abrindo .env-aba--verso { animation: aba-abre-2 .52s cubic-bezier(.1, .45, .25, 1) .78s forwards; }
@keyframes aba-abre-1 {
  0% { transform: rotateX(0deg); opacity: 1; }
  99% { opacity: 1; }
  100% { transform: rotateX(90deg); opacity: 0; }
}
@keyframes aba-abre-2 {
  0% { transform: rotateX(90deg); opacity: 1; }
  100% { transform: rotateX(180deg); opacity: 1; }
}

/* 3. o cartão sobe */
.abrindo .env-cartao { animation: cartao-sobe 1.05s cubic-bezier(.2, .75, .2, 1) .98s forwards; }
@keyframes cartao-sobe {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -10.6em, 0); }
}

/* 4. os nomes levantam voo, o envelope se despede.
   A moldura do cartão some antes de os nomes ganharem velocidade, e o envelope cai inteiro e opaco
   (só some no fim da queda, já longe), para nenhum quadro do meio parecer uma caixa translúcida. */
.voando .env-grupo { animation: env-cai .62s cubic-bezier(.5, 0, .9, .55) forwards; }
.voando .env-cartao { animation: cartao-some .26s ease-out forwards; }
.voando .env-aba--verso { animation: aba-some .2s ease-out forwards; }
.voando .env-sombra,
.voando .env-aura { animation: some .4s ease forwards; }
.voando .abertura-base { animation: some .3s ease forwards; pointer-events: none; }
.voando .abertura-clarao { animation: clarao 1.25s ease-out forwards; }
@keyframes env-cai {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 1; }
  55% { opacity: 1; }
  100% { transform: translate3d(0, 62vh, 0) rotate(4deg); opacity: 0; }
}
@keyframes aba-some {
  from { transform: rotateX(180deg); opacity: 1; }
  to { transform: rotateX(180deg); opacity: 0; }
}
@keyframes cartao-some {
  from { transform: translate3d(0, -10.6em, 0) scale(1); opacity: 1; }
  to { transform: translate3d(0, -12.4em, 0) scale(1.07); opacity: 0; }
}
@keyframes clarao {
  0% { transform: scale(.35); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: scale(1.15); opacity: 0; }
}

/* saída sem animação longa (movimento reduzido) */
.abertura.some {
  opacity: 0;
  transition: opacity .38s ease;
}

/* --------------------------------------------------------------------------
   1 · Capa
   -------------------------------------------------------------------------- */
.capa {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + clamp(2.6rem, 8vh, 5rem)) 1.25rem calc(env(safe-area-inset-bottom, 0px) + clamp(5.6rem, 13vh, 7.5rem));
  text-align: center;
}

.lua {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + clamp(.6rem, 3.4vh, 3rem));
  right: clamp(.2rem, 4.5vw, 7rem);
  width: clamp(5.8rem, 25vw, 10rem);
  height: auto;
  pointer-events: none;
}

.capa-miolo { width: 100%; }

.capa-chamada {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-left: .34em;
  font-family: var(--sans);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--luz);
}
.capa-chamada .estrelinha { color: #e3ebff; }

.capa-nomes {
  position: relative;
  margin: clamp(1rem, 3.4vh, 2rem) 0 clamp(.9rem, 2.8vh, 1.6rem);
}
.capa-halo {
  position: absolute;
  left: 50%; top: 50%;
  width: 34rem; height: 22rem;
  margin: -11rem 0 0 -17rem;
  background: radial-gradient(closest-side, rgba(74, 114, 204, .30) 0%, rgba(74, 114, 204, .10) 55%, rgba(74, 114, 204, 0) 100%);
  pointer-events: none;
}

.nomes {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  font-family: var(--script);
  font-size: clamp(3.4rem, 17.5vw, 5.4rem);
  font-weight: 400;
  line-height: 1.04;
  color: #fff;
  text-align: center;
  text-shadow:
    0 0 .06em rgba(255, 255, 255, .5),
    0 0 .3em rgba(156, 190, 255, .55),
    0 0 .85em rgba(112, 152, 255, .4);
}
.nomes:focus { outline: none; }
.nome {
  display: block;
  padding: 0 .1em;
  white-space: nowrap;
}
.e-comercial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: .1em 0 .3em;
  font-family: var(--serifa);
  font-size: .42em;
  font-style: italic;
  font-weight: 400;
  line-height: 1;
  color: #b4c7f1;
  text-shadow: none;
}
.e-comercial::before,
.e-comercial::after {
  content: '';
  width: 2.1em; height: 1px;
  margin: .12em .55em 0;
  background: linear-gradient(90deg, rgba(180, 199, 241, 0), rgba(180, 199, 241, .75));
}
.e-comercial::after { transform: scaleX(-1); }

/* durante o voo os nomes ficam por cima do envelope */
.nomes.voa {
  z-index: 60;
  visibility: visible;
}
/* a miniatura dos nomes impressa no cartão do envelope */
.nomes--mini {
  position: absolute;
  left: 50%; top: 50%;
  max-width: none;
  margin: 0;
  -webkit-transform-origin: 50% 50%;
  transform-origin: 50% 50%;
}
html.pulou .nomes { animation: surge 1.1s ease both; }

.capa-convite {
  max-width: 17em;
  margin: 0 auto;
  font-style: italic;
  font-size: clamp(1.2rem, 5.2vw, 1.45rem);
  line-height: 1.32;
  color: #eef3ff;
  text-wrap: balance;
}

.capa-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(1.1rem, 3.6vh, 2.2rem);
}
.capa-data-fio {
  display: block;
  width: min(15rem, 62vw);
  height: 1px;
  background: linear-gradient(90deg, rgba(201, 215, 247, 0), rgba(201, 215, 247, .6), rgba(201, 215, 247, 0));
}
.capa-semana {
  margin-top: .95rem;
  padding-left: .26em;
  font-family: var(--sans);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: #e3ebff;
}
.capa-dia {
  margin-top: .25rem;
  font-size: clamp(1.5rem, 7vw, 2.25rem);   /* "17 de dezembro de 2026" por extenso, numa linha só */
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: .01em;
  white-space: nowrap;
  color: #fff;
}
.capa-semana[hidden] + .capa-dia { margin-top: .85rem; }
.capa-hora {
  margin: .1rem 0 .95rem;
  font-style: italic;
  font-size: 1.45rem;
  line-height: 1.3;
  color: #eef3ff;
}
.capa-cidade {
  margin-top: .95rem;
  padding-left: .3em;
  font-family: var(--sans);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--luz);
}
html.sem-data .capa-dia { font-style: italic; }

.capa-rolar {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + .9rem);
  width: -webkit-fit-content;
  width: fit-content;
  min-width: 44px;
  min-height: 44px;
  margin: 0 auto;
  padding: .3rem .9rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--sans);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--luz);
}
.capa-rolar-texto { padding-left: .3em; }
.capa-rolar-fio {
  position: relative;
  display: block;
  width: 1px; height: 2.3rem;
  margin-top: .6rem;
  overflow: hidden;
  background: rgba(201, 215, 247, .28);
}
.capa-rolar-fio i {
  position: absolute;
  top: 0; left: 0;
  width: 1px; height: 45%;
  background: #fff;
  animation: desce 2.2s cubic-bezier(.6, 0, .4, 1) infinite;
}
@keyframes desce {
  0% { transform: translate3d(0, -110%, 0); }
  100% { transform: translate3d(0, 240%, 0); }
}

/* --------------------------------------------------------------------------
   2 · Mensagem especial
   -------------------------------------------------------------------------- */
.secao--mensagem { padding-top: clamp(2.5rem, 8vw, 5rem); }

.carta-texto p {
  max-width: 29em;
  margin: 0 auto 1.05em;
  font-size: 1.28rem;
  line-height: 1.6;
  color: #1a2a55;
  text-wrap: pretty;
}
.carta-texto p:last-child { margin-bottom: 0; }

.carta-assinatura { margin-top: 2rem; }
.assinatura-abre {
  display: block;
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--tinta-3);
}
.assinatura-nomes {
  display: block;
  margin-top: .3rem;
  font-family: var(--script);
  font-size: clamp(2.3rem, 10.6vw, 3rem);
  font-weight: 400;
  line-height: 1.18;
  color: var(--noite-3);
}
.assinatura-bloco {                   /* "Maurício" / "& Maria Clara": cada bloco inteiro na sua linha */
  display: inline-block;
  white-space: nowrap;
}

.assinatura-e {
  margin: 0 .14em;
  font-family: var(--serifa);
  font-style: italic;
  font-size: .6em;
  color: var(--azul-5);
}

.versiculo {
  max-width: 31rem;
  margin: clamp(3.4rem, 13vw, 5.6rem) auto 0;
  text-align: center;
}
.versiculo-traco {
  width: 7.5rem; height: 1.5rem;
  margin: 0 auto 1.3rem;
  color: #dbe6ff;
}
.versiculo-texto p {
  font-style: italic;
  font-size: clamp(1.55rem, 6.6vw, 2.1rem);
  line-height: 1.28;
  color: #fff;
  text-wrap: balance;
}
.versiculo-texto p::before { content: '\201C'; }
.versiculo-texto p::after { content: '\201D'; }
.versiculo-ref {
  margin-top: 1.1rem;
  padding-left: .3em;
  font-family: var(--sans);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--luz);
}

/* --------------------------------------------------------------------------
   3 · Contagem regressiva (faixa em marinho)
   -------------------------------------------------------------------------- */
.faixa {
  position: relative;
  padding: clamp(3.6rem, 12vw, 6rem) 1rem;
  text-align: center;
  background: linear-gradient(180deg,
    rgba(26, 54, 126, 0) 0%,
    rgba(26, 54, 126, .46) 16%,
    rgba(26, 54, 126, .46) 84%,
    rgba(26, 54, 126, 0) 100%);
}
.faixa::before,
.faixa::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  width: min(74%, 36rem);
  height: 1px;
  margin: 0 auto;
  background: linear-gradient(90deg, rgba(201, 215, 247, 0), rgba(201, 215, 247, .55), rgba(201, 215, 247, 0));
}
.faixa::before { top: 0; }
.faixa::after { bottom: 0; }

.contador {
  --anel: clamp(3.9rem, 19.6vw, 7rem);
  display: flex;
  justify-content: center;
  gap: clamp(.5rem, 2.6vw, 1.7rem);
  margin: 0 auto;
}
.unidade {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.anel {
  position: relative;
  width: var(--anel);
  height: var(--anel);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(201, 215, 247, .36);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(72, 108, 190, .30) 0%, rgba(72, 108, 190, 0) 100%);
}
.orbita {
  position: absolute;
  top: -1px; right: -1px; bottom: -1px; left: -1px;
  border-radius: 50%;
  transform: rotate(var(--ang, 0deg));
  transition: transform .9s cubic-bezier(.3, .7, .2, 1);
}
.orbita i {
  position: absolute;
  left: 50%; top: 0;
  width: .42rem; height: .42rem;
  margin: -.21rem 0 0 -.21rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 .5rem .12rem rgba(170, 200, 255, .85);
}
.num {
  display: block;
  font-size: clamp(1.95rem, 8.8vw, 3.1rem);
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
  color: #fff;
}
.num.troca { animation: troca .4s var(--suave); }
@keyframes troca {
  from { opacity: .25; transform: translate3d(0, .22em, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
.legenda {
  margin-top: .6rem;
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.2;
  color: #d5dff7;
}
/* chegou o dia / já passou: o título vira a própria mensagem */
.faixa.chegou .contador { display: none; }
.faixa.chegou .titulo { font-size: clamp(2.2rem, 9.4vw, 3.3rem); }
.faixa.chegou .cabecalho { margin-bottom: 0; }
.faixa.passou .rotulo { display: none; }

/* --------------------------------------------------------------------------
   4 · O grande dia — a constelação que liga a igreja ao rancho
   -------------------------------------------------------------------------- */
.secao--programacao { padding-top: clamp(3.8rem, 12vw, 7.5rem); }

.programacao-data {
  margin-top: .95rem;
  font-size: 1.32rem;
  line-height: 1.35;
  color: #e3ebff;
  text-wrap: balance;
}
.programacao-data::first-letter { text-transform: uppercase; }

.roteiro {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  max-width: 25rem;
  margin: 2rem auto 0;
}

.momento {
  width: 100%;
  padding: 2rem 1.4rem 2.1rem;
}
/* a ordem do roteiro: selo numerado + "Primeiro" / "Depois" */
.momento-ordem {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  margin-bottom: 1rem;
}
.momento-num {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  background: var(--noite-3);
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(16, 38, 92, .35);
  font-family: var(--serifa);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: lining-nums;
  color: #fff;
}
.momento-rotulo {
  padding-left: .2em;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--tinta-2);
}
.momento-icone {
  width: 3.5rem; height: 3.5rem;
  margin: 0 auto .4rem;
  fill: none;
  stroke: var(--noite-3);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.momento-titulo {
  font-style: italic;
  font-weight: 400;
  font-size: 2.05rem;
  line-height: 1.1;
  color: var(--tinta);
}
.momento-hora {
  margin-top: .45rem;
  font-style: italic;
  font-size: 1.32rem;
  line-height: 1.25;
  color: var(--tinta-2);
}
.momento-hora--curta {
  margin-top: .5rem;
  font-style: normal;
  font-size: 3.2rem;
  line-height: 1;
  letter-spacing: .01em;
  color: var(--noite-3);
}
.momento-fio {
  display: block;
  width: 3rem; height: 1px;
  margin: 1rem auto .95rem;
  background: rgba(19, 34, 74, .32);
}
.momento-local {
  font-size: 1.42rem;
  font-weight: 500;
  line-height: 1.22;
  color: var(--tinta);
  text-wrap: balance;
}
.momento-endereco {
  margin: .45rem 0 1.4rem;
  font-size: 1.12rem;
  line-height: 1.35;
  color: var(--tinta-3);
}
.momento-endereco span {              /* cada trecho do endereço na sua linha, como num envelope */
  display: block;
  text-wrap: balance;
}

/* quanto cada convidado paga na recepção: uma etiqueta discreta entre o endereço e o botão */
.momento-valor {
  width: -webkit-fit-content;
  width: fit-content;
  min-width: 12.5rem;
  max-width: 100%;
  margin: -.1rem auto 1.55rem;
  padding: .8rem 1.5rem .85rem;
  border: 1px solid rgba(19, 34, 74, .14);
  border-radius: .6rem;
  background: linear-gradient(180deg, rgba(223, 231, 246, .72) 0%, rgba(223, 231, 246, .34) 100%);
}
.momento-valor-rotulo {
  padding-left: .22em;                  /* compensa o espaçamento da última letra */
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--tinta-3);
}
.momento-valor-preco {
  margin-top: .25rem;
  font-size: 2.35rem;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: .01em;
  white-space: nowrap;
  color: var(--noite-3);
}
.momento-valor-moeda {
  font-size: .5em;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--tinta-2);
}
.momento-valor-nota {
  margin-top: .3rem;
  font-style: italic;
  font-size: 1.12rem;
  line-height: 1.3;
  color: var(--tinta-2);
}

.ligacao {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: .7rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.const {
  width: min(78%, 14.5rem);
  height: auto;
  overflow: visible;
}
.const--h { display: none; }
.const .seg {
  stroke: rgba(207, 221, 255, .62);
  stroke-width: 1;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.const .no { fill: #fff; }
.const-soltas { fill: rgba(220, 232, 255, .7); }
.const .seta {                        /* a constelação aponta para o próximo passo */
  fill: none;
  stroke: #e3ebff;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: opacity .5s ease 1s;
}
html.revela-pronto .const:not(.desenha) .seta { opacity: 0; }
.ligacao-frase {
  text-align: center;
  max-width: 19.5rem;
  margin: .7rem auto;
  font-style: italic;
  font-size: clamp(1.42rem, 6.2vw, 1.72rem);
  line-height: 1.28;
  color: #fff;
  text-wrap: balance;
}

/* a constelação se desenha: os fios crescem de estrela em estrela (só transform/opacity) */
.const .seg,
.const .no,
.const-soltas { transition: transform .3s cubic-bezier(.4, 0, .2, 1), opacity .3s ease; }
.const .seg {
  transform-box: fill-box;
  transition-delay: calc(var(--i) * .2s + .12s);
}
.const .no { transition-delay: calc(var(--i) * .2s + .04s); transition-duration: .36s; }
.const-soltas { transition-delay: .5s; transition-duration: .7s; }
.const.desenha .no { animation: cintila 3.6s ease-in-out infinite; animation-delay: calc(var(--i) * .8s + 1.6s); }
@keyframes cintila {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
html.revela-pronto .const:not(.desenha) .seg { opacity: 0; }
html.revela-pronto .const:not(.desenha) .no { opacity: 0; transform: scale(.1); }
html.revela-pronto .const:not(.desenha) .const-soltas { opacity: 0; }
@supports (transform-box: fill-box) {
  html.revela-pronto .const:not(.desenha) .seg { opacity: 1; transform: scale(0); }
}

.agenda {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2.7rem auto 0;
  text-align: center;
}
.agenda-ics {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  margin-top: .7rem;
  padding: .4rem .8rem;
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.3;
  color: #e3ebff;
  text-decoration: underline;
  text-decoration-color: rgba(227, 235, 255, .45);
  text-underline-offset: .24em;
}
.agenda-ics .icone { width: 1.15rem; height: 1.15rem; }

/* --------------------------------------------------------------------------
   5 · Confirmação de presença
   -------------------------------------------------------------------------- */
.secao--presenca { padding-top: clamp(1.5rem, 5vw, 3rem); }
.papel--rsvp { max-width: 31rem; }
.papel--rsvp .cabecalho { margin-bottom: 1.1rem; }
.rsvp-texto {
  max-width: 21rem;
  margin: 0 auto 1.9rem;
  font-size: 1.28rem;
  line-height: 1.45;
  color: #1a2a55;
  text-wrap: balance;
}
.papel--rsvp .botao {
  width: 100%;
  max-width: 21rem;
  padding-left: 1rem;
  padding-right: 1rem;
}
.rsvp-prazo {
  margin-top: 1.25rem;
  font-style: italic;
  font-size: 1.12rem;
  line-height: 1.4;
  color: var(--tinta-3);
}

/* ---- o formulário: uma pergunta de cada vez, tudo no toque ---- */
.rsvp {
  max-width: 21rem;
  margin: 0 auto;
}
.rsvp-passo {
  min-width: 0;
  margin: 1.7rem 0 0;                   /* margem (e não padding): num fieldset o padding fica abaixo da legenda */
  padding: 0;
  border: 0;
}
.rsvp-passo:first-child { margin-top: 0; }
.rsvp-pergunta {
  display: block;
  width: 100%;
  margin: 0 0 .85rem;
  padding: 0;
  font-family: var(--serifa);
  font-style: italic;
  font-weight: 400;
  font-size: 1.42rem;
  line-height: 1.22;
  color: var(--tinta);
  text-wrap: balance;
}
.rsvp-onde {
  display: block;
  margin-top: .3rem;
  font-family: var(--serifa);
  font-style: normal;
  font-size: 1.08rem;
  line-height: 1.3;
  color: var(--tinta-3);
  text-wrap: balance;
}
/* o valor da recepção, logo abaixo da pergunta: quem confirma já sabe quanto é */
.rsvp-valor { margin-top: .2rem; color: var(--tinta-2); }
.rsvp-valor strong { font-weight: 500; color: var(--tinta); }
.rsvp-junto { white-space: nowrap; }

.rsvp-opcoes {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .6rem;
}
.rsvp-opcoes--duas { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* cada resposta é um rádio de verdade vestido de botão */
.rsvp-opcao {
  position: relative;
  display: block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.rsvp-opcao input {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.rsvp-opcao span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 3.4rem;
  padding: .7rem 1rem;
  border: 1px solid rgba(16, 38, 92, .55);
  border-radius: 99rem;
  background: #fff;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .03em;
  color: var(--noite-3);
  transition: background-color .2s ease, color .2s ease, transform .25s var(--suave);
}
.rsvp-opcao span::before {             /* o "visto" da resposta escolhida (não depende só da cor) */
  content: '';
  flex: none;
  width: 0; height: .95rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' d='M4.500 12.800l4.800 4.700L19.500 6.500'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0;
  transition: width .2s ease, opacity .2s ease;
}
.rsvp-opcao input:checked + span {
  background: var(--noite-3);
  border-color: var(--noite-3);
  color: #fff;
}
.rsvp-opcao input:checked + span::before { width: .95rem; opacity: 1; }
.rsvp-opcao input:active + span { transform: scale(.97); }
.rsvp-opcao input:focus-visible + span {
  outline: 2px solid var(--noite-4);
  outline-offset: 3px;
}

/* lista de nomes (select nativo: no celular abre a lista grande do próprio aparelho) e campo de texto */
.rsvp-campo { position: relative; }
.rsvp-campo + .rsvp-campo { margin-top: .6rem; }
.rsvp-campo select,
.rsvp-campo input {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  min-height: 3.4rem;
  margin: 0;
  padding: .7rem 1.3rem;
  border: 1px solid rgba(16, 38, 92, .55);
  border-radius: 1.7rem;
  background: #fff;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .02em;
  color: var(--noite-3);
  text-align: center;
  text-align-last: center;
}
.rsvp-campo select {
  padding-right: 2.7rem;                /* lugar da setinha; à esquerda sobra espaço para nomes compridos */
  padding-left: 1.2rem;
  text-overflow: ellipsis;
  cursor: pointer;
}
.rsvp-campo select option {
  background: #fff;
  color: var(--tinta);
}
.rsvp-campo input::placeholder { color: var(--tinta-3); opacity: 1; }
.rsvp-campo select:focus,
.rsvp-campo input:focus {
  outline: 2px solid var(--noite-4);
  outline-offset: 3px;
}
.rsvp-seta {
  position: absolute;
  right: 1.15rem; top: 50%;
  width: 1.3rem; height: 1.3rem;
  margin-top: -.65rem;
  fill: none;
  stroke: var(--noite-3);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

/* quantas pessoas: − número + */
.rsvp-contador {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
}
.rsvp-mm {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem; height: 3.4rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(16, 38, 92, .55);
  border-radius: 50%;
  background: #fff;
  color: var(--noite-3);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s var(--suave), opacity .2s ease;
}
.rsvp-mm svg {
  width: 1.5rem; height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}
.rsvp-mm:active { transform: scale(.94); }
.rsvp-mm:disabled { opacity: .35; cursor: default; }
.rsvp-qtd {
  min-width: 2.2em;
  font-family: var(--serifa);
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--noite-3);
}

/* conferência + botão de enviar */
.rsvp-fim { padding-top: 1.7rem; }
.rsvp-resumo {
  margin: 0 0 1.15rem;
  padding: 1rem 1.1rem 1.05rem;
  border-radius: .9rem;
  background: #eef2fb;
  text-align: left;
}
.rsvp-resumo p {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .9rem;
  font-size: 1.12rem;
  line-height: 1.3;
  color: var(--tinta-2);
}
.rsvp-resumo p + p {
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px solid rgba(19, 34, 74, .12);
}
.rsvp-resumo strong {
  flex: none;
  max-width: 62%;
  font-weight: 500;
  color: var(--tinta);
  text-align: right;
}
.rsvp-nota {
  margin-top: .95rem;
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.35;
  color: var(--tinta-3);
  text-wrap: balance;
}

/* cada pergunta nova entra com um fade curto */
.rsvp-entra { animation: rsvp-entra .45s var(--suave) both; }
@keyframes rsvp-entra {
  from { opacity: 0; transform: translate3d(0, .6rem, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* --------------------------------------------------------------------------
   6 · Rodapé
   -------------------------------------------------------------------------- */
.rodape {
  position: relative;
  padding: clamp(3rem, 10vw, 5.5rem) 1.25rem calc(env(safe-area-inset-bottom, 0px) + clamp(10.5rem, 36vw, 15rem));
  text-align: center;
}
.rodape-miolo { position: relative; z-index: 1; }
.monograma {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.8rem; height: 4.8rem;
  margin: 0 auto 1.3rem;
  border: 1px solid rgba(201, 215, 247, .55);
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  color: #fff;
}
.monograma::after {
  content: '';
  position: absolute;
  top: .3rem; right: .3rem; bottom: .3rem; left: .3rem;
  border: 1px solid rgba(201, 215, 247, .22);
  border-radius: 50%;
}
.monograma i {
  margin: 0 .08em;
  font-size: .62em;
  color: #b4c7f1;
}
.rodape-nomes {
  font-family: var(--script);
  font-size: clamp(2.05rem, 8.6vw, 3.6rem);
  font-weight: 400;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 0 .3em rgba(156, 190, 255, .5), 0 0 .85em rgba(112, 152, 255, .35);
  text-wrap: balance;
}
.rodape-bloco {                      /* "Maurício" / "& Maria Clara": o "&" nunca fica pendurado no fim da linha */
  display: inline-block;
  white-space: nowrap;
}
.rodape-e {
  font-family: var(--serifa);
  font-style: italic;
  font-size: .56em;
  color: #b4c7f1;
  text-shadow: none;
}
.rodape-data {
  margin-top: .8rem;
  padding-left: .14em;
  font-size: 1.4rem;
  line-height: 1.3;
  letter-spacing: .14em;
  color: #e3ebff;
}
html.sem-data .rodape-data { font-style: italic; letter-spacing: .01em; }
.rodape-frase {
  margin-top: 1rem;
  font-style: italic;
  font-size: 1.38rem;
  line-height: 1.3;
  color: #fff;
  text-wrap: balance;
}
.horizonte {
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: clamp(8rem, 30vw, 12.5rem);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Botão de som (só aparece se houver música no config)
   -------------------------------------------------------------------------- */
.som {
  position: fixed;
  right: calc(env(safe-area-inset-right, 0px) + 1rem);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem; height: 3.25rem;
  padding: 0;
  border: 1px solid rgba(201, 215, 247, .55);
  border-radius: 50%;
  background: rgba(9, 22, 56, .86);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 .6rem 1.4rem -.4rem rgba(0, 4, 20, .85);
  -webkit-tap-highlight-color: transparent;
}
.som svg {
  width: 1.45rem; height: 1.45rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.som .som-ondas { transition: opacity .25s ease; }
.som .som-corte { opacity: 0; transition: opacity .25s ease; }
.som[aria-pressed="false"] .som-ondas { opacity: 0; }
.som[aria-pressed="false"] .som-corte { opacity: 1; }
html.abertura-ativa .som { display: none; }

/* --------------------------------------------------------------------------
   Entradas ao rolar (o conteúdo só fica escondido enquanto o JS garante a revelação)
   -------------------------------------------------------------------------- */
html.revela-pronto [data-revela]:not(.visivel) {
  opacity: 0;
  transform: translate3d(0, 1.7rem, 0);
}
html.revela-pronto [data-revela="surge"]:not(.visivel) { transform: none; }
html.revela-pronto [data-revela="papel"]:not(.visivel) { transform: translate3d(0, 2.8rem, 0) rotate(-1.1deg); }
[data-revela].visivel {
  transition: opacity .8s ease, transform .95s var(--suave);
  transition-delay: var(--d, 0ms);
}

/* --------------------------------------------------------------------------
   Telas maiores
   -------------------------------------------------------------------------- */
@media (min-width: 700px) {
  .secao { padding-left: 2rem; padding-right: 2rem; }
  .carta-texto p { font-size: 1.36rem; }
  .abertura-dica { font-size: 1.5rem; }
  .papel::before { --m: .8rem; }
  .momento { padding: 3rem 2rem 2.8rem; }
}

@media (min-width: 960px) {
  .nomes {
    flex-direction: row;
    align-items: baseline;
    font-size: clamp(5.4rem, 8.3vw, 8.4rem);
  }
  .nome { padding: 0 .04em; }
  .e-comercial {
    width: auto;
    margin: 0 .34em;
    font-size: .46em;
  }
  .e-comercial::before,
  .e-comercial::after { display: none; }
  .capa-halo { width: 62rem; height: 26rem; margin: -13rem 0 0 -31rem; }
  .capa-convite { font-size: 1.6rem; max-width: none; }
  .capa-nomes { margin: 1.4rem 0 1.5rem; }

  .roteiro {
    grid-template-columns: minmax(0, 1fr) 16.25rem minmax(0, 1fr);
    align-items: stretch;
    max-width: 68rem;
    margin-top: 3.4rem;
  }
  .momento {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    max-width: none;
    margin: 0;
    padding: 3.2rem 2.2rem 3rem;
  }
  /* as duas colunas ficam com as linhas na mesma altura */
  .momento-hora {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.7rem;
    margin-top: .5rem;
  }
  .momento-local {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.5rem;
  }
  .momento .botao { margin-top: auto; }
  .env { --env-w: min(40vw, 56vh, 620px); }   /* em tela larga o envelope cresce: a abertura não acontece miúda */
  .abertura-linha { font-size: 1.0625rem; letter-spacing: .26em; padding-left: .26em; }
  .abertura-dica { font-size: 1.65rem; }
  .capa-dia { font-size: 2.9rem; }
  .capa-hora { font-size: 1.5rem; }
  .capa-data-fio { width: 19rem; }
  .ligacao {
    justify-content: center;
    padding: 0;
  }
  .const--v { display: none; }
  .const--h { display: block; width: 16.25rem; }
  .ligacao-frase {
    max-width: 13.5rem;
    margin: 1rem auto 0;
    font-size: 1.5rem;
  }
  .agenda { margin-top: 3.4rem; }
  .rodape { padding-bottom: 16rem; }
  .horizonte { height: 13.5rem; }
}

/* telas muito estreitas ou muito baixas: a lua encolhe e vai para o canto, longe do texto */
@media (max-width: 345px), (max-height: 600px) {
  .lua {
    top: calc(env(safe-area-inset-top, 0px) + .1rem);
    right: .1rem;
    width: 4.1rem;
  }
}

/* celulares baixos (ex.: 360×640): aperta um pouco a capa e a abertura */
@media (max-height: 700px) and (max-width: 699px) {
  .nomes { font-size: clamp(3.2rem, 16.5vw, 5rem); }
  .capa { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 5.2rem); }
  .capa-hora { margin-bottom: .7rem; }
  .capa-cidade { margin-top: .7rem; }
  .capa-rolar-fio { height: 1.6rem; margin-top: .45rem; }
  .abertura-linha { margin-bottom: 2.2rem; }
}

/* link de pular / tecla Esc: a capa entra só com opacidade, sem deslocamento */
html.sem-voo.revela-pronto #capa [data-revela]:not(.visivel) { transform: none; }

/* --------------------------------------------------------------------------
   Aparelhos com "reduzir movimento" (classe .calmo, posta no <head>)
   • A abertura do envelope começa com o toque da pessoa e toca inteira: durante ela o JS põe
     .com-movimento no <html> e tira logo depois.
   • Todo o resto fica parado: nada flutua, pulsa ou cintila, e as entradas ao rolar aparecem direto.
   -------------------------------------------------------------------------- */
html.calmo .abrir,
html.calmo .env-flutua,
html.calmo .abertura-dica span,
html.calmo .capa-rolar-fio i,
html.calmo .const.desenha .no,
html.calmo .rsvp-entra,
html.calmo .abertura:not(.abrindo) .abertura-linha,
html.calmo .abertura:not(.voando) .abertura-base,
html.calmo .abertura:not(.voando) .env-sombra { animation: none; }
html.calmo .abertura:not(.abrindo) .lacre-anel,
html.calmo .capa-rolar-fio i { display: none; }

@media (prefers-reduced-motion: reduce) {
  html:not(.com-movimento) *,
  html:not(.com-movimento) *::before,
  html:not(.com-movimento) *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  html:not(.com-movimento) .abertura.some { transition: opacity .38s ease !important; }
  html:not(.com-movimento).revela-pronto [data-revela]:not(.visivel) {
    opacity: 1;
    transform: none;
  }
  html:not(.com-movimento).revela-pronto .const:not(.desenha) .seg,
  html:not(.com-movimento).revela-pronto .const:not(.desenha) .no,
  html:not(.com-movimento).revela-pronto .const:not(.desenha) .const-soltas,
  html:not(.com-movimento).revela-pronto .const:not(.desenha) .seta {
    opacity: 1;
    transform: none;
  }
}
