@font-face { font-family: "Inter"; src: url("fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("fonts/caveat-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  /* papel de cartão de Natal + cores do brasão: vermelho, azul e ouro */
  --paper: #FBF7F0;
  --paper-2: #F3EBDD;
  --ink: #1B2236;
  --muted: #545A6C;
  --line: #E6DCCB;
  --field: #8A8475; /* borda dos campos: 3:1 com o branco */
  --red: #B3261E;
  --red-dark: #8E1C16;
  --blue: #134A8E;
  --blue-deep: #0F3A70;
  --blue-soft: #EAF0F8;
  --gold: #E2B23A;
  --whatsapp: #0B7A4B;
  --error: #B42318;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --hand: "Caveat", "Segoe Script", cursive;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: calc(100% * var(--text-scale, 1)); scroll-behavior: smooth; scroll-padding-top: 4.5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
h1, h2 { margin: 0; font-family: var(--serif); font-weight: 600; line-height: 1.1; letter-spacing: -.015em; text-wrap: balance; }
h2 { font-size: clamp(1.375rem, 4.6vw, 1.875rem); margin-bottom: 1rem; }
p { margin: 0 0 1rem; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: absolute; left: 1rem; top: -5rem; z-index: 100; padding: .75rem 1rem; background: var(--ink); color: #fff; border-radius: .5rem; font-weight: 600; }
.skip:focus { top: 1rem; }
.wrap { width: min(100% - 2 * var(--gutter), 40rem); margin-inline: auto; padding-block: clamp(2.5rem, 7vw, 4rem); }
.eyebrow { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.eyebrow svg { width: .875rem; height: .875rem; color: var(--gold); }

/* botões: vermelho do brasão, em pílula */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.5rem; border: 0; border-radius: 99px;
  background: var(--red); color: #fff; box-shadow: 0 8px 18px -10px #8E1C16b3;
  font: 700 1rem var(--sans); text-decoration: none; cursor: pointer; transition: transform .25s var(--ease), background .2s; }
.btn:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn--whatsapp { background: var(--whatsapp); box-shadow: none; }
.btn--whatsapp:hover { background: #08603B; }
.btn--ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--field); }
.btn--ghost:hover { background: var(--paper); }
.btn--block { width: 100%; }
.btn[aria-disabled="true"] { background: var(--line); color: var(--muted); box-shadow: none; cursor: default; transform: none; }

/* cabeçalho: só o brasão e o nome */
.nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem var(--gutter);
  background: #FBF7F0e6; backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: .625rem; text-decoration: none; font-size: .9375rem; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.brand img { width: 2.25rem; height: 2.25rem; }
.brand span { display: grid; }
.brand small { font-size: .6875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.textsize { min-width: 2.75rem; min-height: 2.75rem; border: 0; border-radius: 99px; background: var(--paper-2); color: var(--ink); font: 700 .9375rem var(--sans); cursor: pointer; }

/* abertura: um leque de polaroids logo atrás do texto, sob um véu de papel translúcido */
.hero { --top: 11rem; position: relative; isolation: isolate; display: grid; place-items: center; padding: var(--top) var(--gutter) 3rem; overflow: hidden; text-align: center; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, #FBF7F000 0, #FBF7F033 calc(var(--top) * .55), #FBF7F0f0 calc(var(--top) + 1.5rem), #FBF7F0f7 100%); }
.hero__text { max-width: 36rem; }
.hero h1 { margin-bottom: .875rem; font-size: clamp(1.875rem, 8vw, 3.5rem); }
.hero h1 em { display: block; font-style: normal; color: var(--red); }
.hero .eyebrow { justify-content: center; }
.hero__lead { max-width: 31rem; margin-inline: auto; color: var(--ink); }
.hero__note { margin: .75rem 0 0; font-size: .875rem; color: var(--muted); }

/* polaroids; as fotos trocam por opacidade (app.js) */
.polaroids { position: absolute; z-index: -2; left: 50%; top: .75rem; width: min(100% - 1rem, 34rem); aspect-ratio: 1.6; translate: -50% 0; }
.polaroid { position: absolute; left: var(--x); top: var(--y); width: 35%; margin: 0; padding: .5rem .5rem 1.5rem; background: #fff; border-radius: 2px;
  box-shadow: 0 1px 2px #1B22361a, 0 16px 32px -14px #1B223666; rotate: var(--r); animation: drop .9s var(--ease) both; }
.polaroid:nth-child(1) { --x: 2%;  --y: 12%; --r: -8deg; }
.polaroid:nth-child(2) { --x: 21%; --y: 1%;  --r: -2deg; animation-delay: .12s; }
.polaroid:nth-child(3) { --x: 44%; --y: 5%;  --r: 4deg;  animation-delay: .24s; }
.polaroid:nth-child(4) { --x: 64%; --y: 13%; --r: 9deg;  animation-delay: .36s; }
.polaroid__photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2); }
/* a nova entra por cima; a antiga só some quando a nova já cobriu tudo */
.polaroid__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0s 1.4s; }
.polaroid__photo img.on { z-index: 1; opacity: 1; transition: opacity 1.4s ease; }

/* inscrição: faixa azul de noite de Natal, cartão branco */
.signup { padding: clamp(2rem, 7vw, 3.5rem) .75rem; background:
  radial-gradient(circle, #E2B23A80 1px, transparent 1.6px) 0 0 / 61px 67px,
  radial-gradient(circle, #ffffff40 .8px, transparent 1.4px) 23px 31px / 89px 83px,
  radial-gradient(circle, #E2B23A4d 1.4px, transparent 2px) 47px 11px / 131px 113px, var(--blue-deep); }
.signup:focus { outline: none; }
.card { width: min(100%, 30rem); margin: 0 auto; padding: clamp(1.25rem, 5vw, 2rem); border-radius: 1.25rem; background: #fff; box-shadow: 0 24px 48px -20px #050F2299; }
.form { display: grid; gap: 1.125rem; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, legend { display: block; margin-bottom: .375rem; padding: 0; font-size: .9375rem; font-weight: 700; }
.field__hint { margin: -.25rem 0 .625rem; color: var(--muted); font-size: .875rem; }
.field__error { margin: .5rem 0 0; color: var(--error); font-size: .875rem; font-weight: 600; }
.field__error:empty { display: none; }
input[type="text"], input[type="tel"] { width: 100%; min-height: 2.875rem; padding: 0 .875rem; border: 0; border-radius: .625rem; background: #fff; box-shadow: inset 0 0 0 1.5px var(--field); color: var(--ink); font: inherit; transition: box-shadow .2s; }
input[type="text"]:focus, input[type="tel"]:focus { outline: none; box-shadow: inset 0 0 0 2px var(--blue), 0 0 0 4px #134A8E26; }
input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--error); }
input::placeholder { color: #767065; }

.tiles { display: grid; gap: .5rem; }
.tile { display: flex; align-items: center; gap: .75rem; min-height: 2.875rem; padding: .625rem .875rem; border-radius: .75rem; box-shadow: inset 0 0 0 1.5px var(--field); color: var(--muted); font-size: .875rem; line-height: 1.35; cursor: pointer; transition: box-shadow .2s, background .2s; }
.tile strong { display: block; color: var(--ink); font-size: .9375rem; }
.tiles--2 { grid-template-columns: 1fr 1fr; }
.tiles--2 .tile { color: var(--ink); font-weight: 600; }
.tile input, .consent input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--blue); }
.tile:has(input:checked) { background: var(--blue-soft); box-shadow: inset 0 0 0 2px var(--blue); }
.tile:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
fieldset[aria-invalid="true"] .tile { box-shadow: inset 0 0 0 2px var(--error); }
.field > .consent { display: flex; align-items: flex-start; gap: .75rem; min-height: 2.75rem; font-weight: 500; font-size: .875rem; cursor: pointer; }
.consent input { margin-top: .125rem; }

.errors { margin-bottom: 1.25rem; padding: .875rem 1.125rem; border-radius: .75rem; background: #FEF3F2; box-shadow: inset 0 0 0 1.5px var(--error); font-size: .9375rem; }
.errors:focus { outline: none; }
.errors p { margin: 0 0 .25rem; font-weight: 700; color: var(--error); }
.errors ul { margin: 0; padding-left: 1.25rem; }
.errors a { color: var(--error); font-weight: 600; }

/* botão de envio: enviando (rodinha) e recebido (verde) */
.btn--send { gap: .625rem; }
.btn--send .spin { display: none; width: 1.125rem; height: 1.125rem; border: 2.5px solid #ffffff66; border-top-color: #fff; border-radius: 50%; animation: girar .8s linear infinite; }
.form[data-state="sending"] .btn--send { background: var(--red-dark, #8E1C16); cursor: progress; transform: none; }
.form[data-state="sending"] .btn--send .spin { display: block; }
.form[data-state="done"] .btn--send { background: var(--whatsapp); transform: none; }
.form[data-state="sending"] .field, .form[data-state="done"] .field { opacity: .55; pointer-events: none; }
.send-status { min-height: 1.4em; margin: -.25rem 0 0; text-align: center; font-weight: 600; color: var(--ink); }
@keyframes girar { to { rotate: 1turn; } }

/* página de obrigado */
.done { width: min(100%, 30rem); margin: 0 auto; text-align: center; }
.done img { width: 4.5rem; height: 4.5rem; margin: 0 auto 1rem; }
.done h1 { margin-bottom: .75rem; font-size: clamp(2rem, 9vw, 2.75rem); }
.done .btn { margin-bottom: .75rem; }
.btn--grande { min-height: 4.25rem; font-size: 1.1875rem; gap: .625rem; }
.btn--grande svg { width: 1.75rem; height: 1.75rem; flex: none; }
.done__dica { margin: 0 0 2rem; color: var(--muted); font-size: .9375rem; }
.convite { margin-top: 2.25rem; padding: 1.25rem; border-radius: 1rem; background: #fff; box-shadow: inset 0 0 0 1px var(--line); text-align: left; }
.convite h2 { margin-bottom: .75rem; font-size: 1.25rem; text-align: center; }
.convite__msg { margin: 0 0 1rem; padding: .875rem 1rem; border-left: 3px solid var(--gold); border-radius: 0 .5rem .5rem 0; background: var(--paper-2); font-size: .9375rem; color: var(--ink); user-select: all; -webkit-user-select: all; }
.convite .btn { margin-bottom: .625rem; }
.btn--ghost.is-ok { background: var(--whatsapp); color: #fff; box-shadow: none; }
.convite__ok { display: none; margin: .25rem 0 0; padding: .875rem 1rem; border-radius: .75rem; background: #E7F5EE; color: #064E30; font-weight: 600; text-align: center; }
.convite__ok.is-on { display: block; animation: surgir .35s var(--ease); }
@keyframes surgir { from { opacity: 0; translate: 0 .5rem; } }

/* como funciona */
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .625rem; }
.about:focus { outline: none; }
.about__lead { color: var(--ink); }
.about h3 { margin: 1.75rem 0 .875rem; font: 600 1.25rem/1.2 var(--serif); }
.ticks { display: grid; gap: .5rem; padding: 0; margin: 0 0 1.25rem; list-style: none; }
.ticks li { position: relative; padding-left: 1.75rem; color: var(--muted); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .3em; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 70% no-repeat; }
.facts { display: grid; margin: 0; border-radius: .875rem; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.facts div { display: grid; gap: .25rem; padding: .875rem 1rem; }
.facts div + div { border-top: 1px solid var(--line); }
.facts dt { font-weight: 700; }
.facts dd { display: flex; flex-wrap: wrap; align-content: flex-start; align-items: center; gap: .375rem; margin: 0; color: var(--muted); font-size: .9375rem; }
@media (min-width: 40rem) { .facts div { grid-template-columns: 15rem 1fr; gap: 1rem; } }
.steps { display: grid; gap: 1rem; padding: 0; margin: 0 0 1.25rem; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.25rem 1fr; column-gap: .875rem; }
.steps li::before { content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--red); font: 600 1.0625rem var(--serif); }
.steps span { color: var(--muted); font-size: .9375rem; }
.tbd { display: inline-block; padding: 0 .5rem; border-radius: 99px; background: var(--paper-2); color: var(--ink); font-size: .75rem; font-style: normal; font-weight: 700; }
.basket { margin: 0; padding: 1rem 1.25rem; border-left: 3px solid var(--gold); border-radius: 0 .75rem .75rem 0; background: var(--paper-2); color: var(--muted); font-size: .9375rem; }
.basket strong { color: var(--ink); }

/* dúvidas */

/* fecho: versículo e convite */
.closing { margin: 0 .75rem; padding: clamp(2.25rem, 8vw, 3.5rem) var(--gutter); border-radius: 1.25rem; background: var(--paper-2); text-align: center; }
.closing__star { width: 1.5rem; height: 1.5rem; margin: 0 auto .75rem; color: var(--gold); display: block; }
.closing blockquote { margin: 0; }
.closing blockquote p { max-width: 24ch; margin: 0 auto .625rem; font: 600 clamp(1.25rem, 4.6vw, 1.75rem)/1.25 var(--serif); text-wrap: balance; }
.closing__ref { margin-bottom: 1.5rem; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }

.foot { padding: 2.5rem var(--gutter) 7rem; text-align: center; font-size: .875rem; color: var(--muted); }
.foot img { width: 3.5rem; height: 3.5rem; margin: 0 auto .875rem; }
.foot strong { color: var(--ink); }
.foot__tag { margin: 0; font: 600 1.25rem var(--hand); color: var(--blue); }

/* botão fixo no celular */
.dock { position: fixed; z-index: 40; left: 1rem; right: 1rem; bottom: max(1rem, env(safe-area-inset-bottom)); translate: 0 160%; transition: translate .5s var(--ease); }
.dock.is-on { translate: 0 0; }

@keyframes drop { from { opacity: 0; translate: 0 -1.25rem; rotate: calc(var(--r) * 2.5); } }

@media (min-width: 52rem) {
  .hero { --top: 15.5rem; padding-bottom: 4.5rem; }
  .polaroids { width: 42rem; }
  .polaroid { padding: .65rem .65rem 2rem; }
  .closing { width: min(100% - 2 * var(--gutter), 52rem); margin-inline: auto; }
  .dock { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .btn, .tile, input, .polaroid, .card { border: 2px solid ButtonText; }
}
