/* Afromania: página "em construção"
   Cores e tipos de letra provisórios: quando chegar a identidade visual,
   basta alterar as variáveis abaixo. */

/* Fontes alojadas no próprio site (licença SIL Open Font License, ver pasta fontes/) */
@font-face {
  font-family: "Big Shoulders Display";
  src: url("fontes/big-shoulders-display-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("fontes/literata-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("fontes/literata-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("fontes/literata-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --sol: #F2B33D;         /* fundo */
  --tinta: #2A1A12;        /* texto */
  --indigo: #283A73;
  --bordo: #7A2331;
  --petroleo: #1E5B53;
  --papel: #F7EBD3;

  --letra-lombada: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --letra-texto: "Literata", Georgia, serif;

  --margem: clamp(1.25rem, 5vw, 4rem);
}

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

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

body {
  margin: 0;
  background: var(--sol);
  color: var(--tinta);
  font-family: var(--letra-texto);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--tinta);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Estrutura */

.pagina {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--margem);
  max-width: 76rem;
  margin: 0 auto;
}

.topo { padding: 1.5rem 0 0; }

.marca {
  font-family: var(--letra-lombada);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.conteudo {
  flex: 1;
  display: grid;
  gap: 2.5rem;
  align-content: center;
  padding: 2.5rem 0 3rem;
}

/* A pilha de livros */

.pilha {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: normal;
}

.livro {
  position: relative;
  display: flex;
  align-items: center;
  height: clamp(4.25rem, 17vw, 7.5rem);
  padding: 0 1.5rem 0 2.25rem;
  border-radius: 3px 6px 6px 3px;
  color: var(--papel);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.16);
}

/* Faixas de tecido nas pontas da lombada */
.livro::before,
.livro::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: currentColor;
  opacity: 0.35;
}
.livro::before { left: 0.9rem; box-shadow: 6px 0 0 currentColor; }
.livro::after  { right: 0.9rem; }

.titulo {
  font-family: var(--letra-lombada);
  font-weight: 800;
  font-size: clamp(2.6rem, 12vw, 5.6rem);
  line-height: 1;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

/* Cada livro com a sua largura e posição: uma pilha real nunca é certinha */
.livro--indigo   { background: var(--indigo);   width: 88%;  margin-left: 4%; }
.livro--bordo    { background: var(--bordo);    width: 100%; }
.livro--petroleo { background: var(--petroleo); width: 94%;  margin-left: 2%; }

.livro--papel {
  background: var(--papel);
  color: var(--tinta);
  width: 80%;
  margin-left: 9%;
  box-shadow: inset 0 -4px 0 rgba(42, 26, 18, 0.12);
}

.livro--fino { height: clamp(2.25rem, 8vw, 3rem); }
.livro--fino .titulo {
  font-family: var(--letra-texto);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(0.95rem, 3.6vw, 1.15rem);
  letter-spacing: 0;
}

/* Texto */

.texto { max-width: 34rem; }

.entrada {
  margin: 0 0 2rem;
  font-size: clamp(1.15rem, 2.6vw, 1.35rem);
  line-height: 1.55;
}

.subtitulo {
  margin: 0 0 0.6rem;
  font-family: var(--letra-texto);
  font-size: 1.0625rem;
  font-weight: 600;
}

.novidades {
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.novidades li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.35rem;
}

/* Marcador em forma de fita de livro */
.novidades li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.45em;
  width: 0.55rem;
  height: 0.8rem;
  background: var(--bordo);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);
}

.contactos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.botao {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-family: var(--letra-texto);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.botao--principal {
  background: var(--tinta);
  color: var(--sol);
}
.botao--principal:hover { background: var(--indigo); }

.botao--secundario {
  border: 2px solid var(--tinta);
}
.botao--secundario:hover {
  background: var(--tinta);
  color: var(--sol);
}

.icone {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: currentColor;
}

.redes {
  margin: 0;
  font-size: 0.98rem;
}

.redes a {
  font-weight: 600;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.redes a:hover { color: var(--bordo); }

.rodape {
  padding: 1.25rem 0 1.75rem;
  font-size: 0.875rem;
}
.rodape p { margin: 0; }

/* Ecrãs pequenos: botões a toda a largura, mais fáceis de tocar */
@media (max-width: 30rem) {
  .contactos { flex-direction: column; }
  .botao { justify-content: center; }
  .livro { padding-left: 1.85rem; }
  .livro--papel { width: 90%; margin-left: 5%; }
}

/* Tablets na horizontal e computadores: pilha à esquerda, texto à direita */
@media (min-width: 60rem) {
  .conteudo {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(3rem, 6vw, 6rem);
    align-items: center;
  }

  .livro { height: clamp(5.5rem, 8.5vw, 7.75rem); }
  .titulo { font-size: clamp(3.6rem, 5.6vw, 5.8rem); }
  .livro--fino { height: 3rem; }

  /* O livro de cima ficou ligeiramente torto, como numa pilha a sério */
  .livro--indigo { transform: rotate(-1.6deg); transform-origin: left bottom; }
}

/* O único movimento da página: os livros a pousar na pilha */
@media (prefers-reduced-motion: no-preference) {
  .livro {
    animation: pousar 0.55s cubic-bezier(0.2, 0.9, 0.25, 1.05) both;
  }
  .livro--papel    { animation-delay: 0.05s; }
  .livro--petroleo { animation-delay: 0.2s; }
  .livro--bordo    { animation-delay: 0.35s; }
  .livro--indigo   { animation-delay: 0.5s; }
}

@keyframes pousar {
  from { opacity: 0; translate: 0 -2.5rem; }
  to   { opacity: 1; translate: 0 0; }
}
