/* Tirei Você — "Envelope Lacrado" (identidade própria, não é o sistema bpso.com.br) */

:root {
  /* Papel kraft sob luz quente + superfícies creme que levitam */
  --tv-bg: #ece0ca;
  --tv-bg-edge: #ddcaa8;
  --tv-surface: #fffdf7;
  --tv-surface-2: #f7efe0;
  --tv-flap: #e7d7ba;          /* papel do envelope, um tom abaixo da superfície */
  --tv-ink: #2a1f18;
  --tv-ink-soft: #6b5d4f;
  --tv-line: rgba(42, 31, 24, .12);
  --tv-line-2: rgba(42, 31, 24, .22);
  /* Cera */
  --tv-wax: #9a2530;
  --tv-wax-hi: #c14150;
  --tv-wax-deep: #6f1a22;
  /* Latão (fio premium, só como detalhe fino, nunca preenchimento) */
  --tv-gold: #b08442;
  --tv-gold-soft: rgba(176, 132, 66, .4);
  /* WhatsApp harmonizado (verde quente, não neon) */
  --tv-wa: #2f855a;
  --tv-wa-deep: #276749;

  --tv-radius: 16px;
  --tv-radius-sm: 10px;
  --tv-ease: cubic-bezier(.16, 1, .3, 1);
  --tv-reading: 620px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--tv-ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  background:
    radial-gradient(120% 90% at 50% -10%, var(--tv-surface-2) 0%, var(--tv-bg) 42%, var(--tv-bg-edge) 100%)
    fixed;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, .tv-brand__name, .tv-serif {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  letter-spacing: -.012em;
  line-height: 1.12;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

/* Rótulo "carimbo postal": versalete espaçado */
.tv-postmark {
  font-family: 'Inter', sans-serif;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--tv-ink-soft);
}

/* ---------- Shell próprio ---------- */
.tv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.4rem) clamp(1.1rem, 5vw, 2.5rem);
  border-bottom: 1px solid var(--tv-line);
}

.tv-brand { display: inline-flex; align-items: center; gap: .6rem; }
.tv-brand__name { font-size: 1.28rem; color: var(--tv-ink); }

.tv-header__cta {
  font-size: .92rem;
  font-weight: 600;
  color: var(--tv-wax);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.tv-header__cta:hover { color: var(--tv-wax-deep); }

.tv-main {
  flex: 1;
  width: 100%;
  max-width: var(--tv-reading);
  margin: 0 auto;
  padding: clamp(1.6rem, 5vw, 3.2rem) clamp(1.1rem, 5vw, 1.5rem);
}
.tv-main--wide { max-width: 720px; }

/* ---------- Cartão / superfície ---------- */
.tv-card {
  background: var(--tv-surface);
  border: 1px solid var(--tv-line);
  border-radius: var(--tv-radius);
  padding: clamp(1.4rem, 4.5vw, 2.4rem);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .7) inset,
    0 18px 40px -24px rgba(42, 31, 24, .5);
}
.tv-card + .tv-card { margin-top: 1.1rem; }
.tv-card h1 { font-size: clamp(1.55rem, 5.5vw, 2.15rem); margin: 0 0 .6rem; }

/* Nota lacrada (aviso importante) */
.tv-note {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  background: var(--tv-surface-2);
  border: 1px solid var(--tv-gold-soft);
  border-left: 3px solid var(--tv-wax);
  border-radius: var(--tv-radius-sm);
  padding: .9rem 1.05rem;
  font-size: .95rem;
}
.tv-note i { color: var(--tv-wax); font-size: 1.2rem; flex: none; margin-top: .1rem; }

.tv-error {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  color: var(--tv-wax-deep);
  background: color-mix(in srgb, var(--tv-wax) 8%, transparent);
  border-radius: var(--tv-radius-sm);
  padding: .65rem .85rem;
  margin-bottom: .8rem;
  font-size: .93rem;
}

/* ---------- Selo de cera (elemento-assinatura) ---------- */
.tv-seal {
  --seal: 2.5rem;
  width: var(--seal);
  height: var(--seal);
  flex: none;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #f6dcd7;
  background: radial-gradient(circle at 34% 28%, var(--tv-wax-hi), var(--tv-wax) 44%, var(--tv-wax-deep) 100%);
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, .3),
    inset 0 -4px 8px rgba(0, 0, 0, .38),
    0 5px 12px -4px rgba(111, 26, 34, .55);
  position: relative;
  isolation: isolate;
}
.tv-seal::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px solid var(--tv-gold-soft);
}
.tv-seal i {
  font-size: calc(var(--seal) * .44);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 -1px 0 rgba(255, 255, 255, .2);
}
.tv-seal--sm { --seal: 2rem; }
.tv-seal--lg { --seal: 4.6rem; }
.tv-seal--hero { --seal: clamp(4.5rem, 20vw, 6.5rem); }

/* ---------- Botões ---------- */
.tv-btn {
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .72rem 1.4rem;
  background: var(--tv-wax);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s var(--tv-ease), transform .18s var(--tv-ease), box-shadow .18s var(--tv-ease);
  box-shadow: 0 6px 16px -8px rgba(111, 26, 34, .6);
}
.tv-btn:hover { background: var(--tv-wax-deep); transform: translateY(-1px); }
.tv-btn:active { transform: translateY(0); }

.tv-btn--ghost {
  background: transparent;
  color: var(--tv-ink);
  border-color: var(--tv-line-2);
  box-shadow: none;
}
.tv-btn--ghost:hover { background: var(--tv-surface-2); border-color: var(--tv-ink-soft); transform: none; }

.tv-btn--wa { background: var(--tv-wa); box-shadow: 0 6px 16px -8px rgba(39, 103, 73, .55); }
.tv-btn--wa:hover { background: var(--tv-wa-deep); }

.tv-btn--sm { padding: .5rem .9rem; font-size: .88rem; }
.tv-btn--icon { padding: .5rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; }

.tv-btn--block { display: flex; width: 100%; }
.tv-cta-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--tv-wax);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Formulário ---------- */
.tv-field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.1rem; }
.tv-field > label { font-weight: 600; font-size: .95rem; }
.tv-input, .tv-field input, .tv-field textarea, .tv-field select {
  font: inherit;
  color: var(--tv-ink);
  padding: .68rem .85rem;
  border-radius: var(--tv-radius-sm);
  border: 1px solid var(--tv-line-2);
  background: var(--tv-surface);
  transition: border-color .15s, box-shadow .15s;
}
.tv-input:focus, .tv-field input:focus, .tv-field textarea:focus, .tv-field select:focus {
  outline: none;
  border-color: var(--tv-wax);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tv-wax) 16%, transparent);
}

.tv-group { border: 0; padding: 0; margin: 0 0 1.3rem; }
.tv-group__legend {
  padding: 0;
  margin-bottom: .3rem;
}
.tv-group__hint { font-size: .86rem; color: var(--tv-ink-soft); margin: 0 0 .7rem; }

.tv-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .55rem; }
.tv-row .tv-name { flex: 2 1 40%; min-width: 0; }
.tv-row .tv-wish { flex: 3 1 50%; min-width: 0; }
.tv-row select { flex: 1 1 auto; min-width: 0; }
.tv-row .tv-static { color: var(--tv-ink-soft); font-size: .92rem; }
.tv-remove {
  flex: none;
  width: 2.3rem; height: 2.3rem;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--tv-line-2);
  background: transparent;
  color: var(--tv-ink-soft);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  transition: color .15s, border-color .15s, background .15s;
}
.tv-remove:hover { color: var(--tv-wax); border-color: var(--tv-wax); background: color-mix(in srgb, var(--tv-wax) 7%, transparent); }

@media (max-width: 460px) {
  .tv-row--participant { flex-wrap: wrap; }
  .tv-row--participant .tv-name { flex: 1 1 calc(100% - 2.8rem); }
  .tv-row--participant .tv-wish { flex: 1 1 100%; order: 3; }
}

/* ---------- Landing (hero + benefícios) ---------- */
.tv-hero { text-align: center; }
.tv-hero .tv-seal--hero { margin: 0 auto .3rem; }
.tv-hero h1 { font-size: clamp(1.9rem, 7vw, 2.9rem); margin: .5rem 0 .7rem; }
.tv-hero__sub { color: var(--tv-ink-soft); font-size: 1.05rem; max-width: 46ch; margin: 0 auto 1.3rem; }
.tv-hero__trust { margin-top: .9rem; font-size: .85rem; color: var(--tv-ink-soft); }

.tv-benefits { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .7rem; text-align: left; }
.tv-benefits li { display: flex; gap: .6rem; align-items: flex-start; }
.tv-benefits i { color: var(--tv-wax); font-size: 1.15rem; margin-top: .12rem; flex: none; }

/* ---------- Revelação: envelope lacrado que abre ---------- */
.tv-reveal {
  position: relative;
  perspective: 1400px;
  margin: 0 auto;
  max-width: 460px;
}
.tv-reveal__card {
  background: var(--tv-surface);
  border: 1px solid var(--tv-line);
  border-radius: var(--tv-radius);
  padding: clamp(1.8rem, 6vw, 2.6rem) clamp(1.4rem, 5vw, 2.2rem);
  text-align: center;
  box-shadow: 0 18px 40px -24px rgba(42, 31, 24, .5);
  min-height: 15rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tv-reveal__name { font-size: clamp(2rem, 9vw, 3rem); margin: .2rem 0 .8rem; }
.tv-reveal__wishlist {
  background: var(--tv-surface-2);
  border-radius: var(--tv-radius-sm);
  padding: .8rem 1rem;
  text-align: left;
  font-size: .96rem;
}
.tv-reveal__wishlist .tv-postmark { display: block; margin-bottom: .25rem; }
.tv-reveal__foot { margin-top: 1.1rem; font-size: .82rem; color: var(--tv-ink-soft); }

/* conteúdo entra depois que a aba abre */
.tv-reveal__inner { opacity: 0; transform: translateY(10px); transition: opacity .5s var(--tv-ease) .35s, transform .5s var(--tv-ease) .35s; }
.tv-reveal.is-open .tv-reveal__inner { opacity: 1; transform: none; }

/* a aba (flap) do envelope cobrindo o cartão */
.tv-reveal__flap {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid var(--tv-line-2);
  border-radius: var(--tv-radius);
  background: linear-gradient(160deg, var(--tv-flap), var(--tv-surface-2));
  cursor: pointer;
  transform-origin: top center;
  transform: rotateX(0deg);
  transition: transform .75s var(--tv-ease), opacity .4s ease .35s;
  display: grid;
  place-items: center;
  gap: .8rem;
  overflow: hidden;
  backface-visibility: hidden;
}
/* triângulo da aba (leitura de "envelope") */
.tv-reveal__flap::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 62%;
  background: linear-gradient(165deg, var(--tv-surface-2), var(--tv-flap));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-bottom: 1px solid var(--tv-line);
}
.tv-flap__seal { position: relative; z-index: 1; margin-top: 8%; transition: transform .35s var(--tv-ease), opacity .35s ease; }
.tv-flap__hint { position: relative; z-index: 1; font-size: .82rem; color: var(--tv-ink-soft); display: inline-flex; align-items: center; gap: .4rem; }
.tv-reveal__flap:hover .tv-flap__seal { transform: translateY(-2px); }

.tv-reveal.is-open .tv-reveal__flap { transform: rotateX(-172deg); opacity: 0; pointer-events: none; }
.tv-reveal.is-open .tv-flap__seal { transform: translateY(-14px) scale(.85); opacity: 0; transition-delay: 0s; }

/* sem-JS: sem aba, mostra o conteúdo direto e instantâneo (acessível) */
.no-js .tv-reveal__flap { display: none; }
.no-js .tv-reveal__inner { opacity: 1; transform: none; transition: none; }

/* ---------- Admin: lista de participantes ---------- */
.tv-people { list-style: none; padding: 0; margin: 1.1rem 0 0; display: grid; gap: .7rem; }
.tv-person {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  padding: .75rem .85rem;
  background: var(--tv-surface-2);
  border: 1px solid var(--tv-line);
  border-radius: var(--tv-radius-sm);
}
.tv-person__name { flex: 1 1 100%; font-weight: 600; }
.tv-person__actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.tv-person__bad { flex: 1 1 100%; color: var(--tv-wax-deep); font-size: .9rem; }
.tv-copied { font-size: .82rem; color: var(--tv-wa-deep); align-self: center; }

.tv-meta { color: var(--tv-ink-soft); font-size: .95rem; margin-bottom: .3rem; }
.tv-meta strong { color: var(--tv-ink); }

/* ---------- Rodapé (único fio de volta pra BPSO) ---------- */
.tv-footer {
  text-align: center;
  padding: 2.2rem 1.2rem;
  border-top: 1px solid var(--tv-line);
  color: var(--tv-ink-soft);
  font-size: .9rem;
}
.tv-footer a { color: var(--tv-wax); font-weight: 600; }
.tv-footer a:hover { text-decoration: underline; }
.tv-footer__bpso { display: inline-flex; align-items: center; gap: .4rem; }

/* ---------- Seções da landing: Como funciona + FAQ + fechamento ---------- */
.tv-section { margin-top: clamp(2rem, 6vw, 3rem); }
.tv-section > h2 {
  font-size: clamp(1.4rem, 5vw, 1.85rem);
  text-align: center;
  margin: 0 0 1.4rem;
}

.tv-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.tv-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--tv-surface);
  border: 1px solid var(--tv-line);
  border-radius: var(--tv-radius);
  padding: 1.1rem 1.2rem;
}
.tv-step__num {
  flex: none;
  width: 2.2rem; height: 2.2rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--tv-wax);
  color: #fff;
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 700;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, .25);
}
.tv-step h3 { margin: 0 0 .25rem; font-size: 1.08rem; }
.tv-step p { margin: 0; color: var(--tv-ink-soft); font-size: .95rem; }

.tv-faq { display: grid; gap: .6rem; }
.tv-faq details {
  background: var(--tv-surface);
  border: 1px solid var(--tv-line);
  border-radius: var(--tv-radius-sm);
  padding: 0 1.1rem;
}
.tv-faq summary {
  cursor: pointer;
  list-style: none;
  padding: .95rem 0;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.tv-faq summary::-webkit-details-marker { display: none; }
.tv-faq summary i { flex: none; color: var(--tv-wax); font-size: 1.3rem; transition: transform .2s var(--tv-ease); }
.tv-faq details[open] summary i { transform: rotate(180deg); }
.tv-faq details p { margin: 0 0 1rem; color: var(--tv-ink-soft); font-size: .95rem; }

.tv-closing { text-align: center; margin-top: clamp(2rem, 6vw, 3rem); }
.tv-closing__line { font-size: 1.25rem; margin-bottom: 1rem; }

/* ---------- Motion off-switch ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
