@import url('fonts.css');

/* ============================================================
   GRUPO VOCICAL — base.css
   Tokens, reset, tipografia, utilitários, superfícies, componentes
   ============================================================ */

:root {
  /* Cores de marca */
  --red:       #a60303;
  --red-dark:  #730a0a;
  --ink:       #0d0d0d;
  --charcoal:  #1a1a1a;
  --paper:     #f9f9f9;
  --white:     #ffffff;
  --gray:      #8a8a8a;
  --line:      #e4e4e4;        /* divisores em superfície clara */
  --line-dark: rgba(255,255,255,.12);

  /* Tipografia */
  --font:    'Archivo', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: 'Archivo Black', var(--font);

  /* Espaçamento e medidas */
  --container: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(64px, 9vw, 132px);
  --radius: 14px;
  --radius-sm: 8px;

  /* Sombras */
  --shadow:    0 18px 50px -20px rgba(13,13,13,.28);
  --shadow-sm: 0 6px 20px -12px rgba(13,13,13,.35);

  /* Motion */
  --ease-weight: cubic-bezier(.2,.7,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--charcoal);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ---------- Tipografia ---------- */
h1, h2, h3, h4 { line-height: 1.05; font-weight: 700; letter-spacing: -.01em; }
.display { font-family: var(--display); font-weight: 400; letter-spacing: -.02em; line-height: .98; }

/* Tipo como massa — manchetes que sangram, números de instrumento */
.display--mass {
  font-family: var(--display); font-weight: 400;
  line-height: .9; letter-spacing: -.03em;
  font-size: clamp(2.8rem, 8vw, 7rem);
  text-transform: none;
}
.num--mass { font-family: var(--display); line-height: .85; letter-spacing: -.02em; }

h1, .h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
h2, .h2 { font-size: clamp(1.9rem, 4.2vw, 3.2rem); }
h3, .h3 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); }

.lede { font-size: clamp(1.05rem, 1.5vw, 1.3rem); font-weight: 500; color: #3a3a3a; }
.muted { color: var(--gray); }
/* Palavra-destaque do título: chip arredondado (padrão da página Nossa História).
   Variante A — superfície clara e heros sobre mídia: chip vermelho, texto branco. */
.accent {
  display: inline-block; line-height: 1; vertical-align: baseline;
  padding: .05em .2em .11em; border-radius: 7px;
  margin-block: .07em;   /* respiro quando dois chips empilham em linhas seguidas */
  color: #fff; background: var(--red);
}
/* Variante B — sobre vermelho e vermelho-escuro: chip branco, texto vermelho
   (regra de marca: nunca vermelho sobre vermelho). */
.surface--dark .accent, .surface--char .accent, .surface--red .accent {
  color: var(--red); background: #fff;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(40px, 6vw, 80px); }
.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }
.grid { display: grid; gap: clamp(18px, 2.5vw, 32px); }

/* ---------- Superfícies ---------- */
.surface--paper { background: var(--paper); color: var(--charcoal); }
.surface--white { background: var(--white); color: var(--charcoal); }
.surface--dark  { background: var(--red-dark); color: var(--white); position: relative; }
.surface--char  { background: var(--red-dark); color: var(--white); position: relative; }
.surface--red   { background: var(--red);  color: var(--white); }
.surface--dark .muted, .surface--char .muted, .surface--red .muted { color: rgba(255,255,255,.7); }

/* grão sutil para superfícies escuras */
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .05; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.surface--dark > .container, .surface--red > .container, .surface--char > .container { position: relative; z-index: 1; }

/* Foto tratada como bloco duotone charcoal->vermelho + grão. Uso:
   <div class="duotone"><img src="..." alt="..."></div> */
.duotone { position: relative; overflow: hidden; background: var(--ink); }
.duotone > img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(1) contrast(1.05) brightness(.82);
  mix-blend-mode: luminosity;
}
.duotone::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(150deg, var(--red) 0%, var(--charcoal) 62%, var(--ink) 100%);
  mix-blend-mode: multiply; opacity: .9;
}
.duotone::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Grade de células soldadas — linguagem de catálogo industrial.
   Cada célula define seu próprio fundo. */
.hairline-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.surface--dark .hairline-grid, .surface--char .hairline-grid { background: var(--line-dark); border-color: var(--line-dark); }
.cell { background: var(--white); transition: background .2s var(--ease-weight); }
.surface--dark .cell, .surface--char .cell { background: var(--red-dark); }
.cell:hover { background: var(--paper); }
.surface--dark .cell:hover, .surface--char .cell:hover { background: #851212; }

/* ---------- Eyebrow com régua ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .7rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--red);
}
.eyebrow::before { content: ""; width: 40px; height: 2px; background: currentColor; }
.surface--dark .eyebrow, .surface--char .eyebrow { color: #ff5a5a; }
.surface--red .eyebrow { color: #fff; }

/* ---------- Kicker (régua vermelha + label) ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--red);
}
.kicker::before { content: ""; width: 32px; height: 2px; background: var(--red); display: inline-block; }
.surface--dark .kicker, .surface--char .kicker, .surface--red .kicker { color: #ff5a5a; }
.surface--red .kicker { color: var(--white); }
.surface--red .kicker::before { background: var(--white); }

/* Respiro padrão entre o rótulo de seção (kicker/eyebrow) e o título logo abaixo.
   :where() zera a especificidade → é só um piso: qualquer regra por classe
   (.sec-head h2, .page-hero__title, etc.) continua mandando no valor final. */
:where(.kicker, .eyebrow) + :is(h1, h2, h3) { margin-top: 1.2rem; }

/* ---------- Pill badge ---------- */
.pill {
  display: inline-block; padding: .4em 1em; border-radius: 999px;
  background: var(--red); color: var(--white);
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .9em 1.5em; border-radius: 999px;
  font-weight: 700; letter-spacing: .01em; line-height: 1;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--cta { background: var(--red); color: var(--white); box-shadow: var(--shadow-sm); }
.btn--cta:hover { background: var(--red-dark); }
.btn--ghost { border: 1.5px solid currentColor; }
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { background: #f0f0f0; }
.btn--dark { background: var(--ink); color: var(--white); }
.btn--dark:hover { background: var(--charcoal); }

/* ícone quadrado vermelho dentro do botão (recurso de marca) */
.btn__ic { width: 1.4em; height: 1.4em; display: grid; place-items: center; border-radius: 5px; background: var(--red); color: #fff; }
.btn--cta .btn__ic, .btn--red .btn__ic { background: rgba(0,0,0,.18); }

/* ---------- CTA "anti-metal" (porte 1:1 do componente 21st.dev) ----------
   Corpo metálico escuro + slab vermelho que expande no hover, revelando o
   padrão de bolinhas em chevron que marcham em onda. Fiel ao modelo; trocado
   apenas verde->vermelho e a borda (rounded-xl -> pílula). Aplicado via cta.js. */
.amb {
  --amb-h: 44px; --amb-fs: 14px;
  position: relative; display: inline-flex; align-items: center;
  height: var(--amb-h); padding: 0 18px 0 calc(var(--amb-h) + 8px);
  border-radius: 999px; overflow: hidden; cursor: pointer; text-decoration: none;
  transition: transform .12s ease;
  /* PADRÃO: corpo VERMELHO + slab BRANCO (fundo claro/escuro e menu mobile) */
  background: linear-gradient(180deg, #c11616 0%, var(--red) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 6px 16px -6px rgba(166,3,3,.5), 0 2px 6px rgba(0,0,0,.18);
}
.amb:active { transform: scale(.98); }
.amb--lg { --amb-h: 52px; --amb-fs: 15px; }
.amb--block { display: flex; width: 100%; }

.amb__label {
  position: relative; z-index: 0;
  font-family: var(--font); font-size: var(--amb-fs); font-weight: 600;
  letter-spacing: -.01em; color: #fff; white-space: nowrap;
}

/* slab (pílula) — colapsado à esquerda, expande no hover cobrindo o rótulo.
   Cor do slab e das bolinhas definida por variante abaixo. */
.amb__accent {
  position: absolute; top: 4px; bottom: 4px; left: 4px; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  width: calc(var(--amb-h) - 8px); overflow: hidden;
  /* padding lateral = centraliza exatamente 1 chevron (10px) no círculo colapsado,
     em qualquer tamanho: largura útil = (h-8) - 2*((h-18)/2) = 10px */
  padding-block: 0; padding-inline: calc((var(--amb-h) - 18px) / 2);
  border-radius: 999px;
  transition: width .2s cubic-bezier(.65,0,.35,1);
}
.amb:hover .amb__accent, .amb:focus-visible .amb__accent { width: calc(100% - 8px); }
.amb-cv { flex: 0 0 auto; overflow: visible; }
@keyframes amb-dot-wave { 0%, 70%, 100% { opacity: .25; transform: scale(.85); } 35% { opacity: 1; transform: scale(1); } }
.amb-dot { transform-box: fill-box; transform-origin: center; animation: amb-dot-wave 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .amb-dot { animation: none; opacity: 1; } }

/* PADRÃO (corpo vermelho): slab branco, bolinhas escuras */
.amb__accent {
  background: linear-gradient(180deg, #fff 0%, #f0f0f0 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -2px 4px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.14);
}
.amb__accent svg { fill: #0f0f0f; }

/* --white: corpo BRANCO + slab VERMELHO CLARO (superfícies vermelhas) */
.amb--white { background: linear-gradient(180deg, #fff 0%, #ededed 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 6px 16px -6px rgba(0,0,0,.35); }
.amb--white .amb__label { color: #0a0a0a; }
.amb--white .amb__accent {
  background: linear-gradient(180deg, #c11616 0%, var(--red) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 4px rgba(0,0,0,.18), 0 2px 4px rgba(0,0,0,.12);
}
.amb--white .amb__accent svg { fill: #fff; }

/* --ghost: corpo BRANCO + slab PRETO (seção das calculadoras) */
.amb--ghost { background: linear-gradient(180deg, #fff 0%, #ededed 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 6px 16px -6px rgba(0,0,0,.35); }
.amb--ghost .amb__label { color: #0a0a0a; }
.amb--ghost .amb__accent {
  background: linear-gradient(180deg, #2a2a2a 0%, #0a0a0a 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -2px 4px rgba(0,0,0,.4), 0 2px 4px rgba(0,0,0,.18);
}
.amb--ghost .amb__accent svg { fill: #fff; }

/* ---------- Cards ---------- */
.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d8d8d8; }

/* ---------- Reveal on scroll ---------- */
[data-reveal] { opacity: 0; transition: opacity .7s var(--ease-weight), transform .7s var(--ease-weight); will-change: transform, opacity; }
[data-reveal="up"], [data-reveal=""] { transform: translateY(34px); }
[data-reveal="left"]  { transform: translateX(-44px); }
[data-reveal="right"] { transform: translateX(44px); }
[data-reveal].is-in { opacity: 1; transform: none; }
/* O movimento faz parte da identidade Vocical (reveal, transições, ticker, zoom
   do mapa) e é mantido mesmo quando o sistema operacional pede redução — decisão
   do cliente. Por isso NÃO há kill-switch global de animação/transição aqui.
   O JS ainda garante que os reveals fiquem visíveis (is-in) se o observer faltar. */

/* ---------- Ticker (marquee) ---------- */
.ticker { overflow: hidden; }
.ticker__track { display: inline-flex; gap: clamp(2rem,5vw,5rem); align-items: center; white-space: nowrap; animation: ticker-marquee 32s linear infinite; }
/* pausa no hover só com ponteiro real (evita travar no touch por :hover "grudado") */
@media (hover: hover) { .ticker:hover .ticker__track { animation-play-state: paused; } }
@keyframes ticker-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Visualmente oculto (a11y) ---------- */
.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;
}
