/*
 * Landing pública da doula (/perfil/{codigo}) — MOBILE FIRST.
 * Base = celular de 320px; `min-width` só expande. Tokens da marca em tokens.css.
 */

.pp {
  margin: 0;
  font-family: var(--md-font-ui);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--md-ink);
  background: var(--md-surface);
  /* espaço para a barra fixa de WhatsApp no celular */
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  -webkit-text-size-adjust: 100%;
}

.pp *, .pp *::before, .pp *::after { box-sizing: border-box; }
.pp img { max-width: 100%; display: block; }
.pp :where(a) { color: inherit; } /* :where zera a especificidade: não sobrescreve as cores dos botões */

/* ---------------------------------------------------------------- topo */

.pp-topo {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 245, 250, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--md-line);
}

.pp-topo__inner {
  max-width: 960px;
  margin-inline: auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
}

.pp-topo__marca { display: inline-flex; min-height: 44px; align-items: center; }
.pp-topo__marca img { width: 140px; height: 44px; object-fit: contain; object-position: left center; }

/* ---------------------------------------------------------------- cartão */

.pp-pagina {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 0 32px;
}

.pp-card {
  background: var(--md-white);
  overflow: hidden;
  border-bottom: 1px solid var(--md-line);
}

.pp-capa {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #393A8F 0%, #9B8ACB 45%, #D990A8 100%);
  overflow: hidden;
}

.pp-capa img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }

.pp-capa::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, rgba(32, 33, 61, .22));
  pointer-events: none;
}

.pp-hero {
  position: relative;
  padding: 0 20px 28px;
  text-align: center;
}

.pp-avatar {
  display: block;
  width: 120px;
  height: 120px;
  margin: -60px auto 0;
  border-radius: 50%;
  border: 4px solid var(--md-white);
  object-fit: cover;
  background: var(--md-accent-soft);
  box-shadow: 0 8px 24px rgba(32, 33, 61, .15);
  position: relative;
  z-index: 1;
}

.pp-avatar--iniciais {
  display: grid;
  place-items: center;
  color: var(--md-rose);
  font-family: var(--md-font-display);
  font-size: 2.25rem;
  font-weight: 600;
}

.pp-nome {
  margin: 16px 0 4px;
  font-family: var(--md-font-display);
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.pp-papel { margin: 0; color: var(--md-muted); font-weight: 600; }

.pp-local {
  margin: 6px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--md-muted);
  font-size: .9375rem;
}

.pp-chamada {
  margin: 16px auto 0;
  max-width: 34rem;
  font-size: 1.0625rem;
  font-weight: 500;
  font-style: italic;
  color: var(--md-rose);
  overflow-wrap: anywhere;
}

.pp-ico { width: 20px; height: 20px; flex: none; }
.pp-ico--sm { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- botões */

.pp-acoes {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  max-width: 360px;
  margin-inline: auto;
}

.pp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 700 .9375rem/1.2 var(--md-font-ui);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.pp-btn:active { transform: scale(.98); }
.pp-btn:focus-visible { outline: 3px solid var(--md-secondary); outline-offset: 2px; }

/* Verde oficial do WhatsApp (#25D366). Texto branco aí dá contraste 2:1 (reprova); o texto escuro
   #062E18 dá ~9:1 (AAA) e mantém a legibilidade em qualquer tela. */
.pp-btn--zap { background: #25D366; color: #062e18; }
.pp-btn--zap:hover { background: #1ebe5b; }
.pp-btn--insta { background: var(--md-white); color: var(--md-primary); border-color: var(--md-line); }
.pp-btn--insta:hover { border-color: var(--md-primary); }
.pp-btn--primario { background: var(--md-primary); color: #fff; }
.pp-btn--primario:hover { background: var(--md-primary-hover); }

.pp-acoes .pp-btn--zap { display: none; } /* no celular o contato é a barra fixa */

.pp-aceitando {
  margin: 16px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--md-app-sage-soft);
  color: var(--md-success);
  font-size: .8125rem;
  font-weight: 700;
}

.pp-aceitando__ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--md-app-sage); }

/* ---------------------------------------------------------------- corpo */

.pp-corpo { padding: 4px 20px 32px; }

.pp-bloco { padding-top: 28px; border-top: 1px solid var(--md-line); margin-top: 28px; }
.pp-bloco:first-child { margin-top: 0; }

.pp-titulo {
  margin: 0 0 14px;
  font-family: var(--md-font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -.01em;
}

.pp-texto { margin: 0; color: var(--md-muted); overflow-wrap: anywhere; }

.pp-pills, .pp-selos {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pp-pills li {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--md-accent-soft);
  border: 1px solid rgba(156, 88, 114, .2);
  color: var(--md-rose);
  font-size: .8125rem;
  font-weight: 600;
}

.pp-selos li {
  padding: 8px 14px;
  border-radius: var(--md-radius-sm);
  background: var(--md-surface);
  border: 1px solid var(--md-line);
  font-size: .8125rem;
  font-weight: 600;
}

/* ---------------------------------------------------------------- galeria */

.pp-galeria {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.pp-foto {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--md-line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--md-surface);
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}

.pp-foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.pp-foto:hover img { transform: scale(1.04); }
.pp-foto:focus-visible { outline: 3px solid var(--md-secondary); outline-offset: 2px; }

/* ---------------------------------------------------------------- lightbox */

.pp-lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 20, 40, .94);
  color: #fff;
}

.pp-lightbox[open] { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; }
.pp-lightbox::backdrop { background: rgba(20, 20, 40, .94); }

.pp-lightbox__fig { margin: 0; min-width: 0; text-align: center; }
.pp-lightbox__fig img { max-width: 100%; max-height: calc(100dvh - 120px); margin-inline: auto; border-radius: 8px; object-fit: contain; }
.pp-lightbox__fig figcaption { margin-top: 12px; padding-inline: 8px; font-size: .9375rem; color: rgba(255, 255, 255, .85); }

.pp-lightbox__fechar, .pp-lightbox__nav {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  cursor: pointer;
}

.pp-lightbox__fechar:hover, .pp-lightbox__nav:hover { background: rgba(255, 255, 255, .26); }
.pp-lightbox__fechar:focus-visible, .pp-lightbox__nav:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.pp-lightbox__fechar { position: absolute; top: max(12px, env(safe-area-inset-top, 0px)); right: 12px; z-index: 2; }
.pp-lightbox__nav { justify-self: center; }

/* ---------------------------------------------------------------- fale comigo */

.pp-fale {
  margin-top: 32px;
  padding: 24px 20px;
  border-radius: var(--md-radius-md);
  background: var(--md-surface);
  border: 1px solid var(--md-line);
  text-align: center;
}

.pp-fale__titulo { margin: 0 0 8px; font-family: var(--md-font-display); font-size: 1.125rem; font-weight: 600; }
.pp-fale__texto { margin: 0 auto 16px; max-width: 28rem; color: var(--md-muted); font-size: .9375rem; }
.pp-fale .pp-btn { width: 100%; max-width: 360px; }

/* ---------------------------------------------------------------- rodapé */

.pp-rodape {
  margin-top: 8px;
  padding: 32px 20px 28px;
  text-align: center;
  color: var(--md-muted);
  font-size: .8125rem;
  line-height: 1.5;
  border-top: 1px solid var(--md-line);
  background: linear-gradient(to bottom, rgba(255, 255, 255, .6), var(--md-surface));
}

.pp-rodape__inner { max-width: 960px; margin-inline: auto; display: grid; justify-items: center; gap: 10px; }
.pp-rodape__marca { display: inline-flex; min-height: 44px; align-items: center; }
.pp-rodape__marca img { width: 168px; height: 50px; max-width: 70vw; object-fit: contain; opacity: .9; }
.pp-rodape p { margin: 0; }
.pp-rodape__texto { font-size: .9375rem; }
.pp-rodape__texto strong { color: var(--md-ink); }
.pp-rodape__texto a { color: var(--md-primary); font-weight: 700; text-decoration: none; }
.pp-rodape__texto a:hover { text-decoration: underline; }
.pp-rodape__legal { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; }
.pp-rodape__legal a { display: inline-flex; min-height: 32px; align-items: center; color: var(--md-muted); text-decoration: none; }
.pp-rodape__legal a:hover { color: var(--md-primary); text-decoration: underline; }
.pp-rodape__copy { font-size: .75rem; opacity: .85; }
.pp-rodape a:focus-visible { outline: 3px solid var(--md-secondary); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------- barra fixa (celular) */

.pp-barra {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 30;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--md-line);
}

.pp-barra .pp-btn { width: 100%; }

/* ---------------------------------------------------------------- 404 */

.pp-vazio { padding: 56px 24px; text-align: center; }
.pp-vazio .pp-texto { margin: 8px 0 24px; }

/* ---------------------------------------------------------------- tablet+ */

@media (min-width: 600px) {
  .pp-topo__inner { padding-inline: 24px; }
  .pp-topo__marca img { width: 158px; height: 50px; }
  .pp-galeria { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .pp-acoes { flex-direction: row; max-width: none; justify-content: center; }
  .pp-corpo { padding-inline: 32px; }
  .pp-hero { padding-inline: 32px; }
  .pp-lightbox[open] { grid-template-columns: 72px 1fr 72px; }
}

@media (min-width: 900px) {
  .pp { padding-bottom: 0; }
  .pp-pagina { padding: 24px 24px 48px; }
  .pp-card { border: 1px solid var(--md-line); border-radius: var(--md-radius-lg); box-shadow: var(--md-shadow); }
  .pp-capa { aspect-ratio: 3 / 1; }
  .pp-avatar { width: 136px; height: 136px; margin-top: -68px; }
  .pp-corpo { padding-inline: 48px; }
  .pp-hero { padding-inline: 48px; }
  /* no desktop o botão do hero já está à vista: a barra fixa sai */
  .pp-barra { display: none; }
  .pp-acoes .pp-btn--zap { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  .pp-btn, .pp-foto img { transition: none; }
}
