/* Viva Experience — landing pública */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--step-0)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video, iframe { display: block; max-width: 100%; }
a { color: var(--gold); text-underline-offset: .2em; }
button, input { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.05; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: var(--step--2); font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

/* ── Estados da página ─────────────────────────────────────────────
   Cada bloco declara em quais estados aparece: data-for="before", "live replay"… */
[data-for] { display: none; }
body[data-page="before"] [data-for~="before"],
body[data-page="live"]   [data-for~="live"],
body[data-page="replay"] [data-for~="replay"] { display: block; }
body[data-page="live"]   .eyebrow[data-for~="live"],
body[data-page="replay"] .eyebrow[data-for~="replay"] { display: inline-flex; }

/* Visitante x cadastrado (enquanto verifica, nenhum dos dois aparece) */
body.is-checking .only-guest, body.is-checking .only-member,
body.is-guest .only-member, body.is-member .only-guest { display: none !important; }

/* Troca de estado com fade */
main { transition: opacity .35s var(--ease-out), transform .35s var(--ease-out); }
body.is-switching main { opacity: 0; transform: translateY(8px); }

/* ── Header ───────────────────────────────────────────────────── */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-solid, body:not([data-page="before"]) .site-header {
  background: rgba(5, 16, 38, .78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-s); }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--text); }
.brand img { height: calc(var(--header-h) - 20px); width: auto; border-radius: 8px 4px 8px 4px; }
.brand__text { display: none; font-size: var(--step--1); line-height: 1.2; }
.brand__text strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: var(--step-1); }
@media (min-width: 560px) { .brand__text { display: block; } }

.status-pill {
  display: inline-flex; align-items: center; gap: .5em; white-space: nowrap;
  padding: .45em .95em; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: var(--step--2); font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  background: var(--glass);
}
.status-pill > span { display: none; align-items: center; gap: .5em; }
body[data-page="before"] .status-pill [data-pill="before"],
body[data-page="live"]   .status-pill [data-pill="live"],
body[data-page="replay"] .status-pill [data-pill="replay"] { display: inline-flex; }
.status-pill [data-pill="live"] { color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.dot--live { background: var(--live); box-shadow: 0 0 0 0 rgba(255, 77, 77, .6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255, 77, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); } }

/* ── Botões ───────────────────────────────────────────────────── */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: .9em 1.6em; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: var(--step--1); letter-spacing: .04em; text-decoration: none; cursor: pointer;
  transition: transform .3s var(--ease-out), background .3s, color .3s, border-color .3s;
  overflow: hidden; isolation: isolate;
}
.btn svg { width: 1.1em; height: 1.1em; transition: transform .3s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--gold); color: var(--gold-ink); }
.btn--primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--sunset);
  transform: translateX(-101%); transition: transform .45s var(--ease-out);
}
.btn--primary:hover::before { transform: translateX(0); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: rgba(5, 16, 38, .25); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-bright); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ── Hero (Antes) ─────────────────────────────────────────────── */
.hero { position: relative; min-height: 100svh; padding: calc(var(--header-h) + var(--space-m)) 0 var(--space-m); display: none; }
body[data-page="before"] .hero { display: flex; align-items: flex-end; }
.hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 55% 40%;
  animation: slow-zoom 24s ease-out both;
}
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 16, 38, .55) 0%, rgba(5, 16, 38, .1) 30%, rgba(5, 16, 38, .55) 60%, var(--bg) 100%),
    linear-gradient(90deg, rgba(5, 16, 38, .55) 0%, rgba(5, 16, 38, 0) 70%);
}
@keyframes slow-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }

.hero__content { position: relative; display: grid; gap: var(--space-s); }
.hero h1 { font-size: var(--step-5); line-height: .92; max-width: 11ch; }
/* "Mais" em itálico dourado, com entrada suave uma única vez. */
.hero h1 em,
.stage__head h1 em {
  display: inline-block;
  font-style: italic;
  color: var(--gold-bright);
  animation: viva-mais-in 1s var(--ease-out) both;
}
@keyframes viva-mais-in { from { opacity: 0; transform: translateY(.18em); } to { opacity: 1; transform: none; } }
.hero__lead { max-width: 44ch; color: #e9e3d4; font-size: var(--step-0); line-height: 1.45; }
.hero__date { font-size: var(--step--1); color: #e9e3d4; }
.hero__date strong { color: var(--text); font-weight: 700; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: var(--space-xs); }
.hero__actions .btn { flex: 1 1 220px; }
@media (min-width: 560px) { .hero__actions .btn { flex: 0 0 auto; } }

.confirmed {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  padding: .9rem 1.1rem; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  max-width: 640px;
}
.confirmed__icon { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--gold-ink); }
.confirmed__text { flex: 1 1 200px; font-size: var(--step--1); line-height: 1.4; }
.confirmed__text strong { display: block; font-size: var(--step-0); }

/* Contagem regressiva: destaque do hero. Quatro blocos iguais, que cabem até em 320px. */
.countdown-box { display: grid; gap: .65rem; max-width: 640px; }
.countdown__title { font-size: var(--step--1); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--text); }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.4rem, 1.5vw, .75rem); }
.countdown__cell {
  display: grid; justify-items: center; gap: .3rem; padding: clamp(.7rem, .5rem + 1vw, 1.1rem) .25rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  background: rgba(5, 16, 38, .62); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.countdown__num { font-family: var(--font-display); font-size: clamp(2.4rem, 1.7rem + 3.4vw, 4.25rem); line-height: 1; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.countdown__label { font-size: var(--step--2); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text); }
.countdown-done { display: none; font-family: var(--font-display); font-size: var(--step-2); line-height: 1.2; color: var(--gold-bright); }
.is-countdown-done .countdown, .is-countdown-done .countdown__title { display: none; }
.is-countdown-done .countdown-done { display: block; }

/* Aviso: a transmissão acontece nesta mesma página. */
.live-here {
  display: flex; align-items: flex-start; gap: .8rem; max-width: 640px; padding: .9rem 1.1rem;
  border: 1px solid var(--gold); border-radius: var(--radius);
  background: rgba(5, 16, 38, .62); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.live-here__icon { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--gold-ink); }
.live-here__text { min-width: 0; font-size: var(--step--1); line-height: 1.45; color: #e9e3d4; }
.live-here__text strong { display: block; margin-bottom: .2rem; font-family: var(--font-display); font-weight: 400; font-size: var(--step-1); line-height: 1.2; color: var(--text); }
.live-here__text em { font-style: italic; color: var(--gold-bright); }

/* ── Seções (Antes) ───────────────────────────────────────────── */
.section { padding-block: var(--space-l); position: relative; }
.section__head { display: grid; gap: var(--space-xs); margin-bottom: var(--space-m); max-width: 760px; }
.section__head h2 { font-size: var(--step-4); }
.section__head h2 em { font-style: italic; color: var(--gold-bright); }
.section__head p { color: var(--muted); max-width: 58ch; }

/* Vídeo (fachada leve: o iframe só carrega no clique) */
.video {
  position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__facade {
  position: absolute; inset: 0; width: 100%; padding: 0; border: 0; cursor: pointer;
  background: var(--surface) center / cover no-repeat;
}
.video__facade::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 16, 38, 0) 40%, rgba(5, 16, 38, .75)); transition: opacity .3s; }
.video__facade:hover::after { opacity: .6; }
.video__play {
  position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: clamp(64px, 12vw, 96px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold); color: var(--gold-ink);
  box-shadow: 0 0 0 10px rgba(213, 197, 138, .18); transition: transform .4s var(--ease-out), box-shadow .4s;
}
.video__facade:hover .video__play { transform: translate(-50%, -50%) scale(1.06); box-shadow: 0 0 0 16px rgba(213, 197, 138, .12); }
.video__play svg { width: 36%; height: 36%; margin-left: 6%; }
.video__caption { position: absolute; z-index: 1; left: var(--space-s); bottom: var(--space-s); right: var(--space-s); text-align: left; font-weight: 600; font-size: var(--step--1); color: var(--text); }
.video__placeholder {
  position: absolute; inset: 0; display: grid; place-content: center; gap: .5rem; text-align: center; padding: var(--space-s);
  background: var(--sky), repeating-linear-gradient(135deg, rgba(213, 197, 138, .05) 0 12px, transparent 12px 24px), var(--surface);
  color: var(--muted); font-size: var(--step--1);
}
.video__placeholder strong { font-family: var(--font-display); font-weight: 400; font-size: var(--step-1); color: var(--gold); }

/* Cadastro */
.register { background: var(--sky), var(--bg); overflow: hidden; }
.register::before {
  content: ""; position: absolute; left: 50%; bottom: -55vw; width: 120vw; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(closest-side, rgba(244, 166, 64, .28), rgba(233, 118, 91, .12) 55%, transparent 72%);
  pointer-events: none;
}
.register__grid { position: relative; display: grid; gap: var(--space-m); align-items: start; }
.register__copy { display: grid; gap: var(--space-xs); }
.register__copy h2 { font-size: var(--step-4); }
.register__copy h2 em { font-style: italic; color: var(--gold-bright); }
.register__copy p { color: var(--muted); max-width: 46ch; }
.perks { list-style: none; padding: 0; margin: var(--space-xs) 0 0; display: grid; gap: .6rem; }
.perks li { display: flex; gap: .7rem; align-items: baseline; }
.perks li::before { content: ""; flex: none; width: 6px; height: 6px; transform: rotate(45deg) translateY(-2px); background: var(--gold); }
@media (min-width: 900px) { .register__grid { grid-template-columns: 1fr 1fr; } }

/* ── Cartão de formulário ─────────────────────────────────────── */
.card {
  position: relative; padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem); border-radius: var(--radius-l);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(17, 41, 90, .7), rgba(8, 23, 51, .85));
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6);
}
.card h3 { font-size: var(--step-2); margin-bottom: .35rem; }
.card__sub { color: var(--muted); font-size: var(--step--1); margin-bottom: var(--space-s); }

.field { display: grid; gap: .35rem; margin-bottom: .9rem; }
.field label { font-size: var(--step--1); font-weight: 600; }
.field input {
  width: 100%; min-height: 52px; padding: .8rem 1rem; border-radius: var(--radius-s);
  border: 1px solid var(--line-strong); background: rgba(5, 16, 38, .6); color: var(--text);
  font-size: 16px; /* evita zoom no iOS */ transition: border-color .2s, background .2s;
}
.field input::placeholder { color: rgba(179, 184, 201, .55); }
.field input:focus { outline: none; border-color: var(--gold); background: rgba(5, 16, 38, .85); }
.field input[aria-invalid] { border-color: var(--danger); }
.field__error { min-height: 0; font-size: var(--step--2); color: var(--danger); }
.field__error:empty { display: none; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; margin: .4rem 0 .2rem; font-size: var(--step--2); line-height: 1.5; color: var(--muted); cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 0; accent-color: var(--gold); }
.consent input[aria-invalid] { outline: 2px solid var(--danger); outline-offset: 2px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-submit { margin-top: 1rem; }
.form-message { margin-top: .8rem; font-size: var(--step--1); }
.form-message:empty { display: none; }
.form-message.is-error { color: var(--danger); }
.form-note { margin-top: .9rem; font-size: var(--step--2); color: var(--muted); text-align: center; }

.welcome-card { text-align: left; }
.welcome-card .confirmed__icon { width: 48px; height: 48px; margin-bottom: var(--space-xs); }
.welcome-card p { color: var(--muted); margin-bottom: var(--space-s); }
.welcome-card [data-me-name] { color: var(--gold-bright); }

/* ── Palco (Ao vivo / Replay) ─────────────────────────────────── */
.stage { padding: calc(var(--header-h) + var(--space-s)) 0 var(--space-s); background: var(--sky), var(--bg); }
body:not([data-page="before"]) .moments { padding-top: 0; }
body:not([data-page="before"]) main { min-height: calc(100svh - 120px); }
.stage__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .5rem 1rem; margin-bottom: var(--space-s); }
.stage__head h1 { font-size: var(--step-3); }
.stage__hello { color: var(--muted); font-size: var(--step--1); }
.stage__hello strong { color: var(--text); }
.stage__grid { display: grid; gap: var(--space-s); }
.stage__main { min-width: 0; }
.stage .video { border-radius: var(--radius); box-shadow: 0 30px 90px -40px rgba(244, 166, 64, .45); }
.stage__gate { max-width: 560px; }
@media (min-width: 1024px) {
  /* Desktop: o chat tem exatamente a altura do player, ao lado dele */
  body[data-page="live"] .stage__grid { grid-template-columns: minmax(0, 1fr) 380px; align-items: stretch; }
  body[data-page="live"] .stage__aside { position: relative; min-height: 420px; }
  body[data-page="live"] .chat-panel { position: absolute; inset: 0; height: auto; }
}
@media (max-width: 1023px) {
  /* Celular: o player fica preso no topo e o chat ocupa o resto da tela */
  body.is-member[data-page="live"] .stage__main { position: sticky; top: var(--header-h); z-index: 5; margin-inline: calc(var(--gutter) * -1); }
  body.is-member[data-page="live"] .stage__main .video { border-radius: 0; border-inline: 0; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .7); }
  body[data-page="live"] .chat-panel { height: calc(100svh - var(--header-h) - 56.25vw - var(--space-s)); min-height: 340px; }
}

.chat-panel {
  position: relative; display: flex; flex-direction: column; height: min(70vh, 640px);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--glass);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); overflow: hidden;
}
.chat-panel__head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); font-weight: 700; font-size: var(--step--2); letter-spacing: .14em; text-transform: uppercase; }
.chat-panel__status { font-weight: 500; letter-spacing: .04em; text-transform: none; color: var(--muted); }
.chat-panel__body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: .75rem 1.1rem .5rem;
  /* esmaece o topo da lista para não parecer cortada sob os avisos */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18px); mask-image: linear-gradient(to bottom, transparent 0, #000 18px);
}

.chat-empty { padding: 1rem 0; color: var(--muted); font-size: var(--step--1); }
.chat-empty[hidden] { display: none; }
.chat-list { list-style: none; margin: 0; padding: 0; }
.chat-msg { padding: .55rem 0; border-bottom: 1px solid rgba(213, 197, 138, .07); animation: msg-in .35s var(--ease-out); }
.chat-msg:last-child { border-bottom: 0; }
.chat-msg__meta { display: flex; align-items: baseline; gap: .45rem; font-size: var(--step--2); line-height: 1.3; min-width: 0; }
.chat-msg__meta strong { color: var(--gold); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.chat-msg__agency { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.chat-msg__meta time { flex: none; color: rgba(179, 184, 201, .6); font-variant-numeric: tabular-nums; }
.chat-msg__body { margin-top: .15rem; font-size: var(--step--1); line-height: 1.45; overflow-wrap: anywhere; }
.chat-msg.is-own .chat-msg__meta strong { color: var(--gold-bright); }
.chat-msg.is-own .chat-msg__meta strong::after { content: " (você)"; font-weight: 500; color: var(--muted); }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.chat-new {
  position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 2;
  padding: .45rem 1rem; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--gold); color: var(--gold-ink); font-weight: 700; font-size: var(--step--2);
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .6);
}
.chat-new[hidden] { display: none; }

.chat-form { flex: none; display: grid; grid-template-columns: 1fr auto; gap: .5rem; padding: .75rem; border-top: 1px solid var(--line); background: rgba(5, 16, 38, .5); }
.chat-form input {
  min-width: 0; min-height: 46px; padding: .6rem .9rem; border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgba(5, 16, 38, .7); font-size: 16px;
}
.chat-form input:focus { outline: none; border-color: var(--gold); }
.chat-form input:disabled { opacity: .5; }
.chat-send {
  position: relative; width: 46px; height: 46px; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: var(--gold); color: var(--gold-ink); transition: transform .2s, opacity .2s;
}
.chat-send svg { width: 20px; height: 20px; }
.chat-send:active { transform: scale(.94); }
.chat-send:disabled { opacity: .45; cursor: not-allowed; }
.chat-send[data-wait] svg { visibility: hidden; }
.chat-send[data-wait]::after { content: attr(data-wait); position: absolute; font-weight: 700; }
.chat-cooldown { grid-column: 1 / -1; display: grid; gap: .3rem; padding-inline: .5rem; font-size: var(--step--2); color: #e9e3d4; }
.chat-cooldown[hidden] { display: none; }
.chat-cooldown strong { color: var(--gold-bright); font-size: 1.15em; font-variant-numeric: tabular-nums; }
.chat-cooldown__bar { display: block; height: 3px; border-radius: 3px; background: var(--gold); transform-origin: left; transition: transform .2s linear; }
.chat-hint { grid-column: 1 / -1; font-size: var(--step--2); color: var(--muted); padding-inline: .5rem; }
.chat-hint:empty { display: none; }
.chat-hint.is-error { color: var(--danger); }

.chat-guest { flex: none; display: grid; gap: .6rem; padding: .9rem; border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--muted); }

/* ── Momentos liberados pelo painel ───────────────────────────── */
.moments { display: grid; gap: var(--space-s); padding-block: var(--space-m); }
.moments:empty { display: none; }
body[data-page="before"] .moments { padding-top: 0; margin-top: calc(var(--space-s) * -1); position: relative; z-index: 2; }

.moment {
  position: relative; display: grid; gap: var(--space-s); align-items: center; overflow: hidden;
  padding: clamp(1.25rem, 1rem + 2vw, 2.5rem); border-radius: var(--radius-l);
  border: 1px solid var(--line-strong);
  background: radial-gradient(90% 120% at 100% 0%, rgba(244, 166, 64, .22), transparent 60%), linear-gradient(160deg, var(--surface-2), var(--bg-2));
  box-shadow: 0 40px 100px -50px rgba(244, 166, 64, .5);
}
.moment.is-entering { opacity: 0; transform: translateY(30px) scale(.97); filter: blur(6px); }
.moment.is-in { opacity: 1; transform: none; filter: none; transition: opacity .8s var(--ease-out), transform .8s var(--ease-out), filter .8s var(--ease-out); }
.moment.is-leaving { opacity: 0; transform: translateY(-12px) scale(.98); transition: opacity .45s, transform .45s; }
/* Brilho que atravessa o card quando ele aparece */
.moment.is-in::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(236, 220, 162, .28) 50%, transparent 65%);
  transform: translateX(-100%); animation: shine 1.6s .3s var(--ease-out) forwards;
}
@keyframes shine { to { transform: translateX(100%); } }

.moment__copy { display: grid; gap: var(--space-xs); justify-items: start; min-width: 0; }
.moment__title { font-size: var(--step-3); }
.moment__text { color: #e3dccb; max-width: 52ch; white-space: pre-line; }

.moment--app { grid-template-columns: 1fr; }
.moment__stores { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .25rem; }
.store-btn {
  display: inline-flex; align-items: center; gap: .7rem; min-height: 56px; padding: .5rem 1.2rem .5rem 1rem;
  border-radius: 14px; background: #000; color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, .25);
  transition: transform .3s var(--ease-out), border-color .3s;
}
.store-btn:hover { transform: translateY(-2px); border-color: var(--gold); }
.store-btn svg { width: 26px; height: 26px; flex: none; }
.store-btn__text { display: grid; line-height: 1.1; text-align: left; }
.store-btn__text small { font-size: .7rem; opacity: .8; }
.store-btn__text strong { font-size: 1.1rem; font-weight: 700; }
.moment__qr { display: none; margin: 0; justify-items: center; gap: .6rem; text-align: center; }
.moment__qr-code { width: 180px; aspect-ratio: 1; padding: 8px; border-radius: 16px; background: #fff; }
.moment__qr-code svg { width: 100%; height: 100%; }
.moment__qr figcaption { font-size: var(--step--2); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
/* O QR só faz sentido em tela grande (quem está no celular toca no botão da loja) */
@media (min-width: 768px) {
  .moment--app { grid-template-columns: 1fr auto; }
  .moment__qr { display: grid; }
}

.moment--banner.has-image { padding: 0; }
.moment--banner.has-image .moment__copy { padding: 0 clamp(1.25rem, 1rem + 2vw, 2.5rem) clamp(1.25rem, 1rem + 2vw, 2.5rem); }
.moment__media { aspect-ratio: 16 / 9; overflow: hidden; }
.moment__media img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .moment--banner.has-image { grid-template-columns: 1.1fr 1fr; }
  .moment--banner.has-image .moment__copy { padding: var(--space-m) var(--space-m) var(--space-m) 0; }
  .moment__media { aspect-ratio: auto; height: 100%; min-height: 320px; }
}

/* Aviso flutuante de novidade */
.moment-toast {
  position: fixed; z-index: 60; left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: .75rem; width: max-content; max-width: calc(100% - 32px);
  padding: .6rem .6rem .6rem 1rem; border-radius: 999px; border: 1px solid var(--gold);
  background: rgba(8, 23, 51, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, .8);
  transform: translate(-50%, 150%); opacity: 0; transition: transform .6s var(--ease-out), opacity .4s;
}
.moment-toast.is-in { transform: translate(-50%, 0); opacity: 1; }
.moment-toast__dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(213, 197, 138, .6); animation: pulse-gold 1.6s infinite; }
@keyframes pulse-gold { 70% { box-shadow: 0 0 0 10px rgba(213, 197, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(213, 197, 138, 0); } }
.moment-toast__text { font-weight: 700; font-size: var(--step--1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moment-toast__btn { flex: none; border: 0; border-radius: 999px; padding: .5rem 1.1rem; background: var(--gold); color: var(--gold-ink); font-weight: 800; cursor: pointer; }

/* ── Sorteio ──────────────────────────────────────────────────── */
.raffle-notice {
  flex: none; display: grid; gap: .4rem; justify-items: start; margin: .75rem .75rem 0; padding: .85rem 1rem;
  border-radius: var(--radius-s); border: 1px solid var(--sun-amber);
  background: linear-gradient(120deg, rgba(244, 166, 64, .28), rgba(184, 91, 122, .18));
}
.raffle-notice[hidden] { display: none; }
.raffle-notice.is-winner { border-color: var(--gold); background: linear-gradient(120deg, rgba(213, 197, 138, .25), rgba(213, 197, 138, .06)); }
.raffle-notice.is-pulse { animation: hl-glow 2s ease-out 2; }
.raffle-notice__tag { display: inline-flex; align-items: center; gap: .5em; font-size: var(--step--2); font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #fff; }
.raffle-notice.is-open .raffle-notice__tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sun-amber); animation: pulse-gold 1.4s infinite; }
.raffle-notice__text { font-size: var(--step--1); line-height: 1.45; }
.raffle-notice__text strong { color: var(--gold-bright); font-size: 1.08em; }
.raffle-notice__ok { color: var(--ok); font-weight: 600; }
.raffle-notice__btn {
  border: 0; border-radius: 999px; padding: .55rem 1.1rem; cursor: pointer;
  background: var(--sunset); color: #1a0d05; font-weight: 800; font-size: var(--step--1);
}

.winner-overlay {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--gutter);
  background: radial-gradient(80% 60% at 50% 40%, rgba(244, 166, 64, .25), rgba(5, 16, 38, .94) 70%);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .45s var(--ease-out);
}
.winner-overlay.is-in { opacity: 1; }
.winner-overlay__confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.winner-card {
  position: relative; display: grid; justify-items: center; gap: .5rem; width: min(640px, 100%); text-align: center;
  padding: clamp(1.75rem, 1rem + 4vw, 3.5rem) clamp(1.25rem, 1rem + 3vw, 3rem); border-radius: var(--radius-l);
  border: 1px solid var(--gold); background: linear-gradient(170deg, var(--surface-2), var(--bg));
  box-shadow: 0 0 0 1px rgba(213, 197, 138, .15), 0 50px 120px -30px rgba(244, 166, 64, .55);
  transform: translateY(20px) scale(.96); transition: transform .6s var(--ease-out);
}
.winner-overlay.is-in .winner-card { transform: none; }
.winner-card__status { font-size: var(--step-0); color: var(--muted); }
.winner-card__name {
  font-family: var(--font-display); font-size: var(--step-4); line-height: 1.02; letter-spacing: -.02em;
  color: var(--text); min-height: 1.05em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums;
}
.winner-overlay.is-revealed .winner-card__name {
  background: linear-gradient(100deg, var(--gold-bright), var(--sun-amber) 50%, var(--gold-bright));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: winner-pop .7s var(--ease-out);
}
@keyframes winner-pop { 0% { transform: scale(.85); } 60% { transform: scale(1.06); } 100% { transform: none; } }
.winner-card__agency { font-size: var(--step-1); color: var(--gold); min-height: 1.4em; }
.winner-card__msg { max-width: 40ch; color: var(--ok); font-weight: 600; }
.winner-card__msg:empty { display: none; }
.winner-card__proof { font-size: var(--step--2); color: var(--muted); }
.winner-card__proof:empty { display: none; }
.winner-card__claim:empty { display: none; }
.claim-code { display: grid; gap: .3rem; justify-items: center; padding: .8rem 1rem; border: 1px dashed var(--gold); border-radius: var(--radius-s); background: rgba(5, 16, 38, .55); text-align: center; }
.claim-code__label { font-size: var(--step--2); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #e9e3d4; }
.claim-code__value { font-family: var(--font-display); font-size: var(--step-3); line-height: 1.1; letter-spacing: .12em; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.claim-code__help { font-size: var(--step--2); line-height: 1.4; color: #e9e3d4; }
.raffle-notice .claim-code { width: 100%; }
.winner-card__close { margin-top: var(--space-xs); opacity: 0; pointer-events: none; transition: opacity .4s .6s; }
.winner-overlay.is-revealed .winner-card__close { opacity: 1; pointer-events: auto; }
.winner-overlay.is-me .winner-card { border-width: 2px; box-shadow: 0 0 0 6px rgba(213, 197, 138, .18), 0 50px 120px -30px rgba(244, 166, 64, .8); }

/* Mensagem destacada no topo do chat */
.chat-highlight {
  flex: none; position: relative; margin: .75rem .75rem 0; padding: .9rem 1rem; border-radius: var(--radius-s);
  border: 1px solid var(--gold); background: linear-gradient(135deg, rgba(213, 197, 138, .2), rgba(233, 118, 91, .12));
  opacity: 0; transform: translateY(-8px) scale(.98);
}
.chat-highlight[hidden] { display: none; }
.chat-highlight.is-in { opacity: 1; transform: none; transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); animation: hl-glow 2.4s ease-out; }
@keyframes hl-glow { 0% { box-shadow: 0 0 0 0 rgba(213, 197, 138, .7); } 100% { box-shadow: 0 0 0 18px rgba(213, 197, 138, 0); } }
.chat-highlight__tag { font-size: var(--step--2); font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-bright); }
.chat-highlight__body { margin-top: .3rem; font-family: var(--font-display); font-size: var(--step-1); line-height: 1.3; overflow-wrap: anywhere; }
.chat-highlight__by { margin-top: .35rem; font-size: var(--step--2); color: var(--muted); }
.chat-highlight__by strong { color: var(--gold); }

/* ── Rodapé ───────────────────────────────────────────────────── */
.site-footer { padding: var(--space-m) 0; border-top: 1px solid var(--line); background: var(--bg); font-size: var(--step--1); color: var(--muted); }
.site-footer .container { display: grid; gap: var(--space-s); align-items: center; }
.site-footer__brand { display: flex; align-items: center; gap: var(--space-s); flex-wrap: wrap; }
.site-footer__brand img { height: 40px; width: auto; filter: brightness(0) invert(1); opacity: .85; }
.site-footer small { font-size: var(--step--2); line-height: 1.6; max-width: 70ch; display: block; }
@media (min-width: 768px) { .site-footer .container { grid-template-columns: auto 1fr; gap: var(--space-m); } }

/* ── Revelação ao rolar ───────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

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