/* ============================================================
   Aportize — base do site
   Tokens, reset, container, navbar e rodapé.
   Carregada primeiro em todas as páginas.
   ============================================================ */

/* ---------- Fontes (self-hosted, OFL; ver assets/fonts/*-OFL.txt) ---------- */

/* Archivo 400 800 latin-ext */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/archivo-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Archivo 400 800 latin */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/archivo-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Mono 400 latin-ext */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* IBM Plex Mono 400 latin */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Mono 500 latin-ext */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* IBM Plex Mono 500 latin */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Mono 600 latin-ext */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* IBM Plex Mono 600 latin */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Paleta da marca */
  --bg: #0D1117;
  --surface: #161B22;
  --surface-2: #1C232C;   /* fields e blocos dentro de um painel */
  --line: #21262D;
  --green: #00C896;
  --green-contrast: #00382A;
  --text: #F5F7FA;
  --text-secondary: #C9CDD3;
  --muted: #8B949E;
  --red: #FF5C5C;

  /* Hairline: mais suave que --line quando é só separação visual */
  --hairline: rgba(245, 247, 250, .08);

  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --max-width: 1440px;   /* trava das telas ultragrandes */
  --gutter: 20px;          /* respiro lateral do mobile */
  --nav-h: 54px;

  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;

  --t: 220ms cubic-bezier(.32, .72, 0, 1);
}

@media (min-width: 900px) {
  :root { --nav-h: 60px; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--green); color: var(--green-contrast); }

/* Sticky footer: o conteúdo cresce para preencher a viewport curta, e o
   rodapé mantém uma folga fixa em relação ao conteúdo em toda página. */
body > main { flex: 1 0 auto; }

/* Container único do site: navbar, conteúdo e rodapé compartilham,
   por isso tudo arow na mesma margem esquerda.
   Mobile: largura cheia com respiro fixo.
   Do tablet para cima: 80vw, travado em --max-width. */
.wrap {
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 900px) {
  .wrap {
    width: 80vw;
    max-width: var(--max-width);
    padding: 0;
  }
}

/* Números: sempre mono, tabulares, nunca quebrando no meio da cifra. */
.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
}

/* ---------- Navbar ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(13, 17, 23, .72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-nav { background: var(--bg); }
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--nav-h);
}

.site-nav__brand {
  flex: none;
  display: flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  transition: opacity var(--t);
}

.site-nav__brand:hover { opacity: .6; }

/* O logotipo herda a cor do link; a altura é a única medida fixa, a
   largura vem da proporção do desenho (~3,89:1). */
.site-nav__logo {
  display: block;
  width: auto;
  height: 17px;
}

@media (min-width: 900px) {
  .site-nav__logo { height: 19px; }
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}

.site-nav__links a {
  display: block;
  font-size: 13.5px;
  letter-spacing: -.01em;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--t);
}

.site-nav__links a:hover,
.site-nav__links a[aria-current] { color: var(--text); }

/* ---------- Menu do mobile ---------- */

/* Duas linhas que viram um X, sem terceira barra: o traço some no
   fechado e o X nasce girando a partir do centro. */
.site-nav__toggle {
  display: none;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.site-nav__toggle-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
}

.site-nav__toggle-icon::before,
.site-nav__toggle-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  margin-top: -.75px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--t);
}

.site-nav__toggle-icon::before { transform: translateY(-3px); }
.site-nav__toggle-icon::after { transform: translateY(3px); }

.site-nav.is-open .site-nav__toggle-icon::before { transform: rotate(45deg); }
.site-nav.is-open .site-nav__toggle-icon::after { transform: rotate(-45deg); }

body.has-nav-open { overflow: hidden; }

@media (max-width: 759px) {
  .site-nav__toggle { display: grid; }

  .site-nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px var(--gutter) 20px;
    background: rgba(13, 17, 23, .88);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--hairline);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity var(--t), transform var(--t), visibility var(--t);
  }

  .site-nav.is-open .site-nav__links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav__links li + li { border-top: 1px solid var(--hairline); }

  .site-nav__links a {
    padding: 15px 2px;
    font-size: 17px;
    letter-spacing: -.02em;
  }

  /* Os itens entram em cascata, como na navegação do apple.com. */
  .site-nav.is-open .site-nav__links li {
    animation: nav-item-in 280ms cubic-bezier(.32, .72, 0, 1) backwards;
  }
  .site-nav.is-open .site-nav__links li:nth-child(1) { animation-delay: 40ms; }
  .site-nav.is-open .site-nav__links li:nth-child(2) { animation-delay: 70ms; }
  .site-nav.is-open .site-nav__links li:nth-child(3) { animation-delay: 100ms; }
  .site-nav.is-open .site-nav__links li:nth-child(4) { animation-delay: 130ms; }
  .site-nav.is-open .site-nav__links li:nth-child(5) { animation-delay: 160ms; }
  .site-nav.is-open .site-nav__links li:nth-child(6) { animation-delay: 190ms; }
}

@keyframes nav-item-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav__links,
  .site-nav__toggle-icon::before,
  .site-nav__toggle-icon::after { transition-duration: 1ms; }
  .site-nav.is-open .site-nav__links li { animation: none; }
}

/* ---------- Rodapé ---------- */

.site-footer {
  margin-top: clamp(64px, 9vw, 104px);
  border-top: 1px solid var(--hairline);
  font-size: 14px;
  color: var(--muted);
}

.site-footer__inner {
  padding-top: 48px;
  padding-bottom: calc(48px + env(safe-area-inset-bottom));
  display: grid;
  gap: 36px;
}

.site-footer__brand {
  display: inline-block;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--text);
  text-decoration: none;
}

.site-footer a.site-footer__brand { color: var(--text); }
.site-footer a.site-footer__brand:hover { opacity: .6; }

/* A assinatura carrega o peso sozinha, sem parágrafo de apoio. */
.site-footer__tagline {
  margin: 8px 0 0;
  max-width: 36ch;
  color: var(--text-secondary);
  font-size: 15px;
  letter-spacing: -.015em;
  line-height: 1.5;
}

/* ---------- Contato ---------- */

/* Os canais moram na barra de baixo, junto da bandeira e do CNPJ: são
   sinais institucionais, não navegação. */
.site-footer__contact {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* O respiro dá 35px de alvo de toque sem mexer na altura da barra, que
   é ditada pelas três linhas do bloco legal. */
.site-footer .site-footer__contact a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px;
  border-radius: 50%;
}

.site-footer__contact svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-footer__groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.site-footer__groups h2 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text);
}

.site-footer__groups ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--t);
}

.site-footer a:hover { color: var(--text); }

/* Três itens agora: o bloco legal empurra contato e bandeira para a
   direita, e os dois ficam juntos no canto. */
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
}

.site-footer__bottom p { margin: 0; max-width: 68ch; }

.site-footer__legal { display: grid; gap: 3px; min-width: 0; margin-right: auto; }

.site-footer__by {
  font-size: 11px;
  line-height: 1.5;
  opacity: .8;
}

/* Isenção legal presente, mas o mais discreta possível. */
.site-footer__disclaimer {
  font-size: 11px;
  line-height: 1.5;
  opacity: .5;
}

.site-footer__region {
  flex: none;
  display: inline-flex;
  align-items: center;
}

.site-footer__region svg {
  display: block;
  width: auto;
  height: 13px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(245, 247, 250, .12);
}

/* ---------- Foco visível ---------- */

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Desktop ---------- */

@media (min-width: 760px) {
  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 40px 64px;
    padding-top: 56px;
    padding-bottom: 56px;
  }

  /* Três colunas cabem a partir daqui; abaixo disso a terceira desce. */
  .site-footer__groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px;
  }

  .site-footer__bottom {
    grid-column: 1 / -1;
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
