@font-face {
  font-family: "Newsreader Texto";
  src: url("fontes/newsreader-texto.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader Texto";
  src: url("fontes/newsreader-italico.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader Titulo";
  src: url("fontes/newsreader-titulo.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("fontes/pixelify-sans.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}

:root {
  --preto: #000000;
  --tinta: #dcd7ea;
  --nevoa: #8f8aa8;
  --sombra: #4b4762;
  --janela: #eea057;

  --serif: "Newsreader Texto", Georgia, "Times New Roman", serif;
  --titulo: "Newsreader Titulo", Georgia, "Times New Roman", serif;
  --pixel: "Pixelify Sans", ui-monospace, monospace;

  --margem: clamp(1.5rem, 8vw, 7rem);
}

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

html { background: var(--preto); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--preto);
  color: var(--tinta);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

#paisagem {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}

#rabisco {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
  cursor: crosshair;
}

.veu {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.88) 0,
    rgba(0, 0, 0, 0.8) calc(var(--margem) + 22rem),
    rgba(0, 0, 0, 0.3) calc(var(--margem) + 34rem),
    rgba(0, 0, 0, 0) calc(var(--margem) + 46rem)
  );
  transition: opacity 1.2s ease;
}

main {
  position: relative;
  z-index: 3;
  pointer-events: none;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem var(--margem) 5rem;
  text-shadow: 0 0 1px #000, 0 0 14px rgba(0, 0, 0, 0.9);
  transition: opacity 1.2s ease;
}

h1 {
  margin: 0;
  font-family: var(--titulo);
  font-size: clamp(2.4rem, 5.2vw, 3.6rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.bio {
  margin: 1rem 0 0;
  max-width: 30em;
  color: var(--tinta);
}

h2 {
  margin: 2.2rem 0 0.6rem;
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  color: var(--nevoa);
}

ul { list-style: none; margin: 0; padding: 0; }

.agora { max-width: 32em; }
.agora li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--nevoa);
}
.agora li + li { margin-top: 0.25rem; }

.agora li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 4px;
  height: 4px;
  background: var(--sombra);
}

.fora {
  margin: 1.4rem 0 0;
  max-width: 32em;
  font-style: italic;
  color: var(--nevoa);
}

.tchau {
  margin: 2rem 0 0;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--nevoa);
}

.links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 1.75rem;
  margin-top: 1.8rem;
  font-size: 1rem;
}

a {
  color: var(--tinta);
  text-decoration: underline;
  text-decoration-color: var(--sombra);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.2s, text-decoration-color 0.2s;
}
a:hover { color: var(--janela); text-decoration-color: currentColor; }
main a, main button { pointer-events: auto; }

.links .email { display: inline-flex; align-items: baseline; gap: 0.5rem; }

.links a, .copiar { display: inline-block; padding: 0.2rem 0; min-height: 24px; }
.copiar {
  position: relative;
  font: inherit;
  font-size: 0.85em;
  font-style: italic;
  color: var(--nevoa);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline dotted;
  text-decoration-color: var(--sombra);
  text-underline-offset: 0.22em;
}
.copiar:hover { color: var(--janela); }

.copiar::after {
  content: attr(data-aviso);
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, 2px);
  white-space: nowrap;
  font-size: 0.9em;
  color: var(--janela);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.copiar[data-aviso]::after { opacity: 1; transform: translate(-50%, -3px); }
.privacidade {
  margin: 0.9rem 0 0;
  font-size: 0.8rem;
  color: var(--nevoa);
}

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

:focus-visible {
  outline: 2px solid var(--janela);
  outline-offset: 3px;
  border-radius: 1px;
}

.status {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(0.9rem, 2.5vw, 1.6rem);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--pixel);
  font-size: 0.8rem;
  line-height: 1;
  color: var(--nevoa);
  text-shadow: 0 0 6px #000;
}

.trilho {
  display: inline-block;
  width: 64px;
  height: 4px;
  background: #1c1a2a;
}
.trilho[hidden] { display: none; }
.trilho i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--nevoa);
}

.acoes { display: inline-flex; gap: 0.75rem; }

.status button {
  font: inherit;
  color: var(--tinta);
  background: none;
  border: 0;
  padding: 0.5rem 0;
  min-height: 24px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--sombra);
  text-underline-offset: 0.3em;
}
.status button:hover { color: var(--janela); }
.status button[hidden] { display: none; }

.ferramentas {
  position: fixed;
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  max-width: 12rem;
  font-family: var(--pixel);
  font-size: 0.8rem;
  line-height: 1;
  color: var(--nevoa);
  text-shadow: 0 0 6px #000;
}
.ferramentas button {
  font: inherit;
  color: var(--nevoa);
  background: none;
  border: 0;
  padding: 0.4rem 0;
  min-height: 24px;
  cursor: pointer;
}
.ferramentas button:hover { color: var(--tinta); }
.ferramentas button:disabled { cursor: default; color: var(--sombra); }

.dica {
  margin: 0;
  max-width: 11rem;
  text-align: right;
  line-height: 1.35;
  color: var(--tinta);
  transition: opacity 0.8s ease;
}
.dica.some { opacity: 0; }

.ferramentas .grupo {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}
.ferramentas .grupo button[aria-pressed="true"] { color: var(--janela); }
.ferramentas .grupo button[aria-pressed="true"]::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 0.45rem;
  vertical-align: 0.1em;
  background: currentColor;
}

.cores {
  display: grid;
  grid-template-columns: repeat(4, 18px);
  gap: 8px;
}
.ferramentas .cor {
  position: relative;
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  background: var(--c);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
  cursor: pointer;
}
.ferramentas .cor[aria-pressed="true"],
.cor-livre.ativa { outline: 2px solid var(--tinta); outline-offset: 2px; }
.ferramentas .cor-livre {
  overflow: hidden;
  background: conic-gradient(#e0484f, #f2d16b, #59c07a, #5fd3e0, #4f7cff, #e070b0, #e0484f);
}
.ferramentas .cor-livre.ativa { background: var(--c); }
.cor-livre input {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  opacity: 0;
  cursor: pointer;
}

.tamanhos { display: flex; align-items: center; gap: 0.35rem; }
.tamanhos button { min-width: 24px; text-align: center; }
.tamanhos button[aria-pressed="true"] { color: var(--janela); text-decoration: underline; text-underline-offset: 0.3em; }
.sem-tamanho .tamanhos > span { color: var(--sombra); }

.recolher { text-decoration: underline; text-decoration-color: var(--sombra); text-underline-offset: 0.3em; }
.recolhido > :not(.recolher):not(.dica) { display: none; }

.contemplando main,
.contemplando .veu { opacity: 0; }
.contemplando main { pointer-events: none; }

@media (max-width: 760px) {
  .veu {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.78) 0,
      rgba(0, 0, 0, 0.7) 50%,
      rgba(0, 0, 0, 0.15) 68%,
      rgba(0, 0, 0, 0) 80%
    );
  }
  main { justify-content: flex-start; padding-top: max(11vh, 6rem); padding-bottom: 5.5rem; }
  .ferramentas.recolhido .dica { max-width: 16rem; }
  body { font-size: 1rem; }
  h2 { margin-top: 1.6rem; }
  .fora { margin-top: 1.1rem; }
  .links { margin-top: 1.3rem; gap: 0.6rem 1.2rem; }
  .tchau { margin-top: 1.4rem; }

  main h1, main h2, main p, main li { pointer-events: auto; }
  .ferramentas { gap: 0.7rem; }
  .ferramentas:not(.recolhido) {
    left: var(--margem);
    padding: 0.9rem 1rem;
    background: rgba(0, 0, 0, 0.9);
    align-items: flex-start;
    max-width: none;
  }
  .ferramentas:not(.recolhido) .grupo { flex-direction: row; flex-wrap: wrap; gap: 0.2rem 1rem; align-items: flex-start; }
  .ferramentas:not(.recolhido) .cores { grid-template-columns: repeat(7, 26px); gap: 8px; }
  .ferramentas:not(.recolhido) .cor { width: 26px; height: 26px; }
  .ferramentas:not(.recolhido) .dica { text-align: left; max-width: none; }
  .status {
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2.2rem var(--margem) 1rem;
    justify-content: space-between;
    flex-wrap: wrap;
    background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.85) 55%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .veu, main, a { transition: none; }
}
