/* www.facchini.eti.br: light and dark, one column on phones. */
:root {
  --fundo: #f6f7fb;
  --superficie: #ffffff;
  --texto: #1d2129;
  --secundario: #5b6372;
  --borda: #e2e5ec;
  --destaque: #0d6efd;
  --destaque-texto: #ffffff;
  --sombra: 0 1px 2px rgb(16 24 40 / 6%), 0 8px 24px rgb(16 24 40 / 6%);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fundo: #0f1218;
    --superficie: #171b23;
    --texto: #e6e9ef;
    --secundario: #9aa3b2;
    --borda: #2a303c;
    --destaque: #6ea8fe;
    --destaque-texto: #0f1218;
    --sombra: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
a { color: var(--destaque); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
h2 { font-size: 1.5rem; margin-top: 2.5rem; }
.largura { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
.secundario { color: var(--secundario); }

.topo { background: var(--superficie); border-bottom: 1px solid var(--borda); }
.topo-conteudo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; min-height: 4rem; padding-block: .35rem; }
.marca { display: inline-flex; align-items: center; gap: .65rem; color: var(--texto); text-decoration: none; }
.marca-logo { display: block; transition: transform .35s; }
.marca:hover .marca-logo { transform: scale(1.08); }
.marca-texto { display: flex; flex-direction: column; line-height: 1.15; }
.marca-nome { font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; }
.marca-lema { font-size: .78rem; color: var(--secundario); }
.menu { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; }
.menu a { color: var(--secundario); text-decoration: none; padding: .3rem .55rem; border-radius: 8px; transition: background .15s, color .15s; }
.menu a:hover { color: var(--texto); background: var(--fundo); }
.menu .idiomas a { padding: 2px; }

.abertura { padding: 3.5rem 0 1rem; }
.chamada { font-size: 1.2rem; color: var(--secundario); max-width: 42rem; }
.voltar { display: inline-block; margin-bottom: 1.25rem; text-decoration: none; }
.sistema-titulo { display: flex; align-items: center; gap: 1rem; }
.sistema-titulo h1 { margin: 0; }
.sistema-titulo p { margin: .25rem 0 0; }

.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 1.25rem; }
.cartao {
  display: flex; flex-direction: column; gap: .75rem;
  background: var(--superficie); border: 1px solid var(--borda); border-radius: 14px;
  padding: 1.25rem; color: var(--texto); text-decoration: none; box-shadow: var(--sombra);
  transition: transform .15s ease, border-color .15s ease;
}
.cartao:hover { transform: translateY(-2px); border-color: var(--destaque); }
.cartao-topo { display: flex; align-items: center; gap: .75rem; }
.cartao h3 { margin: 0; font-size: 1.3rem; }
.cartao p { margin: 0; color: var(--secundario); }
.cartao-tela { border-radius: 8px; border: 1px solid var(--borda); aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.saiba-mais { color: var(--destaque); font-weight: 600; margin-top: auto; }
.selo { font-size: .8rem; color: var(--secundario); }

.etiquetas { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; }
.etiquetas li { font-size: .8rem; border: 1px solid var(--borda); border-radius: 999px; padding: .1rem .6rem; color: var(--secundario); }

.acoes { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.botao {
  display: inline-block; padding: .55rem 1rem; border-radius: 10px; text-decoration: none;
  border: 1px solid var(--borda); background: var(--superficie); color: var(--texto); font-weight: 500;
}
.botao:hover { border-color: var(--destaque); }
.botao.principal { background: var(--destaque); border-color: var(--destaque); color: var(--destaque-texto); }
.botao.inativo { color: var(--secundario); border-style: dashed; }

.telas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 1.25rem; }
.telas figure { margin: 0; }
.telas img { border-radius: 10px; border: 1px solid var(--borda); box-shadow: var(--sombra); }
.telas figcaption { font-size: .9rem; color: var(--secundario); margin-top: .4rem; }
.tela-destaque { grid-column: 1 / -1; }
.tela-destaque img { max-height: 40rem; object-fit: cover; object-position: top; width: 100%; }

.colunas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 0 3rem; }
.recursos { padding-left: 1.2rem; }
.recursos li { margin-bottom: .4rem; }

.apoio { margin-top: 3.5rem; padding: 2.5rem 0; background: var(--superficie); border-top: 1px solid var(--borda); }
.apoio h2 { margin-top: 0; }
.apoio-opcoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.apoio-opcao {
  display: flex; flex-direction: column; gap: .2rem;
  border: 1px solid var(--borda); border-radius: 12px; padding: 1rem; color: var(--texto); text-decoration: none;
}
a.apoio-opcao:hover { border-color: var(--destaque); }
.chave { font-size: .95rem; word-break: break-all; }


/* The QR code stays black on white in both themes, so bank apps read it. */
.pix-qr { background: #fff; border-radius: 8px; padding: .5rem; width: 12rem; }
.pix-qr svg { display: block; width: 100%; height: auto; }
.codigo-pix { font-size: .75rem; user-select: all; }

/* Screenshot viewer (js/galeria.js). Dark in both themes, like a photo viewer. */
.telas a { cursor: zoom-in; display: block; }
.galeria { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  background: rgb(10 12 16 / 97%); color: #e6e9ef; display: none; align-items: center; justify-content: center; }
.galeria[open] { display: flex; }
.galeria::backdrop { background: transparent; }
.galeria figure { margin: 0; max-width: min(92vw, 1600px); display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.galeria img { max-width: 100%; max-height: calc(100dvh - 6rem); border-radius: 8px; cursor: pointer; user-select: none; }
.galeria figcaption { display: flex; gap: 1rem; font-size: .95rem; }
.galeria-posicao { color: #9aa3b2; }
.galeria button { position: absolute; background: rgb(255 255 255 / 10%); color: inherit; border: 0; border-radius: 999px;
  width: 3rem; height: 3rem; font-size: 2rem; line-height: 1; cursor: pointer; }
.galeria button:hover, .galeria button:focus-visible { background: rgb(255 255 255 / 22%); }
.galeria-fechar { top: 1rem; right: 1rem; }
.galeria-anterior { left: 1rem; top: 50%; transform: translateY(-50%); }
.galeria-proxima { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .galeria-seta { top: auto; bottom: 1rem; transform: none; }
}

/* Language flags in the header; the current language stands out. */
.idiomas { display: inline-flex; gap: .35rem; align-items: center; }
.idiomas a { display: inline-flex; padding: 2px; border-radius: 4px; opacity: .55; border: 1px solid transparent; }
.idiomas a:hover, .idiomas a[aria-current] { opacity: 1; }
.idiomas a[aria-current] { border-color: var(--borda); }
.idiomas img { display: block; border-radius: 2px; }
/* Brand icons (GitHub, Ko-fi, Pix) next to their names. */
.com-icone { display: inline-flex; align-items: center; gap: .45rem; }
.marca-icone { width: 1.15em; height: 1.15em; flex: none; }

/* GitHub Sponsors and Ko-fi cards: a large logo and a call to action. */
.apoio-logo { display: flex; justify-content: center; padding: 1.25rem 0 .5rem; }
.apoio-logo .marca-icone { width: 5.5rem; height: 5.5rem; }
.apoio-opcao .botao { margin-top: auto; align-self: flex-start; }

/* Access roles: one card per role, with its home screen and what it can and cannot do. */
.perfis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.perfil { background: var(--superficie); border: 1px solid var(--borda); border-radius: 12px; padding: 1rem; box-shadow: var(--sombra); }
.perfil-tela img { border-radius: 8px; border: 1px solid var(--borda); aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; width: 100%; }
.perfil h3 { margin: .75rem 0 .25rem; }
.perfil h4 { margin: .9rem 0 .3rem; font-size: .9rem; text-transform: uppercase; letter-spacing: .03em; color: var(--secundario); }
.perfil ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .3rem; }
.perfil li { padding-left: 1.4rem; position: relative; }
.lista-pode li::before { content: "✓"; position: absolute; left: 0; color: #198754; font-weight: 700; }
.lista-nao-pode li::before { content: "✗"; position: absolute; left: 0; color: #dc3545; font-weight: 700; }
.perfis-nota { margin-top: 1rem; }

/* The top bar stays visible while scrolling; anchored sections stop below it. */
.topo { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--superficie) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
/* A thin brand-colored line on top of the bar. */
.topo::before { content: ""; display: block; height: 3px; background: linear-gradient(90deg, #0d6efd, #6f42c1, #d63384); }
[id] { scroll-margin-top: 5rem; }
.perfil-tela { cursor: zoom-in; display: block; }

/* Copy buttons in the Pix card. */
.botao.copiar { align-self: flex-start; margin: .35rem 0 .6rem; font: inherit; cursor: pointer; }
.botao.copiar.copiado { background: #198754; border-color: #198754; color: #fff; }

/* On phones GitHub and YouTube show only their icons, so the menu fits on one line. */
@media (max-width: 640px) {
  .menu { gap: .1rem .15rem; }
  .menu .rotulo { display: none; }
  .menu .marca-icone { width: 1.35em; height: 1.35em; }
}

/* About page: photo and text, then the YouTube channel and its videos. */
.sobre-abertura { display: flex; gap: 1.5rem; align-items: flex-start; }
.sobre-abertura h1 { margin-top: 0; }
.sobre-foto { border-radius: 50%; flex: none; box-shadow: var(--sombra); border: 3px solid var(--superficie); }
@media (max-width: 640px) { .sobre-abertura { flex-direction: column; } .sobre-foto { width: 88px; height: 88px; } }
h2.com-icone .marca-icone { width: 1.1em; height: 1.1em; }
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1.25rem; margin-top: .75rem; }
.video { display: flex; flex-direction: column; gap: .5rem; color: var(--texto); text-decoration: none; }
.video-capa { position: relative; display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--borda); box-shadow: var(--sombra); }
.video-capa img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .25s; }
.video:hover .video-capa img { transform: scale(1.04); }
.video-play { position: absolute; inset: 0; margin: auto; width: 3rem; height: 2.1rem; display: grid; place-items: center;
  background: #ff0000; color: #fff; border-radius: 10px; font-size: .95rem; opacity: .9; }
.video-titulo { font-size: .95rem; line-height: 1.35; }
.video:hover .video-titulo { color: var(--destaque); }
#canal h3 { margin-top: 1.75rem; }

/* Footer: the brand-colored line of the top bar and the credits. */
.rodape::before { content: ""; display: block; height: 3px; background: linear-gradient(90deg, #0d6efd, #6f42c1, #d63384); }
.rodape { margin-top: 2rem; background: var(--superficie); color: var(--secundario); font-size: .9rem; }
.rodape-final { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding-block: 1.25rem 1.5rem; font-size: .85rem; }
.rodape-final img { border-radius: 2px; }

/* Demo logins: one card per role with copyable username and password. */
.acessos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: 1rem; }
.acesso code { white-space: nowrap; }
.acesso { background: var(--superficie); border: 1px solid var(--borda); border-radius: 12px; padding: 1rem; box-shadow: var(--sombra); }
.acesso dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem .75rem; align-items: center; margin: .6rem 0 0; }
.acesso dt { color: var(--secundario); font-size: .9rem; }
.acesso dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.acesso .botao.copiar { margin: 0; padding: .2rem .6rem; font-size: .85rem; }
.aviso-demo { font-size: .9rem; margin-top: .75rem; }

/* Home: a short headline about the systems, then the system cards right away. */
.abertura-inicio { padding: 3rem 0 1.5rem; }
.abertura-inicio h1 { width: fit-content; margin: 0 0 .5rem; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.02em;
  background: linear-gradient(90deg, #0d6efd, #6f42c1, #d63384); -webkit-background-clip: text; background-clip: text; color: transparent; }
.destaques { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.destaques li { padding: .3rem .75rem; border-radius: 999px; background: var(--superficie); border: 1px solid var(--borda); font-size: .9rem; }
.destaques li::before { content: "✓ "; color: #198754; font-weight: 700; }
.sobre-abertura .chamada { max-width: none; font-size: 1.1rem; margin: 0 0 .75rem; }

/* The system administrator: a full-width card, screen beside the text on wide screens. */
.perfil-destaque { grid-column: 1 / -1; border-color: #6f42c1; }
@media (min-width: 800px) {
  .perfil-destaque { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1.5rem; align-items: start; }
  .perfil-destaque .perfil-texto h3 { margin-top: 0; }
}

/* License page: one card per block, "can" in green, "cannot" in red. */
.chamada-larga { max-width: 52rem; }
.destaques a { color: inherit; text-decoration: underline; text-decoration-color: var(--borda); text-underline-offset: 3px; }
.licenca-blocos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1rem; }
.licenca-bloco { background: var(--superficie); border: 1px solid var(--borda); border-radius: 12px; padding: 1.25rem; box-shadow: var(--sombra); }
.licenca-bloco h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
.licenca-bloco ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.licenca-bloco li { padding-left: 1.4rem; position: relative; }
.licenca-pode { border-top: 4px solid #198754; }
.licenca-precisa { border-top: 4px solid #0d6efd; }
.licenca-precisa li::before { content: "→"; color: #0d6efd; }
.licenca-nao_pode { border-top: 4px solid #dc3545; }
.licenca-texto { border-top: 4px solid #6f42c1; }
.licenca-bloco p:last-child { margin-bottom: 0; }
.aviso-licenca { margin-top: 1.25rem; font-size: .9rem; }
