/* GUTIZAL: base compartilhada (fontes, texto, botões, barra, abas). Tokens em tokens.css. */

@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-300-italic.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-grotesk-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-grotesk-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* Altura da barra fixa; home.js ajusta ao tamanho real (no celular a barra tem duas linhas). */
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
  background: var(--canvas);
}
body {
  margin: 0;
  /* Trava a rolagem para os lados: no celular a página não "estica" de lado, mesmo com zoom.
     O carrossel e o menu em pílula rolam dentro de si e continuam funcionando. */
  overflow-x: hidden;
  overscroll-behavior-x: none;
  background: var(--canvas);
  color: var(--text-body);
  font: 400 16px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Barra de rolagem: trilho na cor do fundo, alça reta e fina, azul aço ao passar o mouse. */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--scroll-track); }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border: 3px solid var(--scroll-track); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }
::-webkit-scrollbar-corner { background: var(--scroll-track); }
@supports (-moz-appearance: none) {
  html { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) var(--scroll-track); }
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Rótulo pequeno: a mesma grotesca da interface, discreta. */
.label {
  margin: 0;
  font: 500 13px/1.4 var(--font-ui);
  color: var(--text-muted);
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
}
/* Nome da seção acima do título: em azul aço, no lugar do antigo número. */
.label--secao { color: var(--accent); letter-spacing: .01em; }
.num {
  font: 300 italic 15px/1 var(--font-display);
  color: var(--accent);
  font-feature-settings: "lnum";
}

.display {
  margin: 0;
  font: 300 clamp(48px, 8.6vw, 112px)/.95 var(--font-display);
  letter-spacing: -.02em;
  color: var(--text);
}
.display em, .title em { font-style: italic; }
.title {
  margin: 12px 0 0;
  font: 300 clamp(34px, 5vw, 60px)/1.02 var(--font-display);
  letter-spacing: -.015em;
  color: var(--text);
}
.lead { margin: 0; max-width: 56ch; font-size: 18px; }

/* Logo em linha (SVG no próprio HTML): grade de 1 px nítida em qualquer zoom e cores do tema. */
.logo-linha { aspect-ratio: 864 / 164; width: auto; overflow: visible; }
.logo-linha__grade { fill: none; stroke: var(--logo-grid); stroke-width: 1; vector-effect: non-scaling-stroke; shape-rendering: crispEdges; }
.logo-linha__peca { fill: var(--logo-square); shape-rendering: crispEdges; }
.logo-linha__letras { fill: var(--text); }

/* Barra superior de vidro */
.bar {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 1180px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  border-radius: 10px;
}
/* A barra passa por cima da seção de contraste: um vidro mais fechado mantém o logo legível. */
.bar.glass { background: var(--bar-bg); }
.bar__logo { display: block; flex: none; }
.bar__logo .logo-linha, .bar__logo img { height: 40px; width: auto; }
.bar__tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.bar__cta { margin-left: auto; }
.bar__tools .bar__cta { margin-left: 0; }

/* Tema: botão pequeno, só o ícone (quadrado meio cheio) */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  border-radius: var(--radius-control);
  color: var(--text-body);
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
}
.theme-toggle:hover { color: var(--text); background: var(--surface-2); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle__meia { transition: transform 280ms var(--ease-glide); }
html[data-theme="light"] .theme-toggle__meia { transform: translateX(-6.5px); }

/* Abas em pílula com deslize */
.pill-tabs {
  position: relative;
  display: inline-flex;
  padding: 4px;
  border-radius: var(--radius-pill);
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.pill-tabs::-webkit-scrollbar { display: none; }
.pill-tabs--nav { margin: 0 auto; background: var(--nav-bg); }
.pill-tabs__glide {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  border-radius: var(--radius-pill);
  background: var(--text);
  transition: transform 280ms var(--ease-glide), width 280ms var(--ease-glide);
}
.pill-tabs button, .pill-tabs a {
  position: relative;
  border: 0;
  background: none;
  font: 500 14px/1 var(--font-ui);
  color: var(--text-body);
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: color 200ms ease;
}
.pill-tabs button:hover, .pill-tabs a:hover { color: var(--text); }
.pill-tabs [aria-selected="true"] { color: var(--canvas); }
.pill-tabs [aria-selected="true"]:hover { color: var(--canvas); }

/* Botões. Estrutura: texto + camada revelada com o mesmo texto, em azul aço.
   No hover (ou foco do teclado, ou toque) a camada revelada se abre a partir da borda esquerda,
   crescendo como a peça do logo, e o texto troca de cor exatamente onde o azul passa.
   Os dois textos ficam parados no mesmo lugar: nada desliza, então não aparece texto duplicado. */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  background: none;
  font: 500 15px/1 var(--font-ui);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 200ms ease;
}
.btn__label, .btn__reveal { display: inline-flex; align-items: center; gap: 8px; }
.btn__reveal {
  position: absolute;
  inset: 0;
  z-index: 1;
  justify-content: center;
  background: var(--fill);
  color: var(--on-fill);
  clip-path: inset(50% 100% 50% 0);
  transition: clip-path 450ms var(--ease-fill);
}
.btn__seta { flex: none; width: 15px; height: 15px; }

@media (hover: hover) {
  .btn:hover .btn__reveal { clip-path: inset(0 0 0 0); }
  .btn:hover { border-color: var(--fill); }
}
.btn:active .btn__reveal, .btn:focus-visible .btn__reveal { clip-path: inset(0 0 0 0); }
.btn:focus-visible { outline-offset: 4px; }

.btn--primary { background: var(--text); color: var(--canvas); }
.btn--glass { color: var(--text); }
.btn--line { border-color: var(--line-strong); color: var(--text); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn--text { padding: 0; min-height: 0; overflow: visible; color: var(--accent); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.btn--text:hover { color: var(--text); }

/* Campos */
.field { display: grid; gap: 8px; }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--line-strong);
  background: var(--abyss);
  color: var(--text);
  font: 400 16px/1.4 var(--font-ui);
}
.field textarea { min-height: 120px; resize: vertical; }
.field ::placeholder { color: var(--text-muted); }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }

/* Etiqueta */
.tag { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); font: 500 13px/1.3 var(--font-ui); color: var(--text-body); }

/* Abaixo de 1000 px o menu completo não cabe ao lado do logo: a barra passa para duas linhas
   (logo e botões em cima, menu embaixo) em vez de cortar o último item. */
@media (max-width: 1000px) {
  .bar { padding-left: 12px; gap: 8px 10px; flex-wrap: wrap; }
  .bar__logo .logo-linha, .bar__logo img { height: 32px; }
  .pill-tabs--nav { order: 3; flex-basis: 100%; margin: 0; }
  .bar__tools { flex-wrap: nowrap; }
}
/* Celular estreito (ou zoom alto): logo e botões encolhem juntos para a barra ficar em duas linhas. */
@media (max-width: 420px) {
  .bar__logo .logo-linha, .bar__logo img { height: clamp(22px, 7.2vw, 32px); }
  .bar__tools { gap: 4px; }
  .theme-toggle { width: 36px; height: 36px; }
  .bar__tools .btn--sm { padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
