/* Paleta do justflix: azul-marinho escuro + azul vivo */
:root {
  --bg: #060b18;
  --bg-2: #0c1a36;
  --card: rgba(141, 180, 255, 0.05);
  --line: rgba(141, 180, 255, 0.16);
  --text: #eaf1ff;
  --muted: #a3b1cc;
  --soft: #8c9bb8;
  --blue: #2f6bff;
  --blue-2: #8db4ff;
  --blue-3: #4b82ff;
  --head: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
svg { display: block; }

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(90% 45% at 15% 0%, rgba(47, 107, 255, 0.32), transparent 70%),
    radial-gradient(60% 35% at 50% 50%, rgba(47, 107, 255, 0.14), transparent 70%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 55%);
}

/* Tudo cabe numa tela só no celular: o vídeo encolhe se a tela for baixa */
.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding:
    calc(24px + env(safe-area-inset-top))
    calc(16px + env(safe-area-inset-right))
    calc(20px + env(safe-area-inset-bottom))
    calc(16px + env(safe-area-inset-left));
}

/* Selo superior */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-2);
  background: rgba(47, 107, 255, 0.12);
  border: 1px solid rgba(47, 107, 255, 0.35);
  border-radius: 999px;
}
.pill svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.title {
  max-width: 360px;
  margin: 0 0 18px;
  font-family: var(--head);
  font-size: clamp(24px, 7.3vw, 31px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  text-align: center;
  text-wrap: balance;
}
.title__fire { display: inline-block; animation: flicker 2.4s ease-in-out infinite; }
.hl {
  background: linear-gradient(90deg, var(--blue-2) 0%, var(--blue-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@keyframes flicker {
  0%, 100% { transform: scale(1) rotate(0); }
  50% { transform: scale(1.12) rotate(-6deg); }
}

/* Vídeo */
.card {
  position: relative;
  /* Em telas baixas (ex.: iPhone SE) o vídeo diminui para o botão aparecer sem rolar */
  width: 100%;
  width: min(100%, max(220px, calc(100vh - 360px)));
  width: min(100%, max(220px, calc(100svh - 360px)));
  padding: 7px;
  background: rgba(12, 26, 54, 0.6);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 30px 70px -24px rgba(47, 107, 255, 0.55);
}
.card__video {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  background: #030712;
  pointer-events: none;
}
.card__live {
  position: absolute;
  top: 17px;
  left: 17px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(6, 11, 24, 0.66);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.card__live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff4d6d;
  box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.25);
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.3; } }

/* Botão + selos */
.actions {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 18px;
}

.btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 14px 20px;
  overflow: hidden;
  font-family: var(--head);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(100deg, var(--blue) 0%, var(--blue-3) 100%);
  border-radius: 999px;
  box-shadow: 0 14px 34px -10px rgba(47, 107, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  touch-action: manipulation;
  animation: pulse 2.2s ease-in-out infinite;
  transition: transform 0.15s ease, filter 0.2s ease;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: shine 3.2s ease-in-out infinite;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 3px; }
.btn svg {
  position: relative;
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 14px 34px -10px rgba(47, 107, 255, 0.7), 0 0 0 0 rgba(47, 107, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
  50% { box-shadow: 0 14px 34px -10px rgba(47, 107, 255, 0.7), 0 0 0 9px rgba(47, 107, 255, 0), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
}
@keyframes shine {
  0%, 55% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.trust {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 0;
  padding: 7px 13px 7px 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.trust svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: var(--blue-2);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.legal {
  max-width: 300px;
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
  color: var(--soft);
}

/* Entrada suave */
.reveal { opacity: 0; transform: translateY(12px); }
.is-ready .reveal { animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.is-ready .title.reveal { animation-delay: 0.06s; }
.is-ready .card.reveal { animation-delay: 0.12s; }
.is-ready .actions.reveal { animation-delay: 0.18s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Celulares bem estreitos (320–359px) */
@media (max-width: 359px) {
  .btn { font-size: 14.5px; gap: 8px; padding: 14px 16px; }
  .trust { font-size: 11.5px; }
}

/* Telas baixas: aperta os espaços */
@media (max-height: 640px) {
  .pill { margin-bottom: 10px; }
  .title { margin-bottom: 12px; font-size: clamp(22px, 6.6vw, 26px); }
  .actions { margin-top: 14px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .is-ready .reveal, .btn, .btn::before, .title__fire, .card__live i { animation: none; }
}
