/* ==========================================================================
   Code Science — folha de estilos
   --------------------------------------------------------------------------
   Índice
     1. Variáveis (cores, fontes, espaçamentos)  <- edite aqui
     2. Fonte auto-hospedada
     3. Base e tipografia
     4. Temas de seção (escuro, claro, azul)
     5. Layout (wrap, grade, seções) e fundos decorativos (malha, grade, órbitas)
     6. Componentes (logo, botões, etiquetas, listas de dados)
     7. Cabeçalho e navegação
     8. Página inicial (abertura, soluções e esquemas, princípios, sobre, contato)
     9. Rodapé
    10. Páginas de documento (privacidade, termos; serve para blog/produto)
    11. Página 404
    12. Preferências do usuário e impressão
   ========================================================================== */


/* 1. Variáveis
   ========================================================================== */
:root {
  /* Cores: base */
  --navy-950: #010A1E;   /* rodapé */
  --navy-900: #020F2A;   /* fundo escuro principal (o azul-marinho do logotipo) */
  --navy-700: #17305C;   /* linhas sobre fundo escuro */
  --blue-700: #0D3B80;   /* blocos azuis (índice da abertura, princípios, esquemas) */
  --blue-600: #3463A6;   /* linhas sobre o azul */
  --blue-500: #2C62AE;   /* azul médio: detalhes sobre fundo claro */
  --blue-300: #9DB6D6;   /* texto secundário sobre fundo escuro */
  --blue-200: #C9D8EA;   /* texto secundário sobre o azul */
  --blue-100: #D6E0EC;   /* linhas sobre fundo claro */
  --blue-50:  #E6EDF6;   /* etiquetas sobre fundo claro */
  --slate:    #465A78;   /* texto secundário sobre fundo claro */
  --paper:    #F4F7FA;   /* branco frio */

  /* Cores: destaque (usar com parcimônia) */
  --accent:         #0B66DB;  /* sobre fundo claro */
  --accent-on-dark: #45C2FF;  /* sobre fundo escuro */

  /* Cores da marca, tiradas do logotipo: o símbolo vai do ciano ao azul;
     "Science", no nome, usa o azul-céu. */
  --brand-cyan: #05F2FC;
  --brand-blue: #0580FF;
  --brand-sky:  #27A6F8;

  /* Fonte (uma família só) */
  --font-sans: "Archivo", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Tamanhos de texto */
  --fs-display: clamp(2.625rem, 1.5rem + 4.8vw, 5rem);
  --fs-h2:      clamp(2rem, 1.35rem + 2.8vw, 3.375rem);
  --fs-h3:      clamp(1.5rem, 1.25rem + 1.1vw, 2.125rem);
  --fs-lead:    clamp(1.125rem, 1.04rem + 0.4vw, 1.3125rem);
  --fs-body:    1.0625rem;
  --fs-small:   0.9375rem;
  --fs-tiny:    0.8125rem;

  /* Espaçamentos */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --section-y: clamp(4rem, 2.5rem + 6vw, 8rem);      /* respiro vertical das seções */
  --gutter:    clamp(1.25rem, 0.5rem + 3.5vw, 3rem); /* margem lateral */
  --col-gap:   clamp(1rem, 0.5rem + 1.5vw, 2rem);    /* vão entre colunas */

  /* Estrutura */
  --max-width: 76rem;
  --content-w: min(100% - 2 * var(--gutter), var(--max-width));
  --header-h:  4.25rem;
  --radius:    8px;    /* botões e blocos pequenos */
  --radius-lg: 16px;   /* painéis dos esquemas */
  --ease:      150ms ease;
}


/* 2. Fonte auto-hospedada
   ========================================================================== */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}


/* 3. Base e tipografia
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* As âncoras param rente ao cabeçalho fixo, sem deixar aparecer a seção anterior. */
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--navy-950);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, address, table {
  margin: 0;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-display); line-height: 1; letter-spacing: -0.035em; font-weight: 620; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.02em; }

p { text-wrap: pretty; }

/* :where() mantém a especificidade em zero, para os componentes poderem definir margens */
:where(ul, ol)[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

address { font-style: normal; }

img, svg { display: block; max-width: 100%; }

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--ease), text-decoration-color var(--ease);
}

a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--focus, var(--accent-on-dark));
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--accent);
  color: #FFFFFF;
}

strong { font-weight: 600; }


/* 4. Temas de seção
   Cada seção recebe um tema; os componentes leem estas variáveis.
   ========================================================================== */
.theme-dark {
  --bg: var(--navy-900);
  --fg: var(--paper);
  --fg-muted: var(--blue-300);
  --line: var(--navy-700);
  --link: var(--accent-on-dark);
  --focus: var(--accent-on-dark);
}

.theme-deep {
  --bg: var(--navy-950);
  --fg: var(--paper);
  --fg-muted: var(--blue-300);
  --line: var(--navy-700);
  --link: var(--paper);
  --focus: var(--accent-on-dark);
}

.theme-light {
  --bg: var(--paper);
  --fg: var(--navy-900);
  --fg-muted: var(--slate);
  --line: var(--blue-100);
  --link: var(--accent);
  --focus: var(--accent);
}

.theme-blue {
  --bg: var(--blue-700);
  --fg: var(--paper);
  --fg-muted: var(--blue-200);
  --line: var(--blue-600);
  --link: var(--paper);
  --focus: var(--paper);
}

.theme-dark,
.theme-deep,
.theme-light,
.theme-blue {
  background: var(--bg);
  color: var(--fg);
}


/* 5. Layout
   ========================================================================== */
.wrap {
  width: var(--content-w);
  margin-inline: auto;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: var(--col-gap);
}

@media (min-width: 60em) {
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
}

.section {
  padding-block: var(--section-y);
}

/* Cabeçalho de seção: título grande à esquerda, apoio à direita */
.section-head {
  row-gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.section-lead {
  max-width: 34em;
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--fg-muted);
}

@media (min-width: 60em) {
  .section-head { align-items: end; margin-bottom: var(--space-6); }
  .section-head > h2 { grid-column: 1 / span 6; }
  .section-head > .section-lead { grid-column: 8 / span 5; padding-bottom: 0.375rem; }
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -6rem;
  z-index: 30;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--navy-900);
  font-weight: 600;
}

.skip-link:focus { top: 0.5rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}


/* 5.1 Fundos decorativos
   Três recursos, todos em cor sólida e sem arquivos de imagem:
     .bg-dots   malha de pontos
     .bg-lines  grade de linhas finas
     .orbits    órbitas (SVG embutido no HTML) que repetem o átomo do logotipo
   As classes .bg-tr, .bg-tl, .bg-br e .bg-bl dizem de que canto a malha
   parte (topo/base, direita/esquerda); ela some aos poucos até o canto oposto.
   Para tirar o fundo de uma seção, basta remover essas classes no HTML.
   ========================================================================== */
.theme-dark  { --pattern: #2F4C7C; --orbit: #2F4C7C; --orbit-dot: var(--blue-300); }
.theme-deep  { --pattern: #1D3050; --orbit: #1D3050; --orbit-dot: var(--blue-300); }
.theme-light { --pattern: #B5C6DD; --orbit: #B5C6DD; --orbit-dot: var(--blue-500); }
.theme-blue  { --pattern: #2C5896; --orbit: #416FAF; --orbit-dot: var(--blue-200); }

.bg-dots,
.bg-lines {
  position: relative;
  isolation: isolate;
}

.bg-dots::before,
.bg-lines::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 90% 100% at var(--bg-origin, 100% 0%), #000 12%, transparent 76%);
          mask-image: radial-gradient(ellipse 90% 100% at var(--bg-origin, 100% 0%), #000 12%, transparent 76%);
}

.bg-dots::before {
  background-image: radial-gradient(circle, var(--pattern) 1.3px, transparent 1.8px);
  background-size: 1.625rem 1.625rem;
}

.bg-lines::before {
  background-image:
    linear-gradient(to right, var(--pattern) 1px, transparent 1px),
    linear-gradient(to bottom, var(--pattern) 1px, transparent 1px);
  background-size: 3.5rem 3.5rem;
}

.bg-tr { --bg-origin: 100% 0%; }
.bg-tl { --bg-origin: 0% 0%; }
.bg-br { --bg-origin: 100% 100%; }
.bg-bl { --bg-origin: 0% 100%; }

/* Órbitas: o elemento que as contém precisa de position, isolation e overflow
   (veja .contact-panel). */
.orbits {
  position: absolute;
  z-index: -1;
  width: 38rem;
  max-width: none;
  aspect-ratio: 1;
  pointer-events: none;
}

.orbit {
  fill: none;
  stroke: var(--orbit);
  stroke-width: 1.25;
}

.orbit--dashed {
  stroke-width: 2;
  stroke-dasharray: 2 10;
  stroke-linecap: round;
}

.orbit-core { fill: var(--orbit-dot); }

/* Elétrons: só aparecem se o navegador souber posicioná-los sobre a órbita.
   Na abertura eles giram bem devagar; com "reduzir movimento" ficam parados. */
.electron {
  display: none;
  fill: var(--orbit-dot);
}

.electron--accent { fill: var(--brand-cyan); }

@supports (offset-path: path("M0 0")) {
  .electron {
    display: inline;
    offset-rotate: 0deg;
  }

  .electron--1 { offset-path: path("M200 320 a120 50 0 1 0 240 0 a120 50 0 1 0 -240 0"); offset-distance: 14%; }
  .electron--2 { offset-path: path("M110 320 a210 88 0 1 0 420 0 a210 88 0 1 0 -420 0"); offset-distance: 58%; }
  .electron--3 { offset-path: path("M20 320 a300 126 0 1 0 600 0 a300 126 0 1 0 -600 0"); offset-distance: 81%; }

  .orbits--live .electron { animation: orbit linear infinite; }
  .orbits--live .electron--1 { animation-duration: 70s; animation-delay: -10s; }
  .orbits--live .electron--2 { animation-duration: 120s; animation-delay: -70s; }
  .orbits--live .electron--3 { animation-duration: 180s; animation-delay: -146s; }
}

@keyframes orbit {
  from { offset-distance: 0%; }
  to   { offset-distance: 100%; }
}


/* 6. Componentes
   ========================================================================== */

/* Logotipo
   O símbolo (átomo, "</>" e trilhas de circuito) é um arquivo SVG:
     img/logo-simbolo.svg          versão completa, para tamanhos grandes
     img/logo-simbolo-pequeno.svg  traço reforçado, para cabeçalho e rodapé
     img/logo-codescience.svg      logotipo inteiro num arquivo só (uso fora do site)
   O nome e o slogan são texto: "Code" na cor do texto, "Science" no azul
   da marca. O símbolo foi desenhado para fundo escuro. */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--fg);
  font-size: 1.4375rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.logo-mark {
  width: auto;
  height: 2.875rem;
  flex: none;
}

/* "Science": azul da marca, em degradê suave quando o navegador permite */
.logo-name span,
.brand-name span {
  color: var(--brand-sky);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .logo-name span,
  .brand-name span {
    background-image: linear-gradient(90deg, #27B3FB, #2590EF);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

/* Slogan: caixa-alta espaçada, como no logotipo */
.logo-tagline,
.brand-tagline {
  font-weight: 400;
  text-transform: uppercase;
  color: var(--blue-200);
}

/* Rodapé: símbolo maior, com o slogan embaixo do nome */
.logo-text {
  display: grid;
  gap: 0.4375rem;
}

.logo-tagline {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
}

.site-footer .logo {
  gap: 0.75rem;
  font-size: 1.75rem;
}

.site-footer .logo-mark { height: 4rem; }

/* Rótulo pequeno (sumário, colunas do rodapé) */
.label {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--fg-muted);
}

/* Etiqueta em forma de pílula */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--navy-900);
  font-size: var(--fs-tiny);
  font-weight: 600;
  line-height: 1.4;
}

/* Botão (único estilo; inverte no hover) */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.375rem;
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  background: var(--fg);
  color: var(--bg);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color var(--ease), color var(--ease);
}

.btn:hover {
  background: transparent;
  color: var(--fg);
}

.arrow {
  width: 1em;
  height: 1em;
  flex: none;
  transition: transform var(--ease);
}

.btn:hover .arrow,
.link-arrow:hover .arrow,
.hero-index a:hover .arrow { transform: translateX(4px); }

/* Link de texto com seta */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
}

/* Lista de dados (dados da empresa, contato, rodapé) */
.data-list {
  display: grid;
  font-size: var(--fs-small);
  line-height: 1.45;
}

.data-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.125rem 1rem;
  padding-block: 0.75rem;
  border-top: 1px solid var(--line);
}

.data-list dt { color: var(--fg-muted); }

.data-list dd {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.data-list a { color: var(--fg); }

@media (min-width: 30em) {
  .data-list > div { grid-template-columns: 7.5rem minmax(0, 1fr); }
}


/* 7. Cabeçalho e navegação
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  column-gap: var(--space-3);
  min-height: var(--header-h);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: clamp(1rem, 2.5vw, 2.25rem);
  row-gap: 0.25rem;
  margin: 0;
  padding: 0 0 0.75rem;
  list-style: none;
}

.nav-list a {
  display: block;
  padding-block: 0.375rem;
  color: var(--fg);
  font-size: var(--fs-small);
  font-weight: 500;
  text-decoration-color: transparent;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
}

.nav-toggle {
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: var(--fs-small);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--ease);
}

.nav-toggle:hover { border-color: var(--fg); }

/* Telas pequenas com JS: menu recolhido atrás do botão */
@media (max-width: 47.99em) {
  .site-nav { flex-basis: 100%; }

  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }

  .js .nav-list {
    display: block;
    padding: 0 0 1rem;
  }

  .js .nav-list li { border-top: 1px solid var(--line); }

  .js .nav-list a {
    padding-block: 0.875rem;
    font-size: 1.0625rem;
  }
}

/* Telas médias e grandes: navegação em linha; "Contato" vira botão */
@media (min-width: 48em) {
  .nav-toggle { display: none; }
  .nav-list { padding-bottom: 0; }

  .nav-list a.nav-cta {
    padding: 0.5rem 1rem;
    border: 1px solid var(--fg);
    border-radius: var(--radius);
    text-decoration: none;
    transition: background-color var(--ease), color var(--ease);
  }

  .nav-list a.nav-cta:hover {
    background: var(--fg);
    color: var(--bg);
  }
}


/* 8. Página inicial
   ========================================================================== */

/* 8.1 Abertura: à esquerda, o que a empresa faz; à direita, o logotipo
       completo (símbolo, nome e slogan). Embaixo, de ponta a ponta, a faixa
       azul com o índice das soluções. */
.hero { display: grid; }

/* Logotipo completo. As medidas são em "em" a partir do tamanho do nome e
   repetem as proporções do logotipo; para aumentar ou diminuir o conjunto,
   mude só o font-size de .brand-lockup. */
.hero-brand {
  order: -1;   /* em telas estreitas, o logotipo vem antes do título */
  display: grid;
  place-items: center;
  padding: clamp(2.5rem, 2rem + 3vw, 4rem) var(--gutter) 0;
}

.brand-lockup {
  display: grid;
  justify-items: center;
  font-size: clamp(2.75rem, 1.9rem + 3.6vw, 4.25rem);
  line-height: 1;
  white-space: nowrap;
}

.brand-symbol {
  width: auto;
  height: 4.28em;
}

.brand-name {
  margin-top: 0.16em;
  font-weight: 500;
  color: var(--fg);
}

.brand-tagline {
  margin-top: 0.5em;
  margin-right: -0.06em;    /* compensa o espaço depois da última letra */
  font-size: max(0.162em, 0.6875rem);
  letter-spacing: 0.06em;
}

.hero-main {
  padding: clamp(3rem, 2rem + 5vw, 6rem) var(--gutter) clamp(3rem, 2rem + 4vw, 5rem);
}

.hero-lead {
  max-width: 33em;
  margin-top: var(--space-4);
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--fg-muted);
}

.hero-cta { margin-top: var(--space-4); }

/* Índice das soluções: uma coluna no celular, duas em telas médias,
   quatro lado a lado em telas grandes. */
.hero-index-inner {
  width: var(--content-w);
  margin-inline: auto;
  padding-block: var(--space-4);
}

.hero-index ul { margin-top: var(--space-2); }

.hero-index li { border-top: 1px solid var(--line); }

.hero-index a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.125rem 1rem;
  padding-block: 1.125rem;
  color: var(--fg);
  text-decoration: none;
}

.hero-index a strong {
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color var(--ease);
}

.hero-index a:hover strong { text-decoration-color: currentColor; }

.hero-index a span {
  grid-column: 1;
  font-size: var(--fs-small);
  line-height: 1.4;
  color: var(--fg-muted);
}

.hero-index a .arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 1.25rem;
  height: 1.25rem;
}

@media (min-width: 40em) {
  .hero-index ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--col-gap);
  }
}

@media (min-width: 60em) {
  .hero {
    grid-template-columns: 1fr calc(var(--content-w) * 0.57) calc(var(--content-w) * 0.43) 1fr;
    align-items: center;
  }

  .hero-main {
    grid-column: 2;
    padding-inline: 0 var(--space-5);
  }

  .hero-brand {
    grid-column: 3;
    order: 0;
    padding: var(--space-5) 0;
  }

  .brand-lockup { font-size: clamp(3rem, 4.6vw, 4.25rem); }

  .hero-index { grid-column: 1 / -1; }

  .hero-index ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* 8.2 Soluções: texto de um lado, esquema do produto do outro, alternando */
.solution {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4) var(--col-gap);
  align-items: center;
}

.solution + .solution { margin-top: clamp(4rem, 2.5rem + 5vw, 7rem); }

.solution-text h3 { margin-top: var(--space-2); }

.solution-text > p {
  max-width: 34em;
  margin-top: var(--space-3);
}

.feature-list {
  margin-top: var(--space-3);
  display: grid;
  gap: 0.5rem;
}

.feature-list li {
  position: relative;
  padding-left: 1.375rem;
  font-weight: 500;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

@media (min-width: 60em) {
  .solution { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .solution > * { grid-row: 1; }
  .solution-text { grid-column: 1 / span 5; }
  .solution > .viz { grid-column: 7 / span 6; }
  .solution--flip .solution-text { grid-column: 8 / span 5; }
  .solution--flip > .viz { grid-column: 1 / span 6; }
}

/* 8.3 Esquemas dos produtos (HTML e CSS, sem imagens).
       Cada painel define as próprias cores a partir destas variáveis. */
.viz {
  --v-soft: var(--blue-700);   /* blocos internos */
  --v-line: var(--blue-600);   /* conectores */
  --v-muted: var(--blue-300);  /* texto secundário */
  padding: clamp(1.25rem, 0.5rem + 3vw, 2.5rem);
  border-radius: var(--radius-lg);
  background: var(--navy-900);
  color: var(--paper);
  font-size: var(--fs-small);
  line-height: 1.4;
}

.viz--blue {
  --v-soft: var(--navy-900);
  --v-line: var(--blue-300);
  --v-muted: var(--blue-200);
  background: var(--blue-700);
}

.viz figcaption {
  margin-top: var(--space-3);
  font-size: var(--fs-tiny);
  color: var(--v-muted);
}

/* Esquema: chat por WhatsApp (um número, filas, atendentes) */
.viz-source {
  display: inline-grid;
  gap: 0.125rem;
  padding: 0.875rem 1.25rem;
  border-radius: 12px;
  background: var(--paper);
  color: var(--navy-900);
}

.viz-source strong { font-size: 1.0625rem; }
.viz-source span { color: var(--slate); }

.viz-queues {
  display: grid;
  gap: 0.75rem;
  margin-left: 1.5rem;
  padding-top: 0.75rem;
}

.viz-queues li {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-left: 1.75rem;
  padding: 0.875rem 1.125rem;
  border-radius: 12px;
  background: var(--v-soft);
}

.viz-queues li::before {
  content: "";
  position: absolute;
  left: -1.75rem;
  top: -0.75rem;
  width: 1.75rem;
  height: calc(50% + 0.75rem);
  border-left: 2px solid var(--v-line);
  border-bottom: 2px solid var(--v-line);
  border-bottom-left-radius: 10px;
}

.viz-queue-name { font-weight: 600; font-size: 1rem; }

.viz-team {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--blue-200);
}

.viz-people { display: inline-flex; padding-left: 0.5rem; }

.viz-people i {
  width: 1.5rem;
  height: 1.5rem;
  margin-left: -0.5rem;
  border: 2px solid var(--v-soft);
  border-radius: 50%;
  background: var(--blue-300);
}

.viz-people i:nth-child(2) { background: var(--paper); }
.viz-people i:nth-child(3) { background: var(--accent-on-dark); }

/* Esquema: e-mail, SMS e RCS (estado de cada envio) */
.status > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem 1rem;
  padding-block: 1rem;
  border-top: 1px solid var(--blue-600);
}

.status > li:first-child { border-top: 0; padding-top: 0; }

.status-channel { font-size: 1.0625rem; font-weight: 600; }

.status-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.375rem;
}

.status-steps li {
  padding: 0.4375rem 0.25rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: var(--fs-tiny);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.status-steps .is-done { background: var(--paper); color: var(--navy-900); }
.status-steps .is-wait { border-color: var(--v-muted); color: var(--paper); }
.status-steps .is-na { border-style: dashed; border-color: var(--v-muted); color: var(--v-muted); font-weight: 500; }

@media (min-width: 30em) {
  .status > li { grid-template-columns: 4.5rem minmax(0, 1fr); }
}

/* Esquema: atendimento por IA (exemplo de conversa) */
.chat { display: grid; gap: 0.75rem; }

.msg {
  max-width: 86%;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 1rem;
}

.msg-who {
  display: block;
  margin-bottom: 0.125rem;
  font-size: var(--fs-tiny);
  font-weight: 600;
}

.msg-in {
  justify-self: start;
  border-bottom-left-radius: 4px;
  background: var(--v-soft);
}

.msg-in .msg-who { color: var(--blue-200); }

.msg-out {
  justify-self: end;
  border-bottom-right-radius: 4px;
  background: var(--paper);
  color: var(--navy-900);
}

.msg-out .msg-who { color: var(--blue-500); }

.msg-system {
  justify-self: center;
  margin-top: 0.25rem;
  padding: 0.4375rem 1rem;
  border: 1.5px dashed var(--v-line);
  border-radius: 999px;
  font-size: var(--fs-tiny);
  font-weight: 500;
  text-align: center;
  color: var(--v-muted);
}

/* Esquema: software sob medida (integração entre sistemas) */
.build {
  display: grid;
  justify-items: center;
  text-align: center;
}

.node {
  padding: 0.75rem 1.125rem;
  border-radius: 12px;
  background: var(--v-soft);
  font-weight: 500;
}

.node--main {
  padding: 1rem 1.5rem;
  background: var(--paper);
  color: var(--navy-900);
  font-size: 1.125rem;
  font-weight: 600;
}

.build-link {
  font-size: var(--fs-tiny);
  color: var(--v-muted);
}

.build-link::before,
.build-link::after {
  content: "";
  display: block;
  width: 2px;
  height: 0.875rem;
  margin: 0.25rem auto;
  background: var(--v-line);
}

.build-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

/* Chamada de contato entre seções */
.callout {
  display: grid;
  gap: var(--space-3);
  align-items: center;
  margin-top: clamp(4rem, 2.5rem + 5vw, 7rem);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.callout-text {
  max-width: 26em;
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

@media (min-width: 60em) {
  .callout { grid-template-columns: minmax(0, 1fr) auto; }
}

/* 8.4 Como trabalhamos: quatro regras em duas colunas */
.principles {
  display: grid;
  gap: var(--space-5) var(--space-6);
}

.principle {
  padding-top: var(--space-3);
  border-top: 1px solid var(--blue-300);
}

.principle h3 { font-size: clamp(1.3125rem, 1.2rem + 0.5vw, 1.625rem); }

.principle p {
  max-width: 34em;
  margin-top: 0.75rem;
  color: var(--fg-muted);
}

.principles-cta { margin-top: var(--space-5); }

@media (min-width: 48em) {
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 8.5 Sobre: texto à esquerda, painel com o número e os endereços à direita */
.about-grid {
  row-gap: var(--space-5);
  align-items: center;
}

.about-main .label {
  margin-bottom: var(--space-2);
  color: var(--blue-500);
}

.about-main h2 { max-width: 13em; }

.about-lead {
  max-width: 30em;
  margin-top: var(--space-4);
  font-size: clamp(1.1875rem, 1.08rem + 0.55vw, 1.5rem);
  line-height: 1.42;
  letter-spacing: -0.01em;
}

.about-main > p:not(.label):not(.about-lead) {
  max-width: 34em;
  margin-top: var(--space-3);
  color: var(--fg-muted);
}

.about-panel {
  overflow: hidden;
  padding: clamp(1.5rem, 1rem + 2.5vw, 2.75rem);
  border-radius: var(--radius-lg);
}

.about-number {
  display: block;
  font-size: clamp(5.5rem, 3.5rem + 8vw, 9rem);
  font-weight: 620;
  line-height: 0.85;
  letter-spacing: -0.055em;
}

.about-number span { color: var(--brand-cyan); }

.about-stat-caption {
  display: block;
  max-width: 15em;
  margin-top: var(--space-3);
  font-size: var(--fs-lead);
  line-height: 1.35;
  color: var(--fg-muted);
}

.about-facts {
  margin-top: var(--space-4);
  font-size: var(--fs-small);
}

.about-facts > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.125rem 1rem;
  padding-block: 0.75rem;
  border-top: 1px solid var(--line);
}

.about-facts dt { font-weight: 600; }
.about-facts dd { color: var(--fg-muted); }

@media (min-width: 60em) {
  .about-main { grid-column: 1 / span 7; }
  .about-panel { grid-column: 9 / span 4; }
}

/* 8.6 Contato: um painel azul com a chamada e o que ajuda contar no e-mail */
.contact-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5) var(--space-6);
  padding: clamp(1.75rem, 0.75rem + 4.5vw, 4.5rem);
  border-radius: clamp(16px, 2.2vw, 28px);
}

.contact-panel .orbits {
  width: 28rem;
  top: -17rem;
  right: -18rem;
}

.contact-main h2 { max-width: 11em; }

.contact-main > p {
  max-width: 28em;
  margin-top: var(--space-3);
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--fg-muted);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: var(--space-4);
}

.contact-email {
  color: var(--fg);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.contact-tips ol {
  margin-top: 0.75rem;
  counter-reset: tip;
}

.contact-tips li {
  counter-increment: tip;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  align-items: center;
  padding-block: 0.875rem;
  border-top: 1px solid var(--line);
  font-weight: 500;
}

.contact-tips li::before {
  content: counter(tip);
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--paper);
  color: var(--blue-700);
  font-size: var(--fs-small);
  font-weight: 700;
}

@media (min-width: 60em) {
  .contact-panel {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    align-items: end;
  }

  .contact-panel .orbits {
    width: 38rem;
    top: -17rem;
    right: -17rem;
  }
}


/* 9. Rodapé
   ========================================================================== */
.site-footer {
  padding-block: var(--space-6) var(--space-4);
  border-top: 1px solid var(--line);
  font-size: var(--fs-small);
}

.footer-grid { row-gap: var(--space-5); }

.footer-brand p {
  max-width: 18em;
  margin-top: var(--space-2);
  color: var(--fg-muted);
}

.footer-legal .data-list > div:first-child { border-top: 0; padding-top: 0; }

.footer-links { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }

.footer-links ul { margin-top: 0.75rem; }

.footer-links li + li { margin-top: 0.5rem; }

.footer-links a {
  color: var(--fg);
  text-decoration-color: transparent;
}

.footer-links a:hover { text-decoration-color: currentColor; text-decoration-thickness: 1px; }

.footer-copy {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  font-size: var(--fs-tiny);
  color: var(--fg-muted);
}

@media (min-width: 60em) {
  .footer-brand { grid-column: 1 / span 4; }
  .footer-legal { grid-column: 5 / span 5; }
  .footer-links { grid-column: 10 / span 3; grid-template-columns: minmax(0, 1fr); }
}


/* 10. Páginas de documento
   Usado em privacidade.html e termos.html. A mesma estrutura serve,
   no futuro, para uma página de produto ou um artigo de blog.
   ========================================================================== */
.doc-head {
  padding-block: clamp(3rem, 2rem + 5vw, 6rem) clamp(2.5rem, 2rem + 3vw, 4rem);
}

.doc-head .label { margin-bottom: var(--space-2); }

.doc-head h1 { font-size: clamp(2.375rem, 1.5rem + 3.6vw, 4.25rem); }

.doc-intro {
  max-width: 40em;
  margin-top: var(--space-3);
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--fg-muted);
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 2rem;
  margin-top: var(--space-4);
  font-size: var(--fs-small);
  color: var(--fg-muted);
}

.doc-meta b { font-weight: 600; color: var(--fg); }

@media (min-width: 60em) {
  .doc-head .label { grid-column: 1 / -1; }
  .doc-head-main { grid-column: 1 / span 9; }
}

.doc-body { padding-block: clamp(2.5rem, 2rem + 3vw, 5rem) var(--section-y); }

.doc-grid { row-gap: var(--space-5); }

/* Sumário */
.doc-toc ol {
  margin-top: 0.75rem;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  font-size: var(--fs-small);
  line-height: 1.35;
}

.doc-toc li {
  counter-increment: toc;
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  padding-block: 0.375rem;
}

.doc-toc li::before {
  content: counter(toc) ".";
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}

.doc-toc a {
  color: var(--fg);
  text-decoration-color: transparent;
}

.doc-toc a:hover { text-decoration-color: currentColor; text-decoration-thickness: 1px; }

@media (min-width: 60em) {
  .doc-toc {
    grid-column: 1 / span 3;
    align-self: start;
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    max-height: calc(100vh - var(--header-h) - 3rem);
    overflow-y: auto;
  }
  .prose { grid-column: 5 / span 8; }
}

/* Texto corrido */
.prose {
  counter-reset: sec;
  max-width: 44rem;
}

.prose > section { scroll-margin-top: var(--space-3); }

.prose > section + section { margin-top: var(--space-6); }

.prose h2 { font-size: clamp(1.5rem, 1.3rem + 0.9vw, 2rem); }

.prose h2::before {
  counter-increment: sec;
  content: counter(sec) ". ";
  color: var(--blue-500);
}

.prose h3 {
  margin-top: var(--space-4);
  font-size: 1.1875rem;
  letter-spacing: -0.012em;
  line-height: 1.25;
}

.prose p,
.prose ul,
.prose ol,
.prose dl,
.prose .table-wrap {
  margin-top: var(--space-2);
}

.prose h2 + p,
.prose h2 + ul,
.prose h2 + ol,
.prose h2 + dl,
.prose h2 + .table-wrap { margin-top: var(--space-3); }

.prose ul,
.prose ol { padding-left: 1.25rem; }

.prose li + li { margin-top: 0.5rem; }

.prose li::marker { color: var(--blue-500); }

.prose ol.roman { list-style: upper-roman; padding-left: 2rem; }

.prose .data-list { margin-top: var(--space-3); }

.prose .data-list > div:last-child { border-bottom: 1px solid var(--line); }

/* Tabelas */
.table-wrap { overflow-x: auto; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
  line-height: 1.5;
}

.prose th,
.prose td {
  padding: 0.75rem 1rem 0.75rem 0;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose thead th {
  border-top: 0;
  font-weight: 600;
  color: var(--fg-muted);
}

.prose tbody th { width: 46%; font-weight: 600; }

.prose tbody tr:last-child > * { border-bottom: 1px solid var(--line); }

/* Telas estreitas: cada linha da tabela vira um bloco (título em cima, texto embaixo) */
@media (max-width: 39.99em) {
  .prose thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .prose table,
  .prose tbody,
  .prose tr,
  .prose tbody th,
  .prose td { display: block; width: auto; }

  .prose tbody th { padding: 0.75rem 0 0.25rem; }

  .prose td { padding: 0 0 0.75rem; border-top: 0; }

  .prose tbody tr:last-child > th { border-bottom: 0; }
}

/* Passo a passo numerado */
.prose ol.steps {
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.prose ol.steps > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  padding-block: var(--space-3);
  border-top: 1px solid var(--line);
}

.prose ol.steps > li + li { margin-top: 0; }

.prose ol.steps > li:last-child { border-bottom: 1px solid var(--line); }

.prose ol.steps > li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--paper);
  font-size: var(--fs-small);
  font-weight: 600;
}

.prose ol.steps h3 { margin-top: 0.1875rem; }

.prose ol.steps .btn { margin-top: var(--space-2); }

/* Bloco de destaque sóbrio (uma borda, sem fundo) */
.note {
  margin-top: var(--space-3);
  padding-left: var(--space-2);
  border-left: 3px solid var(--accent);
}


/* 11. Página 404
   ========================================================================== */
.notfound {
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--header-h) - 1px);
  min-height: calc(100svh - var(--header-h) - 1px);
  padding-block: var(--section-y);
}

.notfound-code {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--fg-muted);
}

.notfound h1 { margin-top: var(--space-2); max-width: 14em; }

.notfound p.notfound-text {
  max-width: 30em;
  margin-top: var(--space-3);
  font-size: var(--fs-lead);
  color: var(--fg-muted);
}

.notfound .btn { margin-top: var(--space-4); }


/* 12. Preferências do usuário e impressão
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .electron { animation: none !important; }
}

/* Alto contraste do sistema: "Science" volta a ser texto comum, sem degradê */
@media (forced-colors: active) {
  .logo-name span,
  .brand-name span {
    background-image: none;
    -webkit-text-fill-color: currentColor;
  }
}

@media print {
  .site-header,
  .skip-link,
  .doc-toc,
  .nav-toggle,
  .orbits,
  .bg-dots::before,
  .bg-lines::before { display: none !important; }

  body,
  .theme-dark,
  .theme-deep,
  .theme-light,
  .theme-blue {
    --bg: #FFFFFF;
    --fg: #000000;
    --fg-muted: #333333;
    --line: #BBBBBB;
    --link: #000000;
    background: #FFFFFF;
    color: #000000;
  }

  /* No papel o nome e o slogan saem em tinta sólida */
  .logo-name span,
  .brand-name span {
    background-image: none;
    -webkit-text-fill-color: currentColor;
    color: #0B66DB;
  }

  .logo-tagline,
  .brand-tagline { color: #333333; }

  .section,
  .doc-head,
  .doc-body { padding-block: 1.5rem; }
}
