/* Staks — cores do kit oficial (GUIA-DE-USO.md) */
:root {
  --azul: #1F5BFF;
  --azul-escuro: #1849D6;
  --ceu: #5CC8FF;
  --agua: #2EE6C8;
  --grafite: #1F2A44;
  --grafite-suave: #4A5674;
  --fundo-claro: #F1F5FA;
  --branco: #FFFFFF;
  --borda: #DCE4EF;
  --wrap: 1080px;
  --gutter: 20px;
  font-size: 16px;
}

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

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

body {
  margin: 0;
  background: var(--fundo-claro);
  color: var(--grafite);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Noto Sans", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.01em; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.wrap.narrow > * { max-width: 720px; }

/* Cabeçalho: símbolo original sobre azul (feito para fundo colorido) */
.topbar {
  background: var(--azul);
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: env(safe-area-inset-top);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 52px;
}
/* Conjunto da marca: símbolo + wordmark lado a lado.
   Altura das letras do wordmark ~ 86% da altura do arquivo (viewBox 834, letras 714). */
.lockup {
  display: flex;
  align-items: center;
}
.lockup img { width: auto; max-width: none; }
.lockup-lg { gap: 18px; }
.lockup-lg .lockup-symbol { height: 64px; }
.lockup-lg .lockup-wordmark { height: 46px; }
@media (min-width: 760px) {
  .lockup-lg { gap: 24px; }
  .lockup-lg .lockup-symbol { height: 84px; }
  .lockup-lg .lockup-wordmark { height: 60px; }
}

.lang {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 3px;
}
.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--branco);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  min-width: 44px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-btn[aria-pressed="true"] { background: var(--branco); color: var(--azul); }
.lang-btn:focus-visible { outline: 2px solid var(--agua); outline-offset: 2px; }

/* Hero: wordmark branco com K em gradiente, sobre azul #1F5BFF */
.hero {
  background: var(--azul);
  color: var(--branco);
  position: relative;
  display: flex;
  flex-direction: column;
}
.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 56px;
  padding-bottom: 40px;
}

/* Foto do hero. Mobile: painel abaixo do texto, recorte da metade direita
   (cabeça, óculos e celular), ancorado no topo porque o cabelo encosta na borda;
   fusão curta com o azul para não cobrir o rosto. De 600 a 1023 px, foto inteira. */
.hero-media {
  order: 2;
  position: relative;
  display: block;
  aspect-ratio: 1000 / 1057;
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 0%;
}
.hero-photo { display: block; width: 100%; height: 100%; }
/* Camada de movimento: começa invisível sobre a foto e só aparece quando de fato toca.
   Sem JS, com reduced-motion, autoplay recusado ou erro, continua invisível e a foto fica. */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% 0%; /* mobile: mesmo recorte da metade direita da foto mobile */
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.hero-video.is-playing { opacity: 1; }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--azul) 0%, rgba(31, 91, 255, 0) 12%);
}
@media (min-width: 600px) and (max-width: 1023px) {
  .hero-media { aspect-ratio: 1920 / 1086; }
  .hero-video { object-position: 60% 0%; }
}

/* Desktop: foto como fundo; texto na metade esquerda sobre gradiente azul profundo.
   Abaixo de 1024 px o texto cobriria o celular, então vale o painel empilhado. */
@media (min-width: 1024px) {
  .topbar { background: #102E8F; }
  .hero {
    display: block;
    /* ~92% da altura da foto (1920x1086) em qualquer largura: cabeça e celular sempre inteiros */
    min-height: clamp(620px, 52vw, 1400px);
    background: #102E8F;
  }
  .hero-media {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    max-height: none;
  }
  .hero-media img,
  .hero-video { object-position: 70% 0%; }
  .hero-media::after {
    background:
      linear-gradient(90deg,
        rgba(16, 46, 143, 0.94) 0%,
        rgba(20, 62, 196, 0.86) 30%,
        rgba(31, 91, 255, 0.45) 46%,
        rgba(31, 91, 255, 0) 62%),
      linear-gradient(0deg, rgba(16, 46, 143, 0.35) 0%, rgba(16, 46, 143, 0) 30%);
  }
  .hero-content {
    padding-top: 72px;
    padding-bottom: 80px;
  }
  .hero-content > * { max-width: min(520px, 42vw); }
}
.hero-tagline {
  margin: 18px 0 0;
  font-size: clamp(1.2rem, 3.2vw, 1.5rem);
  font-weight: 600;
  color: var(--branco);
}
.hero h1 {
  margin-top: 40px;
  font-size: clamp(1.75rem, 4.6vw, 2.6rem);
  font-weight: 800;
  max-width: 20ch;
}
.hero-lead {
  margin: 20px 0 0;
  font-size: clamp(1.1rem, 2.6vw, 1.35rem);
  max-width: 36ch;
  color: rgba(255, 255, 255, 0.92);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 32px 0 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.9rem;
  font-weight: 600;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--agua);
}

/* Seções */
.section { padding: 64px 0; }
.section.alt { background: var(--branco); border-top: 1px solid var(--borda); border-bottom: 1px solid var(--borda); }
.section h2 {
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  font-weight: 800;
  margin-bottom: 16px;
}
.big { margin: 0; font-size: clamp(1.1rem, 2.4vw, 1.25rem); color: var(--grafite); }

.steps {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
.step {
  background: var(--fundo-claro);
  border: 1px solid var(--borda);
  border-radius: 16px;
  padding: 24px;
}
.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--azul);
  color: var(--branco);
  font-weight: 800;
  margin-bottom: 16px;
}
.step h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.step p { margin: 0; color: var(--grafite-suave); }

/* Animação da marca (hero): toca uma vez ao carregar.
   Geometria oficial do wordmark inline; o ">" é o próprio chevron do K espelhado,
   o "_" é um cursor que some. Sem animação, o estado padrão já é a marca final. */
.lockup-wordmark.brand-anim { display: block; width: auto; aspect-ratio: 779 / 208; overflow: visible; }
.brand-anim .wm-cursor { opacity: 0; }
.brand-anim .wm-chev,
.brand-anim .wm-stem { transform-box: fill-box; }
.brand-anim .wm-chev { transform-origin: 50% 50%; }
.brand-anim .wm-stem { transform-origin: 50% 100%; }

.brand-anim .wm-cursor { animation: wm-blink 1.5s linear 0.1s both; }
.brand-anim .wm-chev { animation: wm-flip 0.45s cubic-bezier(.6, 0, .3, 1) 1.5s both; }
.brand-anim .wm-stem { animation: wm-stem 0.35s ease-out 1.8s both; }
.brand-anim .wm-letter { animation: wm-in 0.45s ease-out both; }
.brand-anim .wm-1 { animation-delay: 2.05s; }
.brand-anim .wm-2 { animation-delay: 2.15s; }
.brand-anim .wm-3 { animation-delay: 2.25s; }
.brand-anim .wm-4 { animation-delay: 2.35s; }
.lockup-lg .lockup-symbol { animation: wm-symbol 0.5s ease-out 2.05s both; }

@keyframes wm-blink {
  0%, 16% { opacity: 1; }
  17%, 33% { opacity: 0; }
  34%, 50% { opacity: 1; }
  51%, 67% { opacity: 0; }
  68%, 88% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes wm-flip { from { transform: scaleX(-1); } to { transform: scaleX(1); } }
@keyframes wm-stem { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes wm-in { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes wm-symbol { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .brand-anim *,
  .lockup-lg .lockup-symbol { animation: none !important; }
}

/* O app: capturas reais, imagem inteira, sem moldura */
.shots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 28px;
  justify-items: center;
}
@media (min-width: 760px) {
  .shots { grid-template-columns: repeat(2, minmax(0, 320px)); justify-content: center; gap: 48px; }
}
.shot { margin: 0; width: 100%; max-width: 320px; }
.shot img { width: 100%; height: auto; }
.shot img:not([src]) { display: none; } /* sem JS: vale o <noscript> */
/* Esconde só o preto externo dos cantos: máscara traçada pela silhueta medida nos PNGs (corte zero do app). */
.shot img {
  -webkit-mask-image: url("../assets/mask-app.svg");
  mask-image: url("../assets/mask-app.svg");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.shot figcaption {
  margin-top: 12px;
  text-align: center;
  font-weight: 600;
  color: var(--grafite);
}
.shots-note {
  margin: 28px 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--grafite-suave);
}

/* FAQ */
.faq-list { display: grid; gap: 12px; margin-top: 24px; }
.faq-item {
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: 14px;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 1.05rem;
  -webkit-tap-highlight-color: transparent;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--fundo-claro);
  color: var(--azul);
  font-weight: 800;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item summary:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; border-radius: 14px; }
.faq-item p { margin: 0; padding: 0 20px 18px; color: var(--grafite-suave); }

/* Rodapé */
/* Fundo azul profundo: o símbolo e o wordmark branco são feitos para fundo colorido. */
.footer {
  background: #102E8F;
  color: rgba(255, 255, 255, 0.78);
  padding: 48px 0 calc(48px + env(safe-area-inset-bottom));
  font-size: 0.9rem;
  line-height: 1.6;
}
.footer p { margin: 0; }
.footer-inner {
  display: grid;
  gap: 32px;
}
@media (min-width: 760px) {
  .footer-inner { grid-template-columns: 1fr auto; align-items: start; gap: 48px; }
}
.lockup-footer { gap: 12px; }
.lockup-footer .lockup-symbol { height: 36px; }
.lockup-footer .lockup-wordmark { height: 26px; } /* ~97 px de largura: acima do mínimo de 80 px */
.footer-tagline { margin-top: 14px !important; color: var(--branco); font-weight: 600; }
.footer-apilab { margin-top: 6px !important; }
.footer-info { display: grid; gap: 18px; }
.footer-address { font-style: normal; display: grid; }
.footer-contact { display: grid; }
.footer-label {
  color: var(--branco);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.footer a { color: var(--branco); text-decoration: underline; text-underline-offset: 3px; }
.footer a:focus-visible { outline: 2px solid var(--agua); outline-offset: 2px; border-radius: 4px; }
