/* infra/site/estilo.css: página inicial e páginas legais de vitario.app.
   Tokens do CLAUDE.md (Jabuticaba e Maracujá). Fontes servidas daqui, sem chamada a terceiros.
   Texto em rem (respeita o tamanho do navegador); celular primeiro, margem de 16 px. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fontes/atkinson-hyperlegible-next-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("fontes/fraunces-latin.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --bg: #FAF6F0;
  --card: #FFFFFF;
  --text: #26232E;
  --text-2: #6B6574;
  --brand: #3D2A5A;
  --marco: #F0B13A;
  --mamada: #B86F22;
  --sono: #4F5DB0;
  --fralda: #3F7F5C;
  --remedio: #C0412C;
  --saude: #24797E;
  --brucos: #8A4F9E;
  --alimentacao: #4E8530;
  --linha: #E6DFD3;
  --marca-paginas: #3D2A5A;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14121A;
    --card: #1F1C27;
    --text: #ECE5DA;
    --text-2: #A69FAE;
    --brand: #B9A6DB;
    --marco: #F5C766;
    --mamada: #E3A35E;
    --sono: #9AA5E6;
    --fralda: #8CC3A0;
    --remedio: #EE8A74;
    --saude: #6FC2C6;
    --brucos: #C9A2DC;
    --alimentacao: #9CCB7E;
    --linha: #34303F;
    --marca-paginas: #FAF6F0;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--brand);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.4rem;
  margin: 2.25rem 0 0.75rem;
}

h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

li + li {
  margin-top: 0.35rem;
}

.pagina {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 16px;
}

.topo {
  display: flex;
  align-items: center;
  min-height: 4rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--linha);
}

.marca {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--marca-paginas);
  letter-spacing: -0.02em;
  text-decoration: none;
  gap: 0;
}

.simbolo {
  /* O selo sólido (docs/marca): páginas e folha em Jabuticaba (creme no escuro), coração em
     Maracujá nos dois temas. */
  --simbolo-paginas: var(--marca-paginas);
  --simbolo-coracao: #F0B13A;
  flex: none;
}

.marca .simbolo {
  width: 1.7em;
  height: 1.7em;
  margin-right: 0.34em;
}

.conteudo {
  padding: 2rem 0 3rem;
}

.nota {
  color: var(--text-2);
  font-size: 0.95rem;
}

.cartao {
  background: var(--card);
  border: 1px solid var(--linha);
  border-radius: 16px;
  padding: 1.25rem;
  margin: 0 0 1rem;
}

.tabela {
  overflow-x: auto;
  margin: 0 0 1.25rem;
  border: 1px solid var(--linha);
  border-radius: 12px;
  background: var(--card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--linha);
}

tr:last-child td {
  border-bottom: 0;
}

th {
  font-weight: 700;
}

.rodape {
  border-top: 1px solid var(--linha);
  padding: 1.5rem 0 2.5rem;
  color: var(--text-2);
  font-size: 0.95rem;
}

.rodape ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.rodape li + li {
  margin-top: 0;
}

.rodape a {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
}

.rodape .equipe {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.rodape .equipe a {
  color: var(--text-2);
}

/* Página inicial. */

.oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.apoio {
  color: var(--text-2);
  font-size: 1.15rem;
}

.promessas {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 1rem;
}

.promessa {
  background: var(--card);
  border: 1px solid var(--linha);
  border-radius: 16px;
  padding: 1.25rem;
}

.promessas li + li {
  margin-top: 0;
}

.cartao h2 {
  margin-top: 0;
}

.cartao > :last-child {
  margin-bottom: 0;
}

.promessa h3 {
  margin-top: 0.75rem;
}

.promessa p {
  margin: 0;
  color: var(--text-2);
}

.icone {
  width: 2.25rem;
  height: 2.25rem;
  display: block;
}

.icone-sono {
  color: var(--sono);
}

.icone-fralda {
  color: var(--fralda);
}

.icone-saude {
  color: var(--saude);
}

.icone-marca {
  color: var(--brand);
}

.aviso {
  border-left: 4px solid var(--brand);
  padding: 0.25rem 0 0.25rem 1rem;
  color: var(--text);
}

@media (min-width: 720px) {
  .promessas {
    grid-template-columns: 1fr 1fr;
  }

}

@media (prefers-reduced-motion: no-preference) {
  .promessa {
    transition: border-color 160ms ease-out;
  }
}

/* Página inicial: mais larga que as páginas de texto, com os prints do app. */

.pagina-inicial {
  max-width: 68rem;
}

.abertura-app {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0 1rem;
}

.abertura-app h1 {
  font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 16ch;
  margin-bottom: 1rem;
}

.lojas {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.lojas li + li {
  margin-top: 0;
}

.loja {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  border-radius: 8px;
}

/* Selos oficiais das lojas: o do Google traz margem transparente em cima e embaixo (30 de 250 px). */
.selo-loja {
  display: block;
  width: auto;
  height: 3rem;
}

/* Google Play antes da produção: selo apagado, sem link, com a faixa por cima. */
.loja-em-breve {
  position: relative;
  cursor: default;
}

.loja-em-breve .selo-loja {
  opacity: 0.45;
}

.faixa-em-breve {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: var(--brand);
  color: var(--bg);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.selo-google {
  height: calc(3rem * 250 / 190);
  margin: calc(-3rem * 30 / 190) 0;
}

/* Moldura de celular em volta dos prints (1080 px de largura, nítidos em tela de 3x). */
.telefone {
  margin: 0;
  justify-self: center;
  width: min(68vw, 300px);
  border: 0.55rem solid #1D1A24;
  border-radius: 2.6rem;
  overflow: hidden;
  background: #1D1A24;
  box-shadow: 0 1.5rem 3rem -1.5rem rgb(38 35 46 / 0.45);
}

.telefone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2.05rem;
}

/* A faixa do dia: a mesma linha de 24 horas da Rotina do app. */
.dia {
  margin: 2.5rem 0 1rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--linha);
  border-radius: 20px;
}

.dia-titulo {
  font-size: 1.05rem;
  margin: 0 0 1rem;
  color: var(--text-2);
  font-family: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  font-weight: 700;
}

.faixa {
  position: relative;
  height: 3.25rem;
  border-radius: 12px;
  background: var(--bg);
  overflow: hidden;
}

.faixa i {
  position: absolute;
  left: calc(var(--p) * 1%);
  display: block;
}

.faixa .b {
  top: 0.35rem;
  bottom: 0.9rem;
  width: var(--w);
  border-radius: 6px;
  transform-origin: left center;
}

.b.sono {
  background: var(--sono);
}

.b.soneca {
  background: repeating-linear-gradient(135deg, var(--sono) 0 2px, transparent 2px 6px);
  border: 2px solid var(--sono);
}

.b.tummy {
  background: var(--brucos);
  top: 0.9rem;
  bottom: 1.4rem;
}

.faixa .m {
  top: 0.1rem;
  width: 4px;
  height: 1.2rem;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--mamada);
}

.faixa .f {
  bottom: 0.2rem;
  width: 0.55rem;
  height: 0.55rem;
  margin-left: -0.275rem;
  border-radius: 50%;
  background: var(--fralda);
}

.t1 { --p: 0; --w: 10.8%; }
.t2 { --p: 12.8; --w: 13.2%; }
.t3 { --p: 37.5; --w: 4.9%; }
.t4 { --p: 54.9; --w: 6.2%; }
.t5 { --p: 69.4; --w: 2.8%; }
.t6 { --p: 85.4; --w: 14.6%; }
.u1 { --p: 33.3; --w: 1%; }
.u2 { --p: 47.9; --w: 1.2%; }
.u3 { --p: 66; --w: 1.2%; }
.m1 { --p: 11.1; }
.m2 { --p: 27.1; }
.m3 { --p: 43.75; }
.m4 { --p: 53.5; }
.m5 { --p: 64.6; }
.m6 { --p: 75.7; }
.m7 { --p: 83; }
.f1 { --p: 13.2; }
.f2 { --p: 28.1; }
.f3 { --p: 42.7; }
.f4 { --p: 54.2; }
.f5 { --p: 63.9; }
.f6 { --p: 75; }
.f7 { --p: 84.4; }

.faixa-horas {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  color: var(--text-2);
  font-size: 0.85rem;
}

.legenda {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  color: var(--text-2);
  font-size: 0.95rem;
}

.legenda li + li {
  margin-top: 0;
}

.chave {
  display: inline-block;
  width: 1.1rem;
  height: 0.7rem;
  margin-right: 0.45rem;
  border-radius: 3px;
  vertical-align: 0.05em;
}

.chave.sono {
  background: var(--sono);
}

.chave.soneca {
  background: repeating-linear-gradient(135deg, var(--sono) 0 2px, transparent 2px 5px);
  border: 2px solid var(--sono);
}

.chave.mamada {
  background: var(--mamada);
  width: 4px;
}

.chave.fralda {
  background: var(--fralda);
  width: 0.7rem;
  border-radius: 50%;
}

.chave.tummy {
  background: var(--brucos);
}

/* Cada função: texto e prints, com a cor do tipo de registro numa barra curta. */
.recurso {
  --cor: var(--brand);
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--linha);
}

.cor-brucos { --cor: var(--brucos); }
.cor-alimentacao { --cor: var(--alimentacao); }
.cor-sono { --cor: var(--sono); }
.cor-remedio { --cor: var(--remedio); }
.cor-saude { --cor: var(--saude); }

.recurso-texto h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
  line-height: 1.12;
  margin: 0 0 1rem;
  max-width: 18ch;
}

.recurso-texto h2::before {
  content: "";
  display: block;
  width: 3rem;
  height: 0.35rem;
  margin-bottom: 1rem;
  border-radius: 99px;
  background: var(--cor);
}

.recurso-texto p {
  max-width: 34rem;
  font-size: 1.1rem;
}

.telas {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
}

.telas-par .telefone {
  width: min(42vw, 250px);
  border-width: 0.4rem;
  border-radius: 2rem;
}

.telas-par .telefone img {
  border-radius: 1.6rem;
}

.telas-par .telefone + .telefone {
  margin-top: 3rem;
}

/* A madrugada inverte a página: as cores do tema escuro do app, de ponta a ponta. */
.noite {
  margin: 0 -16px;
  padding: 0 16px;
  background: #14121A;
  color: #ECE5DA;
}

.noite-conteudo {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: 4rem 0;
}

.noite h2 {
  color: #ECE5DA;
}

.noite .recurso-texto h2::before {
  background: #B9A6DB;
}

.noite .recurso-texto p {
  color: #A69FAE;
}

.noite .telefone {
  border-color: #34303F;
  background: #34303F;
}

.promessas {
  margin: 3.5rem 0 1.5rem;
}

.chamada {
  padding: 2rem 0 1rem;
}

.chamada h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
  margin: 0 0 0.75rem;
}

@media (min-width: 52rem) {
  .abertura-app {
    grid-template-columns: 1fr auto;
    gap: 3rem;
    padding-top: 3rem;
  }

  .recurso,
  .noite-conteudo {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .recurso:nth-of-type(odd) .recurso-texto {
    order: 2;
  }

  .noite {
    margin: 0;
    padding: 0 3rem;
    border-radius: 28px;
  }

  .promessas {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Um único movimento: a faixa do dia se desenha ao abrir a página. */
@media (prefers-reduced-motion: no-preference) {
  .faixa .b {
    animation: desenhar 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(var(--p) * 12ms);
  }

  .faixa .m,
  .faixa .f {
    animation: surgir 400ms ease-out both;
    animation-delay: calc(var(--p) * 12ms + 300ms);
  }
}

@keyframes desenhar {
  from {
    transform: scaleX(0);
  }
}

@keyframes surgir {
  from {
    opacity: 0;
    transform: translateY(0.3rem);
  }
}

/* Perguntas frequentes: abre e fecha sem script. */
.perguntas {
  max-width: 44rem;
  padding: 1rem 0 2rem;
}

.perguntas h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
  margin: 0 0 1rem;
}

.perguntas details {
  border-bottom: 1px solid var(--linha);
}

.perguntas summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  padding: 0.5rem 0;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  list-style: none;
}

.perguntas summary::-webkit-details-marker {
  display: none;
}

.perguntas summary::after {
  content: "+";
  flex: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--brand);
}

.perguntas details[open] summary::after {
  content: "−";
}

.perguntas details p {
  margin: 0 0 1.25rem;
  color: var(--text-2);
}

/* Faixa do Google Play: só em celular Android, montada pelo Caddy (templates), sem script.
   Fechar grava um cookie no servidor (/faixa/fechar) e volta para o início. No iPhone, quem
   mostra o aviso é o próprio Safari (Smart App Banner). */
.faixa-android {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 16px;
  background: var(--card);
  border-bottom: 1px solid var(--linha);
}

.faixa-fechar {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: -0.75rem;
  color: var(--text-2);
}

.faixa-fechar svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
}

.faixa-icone {
  flex: none;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
}

.faixa-texto {
  flex: 1;
  min-width: 0;
  margin: 0;
  line-height: 1.3;
}

.faixa-texto strong {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--text);
}

.faixa-texto span {
  display: block;
  font-size: 0.875rem;
  color: var(--text-2);
}

.faixa-baixar {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: var(--brand);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
}

.faixa-fechar:focus-visible,
.faixa-baixar:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}
