/* Formatura LN — o convite impresso levado para a tela:
   papel preto com grão, tinta greige do monograma, versais espaçadas,
   e o verde musgo da decoração nos pontos de ação.
   Os eixos finos do monograma (linhas de desenho técnico) viram o fio
   que liga o convite à confirmação e as marcas de canto do formulário. */

:root {
  color-scheme: dark;
  --papel: #0e0e0d;
  --papel-claro: #181817;
  --tinta: #c3bdb0;          /* greige do monograma */
  --tinta-suave: #918e87;    /* cinza das versais do convite */
  --branco: #f2f0ea;         /* branco da assinatura */
  --musgo: #4c5a39;          /* verde musgo / militar */
  --musgo-claro: #93a376;    /* musgo legível sobre preto */
  --musgo-fundo: #1b2015;
  --fio: rgba(195, 189, 176, .26);
  --fio-forte: rgba(195, 189, 176, .55);
  --alerta: #c98b7a;

  --versal: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --texto: "EB Garamond", Garamond, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: 19px;
  line-height: 1.45;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  padding-block: 0 72px;
  min-height: 100vh;
}

/* papel: mancha de luz suave + grão, fixos atrás do conteúdo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  .16 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"),
    radial-gradient(120% 70% at 50% 28%, #1c1c1a 0%, #121211 55%, #0b0b0a 100%);
}

img { max-width: 100%; height: auto; display: block; }

.so-leitor {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------- versais do convite ---------- */
.versal {
  font-family: var(--versal);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--tinta-suave);
  margin: 0;
  text-wrap: balance;
}
.versal-p { font-size: clamp(11px, 3vw, 13.5px); }
.versal-m { font-size: clamp(13.5px, 3.7vw, 17px); color: var(--tinta); }

/* ---------- o convite ---------- */
.convite {
  max-width: 620px;
  margin: 0 auto;
  padding-block: clamp(36px, 9vw, 72px) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.monograma { width: min(64%, 330px); margin-bottom: clamp(30px, 8vw, 54px); }
.convite .curso { margin-top: 8px; }
.data {
  font-family: var(--versal);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--tinta);
  font-size: clamp(17px, 5.1vw, 34px);
  letter-spacing: .13em;
  margin: clamp(22px, 6vw, 36px) 0 10px;
  white-space: nowrap;
}
.data span { color: var(--tinta-suave); padding: 0 .12em; }
.convite .local { margin-top: 6px; }
.convite .traje { margin-top: clamp(20px, 5vw, 30px); }
.assinatura { width: min(62%, 300px); margin-top: clamp(4px, 2vw, 12px); }

/* fio de eixo que desce do convite até a confirmação */
.eixo {
  width: 1px;
  height: clamp(48px, 12vw, 84px);
  margin: clamp(8px, 3vw, 20px) auto 0;
  background: linear-gradient(var(--fio), var(--fio-forte));
  position: relative;
}
.eixo::after {
  content: "";
  position: absolute; left: 50%; bottom: 0;
  width: 15px; height: 1px; background: var(--fio-forte);
  transform: translate(-50%, 0);
}

/* ---------- confirmação ---------- */
.rsvp {
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  padding: clamp(30px, 8vw, 44px) clamp(18px, 6vw, 40px) clamp(30px, 8vw, 40px);
  text-align: center;
}
/* marcas de canto, como registro de prancha */
.rsvp::before, .rsvp::after, .cantos::before, .cantos::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border: 0 solid var(--fio-forte); pointer-events: none;
}
.rsvp::before  { top: 0; left: 0;  border-top-width: 1px; border-left-width: 1px; }
.rsvp::after   { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.cantos::before { bottom: 0; left: 0;  border-bottom-width: 1px; border-left-width: 1px; }
.cantos::after  { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

.rsvp h2 {
  font-family: var(--versal);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: clamp(16px, 4.6vw, 21px);
  color: var(--branco);
  margin: 0 0 6px;
  text-wrap: balance;
}
.rsvp .prazo { margin-bottom: 26px; }

.passo { display: flex; flex-direction: column; gap: 18px; text-align: left; }

.rotulo {
  font-family: var(--versal);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 11.5px;
  color: var(--tinta-suave);
  display: block;
  margin-bottom: 6px;
}

.campo {
  width: 100%;
  font: inherit;
  font-size: 21px;
  color: var(--branco);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--fio-forte);
  border-radius: 0;
  padding: 8px 2px 9px;
  outline: none;
  transition: border-color .15s;
}
.campo::placeholder { color: #6f6c66; font-style: italic; }
.campo:focus { border-bottom-color: var(--musgo-claro); box-shadow: 0 1px 0 var(--musgo-claro); }
textarea.campo { resize: vertical; min-height: 78px; font-size: 19px; line-height: 1.35; }

.dica { font-size: 17px; color: var(--tinta-suave); margin: 0; font-style: italic; }
.dica.erro { color: var(--alerta); font-style: normal; }

/* lista que abre conforme a pessoa digita */
.sugestoes { list-style: none; margin: -8px 0 0; padding: 0; }
.sugestoes li + li { border-top: 1px solid var(--fio); }
.sugestoes button {
  width: 100%;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font: inherit; font-size: 21px; color: var(--tinta);
  background: transparent; border: 0; border-radius: 0;
  padding: 13px 4px; text-align: left; cursor: pointer;
}
.sugestoes button:hover, .sugestoes button:focus-visible { color: var(--branco); background: rgba(195, 189, 176, .06); }
.sugestoes .marca {
  font-family: var(--versal); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--musgo-claro); white-space: nowrap; flex: none;
}
.sugestoes mark { background: none; color: var(--branco); }

.convidado { text-align: center; }
.convidado .nome {
  font-size: clamp(26px, 7.4vw, 34px); line-height: 1.15; color: var(--branco);
  margin: 2px 0 6px; text-wrap: balance;
}
.trocar {
  font: inherit; font-size: 16px; font-style: italic; color: var(--tinta-suave);
  background: none; border: 0; padding: 4px 6px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--fio-forte);
}
.trocar:hover { color: var(--tinta); }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

.opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opcoes label { position: relative; display: block; cursor: pointer; }
.opcoes input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opcoes span {
  display: flex; align-items: center; justify-content: center;
  min-height: 58px; padding: 10px 8px;
  border: 1px solid var(--fio-forte);
  font-family: var(--versal); text-transform: uppercase; letter-spacing: .14em;
  font-size: 12.5px; line-height: 1.35; text-align: center; color: var(--tinta);
  transition: background .15s, border-color .15s, color .15s;
}
.opcoes label:hover span { border-color: var(--tinta); }
.opcoes input:checked + span { background: var(--musgo); border-color: var(--musgo-claro); color: var(--branco); }
.opcoes input.nao:checked + span { background: var(--papel-claro); border-color: var(--tinta); }
.opcoes input:focus-visible + span { outline: 2px solid var(--branco); outline-offset: 3px; }

.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 58px; padding: 12px 18px;
  font-family: var(--versal); text-transform: uppercase; letter-spacing: .2em; font-size: 13.5px;
  color: var(--branco); background: var(--musgo);
  border: 1px solid var(--musgo-claro); border-radius: 0; cursor: pointer; text-decoration: none;
  transition: background .15s;
}
.botao:hover { background: #586843; }
.botao:disabled { opacity: .45; cursor: default; }
.botao.fio { background: transparent; border-color: var(--fio-forte); color: var(--tinta); }
.botao.fio:hover { border-color: var(--tinta); background: rgba(195, 189, 176, .05); }
.botao:focus-visible, .trocar:focus-visible, .sugestoes button:focus-visible, a:focus-visible {
  outline: 2px solid var(--branco); outline-offset: 3px;
}

/* tela final */
.feito { text-align: center; align-items: center; }
.selo {
  width: 62px; height: 62px; border: 1px solid var(--musgo-claro); border-radius: 50%;
  display: grid; place-items: center; color: var(--musgo-claro); background: var(--musgo-fundo);
}
.selo.nao { border-color: var(--fio-forte); color: var(--tinta-suave); background: transparent; }
.feito h3 {
  font-family: var(--versal); font-weight: 400; text-transform: uppercase; letter-spacing: .18em;
  font-size: clamp(15px, 4.4vw, 19px); color: var(--branco); margin: 0; text-wrap: balance;
}
.feito p { margin: 0; text-wrap: pretty; }
.resumo {
  width: 100%; border-top: 1px solid var(--fio); border-bottom: 1px solid var(--fio);
  padding: 14px 0; display: grid; gap: 6px;
}
.acoes { width: 100%; display: grid; gap: 10px; }

.aviso {
  max-width: 520px; margin: 0 auto 18px; padding: 10px 14px;
  border: 1px dashed var(--fio-forte); color: var(--tinta);
  font-size: 16px; text-align: center;
}

.rodape { max-width: 520px; margin: 34px auto 0; text-align: center; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (max-width: 380px) { .opcoes span { letter-spacing: .1em; font-size: 12px; } }
