/* ArtDots: páginas de leitura (/sobre, /artista, /about, termos)
   Reaproveita os tokens de styles.css. O app é um mapa que não rola;
   esta página é texto e ROLA — por isso os overrides logo abaixo. */

html, body {
  position: static;
  height: auto;
  overflow: visible;
  overscroll-behavior: auto;
  background: var(--paper);
}

.pagina {
  max-width: 42rem;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 4.2rem) 1.15rem calc(env(safe-area-inset-bottom) + 3rem);
}

/* ---------- topbar da página (mesma linguagem da do app) ---------- */
.topbar .voltar {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  text-decoration: none;
}

/* ---------- capa ---------- */
.capa { margin-bottom: 2.2rem; }

.capa .chapeu {
  margin: 0 0 .5rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--primary-ink);
}

.capa h1 {
  margin: 0 0 .6rem;
  font-size: clamp(1.75rem, 6.5vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -.02em;
}

.capa .linha-fina {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #555;
}

/* resumo em inglês das páginas em português (/sobre, /artista) */
.capa .lede-en { margin: .8rem 0 0; font-size: .92rem; line-height: 1.5; color: var(--muted); }
.capa .colecao-selo-g { margin: 0 0 .7rem; }

/* ---------- sumário ---------- */
.sumario {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0 0 2.4rem;
  padding: 0;
  list-style: none;
}
.sumario a {
  display: inline-block;
  padding: .34rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .85rem;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
}
.sumario a:hover { border-color: var(--ink); }

/* ---------- seções ---------- */
.secao { margin: 0 0 2.6rem; scroll-margin-top: 4.5rem; }

.secao h2 {
  margin: 0 0 .9rem;
  font-size: 1.35rem;
  letter-spacing: -.01em;
}
.secao h2::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: .5rem;
  border-radius: 2px;
  background: var(--primary);
  vertical-align: .05em;
}

.secao h3 {
  margin: 1.6rem 0 .5rem;
  font-size: 1rem;
}

.secao p {
  margin: 0 0 1rem;
  font-size: 1.02rem;
  line-height: 1.62;
}

.secao a { color: var(--primary-ink); }

.secao ul { margin: 0 0 1rem; padding-left: 1.1rem; }
.secao li { margin-bottom: .5rem; line-height: 1.55; }

/* ---------- citação ---------- */
.citacao {
  margin: 1.4rem 0;
  padding: .2rem 0 .2rem 1rem;
  border-left: 3px solid var(--tile-orange);
}
.citacao p {
  margin: 0 0 .35rem;
  font-size: 1.15rem;
  line-height: 1.45;
  font-style: italic;
}
.citacao cite {
  font-size: .82rem;
  font-style: normal;
  color: var(--muted);
}

/* ---------- números ---------- */
.numeros {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: .6rem;
  margin: 0 0 1.2rem;
  padding: 0;
  list-style: none;
}
.numeros li {
  margin: 0;
  padding: .8rem .85rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.numeros b {
  display: block;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.numeros span { font-size: .82rem; color: var(--muted); }

/* ---------- bloco "em breve" (conteúdo travado até a entrevista) ---------- */
.embreve {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  margin: 1.2rem 0;
  padding: .95rem 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fafafa;
}
.embreve .tag {
  flex-shrink: 0;
  margin-top: .1rem;
  padding: .12rem .45rem;
  border-radius: 999px;
  background: var(--fill);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #555;
}
.embreve p { margin: 0; font-size: .92rem; line-height: 1.5; color: #555; }
.embreve strong { color: var(--ink); }

/* moldura de foto ainda sem foto (nome próprio: .foto-vazia já é o botão "sem foto" do app em styles.css, com position:absolute) */
.retrato-vazio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  aspect-ratio: 4 / 3;
  margin: 0 0 1.2rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, #fff, #fff 10px, #f5f5f5 10px, #f5f5f5 20px);
  color: var(--muted);
  font-size: .85rem;
  text-align: center;
  padding: 1rem;
}
.retrato-vazio .retrato-marca { width: 38px; height: 38px; color: var(--primary-ink); opacity: .5; }

/* ---------- links de imprensa ---------- */
.links-imprensa { list-style: none; margin: 0; padding: 0; }
.links-imprensa li {
  padding: .8rem 0;
  border-top: 1px solid var(--line);
}
.links-imprensa li:last-child { border-bottom: 1px solid var(--line); }
.links-imprensa a { font-weight: 600; text-decoration: none; }
.links-imprensa a:hover { text-decoration: underline; }
.links-imprensa .fonte { display: block; font-size: .8rem; color: var(--muted); margin-top: .15rem; }

/* ---------- chamada final ---------- */
.chamada {
  margin: 2.6rem 0 0;
  padding: 1.3rem;
  border-radius: var(--radius);
  background: var(--tile-dark);
  color: #fff;
  text-align: center;
}
.chamada h2 { margin: 0 0 .5rem; font-size: 1.2rem; }
.chamada p { margin: 0 0 1rem; font-size: .95rem; line-height: 1.5; opacity: .85; }
.chamada .btn-primary { text-decoration: none; display: inline-block; }

/* ---------- rodapé ---------- */
.rodape {
  margin: 2.4rem 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: .82rem;
  line-height: 1.6;
  color: var(--muted);
}
.rodape a { color: var(--muted); }
.rodape p { margin: 0 0 .6rem; }

/* ---------- navegação entre as páginas (Mapa · Projeto · Artista) ---------- */
.nav-paginas { display: flex; align-items: center; gap: .3rem; }

.nav-paginas a {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .35rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.nav-paginas a:hover { border-color: var(--ink); }
.nav-paginas a.atual { background: var(--tile-dark); border-color: var(--tile-dark); color: #fff; }
.nav-paginas svg { width: 15px; height: 15px; }

/* telas estreitas: o wordmark desce para a largura mínima do kit (120 px),
   para a navegação caber (round 12, D3) */
@media (max-width: 30rem) {
  .topbar .brand-logo img { width: 120px; height: auto; }
  .nav-paginas a { padding: .35rem .6rem; font-size: .8rem; }
}

/* ---------- passos numerados (página do projeto) ---------- */
.passos { list-style: none; margin: 0 0 1.2rem; padding: 0; counter-reset: passo; }
.passos li {
  position: relative;
  margin: 0 0 1rem;
  padding-left: 2.6rem;
  line-height: 1.55;
}
.passos li::before {
  counter-increment: passo;
  content: counter(passo);
  position: absolute;
  left: 0;
  top: -.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
}

/* ---------- dois jeitos de usar / cartões lado a lado ---------- */
.cartoes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: .7rem;
  margin: 0 0 1.2rem;
}
.cartao {
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.cartao h3 { margin: 0 0 .4rem; font-size: 1rem; display: flex; align-items: center; gap: .4rem; }
.cartao h3 svg { width: 18px; height: 18px; color: var(--primary-ink); }
.cartao p { margin: 0; font-size: .92rem; line-height: 1.5; color: #555; }

/* ---------- linha do tempo do projeto ---------- */
.fases { list-style: none; margin: 0; padding: 0; }
.fases li {
  position: relative;
  margin: 0;
  padding: 0 0 1.4rem 1.6rem;
  border-left: 2px solid var(--line);
  line-height: 1.55;
}
.fases li:last-child { border-left-color: transparent; padding-bottom: 0; }
.fases li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: .35rem;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--line);
}
.fases li.feita::before { background: var(--tile-green); }
.fases li.agora::before { background: var(--primary); box-shadow: 0 0 0 4px rgba(55, 59, 255, .18); }
.fases h3 { margin: 0 0 .2rem; font-size: 1rem; }
.fases p { margin: 0; font-size: .93rem; color: #555; }
.fases .etiqueta {
  display: inline-block;
  margin-left: .4rem;
  padding: .1rem .45rem;
  border-radius: 999px;
  background: var(--fill);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #555;
  vertical-align: .1em;
}
.fases .etiqueta.no-ar { background: #d9f2e3; color: #1e7a48; }

/* texto justificado nas páginas de leitura (pedido do Vini) —
   hyphens evita rios de espaço em coluna estreita no celular */
.linha-fina,
.secao p,
.secao li,
.embreve p,
.cartao p,
.fases p,
.passos li,
.rodape p {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* ---------- páginas legais e "about" do ArtDots (terms, privacy, termos, privacidade, about) ---------- */
.capa .data { margin: .6rem 0 0; font-size: .82rem; color: var(--muted); }
.secao ol:not(.passos):not(.fases) { margin: 0 0 1rem; padding-left: 1.2rem; }
.secao ol:not(.passos):not(.fases) li { margin-bottom: .5rem; line-height: 1.55; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.troca-idioma { margin: 0 0 1.6rem; font-size: .85rem; color: var(--muted); }
.troca-idioma a { color: var(--primary-ink); }

/* quatro pílulas (Map · About · Terms · Privacy) em tela muito estreita: a navegação rola de lado em vez de quebrar a topbar */
@media (max-width: 22rem) {
  .nav-paginas { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px; }
  .nav-paginas::-webkit-scrollbar { display: none; }
}


/* Página combinada Termos & Privacidade: títulos que separam os dois documentos */
.secao-titulo {
  margin: 2.6rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--primary);
  font-size: 1.5rem;
  letter-spacing: -.01em;
}
.secao-titulo:first-of-type { margin-top: 1.4rem; }

/* /a/<slug> e /c/<slug> (Fase Q): obras em texto, sem foto de ninguém.
   Número, nome e cidade; tocar abre o app. Com sessão, a capa entra por cima. */
.obra-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.obra-cartao { display: flex; flex-direction: column; gap: .15rem; min-width: 0; padding: .75rem .8rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); text-decoration: none; overflow: hidden; }
.obra-cartao:hover, .obra-cartao:focus-visible { border-color: var(--primary); }
.obra-cartao img { display: block; width: calc(100% + 1.6rem); margin: -.75rem -.8rem .5rem; aspect-ratio: 1; object-fit: cover; background: var(--fill); }
.obra-num { font-size: .78rem; font-weight: 700; color: var(--primary-ink); font-variant-numeric: tabular-nums; }
.obra-nome { font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.obra-cidade { font-size: .82rem; color: var(--muted); }

/* ---------- Fase N (round 4, D6): dentro do app iOS (html.ah-app) ----------
   O topo fixo das páginas já desce pelo recorte do relógio; o conteúdo das
   páginas com embrulho próprio (4.5rem de respiro, sem o recorte) ficava com
   o começo escondido atrás do topo mais alto. Aqui o respiro soma o recorte,
   como o .pagina acima. A faixa branca por cima do relógio mora no
   styles.css (html.ah-app body::before), que toda página carrega. */
html.ah-app .lp-wrap,
html.ah-app .ap-wrap,
html.ah-app .cp-wrap,
html.ah-app .gl-wrap,
html.ah-app .gp-wrap,
html.ah-app .pg-wrap,
html.ah-app .pp-wrap { padding-top: calc(env(safe-area-inset-top) + 4.5rem); }

/* ---------- Fase B do round 6 (D2): mini mapas abaixo do topo ----------
   Os controles do Leaflet (zoom, atribuição) têm z-index até 1000 e subiam
   por cima do topo fixo ao rolar a página. Cada mini mapa vira o seu próprio
   contexto de empilhamento (isolation + z-index 0): os z-indexes do Leaflet
   ficam presos dentro dele, e o .topbar (z-index 1000, styles.css) fica por
   cima. /welcome, /p/<n>, /g/<slug>, /c/<slug> e /a/<slug>. */
#lp-map, #pp-map, #gp-map, #cp-map, #ap-map { position: relative; isolation: isolate; z-index: 0; }
/* round 8, Fase G: o mapa de /galleries, pela mesma razão */
#gl-map { position: relative; isolation: isolate; z-index: 0; }

/* round 12 (D5): "Art Hunt is now ArtDots." no topo de /about e /sobre, até a fase C */
.transicao-nome { margin: 0 0 1rem; padding: .5rem .8rem; border-radius: var(--radius-ctl); background: var(--fill); color: var(--ink); font-size: .9rem; display: inline-block; }
