/* ==========================================================================
   Base — tokens, reset e logo partilhados por todas as páginas
   ========================================================================== */

:root {
  --color-bg: #000;
  --color-text: #f8edd1;          /* creme — cor de todo o texto e do logo */
  --color-muted: rgba(248, 237, 209, 0.32);

  /* testadas: "Noto Sans" (11px), "Noto Serif" (12px) */
  --font-main: "Cormorant Garamond", "Garamond", "Times New Roman", serif;
  --fw: 300;                      /* light */
  --fs-base: 13px;               /* tamanho único do site */
  --lh: 1.35;
  --lh-list: 1.5;                 /* linhas de projeto (home e página de projeto) */

  --gutter: 24px;
  --site-edge: 100px;            /* distância do logo/copyright à borda (desktop e mobile) */
  --site-margin: var(--site-edge); /* margem global lateral */

  --list-w: 290px;               /* largura da coluna de conteúdo (lista de projetos, About) */
  --project-top: 100px;          /* topo da linha título · cliente na página de projeto */
  --about-top: 100px;            /* topo do logo e do conteúdo na About */

  --logo-w: 100px;
  --logo-h: calc(var(--logo-w) * 887 / 1322);   /* proporção do ficheiro do logo */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html, body { margin: 0; padding: 0; }

/* reserva sempre o espaço da scrollbar: posições iguais em páginas com e sem scroll
   (necessário para a transição home → projeto encaixar ao pixel) */
html { scrollbar-gutter: stable; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: var(--fs-base);
  font-weight: var(--fw);
  line-height: var(--lh);
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }

::selection { background: var(--color-text); color: var(--color-bg); }

:focus-visible { outline: 1px solid var(--color-text); outline-offset: 3px; }

/* ---------- Logo (componente <site-logo>) ---------- */

site-logo, .site-logo { display: block; }
.site-logo__img {
  width: var(--logo-w);
  height: auto;
  filter: url(#tint-text);   /* pinta a assinatura com a cor do texto */
}
.tint-text__flood { flood-color: var(--color-text); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Texto revelado linha a linha (js/text-reveal.js) ----------
   Cada linha sobe e aparece em fade, uma a seguir à outra.
   No contentor: --text-delay (início) e --text-step (intervalo entre linhas). */

@keyframes line-in {
  from { opacity: 0; transform: translateY(0.8em); }
  to   { opacity: 1; transform: none; }
}
.reveal-text:not(.is-split) { visibility: hidden; }   /* até as linhas estarem medidas */
.reveal-line {
  display: block;
  animation: line-in 1.8s var(--ease) both;
  animation-delay: calc(var(--text-delay, 0s) + var(--k, 0) * var(--text-step, 0.3s));
}
.reveal-text.is-static .reveal-line { animation: none; }   /* recalculado após resize */

@media (prefers-reduced-motion: reduce) {
  .reveal-line { animation: none; }
}

@media (max-width: 767px) {
  :root { --gutter: 16px; --site-margin: 24px; }
}
