/* ===================== Sempre-viva · memorial =====================
   Design: página 03 do Penpot (design/exports/memorial). Carregado depois de fontes.css e base.css. */

html { scroll-behavior: smooth; }
.ramo { flex: none; }
.icone--grande { width: 24px; height: 24px; }
.icone--xl { width: 40px; height: 40px; }
.so-js { display: none !important; }
.js .so-js { display: inline-flex !important; }

/* ---- faixas ---- */
.faixa { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 14px; min-height: 40px; padding: 8px 20px; background: var(--palha-soft); color: var(--palha-ink); font: 700 13px/1.3 var(--ui); text-align: center; }
.faixa a { color: var(--palha-ink); }
.faixa--previa { background: var(--azul-soft); color: var(--azul); }
@media (min-width: 768px) { .faixa { font-size: 15px; min-height: 44px; } }

/* ---- topo ---- */
.topo { background: var(--papel); padding: 18px 0 28px; }
.topo__miolo { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.topo__arco { width: 60%; max-width: 280px; }
.topo__arco--vazio { display: grid; place-items: center; background: var(--branco); border: 1px solid var(--linha); border-bottom: 0; }
.topo__retrato { animation: sobe 600ms cubic-bezier(.2, .7, .2, 1) both; }
@keyframes sobe { from { transform: translateY(14%); opacity: .2; } to { transform: none; opacity: 1; } }
.topo__texto { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; text-align: center; }
.topo__nome { font: 500 38px/1.08 var(--serif); margin-top: 8px; }
.topo__apelido { font-size: 17px; line-height: 1.3; color: var(--grafite-muted); }
.datas { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 6px; }
.datas__col { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.datas__rotulo { font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--grafite-muted); }
.datas__data { font: 500 17px/1.25 var(--serif); }
.datas__local { font-size: 14px; line-height: 1.35; color: var(--grafite-muted); }
.datas__div { width: 1px; align-self: stretch; background: var(--linha); }
.epitafio { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 6px; max-width: 32ch; }
.epitafio p { font: italic 400 21px/1.4 var(--serif); }
.acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 10px; }
.acoes .botao { min-height: 48px; padding: 0 8px; font-size: 16px; gap: 8px; }
.acoes__principal { grid-column: 1 / -1; min-height: 52px !important; font-size: 17px !important; }
.acoes .botao:only-child { grid-column: 1 / -1; }

@media (min-width: 1024px) {
  .topo { padding: 72px 0 80px; }
  .topo__miolo { flex-direction: row; align-items: center; gap: 88px; padding: 0 24px; justify-content: center; }
  .topo__arco { width: 420px; max-width: none; flex: none; }
  .topo__texto { align-items: flex-start; text-align: left; width: 640px; max-width: 100%; gap: 20px; }
  .topo__nome { font-size: 60px; line-height: 1.04; margin-top: 0; }
  .topo__apelido { font-size: 19px; }
  .datas { justify-content: flex-start; gap: 25px; margin-top: 8px; }
  .datas__col { align-items: flex-start; }
  .datas__rotulo { font-size: 15px; }
  .datas__data { font-size: 22px; }
  .datas__local { font-size: 16px; }
  .datas__div { height: 62px; }
  .epitafio { flex-direction: row; align-items: flex-start; gap: 14px; max-width: 580px; margin-top: 12px; }
  .epitafio p { font-size: 26px; }
  .acoes { display: flex; flex-wrap: wrap; width: auto; margin-top: 16px; gap: 12px; }
  .acoes .botao { min-height: 52px; padding: 0 22px; }
  .acoes__principal { min-height: 52px !important; }
}

/* ---- seções ---- */
.pagina { display: flex; flex-direction: column; }
.corpo, .corpo__principal, .corpo__lateral { display: contents; }
.s-historia { order: 1; } .s-linha { order: 2; } .s-fotos { order: 3; } .s-gostos { order: 4; }
.s-familia { order: 5; } .s-videos { order: 6; } .s-lembrancas { order: 7; } .s-descanso { order: 8; }
.secao { padding: 36px 24px; }
.secao--papel { background: var(--papel); }
.secao--branco { background: var(--branco); }
.secao > * { max-width: 680px; margin-left: auto; margin-right: auto; }
.secao__titulo { display: flex; align-items: flex-end; gap: 10px; font: 500 28px/1.15 var(--serif); margin-bottom: 18px; }
.secao__cabeca { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; max-width: 1120px !important; margin-bottom: 20px; }
.secao__cabeca .secao__titulo { margin-bottom: 0; }
.secao__contagem { font-size: 15px; line-height: 1.3; color: var(--grafite-muted); }
.secao__apoio { font-size: 15px; line-height: 1.45; color: var(--grafite-muted); margin-bottom: 18px; }
.leitura { display: grid; gap: 18px; }
.leitura p { font: 400 19px/1.65 var(--serif); }

/* linha do tempo */
.linha { list-style: none; margin: 0 auto; padding: 0; }
.linha__item { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 0 0 22px 30px; }
.linha__item::before { content: ""; position: absolute; left: 1px; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--palha); }
.linha__item::after { content: ""; position: absolute; left: 5.25px; top: 22px; bottom: 0; width: 1.5px; background: var(--linha); }
.linha__item:last-child { padding-bottom: 0; }
.linha__item:last-child::before { background: var(--grafite); }
.linha__item:last-child::after { display: none; }
.linha__ano { font: 600 22px/1.2 var(--serif); color: var(--palha-ink); }
.linha__titulo { font-size: 17px; line-height: 1.35; }
.linha__texto { font-size: 15px; line-height: 1.45; color: var(--grafite-muted); max-width: 520px; }
.herbario--mini { width: 162px; margin-top: 10px; padding: 6px; padding-bottom: 6px; border-radius: 2px; box-shadow: 0 1px 2px rgba(35, 41, 43, .14), 0 3px 8px rgba(35, 41, 43, .08); }
.herbario--mini::before, .herbario--mini::after { display: none; }
.herbario--mini img { aspect-ratio: 3 / 2; object-fit: cover; }

/* fotos */
.s-fotos > .grade { max-width: 1120px; columns: 2; column-gap: 16px; }
.grade .herbario { break-inside: avoid; margin: 0 0 22px; }
.grade .herbario a { display: block; }
.grade .herbario img { width: 100%; height: auto; }
.grade .herbario figcaption { min-height: 38px; font-size: 12px; }
@media (min-width: 768px) { .s-fotos > .grade { columns: 3; column-gap: 20px; } .grade .herbario figcaption { font-size: 13px; } }
@media (min-width: 1024px) { .s-fotos > .grade { columns: 4; column-gap: 24px; } .grade .herbario { margin-bottom: 26px; } }

/* gostos */
.gostos { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 14px; }
.gostos li { position: relative; padding-left: 24px; font: 400 19px/1.5 var(--serif); }
.gostos li::before { content: ""; position: absolute; left: 0; top: 9px; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--palha); background: var(--branco); }

/* família */
.familia__texto { font: 400 19px/1.55 var(--serif); margin-bottom: 12px; }
.pessoas { list-style: none; margin: 0 auto; padding: 0; }
.pessoas li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linha); }
.pessoas b { font-size: 17px; line-height: 1.35; }
.pessoas span { font-size: 15px; color: var(--grafite-muted); }

/* vídeos */
.videos { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 20px; }
.video__abrir { position: relative; display: block; border-radius: var(--raio-folha); overflow: hidden; aspect-ratio: 16 / 9; background: var(--granito); }
.video__abrir img, .video iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.video__tocar { position: absolute; inset: 0; display: grid; place-items: center; }
.video__tocar .icone { width: 64px; height: 64px; padding: 18px; border-radius: 50%; background: rgba(35, 41, 43, .78); color: var(--branco); }
.video__titulo { font: 500 19px/1.35 var(--serif); margin-top: 10px; }
.video__link { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }

/* lembranças */
.lembrancas { list-style: none; margin: 0 auto 20px; padding: 0; display: grid; gap: 16px; }
.lembranca { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--branco); border: 1px solid var(--linha); border-radius: var(--raio-folha); }
.lembranca blockquote { margin: 0; font: 400 18px/1.55 var(--serif); white-space: pre-line; overflow-wrap: anywhere; }
.lembranca__autoria { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: auto; }
.lembranca__autoria b { display: block; font-size: 15px; line-height: 1.3; }
.lembranca__autoria small { display: block; font-size: 14px; line-height: 1.3; color: var(--grafite-muted); }
.lembranca__autoria time { font-size: 13px; color: var(--grafite-muted); white-space: nowrap; }
.s-lembrancas > .botao { display: flex; width: 100%; }
.js .s-lembrancas > .botao { display: flex !important; }

/* onde descansa */
.cartao-descanso { display: grid; gap: 14px; padding: 22px; background: var(--branco); border: 1px solid var(--linha); border-radius: var(--raio-folha); }
.cartao-descanso__local { display: flex; gap: 12px; align-items: flex-start; }
.cartao-descanso__local .icone { color: var(--musgo); margin-top: 2px; }
.cartao-descanso__local strong { display: block; font-size: 18px; line-height: 1.3; }
.cartao-descanso__local span { display: block; font-size: 15px; line-height: 1.45; color: var(--grafite-muted); margin-top: 2px; }
.cartao-descanso__qd { display: flex; gap: 28px; margin: 0; padding-left: 36px; }
.cartao-descanso__qd dt { font-size: 13px; font-weight: 700; color: var(--grafite-muted); line-height: 1.3; }
.cartao-descanso__qd dd { margin: 0; font: 500 30px/1.1 var(--serif); }

/* rodapé */
.rodape { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 24px; background: var(--granito); color: var(--granito-texto); text-align: center; font-size: 15px; line-height: 1.4; }
.rodape a { color: var(--palha); font-weight: 700; }
.rodape a:hover { color: #D4A64A; }

/* ---- desktop: corpo em duas colunas ---- */
@media (min-width: 1024px) {
  .secao { padding: 36px 160px; }
  .secao > * { max-width: none; }
  .s-fotos, .s-lembrancas { padding-left: max(24px, calc((100% - 1120px) / 2)); padding-right: max(24px, calc((100% - 1120px) / 2)); padding-top: 56px; padding-bottom: 56px; }
  .corpo { display: grid; grid-template-columns: minmax(0, 700px) minmax(0, 400px); gap: 0 80px; justify-content: center; align-items: start; background: var(--branco); padding: 36px 24px 24px; order: 1; }
  .corpo__principal, .corpo__lateral { display: block; }
  .corpo .secao { padding-left: 0; padding-right: 0; background: transparent; }
  .corpo__principal .leitura p { font-size: 20px; }
  .corpo__lateral { padding-top: 4px; }
  .corpo__lateral .gostos li { font-size: 18px; }
  .s-fotos { order: 2; } .s-lembrancas { order: 3; }
  .secao__titulo { font-size: 28px; }
  .lembrancas { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .s-lembrancas > .botao { width: 300px; }
  .s-historia .secao__titulo, .s-linha .secao__titulo { font-size: 28px; }
}
@media (min-width: 1024px) {
  .rodape { order: 4; }
}

/* ---- botão flutuante de aviso ---- */
.aviso-flutuante { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; padding: 12px 20px; border-radius: var(--raio-campo); background: var(--grafite); color: var(--branco); font-weight: 700; font-size: 15px; box-shadow: var(--sombra-folha); }

/* ---- folha de lembrança (dialog) ---- */
dialog { padding: 0; border: 0; color: var(--grafite); }
dialog::backdrop { background: rgba(35, 41, 43, .55); }
.folha { position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; max-height: 92dvh; margin: 0; background: var(--papel); border-radius: 18px 18px 0 0; overflow: auto; }
.folha[open] { animation: folha-sobe .22s ease-out; }
@keyframes folha-sobe { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.folha__alca { width: 44px; height: 5px; border-radius: 3px; background: var(--linha-forte); margin: 14px auto 0; }
.folha__conteudo { display: grid; gap: 16px; padding: 18px 20px 34px; max-width: 520px; margin: 0 auto; }
.folha__topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.folha__topo h2, .folha__enviada h2 { font: 500 26px/1.2 var(--serif); }
.folha__fechar, .foto-aberta__fechar { display: grid; place-items: center; width: 44px; height: 44px; margin: -8px -10px 0 0; background: transparent; border: 0; cursor: pointer; color: inherit; }
.folha__apoio { font-size: 15px; line-height: 1.45; color: var(--grafite-muted); }
.folha form { display: grid; gap: 16px; }
.folha__erro { padding: 10px 12px; border-radius: var(--raio-campo); background: var(--erro-soft); color: var(--erro); font-weight: 700; font-size: 15px; line-height: 1.4; }
.armadilha { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.folha__enviada { justify-items: center; text-align: center; padding-top: 48px; gap: 16px; }
.folha__enviada h2 { font-size: 32px; line-height: 1.15; }
.folha__enviada p { font-size: 17px; line-height: 1.5; color: var(--grafite-muted); }
.folha__enviada .botao { margin-top: 12px; }
.folha [hidden] { display: none !important; }
@media (min-width: 640px) {
  .folha { inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 520px; border-radius: 14px; }
  .folha[open] { animation: none; }
  .folha__alca { display: none; }
  .folha__conteudo { padding-top: 28px; }
}

/* ---- foto aberta (dialog) ---- */
.foto-aberta { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; background: #151817; color: var(--granito-texto); }
.foto-aberta[open] { display: grid; grid-template-rows: auto 1fr auto auto; }
.foto-aberta::backdrop { background: #151817; }
.foto-aberta__barra { display: flex; justify-content: space-between; align-items: center; padding: 16px; min-height: 64px; }
.foto-aberta__contagem { font-weight: 700; font-size: 15px; }
.foto-aberta__palco { display: grid; place-items: center; min-height: 0; touch-action: pan-y; overflow: hidden; }
.foto-aberta__palco img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.foto-aberta__legenda { padding: 14px 20px 0; min-height: 70px; }
.foto-aberta__legenda p { font: 500 22px/1.3 var(--serif); }
.foto-aberta__legenda b { display: block; margin-top: 4px; font-size: 15px; color: var(--palha); }
.foto-aberta__nav { display: flex; justify-content: space-between; padding: 16px 20px 28px; }
.foto-aberta__seta { display: grid; place-items: center; width: 56px; height: 56px; background: transparent; border: 1.5px solid var(--granito-muted); border-radius: var(--raio-campo); color: var(--granito-texto); cursor: pointer; }
.foto-aberta__seta:hover { background: rgba(255, 255, 255, .08); }
.foto-aberta :focus-visible, .foto-aberta__fechar:focus-visible { outline-color: var(--granito-texto); }
.foto-aberta__seta[disabled] { opacity: .35; cursor: default; }
.foto-aberta__palco { cursor: zoom-out; }

/* ---- telas centrais (senha e não encontrado) ---- */
.tela-central { min-height: 100dvh; }
.tela { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 390px; margin: 0 auto; padding: 120px 32px 48px; text-align: center; }
.tela h1 { font: 500 32px/1.15 var(--serif); }
.tela__texto { font-size: 17px; line-height: 1.5; color: var(--grafite-muted); }
.tela__nota { font-size: 14px; line-height: 1.45; color: var(--grafite-muted); max-width: 300px; margin-top: 6px; }
.tela__form { display: grid; gap: 14px; width: 100%; margin-top: 12px; text-align: left; }
.arco-cadeado { display: grid; place-items: center; width: 140px; height: 182px; border-radius: 70px 70px 0 0; background: var(--branco); border: 1px solid var(--linha); color: var(--musgo); margin-bottom: 12px; }
.tela > .botao { width: 100%; margin-top: 12px; }
.tela > .ramo { width: auto; }
body.tela-central .tela h1 + .tela__texto { margin-top: 0; }
@media (max-width: 380px) { .tela { padding-top: 72px; } }

@media (prefers-reduced-motion: reduce) {
  .topo__retrato, .folha[open] { animation: none !important; }
  html { scroll-behavior: auto; }
}
