/* ==========================================================
   Memórias do Futuro — registo escuro (base partilhada)
   Usado por sanatorio_montalto/, artefacto-02/ e artefacto-03/.
   Regista cinematográfico: ruína (carvão/sombra) a caminhar para
   crescimento (verde) — ver diário de bordo para motivação completa.
   ========================================================== */

:root {
  --cor-fundo: #0b0b09;
  --cor-fundo-elevado: #16150f;
  --cor-texto: #f2ede2;
  --cor-esbatida: #a49c8b;
  --cor-acento: #c23b32;
  --cor-acento-forte: #e35b45;
  --cor-verde: #6f9c78;
  --cor-verde-forte: #a8d4ac;
  --cor-linha: rgba(242, 237, 226, 0.14);
  --largura-max: 1180px;
  --sombra: 0 30px 80px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cor-fundo);
  color: var(--cor-texto);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color 220ms ease, opacity 220ms ease, transform 220ms ease; }
a:focus-visible, button:focus-visible { outline: 3px solid rgba(226, 91, 69, 0.55); outline-offset: 3px; }
button { font: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: 1rem; z-index: 999;
  background: var(--cor-texto); color: var(--cor-fundo); padding: 0.75rem 1rem;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; margin: 0; color: var(--cor-texto); font-weight: 400; }
h1 { font-size: clamp(2.4rem, 6.4vw, 4.6rem); line-height: 1; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.06; letter-spacing: -0.02em; }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.4rem); line-height: 1.2; }
p { margin: 0; font-size: clamp(0.98rem, 1.3vw, 1.08rem); line-height: 1.75; color: var(--cor-esbatida); }

.eyebrow { color: var(--cor-acento-forte); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }

.cabecalho {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(11, 11, 9, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--cor-linha);
}
.cabecalho__marca {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font-family: Georgia, serif; font-size: clamp(1.05rem, 2vw, 1.3rem); letter-spacing: -0.01em;
}
.cabecalho__marca strong { color: var(--cor-acento-forte); font-weight: 600; }
.cabecalho__texto { display: inline-flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.cabecalho__panda {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center;
  background: rgba(242,237,226,0.06); border: 1px solid var(--cor-linha); border-radius: 50%;
}
.cabecalho__panda svg { width: 24px; height: 24px; }
.cabecalho__voltar {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--cor-esbatida); border: 1px solid var(--cor-linha); padding: 0.55rem 0.9rem;
}
.cabecalho__voltar:hover { color: var(--cor-texto); border-color: var(--cor-esbatida); }

.envolvente { width: min(var(--largura-max), calc(100% - 2rem)); margin: 0 auto; }

.button-row { display: flex; flex-wrap: wrap; gap: 0.8rem; padding-top: 0.4rem; justify-content: center; }

.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 46px;
  padding: 0.8rem 1.15rem; border: 1px solid var(--cor-acento); background: var(--cor-acento);
  color: #fff; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.botao:hover { background: var(--cor-acento-forte); border-color: var(--cor-acento-forte); }
.botao--contorno { background: transparent; color: var(--cor-texto); border-color: var(--cor-linha); }
.botao--contorno:hover { border-color: var(--cor-esbatida); }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

.rodape {
  border-top: 1px solid var(--cor-linha);
  padding: 2.2rem 0 3rem;
  display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between;
  color: var(--cor-esbatida); font-size: 0.88rem;
}
.rodape a { color: var(--cor-acento-forte); }
.rodape__contador { flex-basis: 100%; opacity: 0.7; }
.rodape__contador strong { color: var(--cor-acento-forte); font-variant-numeric: tabular-nums; }

/* Placeholder "Em breve" (artefacto-02/03) */
.em-breve {
  min-height: calc(100dvh - 66px);
  display: grid; place-items: center; text-align: center;
  padding: 3rem 1.25rem;
}
.em-breve__caixa { display: grid; gap: 1.1rem; justify-items: center; max-width: 560px; }
.em-breve__panda { width: 64px; height: 64px; margin-bottom: -0.4rem; }
.em-breve__numero { font-family: Georgia, serif; font-size: clamp(4rem, 12vw, 7rem); color: rgba(242,237,226,0.1); line-height: 1; }

@media (max-width: 640px) {
  .cabecalho__texto span:not(strong) { display: none; }
}
