/* ============================================================
   MARCA — marca/index.html
   Página de consulta, sem link em nenhum lugar do site: logotipo,
   cores, tipografia e arquivos para download. Mesmo registro
   editorial de privacidade.css — coluna centralizada, seções
   separadas por filete, fichas em lista de definição.
   Os blocos de download, cores e o diagrama são gerados por
   build/gerar-pagina-marca.mjs.
   ============================================================ */

.brand-section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.brand-section + .brand-section {
  border-top: 1px solid var(--border-glass);
}

.brand-doc {
  max-width: var(--measure-wide);
  margin: 0 auto;
}

.brand-doc h2 {
  margin-bottom: 1.25rem;
  color: var(--text-main);
  font-size: 1.75rem;
  letter-spacing: -0.01em;
}

.brand-doc h3 {
  margin: 2.75rem 0 0.75rem;
  color: var(--text-main);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.brand-doc p {
  max-width: var(--measure-prose);
  margin-bottom: 1.1rem;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.brand-doc a {
  color: var(--accent-indigo);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.brand-doc code {
  font-family: var(--font-code);
  font-size: 0.85rem;
}

/* Ícones de baixar e de copiar: máscaras CSS no traço dos ícones lucide do
   resto do site. Seguem a cor do texto e não pesam no HTML gerado. */
.brand-doc {
  --icone-baixar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E");
  --icone-copiar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='14' height='14' x='8' y='8' rx='2' ry='2'/%3E%3Cpath d='M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2'/%3E%3C/svg%3E");
  --icone-ok: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.brand-zip .btn-primary::before,
.brand-files a::before,
.brand-types a::before,
.brand-copy::after {
  content: "";
  flex: none;
  background-color: currentColor;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.brand-zip .btn-primary::before,
.brand-files a::before,
.brand-types a::before {
  -webkit-mask: var(--icone-baixar) center / contain no-repeat;
  mask: var(--icone-baixar) center / contain no-repeat;
}

.brand-copy::after {
  -webkit-mask: var(--icone-copiar) center / contain no-repeat;
  mask: var(--icone-copiar) center / contain no-repeat;
}

/* A seta desce um pouco ao passar o mouse. */
.brand-zip .btn-primary:hover::before,
.brand-files a:hover::before,
.brand-files a:focus-visible::before,
.brand-types a:hover::before {
  transform: translateY(1px);
}

/* ── Download do kit completo ───────────────────────────────── */
.brand-doc .brand-zip {
  margin: 1.75rem 0 2.25rem;
}

.brand-zip .btn-primary {
  color: #fff;
  text-decoration: none;
  gap: 0.7rem;
}

.brand-zip .btn-primary::before {
  width: 1.05rem;
  height: 1.05rem;
}

.brand-zip .btn-primary:hover {
  color: var(--text-main);
}

.brand-zip small {
  font-family: var(--font-code);
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.75;
}

/* ── Legenda dos formatos ───────────────────────────────────── */
.brand-formats {
  margin: 0 0 1rem;
  border-top: 1px solid var(--border-glass);
}

.brand-formats div,
.brand-dl div {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1.5rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--border-glass);
}

.brand-formats dt,
.brand-dl dt {
  color: var(--text-main);
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  line-height: 1.7;
  text-transform: uppercase;
}

/* Os nomes dos formatos levam "px" e "WebP": nada de caixa alta aqui. */
.brand-formats dt {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.brand-formats dd,
.brand-dl dd {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.97rem;
  line-height: 1.65;
}

.brand-dl {
  margin: 1.5rem 0 0;
  border-top: 1px solid var(--border-glass);
}

.brand-dl div {
  grid-template-columns: 11rem 1fr;
}

.brand-dl a {
  color: var(--accent-indigo);
}

/* ── Arquivos de cada formato de logotipo ───────────────────── */
.brand-doc .brand-layout-title {
  margin-top: 3.25rem;
  margin-bottom: 0.35rem;
  font-size: 1.35rem;
}

.brand-doc .brand-layout-use {
  margin-bottom: 1.1rem;
  font-size: 0.97rem;
}

.brand-assets,
.brand-files,
.brand-swatches,
.brand-types,
.brand-donts {
  margin: 0;
  padding: 0;
  list-style: none;
}

.brand-assets {
  display: grid;
  gap: 1rem;
}

.brand-asset {
  display: grid;
  grid-template-columns: minmax(220px, 270px) 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 0.9rem;
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  background: var(--surface-glass);
}

.brand-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  margin: 0;
  padding: 1.35rem;
  border: 1px solid rgb(14 14 14 / 0.07);
  border-radius: 12px;
}

.brand-assets.is-vertical .brand-preview,
.brand-assets.is-icone .brand-preview {
  height: 220px;
}

.brand-preview img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}

.brand-preview.is-claro {
  background: #ffffff;
}

.brand-preview.is-escuro {
  background: #08132c;
}

.brand-preview.is-colorido {
  background: linear-gradient(135deg, #9a17e8 0%, #4641db 100%);
}

.brand-preview.is-mono {
  background: #e8ebf3;
}

.brand-doc .brand-asset-name {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.brand-doc .brand-asset-use {
  max-width: 34rem;
  margin-bottom: 0;
  font-size: 0.93rem;
  line-height: 1.55;
}

.brand-files {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.brand-doc .brand-files a {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 0.55rem;
  padding: 0.45rem 0.8rem 0.45rem 0.65rem;
  border: 1px solid var(--border-glass-hover);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.brand-files a::before {
  grid-row: 1 / span 2;
  width: 0.9rem;
  height: 0.9rem;
  background-color: var(--accent-slate);
}

.brand-doc .brand-files a:hover {
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
}

.brand-doc .brand-files a:hover::before,
.brand-doc .brand-files a:focus-visible::before {
  background-color: var(--accent-indigo);
}

.brand-files small {
  grid-column: 2;
  color: var(--text-muted);
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 400;
}

/* ── Área de respiro ────────────────────────────────────────── */
.brand-diagram {
  margin: 1.5rem 0 0;
}

.brand-diagram svg {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  border-radius: 12px;
  background: #ffffff;
}

.brand-diagram-faixa {
  fill: rgb(var(--accent-indigo-rgb) / 0.06);
}

.brand-diagram-borda {
  fill: none;
  stroke: var(--accent-indigo);
  stroke-width: 3;
  stroke-dasharray: 16 12;
  opacity: 0.55;
}

.brand-diagram-logo {
  fill: none;
  stroke: var(--accent-indigo);
  stroke-width: 2;
  opacity: 0.35;
}

.brand-diagram-cota path {
  fill: none;
  stroke: var(--accent-indigo);
  stroke-width: 3;
}

.brand-diagram text {
  fill: var(--accent-indigo);
  font-family: var(--font-code);
  font-weight: 600;
}

.brand-diagram figcaption {
  margin-top: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-code);
  font-size: 0.78rem;
}

/* ── Tamanho mínimo ─────────────────────────────────────────── */
.brand-min {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 2.75rem;
  margin-top: 1.25rem;
  padding: 1.75rem;
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  background: #ffffff;
}

.brand-min figure {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
  margin: 0;
}

.brand-min img {
  display: block;
  height: auto;
}

.brand-min .is-w120 {
  width: 120px;
}

.brand-min .is-w80 {
  width: 80px;
}

.brand-min .is-w24 {
  width: 24px;
}

.brand-min figcaption {
  color: var(--text-muted);
  font-family: var(--font-code);
  font-size: 0.74rem;
}

/* ── Usos a evitar ──────────────────────────────────────────── */
.brand-donts {
  max-width: var(--measure-prose);
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.brand-donts li {
  position: relative;
  margin-bottom: 0.45rem;
  padding-left: 1.4rem;
}

.brand-donts li::before {
  content: "";
  position: absolute;
  top: 0.82em;
  left: 0;
  width: 0.7rem;
  height: 1px;
  background: var(--accent-slate);
}

/* ── Cores ──────────────────────────────────────────────────── */
.brand-gradient {
  height: 14px;
  margin: 0.5rem 0 1.25rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #9a17e8 0%, #4641db 38%, #2e9ef4 70%, #0bd9fd 100%);
}

.brand-swatches {
  display: grid;
  gap: 1rem;
}

.brand-swatches.is-cinco {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.brand-swatches.is-quatro {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.brand-swatch {
  overflow: hidden;
  border: 1px solid var(--border-glass-hover);
  border-radius: 14px;
  background: #ffffff;
}

.brand-chip {
  display: block;
  height: 72px;
  background: var(--c);
  border-bottom: 1px solid rgb(14 14 14 / 0.06);
}

.brand-swatch-body {
  padding: 0.8rem 0.95rem 0.95rem;
}

.brand-doc .brand-swatch-name {
  margin: 0;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.brand-doc .brand-swatch-use {
  margin: 0.1rem 0 0.6rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

.brand-doc .brand-swatch-use.is-code {
  font-family: var(--font-code);
  font-size: 0.74rem;
}

.brand-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.18rem 0.5rem 0.18rem 0.55rem;
  border: 1px solid var(--border-glass-hover);
  border-radius: 6px;
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  font-family: var(--font-code);
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.brand-copy::after {
  width: 0.78rem;
  height: 0.78rem;
  background-color: var(--accent-slate);
}

.brand-copy:hover {
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
}

.brand-copy:hover::after {
  background-color: var(--accent-indigo);
}

.brand-copy.is-copiado {
  border-color: var(--accent-teal);
  color: var(--accent-teal-text);
}

.brand-copy.is-copiado::after {
  background-color: var(--accent-teal-text);
  -webkit-mask-image: var(--icone-ok);
  mask-image: var(--icone-ok);
}

.brand-rgb {
  display: block;
  margin-top: 0.4rem;
  color: var(--text-muted);
  font-family: var(--font-code);
  font-size: 0.74rem;
}

/* ── Tipografia ─────────────────────────────────────────────── */
.brand-types {
  margin-top: 1.25rem;
  border-top: 1px solid var(--border-glass);
}

.brand-type {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-glass);
}

.brand-type:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.brand-doc .brand-type-specimen {
  max-width: none;
  margin: 0;
  color: var(--text-main);
  font-size: 5.25rem;
  line-height: 0.95;
}

.brand-doc .brand-type-name {
  margin: 0 0 0.2rem;
  font-size: 1.4rem;
}

.brand-doc .brand-type-role {
  margin-bottom: 1.1rem;
  font-size: 0.97rem;
}

.brand-doc .brand-type-alphabet {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.brand-doc .brand-type-css {
  margin-bottom: 0.6rem;
}

.brand-types a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.brand-types a::before {
  width: 0.9rem;
  height: 0.9rem;
}

.is-display {
  font-family: var(--font-display);
  font-weight: 700;
}

.is-ui {
  font-family: var(--font-ui);
}

.is-code {
  font-family: var(--font-code);
}

/* ── Telas estreitas ────────────────────────────────────────── */
@media (max-width: 860px) {
  .brand-asset {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .brand-swatches.is-cinco {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .brand-swatches.is-quatro {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .brand-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .brand-formats div,
  .brand-dl div,
  .brand-type {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .brand-type {
    gap: 1rem;
  }

  .brand-doc .brand-type-specimen {
    font-size: 4rem;
  }

  .brand-swatches.is-cinco,
  .brand-swatches.is-quatro {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-min {
    gap: 2rem;
    padding: 1.25rem;
  }

  /* Botões de arquivo mais compactos: cabem três na primeira linha. */
  .brand-files {
    gap: 0.4rem;
  }

  .brand-doc .brand-files a {
    column-gap: 0.45rem;
    padding: 0.4rem 0.65rem 0.4rem 0.55rem;
  }
}
