/* ==========================================================================
   VOLL STUDIOS — BASE  (reset + tipografia + primitivas de layout)
   Depende de tokens.css. Não contém componente algum.
   ========================================================================== */

/* ---------- FONTE LOCAL (fallback offline / falha do Google Fonts) ------- */
@font-face {
  font-family: 'Avenir Roman';
  src: url('../fonts/avenir-roman.ttf') format('truetype');
  font-weight: 400; 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) + var(--sp-4));
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;          /* trava o arrasto lateral sem quebrar sticky   */
  min-height: 100svh;
}

img, picture, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}
img { font-style: italic; background-repeat: no-repeat; background-size: cover; }

input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul[class], ol[class] { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
p, li, figcaption { text-wrap: pretty; }
iframe { border: 0; }

/* ---------- FOCO VISÍVEL — obrigatório, nunca remover -------------------- */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}
.on-dark :focus-visible,
[data-theme="dark"] :focus-visible { outline-color: var(--teal-300); }

/* ---------- PULAR PARA O CONTEÚDO --------------------------------------- */
.skip-link {
  position: absolute; left: var(--sp-4); top: var(--sp-4);
  z-index: var(--z-toast);
  transform: translateY(-200%);
  background: var(--navy-500); color: var(--ink-invert);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-pill);
  font-weight: var(--fw-bold); font-size: var(--fs-sm);
  transition: transform var(--dur-base) var(--ease-out);
}
.skip-link:focus-visible { transform: translateY(0); }

/* ---------- TIPOGRAFIA -------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--navy-500);
  font-weight: var(--fw-black);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: var(--ls-tight); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-extra); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-extra); line-height: var(--lh-base); }

.display   { font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: var(--ls-tight); font-weight: var(--fw-black); }
.lead      { font-size: var(--fs-lead); color: var(--ink-soft); line-height: var(--lh-relaxed); max-width: var(--measure); }
.text-sm   { font-size: var(--fs-sm); }
.text-xs   { font-size: var(--fs-xs); }
.measure       { max-width: var(--measure); }
.measure-tight { max-width: var(--measure-tight); }

/* Eyebrow — rótulo curto em caixa alta acima do título de seção            */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-xs); font-weight: var(--fw-extra);
  letter-spacing: var(--ls-wide); text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow::before {
  content: ''; width: 22px; height: 2px; border-radius: 2px;
  background: currentColor; flex-shrink: 0;
}
.eyebrow--center::before { display: none; }

/* Kicker manuscrito — a assinatura da marca. Uso restrito (ver tokens.css) */
.kicker {
  display: inline-block;
  font-family: var(--font-script);
  font-weight: var(--fw-bold);
  font-size: var(--fs-kicker);
  line-height: 1.1;
  color: var(--teal-500);
  transform: rotate(-2deg);
  transform-origin: left center;
}

/* Cores de texto (papéis, não decoração)                                   */
.t-navy    { color: var(--navy-500); }
.t-teal    { color: var(--teal-600); }
.t-accent  { color: var(--accent-ink); }
.t-soft    { color: var(--ink-soft); }
.t-invert  { color: var(--ink-invert); }
.t-invert-soft { color: var(--ink-invert-soft); }

/* Realce dentro de título — herda o acento da página                       */
h1 em, h2 em, .display em { font-style: normal; color: var(--accent-ink); }
h1 strong, h2 strong, .display strong { font-weight: inherit; color: var(--teal-500); }

/* Sublinhado manuscrito sob palavra-chave do hero                          */
.underline-brush {
  position: relative; display: inline-block; white-space: nowrap;
}
.underline-brush::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -.06em;
  height: .18em; border-radius: var(--r-pill);
  background: var(--teal-300); opacity: .55; z-index: -1;
}

/* ---------- LAYOUT ------------------------------------------------------ */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide   { max-width: calc(var(--container-wide)   + var(--gutter) * 2); }
.container--narrow { max-width: calc(var(--container-narrow) + var(--gutter) * 2); }

.section        { padding-block: var(--section-y); }
.section--sm    { padding-block: var(--section-y-sm); }
.section--flush-top    { padding-block-start: 0; }
.section--flush-bottom { padding-block-end: 0; }

.bg-cream  { background: var(--surface); }
.bg-white  { background: var(--surface-raised); }
.bg-sunken { background: var(--surface-sunken); }
.bg-navy   { background: var(--surface-dark);   color: var(--ink-invert); }
.bg-darker { background: var(--surface-darker); color: var(--ink-invert); }
.bg-navy h1, .bg-navy h2, .bg-navy h3, .bg-navy h4,
.bg-darker h1, .bg-darker h2, .bg-darker h3, .bg-darker h4 { color: var(--ink-invert); }
.bg-navy p, .bg-darker p { color: var(--ink-invert-soft); }

/* Topo arredondado das faixas escuras — assinatura visual herdada da v1    */
.blob-top    { border-start-start-radius: var(--r-blob); border-start-end-radius: var(--r-blob); }
.blob-bottom { border-end-start-radius: var(--r-blob);   border-end-end-radius: var(--r-blob); }

/* Cabeçalho de seção reutilizável                                          */
.section-head { margin-bottom: var(--sp-12); max-width: var(--measure); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head > * + * { margin-top: var(--sp-4); }

/* Grid utilitário — auto-fit evita media query em card list                */
.grid { display: grid; gap: var(--sp-6); }
.grid--2  { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--3  { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid--4  { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.grid--gap-lg { gap: var(--sp-10); }

/* Split — bloco de texto + mídia lado a lado                               */
.split {
  display: grid;
  gap: clamp(var(--sp-8), 5vw, var(--sp-20));
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .split            { grid-template-columns: 1fr 1fr; }
  .split--text-wide { grid-template-columns: 1.15fr 1fr; }
  .split--media-wide{ grid-template-columns: 1fr 1.15fr; }
  .split--reverse > :first-child { order: 2; }
}

.stack > * + * { margin-top: var(--sp-4); }
.stack-lg > * + * { margin-top: var(--sp-6); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; }
.cluster--center { justify-content: center; }

.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-8  { margin-top: var(--sp-8); }
.mt-12 { margin-top: var(--sp-12); }

/* Só para leitor de tela                                                   */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- REVELAÇÃO AO ROLAR -----------------------------------------
   Progressive enhancement: só esconde se o JS marcou <html class="js">.
   Sem JS, o conteúdo aparece normalmente — nunca fica invisível.          */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur-reveal) var(--ease-out),
              transform var(--dur-reveal) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- IMPRESSÃO --------------------------------------------------- */
@media print {
  .site-header, .site-footer, .wa-float, .carousel-btn, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
}
