/* ==========================================================================
   GJOTTA — BASE
   Reset, fontes, tipografia padrao e acessibilidade.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fontes locais (nenhuma requisicao a servidor externo)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-900.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

/* Trava a rolagem quando o menu ou o lightbox estao abertos */
body.is-locked {
  overflow: hidden;
}

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

img {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

/* --------------------------------------------------------------------------
   Tipografia
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 0.94;
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
  font-weight: 900;
}

p,
li {
  text-wrap: pretty;
}

a {
  color: var(--accent-soft);
  text-decoration: none;
  transition: color var(--dur) var(--ease-out);
}

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

strong {
  font-weight: 700;
  color: var(--text);
}

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

/* --------------------------------------------------------------------------
   Acessibilidade
   -------------------------------------------------------------------------- */

/* Foco visivel apenas para navegacao por teclado */
:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Texto so para leitores de tela */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Link "pular para o conteudo" */
.skip-link {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: var(--z-loader);
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: #fff;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transform: translateY(-150%);
  transition: transform var(--dur) var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Barra de rolagem
   -------------------------------------------------------------------------- */
@supports (scrollbar-color: red blue) {
  html {
    scrollbar-color: var(--accent) var(--bg-sunken);
    scrollbar-width: thin;
  }
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-sunken);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg-sunken);
}

/* --------------------------------------------------------------------------
   Impressao (o press kit precisa sair limpo no papel)
   -------------------------------------------------------------------------- */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  .site-header,
  .site-footer,
  .marquee,
  .noise,
  .cursor,
  .scroll-progress,
  .no-print {
    display: none !important;
  }

  a {
    color: #000;
  }

  a[href^='http']::after {
    content: ' (' attr(href) ')';
    font-size: 0.75em;
  }
}
