/*
  florê · casca do app (cartão A1)
  Layout da tela inicial e das páginas de aviso (não encontrado, erro).
  Nenhuma cor nem fonte escrita aqui: tudo lê css/tokens.css.
*/

.casca {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 1120px;
  margin: 0 auto;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.casca-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--esp-3);
  min-height: var(--toque);
  padding: var(--esp-3) var(--esp-4) 0;
}

.casca-corpo {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  padding: var(--esp-6) var(--esp-4);
}

.casca-abertura {
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  gap: var(--esp-8);
}

.casca-texto { display: flex; flex-direction: column; gap: var(--esp-4); }
.casca-titulo {
  font-size: var(--fs-titulo);
  line-height: var(--lh-titulo);
  font-weight: var(--peso-titulo);
  color: var(--texto);
}
.casca-sub { font-size: var(--fs-corpo-g); line-height: var(--lh-corpo-g); color: var(--texto-2); }
.casca-aviso { margin-top: var(--esp-2); }
.casca-aviso .icone { flex: none; }
.casca-texto .botao { margin-top: var(--esp-2); }

.casca-flor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--esp-4);
}
.casca-flor figcaption {
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  color: var(--texto-2);
  text-align: center;
}
.flor--abertura { width: clamp(168px, 52vw, 260px); height: clamp(168px, 52vw, 260px); }
.flor--abertura .petala.feita { animation: casca-petala var(--dur-petala) var(--ease-out) both; }
.flor--abertura .petala:nth-child(1) { animation-delay: 200ms; }
.flor--abertura .petala:nth-child(2) { animation-delay: 320ms; }
.flor--abertura .petala:nth-child(3) { animation-delay: 440ms; }
.flor--abertura .petala:nth-child(4) { animation-delay: 560ms; }
.flor--abertura .petala:nth-child(5) { animation-delay: 680ms; }
@keyframes casca-petala { from { fill: var(--petala-vazia); } to { fill: var(--petala); } }

.casca-rodape {
  display: flex;
  flex-direction: column;
  gap: var(--esp-1);
  padding: var(--esp-4) var(--esp-4) var(--esp-6);
  border-top: 1px solid var(--borda);
  margin: 0 var(--esp-4);
  padding-left: 0;
  padding-right: 0;
}
.casca-rodape nav { display: flex; flex-wrap: wrap; gap: var(--esp-1) var(--esp-4); }
.casca-rodape a {
  display: inline-flex;
  align-items: center;
  min-height: var(--toque-pro);
  color: var(--texto);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  font-weight: var(--peso-medio);
  text-underline-offset: 3px;
}
.casca-rodape .meta[data-estado="erro"] { color: var(--erro); }

@media (min-width: 880px) {
  .casca-topo { padding: var(--esp-6) var(--esp-8) 0; }
  .casca-corpo { padding: var(--esp-10) var(--esp-8); }
  .casca-abertura {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--esp-16);
  }
  .casca-texto { flex: 1 1 0; max-width: 520px; gap: var(--esp-5); }
  .casca-titulo { font-size: var(--fs-numero); line-height: var(--lh-numero); }
  .casca-sub { max-width: 480px; }
  .casca-flor { flex: 0 0 auto; }
  .flor--abertura { width: 300px; height: 300px; }
  .casca-rodape { margin: 0 var(--esp-8); }
}

@media (prefers-reduced-motion: reduce) {
  .flor--abertura .petala.feita { animation: none; }
}
