/* plugio-site — folha única. Estética de documentação técnica: papel, tinta, uma cor de sinalização.
   A cor de marca é provisória (o nome e a identidade são decididos por último). */

@font-face { font-family: "Plex Sans"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --paper: #f6f5f1;
  --paper-2: #edebe4;
  --ink: #1b1d1f;
  --ink-2: #4a4e52;
  --ink-3: #767b80;
  --rule: #d6d3ca;
  --signal: #c2410c;          /* laranja de sinalização, usado com parcimônia */
  --signal-soft: #c2410c1a;
  --ok: #2f6f4f;
  --line-active: var(--signal);
  --radius: 4px;
  --wrap: 72rem;
  --gutter: 1rem;
  --sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141517;
    --paper-2: #1c1e21;
    --ink: #e9e7e1;
    --ink-2: #b4b2ab;
    --ink-3: #85837d;
    --rule: #2e3034;
    --signal: #f07a3c;
    --signal-soft: #f07a3c1f;
    --ok: #6fbf94;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #141517; --paper-2: #1c1e21; --ink: #e9e7e1; --ink-2: #b4b2ab; --ink-3: #85837d;
  --rule: #2e3034; --signal: #f07a3c; --signal-soft: #f07a3c1f; --ok: #6fbf94; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--signal); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 48rem) { :root { --gutter: 2rem; } }

/* ---------- tipografia ---------- */
h1, h2, h3 { font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); max-width: 22ch; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); max-width: 28ch; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; max-width: 64ch; }
.lead { font-size: 1.1875rem; color: var(--ink-2); max-width: 58ch; }
.label {
  font: 500 0.75rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.label .n { color: var(--signal); margin-right: 0.6em; }

/* ---------- cabeçalho ---------- */
.top {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 3.75rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; text-decoration: none; }
.brand-mark { width: 22px; height: 22px; border: 2px solid var(--ink); border-radius: 3px; position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 5px; background: var(--signal); border-radius: 1px; }
.nav { display: none; gap: 1.75rem; font-size: 0.9375rem; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--signal); }
.top .enter { font-size: 0.9375rem; text-decoration: none; color: var(--ink-2); }
@media (min-width: 56rem) { .nav { display: flex; } }

/* menu mobile: botão fixo no canto inferior esquerdo, abre para cima (preferência do dono) */
.mnav-btn {
  position: fixed; left: 1rem; bottom: 1rem; z-index: 40;
  display: inline-flex; align-items: center; gap: 0.5rem;
  height: 3rem; padding: 0 1rem;
  font: 500 0.9375rem var(--sans);
  color: var(--paper); background: var(--ink);
  border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: 0 4px 18px rgb(0 0 0 / 0.18);
}
.mnav {
  position: fixed; left: 1rem; bottom: 4.75rem; z-index: 40;
  min-width: 15rem; padding: 0.5rem;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 10px;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.18);
}
.mnav[hidden] { display: none; }
.mnav a { display: block; padding: 0.75rem 0.875rem; text-decoration: none; border-radius: 6px; }
.mnav a:hover { background: var(--paper-2); color: var(--ink); }
@media (min-width: 56rem) { .mnav-btn, .mnav { display: none !important; } }
body { padding-bottom: 5rem; }
@media (min-width: 56rem) { body { padding-bottom: 0; } }

/* ---------- seções ---------- */
section { padding: 4rem 0; border-bottom: 1px solid var(--rule); }
@media (min-width: 48rem) { section { padding: 6rem 0; } }
.section-head { display: grid; gap: 1rem; margin-bottom: 2.5rem; }
.hero { padding-top: 3.5rem; }
@media (min-width: 48rem) { .hero { padding-top: 6rem; } }
.hero h1 { margin: 1.25rem 0 1.5rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; height: 2.875rem; padding: 0 1.25rem;
  font: 500 0.9375rem var(--sans); text-decoration: none;
  border: 1px solid var(--ink); border-radius: var(--radius);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn-ghost:hover { border-color: var(--signal); }

/* lista de cenas ("como costuma ser hoje") */
.scenes { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.scenes li { padding: 1.1rem 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 2.5rem 1fr; gap: 0.5rem; max-width: 60rem; }
.scenes li::before { content: counter(scene, decimal-leading-zero); counter-increment: scene; font: 500 0.8125rem/1.9 var(--mono); color: var(--ink-3); }
.scenes { counter-reset: scene; }

/* blocos de capacidade */
.facts { display: grid; gap: 2rem 3rem; }
@media (min-width: 48rem) { .facts { grid-template-columns: 1fr 1fr; } }
.fact h3 { margin-bottom: 0.5rem; }
.fact p { color: var(--ink-2); margin: 0; }

.split { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 56rem) { .split { grid-template-columns: 1fr 1fr; gap: 4rem; } }

.figure {
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper-2);
  padding: 1rem; color: var(--ink-2);
}
.figure figcaption { font: 400 0.8125rem var(--mono); color: var(--ink-3); margin-top: 0.75rem; }

/* "o que ainda não fazemos" */
.limits { list-style: none; padding: 0; margin: 0 0 1.5rem; border-left: 2px solid var(--signal); }
.limits li { padding: 0.5rem 0 0.5rem 1.25rem; color: var(--ink-2); max-width: 60ch; }

.note { font: 400 0.875rem/1.5 var(--mono); color: var(--ink-3); }

/* ---------- rodapé ---------- */
footer { padding: 3rem 0 4rem; font-size: 0.9375rem; color: var(--ink-2); }
footer .cols { display: grid; gap: 2rem; }
@media (min-width: 48rem) { footer .cols { grid-template-columns: 2fr 1fr 1fr; } }
footer ul { list-style: none; padding: 0; margin: 0.75rem 0 0; display: grid; gap: 0.4rem; }
footer a { text-decoration: none; }

/* ---------- diagramas SVG ---------- */
.dia { width: 100%; height: auto; font-family: var(--mono); }
.dia .box { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.dia .box-muted { fill: var(--paper); stroke: var(--rule); stroke-width: 1.5; }
.dia .t { fill: var(--ink); font-size: 13px; }
.dia .t-muted { fill: var(--ink-3); font-size: 12px; }
.dia .wire { stroke: var(--ink-3); stroke-width: 1.5; fill: none; }
.dia .wire-off { stroke: var(--rule); stroke-width: 1.5; fill: none; stroke-dasharray: 4 5; }
.dia .wire-on { stroke: var(--signal); stroke-width: 2.5; fill: none; stroke-dasharray: 6 6; animation: flow 1.2s linear infinite; }
.dia .dot-on { fill: var(--signal); }
@keyframes flow { to { stroke-dashoffset: -24; } }
@media (prefers-reduced-motion: reduce) { .dia .wire-on { animation: none; stroke-dasharray: none; } }

/* marcador do nome do produto (decidido por último) — some quando o nome for definido */
.ph { font-family: var(--mono); font-size: 0.92em; padding: 0 0.3em; border: 1px dashed var(--ink-3); border-radius: 3px; white-space: nowrap; }
.draft-banner { background: var(--signal); color: #fff; font: 500 0.875rem var(--mono); padding: 0.6rem var(--gutter); text-align: center; }

/* ---------- tabela de portas e listas (páginas internas; acrescentado na fase 3) ----------
   A tabela larga rola dentro do contêiner, nunca a página. Só tokens existentes: vale para claro e escuro. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); margin: 0 0 2rem; }
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 46rem; font-size: 0.9375rem; }
.table-wrap caption { text-align: left; padding: 0.75rem 1rem; font: 400 0.8125rem var(--mono); color: var(--ink-3); border-bottom: 1px solid var(--rule); }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 0.75rem 1rem; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.table-wrap th { font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); background: var(--paper-2); }
.table-wrap td:first-child { color: var(--ink); }
.table-wrap tr:last-child td { border-bottom: 0; }
code { font: 400 0.9em var(--mono); overflow-wrap: anywhere; }
.plain-list { margin: 0 0 1.5rem; padding-left: 1.25rem; }
.plain-list li { margin-bottom: 0.75rem; max-width: 64ch; color: var(--ink-2); }

/* ---------- texto longo: privacidade e termos (acrescentado na fase 3) ----------
   Seções mais curtas que as da landing, subtítulos com respiro e marcações [DONO]/[JURÍDICO] destacadas.
   Só tokens existentes: vale para claro e escuro. */
.legal section:not(.hero) { padding: 2.5rem 0; }
@media (min-width: 48rem) { .legal section:not(.hero) { padding: 3.5rem 0; } }
.legal .section-head { margin-bottom: 1.5rem; }
.legal h3 { margin: 2rem 0 0.75rem; }
.legal .section-head + h3 { margin-top: 0; }
.legal section p.note { border-left: 2px solid var(--signal); padding-left: 0.75rem; max-width: 64ch; }
.legal .hero p.note { border-left: 0; padding-left: 0; }

/* ---------- trilhas por perfil ---------- */
.nav a[aria-current="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--signal); }
.subnav { border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.subnav .wrap { display: flex; gap: 1.5rem; overflow-x: auto; height: 2.75rem; align-items: center; font-size: 0.875rem; white-space: nowrap; scrollbar-width: thin; }
.subnav a { text-decoration: none; color: var(--ink-2); }
.subnav a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.mnav-group { margin: 0.75rem 0.875rem 0.25rem; font: 500 0.6875rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.mnav { max-height: calc(100vh - 6rem); overflow-y: auto; }

/* seletor de perfil (topo da página inicial) */
.profiles { display: grid; gap: 0.75rem; margin-top: 2.5rem; max-width: 52rem; }
@media (min-width: 48rem) { .profiles { grid-template-columns: repeat(3, 1fr); } }
.profiles a {
  display: block; padding: 1rem 1.1rem; text-decoration: none;
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper);
}
.profiles a:hover { border-color: var(--signal); color: inherit; }
.profiles .who { font: 500 0.75rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.profiles .what { display: block; margin-top: 0.5rem; font-weight: 500; }
.profiles a[aria-current="true"] { border-color: var(--ink); }
