/*
 * MensuraFit — folha única para todo o site.
 *
 * Tokens copiados de src/design-system/tokens.ts do app, para que site e produto
 * não divirjam. NÃO usar src/config/tamagui.config.js como referência: é arquivo
 * morto no repo do app e carrega uma paleta roxa de uma identidade anterior.
 *
 * Sem framework e sem etapa de build, de propósito: a Play Store e a App Store
 * exigem que /privacidade e /termos respondam, e alguns revisores abrem a página
 * com JavaScript desabilitado. HTML estático com uma folha de estilo é a forma
 * mais difícil de quebrar isso — e não tem `npm install` para falhar no deploy.
 */

:root {
  --orange: #fc4c02;
  --orange-dark: #e04402;
  --gray: #6d6d78;
  --bg: #f7f7fa;
  --text: #1f1f24;
  --dark: #131316;
  --border: #e4e4ea;
  --white: #fff;
  --max: 1120px;
  --radius: 18px;
}

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

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

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
}

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

a {
  color: var(--orange);
  text-decoration: none;
}
a:hover {
  color: var(--orange-dark);
  text-decoration: underline;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Cabeçalho ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover {
  text-decoration: none;
  color: var(--text);
}
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

/* Troca de idioma com links, não <select>: funciona sem JavaScript. */
.langs {
  display: flex;
  gap: 4px;
  font-size: 14px;
}
.langs a {
  color: var(--gray);
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
}
.langs a:hover {
  background: var(--bg);
  text-decoration: none;
}
.langs a[aria-current="true"] {
  color: var(--orange);
  background: rgba(252, 76, 2, 0.08);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--dark);
  color: var(--white);
  overflow: hidden;
}

.hero picture,
.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
}

/* Véu escuro à esquerda: o texto precisa de contraste garantido, e a imagem
   gerada já reserva o terço esquerdo mais escuro. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(19, 19, 22, 0.94) 0%,
    rgba(19, 19, 22, 0.82) 42%,
    rgba(19, 19, 22, 0.25) 78%,
    rgba(19, 19, 22, 0.1) 100%
  );
}

.hero .wrap {
  position: relative;
  z-index: 1;
  padding-top: 96px;
  padding-bottom: 96px;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  max-width: 17em;
}

.hero .lead {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: rgba(255, 255, 255, 0.82);
  max-width: 30em;
  margin: 0 0 34px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 18px;
}

/* ---------- Botões de loja ---------- */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 24px;
  min-width: 208px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  background: var(--orange);
  color: var(--white);
  border: 2px solid var(--orange);
}
.store-btn:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  color: var(--white);
  text-decoration: none;
}

/* Glifo da loja. `currentColor` faz o ícone herdar a cor do botão, então ele
   acompanha o estado "em breve" (cinza) e o publicado (branco) sem CSS extra. */
.store-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

/* Duas linhas, como os badges oficiais: a pequena diz o estado, a grande diz a loja. */
.store-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  text-align: left;
}
.store-small {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.72;
}
.store-big {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Enquanto o app não está publicado, o botão informa em vez de prometer um link
   que cairia em 404 na loja — e 404 para loja é motivo de rejeição. */
.store-btn.soon {
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  border-color: rgba(255, 255, 255, 0.28);
  cursor: default;
}
.store-btn.soon:hover {
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  border-color: rgba(255, 255, 255, 0.28);
  text-decoration: none;
}

/* ---------- Seções ---------- */

section {
  padding: 84px 0;
}
section.tint {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

h2 {
  font-size: clamp(1.6rem, 3.8vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}

.section-lead {
  color: var(--gray);
  max-width: 36em;
  margin: 0 0 44px;
}

.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.card h3 {
  font-size: 1.14rem;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.card p {
  color: var(--gray);
  margin: 0;
  font-size: 16px;
}

.card figure {
  margin: 0 0 20px;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg);
}
.card figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(252, 76, 2, 0.1);
  color: var(--orange);
  font-weight: 800;
  margin-bottom: 16px;
}

/* ---------- Faixa dividida ---------- */

.split {
  display: grid;
  gap: 48px;
  align-items: center;
  grid-template-columns: 1fr 1fr;
}
.split img {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.split ul {
  padding-left: 0;
  list-style: none;
  margin: 24px 0 0;
}
.split li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 14px;
  color: var(--gray);
}
.split li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
}

/* ---------- FAQ ---------- */

/* <details> nativo: abre e fecha sem uma linha de JavaScript. */
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
  background: var(--white);
}
.faq summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  padding-right: 28px;
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: -2px;
  color: var(--orange);
  font-weight: 800;
  font-size: 1.4em;
  line-height: 1;
}
.faq details[open] summary::after {
  content: "−";
}
.faq details p {
  color: var(--gray);
  margin: 14px 0 0;
}

/* ---------- Documento legal ---------- */

.legal {
  padding: 56px 0 88px;
  max-width: 760px;
  margin: 0 auto;
}
.legal h1 {
  font-size: clamp(1.85rem, 5vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}
.legal .updated {
  color: var(--gray);
  font-size: 15px;
  margin: 0 0 44px;
}
.legal h2 {
  font-size: 1.22rem;
  font-weight: 700;
  margin: 42px 0 12px;
}
.legal p,
.legal li {
  color: #3a3a45;
}
.legal ul {
  padding-left: 22px;
}
.legal li {
  margin-bottom: 7px;
}
.legal strong {
  color: var(--text);
}

.back-link {
  display: inline-block;
  margin-bottom: 30px;
  font-size: 15px;
  font-weight: 600;
}

/* ---------- Rodapé ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 48px 0;
  font-size: 15px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
  justify-content: space-between;
  align-items: center;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.site-footer a {
  color: var(--gray);
  font-weight: 600;
}
.site-footer a:hover {
  color: var(--orange);
}
.site-footer .copy {
  color: var(--gray);
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .split.reverse > * {
    order: initial;
  }
}

@media (max-width: 640px) {
  section {
    padding: 60px 0;
  }
  .hero .wrap {
    padding-top: 68px;
    padding-bottom: 68px;
  }
  .hero img {
    object-position: 62% center;
  }
  .store-btn {
    width: 100%;
    justify-content: center;
  }
  .site-footer .wrap {
    align-items: flex-start;
  }
}
