/* Convite 031 v2 · cartão impresso na noite. Ouro só em fio, rótulo pequeno e estado ativo.
   Escala por breakpoint: 12 (rótulo) · 16 (texto, campo, botão) · 30/36 (h2, destaque) · 46/72 (h1). Pesos: 400 e 600. */
:root {
  --noite: #0b1424;
  --noite-2: #172437;
  --papel: #13203a;
  --preto: #030304;
  --creme: #f4efe4;
  --creme-2: rgba(244, 239, 228, .78);
  --creme-3: rgba(244, 239, 228, .6);
  --linha: rgba(244, 239, 228, .14);
  --borda: rgba(244, 239, 228, .34);
  --borda-forte: rgba(244, 239, 228, .55);
  --campo: rgba(244, 239, 228, .05);
  --ouro: #c9a45c;
  --ouro-fio: rgba(201, 164, 92, .55);
  --ouro-fraco: rgba(201, 164, 92, .28);
  --ouro-fundo: rgba(201, 164, 92, .13);
  --erro: #f2a594;
  --serif: "Times New Roman", Tinos, Times, serif;
  --sans: Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 3px;
  --gutter: 20px;
  --suave: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--noite); }
body { background: var(--noite); color: var(--creme); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ouro); outline-offset: 3px; }

/* ── tipografia ───────────────────────────────────────────── */
.rotulo, .rotulo-fino, .rotulo-campo { font: 600 12px/1.5 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.rotulo { color: var(--ouro); }
.rotulo-fino { color: var(--creme-3); }
.rotulo-campo { color: var(--creme-2); }
h1 { font: 400 46px/1.06 var(--serif); letter-spacing: -.012em; }
h2 { font: 400 30px/1.15 var(--serif); letter-spacing: -.005em; }
.sec { color: var(--creme-2); }

.link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  color: var(--creme); background: none; border: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--ouro-fio); text-decoration-thickness: 1px; text-underline-offset: 6px;
  transition: text-decoration-color .2s;
}
.link:hover { text-decoration-color: var(--ouro); }

/* ornamento: fio · losango · fio */
.orn { display: flex; align-items: center; gap: 12px; width: 168px; margin: 0 auto; }
.orn::before, .orn::after { content: ""; flex: 1; height: 1px; background: var(--ouro-fio); }
.orn span { width: 7px; height: 7px; background: var(--ouro); transform: rotate(45deg); }

/* ── 1. o cartão ──────────────────────────────────────────── */
.cartao {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 16px;
  padding: max(16px, env(safe-area-inset-top)) var(--gutter) 24px;
  background: radial-gradient(120% 70% at 50% 38%, #1b2c48 0%, #12203a 45%, var(--noite) 100%);
}
.moldura {
  position: relative; width: 100%; max-width: 760px; margin: 0 auto;
  padding: 40px 24px 36px; text-align: center;
  border: 1px solid var(--ouro-fio);
  outline: 1px solid var(--ouro-fraco); outline-offset: -8px;
}
.canto { position: absolute; width: 9px; height: 9px; background: var(--ouro); transform: rotate(45deg); }
.c1 { top: -5px; left: -5px; } .c2 { top: -5px; right: -5px; } .c3 { bottom: -5px; left: -5px; } .c4 { bottom: -5px; right: -5px; }
.cartao .rotulo { margin-bottom: 24px; }
.logo-brilho { position: relative; width: min(64vw, 264px); margin: 0 auto 24px; }
.logo-brilho img { width: 100%; }
.logo-brilho::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url("/img/logo-031.webp") center / 100% 100% no-repeat;
          mask: url("/img/logo-031.webp") center / 100% 100% no-repeat;
  background: linear-gradient(105deg, transparent 0 40%, rgba(255, 244, 218, .85) 50%, transparent 60% 100%);
  background-size: 320% 100%; background-position: 100% 0; background-repeat: no-repeat;
  animation: brilho 7s ease-in-out 1.4s infinite;
}
@keyframes brilho { 0% { background-position: 100% 0; } 32%, 100% { background-position: 0% 0; } }
.cartao h1 { margin: 24px 0 16px; }
.cartao .lead { color: var(--creme-2); max-width: 30em; margin: 0 auto 24px; }
.data { font: 400 30px/1.25 var(--serif); margin-top: 24px; }
.data span { display: block; }
.cartao .rotulo-fino { margin-top: 12px; }

.ir {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; max-width: 760px; min-height: 56px; margin: 0 auto;
  border: 1px solid var(--borda); border-radius: var(--r);
  text-decoration: none; font-weight: 600; color: var(--creme);
  transition: border-color .2s, background-color .2s;
}
.ir::after { content: ""; width: 7px; height: 7px; border: solid var(--ouro); border-width: 0 1px 1px 0; transform: translateY(-2px) rotate(45deg); }
.ir:hover { border-color: var(--borda-forte); background: rgba(244, 239, 228, .04); }

/* entrada do cartão (sem JS) */
@keyframes entra { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.entra { animation: entra 1s var(--suave) both; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .18s; } .d3 { animation-delay: .32s; } .d4 { animation-delay: .42s; }
.d5 { animation-delay: .54s; } .d6 { animation-delay: .64s; } .d7 { animation-delay: .74s; } .d8 { animation-delay: .9s; }

/* revelação ao rolar (a classe "anima" só entra quando o JS roda: sem JS, tudo aparece) */
.anima .surge { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--suave), transform .9s var(--suave); }
.anima .surge.visivel { opacity: 1; transform: none; }
.anima .rotulos .surge:nth-child(2) { transition-delay: .12s; }
.anima .rotulos .surge:nth-child(3) { transition-delay: .24s; }

/* ── 2. a linha ───────────────────────────────────────────── */
.linha {
  background: linear-gradient(180deg, var(--noite) 0, var(--preto) 120px, var(--preto) calc(100% - 64px), var(--noite) 100%);
  padding: 88px 0 48px;
}
.linha-quadro { display: flex; flex-direction: column-reverse; }
.linha-quadro img { width: 100%; }
.linha-texto { padding: 0 var(--gutter) 24px; max-width: 560px; }
.linha-texto h2 { margin: 12px 0; }

.rotulos {
  list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: 72%;
  gap: 12px; padding: 32px var(--gutter) 8px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
}
.rotulos::-webkit-scrollbar { display: none; }
.rotulos li { scroll-snap-align: start; }
.rotulos img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border: 1px solid rgba(244, 239, 228, .06); }
.rotulos .nome { font: 400 30px/1.15 var(--serif); margin-top: 16px; }
.rotulos .rotulo-fino { margin-top: 4px; }

/* ── 3. coluna: a noite, as regras, a confirmação ────────── */
.coluna { padding: 24px var(--gutter) 48px; background: linear-gradient(180deg, var(--noite) 0%, var(--noite-2) 100%); }
.coluna > * { max-width: 600px; margin-left: auto; margin-right: auto; }
.coluna section + section { margin-top: 80px; }
.coluna h2 { margin: 12px 0 0; }

.ficha { margin-top: 24px; border-top: 1px solid var(--ouro-fio); }
.ficha .item { padding: 24px 0; border-bottom: 1px solid var(--linha); }
.ficha dt { margin-bottom: 8px; }
.ficha dd { display: flex; flex-direction: column; align-items: flex-start; }
.destaque { font: 400 30px/1.15 var(--serif); margin-bottom: 4px; }
.ficha .link { margin-top: 8px; }

.regras ul { list-style: none; margin-top: 24px; border-top: 1px solid var(--ouro-fio); }
.regras li { position: relative; padding: 16px 0 16px 28px; border-bottom: 1px solid var(--linha); }
.regras li::before { content: ""; position: absolute; left: 4px; top: 50%; width: 7px; height: 7px; margin-top: -4px; background: var(--ouro); transform: rotate(45deg); }

/* ── formulário ───────────────────────────────────────────── */
.rsvp { scroll-margin-top: 24px; }
.rsvp .intro { margin-top: 8px; }
.aviso { margin-top: 24px; padding: 16px; border-left: 2px solid var(--ouro); background: var(--ouro-fundo); }
form { margin-top: 32px; padding: 24px 20px; border: 1px solid var(--linha); border-radius: var(--r); background: rgba(11, 20, 36, .55); }
fieldset { border: 0; min-width: 0; }
.escolha + .campo, .campo + .campo, .campo + #so-confirmo, #so-confirmo > .escolha { margin-top: 24px; }
legend, .campo > label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--creme); }
.opc { font-weight: 400; color: var(--creme-3); }

input[type="text"], input[type="tel"] {
  display: block; width: 100%; height: 52px; padding: 0 16px;
  background: var(--campo); border: 1px solid var(--borda); border-radius: var(--r);
  font-size: 16px; color: var(--creme);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
  -webkit-appearance: none; appearance: none;
}
input::placeholder { color: var(--creme-3); opacity: 1; }
input[type="text"]:hover, input[type="tel"]:hover { border-color: var(--borda-forte); }
input[type="text"]:focus, input[type="tel"]:focus { outline: none; border-color: var(--ouro); box-shadow: 0 0 0 3px rgba(201, 164, 92, .28); background: rgba(244, 239, 228, .07); }
input[aria-invalid="true"] { border-color: var(--erro); }
input[aria-invalid="true"]:focus { border-color: var(--erro); box-shadow: 0 0 0 3px rgba(242, 165, 148, .25); }

.prefixo { position: relative; }
.prefixo span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--creme-3); pointer-events: none; }
.prefixo input { padding-left: 36px; }

.ajuda { margin-top: 8px; color: var(--creme-3); }
.erro { display: flex; gap: 8px; margin-top: 8px; color: var(--erro); }
.erro::before { content: "!"; flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 2px; border: 1px solid var(--erro); border-radius: 50%; font-weight: 600; line-height: 1; }

.opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opcao { position: relative; display: block; cursor: pointer; }
.opcao input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opcao span {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 8px 10px; text-align: center; line-height: 1.25;
  border: 1px solid var(--borda); border-radius: var(--r); color: var(--creme-2);
  transition: border-color .15s, background-color .15s, color .15s;
}
.opcao:hover span { border-color: var(--borda-forte); }
.opcao input:checked + span { border-color: var(--ouro); background: var(--ouro-fundo); color: var(--creme); font-weight: 600; }
.opcao input:checked + span::before { content: ""; flex: none; width: 7px; height: 7px; background: var(--ouro); transform: rotate(45deg); }
.opcao input:focus-visible + span { outline: 2px solid var(--ouro); outline-offset: 2px; }

.check { position: relative; display: flex; align-items: center; gap: 16px; min-height: 52px; margin-top: 24px; cursor: pointer; }
.check input { position: absolute; left: 0; top: 50%; width: 26px; height: 26px; margin: -13px 0 0; opacity: 0; cursor: pointer; }
.check .caixa { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--borda-forte); border-radius: var(--r); background: var(--campo); transition: border-color .15s, background-color .15s; }
.check:hover .caixa { border-color: var(--creme); }
.check input:checked + .caixa { border-color: var(--ouro); background: var(--ouro-fundo); }
.check input:checked + .caixa::after { content: ""; width: 7px; height: 12px; margin-top: -3px; border: solid var(--ouro); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.check input:focus-visible + .caixa { outline: 2px solid var(--ouro); outline-offset: 2px; }
.check input[aria-invalid="true"] + .caixa { border-color: var(--erro); }
#e-maior { margin-top: 0; }

.mel { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.privacidade { margin-top: 32px; color: var(--creme-3); }
.erro-geral { margin-top: 16px; padding: 16px; border-left: 2px solid var(--erro); background: rgba(242, 165, 148, .1); }

.botao {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 56px; margin-top: 16px; padding: 0 24px;
  border: 0; border-radius: var(--r); background: var(--creme); color: var(--noite);
  font: 600 16px/1.2 var(--sans); text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color .15s, transform .15s;
}
.botao:hover { background: #fff; }
.botao:active { transform: translateY(1px); }
.botao[disabled] { cursor: progress; background: rgba(244, 239, 228, .82); }
.giro { display: none; width: 16px; height: 16px; border: 2px solid rgba(11, 20, 36, .25); border-top-color: var(--noite); border-radius: 50%; animation: gira .8s linear infinite; }
.botao[disabled] .giro { display: block; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ── fim do fluxo: o ingresso ─────────────────────────────── */
.feito { outline: none; animation: entra .6s var(--suave) both; }
.feito > h2 { margin: 12px 0 8px; }
.ingresso { margin-top: 32px; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .35)); }
.ingresso-corpo, .ingresso-canhoto {
  background: linear-gradient(160deg, #1a2a45 0%, var(--papel) 60%, #101b31 100%);
  border: 1px solid var(--ouro-fio);
}
.ingresso-corpo {
  position: relative; padding: 28px 24px 24px; border-bottom: 0; border-radius: 4px 4px 0 0;
  -webkit-mask: radial-gradient(circle 13px at 0 100%, #0000 12px, #000 12.5px) 0 0 / 51% 100% no-repeat,
                radial-gradient(circle 13px at 100% 100%, #0000 12px, #000 12.5px) 100% 0 / 51% 100% no-repeat;
          mask: radial-gradient(circle 13px at 0 100%, #0000 12px, #000 12.5px) 0 0 / 51% 100% no-repeat,
                radial-gradient(circle 13px at 100% 100%, #0000 12px, #000 12.5px) 100% 0 / 51% 100% no-repeat;
}
.ingresso-canhoto {
  padding: 20px 24px 24px; border-top: 1px dashed var(--ouro-fio); border-radius: 0 0 4px 4px;
  -webkit-mask: radial-gradient(circle 13px at 0 0, #0000 12px, #000 12.5px) 0 0 / 51% 100% no-repeat,
                radial-gradient(circle 13px at 100% 0, #0000 12px, #000 12.5px) 100% 0 / 51% 100% no-repeat;
          mask: radial-gradient(circle 13px at 0 0, #0000 12px, #000 12.5px) 0 0 / 51% 100% no-repeat,
                radial-gradient(circle 13px at 100% 0, #0000 12px, #000 12.5px) 100% 0 / 51% 100% no-repeat;
}
.ingresso-topo { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--ouro-fraco); }
.ingresso-topo img { width: 96px; }
.ingresso-topo .rotulo { text-align: right; }
.nome-rotulo { margin-top: 20px; }
.ingresso-nome { font: 400 30px/1.15 var(--serif); margin-top: 4px; overflow-wrap: anywhere; }
.ingresso-acomp { margin-top: 4px; color: var(--creme-2); }
.ingresso-dados { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.ingresso-dados dt { margin-bottom: 4px; }
.ingresso-dados dd { line-height: 1.4; }
.ingresso-canhoto p + p { margin-top: 4px; }
.feito .botao { margin-top: 32px; }
.feito .acoes { display: flex; flex-direction: column; align-items: flex-start; margin-top: 8px; }

.rodape { margin-top: 96px; padding-top: 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rodape .link { margin-bottom: 8px; }
.rodape .orn { margin-bottom: 16px; }

/* ── tablet ───────────────────────────────────────────────── */
@media (min-width: 640px) {
  :root { --gutter: 40px; }
  .moldura { padding: 56px 48px 48px; }
  .rotulos { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(3, 1fr); overflow: visible; max-width: 1120px; margin: 0 auto; }
  form { padding: 32px; }
}

/* ── computador ───────────────────────────────────────────── */
@media (min-width: 1024px) {
  h1 { font-size: 72px; line-height: 1.02; }
  h2, .destaque, .data, .rotulos .nome, .ingresso-nome { font-size: 36px; }
  .cartao { padding: 40px; gap: 24px; }
  .moldura { padding: 64px 72px 56px; }
  .logo-brilho { width: 340px; margin-bottom: 32px; }
  .data span { display: inline; }
  .data span + span::before { content: "· "; }
  .linha { padding-top: 120px; }
  .linha-quadro { position: relative; display: block; max-width: 1600px; margin: 0 auto; }
  .linha-texto { position: absolute; left: clamp(40px, 6vw, 112px); top: 50%; transform: translateY(-50%); width: 34%; max-width: 440px; padding: 0; }
  .rotulos { gap: 24px; padding-top: 56px; }
  .coluna { padding-top: 64px; }
  .coluna section + section { margin-top: 112px; }
}

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