/* Identidade BNTHR: ver marca/guia/index.html */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/Archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --tinta: #111111;
  --papel: #FFFFFF;
  --nevoa: #EEF0F2;
  --grafite: #5F6368;
  --linha: #D9DCE0;
  --marca-texto: #FFDD00;

  --fundo: var(--papel);
  --texto: var(--tinta);
  --margem: clamp(16px, 4vw, 56px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fundo: #111111;
    --texto: #F4F4F4;
    --nevoa: #1D1D1F;
    --grafite: #A6ABB2;
    --linha: #333336;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fundo: #111111;
  --texto: #F4F4F4;
  --nevoa: #1D1D1F;
  --grafite: #A6ABB2;
  --linha: #333336;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
}

::selection { background: var(--marca-texto); color: var(--tinta); }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--marca-texto); }
:focus-visible { outline: 3px solid var(--texto); outline-offset: 3px; }

.titulo {
  font-weight: 800;
  font-stretch: 75%;
  letter-spacing: -0.01em;
  line-height: 0.95;
  margin: 0;
}

/* o marca-texto: sempre fundo amarelo com tinta por cima */
.destaque {
  background: var(--marca-texto);
  color: var(--tinta);
  text-decoration: none;
  font-weight: 700;
  padding: 0.1em 0.35em;
}
.destaque:hover { background: var(--texto); color: var(--fundo); }

.pular {
  position: absolute; left: var(--margem); top: -4rem; z-index: 10;
  background: var(--marca-texto); color: var(--tinta); padding: 0.5rem 0.75rem; font-weight: 700;
}
.pular:focus { top: 0.75rem; }

/* ---------- topo ---------- */

.topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--margem);
}
.logo { display: block; line-height: 0; }
.logo svg { height: 26px; width: auto; display: block; }
.topo nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.25rem 1.5rem; font-weight: 500; }
.topo nav a { text-decoration: none; }
.topo nav a:hover { text-decoration: underline; text-decoration-color: var(--marca-texto); }

/* ---------- abertura: o B como gráfico ---------- */

.abre {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(2rem, 6vw, 5rem) var(--margem) clamp(3rem, 8vw, 7rem);
}

.b {
  --alt: clamp(260px, 38vw, 520px);
  --u: calc(var(--alt) / 200);
  display: grid;
  grid-template-columns: calc(40 * var(--u)) calc(108 * var(--u));
  grid-template-rows: calc(91 * var(--u)) calc(18 * var(--u)) calc(91 * var(--u));
  height: var(--alt);
}
.b .eixo { grid-row: 1 / -1; grid-column: 1; background: var(--texto); }
.b .barra {
  grid-column: 2;
  margin-left: -1px;
  display: flex;
  align-items: center;
  padding-left: calc(12 * var(--u));
  border-radius: 0 calc(46 * var(--u)) calc(46 * var(--u)) 0;
  background: var(--texto);
  color: var(--fundo);
  text-decoration: none;
  font-weight: 800;
  font-stretch: 75%;
  font-size: calc(21 * var(--u));
  line-height: 1;
}
.b .de-cima { grid-row: 1; width: calc(90 * var(--u) + 1px); }
.b .de-baixo { grid-row: 3; width: calc(108 * var(--u) + 1px); }
.b .barra:hover, .b .barra:focus-visible { background: var(--marca-texto); color: var(--tinta); }

/* o único movimento da página: as barras crescem a partir do eixo */
@media (prefers-reduced-motion: no-preference) {
  .b .barra { animation: crescer 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .b .de-baixo { animation-delay: 0.12s; }
  @keyframes crescer {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
  }
}

.fala h1 { font-size: clamp(3.25rem, 9vw, 8.5rem); margin-bottom: 0.3em; }
.fala p { margin: 0 0 1.25rem; max-width: 34em; font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); line-height: 1.45; }
.atalhos { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; font-weight: 600; }

/* ---------- projetos ---------- */

main { padding: 0 var(--margem); }

.grupo { margin-bottom: clamp(3.5rem, 8vw, 6rem); scroll-margin-top: 1.5rem; }

.grupo-topo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 0.75rem 2rem;
  align-items: end;
  margin-bottom: 1.5rem;
}
.grupo-topo h2, footer h2 { font-size: clamp(2.25rem, 5vw, 4rem); }
.grupo-topo p { margin: 0; color: var(--grafite); max-width: 56ch; }

table { width: 100%; border-collapse: collapse; border-top: 3px solid var(--texto); }
thead th {
  color: var(--grafite);
  font-weight: 500;
  font-size: 0.875rem;
  text-align: left;
  padding: 0.6rem 1rem 0.6rem 0;
  border-bottom: 1px solid var(--linha);
}
tbody th, tbody td {
  text-align: left;
  vertical-align: top;
  padding: 1.1rem 1.5rem 1.1rem 0;
  border-bottom: 1px solid var(--linha);
}
tbody th { font-weight: 700; width: 24%; }
tbody td:nth-child(2) { max-width: 68ch; }
tbody td:last-child { width: 22%; color: var(--grafite); font-size: 0.9375rem; padding-right: 0; }

/* ---------- contato ---------- */

footer {
  background: var(--nevoa);
  padding: clamp(3rem, 7vw, 5rem) var(--margem) var(--margem);
  scroll-margin-top: 0;
}
footer h2 { margin-bottom: 0.75rem; }
footer p { margin: 0 0 1rem; color: var(--grafite); }
.contatos { list-style: none; padding: 0; margin: 0 0 3rem; font-size: clamp(1.25rem, 2.6vw, 2rem); font-weight: 600; }
.contatos li + li { margin-top: 0.5rem; }
.fim { font-size: 0.875rem; margin: 0; }

/* ---------- telas pequenas ---------- */

@media (max-width: 760px) {
  .topo nav a:not([href="#contato"]) { display: none; }
  .abre { grid-template-columns: 1fr; }
  .b { --alt: clamp(200px, 56vw, 300px); }
  .grupo-topo { grid-template-columns: 1fr; }

  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody tr { border-bottom: 1px solid var(--linha); padding: 1rem 0; }
  tbody th, tbody td { padding: 0; border: 0; width: auto !important; }
  tbody th { font-size: 1.125rem; margin-bottom: 0.35rem; }
  tbody td:last-child { margin-top: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
