/* ==========================================================
   Persiga: landing page
   Mobile first. Sem fontes externas, sem frameworks.
   ========================================================== */

:root {
  --cream: #f5f2e2; /* mesmo bege da animação do logo */
  --cream-2: #ece7cf;
  --ink: #111827;
  --ink-2: #1f2937;
  --muted: #5b6475;
  --line: #e2e8f0;
  --blue: #3b8ef0; /* azul do logo */
  --blue-dark: #1f6fd1;
  --green: #22c55e; /* letra certa */
  --yellow: #eab308; /* letra em outra posição */
  --gray: #94a3b8; /* letra ausente */
  --key: #e2e8f0;
  --navy: #101628; /* fundo do tema escuro do app */
  --radius: 16px;
  --font:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 12px;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p,
ul,
figure,
blockquote {
  margin: 0;
}
ul {
  padding: 0;
  list-style: none;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}
.wrap-narrow {
  max-width: 720px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
}
.skip:focus {
  left: 8px;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 14px 24px;
  transition:
    transform 0.12s ease,
    background 0.12s ease;
  touch-action: manipulation;
}
.btn:hover {
  background: #000;
}
.btn:active {
  transform: scale(0.97);
}
.btn-sm {
  padding: 9px 16px;
  font-size: 14px;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.stores-center {
  justify-content: center;
}

/* Selos oficiais das lojas (SVG). Mesma altura nos dois para ficarem alinhados. */
.badge {
  display: inline-block;
  line-height: 0;
  border-radius: 10px;
  filter: drop-shadow(0 6px 14px rgba(17, 24, 39, 0.22));
  transition: transform 0.12s ease;
  touch-action: manipulation;
}
.badge img {
  height: 56px;
  width: auto;
}
.badge:hover {
  transform: translateY(-2px);
}
.badge:active {
  transform: scale(0.97);
}

/* Mostrar só o botão da loja certa no celular */
[data-os='ios'] .store-android,
[data-os='android'] .store-ios {
  display: none;
}
.alt {
  display: none;
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}
.alt a {
  color: var(--blue-dark);
  font-weight: 600;
}
[data-os='ios'] .alt-android,
[data-os='android'] .alt-ios {
  display: block;
}
.alt-light {
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
}
.alt-light a {
  color: #fff;
}

/* QR code: só no computador */
.qr {
  display: none;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}
[data-os='desktop'] .qr {
  display: flex;
}
.qr img {
  width: 112px;
  height: 112px;
  background: #fff;
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.qr p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}
.qr p b {
  color: var(--ink);
}

/* ---------- Topo ---------- */
.top {
  padding-top: env(safe-area-inset-top);
}
.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.brand img {
  filter: drop-shadow(0 2px 5px rgba(17, 24, 39, 0.22));
}

/* ---------- Peças (letras) ---------- */
.tile {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.tile-sm {
  width: 30px;
  height: 30px;
  font-size: 16px;
  border-radius: 7px;
  flex: none;
}
.is-correct {
  background: var(--green);
}
.is-present {
  background: var(--yellow);
}
.is-absent {
  background: var(--gray);
}

/* ---------- Hero ---------- */
.hero {
  padding: 8px 0 24px;
  overflow: hidden;
}
.hero-in {
  display: grid;
  gap: 32px;
}
.wordmark {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
}
.wordmark .tile {
  animation: reveal 0.7s ease both;
  animation-delay: calc(var(--i) * 90ms + 200ms);
}
@keyframes reveal {
  0% {
    transform: rotateX(0);
    background: var(--gray);
  }
  49% {
    background: var(--gray);
  }
  50% {
    transform: rotateX(90deg);
    background: var(--green);
  }
  100% {
    transform: rotateX(0);
    background: var(--green);
  }
}

h1 {
  font-size: clamp(38px, 11vw, 64px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.lead {
  margin-top: 16px;
  font-size: clamp(17px, 4.6vw, 20px);
  color: var(--ink-2);
  max-width: 30em;
}
.lead strong {
  color: var(--ink);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 26px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.hero-points li::before {
  content: '✓';
  color: var(--green);
  font-weight: 800;
  margin-right: 6px;
}

.hero-visual {
  position: relative;
  height: 430px;
  margin: 4px auto 0;
  width: min(100%, 420px);
}
.phone {
  position: absolute;
  width: 215px;
  border-radius: 30px;
  overflow: hidden;
  border: 7px solid #0b1020;
  background: #0b1020;
  box-shadow: 0 24px 50px rgba(17, 24, 39, 0.28);
}
.phone img {
  width: 100%;
  height: auto;
}
.phone-front {
  left: 6%;
  top: 0;
  transform: rotate(-4deg);
  z-index: 2;
}
.phone-back {
  right: 4%;
  top: 36px;
  transform: rotate(5deg);
}

@media (min-width: 380px) {
  .phone {
    width: 235px;
  }
  .hero-visual {
    height: 470px;
  }
}

@media (min-width: 900px) {
  .hero {
    padding: 24px 0 72px;
  }
  .hero-in {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 40px;
  }
  .tile {
    width: 52px;
    height: 52px;
    font-size: 28px;
    border-radius: 11px;
  }
  .wordmark {
    gap: 7px;
    margin-bottom: 28px;
  }
  .hero-visual {
    height: 620px;
    width: 100%;
  }
  .phone {
    width: 290px;
    border-width: 8px;
    border-radius: 38px;
  }
  .phone-front {
    left: 8%;
  }
  .phone-back {
    right: 6%;
    top: 60px;
  }
}

/* ---------- Seções ---------- */
.section {
  padding: 56px 0;
}
.h2 {
  font-size: clamp(26px, 6.5vw, 38px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-wrap: balance;
}
.sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 17px;
}

.features {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  grid-template-columns: 1fr;
}
.features li {
  background: #fff;
  border: 1px solid var(--cream-2);
  border-radius: var(--radius);
  padding: 22px;
}
.features svg {
  width: 30px;
  height: 30px;
  stroke: var(--blue-dark);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.features h3 {
  margin-top: 12px;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.features p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 15.5px;
}
@media (min-width: 640px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .features {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Demo ---------- */
.section-demo {
  background: var(--cream-2);
}
.section-demo .wrap {
  text-align: center;
}
.demo {
  max-width: 420px;
  margin: 28px auto 0;
}

.board {
  container-type: inline-size;
  display: grid;
  gap: 6px;
}
.row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  color: var(--ink);
  font-size: 24px;
  font-size: calc((100cqw - 36px) / 7 * 0.56);
  text-transform: uppercase;
  user-select: none;
}
.cell.filled {
  border-color: #b8c3d4;
  animation: pop 0.1s ease;
}
.cell.rev {
  color: #fff;
  border-color: transparent;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.cell.is-correct {
  background: var(--green);
}
.cell.is-present {
  background: var(--yellow);
}
.cell.is-absent {
  background: var(--gray);
}
.cell.flip {
  animation: flip 0.5s ease both;
  animation-delay: calc(var(--i) * 140ms);
}
@keyframes pop {
  50% {
    transform: scale(1.08);
  }
}
@keyframes flip {
  0%,
  100% {
    transform: rotateX(0);
  }
  50% {
    transform: rotateX(90deg);
  }
}
.row.shake {
  animation: shake 0.4s ease;
}
@keyframes shake {
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}

.ghost {
  position: relative;
  display: grid;
  gap: 6px;
  opacity: 0.55;
}
.ghost.locked {
  opacity: 1;
}
.ghost.locked .row {
  opacity: 0.45;
}
.lock {
  position: absolute;
  inset: -2px;
  display: none;
  place-items: center;
  border-radius: 12px;
  background: rgba(245, 242, 226, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.ghost.locked .lock {
  display: grid;
}
.lock span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 999px;
}
.lock svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toast {
  min-height: 24px;
  margin: 12px 0 4px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.toast.show {
  opacity: 1;
}

.kb {
  display: grid;
  gap: 6px;
}
.kb-row {
  display: flex;
  gap: 5px;
  justify-content: center;
}
.kb-row.pad {
  padding: 0 4.5%;
}
.key {
  flex: 1 1 0;
  min-width: 0;
  height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--key);
  color: var(--ink);
  font: 700 14px var(--font);
  cursor: pointer;
  touch-action: manipulation;
  padding: 0;
  transition: transform 0.08s ease;
}
.key:active {
  transform: scale(0.94);
}
.key.wide {
  flex: 1.7 1 0;
  font-size: 13px;
}
.key.is-correct {
  background: var(--green);
  color: #fff;
}
.key.is-present {
  background: var(--yellow);
  color: #fff;
}
.key.is-absent {
  background: var(--gray);
  color: #fff;
}
.key:disabled {
  cursor: default;
}
.key:disabled:not([data-state]) {
  opacity: 0.55;
}

.result {
  margin-top: 22px;
  padding: 24px 18px;
  border-radius: var(--radius);
  background: #fff;
  border: 2px solid var(--ink);
  text-align: center;
  animation: rise 0.35s ease both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.result-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.result-sub {
  margin-top: 6px;
  color: var(--muted);
}

.legend {
  display: grid;
  gap: 10px;
  max-width: 420px;
  margin: 28px auto 0;
  text-align: left;
  font-size: 15px;
  color: var(--ink-2);
}
.legend li {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (min-width: 900px) {
  .key {
    height: 54px;
  }
}

/* ---------- Manifesto ---------- */
.manifesto {
  background: var(--navy);
  color: #fff;
}
.manifesto-in {
  display: grid;
  gap: 28px;
  align-items: center;
}
.runner-wrap {
  display: grid;
  justify-items: center;
  gap: 4px;
}
.runner {
  width: min(62vw, 260px);
  height: auto;
}
.runner-cap {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: #8cc0ff;
}
.manifesto-copy {
  display: grid;
  gap: 16px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.86);
}
.manifesto .h2 {
  color: #fff;
}
.manifesto-copy strong {
  color: #fff;
}
.manifesto-strong {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.015em;
}
@media (min-width: 800px) {
  .section {
    padding: 84px 0;
  }
  .manifesto-in {
    grid-template-columns: 0.7fr 1.3fr;
    gap: 56px;
  }
  .runner {
    width: 300px;
  }
}

/* ---------- Depoimentos ---------- */
.quotes {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}
.quote {
  position: relative;
  background: #fff;
  border: 1px solid var(--cream-2);
  border-radius: var(--radius);
  padding: 24px 22px 20px;
}
.quote blockquote {
  font-size: 17px;
  line-height: 1.45;
}
.quote figcaption {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.quote.placeholder {
  border: 2px dashed #c9a227;
  background: #fffbe8;
}
.ph-tag {
  position: absolute;
  top: -11px;
  left: 16px;
  background: #c9a227;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 999px;
}
@media (min-width: 800px) {
  .quotes {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- FAQ ---------- */
#faq .h2 {
  margin-bottom: 18px;
}
details {
  border-top: 1px solid var(--cream-2);
  padding: 4px 0;
}
details:last-of-type {
  border-bottom: 1px solid var(--cream-2);
}
summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 32px 16px 0;
  position: relative;
  font-weight: 700;
  font-size: 17px;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  font-weight: 400;
  color: var(--muted);
}
details[open] summary::after {
  content: '−';
}
details p {
  padding: 0 0 18px;
  color: var(--ink-2);
}

/* ---------- CTA final ---------- */
.final {
  background: var(--blue-dark);
  background: linear-gradient(160deg, #2f86f0, #1b5fc0);
  color: #fff;
  text-align: center;
  padding: 64px 0;
}
.final-in {
  display: grid;
  justify-items: center;
}
.final-in > img {
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
}
.final h2 {
  margin-top: 20px;
  font-size: clamp(28px, 7vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-wrap: balance;
}
.final p {
  margin-top: 8px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
}
.final .alt {
  margin-top: 16px;
  font-size: 15px;
}
.qr-final {
  color: #fff;
}
.qr-final p {
  color: rgba(255, 255, 255, 0.9);
  text-align: left;
  margin: 0;
  font-size: 14px;
}
.qr-final p b {
  color: #fff;
}

/* ---------- Rodapé ---------- */
.foot {
  padding: 32px 0 40px;
  font-size: 14px;
  color: var(--muted);
}
.foot-in {
  display: grid;
  gap: 14px;
  justify-items: start;
}
.brand-foot {
  font-size: 17px;
  color: var(--ink);
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.foot nav a {
  color: var(--ink-2);
  font-weight: 600;
}
@media (max-width: 799px) {
  .foot {
    padding-bottom: 96px;
  }
}

/* ---------- Barra fixa de download (celular) ---------- */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.25s ease;
}
.sticky-cta img {
  border-radius: 10px;
}
.sticky-txt {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  margin-right: auto;
}
.sticky-txt b {
  font-size: 15px;
}
.sticky-txt small {
  color: var(--muted);
  font-size: 12.5px;
}
[data-os='ios'] .sticky-cta,
[data-os='android'] .sticky-cta {
  display: flex;
}
.sticky-cta.show {
  transform: translateY(0);
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .runner {
    content: url('/landing/assets/icon-256.webp');
    border-radius: 22%;
  }
}
