/* Marca da Nora — tokens, tipografia, grão de papel e o ponto vivo (2026-11-28-marca-nora.md). */

@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("./fontes/hanken-grotesk-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("./fontes/schibsted-grotesk-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fontes/instrument-serif-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("./fontes/instrument-serif-latin-400-italic.woff2") format("woff2");
}

:root {
  --fundo: #F1EFE6;
  --superficie: #FBFAF4;
  --superficie-2: #E2DFD2;
  --texto: #26302B;
  --texto-2: #66706A;
  --linha: #D3D6C8;
  --acao: #2B7F39;
  --acao-texto: #FFFFFF;
  --sol: #E0A21B;
  --sol-texto: #26302B;
  --erro: #9B3228;
  --sombra: rgba(38, 48, 43, 0.09);
  /* Serifa fica apenas no logo «Nora»; títulos usam sans forte (mudança de 28/11). */
  --fonte-marca: "Instrument Serif", Georgia, "Palatino Linotype", serif;
  --fonte-titulo: "Schibsted Grotesk", "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --fonte-corpo: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --raio: 16px;
  --raio-p: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fundo: #0C2620;
    --superficie: #0F2D25;
    --superficie-2: #123229;
    --texto: #EEF3EA;
    --texto-2: #9FB8AD;
    --linha: #1D4337;
    --acao: #7FD68B;
    --acao-texto: #0C2620;
    --sol: #F2B93B;
    --sol-texto: #0C2620;
    --erro: #F08A7E;
    --sombra: rgba(0, 0, 0, 0.32);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --fundo: #0C2620;
  --superficie: #0F2D25;
  --superficie-2: #123229;
  --texto: #EEF3EA;
  --texto-2: #9FB8AD;
  --linha: #1D4337;
  --acao: #7FD68B;
  --acao-texto: #0C2620;
  --sol: #F2B93B;
  --sol-texto: #0C2620;
  --erro: #F08A7E;
  --sombra: rgba(0, 0, 0, 0.32);
  color-scheme: dark;
}

/* Grão leve de papel (SVG de ruído a ~5% de opacidade) sobre toda a tela, sem interceptar cliques. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* Logo «Nora» em serifa com o ponto vivo (--sol, ~0,2 em). Respira em 4 s; pensando: 2 s, só brilho. */
.marca-nora {
  display: inline-flex;
  align-items: baseline;
  gap: 0.14em;
  font-family: var(--fonte-marca);
  font-weight: 400;
  color: var(--texto);
  letter-spacing: -0.01em;
}

.ponto-nora {
  display: inline-block;
  width: 0.22em;
  height: 0.22em;
  min-width: 7px;
  min-height: 7px;
  border-radius: 50%;
  background: var(--sol);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--sol) 45%, transparent);
  transform-origin: center;
  animation: nora-respirar 4s ease-in-out infinite;
  vertical-align: baseline;
}

.ponto-nora[data-estado="pensando"] {
  animation: nora-pensar 2s ease-in-out infinite;
}

@keyframes nora-respirar {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--sol) 20%, transparent);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 10px 2px color-mix(in srgb, var(--sol) 42%, transparent);
  }
}

@keyframes nora-pensar {
  0%, 100% {
    opacity: 0.72;
    box-shadow: 0 0 4px 1px color-mix(in srgb, var(--sol) 30%, transparent);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 14px 4px color-mix(in srgb, var(--sol) 65%, transparent);
  }
}

/* Desenhos de linha contínua da marca: traço 1,6 px redondo, sem preenchimento nem sombra. */
.desenho-marca {
  display: block;
  fill: none;
  stroke: var(--texto-2);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.desenho-marca .traco-agua {
  stroke: var(--acao);
}

.desenho-marca .traco-sol {
  stroke: var(--sol);
}

.num-alinhado {
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .ponto-nora,
  .ponto-nora[data-estado="pensando"] {
    animation: none;
  }
}
