/* ═══════════════════════════════════════════════════════════════
   SWIPE OFFERS · Roleta de remarketing
   Tokens do design system do app (app/globals.css):
   brand hsl(22 100% 52%), background hsl(0 0% 3.9%), card hsl(0 0% 10%),
   border hsl(0 0% 20%). Geist Sans / Geist Mono / Bricolage Grotesque.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg:        #0a0a0a;
  --card:      #121212;
  --line:      #242424;
  --line-soft: #1a1a1a;
  --fg:        #f4f3f1;
  --muted:     #8d8d8d;
  --dim:       #5f5f5f;
  --brand:     #ff6207;
  --brand-esc: #7d2f04;
  --gomo-a:    #ff6207;   /* laranja da marca */
  --gomo-b:    #fdf1e3;   /* creme, para o contraste não morrer no escuro */
  --gomo-fg:   #2a1200;   /* o texto é escuro nos dois: legível em ambos */
  --aro-1:     #ffc069;
  --aro-2:     #b85c12;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-display: "Bricolage Grotesque", var(--font-sans);

  --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

/* Grade fina ao fundo: dá profundidade sem virar textura de banner */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(hsl(0 0% 100% / .022) 1px, transparent 1px),
    linear-gradient(90deg, hsl(0 0% 100% / .022) 1px, transparent 1px);
  background-size: 62px 62px;
  pointer-events: none;
  z-index: 0;
}
/* Brilho atrás da roleta, para a peça central não flutuar no vazio */
body::after {
  content: "";
  position: fixed;
  top: 46%;
  left: 50%;
  width: min(760px, 120vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, hsl(22 100% 52% / .10) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  border: 1px solid hsl(22 100% 52% / .3);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--brand);
}
.tag::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

/* ─────────────────────────── PALCO ─────────────────────────── */

.palco {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(20px, 3.5vh, 36px) clamp(16px, 5vw, 32px) clamp(24px, 4vh, 44px);
}

.marca { height: 20px; width: auto; margin-bottom: clamp(14px, 2.6vh, 24px); }

.titulo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.9vw, 2.3rem);
  line-height: 1.09;
  letter-spacing: -.032em;
  margin: 14px 0 0;
  max-width: 26ch;
  text-wrap: balance;
}
.titulo .em { color: var(--brand); font-style: normal; }

.chamada {
  margin: 11px 0 0;
  font-size: clamp(.98rem, 1.2vw, 1.1rem);
  color: var(--muted);
  max-width: 34ch;
  text-wrap: pretty;
}
.chamada strong { color: var(--fg); font-weight: 600; }

/* ─────────────────────────── ROLETA ─────────────────────────── */

/* A largura já leva a altura da tela em conta (44vh), então a caixa cabe na
   dobra continuando quadrada. Limitar por max-height achataria o círculo. */
.roleta {
  position: relative;
  width: min(84vw, 39vh, 372px);
  aspect-ratio: 1;
  margin: clamp(12px, 2vh, 22px) auto 0;
  cursor: pointer;
  transition: transform .28s cubic-bezier(.2, .8, .3, 1);
}
.roleta:hover { transform: scale(1.025); }
.roleta:active { transform: scale(.995); }
.roleta.is-girando { cursor: default; }

/* Aro externo com as lâmpadas */
.roleta__aro {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: conic-gradient(
    from 210deg,
    var(--aro-2), var(--aro-1) 12%, #8c440c 26%,
    var(--aro-1) 42%, var(--aro-2) 55%, var(--aro-1) 72%,
    #7d3c0a 86%, var(--aro-2)
  );
  box-shadow:
    0 0 0 1px hsl(30 90% 60% / .35),
    0 0 46px -6px hsl(22 100% 52% / .35),
    0 26px 60px -22px #000;
}

/* Uma luz dá voltas no aro. É o chamariz da página: chama atenção sem
   mover nada que esteja escrito. */
.roleta__aro::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: conic-gradient(
    from 0deg,
    transparent 0 62%,
    hsl(45 100% 78% / .75) 76%,
    transparent 88%
  );
  animation: varrer 4.2s linear infinite;
}
@keyframes varrer { to { transform: rotate(360deg); } }
.roleta__lampadas { position: absolute; inset: 0; }
.roleta__lampadas span {
  position: absolute;
  top: 50%; left: 50%;
  width: 4px; height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: #fff3e0;
  opacity: .35;
  animation: acender 2.4s ease-in-out infinite;
}
@keyframes acender {
  0%, 100% { opacity: .25; box-shadow: none; }
  50%      { opacity: 1; box-shadow: 0 0 8px hsl(45 100% 75% / .95); }
}

/* O disco que gira */
.roleta__disco {
  position: absolute;
  inset: 4.2%;
  border-radius: 50%;
  overflow: hidden;
  transform: rotate(0deg);
  will-change: transform;
}
.roleta.is-girando .roleta__disco {
  transition: transform var(--giro, 5.2s) cubic-bezier(.16, .84, .28, 1);
}
.roleta__disco svg { width: 100%; height: 100%; }

/* Os rótulos ficam fora do disco que gira. O script reposiciona cada um
   conforme o disco roda, mantendo o texto sempre na horizontal — preso ao
   disco, metade deles terminaria de cabeça para baixo. */
.roleta__rotulos {
  position: absolute;
  inset: 4.2%;
  pointer-events: none;
}
.roleta__rotulos svg { width: 100%; height: 100%; }

.gomo-texto {
  font-family: var(--font-display), var(--font-sans);
  font-weight: 800;
  font-size: 25px;
  letter-spacing: -.03em;
}
.gomo-texto.claro { fill: var(--gomo-fg); }
.gomo-texto.escuro { fill: var(--gomo-fg); }
.gomo-texto tspan.linha2 {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .75;
}

/* Miolo */
.roleta__miolo {
  position: absolute;
  top: 50%; left: 50%;
  width: 27%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #12100e;
  border: 2px solid var(--aro-1);
  display: grid;
  place-content: center;
  box-shadow: 0 8px 24px -6px #000, inset 0 0 0 5px #1c1815;
  transition: transform .28s cubic-bezier(.2, .8, .3, 1), box-shadow .28s ease;
}
.roleta:hover .roleta__miolo {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 8px 24px -6px #000, inset 0 0 0 5px #1c1815,
              0 0 26px -2px hsl(35 100% 60% / .6);
}
.roleta:hover .roleta__miolo span { color: var(--aro-1); }
.roleta__miolo span {
  transition: color .28s ease;
  font-family: var(--font-mono);
  font-size: clamp(8px, 2.1vw, 10px);
  font-weight: 500;
  letter-spacing: .22em;
  color: var(--brand);
  text-indent: .22em;
}

/* Ponteiro */
.roleta__ponteiro {
  position: absolute;
  top: -8px; left: 50%;
  width: 26px; height: 34px;
  margin-left: -13px;
  z-index: 3;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.6));
}
.roleta.is-girando .roleta__ponteiro { animation: tremer .09s linear infinite; }
@keyframes tremer {
  0%, 100% { transform: rotate(0deg); }
  50%      { transform: rotate(-7deg); }
}

/* ─────────────────────────── BOTÕES ─────────────────────────── */

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 58px;
  padding: 17px 34px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}
.botao:hover { background: #ff7526; }
.botao:active { transform: translateY(1px); }
.botao:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.botao[disabled] { opacity: .45; cursor: default; }
.botao svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; }

.botao--girar { margin-top: clamp(14px, 2.2vh, 24px); min-width: min(86vw, 290px); }

.botao--fantasma {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 500;
  font-size: 14.5px;
  min-height: 46px;
  padding: 12px 22px;
}
.botao--fantasma:hover { background: #151515; color: var(--fg); }

.aviso {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ─────────────────────────── BARRA DE CUPONS ─────────────────────────── */

.cupons {
  width: min(100%, 420px);
  margin: clamp(12px, 2vh, 18px) auto 0;
  display: grid;
  gap: 8px;
}

.cupons__linha {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}
.cupons__linha b {
  font-weight: 600;
  color: var(--brand);
  transition: color .2s ease;
}

.cupons__trilho {
  height: 3px;
  border-radius: 999px;
  background: #1f1c1a;
  overflow: hidden;
}
.cupons__trilho span {
  display: block;
  height: 100%;
  width: 61%;
  border-radius: 999px;
  background: linear-gradient(90deg, hsl(22 100% 52% / .45), var(--brand));
  transition: width .35s ease;
}

.cupons__rodape {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--dim);
}

/* Depois que o número sobe, o destaque fica um instante mais forte */
.cupons.mexeu .cupons__linha b { color: #ff8a3d; }

/* ─────────────────────────── JANELAS ─────────────────────────── */

.janela {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 4, 4, .82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}
.janela.is-aberta { opacity: 1; visibility: visible; }

.janela__caixa {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(28px, 5vw, 38px) clamp(22px, 4vw, 32px);
  text-align: center;
  transform: translateY(10px) scale(.985);
  transition: transform .22s ease;
}
.janela.is-aberta .janela__caixa { transform: none; }

.janela__fechar {
  position: absolute;
  top: 12px; right: 12px;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--dim);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.janela__fechar:hover { background: #1c1c1c; color: var(--fg); }

.janela__titulo {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4.4vw, 1.95rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin: 14px 0 0;
  text-wrap: balance;
}
.janela__texto {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}
.janela__texto strong { color: var(--fg); font-weight: 600; }
.janela .botao { width: 100%; margin-top: 22px; }
.janela .botao--fantasma { margin-top: 10px; }

/* Selo do prêmio */
.premio {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 26px;
  margin-top: 18px;
  border: 1px solid hsl(22 100% 52% / .35);
  border-radius: 12px;
  background: hsl(22 100% 52% / .07);
}
.premio__valor {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 8vw, 2.9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--brand);
}
.premio__nome {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.cupom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  padding: 13px 16px;
  border: 1px dashed #3a3a3a;
  border-radius: 10px;
  background: #0e0e0e;
}
.cupom code {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--fg);
}
.cupom button {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px;
}

.zap { background: #25a75a; }
.zap:hover { background: #1e8f4c; }
.zap svg { fill: currentColor; stroke: none; width: 19px; height: 19px; }

/* ─────────────────────────── TELAS PEQUENAS ─────────────────────────── */

@media (max-width: 560px) {
  .marca { height: 19px; }
  .roleta { width: min(92vw, 380px); }
  .gomo-texto { font-size: 14px; }
  .gomo-texto tspan.linha2 { font-size: 12.5px; }
  .botao--girar { width: 100%; }
}

@media (max-width: 380px) {
  .gomo-texto { font-size: 12.5px; }
  .gomo-texto tspan.linha2 { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .roleta.is-girando .roleta__ponteiro { animation: none; }
  .roleta__lampadas span { animation: none; opacity: .5; }
  .roleta__aro::after { animation: none; opacity: .35; }
  .roleta:hover { transform: none; }
}
